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

[bugfix](web-app): update app menu visibility on monitor creation #3072

Closed
wants to merge 3 commits into from

Conversation

zqr10159
Copy link
Member

  • Add updateLocalAppState method to update app menu visibility
  • Call updateLocalAppState when creating a new monitor

What's changed?

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

Add or update API

  • I have added the necessary e2e tests and all cases have passed.

- Add updateLocalAppState method to update app menu visibility
- Call updateLocalAppState when creating a new monitor
- Move success notification and routing inside configuration update subscription
Comment on lines +178 to +186
this.configService.updateAppTemplateConfig({ hide: false }, info.monitor.app).subscribe(() => {
this.startUpSvc.loadConfigResourceViaHttp().subscribe(() => {
this.isSpinning = false;
this.notifySvc.success(this.i18nSvc.fanyi('monitor.new.success'), '');
this.router.navigateByUrl(`/monitors?app=${info.monitor.app}`);
});
});
} else {
this.isSpinning = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

hi, why need updateAppTemplateConfig when add a new monitor, the this.startUpSvc.loadConfigResourceViaHttp() is a very time-consuming initialization function operation

Copy link
Member Author

Choose a reason for hiding this comment

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

When a user adds a new type of monitor, he should want to see it in the left navigation bar right after adding the monitor. So I think a refresh function should be added here. There seems to be a need to add a judgment here: is it the first time a certain type of monitor is added?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the display of the main menu and the monitoring types added by the user should not be strictly bound.
Users can also view the added monitors by clicking on the monitoring center. The monitoring type menu in the main menu is just a shortcut. For example, in this case, it is possible that the user does not want to display the monitoring type in the main menu for simplicity. It is recommended to let the user decide whether to display this monitoring type in the main menu by editing monitoring template here instead of auto.
image

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the button to show the menu is too hidden and there is no hint of an interface that would confuse the user if used for the first time: why is there no category in the left menu? This is not user friendly for novice users, is there another way to make a good hint? I suggest discussing this on the mailing list.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, 👀 we can discuss it on the mailing list or github discussions

@zqr10159 zqr10159 closed this Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants