From 1592a65f967e8de84658409328d88279c0366f8c Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Mon, 3 Jun 2019 14:17:54 +0100 Subject: [PATCH 1/2] [Watcher] Reverting incorrectly removed scope parameters --- .../public/components/duration_select/duration_select.js | 2 +- .../public/components/kbn_tabs/components/kbn_tab/kbn_tab.js | 2 +- .../components/xpack_aria_describes/xpack_aria_describes.js | 2 +- x-pack/plugins/watcher/public/directives/json_input.js | 2 +- x-pack/plugins/watcher/public/directives/tooltip/tooltip.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/watcher/public/components/duration_select/duration_select.js b/x-pack/plugins/watcher/public/components/duration_select/duration_select.js index a0c81a3a0ef16..e3f574fd6bc55 100644 --- a/x-pack/plugins/watcher/public/components/duration_select/duration_select.js +++ b/x-pack/plugins/watcher/public/components/duration_select/duration_select.js @@ -31,7 +31,7 @@ app.directive('durationSelect', function ($injector) { replace: true, controllerAs: 'durationSelect', bindToController: true, - link: function ($scope, $ctrl) { + link: function ($scope, $element, $attrs, $ctrl) { // eslint-disable-line no-unused-vars $scope.durationSelect.form = $ctrl; }, controller: class DurationSelectController extends InitAfterBindingsWorkaround { diff --git a/x-pack/plugins/watcher/public/components/kbn_tabs/components/kbn_tab/kbn_tab.js b/x-pack/plugins/watcher/public/components/kbn_tabs/components/kbn_tab/kbn_tab.js index bc492324d7fde..2624b57ed3f1f 100644 --- a/x-pack/plugins/watcher/public/components/kbn_tabs/components/kbn_tab/kbn_tab.js +++ b/x-pack/plugins/watcher/public/components/kbn_tabs/components/kbn_tab/kbn_tab.js @@ -23,7 +23,7 @@ app.directive('kbnTab', function () { controllerAs: 'kbnTab', bindToController: true, controller: class KbnTabController {}, - link: function ($scope, kbnTabs) { + link: function ($scope, $ele, attrs, kbnTabs) { // eslint-disable-line no-unused-vars $scope.kbnTabs = kbnTabs; } }; diff --git a/x-pack/plugins/watcher/public/components/xpack_aria_describes/xpack_aria_describes.js b/x-pack/plugins/watcher/public/components/xpack_aria_describes/xpack_aria_describes.js index 8590d94283b42..5e23063da54e6 100644 --- a/x-pack/plugins/watcher/public/components/xpack_aria_describes/xpack_aria_describes.js +++ b/x-pack/plugins/watcher/public/components/xpack_aria_describes/xpack_aria_describes.js @@ -12,7 +12,7 @@ const app = uiModules.get('xpack/watcher'); app.directive('xpackAriaDescribes', function () { return { restrict: 'A', - link: function ($scope, attr) { + link: function ($scope, $ele, attr) { // eslint-disable-line no-unused-vars if (!Object.keys(attr).includes('id')) { throw new Error(`An element with xpack-aria-describes="${attr.xpackAriaDescribes}" does not have an id attribute defined`); } diff --git a/x-pack/plugins/watcher/public/directives/json_input.js b/x-pack/plugins/watcher/public/directives/json_input.js index 24a12d14379ab..15993dc3513f0 100644 --- a/x-pack/plugins/watcher/public/directives/json_input.js +++ b/x-pack/plugins/watcher/public/directives/json_input.js @@ -14,7 +14,7 @@ uiModules return { restrict: 'A', require: 'ngModel', - link: function (scope, attrs, ngModelCntrl) { + link: function (scope, $el, attrs, ngModelCntrl) { // eslint-disable-line no-unused-vars ngModelCntrl.$formatters.push(toJSON); ngModelCntrl.$parsers.push(fromJSON); diff --git a/x-pack/plugins/watcher/public/directives/tooltip/tooltip.js b/x-pack/plugins/watcher/public/directives/tooltip/tooltip.js index f6c7ca3842ce2..a8f8242b12bf6 100644 --- a/x-pack/plugins/watcher/public/directives/tooltip/tooltip.js +++ b/x-pack/plugins/watcher/public/directives/tooltip/tooltip.js @@ -30,7 +30,7 @@ uiModules.get('xpack/watcher') transclude: true, replace: true, scope: true, - link: function ($scope, attr) { + link: function ($scope, $el, attr) { // eslint-disable-line no-unused-vars $scope.text = attr.text; $scope.placement = attr.placement || 'top'; $scope.delay = attr.delay || 400; From f36f1903c4b3c92e4d5c1aa6f56e172ad992128c Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Tue, 4 Jun 2019 07:55:02 +0100 Subject: [PATCH 2/2] removing no-unused-vars comments --- .../public/components/duration_select/duration_select.js | 2 +- .../public/components/kbn_tabs/components/kbn_tab/kbn_tab.js | 2 +- .../components/xpack_aria_describes/xpack_aria_describes.js | 2 +- x-pack/plugins/watcher/public/directives/json_input.js | 2 +- x-pack/plugins/watcher/public/directives/tooltip/tooltip.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/watcher/public/components/duration_select/duration_select.js b/x-pack/plugins/watcher/public/components/duration_select/duration_select.js index e3f574fd6bc55..9fab3504ac638 100644 --- a/x-pack/plugins/watcher/public/components/duration_select/duration_select.js +++ b/x-pack/plugins/watcher/public/components/duration_select/duration_select.js @@ -31,7 +31,7 @@ app.directive('durationSelect', function ($injector) { replace: true, controllerAs: 'durationSelect', bindToController: true, - link: function ($scope, $element, $attrs, $ctrl) { // eslint-disable-line no-unused-vars + link: function ($scope, $element, $attrs, $ctrl) { $scope.durationSelect.form = $ctrl; }, controller: class DurationSelectController extends InitAfterBindingsWorkaround { diff --git a/x-pack/plugins/watcher/public/components/kbn_tabs/components/kbn_tab/kbn_tab.js b/x-pack/plugins/watcher/public/components/kbn_tabs/components/kbn_tab/kbn_tab.js index 2624b57ed3f1f..4b2cffefb661a 100644 --- a/x-pack/plugins/watcher/public/components/kbn_tabs/components/kbn_tab/kbn_tab.js +++ b/x-pack/plugins/watcher/public/components/kbn_tabs/components/kbn_tab/kbn_tab.js @@ -23,7 +23,7 @@ app.directive('kbnTab', function () { controllerAs: 'kbnTab', bindToController: true, controller: class KbnTabController {}, - link: function ($scope, $ele, attrs, kbnTabs) { // eslint-disable-line no-unused-vars + link: function ($scope, $ele, attrs, kbnTabs) { $scope.kbnTabs = kbnTabs; } }; diff --git a/x-pack/plugins/watcher/public/components/xpack_aria_describes/xpack_aria_describes.js b/x-pack/plugins/watcher/public/components/xpack_aria_describes/xpack_aria_describes.js index 5e23063da54e6..2fbbe42f7e5a2 100644 --- a/x-pack/plugins/watcher/public/components/xpack_aria_describes/xpack_aria_describes.js +++ b/x-pack/plugins/watcher/public/components/xpack_aria_describes/xpack_aria_describes.js @@ -12,7 +12,7 @@ const app = uiModules.get('xpack/watcher'); app.directive('xpackAriaDescribes', function () { return { restrict: 'A', - link: function ($scope, $ele, attr) { // eslint-disable-line no-unused-vars + link: function ($scope, $ele, attr) { if (!Object.keys(attr).includes('id')) { throw new Error(`An element with xpack-aria-describes="${attr.xpackAriaDescribes}" does not have an id attribute defined`); } diff --git a/x-pack/plugins/watcher/public/directives/json_input.js b/x-pack/plugins/watcher/public/directives/json_input.js index 15993dc3513f0..a4ee023f93328 100644 --- a/x-pack/plugins/watcher/public/directives/json_input.js +++ b/x-pack/plugins/watcher/public/directives/json_input.js @@ -14,7 +14,7 @@ uiModules return { restrict: 'A', require: 'ngModel', - link: function (scope, $el, attrs, ngModelCntrl) { // eslint-disable-line no-unused-vars + link: function (scope, $el, attrs, ngModelCntrl) { ngModelCntrl.$formatters.push(toJSON); ngModelCntrl.$parsers.push(fromJSON); diff --git a/x-pack/plugins/watcher/public/directives/tooltip/tooltip.js b/x-pack/plugins/watcher/public/directives/tooltip/tooltip.js index a8f8242b12bf6..a6f5a8ca28126 100644 --- a/x-pack/plugins/watcher/public/directives/tooltip/tooltip.js +++ b/x-pack/plugins/watcher/public/directives/tooltip/tooltip.js @@ -30,7 +30,7 @@ uiModules.get('xpack/watcher') transclude: true, replace: true, scope: true, - link: function ($scope, $el, attr) { // eslint-disable-line no-unused-vars + link: function ($scope, $el, attr) { $scope.text = attr.text; $scope.placement = attr.placement || 'top'; $scope.delay = attr.delay || 400;