Improvements in client view

pull/7/head opengnsys_devel-0.0.10
Manuel Aranda Rosales 2024-11-20 18:41:25 +01:00
commit 7a097cb0d7
3 changed files with 26 additions and 9 deletions

View File

@ -26,10 +26,14 @@ pipeline {
} else {
LATEST_ID = "${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-latest"
}
env.IMAGE_ID_TESTING = IMAGE_ID_TESTING
env.IMAGE_ID = IMAGE_ID
env.LATEST_ID = LATEST_ID
docker.build("${IMAGE_ID_TESTING}", "-f Dockerfile-testing .")
if (env.TAG_NAME) {
TAG_ID = "${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${env.TAG_NAME}"
}
}
}
}
@ -51,6 +55,9 @@ pipeline {
dir('ogWebconsole') {
docker.build("${IMAGE_ID}", "-f Dockerfile .")
docker.build("${LATEST_ID}", "-f Dockerfile .")
if (env.TAG_NAME) {
docker.build("${TAG_ID}", "-f Dockerfile .")
}
}
}
}
@ -62,6 +69,9 @@ pipeline {
docker.withRegistry('https://index.docker.io/v1/', 'docker-hub-credentials') {
docker.image("${IMAGE_ID}").push()
docker.image("${LATEST_ID}").push()
if (env.TAG_NAME) {
docker.image("${TAG_ID}").push()
}
}
}
}

View File

@ -134,7 +134,7 @@
'card-off': result.status === 'off'
}">
<mat-checkbox
[checked]="isSelected(result.name)"
[(ngModel)]="result.selected"
(change)="onCheckboxChange($event, result.name, result['@id'])"
class="result-checkbox">
</mat-checkbox>
@ -158,7 +158,7 @@
<ng-container *ngIf="viewMode === 'list'">
<div class="result-list" *ngFor="let result of filteredResults">
<mat-card class="result-card-list">
<mat-checkbox [checked]="isSelected(result.name)" (change)="onCheckboxChange($event, result.name, result['@id'])" class="result-checkbox"></mat-checkbox>
<mat-checkbox [(ngModel)]="result.selected" (change)="onCheckboxChange($event, result.name, result['@id'])" class="result-checkbox"></mat-checkbox>
<mat-card-title class="result-title">{{ result.name }}</mat-card-title>
<mat-card-content class="result-content">
<p class="result-type">{{ result.type !== 'client' ? result.type : '' }}</p>

View File

@ -25,7 +25,6 @@ import {
} from "../../../ogboot/pxe-boot-files/create-pxeBootFile/create-pxe-boot-file/create-pxe-boot-file.component";
import { JoyrideService } from 'ngx-joyride';
@Component({
selector: 'app-advanced-search',
templateUrl: './advanced-search.component.html',
@ -390,29 +389,37 @@ export class AdvancedSearchComponent {
}
onCheckboxChange(event: any, name: string, uuid: string) {
if (event.checked) {
this.selectedElements.push(uuid);
if (!this.selectedElements.includes(uuid)) {
this.selectedElements.push(uuid);
}
} else {
const index = this.selectedElements.indexOf(name);
const index = this.selectedElements.indexOf(uuid);
if (index > -1) {
this.selectedElements.splice(index, 1);
}
}
this.isAllSelected = this.selectedElements.length === this.filteredResults.length;
this.isAllSelected = this.filteredResults.every(result =>
this.selectedElements.includes(result['@id'])
);
}
toggleSelectAll() {
this.isAllSelected = !this.isAllSelected;
if (this.isAllSelected) {
this.selectedElements = this.filteredResults.map(result => result['@id']);
} else {
this.selectedElements = [];
}
this.filteredResults.forEach(result => {
result.selected = this.isAllSelected;
});
}
isSelected(name: string): boolean {
return this.selectedElements.includes(name);