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, String ip,
Integer port, Integer port,
String user, String user,
String password,
ServersType type, ServersType type,
Applications application, Applications application,
DatabaseType dbType, DatabaseType dbType,
@ -19,4 +20,3 @@ public record ServerDTO(
Timestamp updatedAt 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}>IP</th>
<th className={Styles.tableHeadCell}>Porta</th> <th className={Styles.tableHeadCell}>Porta</th>
<th className={Styles.tableHeadCell}>Usuário</th> <th className={Styles.tableHeadCell}>Usuário</th>
<th className={Styles.tableHeadCell}>Senha</th>
<th className={Styles.tableHeadCell}>Tipo</th> <th className={Styles.tableHeadCell}>Tipo</th>
<th className={Styles.tableHeadCell}>Aplicação</th> <th className={Styles.tableHeadCell}>Aplicação</th>
<th className={Styles.tableHeadCell}>Banco</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.ip}</td>
<td className={Styles.rowCell}>{server.port}</td> <td className={Styles.rowCell}>{server.port}</td>
<td className={Styles.rowCell}>{server.user}</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.type.toLowerCase()}</td>
<td className={`${Styles.rowCell} capitalize`}>{server.application.toLowerCase()}</td> <td className={`${Styles.rowCell} capitalize`}>{server.application.toLowerCase()}</td>
<td className={`${Styles.rowCell} capitalize`}>{server.dbType.toLowerCase()}</td> <td className={`${Styles.rowCell} capitalize`}>{server.dbType.toLowerCase()}</td>

View File

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