Customizing / own buttons
Usecase
We want to make own "buttons" with simple Links to KDO webapps, like this user dont need to switch from ui to ui. There is no break in the work and feel for endusers.
Problem
There is no "easy going" method to create buttons for admins within the admin-ui - I think this is part of the UCS Appliance, so it could be possible to implement it into openDesk?
Current workaround
There is a "hard" way to create buttons with the use of helmfile and the udm rest API. To get a feeling of what we did, here is a Screenshot of our current UI.
We can find the data in a ConfigMap stack-data-swp-data
, we can view it in the cluster or with helmfile template - helmfile -n kdo -e dev template -l name=ums-stack-data-swp --output-dir out
.
The initialization is done via two jobs stack-data-ums
and stack-data-swp
(still old name with "swp" here), documentation can be found here. Examples can be found here and here.
To make it "simple" to use, we have to make sure that custom configs will be avaiable via the stackDataSwp.extraDataFiles
- documentation can be found here. We are kinda sure, that this is not the ideal way to create own customization, but for the evaluation it´s enough. Maybe it will help the community and shows the need of customization in openDesk.
For the community
Here is the configuration for our current UI (Screenshot at the top).
helmfile/apps/univention-management-stack/kdo-custom-data/99-custom-overrides.yaml
# See: https://github.com/univention/ums-stack-data/tree/main/helm/stack-data-swp/data-files/default
# See: https://github.com/univention/ums-stack-data/blob/c98201ff0452924c05e8a5bdf5ddd6935e30c835/docker/data-loader/bin/process-join-data.py#L45
{{ with .Values.stackDataContext }}
---
# Create a "Group" in the portal and link it to the default portal called "cn=domain"
action: "create"
module: "portals/category"
position: "cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
name: "kdo.example"
displayName:
de_DE: "KDO Beispiel Gruppe"
en_US: "KDO Example Group"
---
# Add Category into the Portal
action: "ensure_list_contains"
module: "portals/portal"
position: "cn=domain,cn=portal,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
categories:
- "cn=kdo.example,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
---
# Create a "Group" in the portal and link it to the default portal called "cn=domain"
action: "create"
module: "portals/category"
position: "cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
name: "kdo.apps"
displayName:
de_DE: "KDO Apps"
en_US: "KDO Apps"
---
# Add Category into the Portal
action: "ensure_list_contains"
module: "portals/portal"
position: "cn=domain,cn=portal,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
categories:
- "cn=kdo.apps,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
---
# Create or update an "Entry"
action: "create_or_modify"
module: "portals/entry"
position: "cn=entry,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
name: "kdo.website"
# Flag would make it only visible to "not logged in" users
anonymous: false
# Special case, we pass the icon as a custom value from Helmfile.
# This is more of a home-grown solution, there is no real support for this yet developed
# upstream.
icon: {{ $.Values.customStackDataContext.kdoLogo }}
link:
- - "en_US"
- "https://kdo.de/"
allowedGroups:
{{- toYaml .portaltileGroupUserAll | nindent 4 }}
linkTarget: "newwindow"
description:
de_DE: "KDO Webseite"
en_US: "KDO Website"
displayName:
de_DE: "KDO Webseite"
en_US: "KDO Website"
---
# Add the entry into the Category from above
action: "ensure_list_contains"
module: "portals/category"
position: "cn=kdo.example,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
entries:
- cn=kdo.website,cn=entry,cn=portals,cn=univention,{{ .ldapBase }}
---
# Customize order
# The attribute "entries" is a list which has an order
action: "modify"
module: "portals/portal"
position: "cn=domain,cn=portal,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
categories:
# Our custom entries
- cn=kdo.apps,cn=category,cn=portals,cn=univention,{{ .ldapBase }}
- cn=kdo.example,cn=category,cn=portals,cn=univention,{{ .ldapBase }}
# Upstream entries
# Note: This approach is troublesome, it has to be kept in sync with openDesk.
- "cn=swp.anonymous,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
- "cn=swp.admin_usersgroups,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
- "cn=swp.admin_groupware,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
- "cn=swp.admin_portal,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
- "cn=swp.groupware,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
- "cn=swp.fileshare,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
- "cn=swp.management,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
- "cn=swp.realtime,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
---
# Create or update an "Entry"
action: "create_or_modify"
module: "portals/entry"
position: "cn=entry,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
name: "kdo.website.offline"
# Flag would make it only visible to "not logged in" users
anonymous: true
# Special case, we pass the icon as a custom value from Helmfile.
# This is more of a home-grown solution, there is no real support for this yet developed
# upstream.
icon: {{ $.Values.customStackDataContext.kdoLogo }}
link:
- - "en_US"
- "https://kdo.de/"
linkTarget: "newwindow"
description:
de_DE: "KDO Webseite"
en_US: "KDO Website"
displayName:
de_DE: "KDO Webseite"
en_US: "KDO Website"
---
# Add the entry into the Category from above
action: "ensure_list_contains"
module: "portals/category"
position: "cn=kdo.example,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
entries:
- cn=kdo.website.offline,cn=entry,cn=portals,cn=univention,{{ .ldapBase }}
---
# Loga-Button
# Create or update an "Entry"
action: "create_or_modify"
module: "portals/entry"
position: "cn=entry,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
name: "kdo.loga"
# Flag would make it only visible to "not logged in" users
anonymous: false
# Special case, we pass the icon as a custom value from Helmfile.
# This is more of a home-grown solution, there is no real support for this yet developed
# upstream.
icon: {{ $.Values.customStackDataContext.kdoLogo }}
link:
- - "en_US"
- "https://example/"
allowedGroups:
{{- toYaml .portaltileGroupUserAll | nindent 4 }}
linkTarget: "newwindow"
description:
de_DE: "KDO Zeiterfassung"
en_US: "KDO Timemanagement"
displayName:
de_DE: "KDO Zeiterfassung"
en_US: "KDO Timemanagement"
---
# Add the entry into the Category from above
action: "ensure_list_contains"
module: "portals/category"
position: "cn=kdo.apps,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
entries:
- cn=kdo.loga,cn=entry,cn=portals,cn=univention,{{ .ldapBase }}
---
# Owa Button
# Create or update an "Entry"
action: "create_or_modify"
module: "portals/entry"
position: "cn=entry,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
name: "kdo.owa"
# Flag would make it only visible to "not logged in" users
anonymous: false
# Special case, we pass the icon as a custom value from Helmfile.
# This is more of a home-grown solution, there is no real support for this yet developed
# upstream.
icon: {{ $.Values.customStackDataContext.exchange }}
link:
- - "en_US"
- "https://example.com/"
allowedGroups:
{{- toYaml .portaltileGroupUserAll | nindent 4 }}
linkTarget: "newwindow"
description:
de_DE: "KDO Mail"
en_US: "KDO Mail"
displayName:
de_DE: "KDO Mail"
en_US: "KDO Mail"
---
# Add the entry into the Category from above
action: "ensure_list_contains"
module: "portals/category"
position: "cn=kdo.apps,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
entries:
- cn=kdo.owa,cn=entry,cn=portals,cn=univention,{{ .ldapBase }}
---
# KDO Keycloak
# Create or update an "Entry"
action: "create_or_modify"
module: "portals/entry"
position: "cn=entry,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
name: "kdo.keycloak"
# Flag would make it only visible to "not logged in" users
anonymous: false
# Special case, we pass the icon as a custom value from Helmfile.
# This is more of a home-grown solution, there is no real support for this yet developed
# upstream.
icon: {{ $.Values.customStackDataContext.kdoLogo }}
link:
- - "en_US"
- "https://example.de/"
allowedGroups:
{{- toYaml .portaltileGroupUserAll | nindent 4 }}
linkTarget: "newwindow"
description:
de_DE: "KDO Keycloak"
en_US: "KDO Keycloak"
displayName:
de_DE: "KDO Keycloak"
en_US: "KDO Keycloak"
---
# Add the entry into the Category from above
action: "ensure_list_contains"
module: "portals/category"
position: "cn=kdo.apps,cn=category,cn=portals,cn=univention,{{ .ldapBase }}"
properties:
entries:
- cn=kdo.keycloak,cn=entry,cn=portals,cn=univention,{{ .ldapBase }}
{{ end }}
helmfile/apps/univention-management-stack/values-stack-data-swp.yaml.gotmpl
To make the icons avaiable you have to put them here like this:
customStackDataContext:
kdoLogo: {{ readFile "./kdo-custom-data/kdo-logo.svg" | b64enc | quote }}
Make sure you follow with the ucs appliance documentation for the extraDataFiles
, we implemented it like this:
extraDataFiles:
99-custom-overrides: {{ readFile "./kdo-custom-data/99-custom-overrides.yaml" | quote }}
Icons and infos
You have to put the icons in the correct path or link them in the values correctly. Right now all icons are in different paths, this should be fixed at some point as well. To deploy the changes we recommend to make it via the helmfile cli, so you don´t have to wait for the pipeline process - helmfile apply -n namespace -e environments -l name=ums-stack-data-swp
.
If you have questions you can reach out to me.