From 4904e40a4980cdec6e62c7a70914c2d2ddffe091 Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Tue, 22 Oct 2024 18:29:57 +0200 Subject: [PATCH 01/19] refs #690. ogBoot status changes. Added ogLive in client --- .../pxe-boot-files.component.css | 143 ++++++++++-------- .../pxe-boot-files.component.html | 40 ++--- .../pxe-boot-files.component.ts | 22 +-- .../ogboot/pxe/clients/clients.component.html | 1 + .../ogboot/pxe/clients/clients.component.ts | 29 +++- 5 files changed, 123 insertions(+), 112 deletions(-) diff --git a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.css b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.css index 833284d..71b0af9 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.css +++ b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.css @@ -1,70 +1,83 @@ -.global-selectors { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 15px; - gap: 10px; -} - -.global-selectors mat-form-field { - flex: 1; - margin-right: 10px; -} - -.global-selectors button { - height: 40px; - padding: 0 20px; -} - -.filters-container { - display: flex; - justify-content: space-between; - align-items: flex-end; - gap: 10px; - margin-bottom: 15px; -} - -.filters-container mat-form-field { - flex: 1; -} - -.mat-elevation-z8 { - margin-top: 15px; -} - -.mat-table { - width: 100%; -} - -mat-header-cell, mat-cell { - text-align: center; - font-size: 14px; - padding: 8px; -} - -mat-form-field { - width: 100%; -} - -.mat-paginator { - margin-top: 20px; - display: flex; - justify-content: center; -} - -mat-select, mat-input { - font-size: 14px; -} - -.mat-form-field-appearance-fill .mat-form-field-flex { - padding: 8px 0; -} - -button.mat-flat-button { - padding: 8px 16px; - font-size: 14px; +.title { + font-size: 24px; } .divider { margin: 20px 0; } + +table { + width: 100%; + margin-top: 50px; +} + +.search-container { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + padding: 0 5px; + box-sizing: border-box; +} + +.global-selectors { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; + padding: 0 5px; +} + +.selected-global { + width: 450px; +} + +.search-string { + flex: 2; + padding: 5px; +} + +.search-boolean { + flex: 1; + padding: 5px; +} + +.save-button{ + justify-self: end; +} + +.header-container { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px; +} + +.mat-elevation-z8 { + box-shadow: 0px 0px 0px rgba(0,0,0,0.2); +} + +.paginator-container { + display: flex; + justify-content: end; + margin-bottom: 30px; +} + +.example-headers-align .mat-expansion-panel-header-description { + justify-content: space-between; + align-items: center; +} + +.example-headers-align .mat-mdc-form-field + .mat-mdc-form-field { + margin-left: 8px; +} + +.example-button-row { + display: table-cell; + max-width: 600px; +} + +.example-button-row .mat-mdc-button-base { + margin: 8px 8px 8px 0; +} + diff --git a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.html b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.html index 6f7b636..0b161ad 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.html +++ b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.html @@ -1,21 +1,10 @@ - - - - Sincronización ogBoot - - -
- -
-
-
-

Administrar ficheros de arranque PXE

+

Netboot avanzado

-
- +
+ Selecciona Unidad Organizacional Cargando unidades... @@ -26,7 +15,7 @@ Este campo es obligatorio - + Selecciona aula No hay aulas disponibles @@ -40,14 +29,14 @@
- - Global ogLive - + + Seleccione plantilla para aplicar a todos los clientes + {{ option.name }} - +
@@ -75,19 +64,8 @@
- + - -
- -
- - - \ No newline at end of file diff --git a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.ts b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.ts index 5fefbe3..e88153e 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.ts +++ b/ogWebconsole/src/app/components/ogboot/pxe-boot-files/pxe-boot-files.component.ts @@ -3,6 +3,8 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; import { ToastrService } from 'ngx-toastr'; import { PageEvent } from '@angular/material/paginator'; +import {Observable} from "rxjs"; +import {ServerInfoDialogComponent} from "../../ogdhcp/og-dhcp-subnets/server-info-dialog/server-info-dialog.component"; @Component({ selector: 'app-pxe-boot-files', @@ -26,6 +28,7 @@ export class PxeBootFilesComponent implements OnInit { filters: any = {}; displayedColumns: string[] = ['id', 'name', 'ogLive']; + constructor( private fb: FormBuilder, private http: HttpClient, @@ -73,14 +76,14 @@ export class PxeBootFilesComponent implements OnInit { onOrganizationalUnitChange(): void { const selectedUnitId = this.taskForm.get('organizationalUnit')?.value; const selectedUnit = this.availableOrganizationalUnits.find(unit => unit['@id'] === selectedUnitId); - + if (selectedUnit) { this.selectedUnitChildren = this.getAllClassrooms(selectedUnit); } else { this.selectedUnitChildren = []; } } - + getAllClassrooms(unit: any): any[] { let classrooms: any[] = []; if (unit.type === 'classroom') { @@ -93,7 +96,7 @@ export class PxeBootFilesComponent implements OnInit { } return classrooms; } - + onChildChange(): void { const selectedChildId = this.taskForm.get('selectedChild')?.value; @@ -107,7 +110,7 @@ export class PxeBootFilesComponent implements OnInit { this.dataSource = []; } } - + applyToAll(): void { this.dataSource = this.dataSource.map(client => ({ @@ -152,15 +155,4 @@ export class PxeBootFilesComponent implements OnInit { this.itemsPerPage = event.pageSize; this.fetchPxeTemplates(); } - - syncOgCore(): void { - this.http.post(`${this.baseUrl}/sync`, {}).subscribe( - () => { - this.toastService.success('Sincronización completada'); - }, - error => { - this.toastService.error('Error al sincronizar'); - } - ); - } } diff --git a/ogWebconsole/src/app/components/ogboot/pxe/clients/clients.component.html b/ogWebconsole/src/app/components/ogboot/pxe/clients/clients.component.html index ced1090..8f189f9 100644 --- a/ogWebconsole/src/app/components/ogboot/pxe/clients/clients.component.html +++ b/ogWebconsole/src/app/components/ogboot/pxe/clients/clients.component.html @@ -10,6 +10,7 @@
{{ client.mac }}
+
@@ -43,12 +43,21 @@ Acciones - - - - + + + + + + + diff --git a/ogWebconsole/src/app/components/groups/components/organizational-unit-tab-view/organizational-unit-tab-view.component.ts b/ogWebconsole/src/app/components/groups/components/organizational-unit-tab-view/organizational-unit-tab-view.component.ts index 20829c4..f357c6a 100644 --- a/ogWebconsole/src/app/components/groups/components/organizational-unit-tab-view/organizational-unit-tab-view.component.ts +++ b/ogWebconsole/src/app/components/groups/components/organizational-unit-tab-view/organizational-unit-tab-view.component.ts @@ -19,6 +19,8 @@ import { import { EditOrganizationalUnitComponent } from "../../shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component"; +import {ClassroomViewDialogComponent} from "../../shared/classroom-view/classroom-view-modal"; +import {TreeViewComponent} from "../../shared/tree-view/tree-view.component"; @Component({ selector: 'app-organizational-unit-tab-view', @@ -84,6 +86,18 @@ export class OrganizationalUnitTabViewComponent { this.getOrganizationalUnits(); } + roomMap(room: any): void { + console.log(room) + const dialogRef = this.dialog.open(ClassroomViewDialogComponent, { + width: '90vw', + data: { clients: room.clients } + }); + } + + onTreeClick(data: any): void { + const dialogRef = this.dialog.open(TreeViewComponent, { data: { data }, width: '800px'}); + } + getOrganizationalUnits() { this.http.get(`${this.apiUrl}?&page=${this.page + 1}&itemsPerPage=${this.itemsPerPage}`, { params: this.filters }).subscribe( (data) => { diff --git a/ogWebconsole/src/app/components/groups/groups.component.css b/ogWebconsole/src/app/components/groups/groups.component.css index 75ece2f..874351f 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.css +++ b/ogWebconsole/src/app/components/groups/groups.component.css @@ -21,7 +21,11 @@ } .header-container { + display: flex; + justify-content: space-between; + align-items: center; height: 100px; + padding: 10px; } .unidad-card, .elements-card { @@ -29,6 +33,7 @@ background-color: #fafafa; height: 600px; overflow-y: auto; + box-shadow: none !important; } .element-content { @@ -71,11 +76,7 @@ mat-card-subtitle a:hover { .groups-button-row { display: flex; - flex-grow: 1; gap: 10px; - margin-bottom: 20px; - margin-left: 10px; - margin-top: 10px; } .item-content { diff --git a/ogWebconsole/src/app/components/groups/groups.component.html b/ogWebconsole/src/app/components/groups/groups.component.html index 3ef2f06..2c73dec 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.html +++ b/ogWebconsole/src/app/components/groups/groups.component.html @@ -8,14 +8,9 @@
-
-
- -
-
- Unidad organizativa + Centros @@ -82,7 +77,7 @@
- Elementos internos + {{ crumb }} diff --git a/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view-modal.ts b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view-modal.ts index b32d75b..b55a0e7 100644 --- a/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view-modal.ts +++ b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view-modal.ts @@ -4,7 +4,7 @@ import { MAT_DIALOG_DATA } from '@angular/material/dialog'; @Component({ selector: 'app-classroom-view-dialog', template: ` -

Plano de {{ classroomName }}

+

Plano de aula

`, styles: [` @@ -17,17 +17,5 @@ export class ClassroomViewDialogComponent { classroomName: string | undefined; constructor(@Inject(MAT_DIALOG_DATA) public data: any) { - console.log('ClassroomViewDialogComponent'); - console.log(data); } - ngOnInit() { - if (this.data.clients && this.data.clients.length > 0) { - this.classroomName = this.data.clients[0].organizationalUnit.name; - } else { - this.classroomName = 'N/A'; - } - } - - - } diff --git a/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.css b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.css index 3e0522b..371b00b 100644 --- a/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.css +++ b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.css @@ -3,6 +3,7 @@ flex-wrap: wrap; gap: 10px; border: 3px solid black; + margin: 10px; } .classroom-group { @@ -97,6 +98,10 @@ mat-chip { margin: 0 auto; } +mat-dialog-content { + min-height: 70vh; +} + .mat-dialog-content.loading { display: flex; align-items: center; diff --git a/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.html b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.html index 0312e5b..358c0f3 100644 --- a/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.html +++ b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.html @@ -23,6 +23,6 @@
- + diff --git a/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.ts b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.ts index 278c34f..fed55b0 100644 --- a/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.ts @@ -22,7 +22,7 @@ export class ClassroomViewComponent implements OnInit, OnChanges { groupedClients: GroupedClients[] = []; constructor(public dialog: MatDialog, private http: HttpClient, private toastService: ToastrService) {} - + ngOnInit(): void { this.groupClientsByOrganizationalUnit(); @@ -36,7 +36,7 @@ export class ClassroomViewComponent implements OnInit, OnChanges { groupClientsByOrganizationalUnit(): void { const grouped = this.clients.reduce((acc, client) => { - const ouName = client.organizationalUnit.name; + const ouName = 'text'; if (!acc[ouName]) { acc[ouName] = []; } @@ -60,7 +60,7 @@ export class ClassroomViewComponent implements OnInit, OnChanges { }); }); } - + chunkArray(arr: any[], chunkSize: number): any[][] { const chunks = []; From 7b5e2abe2a31340ce5268e4cf1f47165a3ea2356 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 22 Oct 2024 20:17:08 +0200 Subject: [PATCH 03/19] Add first Jenkinsfile --- ogWebconsole/Jenkinsfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 ogWebconsole/Jenkinsfile diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile new file mode 100644 index 0000000..5c0b891 --- /dev/null +++ b/ogWebconsole/Jenkinsfile @@ -0,0 +1,28 @@ +pipeline { + agent { + jenkins-slave + } + environment { + DOCKER_REGISTRY = "opengnsys" + DOCKER_CREDENTIALS = credentials('DOCKER_HUB_TOKEN') + DOCKER_TAG = "${env.BUILD_NUMBER}" + DOCKER_IMAGE_NAME = "oggui" + } + stages { + stage ('Checkout') { + steps { + checkout scm + } + } + stage('Build') { + steps { + echo 'Building....' + script { + dir('ogWebconsole') { + docker.build("${DOCKER_IMAGE_NAME}:${DOCKER_TAG}", "-f Dockerfile .") + } + } + } + } + } +} From 9b6a5b487b36e50b7cacae778fcb75716ef834b7 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 22 Oct 2024 20:18:52 +0200 Subject: [PATCH 04/19] Fix agent --- ogWebconsole/Jenkinsfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index 5c0b891..a46369d 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -1,7 +1,5 @@ pipeline { - agent { - jenkins-slave - } + agent jenkins-slave environment { DOCKER_REGISTRY = "opengnsys" DOCKER_CREDENTIALS = credentials('DOCKER_HUB_TOKEN') From b2105a6fdb2fcd80d73ec3b7c11d53a51d928e1f Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 22 Oct 2024 20:20:02 +0200 Subject: [PATCH 05/19] Another fix --- ogWebconsole/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index a46369d..b6a1b48 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent jenkins-slave + agent { "jenkins-slave" } environment { DOCKER_REGISTRY = "opengnsys" DOCKER_CREDENTIALS = credentials('DOCKER_HUB_TOKEN') From bba25ca3521945b68c52f7c6224fb9dbc80e5ac0 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 22 Oct 2024 20:21:37 +0200 Subject: [PATCH 06/19] Fix --- ogWebconsole/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index b6a1b48..fedf0b7 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent { "jenkins-slave" } + agent { label 'jenkins-slave' } environment { DOCKER_REGISTRY = "opengnsys" DOCKER_CREDENTIALS = credentials('DOCKER_HUB_TOKEN') From 2178e5d74006fef608bac73f957693570acb9c12 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 22 Oct 2024 20:44:49 +0200 Subject: [PATCH 07/19] Improve tag --- ogWebconsole/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index fedf0b7..1f5083e 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { echo 'Building....' script { dir('ogWebconsole') { - docker.build("${DOCKER_IMAGE_NAME}:${DOCKER_TAG}", "-f Dockerfile .") + docker.build("${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}", "-f Dockerfile .") } } } From 016ed56b1cd30658b5ba88ef635b62026b7ca582 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 22 Oct 2024 20:45:59 +0200 Subject: [PATCH 08/19] Pass branch to env --- ogWebconsole/Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index 1f5083e..e2c1071 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -5,6 +5,7 @@ pipeline { DOCKER_CREDENTIALS = credentials('DOCKER_HUB_TOKEN') DOCKER_TAG = "${env.BUILD_NUMBER}" DOCKER_IMAGE_NAME = "oggui" + BRANCH_NAME = "${env.BRANCH_NAME}" } stages { stage ('Checkout') { From b8eeb86a9580493d2c802f8036a27a264f6111fd Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 22 Oct 2024 20:48:30 +0200 Subject: [PATCH 09/19] Use proper variable --- ogWebconsole/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index e2c1071..95b29a2 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -5,7 +5,7 @@ pipeline { DOCKER_CREDENTIALS = credentials('DOCKER_HUB_TOKEN') DOCKER_TAG = "${env.BUILD_NUMBER}" DOCKER_IMAGE_NAME = "oggui" - BRANCH_NAME = "${env.BRANCH_NAME}" + BRANCH_NAME = "${env.GIT_BRANCH}" } stages { stage ('Checkout') { From 57e5e57059bd7c0a40a777330a19544131ee90ea Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 22 Oct 2024 20:51:06 +0200 Subject: [PATCH 10/19] Fix branch name --- ogWebconsole/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index 95b29a2..dfa6430 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -5,7 +5,7 @@ pipeline { DOCKER_CREDENTIALS = credentials('DOCKER_HUB_TOKEN') DOCKER_TAG = "${env.BUILD_NUMBER}" DOCKER_IMAGE_NAME = "oggui" - BRANCH_NAME = "${env.GIT_BRANCH}" + BRANCH_NAME = "${GIT_BRANCH.split("/")[1]}" } stages { stage ('Checkout') { From d6231dbe0f483b25ee26edf06e08b2e07dadb3c7 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 22 Oct 2024 20:53:21 +0200 Subject: [PATCH 11/19] Fixing some issues with naming --- ogWebconsole/Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index dfa6430..e8262b5 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent { label 'jenkins-slave' } environment { - DOCKER_REGISTRY = "opengnsys" + DOCKER_REPO = "opengnsys" DOCKER_CREDENTIALS = credentials('DOCKER_HUB_TOKEN') DOCKER_TAG = "${env.BUILD_NUMBER}" DOCKER_IMAGE_NAME = "oggui" @@ -18,7 +18,7 @@ pipeline { echo 'Building....' script { dir('ogWebconsole') { - docker.build("${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}", "-f Dockerfile .") + docker.build("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}", "-f Dockerfile .") } } } From 564c592a130b3ca265a8106d680bde57e3ee5484 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 22 Oct 2024 20:57:02 +0200 Subject: [PATCH 12/19] Add push step to docker --- ogWebconsole/Jenkinsfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index e8262b5..f65c6cb 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -23,5 +23,17 @@ pipeline { } } } + stage('Push') { + steps { + echo 'Pushing....' + script { + docker.withRegistry('https://index.docker.io/v1/', "${DOCKER_CREDENTIALS}") { + dir('ogWebconsole') { + docker.image("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}").push() + } + } + } + } + } } } From 11410146b2e94312411f2c4897fedf785839dff7 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 22 Oct 2024 21:06:55 +0200 Subject: [PATCH 13/19] Update credentials --- ogWebconsole/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index f65c6cb..368de3a 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -2,7 +2,7 @@ pipeline { agent { label 'jenkins-slave' } environment { DOCKER_REPO = "opengnsys" - DOCKER_CREDENTIALS = credentials('DOCKER_HUB_TOKEN') + DOCKER_CREDENTIALS = credentials('docker-hub-credentials') DOCKER_TAG = "${env.BUILD_NUMBER}" DOCKER_IMAGE_NAME = "oggui" BRANCH_NAME = "${GIT_BRANCH.split("/")[1]}" From 641c7cc668e197c7e836502d21a69caf3551129c Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 22 Oct 2024 21:16:03 +0200 Subject: [PATCH 14/19] change way to pass credentials --- ogWebconsole/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index 368de3a..308ed3c 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -27,7 +27,7 @@ pipeline { steps { echo 'Pushing....' script { - docker.withRegistry('https://index.docker.io/v1/', "${DOCKER_CREDENTIALS}") { + docker.withRegistry('https://index.docker.io/v1/', 'docker-hub-credentials' ) { dir('ogWebconsole') { docker.image("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}").push() } From b0147c4ecae81b87b383ba1d318135862ea4a26d Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Tue, 22 Oct 2024 21:40:12 +0200 Subject: [PATCH 15/19] Added button sync client --- .../client-tab-view.component.html | 2 ++ .../client-tab-view.component.ts | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/ogWebconsole/src/app/components/groups/components/client-tab-view/client-tab-view.component.html b/ogWebconsole/src/app/components/groups/components/client-tab-view/client-tab-view.component.html index 7782e86..5d52504 100644 --- a/ogWebconsole/src/app/components/groups/components/client-tab-view/client-tab-view.component.html +++ b/ogWebconsole/src/app/components/groups/components/client-tab-view/client-tab-view.component.html @@ -59,6 +59,8 @@ Acciones + + + diff --git a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/server-info-dialog/server-info-dialog.component.html b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/server-info-dialog/server-info-dialog.component.html index d8044f8..76b4738 100644 --- a/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/server-info-dialog/server-info-dialog.component.html +++ b/ogWebconsole/src/app/components/ogdhcp/og-dhcp-subnets/server-info-dialog/server-info-dialog.component.html @@ -1,4 +1,4 @@ -

Información de Subnets

+

Información de Subred

{{ data | json }}
diff --git a/ogWebconsole/src/app/layout/sidebar/sidebar.component.html b/ogWebconsole/src/app/layout/sidebar/sidebar.component.html index 626af03..a19fb74 100644 --- a/ogWebconsole/src/app/layout/sidebar/sidebar.component.html +++ b/ogWebconsole/src/app/layout/sidebar/sidebar.component.html @@ -69,7 +69,7 @@ lan - Subnets + Subredes From f3f72b2704437e15c0af7542cde07de2c29ffaae Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Wed, 23 Oct 2024 19:07:18 +0200 Subject: [PATCH 17/19] =?UTF-8?q?refs=20#1028=20-=20Contenedor=20de=20oggu?= =?UTF-8?q?i=20-=20Se=20a=C3=B1ade=20el=20tag=20a=20latest=20cuando=20se?= =?UTF-8?q?=20realiza=20el=20push=20al=20repo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ogWebconsole/Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index 308ed3c..0ba4d9e 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -30,6 +30,7 @@ pipeline { docker.withRegistry('https://index.docker.io/v1/', 'docker-hub-credentials' ) { dir('ogWebconsole') { docker.image("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}").push() + docker.image("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}").push("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-latest") } } } From 5a3471d7794ca53b840072d745db258ba9f816cd Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Wed, 23 Oct 2024 19:25:47 +0200 Subject: [PATCH 18/19] refs #1028 Arregla el tag de latest --- ogWebconsole/Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index 0ba4d9e..7b725b8 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -19,6 +19,7 @@ pipeline { script { dir('ogWebconsole') { docker.build("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}", "-f Dockerfile .") + docker.build("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-latest", "-f Dockerfile .") } } } @@ -30,7 +31,7 @@ pipeline { docker.withRegistry('https://index.docker.io/v1/', 'docker-hub-credentials' ) { dir('ogWebconsole') { docker.image("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}").push() - docker.image("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}").push("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-latest") + docker.image("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-latest").push() } } } From 6d8a93b0e4c78604aed4714ae148076f9126924c Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Wed, 23 Oct 2024 19:35:56 +0200 Subject: [PATCH 19/19] refs #1028 Arregla el etiquetado de latest --- ogWebconsole/Jenkinsfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ogWebconsole/Jenkinsfile b/ogWebconsole/Jenkinsfile index 7b725b8..fd7426e 100644 --- a/ogWebconsole/Jenkinsfile +++ b/ogWebconsole/Jenkinsfile @@ -18,8 +18,14 @@ pipeline { echo 'Building....' script { dir('ogWebconsole') { - docker.build("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}", "-f Dockerfile .") - docker.build("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-latest", "-f Dockerfile .") + IMAGE_ID = "${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}" + if (BRANCH_NAME == 'main') { + LATEST_ID = 'latest' + } else { + LATEST_ID = "${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-latest" + } + docker.build("${IMAGE_ID}", "-f Dockerfile .") + docker.build("${LATEST_ID}", "-f Dockerfile .") } } } @@ -29,10 +35,8 @@ pipeline { echo 'Pushing....' script { docker.withRegistry('https://index.docker.io/v1/', 'docker-hub-credentials' ) { - dir('ogWebconsole') { - docker.image("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-${DOCKER_TAG}").push() - docker.image("${DOCKER_REPO}/${DOCKER_IMAGE_NAME}:${BRANCH_NAME}-latest").push() - } + docker.image("${IMAGE_ID}").push() + docker.image("${LATEST_ID}").push() } } }