diff --git a/src/app/appmarket/appinstance/appinstance.module.ts b/src/app/appmarket/appinstance/appinstance.module.ts index 40ac8aa28e429f07ba1d599b69673780ab64fbc0..3e364722501cd2587685f987a82b05516973f8bf 100644 --- a/src/app/appmarket/appinstance/appinstance.module.ts +++ b/src/app/appmarket/appinstance/appinstance.module.ts @@ -30,7 +30,7 @@ import { SelectPodModalComponent } from './modals/select-pod-modal/select-pod-mo import {TooltipModule} from 'primeng/tooltip'; import {AppinstanceSearchPipe} from './appinstance-search.pipe'; import {InputTextModule} from 'primeng/inputtext'; -import { AppdeploymentComponent } from '../bulkDeployment/appDeployment/appchoose/appdeployment.component'; +import { AppdeploymentComponent } from '../bulkDeployment/appDeployment/appSelection/appdeployment.component'; import {DropdownModule} from 'primeng/dropdown'; import {TimelineModule} from 'primeng/timeline'; import {ButtonModule} from 'primeng/button'; diff --git a/src/app/appmarket/appmanagement/app-management.routes.ts b/src/app/appmarket/appmanagement/app-management.routes.ts index 3a291b0eece42687cea299a6b9fe77b5b87b1a5f..6a63ea89e28e16a808ba500b055de5d4d591b4f6 100644 --- a/src/app/appmarket/appmanagement/app-management.routes.ts +++ b/src/app/appmarket/appmanagement/app-management.routes.ts @@ -9,7 +9,7 @@ import {AppVersionCreateWizardComponent} from './app-version-create-wizard/app-v import {BulkAppListComponent} from '../bulkDeployment/bulk-app-list/bulk-app-list.component'; import {BulkViewComponent} from '../bulkDeployment/bulk-view/bulk-view.component'; import {AppnavigatorComponent} from '../bulkDeployment/appDeployment/appnavigator/appnavigator.component'; -import {AppdeploymentComponent} from '../bulkDeployment/appDeployment/appchoose/appdeployment.component'; +import {AppdeploymentComponent} from '../bulkDeployment/appDeployment/appSelection/appdeployment.component'; import {AppuploadComponent} from '../bulkDeployment/appDeployment/appupload/appupload.component'; import {AppsummaryComponent} from '../bulkDeployment/appDeployment/appsummary/appsummary.component'; diff --git a/src/app/appmarket/bulkDeployment/appDeployment/appchoose/appdeployment.component.css b/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.css similarity index 100% rename from src/app/appmarket/bulkDeployment/appDeployment/appchoose/appdeployment.component.css rename to src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.css diff --git a/src/app/appmarket/bulkDeployment/appDeployment/appchoose/appdeployment.component.html b/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.html similarity index 92% rename from src/app/appmarket/bulkDeployment/appDeployment/appchoose/appdeployment.component.html rename to src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.html index fa13ea74f6388c78bcddf2d7a80c431c87d98bf6..511559b58cbb7d1ba3cb46137b1db7cb0d5cdf00 100644 --- a/src/app/appmarket/bulkDeployment/appDeployment/appchoose/appdeployment.component.html +++ b/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.html @@ -7,7 +7,7 @@ <h4>{{'BULK.APP.INFO' | translate}}</h4> </div> <div style="margin-top: 3rem;"> - <p-dropdown [options]="apps" optionLabel="name" [(ngModel)]="selectedApp"></p-dropdown> + <p-dropdown [options]="apps" optionLabel="name" [(ngModel)]="selectedApp" [filter]="true"></p-dropdown> </div> <div class="row .navbar-right" style="margin-top: 3rem; display: flex; justify-content: right"> <button class="btn btn-primary" (click)="selectApp()"> {{'BULK.LIST.CONTINUE' | translate}}</button> diff --git a/src/app/appmarket/bulkDeployment/appDeployment/appchoose/appdeployment.component.spec.ts b/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.spec.ts similarity index 100% rename from src/app/appmarket/bulkDeployment/appDeployment/appchoose/appdeployment.component.spec.ts rename to src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.spec.ts diff --git a/src/app/appmarket/bulkDeployment/appDeployment/appchoose/appdeployment.component.ts b/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.ts similarity index 97% rename from src/app/appmarket/bulkDeployment/appDeployment/appchoose/appdeployment.component.ts rename to src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.ts index 557b6696b14e95dad009c52c727e05b59d1b50ac..3ce781bc78989c3f0bc424fd4fb8cdd87e454720 100644 --- a/src/app/appmarket/bulkDeployment/appDeployment/appchoose/appdeployment.component.ts +++ b/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.ts @@ -5,7 +5,7 @@ import {AppdeploymentService} from '../../appdeployment.service'; import {Router} from '@angular/router'; @Component({ - selector: 'app-appchoose', + selector: 'app-appselection', templateUrl: './appdeployment.component.html', styleUrls: ['./appdeployment.component.css'] }) diff --git a/src/app/appmarket/bulkDeployment/appDeployment/appupload/appupload.component.ts b/src/app/appmarket/bulkDeployment/appDeployment/appupload/appupload.component.ts index 1196852a2935eb6a1f878dce09b76640de31958e..b79169b5ca323c1ae7842c8fb08dbcfe4088b115 100644 --- a/src/app/appmarket/bulkDeployment/appDeployment/appupload/appupload.component.ts +++ b/src/app/appmarket/bulkDeployment/appDeployment/appupload/appupload.component.ts @@ -12,7 +12,9 @@ export class AppuploadComponent implements OnInit { public showProgressBar = false; - public csvText = ''; + public csvText = '"domain","instance","version","param.x","param.y"\n' + + '"Domain 1","instance-1","4.0.0","Param1","Param2"\n' + + '"Domain 2","instance-2","4.0.0","Param3","Param4"\n'; public errorMessage = ''; diff --git a/src/app/appmarket/bulkDeployment/appdeployment.service.ts b/src/app/appmarket/bulkDeployment/appdeployment.service.ts index 22094e037df4a5cac2a4b7e6e0781c4ba19be982..b4d31abc48301412da86e483e4d02a9ed5f6a56c 100644 --- a/src/app/appmarket/bulkDeployment/appdeployment.service.ts +++ b/src/app/appmarket/bulkDeployment/appdeployment.service.ts @@ -2,7 +2,7 @@ import {Injectable} from '@angular/core'; import {ApplicationBase} from '../../model/application-base'; import {HttpClient} from '@angular/common/http'; import {AppConfigService} from '../../service'; -import {BulkReplay} from '../../model/bulk-replay'; +import {BulkResponse} from '../../model/bulk-response'; import {Observable} from 'rxjs'; import {BulkDeployment} from '../../model/bulk-deployment'; @@ -17,7 +17,7 @@ export class AppdeploymentService { private selectedApp: string = undefined; private selectedAppId: string = undefined; - public result: BulkReplay[] = []; + public result: BulkResponse[] = []; public bulk: BulkDeployment; diff --git a/src/app/appmarket/bulkDeployment/bulk-app-list/bulk-app-list.component.ts b/src/app/appmarket/bulkDeployment/bulk-app-list/bulk-app-list.component.ts index c321c9caf8a45027549611abd87d36cac1d046ee..6b16e157764cb4d500d25888159456d6eb28b961 100644 --- a/src/app/appmarket/bulkDeployment/bulk-app-list/bulk-app-list.component.ts +++ b/src/app/appmarket/bulkDeployment/bulk-app-list/bulk-app-list.component.ts @@ -1,7 +1,7 @@ import {Component, OnInit, ViewChild} from '@angular/core'; import {BulkDeployment} from '../../../model/bulk-deployment'; import {AppdeploymentService} from '../appdeployment.service'; -import {BulkType} from '../../../model/bulk-replay'; +import {BulkType} from '../../../model/bulk-response'; import {ModalComponent} from '../../../shared'; @Component({ diff --git a/src/app/appmarket/bulkDeployment/bulk-domain-list/bulk-domain-list.component.ts b/src/app/appmarket/bulkDeployment/bulk-domain-list/bulk-domain-list.component.ts index 96c31b8cd2cc6faecba572bdbea48565826d7aa7..2a7b32136440ca302c00e49ddf3f16538454176d 100644 --- a/src/app/appmarket/bulkDeployment/bulk-domain-list/bulk-domain-list.component.ts +++ b/src/app/appmarket/bulkDeployment/bulk-domain-list/bulk-domain-list.component.ts @@ -1,7 +1,7 @@ import {Component, OnInit} from '@angular/core'; import {AppdeploymentService} from '../appdeployment.service'; import {BulkDeployment} from '../../../model/bulk-deployment'; -import {BulkType} from '../../../model/bulk-replay'; +import {BulkType} from '../../../model/bulk-response'; @Component({ selector: 'app-bulk-domain-list', diff --git a/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.ts b/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.ts index cd5e3d5f9aed274a384b154f46f046637e3dd284..9f16ab035e14e3970b2292ed14d773a62f0b7ac2 100644 --- a/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.ts +++ b/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.ts @@ -1,6 +1,6 @@ import {Component, Input, OnInit, QueryList, ViewChild, ViewChildren} from '@angular/core'; import {BulkDeployment} from '../../../model/bulk-deployment'; -import {BulkType} from '../../../model/bulk-replay'; +import {BulkType} from '../../../model/bulk-response'; import {SortableHeaderDirective} from '../../../service/sort-domain.directive'; import {ModalComponent} from '../../../shared'; diff --git a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.css b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.css index ce5caa680eef2f33fffd62ff29d6c02956f152e3..415a4d52c3f56b52ae0540dc65b55bf5b1c3d599 100644 --- a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.css +++ b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.css @@ -21,3 +21,17 @@ margin-left: 5px; margin-right: 5px; } + +:host ::ng-deep .p-tooltip .p-tooltip-text { + background: #383838; + color: rgba(255, 255, 255, 0.87); + padding: 0.5rem 0.5rem; + box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12); + border-radius: 3px; +} + +:host ::ng-deep .p-tooltip { + white-space: nowrap !important; +} + + diff --git a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html index 6b3a8da386ee92f2440dbb10397246b849587f82..e8bba2482b2a4165a96f68d104d0026fe43750e6 100644 --- a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html +++ b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html @@ -53,11 +53,11 @@ <th>{{'BULK.LIST.DETAILS' | translate}}</th> <th style="width: 5%" scope="col"></th> </tr> - <ng-template ngFor let-replay [ngForOf]="bulk.entries" let-i="index"> - <tr *ngIf="replay.type === 'DOMAIN'" class="table-row"> - <td>{{'BULK.STATE.' + replay.state | translate}}</td> - <td>{{replay.created}}</td> - <td>{{getDetails(replay)}}</td> + <ng-template ngFor let-response [ngForOf]="bulk.entries" let-i="index"> + <tr *ngIf="response.type === 'DOMAIN'" class="table-row"> + <td>{{'BULK.STATE.' + response.state | translate}}</td> + <td>{{response.created}}</td> + <td>{{getDetails(response)}}</td> <td style="width: 5%" class="text-right"> <span class="dropdown"> <a style="display: inline-block" class="dropdown-toggle " aria-expanded="false" aria-haspopup="true" @@ -65,11 +65,11 @@ <em class="fas fa-cog icon-black icon-bigger"></em> </a> <ul class="dropdown-menu pull-right-drop"> - <li *ngIf="replay.type === 'DOMAIN'"> - <a [routerLink]="['/admin/domains/view/', replay?.details['domainId']]">{{ 'BULK.LIST.MOVE_DOMAIN' | translate }}</a> + <li *ngIf="response.type === 'DOMAIN'"> + <a [routerLink]="['/admin/domains/view/', response?.details['domainId']]">{{ 'BULK.LIST.MOVE_DOMAIN' | translate }}</a> </li> - <li *ngIf="replay.type === 'USER'"> - <a [routerLink]="['/admin/users/view', replay?.details['userId']]">{{ 'BULK.LIST.MOVE_USER' | translate }}</a> + <li *ngIf="response.type === 'USER'"> + <a [routerLink]="['/admin/users/view', response?.details['userId']]">{{ 'BULK.LIST.MOVE_USER' | translate }}</a> </li> </ul> </span> @@ -180,9 +180,9 @@ <div class="panel-body"> <div class="flex flex-row mb-3"> - <div class="flex align-items-center"> - {{'BULK.LIST.DEPLOYED' | translate}}: - </div> +<!-- <div class="flex align-items-center">--> +<!-- {{'BULK.LIST.DEPLOYED' | translate}}:--> +<!-- </div>--> <div class="flex ml-2 mr-2"> <img alt="App logo" style="width: 50px" [src]="(appImagesService.getAppLogoUrl(bulk.details['appId']) | secure) || 'assets/images/app-logo-example.png'"/> @@ -201,16 +201,16 @@ <th>{{'BULK.APP.DOMAIN' | translate}}</th> <th style="width: 5%" scope="col"></th> </tr> - <ng-template ngFor let-replay [ngForOf]="bulk.entries" let-i="index"> - <tr *ngIf="replay.type === 'APPLICATION'" class="table-row"> - <td>{{'BULK.STATE.' + replay.state | translate}} <i *ngIf="replay.state == 'PROCESSING'" + <ng-template ngFor let-response [ngForOf]="bulk.entries" let-i="index"> + <tr *ngIf="response.type === 'APPLICATION'" class="table-row"> + <td >{{'BULK.STATE.' + response.state | translate}} <i *ngIf="response.state == 'PROCESSING'" class="pi pi-spin pi-spinner ml-1" style="font-size: 1.4rem"></i> - <i *ngIf="replay.state == 'FAILED'" class="pi pi-info-circle" style="font-size: 1.4rem" - pTooltip="{{replay?.details['errorMessage']}}" appendTo="column"></i></td> - <td>{{getAppInstanceId(replay)}}</td> - <td>{{getAppInstanceName(replay)}}</td> - <td>{{getDomainCodeName(replay)}}</td> + <i *ngIf="response.state == 'FAILED'" class="pi pi-info-circle" style="font-size: 1.4rem" + pTooltip="{{response?.details['errorMessage']}}" tooltipStyleClass="p-tooltip-width " [fitContent]="false"></i></td> + <td>{{getAppInstanceId(response)}}</td> + <td>{{getAppInstanceName(response)}}</td> + <td>{{getDomainCodeName(response)}}</td> <td style="width: 5%" class="text-right"> <span class="dropdown"> <a style="display: inline-block" class="dropdown-toggle " aria-expanded="false" aria-haspopup="true" @@ -218,10 +218,10 @@ <em class="fas fa-cog icon-black icon-bigger"></em> </a> <ul class="dropdown-menu pull-right-drop"> - <li *ngIf="replay.type === 'APPLICATION'"> - <a [routerLink]="['/instances/', replay?.details['appInstanceId']]">{{ 'BULK.LIST.MOVE_APP' | translate }}</a> + <li *ngIf="response.type === 'APPLICATION' && response?.details['appInstanceId'] !== undefined"> + <a [routerLink]="['/instances/', response?.details['appInstanceId']]">{{ 'BULK.LIST.MOVE_APP' | translate }}</a> </li> - <li *ngIf="replay.type === 'APPLICATION' && replay.state !== 'COMPLETED'"> + <li *ngIf="response.type === 'APPLICATION' && response.state !== 'COMPLETED'"> <a>{{ 'BULK.APP.CHECK_STATE' | translate }}</a> </li> </ul> diff --git a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.ts b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.ts index 2d5f27f457dcfbd8bdf3e76b5b06b912bdee0a42..8511fb0d17ad1751f3b12f3e16e387c4e4299f7f 100644 --- a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.ts +++ b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.ts @@ -2,7 +2,7 @@ import {Component, OnDestroy, OnInit} from '@angular/core'; import {BulkDeployment} from '../../../model/bulk-deployment'; import {AppdeploymentService} from '../appdeployment.service'; import {ActivatedRoute, Router} from '@angular/router'; -import {BulkReplay, BulkType} from '../../../model/bulk-replay'; +import {BulkResponse, BulkType} from '../../../model/bulk-response'; import {timer} from 'rxjs'; import {map} from 'rxjs/operators'; import {AppImagesService} from '../../../service'; @@ -51,7 +51,7 @@ export class BulkViewComponent implements OnInit, OnDestroy { }); } - public getDetails(entry: BulkReplay) { + public getDetails(entry: BulkResponse) { if (entry.type === 'USER') { return `Username: ${entry.details['userName']} email: ${entry.details['email']} userId: ${entry.details['userId']}` } else if (entry.type === 'DOMAIN') { @@ -61,16 +61,16 @@ export class BulkViewComponent implements OnInit, OnDestroy { } } - public getAppInstanceId(entry: BulkReplay) { + public getAppInstanceId(entry: BulkResponse) { return entry?.details['appInstanceId'] } - public getAppInstanceName(entry: BulkReplay) { + public getAppInstanceName(entry: BulkResponse) { return entry?.details['appInstanceName'] } - public getDomainCodeName(entry: BulkReplay) { - return entry?.details['domainCodename'] + public getDomainCodeName(entry: BulkResponse) { + return entry?.details['domainCodename'] || entry?.details['domainName'] } public update() { diff --git a/src/app/appmarket/bulkDeployment/domainDeployment/domainupload/domainupload.component.ts b/src/app/appmarket/bulkDeployment/domainDeployment/domainupload/domainupload.component.ts index c3290605228f21fd29e80e94d9f3f6ea6d90e57a..0e7d673719a9b3b24db2d56c69ef39f527ec3168 100644 --- a/src/app/appmarket/bulkDeployment/domainDeployment/domainupload/domainupload.component.ts +++ b/src/app/appmarket/bulkDeployment/domainDeployment/domainupload/domainupload.component.ts @@ -1,7 +1,8 @@ import {Component, OnInit} from '@angular/core'; import {AppdeploymentService} from '../../appdeployment.service'; import {Router} from '@angular/router'; -import {BulkType} from '../../../../model/bulk-replay'; +import {BulkType} from '../../../../model/bulk-response'; +import {DomainService} from '../../../../service'; @Component({ selector: 'app-domainupload', @@ -12,12 +13,15 @@ export class DomainuploadComponent implements OnInit { public showProgressBar = false; - public csvText = ''; + public csvText = '"domain","username","networks","domainGroups","email"\n' + + '"ExampleDomain","TestUser","","Lab1","email@domain.com"\n' + + '"ExampleDomain2","TestUser2","","Lab1","email2@domain.com"\n'; public errorMessage = ''; constructor(private readonly deployService: AppdeploymentService, - private router: Router) { } + private router: Router, + private domainService: DomainService) { } ngOnInit(): void { } @@ -29,7 +33,8 @@ export class DomainuploadComponent implements OnInit { this.deployService.uploadUserDomainFile(event.files[0]).subscribe( val => { console.warn("done") this.deployService.bulk = val; - if (val.type === BulkType.DOMAIN) { + this.domainService.setUpdateRequiredFlag(true); + if (val.type === BulkType.DOMAIN) { this.router.navigate(['admin/domains/bulks/', val.id]) } else { this.router.navigate(['admin/domains/deploy/summary']) @@ -49,7 +54,8 @@ export class DomainuploadComponent implements OnInit { this.deployService.uploadUserDomainFile(file).subscribe( val => { console.warn("done") this.deployService.bulk = val; - if (val.type === BulkType.DOMAIN) { + this.domainService.setUpdateRequiredFlag(true); + if (val.type === BulkType.DOMAIN) { this.router.navigate(['admin/domains/bulks/', val.id]) } else { this.router.navigate(['admin/domains/deploy/summary']) diff --git a/src/app/model/bulk-deployment.ts b/src/app/model/bulk-deployment.ts index c062ad021f244a627860fdda9306bf88807c7528..718e0c2bfb5e5d011ce37461a73ce0e24fbd5bce 100644 --- a/src/app/model/bulk-deployment.ts +++ b/src/app/model/bulk-deployment.ts @@ -1,11 +1,11 @@ import {User} from './user'; -import {BulkReplay, BulkType} from './bulk-replay'; +import {BulkResponse, BulkType} from './bulk-response'; export class BulkDeployment { public id: number; public creationDate: Date; public creator: User; - public entries: BulkReplay[] = []; + public entries: BulkResponse[] = []; public state: BulkDeploymentState; public type: BulkType; public details: Map<string, string>; diff --git a/src/app/model/bulk-replay.ts b/src/app/model/bulk-response.ts similarity index 91% rename from src/app/model/bulk-replay.ts rename to src/app/model/bulk-response.ts index eb4ce117fb9a4c06ebdea4721ed61e665d7c5945..d55a0c0e2e5299c34a36f30c9ddd5efe2a63cc46 100644 --- a/src/app/model/bulk-replay.ts +++ b/src/app/model/bulk-response.ts @@ -1,6 +1,6 @@ import {BulkDeploymentState} from './bulk-deployment'; -export class BulkReplay { +export class BulkResponse { public state: BulkDeploymentState; public created: boolean; public details: Map<string, string>;