diff --git a/public/app/containers/AlertRuleList/__snapshots__/AlertRuleList.jest.tsx.snap b/public/app/containers/AlertRuleList/__snapshots__/AlertRuleList.jest.tsx.snap
new file mode 100644
index 00000000000..73072f487ea
--- /dev/null
+++ b/public/app/containers/AlertRuleList/__snapshots__/AlertRuleList.jest.tsx.snap
@@ -0,0 +1,224 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`AlertRuleList should render page 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+ alerting-Text
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ How to add an alert
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+ OK
+
+
+ for
+ 5 minutes
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/public/app/core/specs/bridge_srv.jest.ts b/public/app/core/specs/bridge_srv.jest.ts
index 08fc296986d..f29c88d7a05 100644
--- a/public/app/core/specs/bridge_srv.jest.ts
+++ b/public/app/core/specs/bridge_srv.jest.ts
@@ -1,4 +1,4 @@
-import { GlobalEventSrv } from 'app/core/services/bridge_srv';
+import { BridgeSrv } from 'app/core/services/bridge_srv';
jest.mock('app/core/config', () => {
return {
@@ -10,7 +10,7 @@ describe('BridgeSrv', () => {
let searchSrv;
beforeEach(() => {
- searchSrv = new GlobalEventSrv(null, null, null);
+ searchSrv = new BridgeSrv(null, null, null, null);
});
describe('With /subUrl as appSubUrl', () => {
diff --git a/public/app/stores/AlertListStore.ts b/public/app/stores/AlertListStore.ts
index 6abb4484bc6..a581ec0fedc 100644
--- a/public/app/stores/AlertListStore.ts
+++ b/public/app/stores/AlertListStore.ts
@@ -55,13 +55,12 @@ export const AlertListStore = types
stateFilter: types.optional(types.string, 'all'),
})
.actions(self => ({
- setStateFilter: function(state) {
- self.stateFilter = state;
- },
-
- loadRules: flow(function* load() {
+ loadRules: flow(function* load(filters) {
let backendSrv = getEnv(self).backendSrv;
- let filters = { state: self.stateFilter };
+
+ // store state filter used in api query
+ self.stateFilter = filters.state;
+
let apiRules = yield backendSrv.get('/api/alerts', filters);
self.rules.clear();
diff --git a/public/app/stores/NavStore.ts b/public/app/stores/NavStore.ts
index 51bf39b803e..edd25d965ee 100644
--- a/public/app/stores/NavStore.ts
+++ b/public/app/stores/NavStore.ts
@@ -25,6 +25,10 @@ export const NavStore = types
for (let id of args) {
node = _.find(children, { id: id });
+ if (!node) {
+ throw new Error(`NavItem with id ${id} not found`);
+ }
+
children = node.children;
parents.push(node);
}
diff --git a/yarn.lock b/yarn.lock
index 870cfd637bf..161927c0db8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -10087,7 +10087,7 @@ whatwg-encoding@^1.0.1:
dependencies:
iconv-lite "0.4.19"
-whatwg-fetch@>=0.10.0, whatwg-fetch@^2.0.3:
+whatwg-fetch@>=0.10.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84"