diff --git a/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.html b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.html index 6c3be8f..99b15e4 100644 --- a/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.html +++ b/ogWebconsole/src/app/components/groups/components/client-main-view/create-image/create-image.component.html @@ -16,9 +16,9 @@
Tipo de imagen - - Monolítica - Git + + Monolítica + Git
@@ -31,7 +31,7 @@ Seleccione imagen - + {{ image?.name }} - \ No newline at end of file + diff --git a/ogWebconsole/src/app/components/repositories/repositories.component.css b/ogWebconsole/src/app/components/repositories/repositories.component.css index 75b57f7..62feff0 100644 --- a/ogWebconsole/src/app/components/repositories/repositories.component.css +++ b/ogWebconsole/src/app/components/repositories/repositories.component.css @@ -79,25 +79,6 @@ table { 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; - -} - .header-container-title { flex-grow: 1; text-align: left; diff --git a/ogWebconsole/src/app/components/repositories/repositories.component.html b/ogWebconsole/src/app/components/repositories/repositories.component.html index 3ddf7ec..ab330e5 100644 --- a/ogWebconsole/src/app/components/repositories/repositories.component.html +++ b/ogWebconsole/src/app/components/repositories/repositories.component.html @@ -1,31 +1,33 @@
-
-

+

{{ 'repositoryTitle' | translate }}

- +
-
+
- Buscar nombre de repositorio + {{ 'search' | translate }} {{ 'repository' | translate }} search Pulsar 'enter' para buscar - Buscar IP de repositorio + {{ 'search' | translate }} IP de {{ 'repository' | translate }} search @@ -33,7 +35,7 @@
- +
- - +
{{ column.header }} @@ -42,15 +44,30 @@ - - + + Acciones + {{ 'actions' | translate }}
-
+
diff --git a/ogWebconsole/src/app/components/repositories/repositories.component.ts b/ogWebconsole/src/app/components/repositories/repositories.component.ts index 4a398de..1c2dd73 100644 --- a/ogWebconsole/src/app/components/repositories/repositories.component.ts +++ b/ogWebconsole/src/app/components/repositories/repositories.component.ts @@ -23,7 +23,7 @@ export class RepositoriesComponent implements OnInit { private apiUrl: string; dataSource = new MatTableDataSource(); length: number = 0; - itemsPerPage: number = 10; + itemsPerPage: number = 20; page: number = 0; loading: boolean = false; filters: { [key: string]: string } = {}; @@ -37,7 +37,7 @@ export class RepositoriesComponent implements OnInit { { columnDef: 'name', header: 'Nombre de repositorio', - cell: (repository: any) => `${repository.name}` + cell: (repository: any) => repository.name }, { columnDef: 'user', @@ -47,12 +47,12 @@ export class RepositoriesComponent implements OnInit { { columnDef: 'ip', header: 'Ip', - cell: (repository: any) => `${repository.ip}` + cell: (repository: any) => repository.ip }, { columnDef: 'images', - header: 'Imágenes', - cell: (repository: any) => `${repository.images}` + header: 'Gestionar imágenes', + cell: (repository: any) => repository.images }, { columnDef: 'createdAt', @@ -60,7 +60,7 @@ export class RepositoriesComponent implements OnInit { cell: (repository: any) => `${this.datePipe.transform(repository.createdAt, 'dd/MM/yyyy hh:mm:ss')}` } ]; - isGitModuleInstalled: boolean = false; + isGitModuleInstalled: boolean = true; displayedColumns: string[] = ['id', 'name', 'ip', 'user', 'images', 'createdAt', 'actions']; constructor( @@ -166,11 +166,17 @@ export class RepositoriesComponent implements OnInit { this.search(); } - iniciarTour(): void { + initTour(): void { this.joyrideService.startTour({ steps: [ 'repositoryTitleStep', 'addStep', + 'searchStep', + 'tableDateStep', + 'monolithicImageStep', + 'gitImageStep', + 'actionsStep', + 'paginationStep' ], showPrevButton: true, themeColor: '#3f51b5' diff --git a/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.html b/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.html index 5b0d65d..9812d06 100644 --- a/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.html +++ b/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.html @@ -14,9 +14,6 @@ -
@@ -48,10 +45,10 @@ {{ column.header }} - - - {{ image.image[column.columnDef] ? 'check_circle' : 'cancel' }} - + + + {{ image.isGlobal ? 'Sí' : 'No' }} + Acciones - @@ -86,7 +81,6 @@ menu - - - @@ -117,4 +107,4 @@ - \ No newline at end of file + diff --git a/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.ts b/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.ts index 2608b8a..94fd85a 100644 --- a/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.ts +++ b/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.ts @@ -22,7 +22,7 @@ import {EditImageComponent} from "../edit-image/edit-image.component"; templateUrl: './show-git-images.component.html', styleUrl: './show-git-images.component.css' }) -export class ShowGitImagesComponent { +export class ShowGitImagesComponent implements OnInit{ baseUrl: string; private apiUrl: string; dataSource = new MatTableDataSource(); @@ -43,27 +43,27 @@ baseUrl: string; { columnDef: 'name', header: 'Nombre de imagen', - cell: (image: any) => `${image.image.name}` + cell: (image: any) => image.name }, { - columnDef: 'version', - header: 'Version', - cell: (image: any) => `${image.version ? image.version : '0'}` + columnDef: 'tag', + header: 'Tag', + cell: (image: any) => image.tag }, { columnDef: 'isGlobal', header: 'Imagen global', - cell: (image: any) => `${image.image?.isGlobal}` + cell: (image: any) => image.image?.isGlobal }, { columnDef: 'status', header: 'Estado', - cell: (image: any) => `${image.status}` + cell: (image: any) => image.status }, { columnDef: 'description', header: 'Descripción', - cell: (image: any) => `${image.description ? image.description : 'Sin descripción'}` + cell: (image: any) => image.description }, { columnDef: 'createdAt', @@ -84,11 +84,10 @@ baseUrl: string; @Inject(MAT_DIALOG_DATA) public data: any ) { this.baseUrl = this.configService.apiUrl; - this.apiUrl = `${this.baseUrl}/image-image-repositories`; + this.apiUrl = `${this.baseUrl}/git-image-repositories`; } ngOnInit(): void { - console.error() if (this.data) { this.loadData(); } @@ -140,30 +139,7 @@ baseUrl: string; return this.http.get(`${this.apiUrl}/server/${image.uuid}/get`, {}); } - showImageInfo(event: MouseEvent, image:any) { - event.stopPropagation(); - this.loading = true; - this.loadImageAlert(image).subscribe( - response => { - this.alertMessage = response; - - this.dialog.open(ServerInfoDialogComponent, { - width: '800px', - data: { - message: this.alertMessage - } - }); - this.loading = false; - }, - error => { - this.toastService.error(error.error['hydra:description']); - this.loading = false; - } - ); - } - importImage(): void { - console.log(this.data) this.dialog.open(ImportImageComponent, { width: '600px', data: { @@ -177,33 +153,8 @@ baseUrl: string; }); } - convertImage(): void { - this.dialog.open(ConvertImageComponent, { - width: '600px', - data: { - repositoryUuid: this.data.repositoryUuid, - name: this.data.repositoryName - } - }).afterClosed().subscribe((result) => { - if (result) { - this.loadData(); - } - }); - } - toggleAction(image: any, action:string): void { switch (action) { - case 'get-aux': - this.http.post(`${this.baseUrl}/image-image-repositories/server/${image.uuid}/create-aux-files`, {}).subscribe({ - next: (message) => { - this.toastService.success('Petición de creación de archivos auxiliares enviada'); - this.loadData() - }, - error: (error) => { - this.toastService.error(error.error['hydra:description']); - } - }); - break; case 'delete-trash': if (!image.imageFullsum) { const dialogRef = this.dialog.open(DeleteModalComponent, { @@ -278,17 +229,6 @@ baseUrl: string; } }); break; - case 'status': - this.http.post(`${this.baseUrl}/image-image-repositories/server/${image.uuid}/status`, {}).subscribe({ - next: (response: any) => { - this.toastService.info(response?.output); - this.loadData() - }, - error: (error) => { - this.toastService.error(error.error['hydra:description']); - } - }); - break; case 'transfer': this.http.get(`${this.baseUrl}${image.image['@id']}`).subscribe({ next: (response) => { @@ -335,23 +275,6 @@ baseUrl: string; } }); break; - case 'convert-image-to-virtual': - this.http.get(`${this.baseUrl}${image.image['@id']}`).subscribe({ - next: (response) => { - this.dialog.open(ConvertImageToVirtualComponent, { - width: '600px', - data: { - image: response, - imageImageRepository: image - } - }); - this.router.navigate(['/commands-logs']); - }, - error: (error) => { - this.toastService.error(error.error['hydra:description']); - } - }); - break; default: console.error('Acción no soportada:', action); break; @@ -376,11 +299,11 @@ baseUrl: string; } loadAlert(): Observable { - return this.http.post(`${this.baseUrl}/image-repositories/server/${this.data.repositoryUuid}/get-collection`, {}); + return this.http.post(`${this.baseUrl}/image-repositories/server/git/${this.data.repositoryUuid}/get-collection`, {}); } syncRepository() { - this.http.post(`${this.baseUrl}/image-repositories/server/${this.data.repositoryUuid}/sync`, {}) + this.http.post(`${this.baseUrl}/image-repositories/server/git/${this.data.repositoryUuid}/sync`, {}) .subscribe(response => { this.toastService.success('Sincronización completada'); this.loadData() @@ -393,12 +316,12 @@ baseUrl: string; openImageInfoDialog() { this.loadAlert().subscribe( response => { - this.alertMessage = response.output; + this.alertMessage = response.repositories; this.dialog.open(ServerInfoDialogComponent, { width: '800px', data: { - message: this.alertMessage + repositories: this.alertMessage } }); }, diff --git a/ogWebconsole/src/app/components/repositories/show-monolitic-images/show-monolitic-images.component.html b/ogWebconsole/src/app/components/repositories/show-monolitic-images/show-monolitic-images.component.html index 592c09d..59f426c 100644 --- a/ogWebconsole/src/app/components/repositories/show-monolitic-images/show-monolitic-images.component.html +++ b/ogWebconsole/src/app/components/repositories/show-monolitic-images/show-monolitic-images.component.html @@ -6,7 +6,7 @@ -

Gestionar imágenes monolíticas en {{data.repositoryName}}

+

{{ 'monolithicImage' | translate }} {{data.repositoryName}}

@@ -48,11 +48,12 @@ {{ column.header }} - - - {{ image.image[column.columnDef] ? 'check_circle' : 'cancel' }} - + + + {{ image.isGlobal ? 'Sí' : 'No' }} + +