You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by dy...@apache.org on 2022/02/11 13:20:27 UTC
[incubator-datalab] branch develop updated: changed name for side bar
This is an automated email from the ASF dual-hosted git repository.
dyankiv pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/develop by this push:
new e86820f changed name for side bar
new b127b0c Merge pull request #1414 from GennadiyShpak/fix/aside-menu-names
e86820f is described below
commit e86820f43e6d2a6fd7b92925dce404d5117f0f72
Author: Hennadii_Shpak <bo...@gmail.com>
AuthorDate: Fri Feb 11 14:49:31 2022 +0200
changed name for side bar
---
.../src/app/shared/navbar/navbar.component.html | 63 +++++++++++-----------
.../src/app/shared/navbar/navbar.component.ts | 3 ++
.../webapp/src/app/shared/navbar/navbar.config.ts | 30 +++++++++++
3 files changed, 65 insertions(+), 31 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
index 4c61dc9..367c63c 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
@@ -86,11 +86,36 @@
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
>
- <span *ngIf="isExpanded; else resources">List of Resources</span>
+ <span *ngIf="isExpanded; else resources">{{sideBarNames.resourses}}</span>
<ng-template #resources><i class="material-icons">dashboard</i></ng-template>
</a>
+ <a class="nav-item has-children" *ngIf="healthStatus?.billingEnabled || healthStatus?.auditEnabled">
+ <span *ngIf="isExpanded">{{sideBarNames.reports}}</span>
+ <a
+ *ngIf="healthStatus?.auditEnabled"
+ class="sub-nav-item"
+ [routerLink]="['/audit']"
+ [style.margin-left.px]="isExpanded ? '30' : '0'"
+ [routerLinkActive]="['active']"
+ [routerLinkActiveOptions]="{exact:true}"
+ >
+ <span *ngIf="isExpanded; else audit">{{sideBarNames.audit}}</span>
+ <ng-template #audit><i class="material-icons">library_books</i></ng-template>
+ </a>
+ <a
+ *ngIf="healthStatus?.billingEnabled"
+ class="sub-nav-item"
+ [routerLink]="['/billing_report']"
+ [routerLinkActive]="['active']"
+ [routerLinkActiveOptions]="{exact:true}"
+ [style.margin-left.px]="isExpanded ? '30' : '0'"
+ >
+ <span *ngIf="isExpanded; else billing">{{sideBarNames.billing}}</span>
+ <ng-template #billing><i class="material-icons">account_balance_wallet</i></ng-template>
+ </a>
+ </a>
<a class="nav-item has-children" *ngIf="healthStatus?.admin || healthStatus?.projectAdmin">
- <span *ngIf="isExpanded">Administration</span>
+ <span *ngIf="isExpanded">{{sideBarNames.administration}}</span>
<a
class="sub-nav-item"
@@ -99,7 +124,7 @@
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
>
- <span *ngIf="isExpanded; else roles">Roles</span>
+ <span *ngIf="isExpanded; else roles">{{sideBarNames.users}}</span>
<ng-template #roles><i class="material-icons">account_box</i></ng-template>
</a>
<a
@@ -109,7 +134,7 @@
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
>
- <span *ngIf="isExpanded; else projects">Projects</span>
+ <span *ngIf="isExpanded; else projects">{{sideBarNames.projects}}</span>
<ng-template #projects><i class="material-icons">dns</i></ng-template>
</a>
<!-- <a class="sub-nav-item" [style.margin-left.px]="isExpanded ? '30' : '0'" [routerLink]="['/odahu']"-->
@@ -124,7 +149,7 @@
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
>
- <span *ngIf="isExpanded; else env">Environment Management</span>
+ <span *ngIf="isExpanded; else env">{{sideBarNames.resources}}</span>
<ng-template #env><i class="material-icons">settings</i></ng-template>
</a>
<a
@@ -135,35 +160,11 @@
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
>
- <span *ngIf="isExpanded; else env">Configuration</span>
+ <span *ngIf="isExpanded; else env">{{sideBarNames.configuration}}</span>
<ng-template #env><i class="material-icons">build_circle</i></ng-template>
</a>
</a>
- <a class="nav-item has-children" *ngIf="healthStatus?.billingEnabled || healthStatus?.auditEnabled">
- <span *ngIf="isExpanded">Reports</span>
- <a
- *ngIf="healthStatus?.auditEnabled"
- class="sub-nav-item"
- [routerLink]="['/audit']"
- [style.margin-left.px]="isExpanded ? '30' : '0'"
- [routerLinkActive]="['active']"
- [routerLinkActiveOptions]="{exact:true}"
- >
- <span *ngIf="isExpanded; else audit">Audit</span>
- <ng-template #audit><i class="material-icons">library_books</i></ng-template>
- </a>
- <a
- *ngIf="healthStatus?.billingEnabled"
- class="sub-nav-item"
- [routerLink]="['/billing_report']"
- [routerLinkActive]="['active']"
- [routerLinkActiveOptions]="{exact:true}"
- [style.margin-left.px]="isExpanded ? '30' : '0'"
- >
- <span *ngIf="isExpanded; else billing">Billing</span>
- <ng-template #billing><i class="material-icons">account_balance_wallet</i></ng-template>
- </a>
- </a>
+
</div>
<!-- <div>-->
<!-- <a class="nav-item" [routerLink]="['/swagger']" [routerLinkActive]="['active']"-->
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts
index 95907e7..166ed69 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts
@@ -42,6 +42,7 @@ import {
} from '@angular/animations';
import {skip, take} from 'rxjs/operators';
import {ProgressBarService} from '../../core/services/progress-bar.service';
+import{ sideBarNamesConfig } from './navbar.config'
interface Quota {
projectQuotas: {};
@@ -92,6 +93,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
isExpanded: boolean = true;
healthStatus: GeneralEnvironmentStatus;
subscriptions: Subscription = new Subscription();
+ sideBarNames!: Record<string, string>;
constructor(
public toastr: ToastrService,
@@ -105,6 +107,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
) { }
ngOnInit() {
+ this.sideBarNames = sideBarNamesConfig;
this.applicationSecurityService.loggedInStatus.subscribe(response => {
this.subscriptions.unsubscribe();
this.subscriptions.closed = false;
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.config.ts b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.config.ts
new file mode 100644
index 0000000..ad12402
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.config.ts
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+export const sideBarNamesConfig: Record<string, string> = {
+ resourses: 'Resources',
+ reports: 'Reports',
+ audit: 'Audit',
+ billing: 'Billing',
+ administration: 'Administration',
+ users: 'Users',
+ projects: 'Projects',
+ resources: 'Resources',
+ configuration: 'Configuration'
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org