From 8d8f3ca5a8c0c787a99680ed371bec083ef6f541 Mon Sep 17 00:00:00 2001 From: Omar Siam Date: Thu, 11 Apr 2024 11:56:57 +0200 Subject: [PATCH 1/7] Remove references to second cluster --- .github/workflows/starter.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/starter.yaml b/.github/workflows/starter.yaml index ef112631..4426d549 100644 --- a/.github/workflows/starter.yaml +++ b/.github/workflows/starter.yaml @@ -58,7 +58,7 @@ jobs: - name: Generate PUBLIC_URL if not set id: generate_public_url run: | - kube_ingress_base_domain="${{ vars.KUBE_INGRESS_BASE_DOMAIN }}" + kube_ingress_base_domain="${{ vars.C2_KUBE_INGRESS_BASE_DOMAIN || vars.KUBE_INGRESS_BASE_DOMAIN }}" public_url="${{ needs.setup_workflow_env.outputs.PUBLIC_URL || vars.PUBLIC_URL }}" if [ "${public_url}x" == 'x' ] then public_url=https://${{ needs.setup_workflow_env.outputs.environment_short }}.${kube_ingress_base_domain} @@ -75,7 +75,7 @@ jobs: - name: Generate PUBLIC_URL if not set id: generate_public_url run: | - kube_ingress_base_domain="${{ vars.KUBE_INGRESS_BASE_DOMAIN }}" + kube_ingress_base_domain="${{ vars.C2_KUBE_INGRESS_BASE_DOMAIN || vars.KUBE_INGRESS_BASE_DOMAIN }}" public_url="${{ needs.setup_workflow_env.outputs.PUBLIC_URL || vars.PUBLIC_URL }}" if [ "${public_url}x" == 'x' ] then public_url=https://tunocent-${{ needs.setup_workflow_env.outputs.environment_short }}.${kube_ingress_base_domain} @@ -93,7 +93,7 @@ jobs: - name: Generate PUBLIC_URL if not set id: generate_public_url run: | - kube_ingress_base_domain="${{ vars.KUBE_INGRESS_BASE_DOMAIN }}" + kube_ingress_base_domain="${{ vars.C2_KUBE_INGRESS_BASE_DOMAIN || vars.KUBE_INGRESS_BASE_DOMAIN }}" public_url="${{ needs.setup_workflow_env.outputs.PUBLIC_URL || vars.PUBLIC_URL }}" if [ "${public_url}x" == 'x' ] then public_url=https://shawi-${{ needs.setup_workflow_env.outputs.environment_short }}.${kube_ingress_base_domain} @@ -111,7 +111,7 @@ jobs: - name: Generate PUBLIC_URL if not set id: generate_public_url run: | - kube_ingress_base_domain="${{ vars.KUBE_INGRESS_BASE_DOMAIN }}" + kube_ingress_base_domain="${{ vars.C2_KUBE_INGRESS_BASE_DOMAIN || vars.KUBE_INGRESS_BASE_DOMAIN }}" public_url="${{ needs.setup_workflow_env.outputs.PUBLIC_URL || vars.PUBLIC_URL }}" if [ "${public_url}x" == 'x' ] then public_url=https://wibarab-${{ needs.setup_workflow_env.outputs.environment_short }}.${kube_ingress_base_domain} From 69ffe9242abdf22b851ae1cbceb01dfddbb44129 Mon Sep 17 00:00:00 2001 From: Omar Siam Date: Thu, 11 Apr 2024 11:57:47 +0200 Subject: [PATCH 2/7] More test scenarios --- viacv-app.xpr | 163 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 156 insertions(+), 7 deletions(-) diff --git a/viacv-app.xpr b/viacv-app.xpr index 25cb3a9d..154e729a 100644 --- a/viacv-app.xpr +++ b/viacv-app.xpr @@ -8,6 +8,46 @@ scenario.associations + + + ../../vicav-content/anki-table-input.xml + + + + csv-table + + + + + XSL + + + + + 2 + + + + + + http://localhost:8984/vicav/project + + + + menu-json + + + + + XML + + + + + 2 + + + doc.xml @@ -264,7 +304,7 @@ - printable + corpus_utterances_print @@ -282,7 +322,90 @@ - ${pdu}/xslt/printable_path.xslt + ${pdu}/xslt/corpus_utterances_print.xsl + + + ${currentFileURL} + + + false + + + false + + + XSL + + + true + + + false + + + + + + false + + + + + + false + + + false + + + true + + + false + + + false + + + true + + + + + + + + + Saxon-HE + + + + + + + + + + + csv-table + + + + + + + + + pdf + + + Apache FOP + + + + + + ${pdu}/xslt/csv-table-export.xsl ${currentFileURL} @@ -335,7 +458,7 @@ - xslt + format @@ -346,7 +469,7 @@ - file:/V:/basexVicav/webapp/vicav-app/xslt/corpus_utterances.xslt + csv-anki false @@ -372,7 +495,7 @@ - corpus_utterances_print + printable @@ -390,7 +513,7 @@ - ${pdu}/xslt/corpus_utterances_print.xsl + ${pdu}/xslt/printable_path.xslt ${currentFileURL} @@ -438,7 +561,32 @@ true - + + + + + + xslt + + + + + + + + + + + file:/V:/basexVicav/webapp/vicav-app/xslt/corpus_utterances.xslt + + + false + + + false + + + @@ -457,6 +605,7 @@ + \ No newline at end of file From 37888fd81cc9b8e82f6951ae2d96159c0cb1c220 Mon Sep 17 00:00:00 2001 From: Omar Siam Date: Thu, 11 Apr 2024 12:05:34 +0200 Subject: [PATCH 3/7] Remove references to second cluster --- .github/workflows/starter.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/starter.yaml b/.github/workflows/starter.yaml index 4426d549..ce8afce7 100644 --- a/.github/workflows/starter.yaml +++ b/.github/workflows/starter.yaml @@ -40,7 +40,7 @@ jobs: id: get_environment_from_git_ref run: | echo "Running on branch ${{ github.ref_name }}" - if [ "${{ github.ref }}" = "refs/heads/main" ]; then + if [ "${{ github.ref }}" = "refs/heads/master" ]; then echo "environment=production" echo "environment=production" >> $GITHUB_OUTPUT echo "environment_short=prod" >> $GITHUB_OUTPUT @@ -58,7 +58,7 @@ jobs: - name: Generate PUBLIC_URL if not set id: generate_public_url run: | - kube_ingress_base_domain="${{ vars.C2_KUBE_INGRESS_BASE_DOMAIN || vars.KUBE_INGRESS_BASE_DOMAIN }}" + kube_ingress_base_domain="${{ vars.KUBE_INGRESS_BASE_DOMAIN }}" public_url="${{ needs.setup_workflow_env.outputs.PUBLIC_URL || vars.PUBLIC_URL }}" if [ "${public_url}x" == 'x' ] then public_url=https://${{ needs.setup_workflow_env.outputs.environment_short }}.${kube_ingress_base_domain} @@ -75,7 +75,7 @@ jobs: - name: Generate PUBLIC_URL if not set id: generate_public_url run: | - kube_ingress_base_domain="${{ vars.C2_KUBE_INGRESS_BASE_DOMAIN || vars.KUBE_INGRESS_BASE_DOMAIN }}" + kube_ingress_base_domain="${{ vars.KUBE_INGRESS_BASE_DOMAIN }}" public_url="${{ needs.setup_workflow_env.outputs.PUBLIC_URL || vars.PUBLIC_URL }}" if [ "${public_url}x" == 'x' ] then public_url=https://tunocent-${{ needs.setup_workflow_env.outputs.environment_short }}.${kube_ingress_base_domain} @@ -93,7 +93,7 @@ jobs: - name: Generate PUBLIC_URL if not set id: generate_public_url run: | - kube_ingress_base_domain="${{ vars.C2_KUBE_INGRESS_BASE_DOMAIN || vars.KUBE_INGRESS_BASE_DOMAIN }}" + kube_ingress_base_domain="${{ vars.KUBE_INGRESS_BASE_DOMAIN }}" public_url="${{ needs.setup_workflow_env.outputs.PUBLIC_URL || vars.PUBLIC_URL }}" if [ "${public_url}x" == 'x' ] then public_url=https://shawi-${{ needs.setup_workflow_env.outputs.environment_short }}.${kube_ingress_base_domain} @@ -111,7 +111,7 @@ jobs: - name: Generate PUBLIC_URL if not set id: generate_public_url run: | - kube_ingress_base_domain="${{ vars.C2_KUBE_INGRESS_BASE_DOMAIN || vars.KUBE_INGRESS_BASE_DOMAIN }}" + kube_ingress_base_domain="${{ vars.KUBE_INGRESS_BASE_DOMAIN }}" public_url="${{ needs.setup_workflow_env.outputs.PUBLIC_URL || vars.PUBLIC_URL }}" if [ "${public_url}x" == 'x' ] then public_url=https://wibarab-${{ needs.setup_workflow_env.outputs.environment_short }}.${kube_ingress_base_domain} @@ -183,13 +183,13 @@ jobs: registry_root: ${{ needs.setup_workflow_env.outputs.registry_root }} image_tagged: ${{ needs.setup_workflow_env.outputs.image_tagged }} default_port: ${{ needs.setup_workflow_env.outputs.default_port }} - herokuish_base_image: ${{ needs.setup_workflow_env.outputs.herokuish_base_image }} - POSTGRES_ENABLED: ${{ needs.setup_workflow_env.outputs.POSTGRES_ENABLED }} fetch-depth: ${{ fromJson(needs.setup_workflow_env.outputs.fetch-depth)}} + herokuish_base_image: ${{ needs.setup_workflow_env.outputs.herokuish_base_image }} + POSTGRES_ENABLED: false submodules: ${{ needs.setup_workflow_env.outputs.submodules }} _3: needs: [setup_workflow_env, generate_workflow_vars, _1, _2] - uses: acdh-oeaw/gl-autodevops-minimal-port/.github/workflows/deploy-cluster-2.yml@main + uses: acdh-oeaw/gl-autodevops-minimal-port/.github/workflows/deploy.yml@main secrets: inherit with: environment: ${{ needs.generate_workflow_vars.outputs.environment}} @@ -198,13 +198,13 @@ jobs: APP_ROOT: ${{ needs.setup_workflow_env.outputs.APP_ROOT }} SERVICE_ID: ${{ needs.setup_workflow_env.outputs.SERVICE_ID }} PUBLIC_URL: ${{ needs.generate_workflow_vars.outputs.PUBLIC_URL }} - POSTGRES_ENABLED: ${{ needs.setup_workflow_env.outputs.POSTGRES_ENABLED == 'true'}} + POSTGRES_ENABLED: false default_port: "${{ needs.setup_workflow_env.outputs.default_port}}" fetch-depth: ${{ fromJson(needs.setup_workflow_env.outputs.fetch-depth)}} submodules: ${{ needs.setup_workflow_env.outputs.submodules }} _3-tunocent: needs: [setup_workflow_env, generate_workflow_vars-tunocent, _1-tunocent, _2] - uses: acdh-oeaw/gl-autodevops-minimal-port/.github/workflows/deploy-cluster-2.yml@main + uses: acdh-oeaw/gl-autodevops-minimal-port/.github/workflows/deploy.yml@main secrets: inherit with: environment: ${{ needs.generate_workflow_vars-tunocent.outputs.environment}} @@ -234,7 +234,7 @@ jobs: submodules: ${{ needs.setup_workflow_env.outputs.submodules }} _3-wibarab: needs: [setup_workflow_env, generate_workflow_vars-wibarab, _1-wibarab, _2] - uses: acdh-oeaw/gl-autodevops-minimal-port/.github/workflows/deploy-cluster-2.yml@main + uses: acdh-oeaw/gl-autodevops-minimal-port/.github/workflows/deploy.yml@main secrets: inherit with: environment: ${{ needs.generate_workflow_vars-wibarab.outputs.environment}} From f43a800908173288639b6b86a32fbc1754a5c68e Mon Sep 17 00:00:00 2001 From: Omar Siam Date: Thu, 11 Apr 2024 12:38:15 +0200 Subject: [PATCH 4/7] Default environment using generate_workflow_vars --- .github/workflows/starter.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/starter.yaml b/.github/workflows/starter.yaml index ce8afce7..bac5bce0 100644 --- a/.github/workflows/starter.yaml +++ b/.github/workflows/starter.yaml @@ -66,6 +66,7 @@ jobs: echo "public_url=$public_url" >> $GITHUB_OUTPUT outputs: PUBLIC_URL: ${{ steps.generate_public_url.outputs.public_url }} + environment: ${{ needs.setup_workflow_env.outputs.environment }} generate_workflow_vars-tunocent: needs: [setup_workflow_env] environment: From 5eb528b419058032b79f4f642e3d5c845b9212a6 Mon Sep 17 00:00:00 2001 From: Omar Siam Date: Fri, 12 Apr 2024 11:17:33 +0200 Subject: [PATCH 5/7] Ignore images in this repo --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 54a952c9..7e81c071 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ +**/.DS_Store OLDSITE/ # ide .idea node_modules/ backup +images/**/*.jpg +images/**/*.png \ No newline at end of file From 0c2226fbc6bbdd9c7818642a2e843d3418230d14 Mon Sep 17 00:00:00 2001 From: Omar Siam Date: Fri, 12 Apr 2024 14:00:39 +0200 Subject: [PATCH 6/7] Allow arbitrary parameters as params tag in item --- xslt/menu-json.xslt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xslt/menu-json.xslt b/xslt/menu-json.xslt index ca18b6ac..459246e0 100644 --- a/xslt/menu-json.xslt +++ b/xslt/menu-json.xslt @@ -60,7 +60,7 @@ <_ type="object"> - <xsl:value-of select="text()"/> + <xsl:value-of select="normalize-space(string-join(text(), ' '))"/> @@ -83,7 +83,7 @@ @@ -158,6 +158,7 @@ + From 0ee898466e02101e150cdd29d681cac48a6e3890 Mon Sep 17 00:00:00 2001 From: Omar Siam Date: Fri, 12 Apr 2024 15:12:40 +0200 Subject: [PATCH 7/7] Try restore old gallery rendering for classic UI --- vicav.xqm | 2 +- xslt/profile_01.xslt | 157 ++++++++++++++++++++++++++++++++++++------ xslt/profile_vue.xslt | 54 +++++++++++++++ 3 files changed, 190 insertions(+), 23 deletions(-) create mode 100644 xslt/profile_vue.xslt diff --git a/vicav.xqm b/vicav.xqm index f307b207..ed516a2a 100644 --- a/vicav.xqm +++ b/vicav.xqm @@ -381,7 +381,7 @@ declare %rest:produces('application/problem+xml') function vicav:get_profile($coll as xs:string, $id as xs:string*, $xsltfn as xs:string*, $print as xs:string*) { let $generateTeiMarker := exists($xsltfn) - let $xsltfn := if (exists($xsltfn)) then $xsltfn else "profile_01.xslt" + let $xsltfn := if (exists($xsltfn)) then $xsltfn else "profile_vue.xslt" return api-problem:or_result (prof:current-ns(), vicav:_get_profile#6, [$coll, $id, $xsltfn, $print, $generateTeiMarker, '/profile'], map:merge((cors:header(()), vicav:return_content_header())) ) diff --git a/xslt/profile_01.xslt b/xslt/profile_01.xslt index 57a8f558..4d8ccbfe 100644 --- a/xslt/profile_01.xslt +++ b/xslt/profile_01.xslt @@ -132,23 +132,57 @@ - - - - - - - - - - - +

-
+ + +
+ + + + + +
+
/
+ + + + + + +
+
+ + + + + +
+

+
+ + +
+
+ + + +
+ + + + + +
+
+
+
+
+
Typology
@@ -220,17 +254,48 @@ - +
+ - - - - - - - - - + + + +
+
/
+ + + + + + +
+ + + + + + +
+

+
+ + +
+
+ + + +
+ + + + + +
+
+
+
+
@@ -389,6 +454,54 @@
+ + +
+
+ + + + + + + + + + + + +
+

+
+ + +
+
+ + + +
+ + + + + +
+
+
+
+
+
+