Skip to content
Snippets Groups Projects
Commit 5606c554 authored by Lukasz Lopatowski's avatar Lukasz Lopatowski
Browse files

Merge branch '272-improve-new-layout' into 'develop'

Resolve "Improve new layout"

See merge request !188
parents 0a9c7e7b bb241bbb
No related branches found
No related tags found
1 merge request!188Resolve "Improve new layout"
Showing
with 106 additions and 77 deletions
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<div *ngIf="app"> <div *ngIf="app">
<img alt="App logo" [src]="(appImagesService.getAppLogoUrl(appId) | secure) || 'assets/images/app-logo-example.png'" height="90px" width="90px"/> <img alt="App logo" [src]="(appImagesService.getAppLogoUrl(appId) | secure) || 'assets/images/app-logo-example.png'" height="90px" width="90px"/>
</div> </div>
<div *ngIf="!app"> <div *ngIf="!app" style="height:90px; align-content:center;">
<img alt="App logo" src="assets/images/app-logo-example.png" height="90px" width="90px"/> <img alt="App logo" src="assets/images/app-logo-example.png" width="90px"/>
</div> </div>
<h3 style="margin:0 20px;">{{app?.name}}</h3> <h3 style="margin:0 20px;">{{app?.name}}</h3>
</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 style="display: flex; align-items: flex-start; justify-content: space-between; margin-top:20px"> <div style="display: flex; align-items: flex-start; justify-content: space-between; margin-top:20px">
<div style="display:flex; align-items: center;"> <div style="display:flex; align-items: center;">
<span class="p-input-icon-right"> <span class="p-input-icon-right">
...@@ -30,7 +31,7 @@ ...@@ -30,7 +31,7 @@
</div> </div>
</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"> <div *ngIf="selectedOption === 'list'" class="background-section" style="margin-top:30px">
<p-table [value]="appDeployedInstances | async | searchAppInstance: searchValue" <p-table [value]="appDeployedInstances | async | searchAppInstance: searchValue"
[paginator]="true" [paginator]="true"
......
<div class=""> <div class="">
<h4 class="header">{{'APPS_MANAGEMENT.TITLE'| translate}}</h4>
<div style="display:flex; "> <div style="display:flex; margin-top:20px">
<div style="margin-right:20px"> <div style="margin-right:20px">
<span class="p-input-icon-right" style="width: 100%"> <span class="p-input-icon-right" style="width: 100%">
<i class="pi pi-search" style="font-size: 13px; top: 16px; margin-right: 5px;"></i> <i class="pi pi-search" style="font-size: 13px; top: 16px; margin-right: 5px;"></i>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
</div> </div>
<h4 class="header">{{'APPS_MANAGEMENT.TITLE'| translate}}</h4>
<div class="background-section"> <div class="background-section">
<p-table [value]="apps" class="p-datatable-hover p-datatable-sm" [responsive]="true"> <p-table [value]="apps" class="p-datatable-hover p-datatable-sm" [responsive]="true">
<ng-template pTemplate="header"> <ng-template pTemplate="header">
......
<h4 class="header">{{header | translate}}</h4>
<div class=""> <div class="">
<div style="display:flex; "> <div style="display:flex; margin-top:20px">
<div style="margin-right:20px"> <div style="margin-right:20px">
<span class="p-input-icon-right" style="width: 100%"> <span class="p-input-icon-right" style="width: 100%">
<i class="pi pi-search" style="font-size: 13px; top: 16px; margin-right: 5px;"></i> <i class="pi pi-search" style="font-size: 13px; top: 16px; margin-right: 5px;"></i>
...@@ -45,7 +46,7 @@ ...@@ -45,7 +46,7 @@
<p-inputSwitch *ngIf="mode=== bulkTypeApp" id="showDeleted" (onChange)="refreshBulks()" [(ngModel)]="showDeleted" ngDefaultControl/> <p-inputSwitch *ngIf="mode=== bulkTypeApp" id="showDeleted" (onChange)="refreshBulks()" [(ngModel)]="showDeleted" ngDefaultControl/>
</div> </div>
</div> </div>
<h4 class="header">{{header | translate}}</h4>
<!-- <div class="" style="display: flex; justify-content: space-between; margin-top: 10px;">--> <!-- <div class="" style="display: flex; justify-content: space-between; margin-top: 10px;">-->
<!-- <div class="flex">--> <!-- <div class="flex">-->
<!-- <div class="flex align-items-center mr-1">{{ 'BULK.LIST.PER_PAGE' | translate }}:</div>--> <!-- <div class="flex align-items-center mr-1">{{ 'BULK.LIST.PER_PAGE' | translate }}:</div>-->
......
<h4 class="header">{{'DOMAINS.LIST.GROUPS' | translate}}</h4>
<div style="display: flex; align-items: center; margin-top:20px"> <div style="display: flex; align-items: center; margin-top:20px">
<div style="margin-right:20px"> <div style="margin-right:20px">
<span class="p-input-icon-right" style="width: 100%"> <span class="p-input-icon-right" style="width: 100%">
...@@ -10,7 +11,7 @@ ...@@ -10,7 +11,7 @@
role="button">{{'DOMAINS.ADD_BUTTON' | translate}}</button> role="button">{{'DOMAINS.ADD_BUTTON' | translate}}</button>
</div> </div>
</div> </div>
<h4 class="header">{{'DOMAINS.LIST.GROUPS' | translate}}</h4>
<div class="background-section"> <div class="background-section">
......
...@@ -60,3 +60,12 @@ input.ng-dirty.ng-invalid { ...@@ -60,3 +60,12 @@ input.ng-dirty.ng-invalid {
border:none; border:none;
box-shadow: 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;
}
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<div class="form-group" *ngIf="!isInMode(ComponentMode.CREATE) && (authService.hasRole('ROLE_SYSTEM_ADMIN') || authService.hasRole('ROLE_OPERATOR'))"> <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> <label class="col-sm-2 control-label">{{ 'DOMAIN_DETAILS.ID_IN_DB' | translate }}</label>
<div class="col-sm-10"> <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>
</div> </div>
<hr/> <hr/>
...@@ -89,8 +89,8 @@ ...@@ -89,8 +89,8 @@
<div class="form-group" *ngIf="domain?.id !== domainService.getGlobalDomainId() && isInMode(ComponentMode.VIEW) && isManual()"> <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> <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;"> <div class="col-sm-10" id="configured-status" style="padding-top: 6px;">
<p *ngIf="domain?.domainDcnDetails?.dcnConfigured">{{ 'DOMAIN_DETAILS.CONFIGURED_VIEW' | translate }}</p> <p style="padding: 2px 12px" *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.NOT_CONFIGURED_VIEW' | translate }}</p>
</div> </div>
</div> </div>
...@@ -104,11 +104,11 @@ ...@@ -104,11 +104,11 @@
</div> </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> <h4 style="font-size:15px; font-weight: bold">{{ 'DOMAIN_DETAILS.DOMAIN_USERS' | translate }}</h4>
<div class="panel-body"> <div class="panel-body">
<table class="table table-hover table-condensed" aria-describedby="Domains details table"> <table *ngIf="domainUsers.length !== 0" class="table table-hover table-condensed" aria-describedby="Domains details table">
<thead> <thead >
<tr> <tr>
<th scope="col" *roles="['ROLE_SYSTEM_ADMIN']">{{ 'DOMAIN_DETAILS.ID' | translate }}</th> <th scope="col" *roles="['ROLE_SYSTEM_ADMIN']">{{ 'DOMAIN_DETAILS.ID' | translate }}</th>
<th scope="col">{{ 'DOMAIN_DETAILS.USER_NAME' | translate }}</th> <th scope="col">{{ 'DOMAIN_DETAILS.USER_NAME' | translate }}</th>
...@@ -120,9 +120,6 @@ ...@@ -120,9 +120,6 @@
</thead> </thead>
<tbody> <tbody>
<tr *ngIf="domainUsers.length === 0" >
<td colspan="6" style="text-align: center">None</td>
</tr>
<ng-template ngFor let-user [ngForOf]="domainUsers"> <ng-template ngFor let-user [ngForOf]="domainUsers">
<tr> <tr>
<td *ngIf="authService.hasRole('ROLE_SYSTEM_ADMIN')">{{user.id}}</td> <td *ngIf="authService.hasRole('ROLE_SYSTEM_ADMIN')">{{user.id}}</td>
...@@ -145,6 +142,11 @@ ...@@ -145,6 +142,11 @@
</tbody> </tbody>
</table> </table>
<div>
<tr *ngIf="domainUsers.length === 0" >
<td >None</td>
</tr>
</div>
</div> </div>
</div> </div>
...@@ -242,7 +244,7 @@ ...@@ -242,7 +244,7 @@
<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">{{ 'DOMAINS.LIST.GROUP' | translate }}</h4> <h4 style="font-size:15px; font-weight: bold">{{ 'DOMAINS.LIST.GROUP' | translate }}</h4>
<div class="panel-body"> <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> <thead>
<tr> <tr>
<th scope="col">{{ 'DOMAINS.LIST.DOMAIN_NAME' | translate }}</th> <th scope="col">{{ 'DOMAINS.LIST.DOMAIN_NAME' | translate }}</th>
...@@ -251,9 +253,6 @@ ...@@ -251,9 +253,6 @@
</thead> </thead>
<tbody> <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"> <ng-template ngFor let-group [ngForOf]="domain.groups">
<tr> <tr>
<td>{{group.name}}</td> <td>{{group.name}}</td>
...@@ -263,6 +262,9 @@ ...@@ -263,6 +262,9 @@
</tbody> </tbody>
</table> </table>
<div *ngIf="domain.groups.length === 0" >
<p>None</p>
</div>
</div> </div>
</div> </div>
...@@ -270,8 +272,11 @@ ...@@ -270,8 +272,11 @@
<!-- CLUSTER CONFIGURATION READ ONLY PRESENTATION --> <!-- CLUSTER CONFIGURATION READ ONLY PRESENTATION -->
<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">{{ 'CLUSTERS.CONFIGURATION' | translate }}</h4> <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> <label for="clusterId" class="col-sm-2 control-label">{{ 'CLUSTERS.ID' | translate }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" class="form-control" [disabled]="true" id="clusterId " <input type="text" class="form-control" [disabled]="true" id="clusterId "
...@@ -279,7 +284,7 @@ ...@@ -279,7 +284,7 @@
</div> </div>
</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> <label for="clusterName" class="col-sm-2 control-label">{{ 'CLUSTERS.NAME' | translate }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" class="form-control" [disabled]="true" id="clusterName " <input type="text" class="form-control" [disabled]="true" id="clusterName "
...@@ -287,7 +292,7 @@ ...@@ -287,7 +292,7 @@
</div> </div>
</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> <label for="clusterCodeName" class="col-sm-2 control-label">{{ 'CLUSTERS.CODENAME' | translate }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" class="form-control" [disabled]="true" id="clusterCodeName " <input type="text" class="form-control" [disabled]="true" id="clusterCodeName "
...@@ -295,7 +300,7 @@ ...@@ -295,7 +300,7 @@
</div> </div>
</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> <label for="clusterDescription" class="col-sm-2 control-label">{{ 'CLUSTERS.DESCRIPTION' | translate }}</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" class="form-control" [disabled]="true" id="clusterDescription " <input type="text" class="form-control" [disabled]="true" id="clusterDescription "
......
<h4 class="header">{{ 'DOMAINS.TITLE' | translate }}</h4>
<div style="display: flex; align-items: center; margin-top:20px"> <div style="display: flex; align-items: center; margin-top:20px">
<div style="margin-right:20px"> <div style="margin-right:20px">
<span class="p-input-icon-right" style="width: 100%"> <span class="p-input-icon-right" style="width: 100%">
...@@ -18,7 +19,6 @@ ...@@ -18,7 +19,6 @@
<label for="showNotActive"> {{'DOMAINS.NOTACTIVE' | translate}}</label> <label for="showNotActive"> {{'DOMAINS.NOTACTIVE' | translate}}</label>
</div> </div>
</div> </div>
<h4 class="header">{{ 'DOMAINS.TITLE' | translate }}</h4>
<div class="background-section"> <div class="background-section">
<p-table [value]="domains | async | searchDomain: searchValue: showNotActive" <p-table [value]="domains | async | searchDomain: searchValue: showNotActive"
......
<h4 class="header">{{ 'CLUSTERS.CONFIGURATION' | translate }}</h4>
<div style="display: flex; align-items: center; margin-top:20px"> <div style="display: flex; align-items: center; margin-top:20px">
<div style="margin-right:20px"> <div style=" display:flex; align-items: center;">
<div > <div style="margin-right:20px;">
<button class="btn btn-primary" (click)="openModal()">New Cluster</button> <button class="btn btn-primary" (click)="modal.show()">New Cluster</button>
</div> </div>
</div> <span class="p-input-icon-right">
<div class="flex" style="margin-right:20px"> <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>
</div> </div>
<h4 class="header">{{ 'CLUSTERS.CONFIGURATION' | translate }}</h4>
<div class="background-section"> <div class="background-section">
<p-table <p-table
[value]="clusters" [value]="filteredClusters"
[paginator]="true" [paginator]="true"
[rows]="maxItemsOnPage" [rows]="maxItemsOnPage"
[rowsPerPageOptions]="[15, 20, 25, 30, 50]" [rowsPerPageOptions]="[15, 20, 25, 30, 50]"
...@@ -44,11 +47,11 @@ ...@@ -44,11 +47,11 @@
<ng-template pTemplate="body" let-cluster> <ng-template pTemplate="body" let-cluster>
<tr> <tr>
<td [routerLink]="[cluster.id]">{{cluster.id}}</td> <td [routerLink]="[cluster.id]">{{cluster.id}}</td>
<td>{{cluster.name}}</td> <td [routerLink]="[cluster.id]">{{cluster.name}}</td>
<td>{{cluster.codename}}</td> <td [routerLink]="[cluster.id]">{{cluster.codename}}</td>
<td>{{('CLUSTERS.'+cluster.state.toString().toUpperCase() ) | translate}}</td> <td [routerLink]="[cluster.id]">{{('CLUSTERS.'+cluster.state.toString().toUpperCase() ) | translate}}</td>
<td>{{cluster.creationDate | date: 'dd-MM-yyyy HH:mm'}}</td> <td [routerLink]="[cluster.id]">{{cluster.creationDate | date: 'dd-MM-yyyy HH:mm'}}</td>
<td>{{cluster.modificationDate | date: 'dd-MM-yyyy HH:mm'}}</td> <td [routerLink]="[cluster.id]">{{cluster.modificationDate | date: 'dd-MM-yyyy HH:mm'}}</td>
<td class="text-right"> <td class="text-right">
<span class="dropdown"> <span class="dropdown">
<a style="display: inline-block" class="dropdown-toggle" aria-expanded="false" aria-haspopup="true" data-toggle="dropdown" href="#" role="button"> <a style="display: inline-block" class="dropdown-toggle" aria-expanded="false" aria-haspopup="true" data-toggle="dropdown" href="#" role="button">
...@@ -88,7 +91,7 @@ ...@@ -88,7 +91,7 @@
<div class="mt-4"> <div class="mt-4">
<div> <div>
<label for="assignDomain">Assign to domain? </label> <label for="assignDomain">Assign to domain? </label>
<input type="checkbox" [(ngModel)]="assignedDomain" (change)="onDomainChange($event)" id="assignDomain" /> <input type="checkbox" [(ngModel)]="assignedDomain" (change)="onDomainChange($event)" id="assignDomain" />
...@@ -100,8 +103,8 @@ ...@@ -100,8 +103,8 @@
>{{domain.name}} >{{domain.name}}
</option> </option>
</select> </select>
</div> </div>
</div> </div>
...@@ -114,10 +117,11 @@ ...@@ -114,10 +117,11 @@
</div> </div>
</div> </div>
<div class="nmaas-modal-footer"> <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> 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> </div>
</nmaas-modal> </nmaas-modal>
...@@ -14,9 +14,11 @@ export class ClusterManagerComponent { ...@@ -14,9 +14,11 @@ export class ClusterManagerComponent {
public clusters: ClusterManager[] = []; public clusters: ClusterManager[] = [];
public addedCluster: ClusterManager = new ClusterManager(); public addedCluster: ClusterManager = new ClusterManager();
public updatedFile : File = null; public updatedFile: File = null;
public maxItemsOnPage = 15; public maxItemsOnPage = 15;
public assignedDomain: boolean = false; public assignedDomain: boolean = false;
public searchValue = '';
filteredClusters: ClusterManager[] = [];
public domains = []; public domains = [];
...@@ -24,50 +26,47 @@ export class ClusterManagerComponent { ...@@ -24,50 +26,47 @@ export class ClusterManagerComponent {
public modal: ModalComponent; public modal: ModalComponent;
constructor(private clusterService: ClusterManagerService, constructor(private clusterService: ClusterManagerService,
private domainService: DomainService private domainService: DomainService) {
) {
this.getAllClusters(); this.getAllClusters();
this.domainService.getAllBase().subscribe(result => { this.domainService.getAllBase().subscribe(result => {
this.domains = result.filter(d => d.id !== this.domainService.getGlobalDomainId()); this.domains = result.filter(d => d.id !== this.domainService.getGlobalDomainId());
}); });
} }
public saveFile(event: any) { public saveFile(event: any) {
console.log(event); console.log(event);
this.updatedFile =event.files[0]; this.updatedFile = event.files[0];
} }
public getAllClusters() {
this.clusterService.getAllClusters().subscribe(result => {
console.log(result);
this.clusters = result;
})
}
public closeModalAndSaveCluster() { public getAllClusters() {
this.clusterService.sendCluster(this.updatedFile, this.addedCluster).subscribe(result => { this.clusterService.getAllClusters().subscribe(result => {
console.log(result); console.log(result);
this.getAllClusters(); this.clusters = result;
this.modal.hide(); this.filterClusters();
this.updatedFile = null; })
this.addedCluster = new ClusterManager();
}, error => {
console.error(error);
} }
)
} 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) { public onDomainSelection(event: any) {
console.log(event); console.log(event);
this.addedCluster.domainNames = [event] this.addedCluster.domainNames = [event]
} }
public openModal() { public openModal() {
if(this.domains.length > 0) { if (this.domains.length > 0) {
this.addedCluster.domainNames = [this.domains[0].name]; this.addedCluster.domainNames = [this.domains[0].name];
} }
this.modal.show(); this.modal.show();
...@@ -77,4 +76,12 @@ public onDomainChange(event: any) { ...@@ -77,4 +76,12 @@ public onDomainChange(event: any) {
console.log(event); 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)
);
}
} }
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
<!-- </ul>--> <!-- </ul>-->
<!-- </span>--> <!-- </span>-->
<!-- </div>--> <!-- </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)" <div *ngIf="isModeAllowed(ComponentMode.EDIT)"
style="margin-right: 15px; padding-top: 5px;"> {{'USERS.SEARCH' | translate}}</div> style="margin-right: 15px; padding-top: 5px;"> {{'USERS.SEARCH' | translate}}</div>
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
</button> </button>
</div> </div>
<h4 class="header"> {{ 'USERS.TITLE' | translate }}</h4>
<div class="background-section"> <div class="background-section">
<p-table #dt [value]="displayUsers" [paginator]="true" [rows]="maxItemsOnPage" <p-table #dt [value]="displayUsers" [paginator]="true" [rows]="maxItemsOnPage"
[rowsPerPageOptions]="[15, 20, 25, 30, 50]" > [rowsPerPageOptions]="[15, 20, 25, 30, 50]" >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment