alerts_ctrl.ts 495 B

12345678910111213141516171819202122232425
  1. ///<reference path="../../headers/common.d.ts" />
  2. import angular from 'angular';
  3. import _ from 'lodash';
  4. import coreModule from '../../core/core_module';
  5. import config from 'app/core/config';
  6. export class AlertPageCtrl {
  7. alerts: any;
  8. /** @ngInject */
  9. constructor(private backendSrv) {
  10. this.loadAlerts();
  11. }
  12. loadAlerts() {
  13. this.backendSrv.get('/api/alerts').then(result => {
  14. this.alerts = result;
  15. });
  16. }
  17. }
  18. coreModule.controller('AlertPageCtrl', AlertPageCtrl);