diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index 7a6e18d..ec122db 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -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() + } } } } diff --git a/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.html b/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.html index 75afd03..28a1230 100644 --- a/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.html +++ b/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.html @@ -134,7 +134,7 @@ 'card-off': result.status === 'off' }"> @@ -158,7 +158,7 @@
- + {{ result.name }}

{{ result.type !== 'client' ? result.type : '' }}

diff --git a/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.ts b/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.ts index b7e1385..72ff339 100644 --- a/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.ts +++ b/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.ts @@ -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);