You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by hs...@apache.org on 2022/09/27 10:34:28 UTC
[incubator-datalab] 01/01: DATALAB-3063 finished connected platform page marckup
This is an automated email from the ASF dual-hosted git repository.
hshpak pushed a commit to branch feat/DATALAB-3063/view-connected-platforms
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit 091faf6af4758942dca1048fd93b85d49cdee92b
Author: Hennadii_Shpak <bo...@gmail.com>
AuthorDate: Mon Sep 26 11:55:58 2022 +0300
DATALAB-3063 finished connected platform page marckup
---
.../resources/webapp/src/app/app.routing.module.ts | 54 ++++++++-------
.../configs/routing-list.config.ts} | 30 ++++-----
.../resources/webapp/src/app/core/pipes/index.ts | 1 +
.../app/core/pipes/{ => normalize-link}/index.ts | 19 +++---
.../normalize-link.pipe.ts} | 18 ++---
.../connected-platforms-routing.module.ts} | 33 +++++-----
.../connected-platforms.comnfig.ts} | 19 +++---
.../connected-platforms.component.html | 59 +++++++++++++++++
.../connected-platforms.component.scss} | 26 +++++---
.../connected-platforms.component.ts | 76 ++++++++++++++++++++++
.../connected-platforms.module.ts} | 38 ++++++-----
.../src/app/shared/navbar/navbar.component.html | 27 +++++---
.../src/app/shared/navbar/navbar.component.ts | 2 +
.../webapp/src/app/shared/navbar/navbar.config.ts | 3 +-
14 files changed, 285 insertions(+), 120 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/app.routing.module.ts b/services/self-service/src/main/resources/webapp/src/app/app.routing.module.ts
index 9188aec15..0d7a2b4a7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/app.routing.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/app.routing.module.ts
@@ -18,7 +18,7 @@
*/
import { ModuleWithProviders } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
+import { RouterModule, Routes } from '@angular/router';
import { LoginComponent } from './login/login.module';
import { LayoutComponent } from './layout/layout.component';
@@ -31,23 +31,17 @@ import { ManagementComponent } from './administration/management';
import { ProjectComponent } from './administration/project/project.component';
import { RolesComponent } from './administration/roles/roles.component';
import { SwaggerComponent } from './swagger';
-import {
- AuthorizationGuard,
- CheckParamsGuard,
- CloudProviderGuard,
- AdminGuard,
- AuditGuard,
- ImagePageResolveGuard
-} from './core/services';
-import {ConfigurationComponent} from './administration/configuration/configuration.component';
-import {ProjectAdminGuard} from './core/services/projectAdmin.guard';
-import {ReportingComponent} from './reports/reporting/reporting.component';
-import {AuditComponent} from './reports/audit/audit.component';
-import {ImagesComponent} from './resources/images/images.component';
+import { AdminGuard, AuditGuard, AuthorizationGuard, CheckParamsGuard, CloudProviderGuard, ImagePageResolveGuard } from './core/services';
+import { ConfigurationComponent } from './administration/configuration/configuration.component';
+import { ProjectAdminGuard } from './core/services/projectAdmin.guard';
+import { ReportingComponent } from './reports/reporting/reporting.component';
+import { AuditComponent } from './reports/audit/audit.component';
+import { ImagesComponent } from './resources/images/images.component';
+import { RoutingListConfig } from './core/configs/routing-list.config';
const routes: Routes = [
{
- path: 'login',
+ path: RoutingListConfig.login,
component: LoginComponent
},
{
@@ -57,29 +51,33 @@ const routes: Routes = [
children: [
{
path: '',
- redirectTo: 'instances',
+ redirectTo: RoutingListConfig.instances,
pathMatch: 'full'
},
{
- path: 'instances',
+ path: RoutingListConfig.instances,
component: ResourcesComponent,
canActivate: [AuthorizationGuard]
},
{
- path: 'images',
+ path: RoutingListConfig.images,
component: ImagesComponent,
canActivate: [AuthorizationGuard],
resolve: {
projectList: ImagePageResolveGuard
- }
+ },
},
{
- path: 'billing',
+ path: RoutingListConfig.connectedPlatforms,
+ loadChildren: () => import('./resources/connected-platforms/connected-platforms.module').then(m => m.ConnectedPlatformsModule)
+ },
+ {
+ path: RoutingListConfig.billing,
component: ReportingComponent,
canActivate: [AuthorizationGuard, CloudProviderGuard]
},
{
- path: 'projects',
+ path: RoutingListConfig.projects,
component: ProjectComponent,
canActivate: [AuthorizationGuard, AdminGuard],
},
@@ -88,37 +86,37 @@ const routes: Routes = [
// component: OdahuComponent,
// canActivate: [AuthorizationGuard, AdminGuard],
// }, {
- path: 'users',
+ path: RoutingListConfig.users,
component: RolesComponent,
canActivate: [AuthorizationGuard, AdminGuard],
},
{
- path: 'resources',
+ path: RoutingListConfig.resources,
component: ManagementComponent,
canActivate: [AuthorizationGuard, AdminGuard]
},
{
- path: 'configuration',
+ path: RoutingListConfig.configuration,
component: ConfigurationComponent,
canActivate: [AuthorizationGuard, AdminGuard, ProjectAdminGuard]
},
{
- path: 'swagger',
+ path: RoutingListConfig.swagger,
component: SwaggerComponent,
canActivate: [AuthorizationGuard]
},
{
- path: 'help/publickeyguide',
+ path: RoutingListConfig.publickeyguide,
component: PublicKeyGuideComponent,
canActivate: [AuthorizationGuard]
},
{
- path: 'help/accessnotebookguide',
+ path: RoutingListConfig.accessnotebookguide,
component: AccessNotebookGuideComponent,
canActivate: [AuthorizationGuard]
},
{
- path: 'audit',
+ path: RoutingListConfig.audit,
component: AuditComponent,
canActivate: [AuthorizationGuard, AuditGuard],
},
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/core/configs/routing-list.config.ts
similarity index 66%
copy from services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.config.ts
copy to services/self-service/src/main/resources/webapp/src/app/core/configs/routing-list.config.ts
index 44102f602..171f80c4e 100644
--- 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/core/configs/routing-list.config.ts
@@ -17,20 +17,18 @@
* under the License.
*/
-export enum Sidebar_Names_Config {
- reports = 'Reports',
- audit = 'Audit',
- billing = 'Billing',
- administration = 'Administration',
- users = 'Users',
- projects = 'Projects',
- resources = 'Resources',
- configuration = 'Configuration',
- instances = 'Instances',
- images = 'Images'
-}
-
-export interface UserInfo {
- email: string;
- name: string;
+export enum RoutingListConfig {
+ instances = 'instances',
+ images = 'images',
+ connectedPlatforms = 'connected-platforms',
+ login = 'login',
+ billing = 'billing',
+ projects = 'projects',
+ users = 'users',
+ resources = 'resources',
+ audit = 'audit',
+ configuration = 'configuration',
+ swagger = 'swagger',
+ publickeyguide = 'help/publickeyguide',
+ accessnotebookguide = 'help/accessnotebookguide',
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
index b6a0621ce..e81d99dfd 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
@@ -25,3 +25,4 @@ export * from './highlight.pipe';
export * from './convert-action-pipe';
export * from './normalize-dropdown-multi-value';
export * from './is-element-available-pipe';
+export * from './normalize-link';
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/normalize-link/index.ts
similarity index 72%
copy from services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
copy to services/self-service/src/main/resources/webapp/src/app/core/pipes/normalize-link/index.ts
index b6a0621ce..18c71d973 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/normalize-link/index.ts
@@ -17,11 +17,14 @@
* under the License.
*/
-export * from './keys-pipe';
-export * from './underscoreless-pipe';
-export * from './lib-sort-pipe';
-export * from './replace-breaks-pipe';
-export * from './highlight.pipe';
-export * from './convert-action-pipe';
-export * from './normalize-dropdown-multi-value';
-export * from './is-element-available-pipe';
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { NormalizeLinkPipe } from './normalize-link.pipe';
+
+@NgModule({
+ imports: [ CommonModule ],
+ declarations: [ NormalizeLinkPipe ],
+ exports: [ NormalizeLinkPipe ]
+})
+
+export class NormalizeLinkPipeModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/normalize-link/normalize-link.pipe.ts
similarity index 72%
copy from services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
copy to services/self-service/src/main/resources/webapp/src/app/core/pipes/normalize-link/normalize-link.pipe.ts
index b6a0621ce..ecbd3efcf 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/normalize-link/normalize-link.pipe.ts
@@ -17,11 +17,13 @@
* under the License.
*/
-export * from './keys-pipe';
-export * from './underscoreless-pipe';
-export * from './lib-sort-pipe';
-export * from './replace-breaks-pipe';
-export * from './highlight.pipe';
-export * from './convert-action-pipe';
-export * from './normalize-dropdown-multi-value';
-export * from './is-element-available-pipe';
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'normalizeLink'
+})
+export class NormalizeLinkPipe implements PipeTransform {
+ transform(value: string): string {
+ return value.includes('http') ? value : `//${value}`;
+ }
+}
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/resources/connected-platforms/connected-platforms-routing.module.ts
similarity index 66%
copy from services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.config.ts
copy to services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms-routing.module.ts
index 44102f602..61d93807f 100644
--- 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/resources/connected-platforms/connected-platforms-routing.module.ts
@@ -1,4 +1,4 @@
-/*
+/*!
* 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
@@ -17,20 +17,19 @@
* under the License.
*/
-export enum Sidebar_Names_Config {
- reports = 'Reports',
- audit = 'Audit',
- billing = 'Billing',
- administration = 'Administration',
- users = 'Users',
- projects = 'Projects',
- resources = 'Resources',
- configuration = 'Configuration',
- instances = 'Instances',
- images = 'Images'
-}
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { ConnectedPlatformsComponent } from './connected-platforms.component';
-export interface UserInfo {
- email: string;
- name: string;
-}
+const routes: Routes = [
+ {
+ path: '',
+ component: ConnectedPlatformsComponent
+ }
+];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule]
+})
+export class ConnectedPlatformsRoutingModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.comnfig.ts
similarity index 72%
copy from services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
copy to services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.comnfig.ts
index b6a0621ce..0a24005b0 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.comnfig.ts
@@ -17,11 +17,14 @@
* under the License.
*/
-export * from './keys-pipe';
-export * from './underscoreless-pipe';
-export * from './lib-sort-pipe';
-export * from './replace-breaks-pipe';
-export * from './highlight.pipe';
-export * from './convert-action-pipe';
-export * from './normalize-dropdown-multi-value';
-export * from './is-element-available-pipe';
+export enum Image_Table_Titles {
+ platformName = 'Platform name',
+ linkToPlatform = 'Link to platform',
+ actions = 'Actions'
+}
+
+export const ConnectedPlatformDisplayedColumns = [
+ 'platformName',
+ 'linkToPlatform',
+ 'actions',
+];
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.component.html
new file mode 100644
index 000000000..7343c83ef
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.component.html
@@ -0,0 +1,59 @@
+<!--
+ ~ 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.
+ -->
+
+<section class="connected-platforms__wrapper base-retreat">
+ <nav class="sub-nav">
+ <button
+ mat-raised-button
+ class="butt butt-create"
+ >
+ <i class="material-icons">add</i>Add new
+ </button>
+ </nav>
+
+ <mat-divider></mat-divider>
+
+ <table mat-table [dataSource]="dataSource" class="mat-elevation-z8 table">
+
+ <ng-container matColumnDef="platformName">
+ <th mat-header-cell *matHeaderCellDef>{{tableHeaderCellTitles.platformName}}</th>
+ <td mat-cell class="column" *matCellDef="let element"> {{element.platformName}} </td>
+ </ng-container>
+
+ <ng-container matColumnDef="linkToPlatform">
+ <th mat-header-cell *matHeaderCellDef>{{tableHeaderCellTitles.linkToPlatform}}</th>
+ <td class="column" mat-cell *matCellDef="let element">
+ <a class="link" [href]="element.linkToPlatform | normalizeLink" target="_blank">
+ {{element.linkToPlatform}}
+ </a>
+ </td>
+ </ng-container>
+
+ <ng-container matColumnDef="actions">
+ <th mat-header-cell *matHeaderCellDef>{{tableHeaderCellTitles.actions}}</th>
+ <td mat-cell *matCellDef="let element"><span class="actions">
+ <img class="action-icon" [src]="'assets/svg/settings_icon.svg'" alt="setting-icon">
+ </span></td>
+ </ng-container>
+
+ <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
+ <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
+ </table>
+
+</section>
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts b/services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.component.scss
similarity index 72%
copy from services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
copy to services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.component.scss
index b6a0621ce..4bf890f70 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.component.scss
@@ -1,4 +1,4 @@
-/*
+/*!
* 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
@@ -17,11 +17,19 @@
* under the License.
*/
-export * from './keys-pipe';
-export * from './underscoreless-pipe';
-export * from './lib-sort-pipe';
-export * from './replace-breaks-pipe';
-export * from './highlight.pipe';
-export * from './convert-action-pipe';
-export * from './normalize-dropdown-multi-value';
-export * from './is-element-available-pipe';
+.table {
+ width: 100%;
+}
+
+.column {
+ width: 20%;
+}
+
+.action-icon,
+.link {
+ cursor: pointer;
+}
+
+.link {
+ text-decoration: underline;
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.component.ts
new file mode 100644
index 000000000..29b815939
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.component.ts
@@ -0,0 +1,76 @@
+/*!
+ * 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.
+ */
+
+import { Component, OnInit } from '@angular/core';
+import { GeneralEnvironmentStatus } from '../../administration/management/management.model';
+import { HealthStatusService } from '../../core/services';
+import { ToastrService } from 'ngx-toastr';
+import { ConnectedPlatformDisplayedColumns, Image_Table_Titles } from './connected-platforms.comnfig';
+
+const mockedData = [
+ {
+ platformName: 'azure',
+ linkToPlatform: 'www.google.com/'
+ },
+ {
+ platformName: 'azure',
+ linkToPlatform: 'google.com'
+ },
+ {
+ platformName: 'azure',
+ linkToPlatform: 'google.com'
+ },
+ {
+ platformName: 'azure',
+ linkToPlatform: 'google.com'
+ },
+];
+
+
+@Component({
+ selector: 'datalab-connected-platforms',
+ templateUrl: './connected-platforms.component.html',
+ styleUrls: ['./connected-platforms.component.scss']
+})
+export class ConnectedPlatformsComponent implements OnInit {
+ readonly tableHeaderCellTitles: typeof Image_Table_Titles = Image_Table_Titles;
+
+ healthStatus: GeneralEnvironmentStatus;
+
+ displayedColumns: typeof ConnectedPlatformDisplayedColumns = ConnectedPlatformDisplayedColumns;
+ dataSource = mockedData;
+
+ constructor(
+ private healthStatusService: HealthStatusService,
+ public toastr: ToastrService,
+ ) { }
+
+ ngOnInit(): void {
+ this.getEnvironmentHealthStatus();
+ }
+
+ private getEnvironmentHealthStatus(): void {
+ this.healthStatusService.getEnvironmentHealthStatus().subscribe(
+ (result: GeneralEnvironmentStatus) => {
+ this.healthStatus = result;
+ },
+ error => this.toastr.error(error.message, 'Oops!')
+ );
+ }
+}
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/resources/connected-platforms/connected-platforms.module.ts
similarity index 56%
copy from services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.config.ts
copy to services/self-service/src/main/resources/webapp/src/app/resources/connected-platforms/connected-platforms.module.ts
index 44102f602..f5ad17999 100644
--- 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/resources/connected-platforms/connected-platforms.module.ts
@@ -1,4 +1,4 @@
-/*
+/*!
* 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
@@ -17,20 +17,24 @@
* under the License.
*/
-export enum Sidebar_Names_Config {
- reports = 'Reports',
- audit = 'Audit',
- billing = 'Billing',
- administration = 'Administration',
- users = 'Users',
- projects = 'Projects',
- resources = 'Resources',
- configuration = 'Configuration',
- instances = 'Instances',
- images = 'Images'
-}
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
-export interface UserInfo {
- email: string;
- name: string;
-}
+import { ConnectedPlatformsRoutingModule } from './connected-platforms-routing.module';
+import { ConnectedPlatformsComponent } from './connected-platforms.component';
+import { MaterialModule } from '../../shared/material.module';
+import { NormalizeLinkPipeModule } from '../../core/pipes';
+
+
+@NgModule({
+ declarations: [
+ ConnectedPlatformsComponent
+ ],
+ imports: [
+ CommonModule,
+ MaterialModule,
+ NormalizeLinkPipeModule,
+ ConnectedPlatformsRoutingModule
+ ]
+})
+export class ConnectedPlatformsModule { }
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 8ae321ffe..f724f6786 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
@@ -109,7 +109,7 @@
<a
class="sub-nav-item"
[style.margin-left.px]="isExpanded ? '30' : '0'"
- [routerLink]="['/instances']"
+ [routerLink]="[routerList.instances]"
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
>
@@ -120,7 +120,7 @@
<a
class="sub-nav-item"
[style.margin-left.px]="isExpanded ? '30' : '0'"
- [routerLink]="['/images']"
+ [routerLink]="[routerList.images]"
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
>
@@ -128,6 +128,17 @@
<ng-template #images><i class="material-icons">photo</i></ng-template>
</a>
+ <a
+ class="sub-nav-item"
+ [style.margin-left.px]="isExpanded ? '30' : '0'"
+ [routerLink]="[routerList.connectedPlatforms]"
+ [routerLinkActive]="['active']"
+ [routerLinkActiveOptions]="{exact:true}"
+ >
+ <span *ngIf="isExpanded; else connectedPlatforms">{{sideBarNames.connectedPlatforms}}</span>
+ <ng-template #connectedPlatforms><i class="material-icons">cast</i></ng-template>
+ </a>
+
</a>
<a class="nav-item has-children" *ngIf="healthStatus?.billingEnabled || healthStatus?.auditEnabled">
@@ -135,7 +146,7 @@
<a
*ngIf="healthStatus?.auditEnabled"
class="sub-nav-item"
- [routerLink]="['/audit']"
+ [routerLink]="[routerList.audit]"
[style.margin-left.px]="isExpanded ? '30' : '0'"
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
@@ -146,7 +157,7 @@
<a
*ngIf="healthStatus?.billingEnabled"
class="sub-nav-item"
- [routerLink]="['/billing']"
+ [routerLink]="[routerList.billing]"
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
[style.margin-left.px]="isExpanded ? '30' : '0'"
@@ -161,7 +172,7 @@
<a
class="sub-nav-item"
[style.margin-left.px]="isExpanded ? '30' : '0'"
- [routerLink]="['/users']"
+ [routerLink]="[routerList.users]"
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
>
@@ -171,7 +182,7 @@
<a
class="sub-nav-item"
[style.margin-left.px]="isExpanded ? '30' : '0'"
- [routerLink]="['/projects']"
+ [routerLink]="[routerList.projects]"
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
>
@@ -186,7 +197,7 @@
<a
class="sub-nav-item"
[style.margin-left.px]="isExpanded ? '30' : '0'"
- [routerLink]="['/resources']"
+ [routerLink]="[routerList.resources]"
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
>
@@ -197,7 +208,7 @@
*ngIf="healthStatus?.admin"
class="sub-nav-item"
[style.margin-left.px]="isExpanded ? '30' : '0'"
- [routerLink]="['/configuration']"
+ [routerLink]="[routerList.configuration]"
[routerLinkActive]="['active']"
[routerLinkActiveOptions]="{exact:true}"
>
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 4c906b3ef..56b634c55 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
@@ -43,6 +43,7 @@ import {
import {skip, take} from 'rxjs/operators';
import {ProgressBarService} from '../../core/services/progress-bar.service';
import {Sidebar_Names_Config, UserInfo} from './navbar.config';
+import { RoutingListConfig } from '../../core/configs/routing-list.config';
interface Quota {
projectQuotas: {};
@@ -85,6 +86,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
private readonly CHECK_ACTIVE_SCHEDULE_TIMEOUT: number = 300000;
private readonly CHECK_ACTIVE_SCHEDULE_PERIOD: number = 15;
+ readonly routerList: typeof RoutingListConfig = RoutingListConfig;
currentUserName: string;
quotesLimit: number = 70;
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
index 44102f602..84f1a6aad 100644
--- 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
@@ -27,7 +27,8 @@ export enum Sidebar_Names_Config {
resources = 'Resources',
configuration = 'Configuration',
instances = 'Instances',
- images = 'Images'
+ images = 'Images',
+ connectedPlatforms = 'Connected platforms'
}
export interface UserInfo {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org