Skip to content

Commit 31c52d4

Browse files
feat: add namespace bar to monitoring-plugin
refactor: remove most references to the dev perspective refactor: expose multiple entrypoints in same module feat: add monitoring context and use module exports in extensions refactor: swap to fully using plugin specific store reactor: dereference plugin value from context fix: change chunks and variable names to reference deployment operator feat: update store to not be dependant on perspective fix: remove React.useContext calls after rebase fix: update package-lock.json by running `npm install` after rebase fix: remove hook from non-react function call fix: rename symbol to avoid clashing with console store fix: add optional chaining to state retrieval This keeps the type definition, but also allows for early bailout fix: return array in "silenceAlerts" function to avoid directly mutating data fix: set silences as loaded after when setting data fix: remove destructuring on undefined object fix: match store defintion to how data is being set fix: type queryBroweserTable correctly fix: type query structure correctly fix: remove data dereference on silences object fix: remove react package from perses components fix: memoize options fix: manually filter alerts since all are returned from API fix: clear queries when changing namespaces fix: create useDeepMemo hook which memoized only after deeply comparing, not shallowly comparing this fixes an issue where [] is not [] fix: use tennancy path where it is appropriate and prevent where it isn't fix: some more optional chaining refactor: move context pulling into a custom hook refactor: change refetchSilences to refetchSilencesAndAlerts to be more accurate refactor: remove immutable.js in favor of immer refactor: add datasource layer to plugin store to support multiple datasources refactor: add undefined typing to dynamic keys, and manually check in produce function refactor: remove top level optional chaining fix: queryBrowserPatchQueryHelper to merge index and patch when needed fix: optional chaining in metrics page refactor: remove perspective from dashboards store fix: only query tenancy path when not in "all namespaces" fix: if the namespace is all_ns, then remove it from the query params to prometheus fix: remove unused reducer and store parameter, force all values to not be optional fix: setting series to undefined fix: remove perspective variable from dashboard reducer calls feat: add namespace bar to create/edit silence pages fix: remove dereferencing undefined object fix: change to equal matcher for namespace fix: remove refetching loop refactor: remove unneeded lodash usage for javascript array functions fix: use namespace hook refactor: rename data to rules fix: only show namespace bar on pages where it is set explicitly Since incidents isn't namespaced we should hide the namespace bar when on that page refactor: move retrieving alerts into the useAlerts hook refactor: rename variables to make usage more clear fix: updating the url causes the component to unmount then remount fix: use prometheus context in query-browser for metrics graph in acm alerting pages fix: create new array to avoid in place sorting feat: remove all prometheus flag from being required fix: add more specific key finish rebase feat: remove dev perspective pages fix: typing + comment fix: add virt url's to the list which should show the namespace dropdown feat: remove flag requirements to allow all users to see monitoring pages fix: incidents alert rule links fix: query browser disabled series selection fix: only override variable info being patched fix: dev perspective dashboard variables fix: casting undefined and null as string, make the store and the reducer take a number instead fix: clear alerts when changing NS to always have fresh data fix: stabilize props and store fix: set load error for alerts and silences
1 parent 8652b83 commit 31c52d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2807
-2271
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,21 +156,21 @@ $ make start-feature-backend
156156

157157
`make start-feature-backend` will inject the `perses-dashboards`, `incidents`, and `dev-config` features by default. Features such as `acm-alerting` which take in extra parameters will need to run the `make start-feature-backend` command with the appropriate environment variables, such as `MONITORING_PLUGIN_ALERTMANAGER`.
158158

159-
#### Local Development with Perses Proxy
159+
#### Local Development with Perses Proxy
160160
The bridge script `start-console.sh` is configured to proxy to a local Perses instance running at port `:8080`. To run the local Perses instance you will need to clone the [perses/perses](https://github.com/perses/perses) repository and follow the start up instructions in [ui/README.md](https://github.com/perses/perses/blob/63601751674403f626d1dea3dec168bdad0ef1c7/ui/README.md) :
161161

162162
```
163-
# Clone the perses/perses repo
163+
# Clone the perses/perses repo
164164
$ git clone https://github.com/perses/perses.git
165165
$ cd perses
166166
167167
# Follow the instructions in ui/README.md
168-
$ cd ui
169-
$ npm install
168+
$ cd ui
169+
$ npm install
170170
$ npm run build
171171
$ ./scripts/api_backend_dev.sh
172172
173-
# Lastly navigate to http://localhost:8080/ to see Perses app running
173+
# Lastly navigate to http://localhost:8080/ to see Perses app running
174174
```
175175

176176
##### Install COO && Perses Datasource && Perses Sample Dashboard
@@ -194,3 +194,4 @@ curl "http://localhost:9090/api/v1/query?query=up"
194194

195195
Adjust Perses local instance http://localhost:8080/ to use the a proxy to http://localhost:9090/ instead of http://demo.prometheus.io.
196196

197+

config/acm-alerting.patch.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
"type": "console.page/route",
2020
"properties": {
2121
"exact": false,
22-
"path": [
23-
"/multicloud/monitoring"
24-
],
25-
"component": { "$codeRef": "AlertingPage" }
22+
"path": ["/multicloud/monitoring"],
23+
"component": {
24+
"$codeRef": "AlertingPage.McpAcmAlertingPage"
25+
}
2626
}
2727
}
2828
},
@@ -34,7 +34,7 @@
3434
"properties": {
3535
"exact": false,
3636
"path": "/multicloud/monitoring/silences/~new",
37-
"component": { "$codeRef": "SilenceCreatePage" }
37+
"component": { "$codeRef": "SilenceCreatePage.McpAcmCreateSilencePage" }
3838
}
3939
}
4040
},
@@ -46,7 +46,7 @@
4646
"properties": {
4747
"exact": false,
4848
"path": "/multicloud/monitoring/silences/:id/edit",
49-
"component": { "$codeRef": "SilenceEditPage" }
49+
"component": { "$codeRef": "SilenceEditPage.McpAcmSilenceEditPage" }
5050
}
5151
}
5252
},
@@ -58,7 +58,9 @@
5858
"properties": {
5959
"exact": false,
6060
"path": "/multicloud/monitoring/silences/:id",
61-
"component": { "$codeRef": "SilencesDetailsPage" }
61+
"component": {
62+
"$codeRef": "SilencesDetailsPage.McpAcmSilencesDetailsPage"
63+
}
6264
}
6365
}
6466
},
@@ -70,7 +72,9 @@
7072
"properties": {
7173
"exact": false,
7274
"path": ["/multicloud/monitoring/alertrules/:id"],
73-
"component": { "$codeRef": "AlertRulesDetailsPage" }
75+
"component": {
76+
"$codeRef": "AlertRulesDetailsPage.McpAcmAlertRulesDetailsPage"
77+
}
7478
}
7579
}
7680
},
@@ -82,7 +86,7 @@
8286
"properties": {
8387
"exact": false,
8488
"path": ["/multicloud/monitoring/alerts/:ruleID"],
85-
"component": { "$codeRef": "AlertsDetailsPage" }
89+
"component": { "$codeRef": "AlertsDetailsPage.McpAcmAlertsDetailsPage" }
8690
}
8791
}
8892
},

config/incidents.patch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "%plugin__monitoring-console-plugin~Incidents%",
1010
"href": "incidents",
1111
"component": {
12-
"$codeRef": "IncidentsPage"
12+
"$codeRef": "IncidentsPage.McpCmoAlertingPage"
1313
}
1414
}
1515
}

config/perses-dashboards.patch.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@
4545
"path": "/extensions/1",
4646
"value": {
4747
"type": "console.navigation/href",
48-
"flags": {
49-
"required": ["PROMETHEUS", "MONITORING", "CAN_GET_NS"]
50-
},
48+
5149
"properties": {
5250
"id": "perses-dashboards",
5351
"name": "%plugin__monitoring-console-plugin~Dashboards (Perses)%",
@@ -75,9 +73,7 @@
7573
"path": "/extensions/1",
7674
"value": {
7775
"type": "console.navigation/href",
78-
"flags": {
79-
"required": ["PROMETHEUS", "MONITORING", "CAN_GET_NS"]
80-
},
76+
8177
"properties": {
8278
"id": "virt-perses-dashboards",
8379
"name": "%plugin__monitoring-console-plugin~Dashboards (Perses)%",

0 commit comments

Comments
 (0)