You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
788 B

import { defaultsDeep } from 'lodash';
import { CloudWatchAnnotationQuery } from './types';
export class CloudWatchAnnotationsQueryCtrl {
static templateUrl = 'partials/annotations.editor.html';
declare annotation: any;
/** @ngInject */
constructor($scope: any) {
this.annotation = $scope.ctrl.annotation;
defaultsDeep(this.annotation, {
namespace: '',
metricName: '',
expression: '',
dimensions: {},
region: 'default',
id: '',
alias: '',
statistic: 'Average',
matchExact: true,
prefixMatching: false,
actionPrefix: '',
alarmNamePrefix: '',
});
this.onChange = this.onChange.bind(this);
}
onChange(query: CloudWatchAnnotationQuery) {
Object.assign(this.annotation, query);
}
}