|
|
@ -1,10 +1,10 @@ |
|
|
|
import { getLocalHostUUID } from '../../accessModule'; |
|
|
|
import { toHostUUID } from '../../convertHostUUID'; |
|
|
|
|
|
|
|
|
|
|
|
import buildGetRequestHandler from '../buildGetRequestHandler'; |
|
|
|
import buildGetRequestHandler from '../buildGetRequestHandler'; |
|
|
|
|
|
|
|
|
|
|
|
export const getNetworkInterface = buildGetRequestHandler( |
|
|
|
export const getNetworkInterface = buildGetRequestHandler( |
|
|
|
(request, buildQueryOptions) => { |
|
|
|
({ params: { hostUUID: rawHostUUID } }, buildQueryOptions) => { |
|
|
|
const localHostUUID: string = getLocalHostUUID(); |
|
|
|
const hostUUID = toHostUUID(rawHostUUID ?? 'local'); |
|
|
|
|
|
|
|
|
|
|
|
if (buildQueryOptions) { |
|
|
|
if (buildQueryOptions) { |
|
|
|
buildQueryOptions.afterQueryReturn = (queryStdout) => { |
|
|
|
buildQueryOptions.afterQueryReturn = (queryStdout) => { |
|
|
@ -48,7 +48,7 @@ export const getNetworkInterface = buildGetRequestHandler( |
|
|
|
network_interface_speed, |
|
|
|
network_interface_speed, |
|
|
|
ROW_NUMBER() OVER(ORDER BY modified_date ASC) AS network_interface_order |
|
|
|
ROW_NUMBER() OVER(ORDER BY modified_date ASC) AS network_interface_order |
|
|
|
FROM network_interfaces |
|
|
|
FROM network_interfaces |
|
|
|
WHERE network_interface_operational != 'DELETE' |
|
|
|
WHERE network_interface_operational != 'DELETED' |
|
|
|
AND network_interface_host_uuid = '${localHostUUID}';`;
|
|
|
|
AND network_interface_host_uuid = '${hostUUID}';`;
|
|
|
|
}, |
|
|
|
}, |
|
|
|
); |
|
|
|
); |
|
|
|