-
Notifications
You must be signed in to change notification settings - Fork 197
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
ISSv3 - UI skeleton and Hub details page #9830
Conversation
👋 Hello! Thanks for contributing to our project. You can see the progress at the end of this page and at https://github.com/uyuni-project/uyuni/pull/9830/checks If you are unsure the failing tests are related to your code, you can check the "reference jobs". These are jobs that run on a scheduled time with code from master. If they fail for the same reason as your build, it means the tests or the infrastructure are broken. If they do not fail, but yours do, it means it is related to your code. Reference tests: KNOWN ISSUES Sometimes the build can fail when pulling new jar files from download.opensuse.org . This is a known limitation. Given this happens rarely, when it does, all you need to do is rerun the test. Sorry for the inconvenience. For more tips on troubleshooting, see the troubleshooting guide. Happy hacking! |
391c577
to
a609fcf
Compare
1ce0108
to
2cf88c8
Compare
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 cannot say much about typescript, but the java code is ok - just one note.
But you should check SonarCloud findings
@@ -93,7 +108,7 @@ public static void initRoutes(JadeTemplateEngine jade) { | |||
public static ModelAndView showMonitoring(Request request, Response response, User user) { | |||
Map<String, Object> data = new HashMap<>(); | |||
data.put("isUyuni", ConfigDefaults.get().isUyuni()); | |||
return new ModelAndView(data, "controllers/admin/templates/monitoring.jade"); | |||
return new ModelAndView(data, "controllers/admin/templates/issv3/monitoring.jade"); |
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.
maybe better use "hub" instead of "issv3" ?
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.
Mmm, let me double check this I don't think we should have changed it.
Those are all related to the "fake" peripheral part. I think I'll probably just remove it, so sonarcloud won't complain. |
2cf88c8
to
46ccdbe
Compare
46ccdbe
to
d78059a
Compare
@@ -3,7 +3,7 @@ import { localizedMoment } from "utils"; | |||
import { getTimeProps } from "./timeProps"; | |||
|
|||
type Props = { | |||
value?: string | moment.Moment; | |||
value?: string | moment.Moment | Date; |
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 would very much like to avoid this, if at all possible. The reason is timezones, when we start passing around native Date objects we will very quickly struggle to make any sense of what the related offsets should be.
I couldn't find the diff what we need this for, perhaps I just missed it?
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.
Ok, no problem, I changed it because I saw <FromNow />
declares it in this way, I thought it was just forgotten 😅
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'm using this in the HubDetailsForm
by the way, There I declare both a <FromNow />
and a <HumanDateTime />
trying to use a Date
field. The former works, the latter rejects the type. That's why I changed.
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.
Ah okay, I see, so these are values we are sending over from the server, and you want to pass those in? In that case I think it's fine, we can go ahead with this change. Essentially we want to avoid any frontend code that uses new Date()
and such, and we have a linter rule for it as well, but forbidding it in many places makes it more clear that it shouldn't be done. But for receiving backend values it's fine.
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.
Yes, they come from the server JSON response as dates:
export type HubDetailData = {
id: number;
fqdn: string;
rootCA: string | null;
gpgKey: string | null;
sccUsername: string;
created: Date;
modified: Date;
};
I can also convert them to Moment
before passing them to the component, though.
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 think for values we receive from the server it's not a problem per se because there we know what we're working with. The problem is the frontend where if you use Date
and your computer timezone is different than what your server or user configuration is, then there will be an issue.
|
||
const IssPeripheral = () => { | ||
const title = ( | ||
<div className="spacewalk-toolbar-h1"> |
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 think most places use TopPanel
for this, so would be nice to use that here for consistency.
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 was already working on this 😅
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.
LGTM.Not an expert in typescrypt
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.
This looks good, easy to follow along to the code and follow how it connects together. 👍
d78059a
to
ecaaf4a
Compare
ecaaf4a
to
3b17d1d
Compare
83ed110
to
e6b32f8
Compare
What does this PR change?
This PR adds the menu and the navigation to make the previously made pages accessible and adds the hub details page
NOTE: all the pages and the features around peripherals are included only as mock, they will be part of an additional PR.
GUI diff
After:







Documentation
Documentation WIP
DONE
Test coverage
Unit tests were added
DONE
Links
Issue(s): https://github.com/SUSE/spacewalk/issues/25355
Changelogs
Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository
If you don't need a changelog check, please mark this checkbox:
If you uncheck the checkbox after the PR is created, you will need to re-run
changelog_test
(see below)Re-run a test
If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:
Before you merge
Check How to branch and merge properly!