Skip to main content
DanNSits
Explorer III
March 6, 2023
Question

FortiGate WebUI Tools > Full Config

  • March 6, 2023
  • 2 replies
  • 3033 views

Public preview
Comment for any tools you'd like to have added to WebUI Tools

 

Installation:

  1. Login to your FortiGate's WebUI
  2. Create a new bookmark in your web browser and copy the JavaScript code below into the URL field.
  3. Click the bookmark and enjoy to show the Tools extension

Result:

fgt_tools.png

Copy & paste into a bookmark:
javascript:(async function(){let e=await fetch("/api/v2/monitor/system/config/backup?destination=file&scope=global"),o=await e.text();document.contains(document.getElementById("tools"))&&document.getElementById("tools").remove();let t=document.querySelector("nu-nav-entry"),n=document.createElement("li");n.setAttribute("id","tools");let l=document.getElementById("ng1-app").getElementsByTagName("div")[0];n.innerHTML='<p style="color:#000;background-color:goldenrod;margin:0;padding:4px 0 1px 5px;border-left:3px solid #ffd700"><f-icon class="ftnt-webhook icon-lg"></f-icon>&nbsp;Tools</p><p style="color:#000;background-color:#ffd700;margin:0;padding:6px 0 5px 35px;cursor:pointer">Full Config</p>',t.before(n),l.style.width="100%",l.innerHTML=`<div style="position:relative;overflow-y:auto"><pre style="padding:1em;margin:0;display:flex"><code style="width:100%">${o}</code></pre></div>`})();
Completed tasks:
  • Adding the Tools extension in the left menu bar
  • Showing the full-configuration, scrollable

Next task

  • Adding syntax highlighting to the full-configuration
  • Making the full-configuration sections collapsible
  • Making the full-configuration editable
  • Adding search functionality to the full-configuration
  • Adding a save function to the editor

Roadmap (planned):

  • Health check incl. system diagnostics

2 replies

gfleming
Staff
Staff
March 7, 2023

Cool idea!! Didn't work for me though. I just get "false" as output.

 

EDIT: this works for me after changing browsers. Possibly a Firefox extension or setting blocking JS.

Roee-Golan
Explorer
March 8, 2023

It works excellently on FortiOS 7.0.9!
Thank you, Danny :)