You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/06/12 14:13:11 UTC
[incubator-dlab] branch feature/projects updated: [DLAB-780]:
endpoint_tag controll added during endpoint creation
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch feature/projects
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/feature/projects by this push:
new ff459f5 [DLAB-780]: endpoint_tag controll added during endpoint creation
new a810a6a Merge branch 'feature/projects' of github.com:apache/incubator-dlab into feature/projects
ff459f5 is described below
commit ff459f5a95d9b8824c14669160dd0f93eedfd1c2
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Fri Jun 7 12:21:34 2019 +0300
[DLAB-780]: endpoint_tag controll added during endpoint creation
---
.../management/endpoints/endpoints.component.html | 32 ++++++++++++++++++++--
.../management/endpoints/endpoints.component.scss | 7 ++++-
.../management/endpoints/endpoints.component.ts | 5 ++--
.../src/app/administration/management/index.ts | 3 +-
.../management-grid/management-grid.component.html | 8 ------
.../management-grid/management-grid.component.ts | 9 ++----
.../management/management.component.ts | 3 --
.../resources/webapp/src/app/core/core.module.ts | 2 --
.../src/app/reporting/reporting.component.ts | 5 +---
.../src/app/shared/navbar/navbar.component.ts | 9 +-----
.../src/main/resources/webapp/src/styles.scss | 11 ++++++++
11 files changed, 55 insertions(+), 39 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.html
index da4ed96..d054f97 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.html
@@ -25,7 +25,7 @@
</header>
<div class="dialog-content tabs">
<div class="content-box">
- <mat-tab-group>
+ <mat-tab-group #tabGroup>
<mat-tab label="CREATE ENDPOINT">
<div class="split">
<form [formGroup]="createEndpointForm" novalidate>
@@ -62,6 +62,17 @@
</span>
</div>
</div>
+ <div class="control-group">
+ <label class="label">Endpoint tag</label>
+ <div class="control">
+ <input type="text" formControlName="endpoint_tag" placeholder="Enter endpoint tag">
+ <span class="error"
+ *ngIf="!createEndpointForm?.controls.endpoint_tag.valid && createEndpointForm.controls.endpoint_tag.touched">
+ Endpoint tag can only contain letters, numbers, hyphens and '_' but can not end with special
+ characters
+ </span>
+ </div>
+ </div>
</form>
<div class="action-group m-bott-10">
<button mat-raised-button type="button" class="butt action" (click)="dialogRef.close()">Cancel</button>
@@ -73,7 +84,7 @@
<mat-tab label="ENDPOINTS LIST">
<div class="endpoints">
<table mat-table [dataSource]="endpoints" class="endpoints-table"
- *ngIf="endpoints?.length">
+ *ngIf="endpoints?.length; else empty">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef class="name"> Endpoint name </th>
<td mat-cell *matCellDef="let element"> {{element.name}} </td>
@@ -89,6 +100,11 @@
<td mat-cell *matCellDef="let element"> {{element.account}} </td>
</ng-container>
+ <ng-container matColumnDef="endpoint_tag">
+ <th mat-header-cell *matHeaderCellDef class="account"> Endpoint tag </th>
+ <td mat-cell *matCellDef="let element"> {{element.endpoint_tag}} </td>
+ </ng-container>
+
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef class="actions"></th>
<td mat-cell *matCellDef="let element" class="actions">
@@ -101,6 +117,18 @@
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
+
+ <ng-template #empty>
+ <div class="info empty-box">
+ <div class="content">
+ <p>Looks like you don't have any endpoints</p>
+
+ <button mat-raised-button class="butt" (click)="tabGroup.selectedIndex = 0" [disabled]="creatingBackup">
+ <i class="material-icons">settings_system_daydream</i>New endpoint
+ </button>
+ </div>
+ </div>
+ </ng-template>
</div>
</mat-tab>
</mat-tab-group>
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.scss b/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.scss
index fce53e1..f6851ee 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.scss
@@ -19,7 +19,7 @@
.content-box {
padding: 10px 30px 30px;
- height: 380px;
+ height: 400px;
.split {
display: flex;
flex-direction: column;
@@ -62,5 +62,10 @@
}
}
}
+ .content {
+ p {
+ margin-bottom: 30px;
+ }
+ }
}
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.ts
index 0d44188..3f8a1d9 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/endpoints/endpoints.component.ts
@@ -40,7 +40,7 @@ export interface Endpoint {
export class EndpointsComponent implements OnInit {
public createEndpointForm: FormGroup;
endpoints: Endpoint[] = [];
- displayedColumns: string[] = ['name', 'url', 'account', 'actions'];
+ displayedColumns: string[] = ['name', 'url', 'account', 'endpoint_tag', 'actions'];
constructor(
@Inject(MAT_DIALOG_DATA) public data: any,
@@ -77,7 +77,8 @@ export class EndpointsComponent implements OnInit {
this.createEndpointForm = this._fb.group({
name: ['', Validators.compose([Validators.required, Validators.pattern(PATTERNS.namePattern)])],
url: ['', Validators.compose([Validators.required, Validators.pattern(PATTERNS.url)])],
- account: ['', Validators.compose([Validators.required, Validators.pattern(PATTERNS.namePattern)])]
+ account: ['', Validators.compose([Validators.required, Validators.pattern(PATTERNS.namePattern)])],
+ endpoint_tag: ['', Validators.compose([Validators.required, Validators.pattern(PATTERNS.namePattern)])]
});
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/index.ts b/services/self-service/src/main/resources/webapp/src/app/administration/management/index.ts
index 58d4b5d..8d03ac0 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/management/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/index.ts
@@ -21,7 +21,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
-import { UploadKeyDialogModule, BubbleModule, ConfirmationDialogModule } from '../../shared';
+import { BubbleModule, ConfirmationDialogModule } from '../../shared';
import { MaterialModule } from '../../shared/material.module';
import { ManagementComponent } from './management.component';
@@ -46,7 +46,6 @@ export * from './management.component';
FormsModule,
ReactiveFormsModule,
ProjectModule,
- UploadKeyDialogModule,
BubbleModule,
ConfirmationDialogModule,
ComputationalResourcesModule,
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.html
index 1241f3a..b6e0f09 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.html
@@ -105,14 +105,6 @@
<i class="material-icons">play_circle_outline</i>
<span>Start</span>
</li>
- <li (click)="toggleResourceAction(element, 'recreate')" *ngIf="element.status === 'terminated'">
- <i class="material-icons">refresh</i>
- <span>Recreate</span>
- </li>
- <li *ngIf="!isResourcesInProgress(element)" (click)="showReuploaKeydDialog()">
- <i class="material-icons">sync_problem</i>
- <span>Reupload key</span>
- </li>
</div>
</ul>
</bubble-up>
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.ts
index bc865b5..c6014db 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.ts
@@ -21,7 +21,7 @@ import { Component, OnInit, ViewChild, Input, Output, EventEmitter, Inject } fro
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { ToastrService } from 'ngx-toastr';
-import { HealthStatusService, UserAccessKeyService } from '../../../core/services';
+import { HealthStatusService } from '../../../core/services';
import { ConfirmationDialogType } from '../../../shared';
import { ConfirmationDialogComponent } from '../../../shared/modal-dialog/confirmation-dialog';
@@ -50,7 +50,6 @@ export class ManagementGridComponent implements OnInit {
@Output() actionToggle: EventEmitter<ManageAction> = new EventEmitter();
displayedColumns: string[] = ['user', 'type', 'shape', 'status', 'resources', 'actions'];
- @ViewChild('keyReuploadDialog') keyReuploadDialog;
constructor(
private healthStatusService: HealthStatusService,
@@ -84,7 +83,7 @@ export class ManagementGridComponent implements OnInit {
}).afterClosed().subscribe(() => this.buildGrid());
} else if (action === 'terminate') {
this.dialog.open(ConfirmationDialogComponent, {
- data: { notebook: environment, type: ConfirmationDialogType.TerminateExploratory, manageAction: this.isAdmin }
+ data: { notebook: environment, type: ConfirmationDialogType.TerminateExploratory, manageAction: this.isAdmin }, panelClass: 'modal-md'
}).afterClosed().subscribe(() => this.buildGrid());
} else if (action === 'run') {
this.healthStatusService.runEdgeNode().subscribe(() => {
@@ -120,10 +119,6 @@ export class ManagementGridComponent implements OnInit {
&& resource.status !== 'running'
&& resource.status !== 'stopped')).length > 0;
}
-
- showReuploaKeydDialog() {
- this.keyReuploadDialog.open({ isFooter: false });
- }
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.ts
index a891d85..0db2a3c 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/management.component.ts
@@ -24,7 +24,6 @@ import { ToastrService } from 'ngx-toastr';
import {
HealthStatusService,
ManageEnvironmentsService,
- UserAccessKeyService,
BackupService,
UserResourceService,
StorageService
@@ -55,7 +54,6 @@ export class ManagementComponent implements OnInit {
private healthStatusService: HealthStatusService,
private backupService: BackupService,
private manageEnvironmentsService: ManageEnvironmentsService,
- private userAccessKeyService: UserAccessKeyService,
private userResourceService: UserResourceService,
private storageService: StorageService
) { }
@@ -176,7 +174,6 @@ export class ManagementComponent implements OnInit {
.subscribe((status: GeneralEnvironmentStatus) => {
this.healthStatus = status;
this.healthStatus.admin && this.getAllEnvironmentData();
- this.userAccessKeyService.initialUserAccessKeyCheck();
this.getExploratoryList();
});
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts b/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts
index 4b308c3..e182467 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts
@@ -23,7 +23,6 @@ import { ApplicationServiceFacade } from './services/applicationServiceFacade.se
import { AppRoutingService } from './services/appRouting.service';
import { ApplicationSecurityService } from './services/applicationSecurity.service';
import { HealthStatusService } from './services/healthStatus.service';
-import { UserAccessKeyService } from './services/userAccessKey.service';
import { UserResourceService } from './services/userResource.service';
import { AuthorizationGuard } from './services/authorization.guard';
import { CloudProviderGuard } from './services/cloudProvider.guard';
@@ -61,7 +60,6 @@ export class CoreModule {
AdminGuard,
CloudProviderGuard,
CheckParamsGuard,
- UserAccessKeyService,
AppRoutingService,
UserResourceService,
HealthStatusService,
diff --git a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts
index 94368e0..720b470 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/reporting/reporting.component.ts
@@ -21,7 +21,7 @@
import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
-import { BillingReportService, HealthStatusService, UserAccessKeyService } from '../core/services';
+import { BillingReportService, HealthStatusService } from '../core/services';
import { ReportingGridComponent } from './reporting-grid/reporting-grid.component';
import { ToolbarComponent } from './toolbar/toolbar.component';
@@ -71,7 +71,6 @@ export class ReportingComponent implements OnInit, OnDestroy {
constructor(
private billingReportService: BillingReportService,
private healthStatusService: HealthStatusService,
- private userAccessKeyService: UserAccessKeyService,
public toastr: ToastrService
) {}
@@ -192,8 +191,6 @@ export class ReportingComponent implements OnInit, OnDestroy {
.subscribe((result: any) => {
this.billingEnabled = result.billingEnabled;
this.admin = result.admin;
-
- this.userAccessKeyService.initialUserAccessKeyCheck();
});
}
}
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 7da5ad9..18b8f0d 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
@@ -22,12 +22,7 @@ import { MatDialog, MatDialogRef } from '@angular/material';
import { Subscription, timer, interval } from 'rxjs';
import { ToastrService } from 'ngx-toastr';
-import { ApplicationSecurityService,
- HealthStatusService,
- AppRoutingService,
- UserAccessKeyService,
- SchedulerService,
- StorageService} from '../../core/services';
+import { ApplicationSecurityService, HealthStatusService, AppRoutingService, SchedulerService, StorageService } from '../../core/services';
import { GeneralEnvironmentStatus } from '../../administration/management/management.model';
import { DICTIONARY } from '../../../dictionary/global.dictionary';
import { FileUtils } from '../../core/util';
@@ -59,7 +54,6 @@ export class NavbarComponent implements OnInit, OnDestroy {
private applicationSecurityService: ApplicationSecurityService,
private appRoutingService: AppRoutingService,
private healthStatusService: HealthStatusService,
- private userAccessKeyService: UserAccessKeyService,
private schedulerService: SchedulerService,
private storage: StorageService,
private dialog: MatDialog
@@ -94,7 +88,6 @@ export class NavbarComponent implements OnInit, OnDestroy {
logout_btnClick(): void {
this.healthStatusService.resetStatusValue();
- this.userAccessKeyService.resetUserAccessKey();
this.applicationSecurityService.logout().subscribe(
() => {
this.appRoutingService.redirectToLoginPage();
diff --git a/services/self-service/src/main/resources/webapp/src/styles.scss b/services/self-service/src/main/resources/webapp/src/styles.scss
index c765793..bffb5bd 100644
--- a/services/self-service/src/main/resources/webapp/src/styles.scss
+++ b/services/self-service/src/main/resources/webapp/src/styles.scss
@@ -289,6 +289,17 @@ input[type='number'] {
transition: all .35s ease-in-out;
}
+.empty-box {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ height: 100%;
+ .content {
+ text-align: center;
+ }
+}
+
#scrolling::-webkit-scrollbar,
.list-selected mat-chip-list .mat-chip-list-wrapper::-webkit-scrollbar {
width: 6px;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org