[pve-devel] [PATCH manager] api: backup info: prefer kebab-case

Fabian Ebner f.ebner at proxmox.com
Fri Jul 2 11:40:37 CEST 2021


And also add the 'backup-info' endpoint to the index.

Suggested-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/API2/BackupInfo.pm    | 2 +-
 PVE/API2/Cluster.pm       | 3 ++-
 www/manager6/dc/Backup.js | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/PVE/API2/BackupInfo.pm b/PVE/API2/BackupInfo.pm
index 4c461e59..53a2ecfb 100644
--- a/PVE/API2/BackupInfo.pm
+++ b/PVE/API2/BackupInfo.pm
@@ -51,7 +51,7 @@ __PACKAGE__->register_method({
 
 __PACKAGE__->register_method({
     name => 'get_guests_not_in_backup',
-    path => 'not_backed_up',
+    path => 'not-backed-up',
     method => 'GET',
     protected => 1,
     description => "Shows all guests which are not covered by any backup job.",
diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm
index 43dfa65f..2054ba76 100644
--- a/PVE/API2/Cluster.pm
+++ b/PVE/API2/Cluster.pm
@@ -66,7 +66,7 @@ __PACKAGE__->register_method ({
 
 __PACKAGE__->register_method ({
     subclass => "PVE::API2::BackupInfo",
-    path => 'backupinfo',
+    path => 'backup-info',
 });
 
 __PACKAGE__->register_method ({
@@ -131,6 +131,7 @@ __PACKAGE__->register_method ({
 	    { name => 'replication' },
 	    { name => 'tasks' },
 	    { name => 'backup' },
+	    { name => 'backup-info' },
 	    { name => 'ha' },
 	    { name => 'status' },
 	    { name => 'nextid' },
diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js
index 6be545ee..f06c25ff 100644
--- a/www/manager6/dc/Backup.js
+++ b/www/manager6/dc/Backup.js
@@ -797,7 +797,7 @@ Ext.define('PVE.dc.BackupView', {
 	    sorters: 'vmid',
 	    proxy: {
 		type: 'proxmox',
-		url: 'api2/json/cluster/backupinfo/not_backed_up',
+		url: 'api2/json/cluster/backup-info/not-backed-up',
 	    },
 	});
 
-- 
2.30.2






More information about the pve-devel mailing list