Panel polish

pull/2887/head
Alex P 2018-02-27 23:13:16 -08:00
parent ec6ef119fb
commit fd12ab835f
4 changed files with 96 additions and 102 deletions

View File

@ -54,6 +54,7 @@ const KapacitorRules = ({
return ( return (
<PageContents source={source}> <PageContents source={source}>
<div className="panel">
<div className="panel-heading"> <div className="panel-heading">
<h2 className="panel-title"> <h2 className="panel-title">
{builderHeader} {builderHeader}
@ -68,21 +69,20 @@ const KapacitorRules = ({
</Link> </Link>
</div> </div>
</div> </div>
<div className="panel-body">
<KapacitorRulesTable <KapacitorRulesTable
source={source} source={source}
rules={builderRules} rules={builderRules}
onDelete={onDelete} onDelete={onDelete}
onChangeRuleStatus={onChangeRuleStatus} onChangeRuleStatus={onChangeRuleStatus}
/> />
</div>
<div className="row"> </div>
<div className="col-md-12">
<div className="panel"> <div className="panel">
<div className="panel-heading"> <div className="panel-heading">
<h2 className="panel-title"> <h2 className="panel-title">
{scriptsHeader} {scriptsHeader}
</h2> </h2>
<div className="u-flex u-ai-center u-jc-space-between">
<Link <Link
to={`/sources/${source.id}/tickscript/new`} to={`/sources/${source.id}/tickscript/new`}
className="btn btn-sm btn-success" className="btn btn-sm btn-success"
@ -91,7 +91,7 @@ const KapacitorRules = ({
<span className="icon plus" /> Write TICKscript <span className="icon plus" /> Write TICKscript
</Link> </Link>
</div> </div>
</div> <div className="panel-body">
<TasksTable <TasksTable
source={source} source={source}
tasks={rules} tasks={rules}
@ -100,7 +100,6 @@ const KapacitorRules = ({
/> />
</div> </div>
</div> </div>
</div>
</PageContents> </PageContents>
) )
} }
@ -125,12 +124,10 @@ const PageContents = ({children}) =>
<div className="container-fluid"> <div className="container-fluid">
<div className="row"> <div className="row">
<div className="col-md-12"> <div className="col-md-12">
<div className="panel">
{children} {children}
</div> </div>
</div> </div>
</div> </div>
</div>
</FancyScrollbar> </FancyScrollbar>
</div> </div>

View File

@ -15,7 +15,6 @@ const {
} = TASKS_TABLE } = TASKS_TABLE
const KapacitorRulesTable = ({rules, source, onDelete, onChangeRuleStatus}) => const KapacitorRulesTable = ({rules, source, onDelete, onChangeRuleStatus}) =>
<div className="panel-body">
<table className="table v-center table-highlight"> <table className="table v-center table-highlight">
<thead> <thead>
<tr> <tr>
@ -43,7 +42,6 @@ const KapacitorRulesTable = ({rules, source, onDelete, onChangeRuleStatus}) =>
})} })}
</tbody> </tbody>
</table> </table>
</div>
const handleDelete = (rule, onDelete) => onDelete(rule) const handleDelete = (rule, onDelete) => onDelete(rule)

View File

@ -8,7 +8,6 @@ import {TASKS_TABLE} from 'src/kapacitor/constants/tableSizing'
const {colName, colType, colEnabled, colActions} = TASKS_TABLE const {colName, colType, colEnabled, colActions} = TASKS_TABLE
const TasksTable = ({tasks, source, onDelete, onChangeRuleStatus}) => const TasksTable = ({tasks, source, onDelete, onChangeRuleStatus}) =>
<div className="panel-body">
<table className="table v-center table-highlight"> <table className="table v-center table-highlight">
<thead> <thead>
<tr> <tr>
@ -34,7 +33,6 @@ const TasksTable = ({tasks, source, onDelete, onChangeRuleStatus}) =>
})} })}
</tbody> </tbody>
</table> </table>
</div>
const handleDelete = (task, onDelete) => onDelete(task) const handleDelete = (task, onDelete) => onDelete(task)

View File

@ -9,6 +9,7 @@ $panel-gutter: 30px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: stretch; align-items: stretch;
margin-bottom: $panel-gutter;
} }
.panel-heading { .panel-heading {