fix(striker-ui-api): sort hosts by name

main
Tsu-ba-me 1 year ago
parent 2dc0fd3835
commit df7b5fa397
  1. 3
      striker-ui-api/src/lib/request_handlers/host/buildQueryHostDetail.ts
  2. 3
      striker-ui-api/src/lib/request_handlers/host/getHost.ts

@ -75,7 +75,8 @@ export const buildQueryHostDetail: BuildQueryDetailFunction = ({
AND b.variable_value = c.network_interface_mac_address
AND a.host_uuid = c.network_interface_host_uuid
WHERE ${condHostUUIDs}
ORDER BY cvar_name ASC,
ORDER BY a.host_name ASC,
cvar_name ASC,
b.variable_name ASC;`;
const afterQueryReturn: QueryResultModifierFunction =

@ -29,7 +29,8 @@ export const getHost = buildGetRequestHandler((request, buildQueryOptions) => {
hos.host_type,
hos.host_uuid
FROM hosts AS hos
${condition};`;
${condition}
ORDER BY hos.host_name ASC;`;
let afterQueryReturn: QueryResultModifierFunction | undefined =
buildQueryResultReducer<{ [hostUUID: string]: HostOverview }>(
(previous, [hostName, hostType, hostUUID]) => {

Loading…
Cancel
Save