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

fix tests & some display issues

Dan Cech 8 лет назад
Родитель
Сommit
315ecf8505

+ 1 - 1
public/app/plugins/datasource/graphite/func_editor.js

@@ -94,9 +94,9 @@ function (angular, _, $, rst2html) {
             // remove optional empty params
             if (newValue !== '' || paramDef(paramIndex).optional) {
               func.updateParam(newValue, paramIndex);
+              $link.html(newValue ? templateSrv.highlightVariablesAsHtml(newValue) : ' ');
             }
 
-            $link.html(templateSrv.highlightVariablesAsHtml(newValue));
             scheduledRelinkIfNeeded();
 
             $scope.$apply(function() {

+ 0 - 6
public/app/plugins/datasource/graphite/partials/query.editor.html

@@ -40,7 +40,6 @@
           placeholder="Tag value"
           get-options="ctrl.getTagValues(tag, $index, $query)"
           on-change="ctrl.tagChanged(tag, $index)"
-          start-open="!ctrl.showDelimiter($index)"
         />
         <label class="gf-form-label query-keyword" ng-if="ctrl.showDelimiter($index)">AND</label>
       </div>
@@ -56,11 +55,6 @@
       <div ng-if="ctrl.paused" class="gf-form">
         <a ng-click="ctrl.unpause()" class="gf-form-label query-part"><i class="fa fa-play"></i></a>
       </div>
-      <!--
-      <div ng-if="!ctrl.paused" class="gf-form">
-        <a ng-click="ctrl.pause()" class="gf-form-label query-part"><i class="fa fa-pause"></i></a>
-      </div>
-      -->
 
       <div class="gf-form gf-form--grow">
         <div class="gf-form-label gf-form-label--grow"></div>

+ 1 - 1
public/app/plugins/datasource/graphite/specs/query_ctrl_specs.ts

@@ -26,7 +26,7 @@ describe('GraphiteQueryCtrl', function() {
       ctx.datasource.metricFindQuery = sinon.stub().returns(ctx.$q.when([]));
       ctx.datasource.getFuncDefs = sinon.stub().returns(ctx.$q.when(gfunc.getFuncDefs('1.0')));
       ctx.datasource.getFuncDef = gfunc.getFuncDef;
-      ctx.datasource.waitForFuncDefsLoaded = ctx.$q.when(null);
+      ctx.datasource.waitForFuncDefsLoaded = sinon.stub().returns(ctx.$q.when(null));
       ctx.datasource.createFuncInstance = gfunc.createFuncInstance;
       ctx.panelCtrl = { panel: {} };
       ctx.panelCtrl = {