message: Load data from Alertmanager API even if Prometheus API is unavailable
diff: @@ -181,14 +181,10 @@ class MonitoringPageWrapper extends SafetyFirst<AlertsPageWrapperProps, null> {
  const {alertManagerBaseURL, prometheusBaseURL} = (window as any).SERVER_FLAGS;
  - if (!prometheusBaseURL) {
  - store.dispatch(UIActions.monitoringErrored('rules', new Error('prometheusBaseURL not set')));
  - return;
  - }
  -
  + if (prometheusBaseURL) {
  poll(`${prometheusBaseURL}/api/v1/rules`, 'rules', data => {
  - // Flatten the rules data to make it easier to work with, discard non-alerting rules since those are the only ones
  - // we will be using and add a unique ID to each rule.
  + // Flatten the rules data to make it easier to work with, discard non-alerting rules since those are the only
  + // ones we will be using and add a unique ID to each rule.
  const groups = _.get(data, 'groups');
  const rules = _.flatMap(groups, g => {
  const addID = r => {
  @@ -214,6 +210,9 @@ class MonitoringPageWrapper extends SafetyFirst<AlertsPageWrapperProps, null> {
  return {asAlerts, asRules: rules};
  });
  + } else {
  + store.dispatch(UIActions.monitoringErrored('rules', new Error('prometheusBaseURL not set')));
  + }
  if (!alertManagerBaseURL) {
  const e = new Error('alertManagerBaseURL not set');
  