wiki:docs_menu

menu json

  • help for the menu json can be added for each menu level entry with the "help" : "help text..." name value pair.
  • note that the width of these is overridden by a currently fixed value
    • it can be adjusted, inform a tool developer
    • technically, it is blocked by a 'div' and would be too thin if let to autosize

restricted menu options

  • menu options can be restricted to certain users
  • you add the tag "restricted" : "groupcode"
    • example menu.json fragment
       ,{
         "id"         : "beta"
         ,"restricted" : "somegroupname"
         ,"label"      : "Beta"
         ,"icon"       : "pngs/beta.png"
         ,"modules"    : [
                          {
                           "id"    : "testbeta"
                           ,"label" : "testbeta"
                          }
                         ]
       }
      
    • in the above case only users with "somegroupname" permission will be given access after login
  • then in appconfig.json, one manually enters user permissions
    • in future we plan to add admin control of appconfig.json editing
    • N.B.: appconfig.json does not support comments # !
    • N.B.: make sure you don't make mistakes in appconfig.json
      1. verify no comments manually
      2. $ check_json.pl appconfig.json
    • example appconfig.json fragement
        ,"restricted" : {
            "somegroupname" : [ "ausername", "anotherusername" ]
            ,"othergroup"   : [ "oneuser" ]
        }
      

autorun

  • if a menu entry has only one module, it can automatically be run when clicking on the menu item with the "autorun" tag referencing the module
    • here is an example with autorun set
      ...
               ,{
                  "id"      : "simulate",
                  "label"   : "Simulate",
                  "icon"    : "pngs/simulate.png",
                  "autorun" : "simulate_1",
                  "modules" : [
                      {
                          "id"    : "simulate_1",
                          "label" : "Simulate 1"
                      }
                  ]
              }
      ...
      

startup

  • a menu can be the default at startup... i.e. it be as if the user clicked that menu entry with the "startup" tag
    • e.g.
      ...
              {
                  "id"      : "build",
                  "label"   : "Build",
                  "icon"    : "pngs/build.png",
                  "help"    : "build help text",
                  "startup" : "true",
                  "modules" : [
                      {
                          "id"    : "build_1",
                          "label" : "Build 1"
                      },
                      {
                          "id"    : "build_2",
                          "label" : "Build 2"
                      }
                  ]
              },
      ...
      
    • "startup" can be combined with "autorun" to provide a welcome page, e.g.
      ...
              {
                  "id"      : "welcome_menu",
                  "label"   : "Welcome!",
                  "icon"    : "pngs/noicon.png",
                  "autorun" : "welcome",
                  "startup" : "true",
                  "modules" : [
                      {
                          "id"    : "welcome",
                          "label" : "Welcome"
                      }
                  ]
              }
      ...
      

nobutton

  • by default, each module within a menu will have a button to run it
  • this option will disable the display of the menu
  • this is primarily useful in combination with "autorun" above... (without "autorun", there is no way to run a "nobutton" module)
  • e.g.
    ...
            {
                "id"      : "welcome_menu",
                "label"   : "Welcome!",
                "icon"    : "pngs/noicon.png",
                "autorun" : "welcome",
                "startup" : "true",
                "modules" : [
                    {
                        "id"       : "welcome",
                        "label"    : "Welcome",
                        "nobutton" : "true"
                    }
                ]
            }
    ...
    

nohidemenu

  • by default the sidebar menu hides when a menu button is pressed. this can be overridden for each menu entry with the "nohidemenu" option
    • e.g. perhaps for the autorun startup welcome menu you wanted to leave the options present
      ...
              {
                  "id"         : "welcome_menu",
                  "label"      : "Welcome!",
                  "icon"       : "pngs/noicon.png",
                  "autorun"    : "welcome",
                  "startup"    : "true",
                  "nohidemenu" : "true",
                  "modules" : [
                      {
                          "id"    : "welcome",
                          "label" : "Welcome"
                      }
                  ]
              }
      ...
      

background image

  • menu specific background images are also supported
  • N.B. can not be currently combined with user colors
    • e.g. in menu.json
              ,{
                  "id"      : "admin",
                  "restricted" : "admin",
                  "label"   : "Admin",
                  "icon"    : "pngs/admin.png",
                  "backgroundimage" : "pngs/admin.png",
                  "modules" : [
                      {
                          "id"    : "jobmonitor",
                          "label" : "Job monitor"
                      }
                      ,{
                          "id"    : "jobintegritycheck",
                          "label" : "Integrity check"
                      }
                      ,{
                          "id"    : "sysuserslist",
                          "label" : "Users"
                      }
                  ]
              }
      
Last modified 5 months ago Last modified on Oct 11, 2017, 5:18:16 AM