diff --git a/public/app/core/core.ts b/public/app/core/core.ts index ca608fb35f9..55c0f4ec049 100644 --- a/public/app/core/core.ts +++ b/public/app/core/core.ts @@ -3,7 +3,6 @@ import "./directives/annotation_tooltip"; import "./directives/body_class"; -import "./directives/config_modal"; import "./directives/confirm_click"; import "./directives/dash_edit_link"; import "./directives/dash_upload"; diff --git a/public/app/core/directives/config_modal.js b/public/app/core/directives/config_modal.js deleted file mode 100644 index e37d6797fc4..00000000000 --- a/public/app/core/directives/config_modal.js +++ /dev/null @@ -1,46 +0,0 @@ -define([ - 'lodash', - 'jquery', - '../core_module', -], -function (_, $, coreModule) { - 'use strict'; - - coreModule.default.directive('configModal', function($modal, $q, $timeout) { - return { - restrict: 'A', - link: function(scope, elem, attrs) { - var partial = attrs.configModal; - var id = '#' + partial.replace('.html', '').replace(/[\/|\.|:]/g, '-') + '-' + scope.$id; - - elem.bind('click',function() { - if ($(id).length) { - elem.attr('data-target', id).attr('data-toggle', 'modal'); - scope.$apply(function() { scope.$broadcast('modal-opened'); }); - return; - } - - var panelModal = $modal({ - template: partial, - persist: false, - show: false, - scope: scope.$new(), - keyboard: false - }); - - $q.when(panelModal).then(function(modalEl) { - elem.attr('data-target', id).attr('data-toggle', 'modal'); - - $timeout(function () { - if (!modalEl.data('modal').isShown) { - modalEl.modal('show'); - } - }, 50); - }); - - scope.$apply(); - }); - } - }; - }); -}); diff --git a/public/app/core/directives/misc.js b/public/app/core/directives/misc.js index b3d6de2585d..1f96422d49e 100644 --- a/public/app/core/directives/misc.js +++ b/public/app/core/directives/misc.js @@ -90,7 +90,6 @@ function (angular, coreModule, kbn) { var li = '' + '' + (item.text || '') + ''; if (item.submenu && item.submenu.length) { diff --git a/public/app/features/dashboard/rowCtrl.js b/public/app/features/dashboard/rowCtrl.js index e8abb5bbb05..d7ccc22603f 100644 --- a/public/app/features/dashboard/rowCtrl.js +++ b/public/app/features/dashboard/rowCtrl.js @@ -61,6 +61,13 @@ function (angular, _, config) { }); }; + $scope.editRow = function() { + $scope.appEvent('show-dash-editor', { + src: 'public/app/partials/roweditor.html', + scope: $scope.$new() + }); + }; + $scope.moveRow = function(direction) { var rowsList = $scope.dashboard.rows; var rowIndex = _.indexOf(rowsList, $scope.row); diff --git a/public/app/features/panel/panel_menu.js b/public/app/features/panel/panel_menu.js index 0af5a91729c..0489489af8e 100644 --- a/public/app/features/panel/panel_menu.js +++ b/public/app/features/panel/panel_menu.js @@ -53,7 +53,6 @@ function (angular, $, _) { template += ''; }); diff --git a/public/app/partials/dashboard.html b/public/app/partials/dashboard.html index 712cff0e849..d63c0d01e29 100644 --- a/public/app/partials/dashboard.html +++ b/public/app/partials/dashboard.html @@ -65,7 +65,7 @@
  • - Row editor + Row editor
  • Delete row diff --git a/public/app/plugins/datasource/influxdb/partials/query.editor.html b/public/app/plugins/datasource/influxdb/partials/query.editor.html index 8e5546573d7..140f298f458 100644 --- a/public/app/plugins/datasource/influxdb/partials/query.editor.html +++ b/public/app/plugins/datasource/influxdb/partials/query.editor.html @@ -17,7 +17,7 @@
  • -
    +
    diff --git a/public/app/plugins/datasource/influxdb/query_ctrl.ts b/public/app/plugins/datasource/influxdb/query_ctrl.ts index f916adde9a7..0622fc17bd1 100644 --- a/public/app/plugins/datasource/influxdb/query_ctrl.ts +++ b/public/app/plugins/datasource/influxdb/query_ctrl.ts @@ -153,7 +153,7 @@ export class InfluxQueryCtrl extends QueryCtrl { this.panelCtrl.refresh(); } - toggleQueryMode() { + toggleEditorMode() { this.target.rawQuery = !this.target.rawQuery; }