4
0

webui.adoc 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. [#customize-webui]
  2. = Customize the web UI
  3. The OliveTin web UI is reasonably customizable - parts of the page that you don't need can be hidden when they're not needed.
  4. == Page Title
  5. You can customize the page title;
  6. image::page-title.png[]
  7. .`config.yaml`
  8. [source,yaml]
  9. ----
  10. pageTitle: My OliveTin Instance
  11. ----
  12. [#show-nav]
  13. == Navigation - show / hide
  14. You can choose to hide the navigation elements in OliveTin, to present a simplified user interface.
  15. .The default user interface with the sidebar shown
  16. image::defaultUiWithNav.png[]
  17. To have OliveTin hide these buttons, add `showNavigation: false` to your config.yaml;
  18. .`config.yaml`
  19. [source,yaml]
  20. ----
  21. logLevel: "INFO"
  22. showNavigation: false
  23. actions:
  24. ....
  25. ----
  26. .The same user interface, but with the sidebar hidden (`showNavigation: false`)
  27. image::defaultUiHideNav.png[]
  28. [#show-navigate-on-start-icons]
  29. == Navigate-on-start icons on action buttons
  30. When enabled (the default), each action button can show a small icon indicating what happens when the action is started:
  31. * **Popup dialog** — the action opens a popup (e.g. `onclick: execution-dialog`)
  32. * **Action history** — the action opens the action details page (e.g. `onclick: history`)
  33. * **Argument form** — the action opens an argument form on start
  34. * **Run in background** — the action runs without opening a dialog
  35. Set `showNavigateOnStartIcons: false` in your `config.yaml` to hide these indicator icons for a cleaner look.
  36. .`config.yaml`
  37. [source,yaml]
  38. ----
  39. showNavigateOnStartIcons: false
  40. ----
  41. [#section-navgiation-style]
  42. == Section Navigation Style
  43. `sectionNavigationStyle` - You can choose to have the section navigation buttons displayed as a Sidebar (`sidebar` - default), or along the top (`topbar`).
  44. === Sidebar navigation style (default)
  45. `sectionNavigationStyle: sidebar` looks like this;
  46. image::sidebar.png[]
  47. === Topbar navigation style
  48. `sectionNavigationStyle: topbar` looks like this;
  49. image::topbar.png[]
  50. [#show-version-number]
  51. == Version number in the footer
  52. You can control whether the installed OliveTin version is shown in the web interface. When enabled (the default), the footer displays text like **OliveTin 2024.06.02**. When disabled, the footer shows only **OliveTin** with no version number.
  53. This is controlled by the **showVersionNumber** policy (in `defaultPolicy` or per user/group in ACLs). Hiding the version also hides any "new version available" link in the footer and redacts the version in xref:troubleshooting/server-diagnostics.adoc[server diagnostics] output, which can be useful for privacy when sharing reports.
  54. * xref:reference/version_display.adoc[Version display] — full configuration and policy examples
  55. [#show-new-versions]
  56. == New version available - show/hide
  57. You can disable the "new version" information in the footer - the default for `showNewVersions` is `true`;
  58. .`config.yaml`
  59. [source,yaml]
  60. ----
  61. logLevel: "INFO"
  62. showNewVersions: false
  63. ----
  64. OliveTin does not check for updates by default. To enable it, see xref:reference/updateChecks.adoc[enable update checking].
  65. [#show-footer]
  66. == Footer visibility - show / hide
  67. You can disable the entire footer, if you would like a really minimal interface. The default for `showFooter` is `true`.
  68. .`config.yaml`
  69. [source,yaml]
  70. ----
  71. logLevel: "INFO"
  72. showFooter: false
  73. ----
  74. This means the <<show-new-versions,`showNewVersions`>> configuration option will automatically be `false` as well.
  75. == Additional section navigation links
  76. You can add custom links to the OliveTin navigation bar. This is useful if you want to link to other OliveTin instances, or other web applications.
  77. [source,yaml]
  78. ----
  79. additionalNavigationLinks:
  80. - title: Duck Duck Go
  81. url: https://duckduckgo.com
  82. target: _blank
  83. ----
  84. This will render like this;
  85. image::additionalNavigationLinks.png[]
  86. [#custom-js]
  87. == Custom JavaScript
  88. This is considered an advanced feature, and is not recommended unless you like writing your own code.
  89. You can add custom JavaScript to OliveTin, which will be executed on every page load. This can be useful for adding custom functionality to the web UI.
  90. 1. The custom javascript should be in a file called `custom.js` and saved in `custom-webui/`, which should be in the same directory as your `config.yaml`.
  91. 2. You can put whatever code you like really in your `custom.js` file.
  92. 3. Set `enableCustomJs: true` in your `config.yaml` to enable this feature.
  93. 4. Restart OliveTin. Note that the custom JavaScript will only be loaded once on startup, so if you are changing the custom JavaScript while OliveTin is running, you will need to restart OliveTin to see the changes.
  94. If the browser blocks your script or network calls with Content Security Policy errors, see xref:security/content_security_policy.adoc[Content Security Policy headers] for how to adjust or disable the CSP sent by OliveTin.
  95. == Custom CSS (with a custom theme)
  96. You can customize OliveTin with themes, but it's also possible to write your on very simple theme that contains just a few CSS rules to change the look and feel of OliveTin. This is very useful if you just want to change the colours of OliveTin, or hide a few elements.
  97. === Writing a simple theme with a CSS change
  98. You'll need to create a new theme, and let's assume our theme name is going to be called `uihack`. OliveTin themes are simply a directory of CSS and other assets. OliveTin looks for a directory called `custom-webui/themes/<theme-folder-name>` in the same directory as your `config.yaml` file.
  99. Start by creating a directory called `custom-webui/themes/uihack` relative to the same directory as your `config.yaml` file. In this directory, create a file called `theme.css`.
  100. [source,yaml]
  101. ----
  102. ├── config.yaml
  103. └── custom-webui
  104. └── themes
  105. └── uihack
  106. └── theme.css
  107. ----
  108. Here's an example of what your `theme.css` should contain;
  109. ```css
  110. body {
  111. background-color: red;
  112. }
  113. ```
  114. === Setup OliveTin config to use your theme
  115. Now you need to tell OliveTin to use your new theme. To do this, set `themeName: uihack` in your OliveTin config.yaml and restart OliveTin.
  116. ```yaml
  117. logLevel: "INFO"
  118. themeName: uihack
  119. ```
  120. [WARNING]
  121. OliveTin will by default only read theme.css once on startup. If you are intending to change theme.css while OliveTin is running, set `themeCacheDisabled: true` in your config.yaml. This will make OliveTin read theme.css on every request, and is useful for development.
  122. Restart OliveTin for the theme change to take effect. Beware of the theme cache mentioned above, if you are making changes to the CCS and refreshing the page a few times.
  123. * xref:reference/reference_themes_for_developers.adoc[More information on theme development]