notifications_list_ctrl.ts 576 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 AlertNotificationsListCtrl {
  7. notifications: any;
  8. /** @ngInject */
  9. constructor(private backendSrv) {
  10. this.loadNotifications();
  11. }
  12. loadNotifications() {
  13. this.backendSrv.get(`/api/alerts/notifications`).then(result => {
  14. this.notifications = result;
  15. });
  16. }
  17. }
  18. coreModule.controller('AlertNotificationsListCtrl', AlertNotificationsListCtrl);