webui.adoc 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. `popupOnStart: execution-dialog`)
  32. * **Argument form** — the action opens an argument form on start
  33. * **Run in background** — the action runs without opening a dialog
  34. Set `showNavigateOnStartIcons: false` in your `config.yaml` to hide these indicator icons for a cleaner look.
  35. .`config.yaml`
  36. [source,yaml]
  37. ----
  38. showNavigateOnStartIcons: false
  39. ----
  40. [#section-navgiation-style]
  41. == Section Navigation Style
  42. `sectionNavigationStyle` - You can choose to have the section navigation buttons displayed as a Sidebar (`sidebar` - default), or along the top (`topbar`).
  43. === Sidebar navigation style (default)
  44. `sectionNavigationStyle: sidebar` looks like this;
  45. image::sidebar.png[]
  46. === Topbar navigation style
  47. `sectionNavigationStyle: topbar` looks like this;
  48. image::topbar.png[]
  49. [#show-version-number]
  50. == Version number in the footer
  51. 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.
  52. 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.
  53. * xref:reference/version_display.adoc[Version display] — full configuration and policy examples
  54. [#show-new-versions]
  55. == New version available - show/hide
  56. You can disable the "new version" information in the footer - the default for `showNewVersions` is `true`;
  57. .`config.yaml`
  58. [source,yaml]
  59. ----
  60. logLevel: "INFO"
  61. showNewVersions: false
  62. ----
  63. OliveTin does not check for updates by default. To enable it, see xref:reference/updateChecks.adoc[enable update checking].
  64. [#show-footer]
  65. == Footer visibility - show / hide
  66. You can disable the entire footer, if you would like a really minimal interface. The default for `showFooter` is `true`.
  67. .`config.yaml`
  68. [source,yaml]
  69. ----
  70. logLevel: "INFO"
  71. showFooter: false
  72. ----
  73. This means the <<show-new-versions,`showNewVersions`>> configuration option will automatically be `false` as well.
  74. == Additional section navigation links
  75. 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.
  76. [source,yaml]
  77. ----
  78. additionalNavigationLinks:
  79. - title: Duck Duck Go
  80. url: https://duckduckgo.com
  81. target: _blank
  82. ----
  83. This will render like this;
  84. image::additionalNavigationLinks.png[]
  85. [#custom-js]
  86. == Custom JavaScript
  87. This is considered an advanced feature, and is not recommended unless you like writing your own code.
  88. 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.
  89. 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`.
  90. 2. You can put whatever code you like really in your `custom.js` file.
  91. 3. Set `enableCustomJs: true` in your `config.yaml` to enable this feature.
  92. 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.
  93. 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.
  94. == Custom CSS (with a custom theme)
  95. 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.
  96. === Writing a simple theme with a CSS change
  97. 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.
  98. 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`.
  99. [source,yaml]
  100. ----
  101. ├── config.yaml
  102. └── custom-webui
  103. └── themes
  104. └── uihack
  105. └── theme.css
  106. ----
  107. Here's an example of what your `theme.css` should contain;
  108. ```css
  109. body {
  110. background-color: red;
  111. }
  112. ```
  113. === Setup OliveTin config to use your theme
  114. 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.
  115. ```yaml
  116. logLevel: "INFO"
  117. themeName: uihack
  118. ```
  119. [WARNING]
  120. 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.
  121. 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.
  122. * xref:reference/reference_themes_for_developers.adoc[More information on theme development]