]> git.proxmox.com Git - pve-docs.git/blobdiff - api-viewer/PVEAPI.js
cert management: move some headings a level up for better visibility
[pve-docs.git] / api-viewer / PVEAPI.js
index 9a1415609e1308deaa60f50f8f44ee3ac6cb2fa8..53bc36c4e105142a9b8d796204abb09e51579480 100644 (file)
@@ -354,6 +354,9 @@ Ext.onReady(function() {
                        permhtml += "Unknown systax!";
                    }
                }
+               if (!info.allowtoken) {
+                   permhtml += "<br />This API endpoint is not available for API tokens."
+               }
 
                sections.push({
                    title: 'Required permissions',
@@ -383,7 +386,11 @@ Ext.onReady(function() {
     Ext.define('Ext.form.SearchField', {
        extend: 'Ext.form.field.Text',
        alias: 'widget.searchfield',
-       emptyText: 'Search',
+
+       emptyText: 'Search...',
+
+       flex: 1,
+
        inputType: 'search',
        listeners: {
            'change': function(){
@@ -412,15 +419,15 @@ Ext.onReady(function() {
        tools: [
            {
                type: 'expand',
-               handler: function() {
-                  tree.expandAll();
-               },
+               tooltip: 'Expand all',
+               tooltipType: 'title',
+               callback: (tree) => tree.expandAll(),
            },
            {
                type: 'collapse',
-               handler: function() {
-                  tree.collapseAll();
-               }
+               tooltip: 'Collapse all',
+               tooltipType: 'title',
+               callback: (tree) => tree.collapseAll(),
            },
        ],
         store: store,
@@ -458,7 +465,7 @@ Ext.onReady(function() {
     });
 
     var deepLink = function() {
-       var path = window.location.hash.substring(1);
+       var path = window.location.hash.substring(1).replace(/\/\s*$/, '')
        var endpoint = store.findNode('path', path);
 
        if (endpoint) {