Some of the doc links that can be shown in the login page like security, trademarks etc and can add new links easily.
Fixes: https://tracker.ceph.com/issues/47454
Signed-off-by: Nizamudeen A <nia@redhat.com>
-<div *ngIf="isLoginActive">
+<div class="container"
+ *ngIf="isLoginActive">
<form name="loginForm"
(ngSubmit)="login()"
#loginForm="ngForm"
<section>
<div class="container">
<div class="row full-height vertical-align">
+ <div class="col-sm-12 col-md-6 d-sm-block">
+ <router-outlet></router-outlet>
+ </div>
<div class="col-sm-12 col-md-6 d-sm-block">
<img src="assets/Ceph_Ceph_Logo_with_text_white.svg"
alt="Ceph"
- class="img-fluid mb-5">
- <router-outlet></router-outlet>
+ class="img-fluid">
+ <ul class="list-inline">
+ <li class="list-inline-item p-3"
+ *ngFor="let docItem of docItems">
+ <cd-doc section="{{ docItem.section }}"
+ docText="{{ docItem.text }}"
+ noSubscribe="true"
+ i18n-docText></cd-doc>
+ </li>
+ </ul>
</div>
</div>
</div>
min-height: 100vh;
width: 100vw;
}
+
+ .list-inline {
+ margin-bottom: 20%;
+ margin-left: 20%;
+ }
+
+ a {
+ color: bd.$fg-color-over-dark-bg;
+
+ &:hover {
+ color: bd.$fg-hover-color-over-dark-bg;
+ }
+ }
}
templateUrl: './login-layout.component.html',
styleUrls: ['./login-layout.component.scss']
})
-export class LoginLayoutComponent {}
+export class LoginLayoutComponent {
+ docItems: any[] = [
+ { section: 'help', text: $localize`Help` },
+ { section: 'security', text: $localize`Security` },
+ { section: 'trademarks', text: $localize`Trademarks` }
+ ];
+}
export class DocComponent implements OnInit {
@Input() section: string;
@Input() docText = $localize`documentation`;
+ @Input() noSubscribe: boolean;
docUrl: string;
constructor(private docService: DocService) {}
ngOnInit() {
- this.docService.subscribeOnce(this.section, (url: string) => {
- this.docUrl = url;
- });
+ if (this.noSubscribe) {
+ this.docUrl = this.docService.urlGenerator(this.section);
+ } else {
+ this.docService.subscribeOnce(this.section, (url: string) => {
+ this.docUrl = url;
+ });
+ }
}
}
});
it('should return full URL', () => {
- expect(service.urlGenerator('foo', 'iscsi')).toBe(
+ expect(service.urlGenerator('iscsi', 'foo')).toBe(
'http://docs.ceph.com/docs/foo/mgr/dashboard/#enabling-iscsi-management'
);
});
});
}
- urlGenerator(release: string, section: string): string {
+ urlGenerator(section: string, release = 'master'): string {
const domain = `http://docs.ceph.com/docs/${release}/`;
+ const domainCeph = `https://ceph.io/`;
const sections = {
iscsi: `${domain}mgr/dashboard/#enabling-iscsi-management`,
dashboard: `${domain}mgr/dashboard`,
grafana: `${domain}mgr/dashboard/#enabling-the-embedding-of-grafana-dashboards`,
orch: `${domain}mgr/orchestrator`,
- pgs: `http://ceph.com/pgcalc`,
+ pgs: `${domainCeph}pgcalc`,
+ help: `${domainCeph}help/`,
+ security: `${domainCeph}security/`,
+ trademarks: `${domainCeph}legal-page/trademarks/`,
'dashboard-landing-page-status': `${domain}mgr/dashboard/#dashboard-landing-page-status`,
'dashboard-landing-page-performance': `${domain}mgr/dashboard/#dashboard-landing-page-performance`,
'dashboard-landing-page-capacity': `${domain}mgr/dashboard/#dashboard-landing-page-capacity`
return this.releaseData$
.pipe(
filter((value) => !!value),
- map((release) => this.urlGenerator(release, section)),
+ map((release) => this.urlGenerator(section, release)),
first()
)
.subscribe(next, error);
$light: $gray-100;
$dark: #777;
+$fg-color-over-dark-bg: $white;
+$fg-hover-color-over-dark-bg: $gray-500;
+
$theme-colors: (
'accent': #ef5c55
);