-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
ui: Migrate Thanos Ruler UI to React #2865
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good but I think we could do a couple of improvements before merging:
- Let's include a link to the new UI in the old Ruler UI?
- If you go to
/new
on Thanos Ruler then the link in the bar links to/graph
which leads to 404
I had to do this #2925 to make api/v1/rules
work at all for me 😄
Fixed this in the new commit. Now the Classic UI link in navbar should point to the corresponding old UI page.
I had fixed this already, I am not sure why are you still getting this.
I wonder why it's working fine for me without that patch 🤔 |
What about the other direction? :P We want the users to discover this. Another thing: maybe let's set some other <title> according to the component? Now Thanos Ruler also has "Thanos Expression Browser" 😄 I have filled a separate issue for the Rules API weirdness so that we could unblock this. #2938. This PR doesn't touch that at all so I think we can merge this after changing those two small things! Awesome work, Prem 👍 |
As we have a single |
8d2722f
to
6a085f3
Compare
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
Sorry for the rebase. Forgot to signoff some old commits and then merged master on top of it. Had to rebase on master and add signoff to the old commit messages. |
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 💪 Let's see if anyone else wants to review before merging.
@@ -223,6 +224,12 @@ export const encodePanelOptionsToQueryString = (panels: PanelMeta[]) => { | |||
export const createExpressionLink = (expr: string) => { | |||
return `../graph?g0.expr=${encodeURIComponent(expr)}&g0.tab=1&g0.stacked=0&g0.range_input=1h`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could improve this even more in the future by setting range_input
to $now - $when_the_alert_has_started_firing
but this is OK for now 💪
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
Thanks! |
Signed-off-by: Prem Kumar prmsrswt@gmail.com
Changes
Verification
Tested locally with a basic alert in different state.