Просмотр исходного кода

feat(graph panel): refactoring of hide zero option, #3336

Torkel Ödegaard 10 лет назад
Родитель
Сommit
82d8e3c2b6
2 измененных файлов с 21 добавлено и 20 удалено
  1. 2 0
      CHANGELOG.md
  2. 19 20
      public/app/panels/graph/axisEditor.html

+ 2 - 0
CHANGELOG.md

@@ -6,6 +6,8 @@
 ### Enhancements
 * **CloudWatch**: Support for multiple AWS Credentials, closes [#3053](https://github.com/grafana/grafana/issues/3053), [#3080](https://github.com/grafana/grafana/issues/3080)
 * **Elasticsearch**: Support for dynamic daily indices for annotations, closes [#3061](https://github.com/grafana/grafana/issues/3061)
+* **Graph Panel**: Option to hide series with all zeroes from legend and tooltip, closes [#1381](https://github.com/grafana/grafana/issues/1381), [#3336](https://github.com/grafana/grafana/issues/3336)
+
 
 ### Bug Fixes
 * **cloudwatch**: fix for handling of period for long time ranges, fixes [#3086](https://github.com/grafana/grafana/issues/3086)

+ 19 - 20
public/app/panels/graph/axisEditor.html

@@ -150,9 +150,9 @@
 
 <div class="editor-row">
 	<div class="section">
-		<div class="tight-form last">
+		<div class="tight-form">
 			<ul class="tight-form-list">
-				<li class="tight-form-item" style="width: 110px">
+				<li class="tight-form-item" style="width: 80px">
 					Legend
 				</li>
 				<li class="tight-form-item">
@@ -164,21 +164,13 @@
 				<li class="tight-form-item">
 					<editor-checkbox text="Right side" model="panel.legend.rightSide" change="render()"></editor-checkbox>
 				</li>
-				<li class="tight-form-item last">
-					<editor-checkbox text="Hide empty" model="panel.legend.hideEmpty" change="render()"></editor-checkbox>
-				</li>
-        <li class="tight-form-item last">
-          <editor-checkbox text="Hide zero" model="panel.legend.hideZero" change="render()"></editor-checkbox>
-        </li>
 			</ul>
 			<div class="clearfix"></div>
 		</div>
-	</div>
-	<div class="section">
 		<div class="tight-form">
 			<ul class="tight-form-list">
-				<li class="tight-form-item" style="width: 105px">
-					Legend values
+				<li class="tight-form-item" style="width: 80px">
+					Values
 				</li>
 				<li class="tight-form-item">
 					<editor-checkbox text="Min" model="panel.legend.min" change="legendValuesOptionChanged()"></editor-checkbox>
@@ -195,22 +187,29 @@
 				<li class="tight-form-item last">
 					<editor-checkbox text="Total" model="panel.legend.total" change="legendValuesOptionChanged()"></editor-checkbox>
 				</li>
+				<li class="tight-form-item">
+					Decimals
+				</li>
+				<li style="width: 105px">
+					<input type="number" class="input-small tight-form-input" placeholder="auto" bs-tooltip="'Override automatic decimal precision for legend and tooltips'" data-placement="right"
+					ng-model="panel.decimals" ng-change="render()" ng-model-onblur>
+				</li>
 			</ul>
 			<div class="clearfix"></div>
 		</div>
-		<div class="tight-form last">
+		<div class="tight-form">
 			<ul class="tight-form-list">
-				<li class="tight-form-item" style="width: 105px">
-					<strong>Decimals</strong>
+				<li class="tight-form-item" style="width: 80px">
+					Hide
 				</li>
-				<li style="width: 105px">
-					<input type="number" class="input-small tight-form-input" placeholder="auto" bs-tooltip="'Override automatic decimal precision for legend and tooltips'" data-placement="right"
-					ng-model="panel.decimals" ng-change="render()" ng-model-onblur>
+				<li class="tight-form-item last">
+					<editor-checkbox text="All null series" model="panel.legend.hideEmpty" change="render()"></editor-checkbox>
 				</li>
+        <li class="tight-form-item last">
+          <editor-checkbox text="All zero series" model="panel.legend.hideZero" change="render()"></editor-checkbox>
+        </li>
 			</ul>
 			<div class="clearfix"></div>
 		</div>
-
-
 	</div>
 </div>