1- < div class ="dialog-lg ">
1+ < div class ="dialog-xlg ">
22 < div class ="panel-header ">
3- < h2 > Chart Builder </ h2 >
3+ < h2 > Add a Chart </ h2 >
44 </ div >
55 < form
66 class ="forms "
77 mn-spinner ="chartBuilderCtl.viewLoading "
88 ng-submit ="chartBuilderCtl.create() ">
9- < div class ="panel-content ">
10- < div class ="row ">
9+ < div class ="panel-content forms max-height-500 ">
10+
11+ < div class ="row pills margin-bottom-half ">
1112 < a ng-repeat ="(name, block) in chartBuilderCtl.statsDirectoryBlocks track by name "
1213 ng-if ="chartBuilderCtl.filterStats(name) "
1314 ng-class ="{selected: chartBuilderCtl.selectedBlock == name} "
14- ng-click ="chartBuilderCtl.selectTab(name) ">
15+ ng-click ="chartBuilderCtl.selectTab(name) "
16+ class ="margin-right-half ">
1517 {{name | mnFormatStatsSections | mnFormatServices}}
1618 </ a >
1719 </ div >
1820
19- < div >
21+ < div ng-if ="chartBuilderCtl.statsDirectoryBlocks[chartBuilderCtl.selectedBlock + '-' + chartBuilderCtl.newChart.bucket] "
22+ class ="row margin-bottom-1 ">
2023 < ui-select
21- ng-if ="chartBuilderCtl.statsDirectoryBlocks[chartBuilderCtl.selectedBlock + '-' + chartBuilderCtl.newChart.bucket] "
2224 style ="width:200px "
2325 class ="cbui-select "
2426 ng-model ="chartBuilderCtl.newChart.bucket "
@@ -34,36 +36,48 @@ <h2>Chart Builder</h2>
3436 </ ui-select-choices >
3537 </ ui-select >
3638
37- < ui-select
38- ng-if ="chartBuilderCtl.statsDirectoryBlocks[chartBuilderCtl.selectedBlock + '-' + chartBuilderCtl.newChart.bucket]['@items'] "
39- style ="width:200px "
40- class ="cbui-select "
41- ng-model ="chartBuilderCtl.groupItem "
42- theme ="selectize "
43- ng-disabled ="!rbac.bucketNames['.stats!read'].length ">
44- < ui-select-match
45- class ="ui-select-match "> {{$select.selected.key}}</ ui-select-match >
46- < ui-select-choices
47- class ="ui-select-choices "
48- repeat ="stat.key as (key, stat) in chartBuilderCtl.statsDirectoryBlocks[chartBuilderCtl.selectedBlock + '-' + chartBuilderCtl.newChart.bucket]['@items'] | filter: {'key':$select.search} ">
49- < span class ="select-item ellipsis " ng-bind-html ="stat.key | highlight: $select.search "> </ span >
50- </ ui-select-choices >
51- </ ui-select >
39+ < div class ="row flex-right "
40+ ng-if ="chartBuilderCtl.statsDirectoryBlocks[chartBuilderCtl.selectedBlock + '-' + chartBuilderCtl.newChart.bucket]['@items'] ">
41+ < label class ="text-small "> Views/Indexes: </ label >
42+ < ui-select
43+ ng-if ="chartBuilderCtl.statsDirectoryBlocks[chartBuilderCtl.selectedBlock + '-' + chartBuilderCtl.newChart.bucket]['@items'] "
44+ style ="width:200px "
45+ class ="cbui-select "
46+ ng-model ="chartBuilderCtl.groupItem "
47+ theme ="selectize "
48+ ng-disabled ="!rbac.bucketNames['.stats!read'].length ">
49+ < ui-select-match
50+ class ="ui-select-match "> {{$select.selected.key}}</ ui-select-match >
51+ < ui-select-choices
52+ class ="ui-select-choices "
53+ repeat ="stat.key as (key, stat) in chartBuilderCtl.statsDirectoryBlocks[chartBuilderCtl.selectedBlock + '-' + chartBuilderCtl.newChart.bucket]['@items'] | filter: {'key':$select.search} ">
54+ < span class ="select-item ellipsis " ng-bind-html ="stat.key | highlight: $select.search "> </ span >
55+ </ ui-select-choices >
56+ </ ui-select >
57+ </ div >
58+ </ div >
5259
53- < div ng-if ="chartBuilderCtl.selectedBlock == '@kv' ">
54- < div class ="formrow checkbox-list "
55- ng-repeat ="(name, _) in chartBuilderCtl.kvGroups ">
56- < input
57- id ="kv-filter-{{name}} "
58- type ="checkbox "
59- ng-model ="chartBuilderCtl.selectedKVFilters[name] ">
60- < label
61- for ="kv-filter-{{name}} "
62- class ="checkbox "> {{name}}</ label >
63- </ div >
60+ < div class ="row row-min margin-bottom-half "
61+ ng-if ="chartBuilderCtl.selectedBlock == '@kv' ">
62+ < div class ="checkbox-filter "
63+ ng-repeat ="(name, _) in chartBuilderCtl.kvGroups "
64+ ng-class ="{selected : chartBuilderCtl.selectedKVFilters[name]} ">
65+ < input
66+ id ="kv-filter-{{name}} "
67+ type ="checkbox "
68+ ng-model ="chartBuilderCtl.selectedKVFilters[name] ">
69+ < label
70+ for ="kv-filter-{{name}} "
71+ class ="initialcaps "> {{name}}</ label >
72+ </ div >
73+ </ div >
6474
75+ < div class ="margin-bottom-1 " style ="columns: 120px 3; ">
76+ <!-- ////////////// bucket KV stats //////////////////-->
77+ < div ng-if ="chartBuilderCtl.selectedBlock == '@kv' ">
6578 < div ng-repeat ="(name1, group) in chartBuilderCtl.kvGroups ">
6679 < div ng-repeat ="name in group "
80+ ng-style ="{opacity: chartBuilderCtl.maybeDisableField(chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock + '-']['@items'][name], name) ? '0.3' : '1'} "
6781 ng-if ="chartBuilderCtl.selectedKVFilters[name1] ">
6882 < input
6983 id ="stat-{{name}}-checkbox "
@@ -79,12 +93,10 @@ <h2>Chart Builder</h2>
7993 < label for ="stat-{{name}}-checkbox "
8094 ng-attr-title ="{{chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock + '-'][name].desc}} ">
8195 {{::chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock + "-"][name].title}}</ label >
82- < small >
83- ({{::chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock + "-"][name].unit}})</ small >
8496 </ div >
8597 </ div >
8698 </ div >
87-
99+ <!-- ////////////// bucket XDCR/VIEWS/INDEXES...(items) stats //////////////////-->
88100 < div
89101 ng-repeat ="(name, stat) in chartBuilderCtl.statsDirectoryBlocks[chartBuilderCtl.selectedBlock + '-' + chartBuilderCtl.newChart.bucket]['@items'][chartBuilderCtl.groupItem] "
90102 ng-if ="chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock + '-']['@items'][name] "
@@ -102,9 +114,9 @@ <h2>Chart Builder</h2>
102114 ng-model ="chartBuilderCtl.newChart.stats[chartBuilderCtl.groupItem + '/' + name] ">
103115 < label for ="stat-{{name}}-checkbox ">
104116 {{::chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock + "-"]["@items"][name].title}}</ label >
105- < small > ({{::chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock + "-"]["@items"][name].unit}})</ small >
106117 </ div >
107118
119+ <!-- ////////////// bucket non KV stats //////////////////-->
108120 < div
109121 ng-repeat ="(name, stat) in chartBuilderCtl.statsDirectoryBlocks[chartBuilderCtl.selectedBlock + '-' + chartBuilderCtl.newChart.bucket] "
110122 ng-if ="chartBuilderCtl.selectedBlock !== '@kv' && chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock + '-'][name] && name !== '@items' "
@@ -123,10 +135,9 @@ <h2>Chart Builder</h2>
123135 < label for ="stat-{{name}}-checkbox "
124136 ng-attr-title ="{{chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock + '-'][name].desc}} ">
125137 {{::chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock + "-"][name].title}}</ label >
126- < small >
127- ({{::chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock + "-"][name].unit}})</ small >
128138 </ div >
129139
140+ <!-- ////////////// services specific stats //////////////////-->
130141 < div
131142 ng-repeat ="(name, stat) in chartBuilderCtl.statsDirectoryBlocks[chartBuilderCtl.selectedBlock] track by name "
132143 ng-if ="chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock][name] && name !== '@items' "
@@ -144,56 +155,59 @@ <h2>Chart Builder</h2>
144155 ng-model ="chartBuilderCtl.newChart.stats[name] ">
145156 < label for ="stat-{{name}}-checkbox ">
146157 {{chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock][name].title}}</ label >
147- <!-- ng-true-value="{{stat | json}}" -->
148- <!-- {{::stat.title}} - -->
149- < small >
150- ({{::chartBuilderCtl.statsDesc[chartBuilderCtl.selectedBlock][name].unit}})</ small >
151158 </ div >
152159 </ div >
153160
154- < h4 class ="margin-top-1 "> Selected Stats:</ h4 >
155- < div ng-repeat ="(breadcrumb, _val) in chartBuilderCtl.breadcrumbs ">
156- {{breadcrumb}}
157- </ div >
158-
159- < h4 class ="margin-top-1 "> Show Data For:</ h4 >
160- < div class ="formrow checkbox-list ">
161- < input
162- type ="radio "
163- id ="for-whole-cluster "
164- ng-model ="chartBuilderCtl.newChart.specificStat "
165- name ="specificStat "
166- ng-change ="chartBuilderCtl.onSpecificChecked() "
167- value ="false ">
168- < label for ="for-whole-cluster "> whole cluster</ label > <!-- default value -->
169- < input
170- type ="radio "
171- id ="for-individual-nodes "
172- ng-model ="chartBuilderCtl.newChart.specificStat "
173- ng-change ="chartBuilderCtl.onSpecificChecked() "
174- name ="specificStat "
175- value ="true ">
176- < label for ="for-individual-nodes "> individual nodes</ label >
177- </ div >
161+ < hr >
162+ < div class ="row items-top flex-left ">
163+ < div class ="column ">
164+ < h4 > Display Data From</ h4 >
165+ < div class ="formrow checkbox-list ">
166+ < input
167+ type ="radio "
168+ id ="for-whole-cluster "
169+ ng-model ="chartBuilderCtl.newChart.specificStat "
170+ name ="specificStat "
171+ ng-change ="chartBuilderCtl.onSpecificChecked() "
172+ value ="false ">
173+ < label for ="for-whole-cluster "> whole cluster</ label >
174+ < input
175+ type ="radio "
176+ id ="for-individual-nodes "
177+ ng-model ="chartBuilderCtl.newChart.specificStat "
178+ ng-change ="chartBuilderCtl.onSpecificChecked() "
179+ name ="specificStat "
180+ value ="true ">
181+ < label for ="for-individual-nodes "> individual nodes</ label >
182+ </ div >
183+ </ div >
178184
179- < h4 class ="margin-top-1 "> Chart Size</ h4 >
180- < select ng-model ="chartBuilderCtl.newChart.size ">
181- < option value ="small "> S</ option >
182- < option value ="medium "> M</ option >
183- < option value ="large "> L</ option >
184- </ select >
185+ < div class ="column ">
186+ < h4 > Chart Size</ h4 >
187+ < select
188+ ng-model ="chartBuilderCtl.newChart.size "
189+ class ="fix-width-1-5 ">
190+ < option value ="small "> S</ option >
191+ < option value ="medium "> M</ option >
192+ < option value ="large "> L</ option >
193+ </ select >
194+ </ div >
185195
186- < h4 class ="margin-top-1 "> Group</ h4 >
187- < select ng-model ="chartBuilderCtl.newChart.group ">
188- < option
189- ng-repeat ="group in chartBuilderCtl.groups "
190- value ="{{group.id}} "> {{group.name}}</ option >
191- </ select >
196+ < div class ="flex-grow-2 ">
197+ < h4 > Group</ h4 >
198+ < select
199+ ng-model ="chartBuilderCtl.newChart.group ">
200+ < option
201+ ng-repeat ="group in chartBuilderCtl.groups "
202+ value ="{{group.id}} "> {{group.name}}</ option >
203+ </ select >
204+ </ div >
205+ </ div >
192206 </ div >
193207
194- < div class ="panel-footer ">
208+ < div class ="panel-footer scroll-shadow ">
195209 < a href ="" ng-click ="$dismiss() "> Cancel</ a >
196- < button type ="submit "> Display Selected Stat < span ng-show =" !chartBuilderCtl.newChart.specificStat " > s </ span > </ button >
210+ < button type ="submit "> Save Chart </ button >
197211 </ div >
198212 </ form >
199213</ div >
0 commit comments