mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixed type issues introduced by adding angular types
This commit is contained in:
parent
25b1bec250
commit
d7dc6ad3f4
@ -14,7 +14,7 @@ coreModule.directive('giveFocus', () => {
|
|||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
element.focus();
|
element.focus();
|
||||||
const domEl = element[0];
|
const domEl: any = element[0];
|
||||||
if (domEl.setSelectionRange) {
|
if (domEl.setSelectionRange) {
|
||||||
const pos = element.val().length * 2;
|
const pos = element.val().length * 2;
|
||||||
domEl.setSelectionRange(pos, pos);
|
domEl.setSelectionRange(pos, pos);
|
||||||
|
@ -9,7 +9,7 @@ coreModule.directive('datasourceHttpSettings', () => {
|
|||||||
},
|
},
|
||||||
templateUrl: 'public/app/features/datasources/partials/http_settings.html',
|
templateUrl: 'public/app/features/datasources/partials/http_settings.html',
|
||||||
link: {
|
link: {
|
||||||
pre: ($scope, elem, attrs) => {
|
pre: ($scope: any, elem, attrs) => {
|
||||||
// do not show access option if direct access is disabled
|
// do not show access option if direct access is disabled
|
||||||
$scope.showAccessOption = $scope.noDirectAccess !== 'true';
|
$scope.showAccessOption = $scope.noDirectAccess !== 'true';
|
||||||
$scope.showAccessHelp = false;
|
$scope.showAccessHelp = false;
|
||||||
|
@ -33,7 +33,7 @@ module.directive('grafanaPanel', ($rootScope, $document, $timeout) => {
|
|||||||
template: panelTemplate,
|
template: panelTemplate,
|
||||||
transclude: true,
|
transclude: true,
|
||||||
scope: { ctrl: '=' },
|
scope: { ctrl: '=' },
|
||||||
link: (scope, elem) => {
|
link: (scope: any, elem) => {
|
||||||
const panelContainer = elem.find('.panel-container');
|
const panelContainer = elem.find('.panel-container');
|
||||||
const panelContent = elem.find('.panel-content');
|
const panelContent = elem.find('.panel-content');
|
||||||
const cornerInfoElem = elem.find('.panel-info-corner');
|
const cornerInfoElem = elem.find('.panel-info-corner');
|
||||||
@ -67,7 +67,7 @@ module.directive('grafanaPanel', ($rootScope, $document, $timeout) => {
|
|||||||
// set initial transparency
|
// set initial transparency
|
||||||
if (ctrl.panel.transparent) {
|
if (ctrl.panel.transparent) {
|
||||||
transparentLastState = true;
|
transparentLastState = true;
|
||||||
panelContainer.addClass('panel-transparent', true);
|
panelContainer.addClass('panel-transparent');
|
||||||
}
|
}
|
||||||
|
|
||||||
// update scrollbar after mounting
|
// update scrollbar after mounting
|
||||||
|
@ -2,28 +2,6 @@ import coreModule from 'app/core/core_module';
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { FilterSegments, DefaultFilterValue } from './filter_segments';
|
import { FilterSegments, DefaultFilterValue } from './filter_segments';
|
||||||
|
|
||||||
export class StackdriverFilter {
|
|
||||||
/** @ngInject */
|
|
||||||
constructor() {
|
|
||||||
return {
|
|
||||||
templateUrl: 'public/app/plugins/datasource/stackdriver/partials/query.filter.html',
|
|
||||||
controller: 'StackdriverFilterCtrl',
|
|
||||||
controllerAs: 'ctrl',
|
|
||||||
bindToController: true,
|
|
||||||
restrict: 'E',
|
|
||||||
scope: {
|
|
||||||
labelData: '<',
|
|
||||||
loading: '<',
|
|
||||||
groupBys: '<',
|
|
||||||
filters: '<',
|
|
||||||
filtersChanged: '&',
|
|
||||||
groupBysChanged: '&',
|
|
||||||
hideGroupBys: '<',
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class StackdriverFilterCtrl {
|
export class StackdriverFilterCtrl {
|
||||||
defaultRemoveGroupByValue = '-- remove group by --';
|
defaultRemoveGroupByValue = '-- remove group by --';
|
||||||
resourceTypeValue = 'resource.type';
|
resourceTypeValue = 'resource.type';
|
||||||
@ -193,5 +171,24 @@ export class StackdriverFilterCtrl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
coreModule.directive('stackdriverFilter', StackdriverFilter);
|
/** @ngInject */
|
||||||
coreModule.controller('StackdriverFilterCtrl', StackdriverFilterCtrl);
|
function stackdriverFilter() {
|
||||||
|
return {
|
||||||
|
templateUrl: 'public/app/plugins/datasource/stackdriver/partials/query.filter.html',
|
||||||
|
controller: StackdriverFilterCtrl,
|
||||||
|
controllerAs: 'ctrl',
|
||||||
|
bindToController: true,
|
||||||
|
restrict: 'E',
|
||||||
|
scope: {
|
||||||
|
labelData: '<',
|
||||||
|
loading: '<',
|
||||||
|
groupBys: '<',
|
||||||
|
filters: '<',
|
||||||
|
filtersChanged: '&',
|
||||||
|
groupBysChanged: '&',
|
||||||
|
hideGroupBys: '<',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
coreModule.directive('stackdriverFilter', stackdriverFilter);
|
||||||
|
@ -19,7 +19,7 @@ coreModule.directive('colorLegend', () => {
|
|||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
template: '<div class="heatmap-color-legend"><svg width="16.5rem" height="24px"></svg></div>',
|
template: '<div class="heatmap-color-legend"><svg width="16.5rem" height="24px"></svg></div>',
|
||||||
link: (scope, elem, attrs) => {
|
link: (scope: any, elem, attrs) => {
|
||||||
const ctrl = scope.ctrl;
|
const ctrl = scope.ctrl;
|
||||||
const panel = scope.ctrl.panel;
|
const panel = scope.ctrl.panel;
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ coreModule.directive('heatmapLegend', () => {
|
|||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
template: `<div class="heatmap-color-legend"><svg width="${LEGEND_WIDTH_PX}px" height="${LEGEND_HEIGHT_PX}px"></svg></div>`,
|
template: `<div class="heatmap-color-legend"><svg width="${LEGEND_WIDTH_PX}px" height="${LEGEND_HEIGHT_PX}px"></svg></div>`,
|
||||||
link: (scope, elem, attrs) => {
|
link: (scope: any, elem, attrs) => {
|
||||||
const ctrl = scope.ctrl;
|
const ctrl = scope.ctrl;
|
||||||
const panel = scope.ctrl.panel;
|
const panel = scope.ctrl.panel;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user