Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Dannу
Contributor

FortiGate WebUI Tools > Full Config

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 2
gfleming
Staff
Staff

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.

Cheers,
Graham
Roee-Golan
New Contributor II

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

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors