diff --git a/app/Transformers/Api/Client/DatabaseTransformer.php b/app/Transformers/Api/Client/DatabaseTransformer.php index feb6002e..8d420ea8 100644 --- a/app/Transformers/Api/Client/DatabaseTransformer.php +++ b/app/Transformers/Api/Client/DatabaseTransformer.php @@ -58,6 +58,7 @@ class DatabaseTransformer extends BaseClientTransformer 'name' => $model->database, 'username' => $model->username, 'connections_from' => $model->remote, + 'max_connections' => $model->max_connections, ]; } diff --git a/resources/scripts/api/server/getServerDatabases.ts b/resources/scripts/api/server/getServerDatabases.ts index 835964c2..8ae6542a 100644 --- a/resources/scripts/api/server/getServerDatabases.ts +++ b/resources/scripts/api/server/getServerDatabases.ts @@ -6,6 +6,7 @@ export interface ServerDatabase { username: string; connectionString: string; allowConnectionsFrom: string; + maxConnections: string; password?: string; } @@ -15,6 +16,7 @@ export const rawDataToServerDatabase = (data: any): ServerDatabase => ({ username: data.username, connectionString: `${data.host.address}:${data.host.port}`, allowConnectionsFrom: data.connections_from, + maxConnections: data.max_connections, password: data.relationships && data.relationships.password ? data.relationships.password.attributes.password : undefined, }); diff --git a/resources/scripts/components/server/databases/DatabaseRow.tsx b/resources/scripts/components/server/databases/DatabaseRow.tsx index f58d6946..b1d54911 100644 --- a/resources/scripts/components/server/databases/DatabaseRow.tsx +++ b/resources/scripts/components/server/databases/DatabaseRow.tsx @@ -152,7 +152,7 @@ export default ({ database, className }: Props) => {

Username

-

{database.max_connections}

+

{database.maxConnections}

Max Connections