From 4c1a67c34ee4bbcff7d59fbb91be99d965d7824d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 28 Dec 2017 18:49:33 +0100 Subject: [PATCH] tech: began reworking alerting list to mobx --- .../AlertRuleList/AlertRuleList.tsx | 94 +++++++++++++++++++ .../containers/ServerStats/ServerStats.tsx | 2 +- public/app/features/alerting/alert_def.ts | 2 - public/app/routes/routes.ts | 7 ++ public/app/stores/AlertingStore.ts | 51 ++++++++++ public/app/stores/NavStore.ts | 9 +- public/app/stores/RootStore.ts | 4 + public/app/stores/ServerStatsStore.tsx | 27 +++--- 8 files changed, 170 insertions(+), 26 deletions(-) create mode 100644 public/app/containers/AlertRuleList/AlertRuleList.tsx create mode 100644 public/app/stores/AlertingStore.ts diff --git a/public/app/containers/AlertRuleList/AlertRuleList.tsx b/public/app/containers/AlertRuleList/AlertRuleList.tsx new file mode 100644 index 00000000000..ee5a38cb24c --- /dev/null +++ b/public/app/containers/AlertRuleList/AlertRuleList.tsx @@ -0,0 +1,94 @@ +import React from 'react'; +import classNames from 'classnames'; +import { inject, observer } from 'mobx-react'; +import PageHeader from 'app/core/components/PageHeader/PageHeader'; + +export interface IProps { + store: any; +} + +@inject('store') +@observer +export class AlertRuleList extends React.Component { + constructor(props) { + super(props); + + this.props.store.nav.load('alerting', 'alert-list'); + this.props.store.alerting.loadRules(); + } + + render() { + return ( +
+ +
+
+
+ + +
+