Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Stack monitoring] Remove angular #115063

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion x-pack/plugins/monitoring/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"home",
"alerting",
"kibanaReact",
"licenseManagement",
"kibanaLegacy"
]
}
2 changes: 1 addition & 1 deletion x-pack/plugins/monitoring/public/alerts/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const AlertsBadge: React.FC<Props> = (props: Props) => {
const groupByType = GROUP_BY_NODE;
const panels = showByNode
? getAlertPanelsByNode(PANEL_TITLE, alerts, stateFilter)
: getAlertPanelsByCategory(PANEL_TITLE, inSetupMode, alerts, stateFilter);
: getAlertPanelsByCategory(PANEL_TITLE, !!inSetupMode, alerts, stateFilter);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious when this wouldn't be a boolean that required the !!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because of this line. In React, we default to the isInSetupMode that it's in the global state, that is marked as optional.
Should it be optional? Probably no, but I guess because of the progressive migration it didn't exist until we migrated the setup mode related stuff, so when we put it in the global state we put it as optional to not break anything that already exists.

Since, in this case, when it's undefined, we should treat it as false, I think is good enough to make the conversion here.

if (panels.length && !inSetupMode && panels[0].items) {
panels[0].items.push(
...[
Expand Down
246 changes: 0 additions & 246 deletions x-pack/plugins/monitoring/public/angular/app_modules.ts

This file was deleted.

39 changes: 0 additions & 39 deletions x-pack/plugins/monitoring/public/angular/helpers/routes.ts

This file was deleted.

45 changes: 0 additions & 45 deletions x-pack/plugins/monitoring/public/angular/helpers/utils.ts

This file was deleted.

Loading