From 532fdeabcbe28c4863c3b25bbc1f76dc782003eb Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 21 Nov 2024 21:35:05 +0100 Subject: [PATCH] etc/dbq/data.php --- etc/dbq/data.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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']); -- 2.47.3