diff --git a/docs/api-viewer/PBSAPI.js b/docs/api-viewer/PBSAPI.js
index 40403308..b728e302 100644
--- a/docs/api-viewer/PBSAPI.js
+++ b/docs/api-viewer/PBSAPI.js
@@ -106,6 +106,10 @@ Ext.onReady(function() {
return '';
};
+ var real_path = function(path) {
+ return path.replace(/^.*\/_upgrade_(\/)?/, "/");
+ };
+
var render_docu = function(data) {
var md = data.info;
@@ -126,9 +130,8 @@ Ext.onReady(function() {
var usage = "";
- usage += "
HTTP: | " + method + " /api2/json" + data.path + " |
  |
";
-
- //usage += "CLI: | pvesh " + clicmdhash[method] + " " + data.path + " |
";
+ usage += "HTTP: | "
+ + method + " " + real_path("/api2/json" + data.path) + " |
";
var sections = [
{
@@ -378,7 +381,7 @@ Ext.onReady(function() {
});
var ct = Ext.getCmp('docview');
- ct.setTitle("Path: " + data.path);
+ ct.setTitle("Path: " + real_path(data.path));
ct.removeAll(true);
ct.add(items);
ct.setActiveTab(0);
diff --git a/src/bin/docgen.rs b/src/bin/docgen.rs
index 0d37a041..8a60f3a0 100644
--- a/src/bin/docgen.rs
+++ b/src/bin/docgen.rs
@@ -76,13 +76,13 @@ fn generate_api_tree() -> String {
tree.push(data);
- let mut data = dump_api_schema(&api2::backup::BACKUP_API_ROUTER, ".");
- data["path"] = "/".into();
+ let mut data = dump_api_schema(&api2::backup::BACKUP_API_ROUTER, "/backup/_upgrade_");
+ data["path"] = "/backup/_upgrade_".into();
data["text"] = "Backup API (HTTP/2)".into();
tree.push(data);
- let mut data = dump_api_schema(&api2::reader::READER_API_ROUTER, ".");
- data["path"] = "/".into();
+ let mut data = dump_api_schema(&api2::reader::READER_API_ROUTER, "/reader/_upgrade_");
+ data["path"] = "/reader/_upgrade_".into();
data["text"] = "Restore API (HTTP/2)".into();
tree.push(data);