diff --git a/README.md b/README.md index 7ce142d1a1e72224d378cc7c9c7a14074032533c..2a40573ff3dc42111603978b57755b6582149c79 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ <br /> <a href="https://docs.nmaas.eu/">Explore documentation</a> · - <a href="https://github.com/nmaas-platform/nmaas-portal/issues">Report Bug</a> + <a href="https://gitlab.software.geant.org/nmaas/nmaas-portal/-/issues">Report Bug</a> · - <a href="https://github.com/nmaas-platform/nmaas-portal/issues">Request Feature</a> + <a href="https://gitlab.software.geant.org/nmaas/nmaas-portal/-/issues">Request Feature</a> </p> </div> diff --git a/build.gradle b/build.gradle index c03832281ad89bad60aa995bc88cb6e19f65e22d..b0f93a8b25f6963e6821448de89bd40a1cb6ccc0 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { id "org.sonarqube" version "3.2.0" } -version = '1.6.4' +version = '1.6.5' task buildGUI(type: Exec) { println 'Building using Angular CLI' diff --git a/docs/nmaas-logo-blue.png b/docs/nmaas-logo-blue.png index 2ab81d686b5da7b544f7f93da742ab393ac50fa4..52f0ae977185a1540934b93368af0fcdd63e159e 100644 Binary files a/docs/nmaas-logo-blue.png and b/docs/nmaas-logo-blue.png differ diff --git a/docs/nmaas-logo-white.png b/docs/nmaas-logo-white.png deleted file mode 100644 index 3226b4d55678026b0e8ee044d2f3a8c9f5f9745b..0000000000000000000000000000000000000000 Binary files a/docs/nmaas-logo-white.png and /dev/null differ diff --git a/package-lock.json b/package-lock.json index 4515d1ee4f14a368197be8a2a90d59b153b822d6..09fc2262105cec32271055e8e3c3e88d05488208 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nmaas-portal", - "version": "1.6.4", + "version": "1.6.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "nmaas-portal", - "version": "1.6.4", + "version": "1.6.5", "license": "Apache 2.0", "dependencies": { "@angular/animations": "15.2.10", diff --git a/package.json b/package.json index 9d59dc55841ac8f68205f687859a0390b04e0f1a..a1f5f05b6352a3b9a867b4565f2dc53672197672 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nmaas-portal", - "version": "1.6.4", + "version": "1.6.5", "license": "Apache 2.0", "angular-cli": {}, "scripts": { diff --git a/src/app/appmarket/admin/configuration/details/configurationdetails.component.css b/src/app/appmarket/admin/configuration/details/configurationdetails.component.css index bce6ffc7ec086a3cc60403cc9057cd187b11ccc6..c9567c8a9c5d7e270418a6165614927a11017739 100644 --- a/src/app/appmarket/admin/configuration/details/configurationdetails.component.css +++ b/src/app/appmarket/admin/configuration/details/configurationdetails.component.css @@ -25,3 +25,7 @@ .pd-top-7 { padding-top: 7px; } + +.input-width { + width: 50%; +} diff --git a/src/app/appmarket/admin/configuration/details/configurationdetails.component.html b/src/app/appmarket/admin/configuration/details/configurationdetails.component.html index 8b2772bd8dd4ce52531e59c63e81c4332c4f15d1..92aafcd35ac0b0fe8ffbd4b30836afee1c5b256e 100644 --- a/src/app/appmarket/admin/configuration/details/configurationdetails.component.html +++ b/src/app/appmarket/admin/configuration/details/configurationdetails.component.html @@ -107,6 +107,30 @@ [checked]="this.configuration.bulkDomainsSendEmailForNewAccounts === true"> </div> </div> + + <div class="form-group"> + <label for="bulkDeploymentJobCron" + class="col-sm-3 control-label">{{'PORTAL_CONFIGURATION.BULK_DEPLOYMENT_CRON' | translate}}</label> + <div class="col-sm-9 pd-top-7 "> + <div class="input-width"> + <input class="form-control" type="text" id="bulkDeploymentJobCron" name="bulkDeploymentJobCron" + [(ngModel)]="this.configuration.bulkDeploymentJobCron"> + </div> + + </div> + </div> + + <div class="form-group"> + <label for="parallelDeploymentsLimit" + class="col-sm-3 control-label">{{'PORTAL_CONFIGURATION.BULK_DEPLOYMENT_LIMIT' | translate}}</label> + <div class="col-sm-9 pd-top-7"> + <div class="input-width"> + <input class="form-control" type="number" id="parallelDeploymentsLimit" name="parallelDeploymentsLimit" + [(ngModel)]="this.configuration.parallelDeploymentsLimit"> + </div> + + </div> + </div> <div class="flex justify-content-end"> <button class="btn btn-primary" type="submit">{{ 'PORTAL_CONFIGURATION.SUBMIT_BUTTON' | translate }}</button> diff --git a/src/app/appmarket/appinstance/appinstance.module.ts b/src/app/appmarket/appinstance/appinstance.module.ts index d9811ee450cd7fb4b06ce6fdc8d82d95a08491e4..37ff61222687abee81977fbf0e6f9e1d0d2be3d5 100644 --- a/src/app/appmarket/appinstance/appinstance.module.ts +++ b/src/app/appmarket/appinstance/appinstance.module.ts @@ -35,6 +35,8 @@ import {TimelineModule} from 'primeng/timeline'; import {ButtonModule} from 'primeng/button'; import {AppLogAccessComponent} from './app-log-access/app-log-access.component'; import {FormioAppConfig, FormioModule} from '@formio/angular'; +import {SelectButtonModule} from 'primeng/selectbutton'; + @NgModule({ declarations: [ @@ -72,6 +74,7 @@ import {FormioAppConfig, FormioModule} from '@formio/angular'; TimelineModule, ButtonModule, InputTextModule, + SelectButtonModule, ], exports: [ AppInstanceComponent, diff --git a/src/app/appmarket/appinstance/appinstance/appinstance.component.ts b/src/app/appmarket/appinstance/appinstance/appinstance.component.ts index 8c261bbcd3bf7d6814eb8a97c186edbd80ce8760..c4ce87cd4c01e91f4f95949c30428da0c5ec570d 100644 --- a/src/app/appmarket/appinstance/appinstance/appinstance.component.ts +++ b/src/app/appmarket/appinstance/appinstance/appinstance.component.ts @@ -362,6 +362,9 @@ export class AppInstanceComponent implements OnInit, OnDestroy { if (this.intervalCheckerState) { this.intervalCheckerState.unsubscribe(); } + if (this.intervalCheckerStateHistory) { + this.intervalCheckerStateHistory.unsubscribe(); + } } public redeploy(): void { diff --git a/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.css b/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.css index 6b80dc0f077efba74dc741a34d6dca1a90bb23ad..0458c598e35d54aa2de5e57f56ed9f359cf6225f 100644 --- a/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.css +++ b/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.css @@ -33,3 +33,7 @@ tr.clickable { display: block; } +::ng-deep.p-selectbutton .p-button.p-highlight{ + background: #233354 !important; + border-color: #233354; +} diff --git a/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.html b/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.html index 29c137e67a37cd40de7d4288197b739811635ea2..88caaeecc4615f695012b5416a481ddead7964af 100644 --- a/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.html +++ b/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.html @@ -5,14 +5,17 @@ <div class="col-sm-12 col-sm-12 col-md-12"> <div style="margin-left: -10px;" class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> <form class="form-inline" role="form"> - <div class="form-group"> - <label for="selectionType">{{ 'APP_INSTANCES.SHOW' | translate }}: </label> - <select id="selectionType" class="form-control" [(ngModel)]="listSelection" - (change)="onSelectionChange($event)" [selectedIndex]="listSelection" - [ngModelOptions]="{standalone: true}"> - <option *ngFor="let sl of AppInstanceListSelection | keys" - [value]="sl.key">{{ translateEnum(sl.value) | titlecase }}</option> - </select> + <div class="form-group " style="display: inline-flex; align-items: flex-end"> + <label class="mr-3" for="selectionType">{{ 'APP_INSTANCES.SHOW' | translate }}: </label> + <p-selectButton + id="selectionType" + [options]="selectionOptions" + [(ngModel)]="listSelection" + [ngModelOptions]="{standalone: true}" + (ngModelChange)="onSelectionChange($event)" + optionLabel="label" + optionValue="value" + ngDefaultControl/> </div> <strong class="checkbox-label" *domainRoles="['ROLE_DOMAIN_ADMIN', 'ROLE_SYSTEM_ADMIN', 'ROLE_OPERATOR'];domainId:domainId"> {{'APP_INSTANCES.UNDEPLOYED_VISIBLE' | translate}}: diff --git a/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.ts b/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.ts index f0be51917462f8eaf5c51e182a9cb430e9126451..1a95ba43bb1153d842a4ccd17a8969143f2dbee5 100644 --- a/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.ts +++ b/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.ts @@ -4,7 +4,7 @@ import {AppInstance, AppInstanceState, parseAppInstanceState} from '../../../mod import {AppConfigService, AppInstanceService, CustomerSearchCriteria, DomainService} from '../../../service'; import {AuthService} from '../../../auth/auth.service'; import {UserDataService} from '../../../service/userdata.service'; -import {Observable, of} from 'rxjs'; +import {forkJoin, Observable, of} from 'rxjs'; import {TranslateService} from '@ngx-translate/core'; import {map} from 'rxjs/operators'; import {SessionService} from '../../../service/session.service'; @@ -55,6 +55,10 @@ export class AppInstanceListComponent implements OnInit { public domains: Domain[] = []; public searchValue = ''; + public selectionOptions = [ + { label: this.translateEnum(AppInstanceListSelection.ALL), value: AppInstanceListSelection.ALL }, + { label: this.translateEnum(AppInstanceListSelection.MY), value: AppInstanceListSelection.MY }, + ]; constructor(private appInstanceService: AppInstanceService, @@ -94,6 +98,16 @@ export class AppInstanceListComponent implements OnInit { this.update(domainId) }); + forkJoin({ + all: this.translateService.get('ENUM.ALL'), + my: this.translateService.get('ENUM.MY') + }).subscribe(translations => { + this.selectionOptions = [ + { label: translations.all, value: AppInstanceListSelection.ALL }, + { label: translations.my, value: AppInstanceListSelection.MY }, + ]; + }); + } public getDomainNameById(id: number): string { diff --git a/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.css b/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.css index c0ad076212826fc5ce67c6fed4eeb2aa653b0b9d..bbb71407ecf6475e7b215ab30155c5fba82b004d 100644 --- a/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.css +++ b/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.css @@ -1,3 +1,7 @@ :host ::ng-deep .p-dropdown { width: 300px; } + +:host ::ng-deep .p-inputtext { + width: 300px; +} \ No newline at end of file diff --git a/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.html b/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.html index 511559b58cbb7d1ba3cb46137b1db7cb0d5cdf00..2dcb31a8716d02e8016c06b0e47b9c997065a2fa 100644 --- a/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.html +++ b/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.html @@ -9,8 +9,14 @@ <div style="margin-top: 3rem;"> <p-dropdown [options]="apps" optionLabel="name" [(ngModel)]="selectedApp" [filter]="true"></p-dropdown> </div> + <div class="row" style="margin-top: 3rem;"> + <h4>{{'BULK.APP.PARALLEL' | translate}}</h4> + </div> + <div style="margin-top: 3rem;"> + <input pInputText type="number" inputId="minmax" mode="decimal" ngDefaultControl [(ngModel)]="parallelDeploymentsLimit" [max]="limitFromConfiguration" [min]="1" /> + </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> + <button class="btn btn-primary" [disabled]="selectApp?.name === null || parallelDeploymentsLimit < 1 || parallelDeploymentsLimit > limitFromConfiguration" (click)="selectApp()"> {{'BULK.LIST.CONTINUE' | translate}}</button> </div> </div> diff --git a/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.ts b/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.ts index 3ce781bc78989c3f0bc424fd4fb8cdd87e454720..1abb283aa2f96e0124d324c47bdf9fa551b7921b 100644 --- a/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.ts +++ b/src/app/appmarket/bulkDeployment/appDeployment/appSelection/appdeployment.component.ts @@ -1,8 +1,9 @@ import { Component, OnInit } from '@angular/core'; import {ApplicationBase} from '../../../../model/application-base'; -import {AppsService} from '../../../../service'; +import {AppsService, ConfigurationService} from '../../../../service'; import {AppdeploymentService} from '../../appdeployment.service'; import {Router} from '@angular/router'; +import { FormControl, FormGroup } from '@angular/forms'; @Component({ selector: 'app-appselection', @@ -15,19 +16,46 @@ export class AppdeploymentComponent implements OnInit { public selectedApp: ApplicationBase = null; + public parallelDeploymentsLimit = 1; + public limitFromConfiguration = 50; + + myGroup : FormGroup; + constructor(private readonly appService: AppsService, private readonly deployService: AppdeploymentService, - private router: Router) { } + private router: Router, + private readonly configuration: ConfigurationService) { } + ngOnInit(): void { this.appService.getAllActiveApplicationBase().subscribe(data => { data.sort((a, b) => a.name.toLowerCase() > b.name.toLowerCase() ? 1 : -1); this.apps = data }); + this.configuration.getConfiguration().subscribe(configuration => { + this.limitFromConfiguration = configuration.parallelDeploymentsLimit; + console.log("Limit from config", this.limitFromConfiguration) + this.parallelDeploymentsLimit = configuration.parallelDeploymentsLimit; + }) + + } + + + public onKeyPress(event) { + console.log(event); + if(event < 1) { + this.parallelDeploymentsLimit = 1; + console.log("Changing limit to ", this.parallelDeploymentsLimit ) + } + if(event > this.limitFromConfiguration ) { + console.log("Changing limit to ", this.limitFromConfiguration) + this.parallelDeploymentsLimit = this.limitFromConfiguration; + } } selectApp() { this.deployService.setSelectedApp(this.selectedApp); + this.deployService.setParallel(this.parallelDeploymentsLimit); this.router.navigate(['admin/apps/bulks/new/upload']) } } diff --git a/src/app/appmarket/bulkDeployment/appdeployment.service.ts b/src/app/appmarket/bulkDeployment/appdeployment.service.ts index b858eb65c02ee55a8cf4f49a629e26ba638c274b..e754e949023a94f7ceb1fcb65c90f7f0f8a7ab62 100644 --- a/src/app/appmarket/bulkDeployment/appdeployment.service.ts +++ b/src/app/appmarket/bulkDeployment/appdeployment.service.ts @@ -16,6 +16,7 @@ export class AppdeploymentService { private selectedApp: string = undefined; private selectedAppId: string = undefined; + private parallelDeploymentsLimit: number = 1; public result: BulkResponse[] = []; @@ -40,6 +41,10 @@ export class AppdeploymentService { localStorage.setItem(this.DEPLOY_APP_ID_KEY, this.selectedAppId) } + setParallel(parallel: number ) { + this.parallelDeploymentsLimit = parallel; + } + public getSelectedApp() { return this.selectedApp; } @@ -56,6 +61,7 @@ export class AppdeploymentService { const formParams = new FormData(); formParams.append('file', file); formParams.append('appName', name) + formParams.append('limit', this.parallelDeploymentsLimit.toString()) return this.http.post<BulkDeployment>(this.getUrl() + 'apps', formParams); } diff --git a/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.html b/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.html index c68bbe80370e26c7df8dfd879c91785745f46cb2..7a9fc5815787d93905e271793dc971856f8a1bcc 100644 --- a/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.html +++ b/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.html @@ -99,10 +99,10 @@ <li *ngIf="mode === bulkTypeApp"> <a [routerLink]="['/admin/apps/bulks/', bulk?.id]">{{ 'BULK.LIST.DETAILS' | translate }}</a> </li> - <li *ngIf="mode === bulkTypeApp"> + <li *ngIf="mode === bulkTypeApp && bulk?.state !== 'REMOVED'"> <a (click)="getAppBulkDetails(bulk?.id)"> {{"BULK.APP.DOWNLOAD_CSV" | translate}}</a> </li> - <li *ngIf="mode === bulkTypeApp"> + <li *ngIf="mode === bulkTypeApp && bulk?.state !== 'REMOVED' "> <a (click)="modal.show()">{{ 'BULK.LIST.REMOVE' | translate }}</a> </li> </ul> 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 4fff4026057245bc910d12bd4e025985107390ac..c40a1ff6969dfe5322906d7e116981f228ef913a 100644 --- a/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html +++ b/src/app/appmarket/bulkDeployment/bulk-view/bulk-view.component.html @@ -63,7 +63,9 @@ <td>{{getDomainName(response)}}</td> <td>{{getDomainCodeName(response)}}</td> <td style="width: 5%" class="text-right"> - <span class="dropdown"> + <i *ngIf="response.type === 'DOMAIN'" class="pi pi-search" style="font-size: 1.8rem; cursor: pointer" [routerLink]="['/admin/domains/view/', response?.details['domainId']]"></i> + <i *ngIf="response.type === 'USER'" class="pi pi-search" style="font-size: 1.8rem; cursor: pointer" [routerLink]="['/admin/users/view', response?.details['userId']]"></i> + <!-- <span class="dropdown"> <a style="display: inline-block" class="dropdown-toggle " aria-expanded="false" aria-haspopup="true" data-toggle="dropdown" href="#" role="button"> <em class="fas fa-cog icon-black icon-bigger"></em> @@ -76,7 +78,7 @@ <a [routerLink]="['/admin/users/view', response?.details['userId']]">{{ 'BULK.LIST.MOVE_USER' | translate }}</a> </li> </ul> - </span> + </span> --> </td> </tr> </ng-template> @@ -114,7 +116,10 @@ <td>{{getUsername(response)}}</td> <td>{{getEmail(response)}}</td> <td style="width: 5%" class="text-right"> - <span class="dropdown"> + <i *ngIf="response.type === 'DOMAIN'" class="pi pi-search" style="font-size: 1.8rem; cursor: pointer" [routerLink]="['/admin/domains/view/', response?.details['domainId']]"></i> + <i *ngIf="response.type === 'USER'" class="pi pi-search" style="font-size: 1.8rem; cursor: pointer" [routerLink]="['/admin/users/view', response?.details['userId']]"></i> + + <!-- <span class="dropdown"> <a style="display: inline-block" class="dropdown-toggle " aria-expanded="false" aria-haspopup="true" data-toggle="dropdown" href="#" role="button"> <em class="fas fa-cog icon-black icon-bigger"></em> @@ -127,7 +132,7 @@ <a [routerLink]="['/admin/users/view', response?.details['userId']]">{{ 'BULK.LIST.MOVE_USER' | translate }}</a> </li> </ul> - </span> + </span> --> </td> </tr> </ng-template> @@ -141,7 +146,12 @@ </div> <div *ngIf="bulk && bulkType === 'APPLICATION' "> - <h3>{{'BULK.APP.VIEW_HEADER' | translate}}</h3> + <div class="flex justify-content-between"> + <h3>{{'BULK.APP.VIEW_HEADER' | translate}}</h3> + <img alt="App logo" style="width: 50px" + [src]="(appImagesService.getAppLogoUrl(bulk.details['appId']) | secure) || 'assets/images/app-logo-example.png'"/> + </div> + <div class="" style="padding-bottom: 5rem; margin-top: 3rem"> <label for="id" class="col-sm-2 control-label text-right mt-2">{{ 'BULK.LIST.ID' | translate }}</label> <div class="col-sm-10"> @@ -168,7 +178,7 @@ </div> </div> - <div class="form-group" style="padding-bottom: 5rem"> + <div class="" style="padding-bottom: 5rem"> <label for="state" class="col-sm-2 control-label text-right mt-2">{{ 'BULK.LIST.STATE' | translate }}</label> <div class="col-sm-10"> @@ -176,6 +186,21 @@ placeholder="{{'BULK.STATE.' + bulk.state | translate}}"> </div> </div> + + <div class="" style="padding-bottom: 5rem;"> + <label for="id" class="col-sm-2 control-label text-right mt-2">{{ 'BULK.LIST.APP_NAME' | translate }}</label> + <div class="col-sm-10"> + <input type="text" class="form-control" id="id" name="id" [disabled]="true" + [(ngModel)]="bulk.details['appName']" #name="ngModel"> + </div> + + </div> + + <div class="flex justify-content-end" style="padding-right: 1.5rem"> + <button class="btn btn-primary mr-2" (click)="refreshStates()">{{'BULK.APP.REFRESH' | translate}}</button> + + <button class="btn btn-primary" (click)="getAppBulkDetails(this.bulkId)">{{'BULK.APP.DOWNLOAD_CSV' | translate}}</button> + </div> <div class="panel panel-default" style="margin-top: 3rem"> <div class="panel-heading"> @@ -187,22 +212,7 @@ </div> <div class="panel-body"> - <div class="flex flex-row mb-3 justify-content-between"> - <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'"/> - <div class="flex align-items-center ml-2"> - {{bulk.details['appName']}} - </div> - </div> - - <div class="flex justify-content-end"> - <button class="btn btn-primary mr-2" (click)="refreshStates()">{{'BULK.APP.REFRESH' | translate}}</button> - - <button class="btn btn-primary" (click)="getAppBulkDetails(this.bulkId)">{{'BULK.APP.DOWNLOAD_CSV' | translate}}</button> - </div> - </div> - + <table class="table table-hover table-condensed" aria-describedby="Domains in Group table"> <thead> <tr #column> @@ -218,7 +228,7 @@ *ngIf="response.state == 'PROCESSING'" class="pi pi-spin pi-spinner ml-1" style="font-size: 1.4rem"></em> - <em *ngIf="response.state == 'FAILED'" class="pi pi-info-circle" + <em *ngIf="response.state == 'FAILED' && response?.details['appInstanceId'] === undefined" class="pi pi-info-circle" style="font-size: 1.4rem" pTooltip="{{response?.details['errorMessage']}}" tooltipStyleClass="p-tooltip-width " [fitContent]="false"></em></td> @@ -226,8 +236,9 @@ <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" + <i class="pi pi-search" style="font-size: 1.8rem; cursor: pointer" [routerLink]="['/instances/', response?.details['appInstanceId']]"></i> + <!-- <span *ngIf="response?.details['appInstanceId'] !== undefined" class="dropdown"> + <a style="display: inline-block" class="dropdown-toggle " aria-expanded="false" aria-haspopup="true" data-toggle="dropdown" href="#" role="button"> <em class="fas fa-cog icon-black icon-bigger"></em> </a> @@ -235,11 +246,11 @@ <li *ngIf="response.type === 'APPLICATION' && response?.details['appInstanceId'] !== undefined"> <a [routerLink]="['/instances/', response?.details['appInstanceId']]">{{ 'BULK.LIST.MOVE_APP' | translate }}</a> </li> - <!-- <li *ngIf="response.type === 'APPLICATION' && response.state !== 'COMPLETED'"> + <li *ngIf="response.type === 'APPLICATION' && response.state !== 'COMPLETED'"> <a>{{ 'BULK.APP.CHECK_STATE' | translate }}</a> - </li> --> + </li> </ul> - </span> + </span> --> </td> </tr> </ng-template> diff --git a/src/app/model/bulk-deployment.ts b/src/app/model/bulk-deployment.ts index 718e0c2bfb5e5d011ce37461a73ce0e24fbd5bce..bf8828bb54fb0fa2dfdbfb0ad7cfc50f725979c9 100644 --- a/src/app/model/bulk-deployment.ts +++ b/src/app/model/bulk-deployment.ts @@ -9,6 +9,7 @@ export class BulkDeployment { public state: BulkDeploymentState; public type: BulkType; public details: Map<string, string>; + public parallelDeploymentsLimit: number; } export enum BulkDeploymentState { @@ -16,5 +17,6 @@ export enum BulkDeploymentState { PROCESSING= 'PROCESSING', COMPLETED= 'COMPLETED', FAILED= 'FAILED', - PARTIALLY_FAILED= 'PARTIALLY_FAILED' + PARTIALLY_FAILED= 'PARTIALLY_FAILED', + REMOVED = 'REMOVED' } diff --git a/src/app/model/configuration.ts b/src/app/model/configuration.ts index cdd7538021577c89feb424105293040dc43cd301..3bffd6e8f90421fa78c8e722ece5d6de9b8aeb2d 100644 --- a/src/app/model/configuration.ts +++ b/src/app/model/configuration.ts @@ -9,4 +9,6 @@ export class Configuration { public bulkDomainsAllowForSsoAccounts: boolean; public bulkDomainsSendEmailForNewAccounts: boolean; public appInstanceFailureEmailList: string[] = []; + public bulkDeploymentJobCron: string; + public parallelDeploymentsLimit: number; } diff --git a/src/app/shared/common/domainfilter/domainfilter.component.ts b/src/app/shared/common/domainfilter/domainfilter.component.ts index 0b37d30580bd392f94a21057ddf488afa125b450..bbef4bda7a01842696ec6d3ac4369463704dfd5e 100644 --- a/src/app/shared/common/domainfilter/domainfilter.component.ts +++ b/src/app/shared/common/domainfilter/domainfilter.component.ts @@ -29,6 +29,8 @@ export class DomainFilterComponent implements OnInit { private filteredDomainsSub = new BehaviorSubject<any[]>([]); + private domainsLocal : Domain[] = []; + public filteredDomains = this.filteredDomainsSub.asObservable(); constructor(private authService: AuthService, @@ -63,10 +65,8 @@ export class DomainFilterComponent implements OnInit { } public updateFilter() { - this.domains.subscribe(data => { - const filtered = data.filter(obj => obj.name.toLowerCase().includes(this.searchTerm.toLowerCase())); - this.filteredDomainsSub.next(filtered); - }); + this.filteredDomainsSub.next(this.domainsLocal.filter(obj => obj.name.toLowerCase().includes(this.searchTerm.toLowerCase()))); + } public updateDomains(): void { @@ -122,6 +122,7 @@ export class DomainFilterComponent implements OnInit { if (defaultDomain !== undefined && this.profile.defaultDomain !== globalDomainId) { domains.unshift(defaultDomain) } + this.domainsLocal = domains; return domains } )