diff --git a/src/app/appmarket/appdetails/appdetails.component.html b/src/app/appmarket/appdetails/appdetails.component.html index 54d16fe6121cbe94c43871d756f13e849f26131b..84a279b8bd71666a613faaec2130853ef7f05187 100644 --- a/src/app/appmarket/appdetails/appdetails.component.html +++ b/src/app/appmarket/appdetails/appdetails.component.html @@ -4,8 +4,8 @@ <div *ngIf="app"> <img alt="App logo" [src]="(appImagesService.getAppLogoUrl(appId) | secure) || 'assets/images/app-logo-example.png'" height="90px" width="90px"/> </div> - <div *ngIf="!app"> - <img alt="App logo" src="assets/images/app-logo-example.png" height="90px" width="90px"/> + <div *ngIf="!app" style="height:90px; align-content:center;"> + <img alt="App logo" src="assets/images/app-logo-example.png" width="90px"/> </div> <h3 style="margin:0 20px;">{{app?.name}}</h3> </div> diff --git a/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.html b/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.html index 7af02f7f4a03f7036cea696cf1beb791583dcfca..ad6b14bde6f734117414ebba9a418c2082d80a08 100644 --- a/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.html +++ b/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.html @@ -1,3 +1,4 @@ +<h4 style="margin-top:40px; font-weight: bold" *roles="['ROLE_DOMAIN_ADMIN', 'ROLE_SYSTEM_ADMIN', 'ROLE_OPERATOR']">{{ 'APP_INSTANCES.DEPLOYED' | translate }}</h4> <div style="display: flex; align-items: flex-start; justify-content: space-between; margin-top:20px"> <div style="display:flex; align-items: center;"> <span class="p-input-icon-right"> @@ -30,7 +31,7 @@ </div> </div> -<h4 style="margin-top:40px; font-weight: bold" *roles="['ROLE_DOMAIN_ADMIN', 'ROLE_SYSTEM_ADMIN', 'ROLE_OPERATOR']">{{ 'APP_INSTANCES.DEPLOYED' | translate }}</h4> + <div *ngIf="selectedOption === 'list'" class="background-section" style="margin-top:30px"> <p-table [value]="appDeployedInstances | async | searchAppInstance: searchValue" [paginator]="true" diff --git a/src/app/appmarket/appmanagement/app-management-list/appmanagementlist.component.html b/src/app/appmarket/appmanagement/app-management-list/appmanagementlist.component.html index 7e8d834530f8f244b5d9b753bf615e8c233585f3..4da61abe74b4013dd4a299a3c077232501b46c3b 100644 --- a/src/app/appmarket/appmanagement/app-management-list/appmanagementlist.component.html +++ b/src/app/appmarket/appmanagement/app-management-list/appmanagementlist.component.html @@ -1,6 +1,6 @@ <div class=""> - - <div style="display:flex; "> + <h4 class="header">{{'APPS_MANAGEMENT.TITLE'| translate}}</h4> + <div style="display:flex; margin-top:20px"> <div style="margin-right:20px"> <span class="p-input-icon-right" style="width: 100%"> <i class="pi pi-search" style="font-size: 13px; top: 16px; margin-right: 5px;"></i> @@ -13,7 +13,7 @@ </div> </div> - <h4 class="header">{{'APPS_MANAGEMENT.TITLE'| translate}}</h4> + <div class="background-section"> <p-table [value]="apps" class="p-datatable-hover p-datatable-sm" [responsive]="true"> <ng-template pTemplate="header"> 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 12193d91f3eca3136117ab24d974b7f601788fd3..8decfa4258af09c0bf3711aea82531e3afb9f8f6 100644 --- a/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.html +++ b/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.html @@ -1,5 +1,6 @@ +<h4 class="header">{{header | translate}}</h4> <div class=""> - <div style="display:flex; "> + <div style="display:flex; margin-top:20px"> <div style="margin-right:20px"> <span class="p-input-icon-right" style="width: 100%"> <i class="pi pi-search" style="font-size: 13px; top: 16px; margin-right: 5px;"></i> @@ -45,7 +46,7 @@ <p-inputSwitch *ngIf="mode=== bulkTypeApp" id="showDeleted" (onChange)="refreshBulks()" [(ngModel)]="showDeleted" ngDefaultControl/> </div> </div> - <h4 class="header">{{header | translate}}</h4> + <!-- <div class="" style="display: flex; justify-content: space-between; margin-top: 10px;">--> <!-- <div class="flex">--> <!-- <div class="flex align-items-center mr-1">{{ 'BULK.LIST.PER_PAGE' | translate }}:</div>--> diff --git a/src/app/appmarket/domains/domain-groups/domain-groups.component.html b/src/app/appmarket/domains/domain-groups/domain-groups.component.html index efb93d02f427a779d9da5f9bae983f15903f8b7a..7c248d9eca24b83a4da23ce73ede18f41cb27286 100644 --- a/src/app/appmarket/domains/domain-groups/domain-groups.component.html +++ b/src/app/appmarket/domains/domain-groups/domain-groups.component.html @@ -1,3 +1,4 @@ +<h4 class="header">{{'DOMAINS.LIST.GROUPS' | translate}}</h4> <div style="display: flex; align-items: center; margin-top:20px"> <div style="margin-right:20px"> <span class="p-input-icon-right" style="width: 100%"> @@ -10,7 +11,7 @@ role="button">{{'DOMAINS.ADD_BUTTON' | translate}}</button> </div> </div> -<h4 class="header">{{'DOMAINS.LIST.GROUPS' | translate}}</h4> + <div class="background-section"> diff --git a/src/app/appmarket/domains/domain/domain.component.css b/src/app/appmarket/domains/domain/domain.component.css index 5bcb6ebc246def5aa232ad2b49d95b88155ff827..909509957b84d6195fc61eb40886efcb631af82b 100644 --- a/src/app/appmarket/domains/domain/domain.component.css +++ b/src/app/appmarket/domains/domain/domain.component.css @@ -60,3 +60,12 @@ input.ng-dirty.ng-invalid { border:none; box-shadow: none; } +.form-control[disabled], +fieldset[disabled] .form-control { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: transparent; + border:none; + box-shadow: none; +} diff --git a/src/app/appmarket/domains/domain/domain.component.html b/src/app/appmarket/domains/domain/domain.component.html index 4a2bbc075ab0ad2e7b678bf928a993939e976c2b..c2a9838660c4332d4237edfcb336bc4748e94e2c 100644 --- a/src/app/appmarket/domains/domain/domain.component.html +++ b/src/app/appmarket/domains/domain/domain.component.html @@ -36,7 +36,7 @@ <div class="form-group" *ngIf="!isInMode(ComponentMode.CREATE) && (authService.hasRole('ROLE_SYSTEM_ADMIN') || authService.hasRole('ROLE_OPERATOR'))"> <label class="col-sm-2 control-label">{{ 'DOMAIN_DETAILS.ID_IN_DB' | translate }}</label> <div class="col-sm-10"> - <p class="form-control-static">{{domain.id}}</p> + <p class="form-control-static" style="padding: 6px 12px">{{domain.id}}</p> </div> </div> <hr/> @@ -89,8 +89,8 @@ <div class="form-group" *ngIf="domain?.id !== domainService.getGlobalDomainId() && isInMode(ComponentMode.VIEW) && isManual()"> <label class="col-sm-2 control-label text-right" for="configured-status">{{ 'DOMAIN_DETAILS.DCN_STATUS' | translate }}</label> <div class="col-sm-10" id="configured-status" style="padding-top: 6px;"> - <p *ngIf="domain?.domainDcnDetails?.dcnConfigured">{{ 'DOMAIN_DETAILS.CONFIGURED_VIEW' | translate }}</p> - <p *ngIf="!domain?.domainDcnDetails?.dcnConfigured">{{ 'DOMAIN_DETAILS.NOT_CONFIGURED_VIEW' | translate }}</p> + <p style="padding: 2px 12px" *ngIf="domain?.domainDcnDetails?.dcnConfigured">{{ 'DOMAIN_DETAILS.CONFIGURED_VIEW' | translate }}</p> + <p style="padding: 2px 12px" *ngIf="!domain?.domainDcnDetails?.dcnConfigured">{{ 'DOMAIN_DETAILS.NOT_CONFIGURED_VIEW' | translate }}</p> </div> </div> @@ -104,11 +104,11 @@ </div> - <div class="background-section" *ngIf="isInMode(ComponentMode.VIEW) && !authService.hasRole('ROLE_OPERATOR')"> + <div class="background-section" *ngIf="isInMode(ComponentMode.VIEW) && !authService.hasRole('ROLE_OPERATOR')"> <h4 style="font-size:15px; font-weight: bold">{{ 'DOMAIN_DETAILS.DOMAIN_USERS' | translate }}</h4> - <div class="panel-body"> - <table class="table table-hover table-condensed" aria-describedby="Domains details table"> - <thead> + <div class="panel-body"> + <table *ngIf="domainUsers.length !== 0" class="table table-hover table-condensed" aria-describedby="Domains details table"> + <thead > <tr> <th scope="col" *roles="['ROLE_SYSTEM_ADMIN']">{{ 'DOMAIN_DETAILS.ID' | translate }}</th> <th scope="col">{{ 'DOMAIN_DETAILS.USER_NAME' | translate }}</th> @@ -120,9 +120,6 @@ </thead> <tbody> - <tr *ngIf="domainUsers.length === 0" > - <td colspan="6" style="text-align: center">None</td> - </tr> <ng-template ngFor let-user [ngForOf]="domainUsers"> <tr> <td *ngIf="authService.hasRole('ROLE_SYSTEM_ADMIN')">{{user.id}}</td> @@ -145,6 +142,11 @@ </tbody> </table> + <div> + <tr *ngIf="domainUsers.length === 0" > + <td >None</td> + </tr> + </div> </div> </div> @@ -242,7 +244,7 @@ <div class="background-section" *ngIf="isInMode(ComponentMode.VIEW) && !authService.hasRole('ROLE_OPERATOR')"> <h4 style="font-size:15px; font-weight: bold">{{ 'DOMAINS.LIST.GROUP' | translate }}</h4> <div class="panel-body"> - <table class="table table-hover table-condensed" aria-describedby="Domain group list"> + <table *ngIf="domain.groups.length !== 0" class="table table-hover table-condensed" aria-describedby="Domain group list"> <thead> <tr> <th scope="col">{{ 'DOMAINS.LIST.DOMAIN_NAME' | translate }}</th> @@ -251,9 +253,6 @@ </thead> <tbody> - <tr *ngIf="domain.groups.length === 0" > - <td colspan="6" style="text-align: center">None</td> - </tr> <ng-template ngFor let-group [ngForOf]="domain.groups"> <tr> <td>{{group.name}}</td> @@ -263,6 +262,9 @@ </tbody> </table> + <div *ngIf="domain.groups.length === 0" > + <p>None</p> + </div> </div> </div> @@ -270,8 +272,11 @@ <!-- CLUSTER CONFIGURATION READ ONLY PRESENTATION --> <div class="background-section" *ngIf="isInMode(ComponentMode.VIEW) && !authService.hasRole('ROLE_OPERATOR')"> <h4 style="font-size:15px; font-weight: bold">{{ 'CLUSTERS.CONFIGURATION' | translate }}</h4> + <div class="panel-body" *ngIf="domain.clusters.length === 0" > + <p>None</p> + </div> - <div class="form-group" *ngIf="domain.clusters.length >0"> + <div class="form-group panel-body" *ngIf="domain.clusters.length >0"> <label for="clusterId" class="col-sm-2 control-label">{{ 'CLUSTERS.ID' | translate }}</label> <div class="col-sm-10"> <input type="text" class="form-control" [disabled]="true" id="clusterId " @@ -279,7 +284,7 @@ </div> </div> - <div class="form-group" *ngIf="domain.clusters.length >0"> + <div class="form-group panel-body" *ngIf="domain.clusters.length >0"> <label for="clusterName" class="col-sm-2 control-label">{{ 'CLUSTERS.NAME' | translate }}</label> <div class="col-sm-10"> <input type="text" class="form-control" [disabled]="true" id="clusterName " @@ -287,7 +292,7 @@ </div> </div> - <div class="form-group" *ngIf="domain.clusters.length >0"> + <div class="form-group panel-body" *ngIf="domain.clusters.length >0"> <label for="clusterCodeName" class="col-sm-2 control-label">{{ 'CLUSTERS.CODENAME' | translate }}</label> <div class="col-sm-10"> <input type="text" class="form-control" [disabled]="true" id="clusterCodeName " @@ -295,7 +300,7 @@ </div> </div> - <div class="form-group" *ngIf="domain.clusters.length >0"> + <div class="form-group panel-body" *ngIf="domain.clusters.length >0"> <label for="clusterDescription" class="col-sm-2 control-label">{{ 'CLUSTERS.DESCRIPTION' | translate }}</label> <div class="col-sm-10"> <input type="text" class="form-control" [disabled]="true" id="clusterDescription " diff --git a/src/app/appmarket/domains/list/domainslist.component.html b/src/app/appmarket/domains/list/domainslist.component.html index 737b5a4dfb94e75897073c3dc57ac81d1b10d2b3..865e3f591d22610fe325303cb271ddd80a2a2e54 100644 --- a/src/app/appmarket/domains/list/domainslist.component.html +++ b/src/app/appmarket/domains/list/domainslist.component.html @@ -1,3 +1,4 @@ +<h4 class="header">{{ 'DOMAINS.TITLE' | translate }}</h4> <div style="display: flex; align-items: center; margin-top:20px"> <div style="margin-right:20px"> <span class="p-input-icon-right" style="width: 100%"> @@ -18,7 +19,6 @@ <label for="showNotActive"> {{'DOMAINS.NOTACTIVE' | translate}}</label> </div> </div> - <h4 class="header">{{ 'DOMAINS.TITLE' | translate }}</h4> <div class="background-section"> <p-table [value]="domains | async | searchDomain: searchValue: showNotActive" diff --git a/src/app/shared/admin/clusters/manager/manager.component.html b/src/app/shared/admin/clusters/manager/manager.component.html index d96ff9d9d7c82616ba82f4b5f2f1ac05b7344b91..fbced4c7777792ce92c21edf168687483bd954cd 100644 --- a/src/app/shared/admin/clusters/manager/manager.component.html +++ b/src/app/shared/admin/clusters/manager/manager.component.html @@ -1,19 +1,22 @@ +<h4 class="header">{{ 'CLUSTERS.CONFIGURATION' | translate }}</h4> <div style="display: flex; align-items: center; margin-top:20px"> - <div style="margin-right:20px"> - <div > - <button class="btn btn-primary" (click)="openModal()">New Cluster</button> + <div style=" display:flex; align-items: center;"> + <div style="margin-right:20px;"> + <button class="btn btn-primary" (click)="modal.show()">New Cluster</button> </div> - </div> - <div class="flex" style="margin-right:20px"> - + <span class="p-input-icon-right"> + <i class="pi pi-search" style="font-size: 13px; top: 16px; margin-right: 5px;"></i> + <input pInputText class="form-control" name="search" id="search" + placeholder="Search" type="text" [(ngModel)]="searchValue" (ngModelChange)="filterClusters()"> + </span> </div> </div> - <h4 class="header">{{ 'CLUSTERS.CONFIGURATION' | translate }}</h4> + <div class="background-section"> <p-table - [value]="clusters" + [value]="filteredClusters" [paginator]="true" [rows]="maxItemsOnPage" [rowsPerPageOptions]="[15, 20, 25, 30, 50]" @@ -44,11 +47,11 @@ <ng-template pTemplate="body" let-cluster> <tr> <td [routerLink]="[cluster.id]">{{cluster.id}}</td> - <td>{{cluster.name}}</td> - <td>{{cluster.codename}}</td> - <td>{{('CLUSTERS.'+cluster.state.toString().toUpperCase() ) | translate}}</td> - <td>{{cluster.creationDate | date: 'dd-MM-yyyy HH:mm'}}</td> - <td>{{cluster.modificationDate | date: 'dd-MM-yyyy HH:mm'}}</td> + <td [routerLink]="[cluster.id]">{{cluster.name}}</td> + <td [routerLink]="[cluster.id]">{{cluster.codename}}</td> + <td [routerLink]="[cluster.id]">{{('CLUSTERS.'+cluster.state.toString().toUpperCase() ) | translate}}</td> + <td [routerLink]="[cluster.id]">{{cluster.creationDate | date: 'dd-MM-yyyy HH:mm'}}</td> + <td [routerLink]="[cluster.id]">{{cluster.modificationDate | date: 'dd-MM-yyyy HH:mm'}}</td> <td class="text-right"> <span class="dropdown"> <a style="display: inline-block" class="dropdown-toggle" aria-expanded="false" aria-haspopup="true" data-toggle="dropdown" href="#" role="button"> @@ -88,7 +91,7 @@ <div class="mt-4"> - + <div> <label for="assignDomain">Assign to domain? </label> <input type="checkbox" [(ngModel)]="assignedDomain" (change)="onDomainChange($event)" id="assignDomain" /> @@ -100,8 +103,8 @@ >{{domain.name}} </option> </select> - </div> - + </div> + </div> @@ -114,10 +117,11 @@ </div> </div> <div class="nmaas-modal-footer"> - <button type="button" class="btn btn-primary" [disabled]="updatedFile === null || addedCluster?.name === null || addedCluster?.description === null"(click)="closeModalAndSaveCluster()" + <button type="button" class="btn btn-secondary" + (click)="this.modal.hide()">{{'UNDEPLOY_MODAL.CANCEL_BUTTON' | translate}}</button> + <button type="button" class="btn btn-primary" [disabled]="updatedFile === null || addedCluster?.name === null || addedCluster?.description === null"(click)="closeModalAndSaveCluster()" pTooltip="Upload file is required before save" showDelay="2000" >{{'CLUSTERS.SAVE' | translate}}</button> - <button type="button" class="btn btn-secondary" - (click)="this.modal.hide()">{{'UNDEPLOY_MODAL.CANCEL_BUTTON' | translate}}</button> + </div> </nmaas-modal> diff --git a/src/app/shared/admin/clusters/manager/manager.component.ts b/src/app/shared/admin/clusters/manager/manager.component.ts index 3a38ba79f26ad9226bb0ef04f0e9df0ead0bc59e..1e8c8938bca5d9ab01c66b444b5aad8142e7e4c7 100644 --- a/src/app/shared/admin/clusters/manager/manager.component.ts +++ b/src/app/shared/admin/clusters/manager/manager.component.ts @@ -14,9 +14,11 @@ export class ClusterManagerComponent { public clusters: ClusterManager[] = []; public addedCluster: ClusterManager = new ClusterManager(); - public updatedFile : File = null; + public updatedFile: File = null; public maxItemsOnPage = 15; public assignedDomain: boolean = false; + public searchValue = ''; + filteredClusters: ClusterManager[] = []; public domains = []; @@ -24,50 +26,47 @@ export class ClusterManagerComponent { public modal: ModalComponent; constructor(private clusterService: ClusterManagerService, - private domainService: DomainService - ) { + private domainService: DomainService) { this.getAllClusters(); this.domainService.getAllBase().subscribe(result => { this.domains = result.filter(d => d.id !== this.domainService.getGlobalDomainId()); }); } - public saveFile(event: any) { - console.log(event); - this.updatedFile =event.files[0]; - } - -public getAllClusters() { - this.clusterService.getAllClusters().subscribe(result => { - console.log(result); - this.clusters = result; - }) - } + public saveFile(event: any) { + console.log(event); + this.updatedFile = event.files[0]; + } -public closeModalAndSaveCluster() { - this.clusterService.sendCluster(this.updatedFile, this.addedCluster).subscribe(result => { - console.log(result); - this.getAllClusters(); - this.modal.hide(); - this.updatedFile = null; - this.addedCluster = new ClusterManager(); - }, error => { - console.error(error); - + public getAllClusters() { + this.clusterService.getAllClusters().subscribe(result => { + console.log(result); + this.clusters = result; + this.filterClusters(); + }) } -) -} + + public closeModalAndSaveCluster() { + this.clusterService.sendCluster(this.updatedFile, this.addedCluster).subscribe(result => { + console.log(result); + this.getAllClusters(); + this.modal.hide(); + this.updatedFile = null; + this.addedCluster = new ClusterManager(); + }, error => { + console.error(error); + }) + } public onDomainSelection(event: any) { console.log(event); this.addedCluster.domainNames = [event] - } public openModal() { - if(this.domains.length > 0) { + if (this.domains.length > 0) { this.addedCluster.domainNames = [this.domains[0].name]; } this.modal.show(); @@ -77,4 +76,12 @@ public onDomainChange(event: any) { console.log(event); } + filterClusters() { + const value = this.searchValue?.toLowerCase() || ''; + this.filteredClusters = this.clusters.filter(cluster => + cluster.name?.toLowerCase().includes(value) || + cluster.codename?.toLowerCase().includes(value) || + cluster.id?.toString().includes(value) + ); + } } diff --git a/src/app/shared/users/list/userslist.component.html b/src/app/shared/users/list/userslist.component.html index 1425e8fbea2febe1660e17df5d2182d18036a7e0..4f27e95daa33c87868ada58f862ead350493eb0b 100644 --- a/src/app/shared/users/list/userslist.component.html +++ b/src/app/shared/users/list/userslist.component.html @@ -42,7 +42,8 @@ <!-- </ul>--> <!-- </span>--> <!-- </div>--> -<div class="" style="display: flex"> +<h4 class="header"> {{ 'USERS.TITLE' | translate }}</h4> +<div class="" style="display: flex; margin-top:20px"> <div *ngIf="isModeAllowed(ComponentMode.EDIT)" style="margin-right: 15px; padding-top: 5px;"> {{'USERS.SEARCH' | translate}}</div> @@ -65,7 +66,7 @@ </button> </div> - <h4 class="header"> {{ 'USERS.TITLE' | translate }}</h4> + <div class="background-section"> <p-table #dt [value]="displayUsers" [paginator]="true" [rows]="maxItemsOnPage" [rowsPerPageOptions]="[15, 20, 25, 30, 50]" >