|
|
@ -92,16 +92,16 @@ const buildQueryAnvilDetail = ({ |
|
|
|
server_definition_server_uuid, |
|
|
|
server_definition_server_uuid, |
|
|
|
CAST( |
|
|
|
CAST( |
|
|
|
SUBSTRING( |
|
|
|
SUBSTRING( |
|
|
|
server_definition_xml, '%cores=''#"[0-9]+#"''%', '#' |
|
|
|
server_definition_xml, 'cores=''([\\d]*)''' |
|
|
|
) AS INTEGER |
|
|
|
) AS INTEGER |
|
|
|
) AS server_cpu_cores, |
|
|
|
) AS server_cpu_cores, |
|
|
|
CAST( |
|
|
|
CAST( |
|
|
|
SUBSTRING( |
|
|
|
SUBSTRING( |
|
|
|
server_definition_xml, '%memory%>#"[0-9]+#"</memory%', '#' |
|
|
|
server_definition_xml, 'memory.*>([\\d]*)</memory' |
|
|
|
) AS BIGINT |
|
|
|
) AS BIGINT |
|
|
|
) AS server_memory_value, |
|
|
|
) AS server_memory_value, |
|
|
|
SUBSTRING( |
|
|
|
SUBSTRING( |
|
|
|
server_definition_xml, '%memory%unit=''#"[A-Za-z]+#"''%', '#' |
|
|
|
server_definition_xml, 'memory.*unit=''([A-Za-z]*)''' |
|
|
|
) AS server_memory_unit |
|
|
|
) AS server_memory_unit |
|
|
|
FROM server_definitions AS ser_def |
|
|
|
FROM server_definitions AS ser_def |
|
|
|
) AS ser_def_memory_converted |
|
|
|
) AS ser_def_memory_converted |
|
|
@ -129,7 +129,7 @@ const buildQueryAnvilDetail = ({ |
|
|
|
|
|
|
|
|
|
|
|
const buildFileQuery = () => ` |
|
|
|
const buildFileQuery = () => ` |
|
|
|
SELECT |
|
|
|
SELECT |
|
|
|
file_location_anvil_uuid, |
|
|
|
file_location_host_uuid, |
|
|
|
file_uuid, |
|
|
|
file_uuid, |
|
|
|
file_name |
|
|
|
file_name |
|
|
|
FROM file_locations as fil_loc |
|
|
|
FROM file_locations as fil_loc |
|
|
@ -181,7 +181,11 @@ const buildQueryAnvilDetail = ({ |
|
|
|
LEFT JOIN (${buildStorageGroupQuery()}) AS storage_group_list |
|
|
|
LEFT JOIN (${buildStorageGroupQuery()}) AS storage_group_list |
|
|
|
ON anv.anvil_uuid = storage_group_list.storage_group_anvil_uuid |
|
|
|
ON anv.anvil_uuid = storage_group_list.storage_group_anvil_uuid |
|
|
|
LEFT JOIN (${buildFileQuery()}) AS file_list |
|
|
|
LEFT JOIN (${buildFileQuery()}) AS file_list |
|
|
|
ON anv.anvil_uuid = file_list.file_location_anvil_uuid |
|
|
|
ON file_list.file_location_host_uuid IN ( |
|
|
|
|
|
|
|
anv.anvil_node1_host_uuid, |
|
|
|
|
|
|
|
anv.anvil_node2_host_uuid, |
|
|
|
|
|
|
|
anv.anvil_dr1_host_uuid |
|
|
|
|
|
|
|
) |
|
|
|
;`;
|
|
|
|
;`;
|
|
|
|
|
|
|
|
|
|
|
|
let query = ` |
|
|
|
let query = ` |
|
|
|