refs #1864. Added ssh_port and user in imageRepository in UX.

pull/19/head
Manuel Aranda Rosales 2025-04-11 11:45:15 +02:00
parent 9e9d7b9873
commit 411491091b
4 changed files with 26 additions and 4 deletions

View File

@ -12,6 +12,18 @@
<input matInput formControlName="ip" name="description">
</mat-form-field>
<mat-form-field appearance="fill" class="form-field">
<mat-label>Puerto ssh</mat-label>
<input matInput formControlName="sshPort" name="sshPort">
<mat-hint>Valor que utilizará el sistema para algunas acciones como transferir imagenes.</mat-hint>
</mat-form-field>
<mat-form-field appearance="fill" class="form-field">
<mat-label>Usuario</mat-label>
<input matInput formControlName="user" name="user">
<mat-hint>Este usuario se utilizara para conectarse al repositorio.</mat-hint>
</mat-form-field>
<mat-form-field appearance="fill" class="form-field">
<mat-label>Comentarios</mat-label>
<input matInput formControlName="comments" name="comments">

View File

@ -30,6 +30,8 @@ export class ManageRepositoryComponent implements OnInit {
this.imageForm = this.fb.group({
name: [null, Validators.required],
ip: [null],
sshPort: [null],
user: [null],
comments: [null],
});
}
@ -46,6 +48,8 @@ export class ManageRepositoryComponent implements OnInit {
this.imageForm = this.fb.group({
name: [response.name, Validators.required],
ip: [response.ip],
sshPort: [response.sshPort?? '22' ],
user: [response.user?? 'opengnsys'],
comments: [response.comments],
});
this.repositoryId = response['@id'];
@ -60,6 +64,8 @@ export class ManageRepositoryComponent implements OnInit {
const payload = {
name: this.imageForm.value.name,
ip: this.imageForm.value.ip,
sshPort: this.imageForm.value.sshPort,
user: this.imageForm.value.user,
comments: this.imageForm.value.comments,
};

View File

@ -5,7 +5,7 @@
<mat-icon>help</mat-icon>
</button>
<div class="header-container-title">
<h2 joyrideStep="groupsTitleStepText" text="{{ 'groupsTitleStepText' | translate }}">
<h2 joyrideStep="repositoryTitleStep" text="{{ 'groupsTitleStepText' | translate }}">
{{ 'repositoryTitle' | translate }}
</h2>
</div>

View File

@ -39,6 +39,11 @@ export class RepositoriesComponent implements OnInit {
header: 'Nombre de repositorio',
cell: (repository: any) => `${repository.name}`
},
{
columnDef: 'user',
header: 'Usuario',
cell: (repository: any) => `${repository.user?? 'opengnsys'}`
},
{
columnDef: 'ip',
header: 'Ip',
@ -55,8 +60,8 @@ export class RepositoriesComponent implements OnInit {
cell: (repository: any) => `${this.datePipe.transform(repository.createdAt, 'dd/MM/yyyy hh:mm:ss')}`
}
];
displayedColumns: string[] = ['id', 'name', 'ip', 'images', 'createdAt', 'actions'];
isGitModuleInstalled: boolean = true;
displayedColumns: string[] = ['id', 'name', 'ip', 'user', 'images', 'createdAt', 'actions'];
constructor(
public dialog: MatDialog,
@ -93,7 +98,6 @@ export class RepositoriesComponent implements OnInit {
this.loading = false;
},
error => {
console.error('Error fetching images', error);
this.loading = false;
}
);
@ -165,7 +169,7 @@ export class RepositoriesComponent implements OnInit {
iniciarTour(): void {
this.joyrideService.startTour({
steps: [
'titleStep',
'repositoryTitleStep',
'addStep',
],
showPrevButton: true,