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

graph: dashes option only used in series overrides

Removes dashes option from Display tab so that it is only available
for series overrides. Also removes options for dash space and length
in series overrides and just uses the default values of 10 for both of
them.
Daniel Lee 8 лет назад
Родитель
Сommit
6707d77af5

+ 0 - 2
public/app/core/time_series2.ts

@@ -90,8 +90,6 @@ export default class TimeSeries {
          this.lines.lineWidth = override.linewidth;
          this.dashes.lineWidth = override.linewidth;
       }
-      if (override.dashLength !== void 0) { this.dashes.dashLength[0] = override.dashLength; }
-      if (override.spaceLength !== void 0) { this.dashes.dashLength[1] = override.spaceLength; }
       if (override.nullPointMode !== void 0) { this.nullPointMode = override.nullPointMode; }
       if (override.pointradius !== void 0) { this.points.radius = override.pointradius; }
       if (override.steppedLine !== void 0) { this.lines.steps = override.steppedLine; }

+ 0 - 2
public/app/plugins/panel/graph/series_overrides_ctrl.js

@@ -101,8 +101,6 @@ define([
     $scope.addOverrideOption('Fill below to', 'fillBelowTo', $scope.getSeriesNames());
     $scope.addOverrideOption('Staircase line', 'steppedLine', [true, false]);
     $scope.addOverrideOption('Dashes', 'dashes', [true, false]);
-    $scope.addOverrideOption('Dash Length', 'dashLength', [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]);
-    $scope.addOverrideOption('Dash Space', 'spaceLength', [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]);
     $scope.addOverrideOption('Points', 'points', [true, false]);
     $scope.addOverrideOption('Points Radius', 'pointradius', [1,2,3,4,5]);
     $scope.addOverrideOption('Stack', 'stack', [true, false, 'A', 'B', 'C', 'D']);

+ 1 - 17
public/app/plugins/panel/graph/tab_display.html

@@ -32,28 +32,12 @@
 					<select class="gf-form-input" ng-model="ctrl.panel.fill" ng-options="f for f in [0,1,2,3,4,5,6,7,8,9,10]" ng-change="ctrl.render()"></select>
 				</div>
 			</div>
-			<div class="gf-form" ng-show="(ctrl.panel.lines || ctrl.panel.dashes)">
+			<div class="gf-form" ng-show="(ctrl.panel.lines)">
 				<label class="gf-form-label width-8">Line Width</label>
 				<div class="gf-form-select-wrapper max-width-5">
 					<select class="gf-form-input" ng-model="ctrl.panel.linewidth" ng-options="f for f in [0,1,2,3,4,5,6,7,8,9,10]" ng-change="ctrl.render()"></select>
 				</div>
 			</div>
-			<gf-form-switch class="gf-form" ng-show="ctrl.panel.lines"
-	                               label="Dashes" label-class="width-8"
-	                               checked="ctrl.panel.dashes" on-change="ctrl.render()">
-			</gf-form-switch>
-			<div class="gf-form" ng-show="ctrl.panel.dashes">
-			  <label class="gf-form-label width-8">Dash Length</label>
-			  <div class="gf-form-select-wrapper max-width-5">
-			    <select class="gf-form-input" ng-model="ctrl.panel.dashLength" ng-options="f for f in [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]" ng-change="ctrl.render()"></select>
-			  </div>
-			</div>
-			<div class="gf-form" ng-show="ctrl.panel.dashes">
-			  <label class="gf-form-label width-8">Dash Space</label>
-			  <div class="gf-form-select-wrapper max-width-5">
-			    <select class="gf-form-input" ng-model="ctrl.panel.spaceLength" ng-options="f for f in [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]" ng-change="ctrl.render()"></select>
-			  </div>
-			</div>
 			<gf-form-switch ng-show="ctrl.panel.lines" class="gf-form" label="Staircase" label-class="width-8" checked="ctrl.panel.steppedLine" on-change="ctrl.render()">
 			</gf-form-switch>
 			<div class="gf-form" ng-show="ctrl.panel.points">