feat(servers): exibir senha na listagem

- inclui o campo password no DTO enviado pelo backend
- ajusta tipagens e tabela do dashboard para mostrar a credencial
master
Artur Oliveira 2025-12-16 17:40:29 -03:00
parent 25579ab7bd
commit bba78772db
3 changed files with 7 additions and 2 deletions

View File

@ -12,6 +12,7 @@ public record ServerDTO(
String ip,
Integer port,
String user,
String password,
ServersType type,
Applications application,
DatabaseType dbType,
@ -19,4 +20,3 @@ public record ServerDTO(
Timestamp updatedAt
) {
}

View File

@ -23,6 +23,7 @@ export const ServersTable = ({ servers, loading, error }: Props) => {
<th className={Styles.tableHeadCell}>IP</th>
<th className={Styles.tableHeadCell}>Porta</th>
<th className={Styles.tableHeadCell}>Usuário</th>
<th className={Styles.tableHeadCell}>Senha</th>
<th className={Styles.tableHeadCell}>Tipo</th>
<th className={Styles.tableHeadCell}>Aplicação</th>
<th className={Styles.tableHeadCell}>Banco</th>
@ -38,6 +39,9 @@ export const ServersTable = ({ servers, loading, error }: Props) => {
<td className={Styles.rowCell}>{server.ip}</td>
<td className={Styles.rowCell}>{server.port}</td>
<td className={Styles.rowCell}>{server.user}</td>
<td className={Styles.rowCell}>
<code className="text-xs bg-gray-100 px-2 py-1 rounded">{server.password}</code>
</td>
<td className={`${Styles.rowCell} capitalize`}>{server.type.toLowerCase()}</td>
<td className={`${Styles.rowCell} capitalize`}>{server.application.toLowerCase()}</td>
<td className={`${Styles.rowCell} capitalize`}>{server.dbType.toLowerCase()}</td>

View File

@ -6,9 +6,10 @@ export interface Server {
ip: string;
port: number;
user: string;
password: string;
type: ServersType;
application: Applications;
dbType: DatabaseType;
createdAt: string;
updatedAt: string;
}
}