Skip to content

Commit

Permalink
Merge branch 'main' into ci-docker-build-speed
Browse files Browse the repository at this point in the history
  • Loading branch information
moabu committed Feb 16, 2024
2 parents 63c1118 + 83eb48f commit 3799440
Show file tree
Hide file tree
Showing 55 changed files with 356 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/jans-linux-setup/jans_setup/setup_app/version.py @moabu @mo-auto
/jans-linux-setup/static/scripts/admin_ui_plugin.py @devrimyatar @duttarnab
/jans-cache-refresh/ @yurem @shekhar16
/jans-link/ @shekhar16
/jans-link/ @yurem @yuriyz
/agama/ @jgomer2001
/jans-casa/ @jgomer2001 @maduvena
/demos/jans-tarp/ @duttarnab
4 changes: 2 additions & 2 deletions docker-jans-all-in-one/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ FROM ${JANS_SAML_IMAGE} AS jans-saml-src
# app
# ===

FROM bellsoft/liberica-openjdk-alpine:17.0.8@sha256:e82fb905ca6efffcdb1b0ed58f207b0ce91aeada78c218ae7dbb16bb31635728
FROM bellsoft/liberica-openjdk-alpine:17.0.9@sha256:915d7a6c5874638a735296a99ac28c4a9cefb9bfda2bef796fc564449d44d6cc

# hadolint ignore=DL3018
RUN apk update \
Expand Down Expand Up @@ -161,7 +161,7 @@ RUN mkdir -p /opt/jans/configurator/db \
COPY app /app

# CN version as env var (with suffix if any, i.e. SNAPSHOT)
ENV CN_VERSION=1.1.0
ENV CN_VERSION=1.1.0-SNAPSHOT

# set directory contains installer code that will be added to Python sys.path
ENV PYTHONPATH=/app
Expand Down
32 changes: 15 additions & 17 deletions docker-jans-all-in-one/Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
IMAGE_VERSION?=$(shell grep -Po 'org.opencontainers.image.version="\K.*?(?=")' Dockerfile)
IMAGE_NAME?=$(shell grep -Po 'org.opencontainers.image.url="\K.*?(?=")' Dockerfile)
DEV_VERSION?=$(shell echo ${IMAGE_VERSION} | cut -d '-' -f 1)_dev
IMAGE_VERSION?=$(shell grep -Po 'org.opencontainers.image.version="\K.*?(?=")' Dockerfile)_dev
IMAGE_URL=$(shell grep -Po 'org.opencontainers.image.url="\K.*?(?=")' Dockerfile)
IMAGE?=${IMAGE_URL}:${IMAGE_VERSION}

# pass extra build args, i.e. `make build-dev BUILD_ARGS="--no-cache"`
BUILD_ARGS?=

# pass extra trivy args, i.e. `make trivy-scan TRIVY_ARGS="-f json"`
TRIVY_ARGS?=

# pass extra build args, i.e. `make grype-scan GRYPE_ARGS="-o json"`
GRYPE_ARGS?=
# pass extra args to the targets, for example:
#
# - `make build-dev ARGS="--no-cache"`
# - `make trivy-scan TRIVY_ARGS="-f json"`
# - `make grype-scan GRYPE_ARGS="-o json"`
ARGS?=

.PHONY: test clean all build-dev trivy-scan grype-scan
.DEFAULT_GOAL := build-dev

build-dev:
@echo "[I] Building Docker image ${IMAGE_NAME}:${DEV_VERSION}"
@docker build --rm --force-rm ${BUILD_ARGS} -t ${IMAGE_NAME}:${DEV_VERSION} .
@echo "[I] Building OCI image ${IMAGE}"
@docker build --rm --force-rm ${ARGS} -t ${IMAGE} .

trivy-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using trivy"
@trivy image --security-checks vuln ${TRIVY_ARGS} ${IMAGE_NAME}:${DEV_VERSION}
@echo "[I] Scanning OCI image ${IMAGE} using trivy"
@trivy image --scanners vuln ${ARGS} ${IMAGE}

grype-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using grype"
@grype -v ${GRYPE_ARGS} ${IMAGE_NAME}:${DEV_VERSION}
@echo "[I] Scanning OCI image ${IMAGE} using grype"
@grype -v ${ARGS} ${IMAGE}
2 changes: 1 addition & 1 deletion docker-jans-all-in-one/app/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ fqdn==1.5.1
ruamel.yaml==0.18.5
supervisor==4.2.5
pluggy==1.3.0
git+https://github.com/JanssenProject/jans@2eb603e383e54611783435af82f2492da3050c3b#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@0df521304ba836b2d38480578b7668c8f2e89a85#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
2 changes: 1 addition & 1 deletion docker-jans-auth-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bellsoft/liberica-openjdk-alpine:17.0.8@sha256:e82fb905ca6efffcdb1b0ed58f207b0ce91aeada78c218ae7dbb16bb31635728
FROM bellsoft/liberica-openjdk-alpine:17.0.9@sha256:915d7a6c5874638a735296a99ac28c4a9cefb9bfda2bef796fc564449d44d6cc

# ===============
# Alpine packages
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-auth-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build-dev:

trivy-scan:
@echo "[I] Scanning OCI image ${IMAGE} using trivy"
@trivy image --security-checks vuln ${ARGS} ${IMAGE}
@trivy image --scanners vuln ${ARGS} ${IMAGE}

grype-scan:
@echo "[I] Scanning OCI image ${IMAGE} using grype"
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-auth-server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# pinned to py3-grpcio version to avoid failure on native extension build
grpcio==1.54.2
git+https://github.com/JanssenProject/jans@2eb603e383e54611783435af82f2492da3050c3b#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@0df521304ba836b2d38480578b7668c8f2e89a85#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
2 changes: 1 addition & 1 deletion docker-jans-casa/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bellsoft/liberica-openjre-alpine:17.0.8@sha256:156b75d18d01f1a83f9a279e80dad82773c212559b20e40620ccb06b1120ce4f
FROM bellsoft/liberica-openjre-alpine:17.0.9@sha256:7c9948b1e267037b7cadfe448e732b9cb719bfd38d8c5811f2f2d33cc0c05123

# ===============
# Alpine packages
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-casa/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
webdavclient3>=3.14.5
# pinned to py3-grpcio version to avoid failure on native extension build
grpcio==1.54.2
git+https://github.com/JanssenProject/jans@2eb603e383e54611783435af82f2492da3050c3b#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@0df521304ba836b2d38480578b7668c8f2e89a85#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
2 changes: 1 addition & 1 deletion docker-jans-certmanager/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bellsoft/liberica-openjre-alpine:17.0.8@sha256:156b75d18d01f1a83f9a279e80dad82773c212559b20e40620ccb06b1120ce4f
FROM bellsoft/liberica-openjre-alpine:17.0.9@sha256:7c9948b1e267037b7cadfe448e732b9cb719bfd38d8c5811f2f2d33cc0c05123

# ===============
# Alpine packages
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-certmanager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build-dev:

trivy-scan:
@echo "[I] Scanning OCI image ${IMAGE} using trivy"
@trivy image --security-checks vuln ${ARGS} ${IMAGE}
@trivy image --scanners vuln ${ARGS} ${IMAGE}

grype-scan:
@echo "[I] Scanning OCI image ${IMAGE} using grype"
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-certmanager/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pinned to py3-grpcio version to avoid failure on native extension build
grpcio==1.54.2
click==8.1.7
git+https://github.com/JanssenProject/jans@2eb603e383e54611783435af82f2492da3050c3b#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@0df521304ba836b2d38480578b7668c8f2e89a85#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
4 changes: 2 additions & 2 deletions docker-jans-config-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bellsoft/liberica-openjre-alpine:17.0.8@sha256:156b75d18d01f1a83f9a279e80dad82773c212559b20e40620ccb06b1120ce4f
FROM bellsoft/liberica-openjre-alpine:17.0.9@sha256:7c9948b1e267037b7cadfe448e732b9cb719bfd38d8c5811f2f2d33cc0c05123

# ===============
# Alpine packages
Expand Down Expand Up @@ -40,7 +40,7 @@ RUN wget -q https://maven.jans.io/maven/io/jans/jython-installer/${JYTHON_VERSIO
# Config API
# ==========

ENV CN_VERSION=1.1.0
ENV CN_VERSION=1.1.0-SNAPSHOT
ENV CN_BUILD_DATE='2024-02-02 12:43'
ENV CN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-config-api-server/${CN_VERSION}/jans-config-api-server-${CN_VERSION}.war

Expand Down
2 changes: 1 addition & 1 deletion docker-jans-config-api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build-dev:

trivy-scan:
@echo "[I] Scanning OCI image ${IMAGE} using trivy"
@trivy image --security-checks vuln ${ARGS} ${IMAGE}
@trivy image --scanners vuln ${ARGS} ${IMAGE}

grype-scan:
@echo "[I] Scanning OCI image ${IMAGE} using grype"
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-config-api/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# pinned to py3-grpcio version to avoid failure on native extension build
grpcio==1.54.2
git+https://github.com/JanssenProject/jans@2eb603e383e54611783435af82f2492da3050c3b#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@0df521304ba836b2d38480578b7668c8f2e89a85#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
2 changes: 1 addition & 1 deletion docker-jans-configurator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bellsoft/liberica-openjre-alpine:17.0.8@sha256:156b75d18d01f1a83f9a279e80dad82773c212559b20e40620ccb06b1120ce4f
FROM bellsoft/liberica-openjre-alpine:17.0.9@sha256:7c9948b1e267037b7cadfe448e732b9cb719bfd38d8c5811f2f2d33cc0c05123

# ===============
# Alpine packages
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-configurator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build-dev:

trivy-scan:
@echo "[I] Scanning OCI image ${IMAGE} using trivy"
@trivy image --security-checks vuln ${ARGS} ${IMAGE}
@trivy image --scanners vuln ${ARGS} ${IMAGE}

grype-scan:
@echo "[I] Scanning OCI image ${IMAGE} using grype"
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-configurator/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ grpcio==1.54.2
click==8.1.7
marshmallow==3.20.1
fqdn==1.5.1
git+https://github.com/JanssenProject/jans@2eb603e383e54611783435af82f2492da3050c3b#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@0df521304ba836b2d38480578b7668c8f2e89a85#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
2 changes: 1 addition & 1 deletion docker-jans-fido2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bellsoft/liberica-openjre-alpine:17.0.8@sha256:156b75d18d01f1a83f9a279e80dad82773c212559b20e40620ccb06b1120ce4f
FROM bellsoft/liberica-openjre-alpine:17.0.9@sha256:7c9948b1e267037b7cadfe448e732b9cb719bfd38d8c5811f2f2d33cc0c05123

# ===============
# Alpine packages
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-fido2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build-dev:

trivy-scan:
@echo "[I] Scanning OCI image ${IMAGE} using trivy"
@trivy image --security-checks vuln ${ARGS} ${IMAGE}
@trivy image --scanners vuln ${ARGS} ${IMAGE}

grype-scan:
@echo "[I] Scanning OCI image ${IMAGE} using grype"
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-fido2/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# pinned to py3-grpcio version to avoid failure on native extension build
grpcio==1.54.2
git+https://github.com/JanssenProject/jans@2eb603e383e54611783435af82f2492da3050c3b#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@0df521304ba836b2d38480578b7668c8f2e89a85#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
2 changes: 1 addition & 1 deletion docker-jans-keycloak-link/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bellsoft/liberica-openjre-alpine:17.0.8@sha256:156b75d18d01f1a83f9a279e80dad82773c212559b20e40620ccb06b1120ce4f
FROM bellsoft/liberica-openjre-alpine:17.0.9@sha256:7c9948b1e267037b7cadfe448e732b9cb719bfd38d8c5811f2f2d33cc0c05123

# ===============
# Alpine packages
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-keycloak-link/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build-dev:

trivy-scan:
@echo "[I] Scanning OCI image ${IMAGE} using trivy"
@trivy image --security-checks vuln ${ARGS} ${IMAGE}
@trivy image --scanners vuln ${ARGS} ${IMAGE}

grype-scan:
@echo "[I] Scanning OCI image ${IMAGE} using grype"
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-keycloak-link/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# pinned to py3-grpcio version to avoid failure on native extension build
grpcio==1.54.2
git+https://github.com/JanssenProject/jans@2eb603e383e54611783435af82f2492da3050c3b#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@0df521304ba836b2d38480578b7668c8f2e89a85#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
2 changes: 1 addition & 1 deletion docker-jans-link/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bellsoft/liberica-openjre-alpine:17.0.8@sha256:156b75d18d01f1a83f9a279e80dad82773c212559b20e40620ccb06b1120ce4f
FROM bellsoft/liberica-openjre-alpine:17.0.9@sha256:7c9948b1e267037b7cadfe448e732b9cb719bfd38d8c5811f2f2d33cc0c05123

# ===============
# Alpine packages
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-link/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build-dev:

trivy-scan:
@echo "[I] Scanning OCI image ${IMAGE} using trivy"
@trivy image --security-checks vuln ${ARGS} ${IMAGE}
@trivy image --scanners vuln ${ARGS} ${IMAGE}

grype-scan:
@echo "[I] Scanning OCI image ${IMAGE} using grype"
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-link/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# pinned to py3-grpcio version to avoid failure on native extension build
grpcio==1.54.2
git+https://github.com/JanssenProject/jans@2eb603e383e54611783435af82f2492da3050c3b#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@0df521304ba836b2d38480578b7668c8f2e89a85#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
2 changes: 1 addition & 1 deletion docker-jans-persistence-loader/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bellsoft/liberica-openjre-alpine:17.0.8@sha256:156b75d18d01f1a83f9a279e80dad82773c212559b20e40620ccb06b1120ce4f
FROM bellsoft/liberica-openjre-alpine:17.0.9@sha256:7c9948b1e267037b7cadfe448e732b9cb719bfd38d8c5811f2f2d33cc0c05123

# ===============
# Alpine packages
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-persistence-loader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build-dev:

trivy-scan:
@echo "[I] Scanning OCI image ${IMAGE} using trivy"
@trivy image --security-checks vuln ${ARGS} ${IMAGE}
@trivy image --scanners vuln ${ARGS} ${IMAGE}

grype-scan:
@echo "[I] Scanning OCI image ${IMAGE} using grype"
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-persistence-loader/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# pinned to py3-grpcio version to avoid failure on native extension build
grpcio==1.54.2
git+https://github.com/JanssenProject/jans@2eb603e383e54611783435af82f2492da3050c3b#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@0df521304ba836b2d38480578b7668c8f2e89a85#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
2 changes: 1 addition & 1 deletion docker-jans-saml/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM quay.io/keycloak/keycloak:23.0.3@sha256:4f72a5b0c076755e806457d96404dd28dc1394013933d7170c154c26db9b6a16 as kc-src

FROM bellsoft/liberica-openjre-alpine:17.0.8@sha256:156b75d18d01f1a83f9a279e80dad82773c212559b20e40620ccb06b1120ce4f
FROM bellsoft/liberica-openjre-alpine:17.0.9@sha256:7c9948b1e267037b7cadfe448e732b9cb719bfd38d8c5811f2f2d33cc0c05123

# ===============
# Alpine packages
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-saml/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build-dev:

trivy-scan:
@echo "[I] Scanning OCI image ${IMAGE} using trivy"
@trivy image --security-checks vuln ${ARGS} ${IMAGE}
@trivy image --scanners vuln ${ARGS} ${IMAGE}

grype-scan:
@echo "[I] Scanning OCI image ${IMAGE} using grype"
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-saml/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# pinned to py3-grpcio version to avoid failure on native extension build
grpcio==1.54.2
git+https://github.com/JanssenProject/jans@2eb603e383e54611783435af82f2492da3050c3b#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@0df521304ba836b2d38480578b7668c8f2e89a85#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
2 changes: 1 addition & 1 deletion docker-jans-scim/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bellsoft/liberica-openjdk-alpine:17.0.8@sha256:e82fb905ca6efffcdb1b0ed58f207b0ce91aeada78c218ae7dbb16bb31635728
FROM bellsoft/liberica-openjdk-alpine:17.0.9@sha256:915d7a6c5874638a735296a99ac28c4a9cefb9bfda2bef796fc564449d44d6cc

# ===============
# Alpine packages
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-scim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build-dev:

trivy-scan:
@echo "[I] Scanning OCI image ${IMAGE} using trivy"
@trivy image --security-checks vuln ${ARGS} ${IMAGE}
@trivy image --scanners vuln ${ARGS} ${IMAGE}

grype-scan:
@echo "[I] Scanning OCI image ${IMAGE} using grype"
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-scim/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pinned to py3-grpcio version to avoid failure on native extension build
grpcio==1.54.2
ruamel.yaml==0.18.5
git+https://github.com/JanssenProject/jans@2eb603e383e54611783435af82f2492da3050c3b#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
git+https://github.com/JanssenProject/jans@0df521304ba836b2d38480578b7668c8f2e89a85#egg=jans-pycloudlib&subdirectory=jans-pycloudlib
2 changes: 1 addition & 1 deletion jans-cli-tui/cli_tui/cli/config_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ def process_command_by_id(self, operation_id, url_suffix, endpoint_args, data_fn
else:
cmd_data = self.get_json_from_file(data_fn)

if call_method in ('post', 'put', 'patch'):
if call_method in ('post', 'put', 'patch', 'delete'):
self.log_cmd(operation_id, url_suffix, endpoint_args, cmd_data)

if path['__path__'] == '/admin-ui/adminUIPermissions' and data and 'permission' in data:
Expand Down
14 changes: 7 additions & 7 deletions jans-cli-tui/cli_tui/plugins/010_auth_server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@

from utils.static import DialogResult, cli_style, common_strings
from utils.background_tasks import retrieve_enabled_scripts
from utils.utils import DialogUtils
from utils.utils import common_data
from utils.utils import DialogUtils, common_data, get_help_with
from utils.multi_lang import _

from wui_components.jans_path_browser import jans_file_browser_dialog, BrowseType
Expand Down Expand Up @@ -108,11 +107,11 @@ async def get_appconfiguration(self) -> None:

def help(self):
current_tab = self.nav_bar.navbar_entries[self.nav_bar.cur_navbar_selection][0]
tap_help = getattr(getattr(self, current_tab, None), 'jans_help', None)
if tap_help:
help_message = tap_help
if hasattr(self.oauth_containers[current_tab], 'jans_help'):
help_message = self.oauth_containers[current_tab].jans_help
else:
help_message = self.app.jans_help

self.app.show_message(_("Help "),help_message,tobefocused=self.app.center_container)

async def retrieve_sopes(self) -> None:
Expand Down Expand Up @@ -204,7 +203,7 @@ def oauth_prepare_containers(self) -> None:
on_enter=self.edit_client,
on_display=self.app.data_display_dialog,
on_delete=self.delete_client,
jans_help=HTML(_("Press key <b>s</b> to save client summary, <b>d</b> to display configurations")),
jans_help=HTML(_("Press key <b>s</b> to save client summary, <b>v</b> to display configurations")),
custom_key_bindings=[('s', self.save_client_summary)],
headerColor=cli_style.navbar_headcolor,
entriesColor=cli_style.navbar_entriescolor,
Expand All @@ -224,6 +223,8 @@ def oauth_prepare_containers(self) -> None:
DynamicContainer(lambda: self.clients_container_buttons)
],style=cli_style.container)

self.oauth_containers['clients'].jans_help = get_help_with(f'<s> {_("Save client summary")}\n')


self.oauth_containers['keys'] = HSplit([
VSplit([
Expand Down Expand Up @@ -318,7 +319,6 @@ def oauth_nav_selection_changed(

self.oauth_main_area = set_area


def save_client_summary(self, event):

def do_save(path):
Expand Down
Loading

0 comments on commit 3799440

Please sign in to comment.