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
mgr/dashboard: customizable log-in page text/banner #45951
Conversation
|
jenkins test make check |
|
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.
Nice quick work!
Regarding the placement, I'd put that above the input fields (as in the OpenStack UI):
Our Patternfly fellows recommend this instead:
But IMHO unless you put a logo above that the text feels a bit misplaced....
7838223
to
9d70c39
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.
Great work so far @Sarthak0702. Couple of concerns from my side:
Should this change the alignment of the login page components like this?
Without the login-banner everything is properly aligned, but the banner misaligns it.

I think the banner should be visible without causing much change to alignment of the existing items.
src/pybind/mgr/dashboard/frontend/src/app/core/layouts/login-layout/login-layout.component.html
Outdated
Show resolved
Hide resolved
...rd/frontend/src/app/shared/components/custom-login-banner/custom-login-banner.component.scss
Outdated
Show resolved
Hide resolved
...oard/frontend/src/app/shared/components/custom-login-banner/custom-login-banner.component.ts
Outdated
Show resolved
Hide resolved
...oard/frontend/src/app/shared/components/custom-login-banner/custom-login-banner.component.ts
Outdated
Show resolved
Hide resolved
...oard/frontend/src/app/shared/components/custom-login-banner/custom-login-banner.component.ts
Outdated
Show resolved
Hide resolved
...oard/frontend/src/app/shared/components/custom-login-banner/custom-login-banner.component.ts
Outdated
Show resolved
Hide resolved
9d70c39
to
e95f551
Compare
@nizamial09 Yup, this does change the alignment of the login page components. Aligning them with the login text is a bit tricky. |
e95f551
to
87736dd
Compare
|
jenkins test api |
87736dd
to
ecbf2d2
Compare
|
jenkins test dashboard |
2 similar comments
|
jenkins test dashboard |
|
jenkins test dashboard |
|
jenkins test dashboard |
...oard/frontend/src/app/shared/components/custom-login-banner/custom-login-banner.component.ts
Outdated
Show resolved
Hide resolved
...rd/frontend/src/app/shared/components/custom-login-banner/custom-login-banner.component.html
Outdated
Show resolved
Hide resolved
ecbf2d2
to
bb7f749
Compare
|
jenkins retest this please |
bb7f749
to
1c49036
Compare
|
jenkins retest this please |
...rd/frontend/src/app/shared/components/custom-login-banner/custom-login-banner.component.scss
Outdated
Show resolved
Hide resolved
|
@epuertat any idea why is this check needed? |
|
jenkins test dashboard cephadm |
|
jenkins test dashboard |
Fixes:https://tracker.ceph.com/issues/55231 Signed-off-by: Sarthak0702 <sarthak.dev.0702@gmail.com>
1c49036
to
9f8bcd7
Compare
|
jenkins test dashboard cephadm |
|
jenkins test dashboard |
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! Good work @Sarthak0702
|
jenkins test dashboard |
|
This PR will be causing the following layout change (login form shifted upwards): Are we ok with this change? Is there any way @Sarthak0702 to only displace these elements when the banner text is defined (or not displace anything and just leave the banner text uncentered)? |
| <div class="row full-height"> | ||
| <div class="col-sm-12 col-md-6 d-sm-block login-form"> | ||
| <router-outlet></router-outlet> | ||
| </div> | ||
| <div class="col-sm-12 col-md-6 d-sm-block"> | ||
| <div class="col-sm-12 col-md-6 d-sm-block branding-info"> | ||
| <img src="assets/Ceph_Ceph_Logo_with_text_white.svg" | ||
| alt="Ceph" | ||
| class="img-fluid"> | ||
| class="img-fluid pb-3"> |
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.
Is there any way @Sarthak0702 to only displace these elements when the banner text is defined (or not displace anything and just leave the banner text uncentered)?
@epuertat If we want that then classes like vertical-align, login-form and branding-info will need to be added conditionally based on if bannerText from custom-login-component exists of not. Unless we really want it to be centered and are not changing code just to pass test I guess its should be possible (but a bit tricky/hacky).
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, not worthy. Let's get this merged. Probably we should have explored absolute positioning or a different approach, but definitely not worthy :P
|
Only failed due to visual regression caused by login layout changes. |




Three new CLI commands added to
module.py:ceph dashboard set-login-banner -i <filename>ceph dashboard get-login-bannerceph dashboard unset-login-bannerBefore:

After:

Fixes:https://tracker.ceph.com/issues/55231
Signed-off-by: Sarthak0702 sarthak.dev.0702@gmail.com
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows