mirror of
https://git.proxmox.com/git/pve-docs
synced 2025-04-29 12:26:39 +00:00
apiviewer: add api endpoint deeplink ability
use #/<endpoint> to deeplink to a specific endpoint Signed-off-by: Tim Marx <t.marx@proxmox.com>
This commit is contained in:
parent
88a31964c3
commit
16e6779d4c
@ -368,6 +368,7 @@ Ext.onReady(function() {
|
||||
return;
|
||||
var rec = selections[0];
|
||||
render_docu(rec.data);
|
||||
location.hash = '#' + rec.data.path;
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -389,4 +390,18 @@ Ext.onReady(function() {
|
||||
]
|
||||
});
|
||||
|
||||
var deepLink = function() {
|
||||
var path = window.location.hash.substring(1);
|
||||
var endpoint = store.findNode('path', path);
|
||||
|
||||
if (endpoint) {
|
||||
tree.getSelectionModel().select(endpoint);
|
||||
tree.expandPath(endpoint.getPath());
|
||||
render_docu(endpoint.data);
|
||||
}
|
||||
}
|
||||
window.onhashchange = deepLink;
|
||||
|
||||
deepLink();
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user