From: Nicolas Boisselier Date: Thu, 21 Nov 2024 20:35:05 +0000 (+0100) Subject: etc/dbq/data.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=532fdeabcbe28c4863c3b25bbc1f76dc782003eb;p=nb.git etc/dbq/data.php --- diff --git a/etc/dbq/data.php b/etc/dbq/data.php index 8de4d3cd..ce4524ee 100644 --- a/etc/dbq/data.php +++ b/etc/dbq/data.php @@ -72,10 +72,6 @@ $DBQ['data'] = [ }, ], 'host_info_git' => [ - /* - ,0 as count - ,(SELECT string_agg((name.val),' ') as repos FROM host_info name WHERE name.host=hi.host AND name.key LIKE 'git.%.name') as repos - */ 'sql' => preg_replace('/[\t\r\n]/',''," SELECT host ,max(updated) as last_updated @@ -107,6 +103,17 @@ $DBQ['data'] = [ } }, ], + 'host_info_datas' => [ + 'sql' => preg_replace('/[\t\r\n]/',''," + SELECT host + ,REPLACE(key,'backup-datas.','') as key + ,val + ,updated + FROM host_info + WHERE key LIKE 'backup-datas.%' + ORDER BY updated DESC, host +"), + ], ], ]; #bye($DBQ['data']['tables']['host_git']['sql']);