-
Notifications
You must be signed in to change notification settings - Fork 168
Switchable target for dashboard #2371
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
base: master
Are you sure you want to change the base?
Switchable target for dashboard #2371
Conversation
96eb061 to
0584f5f
Compare
Kobzol
left a comment
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.
I originally thought to use a however you can't embed tags in an What is the reason you needed <a> tags? To make it easier to change the URL and reload the page, without having to do it in JavaScript in the select change event handler? Looks good overall, I don't think that we need to do JS magic here and just the <a> links are enough for now. That being said, I'm not sure if there's much point in merging this until we actually have some ARM data? It would likely be a bit confusing if there is a link that points to empty data or an error. We can merge it once we have a machine and backfill the ARM historical data (hopefully that will work :) ).
site/frontend/src/pages/dashboard.ts
Outdated
| populate_data(response); | ||
| } else { | ||
| const responseText = await apiResponse.text(); | ||
| Highcharts.chart({ |
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.
Why do you render a chart when there's an error? We can just display the error in some text label, right?
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.
It seemed the simplest thing to do as we don't really have access to the DOM in this file however this file is also the one that makes the API call.
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.
Right. Well, the right thing to do to make this page modifiable in the future is to move all the code from dashboard.ts to src/pages/dashboard.page.vue, so that we get access to the DOM :)
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.
ba2eaa7 👍
Yes an Good point, there's a reasonable amount of plumbing here that would be nice to get in. We could add to the table wrapper css class; .target-wrapper {
// current styles
display: none;
height: 0px;
}And make the url links empty strings? Edit; |
|
Looking at the changes of this PR and your comments, I'd suggest first moving the dashboard page to a proper Vue component, so that we can actually do things like show errors 😆 It will be needed to make bigger changes to the page in the future anyway. |
ba2eaa7 to
cf06098
Compare
cf06098 to
0ca0905
Compare
Adds two tabs to choose between
x86_64-unknown-linux-gnuandaarch64-unknown-linux-gnu. I originally thought to use a<select>however you can't embed<a>tags in an<option>