diff --git a/alfa-client/apps/alfa-e2e/docker-compose.yml b/alfa-client/apps/alfa-e2e/docker-compose.yml index 063d8cb97462ede9360da3f320316be256a55c58..8994d0ba1df83cc3a256e13ed6c03ea61e85b6c4 100644 --- a/alfa-client/apps/alfa-e2e/docker-compose.yml +++ b/alfa-client/apps/alfa-e2e/docker-compose.yml @@ -69,6 +69,7 @@ services: - OZGCLOUD_BESCHEID_SMART_DOCUMENTS_BASIC_AUTH_PASSWORD=MGM - OZGCLOUD_BESCHEID_SMART_DOCUMENTS_TEMPLATE_GROUP=OzgCloudTest - OZGCLOUD_BESCHEID_SMART_DOCUMENTS_TEMPLATE=Halteverbot + - OZGCLOUD_VORGANG_MANAGER_SERVICE_ADDRESS=static://vorgang-manager:9090 ports: - 9091:9090 depends_on: @@ -111,7 +112,7 @@ services: - OZGCLOUD_VORGANG_BESCHEID_0_FORM_ENGINE_NAME=FormSolutions - OZGCLOUD_VORGANG_BESCHEID_0_FORM_ID=KFAS_STAGE_KI_10_Haltverbot_LANDESHACKATHON - OZGCLOUD_FEATURE_COLLABORATION_ENABLED=true - - OZGCLOUD_BARRIEREFREIHEIT_URL=http://bam.de + - OZGCLOUD_BARRIEREFREIHEIT_URL=https://static.dev.by.ozg-cloud.de/barrierefreiheit ports: - 8080:8080 - 5000:5000 diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/accessibility/vorgang-list.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/accessibility/vorgang-list.cy.ts index f3438210e69af79071e0ef8f9568cb17e336cbb3..006a109efa1e7e47333e4708c1b9ff219ba2b9c1 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/accessibility/vorgang-list.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/accessibility/vorgang-list.cy.ts @@ -43,7 +43,7 @@ describe('VorgangList Page', () => { const navigation: NavigationE2EComponent = mainPage.getNavigation(); const accTooltip: string = 'Barrierefreiheit'; - const accLink: string = 'http://bam.de'; + const accLink: string = 'https://static.dev.by.ozg-cloud.de/barrierefreiheit'; before(() => { initUsermanagerUsers(); diff --git a/alfa-client/apps/info/Jenkinsfile b/alfa-client/apps/info/Jenkinsfile index 2b7619392b6b040108a0e5c81d7ba274cd0bd022..229598a17788d64294d7911a2fd10dacbc88d92c 100644 --- a/alfa-client/apps/info/Jenkinsfile +++ b/alfa-client/apps/info/Jenkinsfile @@ -43,13 +43,6 @@ pipeline { IMAGE_TAG = generateImageTag() - if (isMasterBranch()) { - IMAGE_TAG = "snapshot-latest" - } - else if (isReleaseBranch()) { - IMAGE_TAG = "latest" - } - loginToDockerRegistry() sh "INPUT_TAGS=${IMAGE_TAG} INPUT_IMAGES=docker.ozg-sh.de/info-client-by npx nx container info --configuration=production-by" @@ -60,6 +53,34 @@ pipeline { } } + stage('Tag and Push snapshot-latest Docker image') { + when { + branch 'master' + } + steps { + script { + FAILED_STAGE=env.STAGE_NAME + + tagAndPushDockerImage('snapshot-latest') + } + } + } + + stage('Tag and Push latest Docker image') { + when { + expression { + isReleaseBranch() + } + } + steps { + script { + FAILED_STAGE=env.STAGE_NAME + + tagAndPushDockerImage('latest') + } + } + } + stage('Test, build and deploy info-client HelmChart') { steps { script { @@ -169,31 +190,44 @@ Void setNewGitopsVersion(String environment) { envVersions.info_client.helm.version = HELM_CHART_VERSION writeYaml file: envFile, data: envVersions, overwrite: true + } +} + +Void pushDevGitopsRepo() { + pushNewGitopsVersion('dev') +} + +Void pushTestGitopsRepo() { + pushNewGitopsVersion('test') +} + +Void pushNewGitopsVersion(String environment) { + dir('gitops') { + if (!hasGitopsValuesFileChanged(environment)) { + return + } + + withCredentials([usernamePassword(credentialsId: 'jenkins-gitea-access-token', passwordVariable: 'TOKEN', usernameVariable: 'USER')]) { + sh "git add ${environment}/application/values/info-client-values.yaml" - if (hasValuesFileChanged(environment)) { - sh "git add ${envFile}" sh "git commit -m 'jenkins rollout ${environment} info-client version ${IMAGE_TAG}'" + sh 'git push https://${USER}:${TOKEN}@git.ozg-sh.de/ozgcloud-devops/gitops.git' } } } -Boolean hasValuesFileChanged(String environment) { +Boolean hasGitopsValuesFileChanged(String environment) { return sh (script: "git status | grep '${environment}/application/values/info-client-values.yaml'", returnStatus: true) == env.SH_SUCCESS_STATUS_CODE as Integer } +Void tagAndPushDockerImage(String newTag){ + loginToDockerRegistry() -Void pushGitopsRepo() { - withCredentials([usernamePassword(credentialsId: 'jenkins-gitea-access-token', passwordVariable: 'TOKEN', usernameVariable: 'USER')]) { - dir("gitops") { - if (hasUnpushedCommits()) { - sh 'git push https://${USER}:${TOKEN}@git.ozg-sh.de/ozgcloud-devops/gitops.git' - } - } - } -} + sh "docker tag docker.ozg-sh.de/info-client-by:${IMAGE_TAG} docker.ozg-sh.de/info-client-by:${newTag}" + sh "docker push docker.ozg-sh.de/info-client-by:${newTag}" -Boolean hasUnpushedCommits() { - return sh (script: "git cherry -v | grep .", returnStatus: true) == env.SH_SUCCESS_STATUS_CODE as Integer + sh "docker tag docker.ozg-sh.de/info-client-sh:${IMAGE_TAG} docker.ozg-sh.de/info-client-sh:${newTag}" + sh "docker push docker.ozg-sh.de/info-client-sh:${newTag}" } Void loginToDockerRegistry(){ diff --git a/alfa-client/libs/common/src/lib/accessibility-button/accessibility-button.component.spec.ts b/alfa-client/libs/common/src/lib/accessibility-button/accessibility-button.component.spec.ts index ad67dcf8ab0a9414481ab5db68b15534d2799751..8b150294c1af567bef737ca8909cae78eb9081fd 100644 --- a/alfa-client/libs/common/src/lib/accessibility-button/accessibility-button.component.spec.ts +++ b/alfa-client/libs/common/src/lib/accessibility-button/accessibility-button.component.spec.ts @@ -1,4 +1,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { LinkComponent, TooltipDirective } from '@ods/system'; +import { MockComponent, MockDirective } from 'ng-mocks'; import { AccessibilityButtonComponent } from './accessibility-button.component'; describe('AccessibilityButtonComponent', () => { @@ -7,7 +9,7 @@ describe('AccessibilityButtonComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [AccessibilityButtonComponent], + imports: [AccessibilityButtonComponent, MockComponent(LinkComponent), MockDirective(TooltipDirective)], }).compileComponents(); fixture = TestBed.createComponent(AccessibilityButtonComponent); diff --git a/alfa-client/libs/design-system/src/lib/icons/accessibility-icon/accessibility-icon.component.ts b/alfa-client/libs/design-system/src/lib/icons/accessibility-icon/accessibility-icon.component.ts index 04a9f704dac2d4a0c93dd9a8794376f21dfa7b65..a8c309a368e22aeb3f5d031287781f1107b234c2 100644 --- a/alfa-client/libs/design-system/src/lib/icons/accessibility-icon/accessibility-icon.component.ts +++ b/alfa-client/libs/design-system/src/lib/icons/accessibility-icon/accessibility-icon.component.ts @@ -11,6 +11,7 @@ import { iconVariants, IconVariants } from '../iconVariants'; viewBox="0 0 26 26" [ngClass]="[twMerge(iconVariants({ size }), 'fill-neutral-500 dark:fill-neutral-400', class)]" xmlns="http://www.w3.org/2000/svg" + aria-hidden="true" > <rect x="2" y="2" width="22" height="22" rx="11" /> <path diff --git a/alfa-client/libs/design-system/src/lib/link/link.component.ts b/alfa-client/libs/design-system/src/lib/link/link.component.ts index 1d11015962993c60b5c4eea6b5687f6500a76d81..3331d0c65b04128f6954a52a2a22b43da50308e2 100644 --- a/alfa-client/libs/design-system/src/lib/link/link.component.ts +++ b/alfa-client/libs/design-system/src/lib/link/link.component.ts @@ -9,7 +9,12 @@ import { twMerge } from 'tailwind-merge'; template: `<a [target]="openInNewTab ? '_blank' : '_self'" [href]="url" - [class]="twMerge('block rounded text-text outline-2 outline-offset-2 outline-focus focus-visible:outline', class)" + [class]=" + twMerge( + 'block rounded border-2 border-transparent text-text outline-2 outline-offset-2 outline-focus hover:border-primary-600 focus-visible:border-transparent focus-visible:outline', + class + ) + " [attr.data-test-id]="linkTestId" (focus)="isFocused = true" (blur)="isFocused = false" diff --git a/alfa-client/libs/design-system/src/lib/tooltip/tooltip.component.ts b/alfa-client/libs/design-system/src/lib/tooltip/tooltip.component.ts index 51b46d897d0ff01414a77fc37792fb24c1edd1b8..572263e6e778419e7cf01f65c0f29bd9e6a1cf68 100644 --- a/alfa-client/libs/design-system/src/lib/tooltip/tooltip.component.ts +++ b/alfa-client/libs/design-system/src/lib/tooltip/tooltip.component.ts @@ -26,12 +26,13 @@ import { Component } from '@angular/core'; @Component({ selector: 'ods-tooltip', template: `<p - class="fixed z-[100] mt-2 -translate-x-1/2 animate-fadeIn cursor-default rounded bg-ozggray-900 px-3 py-2 text-sm text-whitetext before:absolute before:-top-2 before:left-[calc(50%-0.5rem)] before:size-0 before:border-b-[0.5rem] before:border-l-[0.5rem] before:border-r-[0.5rem] before:border-b-ozggray-900 before:border-l-transparent before:border-r-transparent before:content-[''] dark:bg-white dark:before:border-b-white" + class="fixed z-[100] mt-2 hidden -translate-x-1/2 animate-fadeIn cursor-default rounded bg-ozggray-900 px-3 py-2 text-sm text-whitetext before:absolute before:-top-2 before:left-[calc(50%-0.5rem)] before:size-0 before:border-b-[0.5rem] before:border-l-[0.5rem] before:border-r-[0.5rem] before:border-b-ozggray-900 before:border-l-transparent before:border-r-transparent before:content-[''] dark:bg-white dark:before:border-b-white" + [class.block]="show" + [class.hidden]="!show" [style.left]="left + 'px'" [style.top]="top + 'px'" [attr.id]="id" role="tooltip" - aria-hidden="true" > {{ text }} </p>`, @@ -42,5 +43,6 @@ export class TooltipComponent { text: string = ''; left: number = 0; top: number = 0; + show: boolean = false; id: string; } diff --git a/alfa-client/libs/design-system/src/lib/tooltip/tooltip.directive.spec.ts b/alfa-client/libs/design-system/src/lib/tooltip/tooltip.directive.spec.ts index 25ae440cf0e5e90d427386862f00cd41abce9eb4..9e99fa4d2535fdcf5d039bccfb2fee7ca0612ce6 100644 --- a/alfa-client/libs/design-system/src/lib/tooltip/tooltip.directive.spec.ts +++ b/alfa-client/libs/design-system/src/lib/tooltip/tooltip.directive.spec.ts @@ -45,7 +45,7 @@ describe('TooltipDirective', () => { location: null, hostView: null, injector: null, - instance: { id: '', left: 0, top: 0, text: '' }, + instance: { id: '', left: 0, top: 0, text: '', show: false }, }; beforeEach((): void => { @@ -61,6 +61,16 @@ describe('TooltipDirective', () => { expect(directive).toBeTruthy(); }); + describe('ngAfterViewInit', () => { + it('should create tooltip', () => { + directive.createTooltip = jest.fn(); + + directive.ngAfterViewInit(); + + expect(directive.createTooltip).toHaveBeenCalled(); + }); + }); + describe('ngOnDestroy', () => { it('should destroy tooltip', () => { directive.destroy = jest.fn(); @@ -74,8 +84,9 @@ describe('TooltipDirective', () => { describe('createTooltip', () => { beforeEach(() => { directive.viewContainerRef.createComponent = jest.fn().mockReturnValue({ location: { nativeElement: {} } }); - directive.setAriaDescribedBy = jest.fn(); - directive.setTooltipProperties = jest.fn(); + directive.setAriaLabeledBy = jest.fn(); + directive.getFocusableElement = jest.fn().mockReturnValue({ appendChild: jest.fn() }); + directive.interactivityChecker.isFocusable = jest.fn(); }); it('should create tooltip component', () => { @@ -84,43 +95,68 @@ describe('TooltipDirective', () => { expect(directive.viewContainerRef.createComponent).toHaveBeenCalled(); }); - it('should insert tooltip component to parent', () => { + it('should check if parent element focusable', () => { directive.createTooltip(); - expect(directive.elementRef.nativeElement.appendChild).toHaveBeenCalled(); + expect(directive.interactivityChecker.isFocusable).toHaveBeenCalled(); }); - it('should set aria-describedby attribute to parent', () => { + it('should get focusable element if parent not focusable', () => { directive.createTooltip(); - expect(directive.setAriaDescribedBy).toHaveBeenCalled(); + expect(directive.getFocusableElement).toHaveBeenCalled(); }); - it('should set tooltip properties', () => { + it('should insert tooltip component to focusable', () => { + directive.createTooltip(); + + expect(directive.focusableElement.appendChild).toHaveBeenCalled(); + }); + + it('should set aria-labeledby attribute to parent', () => { directive.createTooltip(); - expect(directive.setTooltipProperties).toHaveBeenCalled(); + expect(directive.setAriaLabeledBy).toHaveBeenCalled(); }); }); - describe('destroyTooltip', () => { - it('should destroy tooltip', () => { - directive.destroy = jest.fn(); + describe('showTooltip', () => { + beforeEach(() => { + directive.setTooltipProperties = jest.fn(); + directive.elementRef.nativeElement.contains = jest.fn().mockReturnValue(true); + }); - directive.destroyTooltip(); + it('should check if element focused', () => { + directive.showTooltip(); - expect(directive.destroy).toHaveBeenCalled(); + expect(directive.elementRef.nativeElement.contains).toHaveBeenCalled(); + }); + + it('should set tooltip properties', () => { + directive.showTooltip(); + + expect(directive.setTooltipProperties).toHaveBeenCalledWith(true); + }); + }); + + describe('hideTooltip', () => { + it('should hide tooltip', () => { + directive.hide = jest.fn(); + + directive.hideTooltip(); + + expect(directive.hide).toHaveBeenCalled(); }); }); describe('onKeydown', () => { - it('should destroy tooltip if escape key pressed', () => { - directive.destroy = jest.fn(); + it('should hide tooltip if escape key pressed', () => { + directive.hide = jest.fn(); const escapeEvent: KeyboardEvent = { ...new KeyboardEvent('esc'), key: 'Escape' }; directive.onKeydown(escapeEvent); - expect(directive.destroy).toHaveBeenCalled(); + expect(directive.hide).toHaveBeenCalled(); }); }); @@ -149,6 +185,7 @@ describe('TooltipDirective', () => { left: 500, text: 'I am tooltip', top: 1000, + show: true, }); }); @@ -159,39 +196,25 @@ describe('TooltipDirective', () => { }); }); - describe('setAriaDescribedBy', () => { + describe('setAriaLabeledBy', () => { beforeEach(() => { - directive.getFocusableElement = jest.fn(); directive.renderer.setAttribute = jest.fn(); - directive.interactivityChecker.isFocusable = jest.fn(); }); - it('should check if parent element focusable', () => { - directive.setAriaDescribedBy(); - - expect(directive.interactivityChecker.isFocusable).toHaveBeenCalled(); - }); - - it('should get focusable element if parent not focusable', () => { - directive.setAriaDescribedBy(); - - expect(directive.getFocusableElement).toHaveBeenCalled(); - }); - - it('should set aria-describedby attribute', () => { - directive.setAriaDescribedBy(); + it('should set aria-labeledby attribute', () => { + directive.setAriaLabeledBy(); expect(directive.renderer.setAttribute).toHaveBeenCalled(); }); }); - describe('removeAriaDescribedBy', () => { + describe('removeAriaLabeledBy', () => { beforeEach(() => { directive.renderer.removeAttribute = jest.fn(); }); - it('should remove aria-describedby attribute', () => { - directive.removeAriaDescribedBy(); + it('should remove aria-labeledby attribute', () => { + directive.removeAriaLabeledBy(); expect(directive.renderer.removeAttribute).toHaveBeenCalled(); }); @@ -217,10 +240,22 @@ describe('TooltipDirective', () => { }); }); + describe('hide', () => { + beforeEach(() => { + directive.componentRef = Object.assign(mockComponentRef, { instance: { ...mockComponentRef.instance, show: true } }); + }); + + it('should hide component', () => { + directive.hide(); + + expect(directive.componentRef.instance.show).toBeFalsy; + }); + }); + describe('destroy', () => { beforeEach(() => { directive.componentRef = mockComponentRef; - directive.removeAriaDescribedBy = jest.fn(); + directive.removeAriaLabeledBy = jest.fn(); }); it('should set component ref to null', () => { @@ -229,10 +264,10 @@ describe('TooltipDirective', () => { expect(directive.componentRef).toBeNull(); }); - it('should remove aria-describedby attribute', () => { + it('should remove aria-labeledby attribute', () => { directive.destroy(); - expect(directive.removeAriaDescribedBy).toHaveBeenCalled(); + expect(directive.removeAriaLabeledBy).toHaveBeenCalled(); }); it('should set focusable element to null', () => { diff --git a/alfa-client/libs/design-system/src/lib/tooltip/tooltip.directive.ts b/alfa-client/libs/design-system/src/lib/tooltip/tooltip.directive.ts index f624d583427930c3a5fbb8cf5c42d85c1c43f0bb..13a03551dde8f09bd52eaa6d7a7133cabe3e25d5 100644 --- a/alfa-client/libs/design-system/src/lib/tooltip/tooltip.directive.ts +++ b/alfa-client/libs/design-system/src/lib/tooltip/tooltip.directive.ts @@ -24,6 +24,7 @@ import { isEscapeKey, isNotNull } from '@alfa-client/tech-shared'; import { InteractivityChecker } from '@angular/cdk/a11y'; import { + AfterViewInit, ComponentRef, Directive, ElementRef, @@ -43,7 +44,7 @@ const OUTLINE_INDENT = 4; // Outline offset (2) + outline width (2) selector: '[tooltip]', standalone: true, }) -export class TooltipDirective implements OnDestroy { +export class TooltipDirective implements AfterViewInit, OnDestroy { @Input() tooltip: string = ''; componentRef: ComponentRef<TooltipComponent> = null; @@ -55,22 +56,19 @@ export class TooltipDirective implements OnDestroy { public renderer: Renderer2 = inject(Renderer2); public interactivityChecker: InteractivityChecker = inject(InteractivityChecker); + ngAfterViewInit(): void { + this.createTooltip(); + } + ngOnDestroy(): void { this.destroy(); } @HostListener('mouseenter') @HostListener('focusin') - createTooltip(): void { - if (isNotNull(this.componentRef)) { - return; - } - + showTooltip(): void { const nativeElement: HTMLElement = this.elementRef.nativeElement; const attachedToFocused: boolean = nativeElement.contains(document.activeElement); - this.componentRef = this.viewContainerRef.createComponent(TooltipComponent); - nativeElement.appendChild(this.componentRef.location.nativeElement); - this.setAriaDescribedBy(); this.setTooltipProperties(attachedToFocused); } @@ -78,17 +76,30 @@ export class TooltipDirective implements OnDestroy { @HostListener('window:scroll') @HostListener('focusout') @HostListener('window:resize') - destroyTooltip(): void { - this.destroy(); + hideTooltip(): void { + this.hide(); } @HostListener('keydown', ['$event']) onKeydown(e: KeyboardEvent): void { if (isEscapeKey(e)) { - this.destroy(); + this.hide(); } } + createTooltip(): void { + if (isNotNull(this.componentRef)) { + return; + } + + const nativeElement: HTMLElement = this.elementRef.nativeElement; + this.componentRef = this.viewContainerRef.createComponent(TooltipComponent); + this.focusableElement = + this.interactivityChecker.isFocusable(nativeElement) ? nativeElement : this.getFocusableElement(nativeElement); + this.focusableElement.appendChild(this.componentRef.location.nativeElement); + this.setAriaLabeledBy(); + } + setTooltipProperties(attachedToFocused = false): void { if (isNull(this.componentRef)) { return; @@ -99,24 +110,30 @@ export class TooltipDirective implements OnDestroy { this.componentRef.instance.top = attachedToFocused ? bottom + OUTLINE_INDENT : bottom; this.componentRef.instance.text = this.tooltip; this.componentRef.instance.id = this.tooltipId; + this.componentRef.instance.show = true; } - setAriaDescribedBy(): void { - const nativeElement: HTMLElement = this.elementRef.nativeElement; + setAriaLabeledBy(): void { this.tooltipId = uniqueId('tooltip'); - this.focusableElement = - this.interactivityChecker.isFocusable(nativeElement) ? nativeElement : this.getFocusableElement(nativeElement); - this.renderer.setAttribute(this.focusableElement, 'aria-describedby', this.tooltipId); + this.renderer.setAttribute(this.focusableElement, 'aria-labeledby', this.tooltipId); } - removeAriaDescribedBy(): void { - this.renderer.removeAttribute(this.focusableElement, 'aria-describedby'); + removeAriaLabeledBy(): void { + this.renderer.removeAttribute(this.focusableElement, 'aria-labeledby'); } getFocusableElement(element: HTMLElement): HTMLElement { return element.querySelector('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'); } + hide(): void { + if (isNull(this.componentRef)) { + return; + } + + this.componentRef.instance.show = false; + } + destroy(): void { if (isNull(this.componentRef)) { return; @@ -124,7 +141,7 @@ export class TooltipDirective implements OnDestroy { this.componentRef.destroy(); this.componentRef = null; - this.removeAriaDescribedBy(); + this.removeAriaLabeledBy(); this.focusableElement = null; } } diff --git a/alfa-client/libs/tech-shared/src/lib/resource/list-resource.service.spec.ts b/alfa-client/libs/tech-shared/src/lib/resource/list-resource.service.spec.ts index 5238a23c74cd94b4b5a4004bcc2d46e7b7eb3e18..76fac14c0bfe11b7f9b97a634e922aad14a417ca 100644 --- a/alfa-client/libs/tech-shared/src/lib/resource/list-resource.service.spec.ts +++ b/alfa-client/libs/tech-shared/src/lib/resource/list-resource.service.spec.ts @@ -80,7 +80,6 @@ describe('ListResourceService', () => { beforeEach(() => { service.listResource.next(listStateResource); - service.handleNullConfigResource = jest.fn(); service.handleChanges = jest.fn(); isInvalidResourceCombinationSpy = jest.spyOn(ResourceUtil, 'isInvalidResourceCombination').mockReturnValue(true); }); @@ -92,13 +91,6 @@ describe('ListResourceService', () => { expect(service.handleChanges).toHaveBeenCalledWith(listStateResource, baseResource); })); - it('should handle null configresource', fakeAsync(() => { - service.getList().subscribe(); - tick(); - - expect(service.handleNullConfigResource).toHaveBeenCalledWith(baseResource); - })); - it('should call isInvalidResourceCombinationSpy', fakeAsync(() => { service.getList().subscribe(); tick(); diff --git a/alfa-client/libs/tech-shared/src/lib/resource/list-resource.service.ts b/alfa-client/libs/tech-shared/src/lib/resource/list-resource.service.ts index 8dba0ba6790fe0a0eab24eb04299722e787e5809..50cee3aa72fb828211d7a70dadc5cdca3d5f55c2 100644 --- a/alfa-client/libs/tech-shared/src/lib/resource/list-resource.service.ts +++ b/alfa-client/libs/tech-shared/src/lib/resource/list-resource.service.ts @@ -35,7 +35,6 @@ import { createStateResource, doIfLoadingRequired, getEmbeddedResources, - isEmptyStateResource, isInvalidResourceCombination, isLoadingRequired, isStateResoureStable, @@ -67,7 +66,6 @@ export class ResourceListService<B extends Resource, T extends ListResource, I e tap(([stateResource, configResource]) => { this.handleChanges(stateResource, configResource); }), - tap(([, configResource]) => this.handleNullConfigResource(configResource)), filter(([stateResource]) => !isInvalidResourceCombination(stateResource, this.baseResource)), mapToFirst<T, B>(), startWith(createEmptyStateResource<T>(true)), @@ -103,20 +101,10 @@ export class ResourceListService<B extends Resource, T extends ListResource, I e return isNotNull(configResource) && isLoadingRequired(stateResource) && this.hasListLinkRel(); } - handleNullConfigResource(configResource: B): void { - if (this.shouldClearStateResource(configResource)) { - this.clearCurrentListResource(); - } - } - private clearCurrentListResource(): void { this.listResource.next(createEmptyStateResource()); } - shouldClearStateResource(configResource: B): boolean { - return isNull(configResource) && !isEmptyStateResource(this.listResource.value); - } - public create(toCreate: unknown): Observable<Resource> { this.verifyBeforeCreation(); return this.repository.createResource(this.buildCreateResourceData(toCreate, this.config.createLinkRel)); diff --git a/alfa-client/libs/ui/src/lib/ui/subnavigation/subnavigation.component.scss b/alfa-client/libs/ui/src/lib/ui/subnavigation/subnavigation.component.scss index d7d4b646e98603765a3d1d6c673a7ca3ebb4f6a7..8b0ddf04c2f9ea722d7eb1bedaa6bd8e7adfb87e 100644 --- a/alfa-client/libs/ui/src/lib/ui/subnavigation/subnavigation.component.scss +++ b/alfa-client/libs/ui/src/lib/ui/subnavigation/subnavigation.component.scss @@ -24,19 +24,12 @@ @import 'variables'; :host { - position: sticky; + @apply flex h-12 w-full items-center justify-start pb-1 pl-4 pr-3 pt-1 sm:sticky; top: $header-height; - height: 48px; - width: 100%; z-index: 2; box-shadow: $shadow-bottom; - display: flex; - justify-content: flex-start; - align-items: center; - padding: 0.25rem 0.75rem 0.25rem 1rem; &.shadow { - //overflow-x: hidden; box-shadow: $shadow-bottom, 0 2px 2px -2px rgba(#000, 0.16); diff --git a/alfa-client/package.json b/alfa-client/package.json index cdade4bccc4de30984ae9c885b082ad16d45fdd7..b963d1f5dfd62cfd26800f88a81af2740686be62 100644 --- a/alfa-client/package.json +++ b/alfa-client/package.json @@ -1,6 +1,6 @@ { "name": "alfa", - "version": "1.3.0-SNAPSHOT", + "version": "1.4.0-SNAPSHOT", "license": "MIT", "scripts": { "start": "nx run alfa:serve --port 4300 --disable-host-check", diff --git a/alfa-client/pom.xml b/alfa-client/pom.xml index 0466ba5fcf5a6efed1b783ef07a11cf7b5013b88..4ee6f2b10489cd516ba765b3692b8ae8d3bd02a2 100644 --- a/alfa-client/pom.xml +++ b/alfa-client/pom.xml @@ -24,13 +24,12 @@ unter der Lizenz sind dem Lizenztext zu entnehmen. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>de.ozgcloud.alfa</groupId> <artifactId>alfa</artifactId> - <version>2.17.0-SNAPSHOT</version> + <version>2.18.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> diff --git a/alfa-server/pom.xml b/alfa-server/pom.xml index 994cf4071ac404fb093799a0fa27dcc3ab24fcde..0bbc29ac4075e6f1ded3d89f9f4b3ff36d71bc13 100644 --- a/alfa-server/pom.xml +++ b/alfa-server/pom.xml @@ -30,7 +30,7 @@ <parent> <groupId>de.ozgcloud.alfa</groupId> <artifactId>alfa</artifactId> - <version>2.17.0-SNAPSHOT</version> + <version>2.18.0-SNAPSHOT</version> </parent> <artifactId>alfa-server</artifactId> diff --git a/alfa-service/pom.xml b/alfa-service/pom.xml index c96920e46157e7702b661e03dae86d3e99a049e2..3a483d4908b9eae538a03ff8c3b1741285140812 100644 --- a/alfa-service/pom.xml +++ b/alfa-service/pom.xml @@ -24,15 +24,14 @@ unter der Lizenz sind dem Lizenztext zu entnehmen. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>de.ozgcloud.alfa</groupId> <artifactId>alfa</artifactId> - <version>2.17.0-SNAPSHOT</version> + <version>2.18.0-SNAPSHOT</version> </parent> <artifactId>alfa-service</artifactId> diff --git a/pom.xml b/pom.xml index 36c76f59140543a6a8875bc5556ae8f38063b57e..3240af88a9f01d6ad9a6de5d9ea77f892ea664e6 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ <groupId>de.ozgcloud.alfa</groupId> <artifactId>alfa</artifactId> - <version>2.17.0-SNAPSHOT</version> + <version>2.18.0-SNAPSHOT</version> <name>Alfa Parent</name> <packaging>pom</packaging> <inceptionYear>2020</inceptionYear> @@ -56,7 +56,7 @@ <user-manager.version>2.8.0</user-manager.version> <zufi-manager.version>1.5.0</zufi-manager.version> <collaboration-manager.version>0.5.0</collaboration-manager.version> - <archive-manager.version>0.1.0-SNAPSHOT</archive-manager.version> + <archive-manager.version>0.1.0</archive-manager.version> <spring-cloud-config-client.version>4.1.3</spring-cloud-config-client.version> <!-- TODO: die Version über ozgcloud-common ziehen --> diff --git a/src/main/helm/templates/keycloak_crd.yaml b/src/main/helm/templates/keycloak_crd.yaml index c31977aebf7af7aacfc02f009f5711ced20c9aa8..7351fbf91f88c64c6da19fc88b2a526c4a2c191e 100644 --- a/src/main/helm/templates/keycloak_crd.yaml +++ b/src/main/helm/templates/keycloak_crd.yaml @@ -22,8 +22,7 @@ # unter der Lizenz sind dem Lizenztext zu entnehmen. # -{{- if not (.Values.sso).disableOzgOperator -}} ---- +{{ if not (.Values.sso).disableOzgOperator -}} apiVersion: operator.ozgcloud.de/v1 kind: OzgCloudKeycloakRealm metadata: @@ -31,7 +30,8 @@ metadata: namespace: {{ include "app.namespace" . }} spec: keep_after_delete: {{ (.Values.sso).keep_after_delete | default false }} - displayName: {{ include "app.ssoRealmDisplayName" . }} + displayName: {{ include "app.ssoRealmDisplayName" . }} + bundesland: {{ include "app.ozgcloudBundesland" . }} {{- with ((.Values.sso).keycloak_realm).roles }} realmRoles: {{ toYaml . | indent 4}} diff --git a/src/test/helm/keycloak_crd_test.yaml b/src/test/helm/keycloak_crd_test.yaml index eae8a1c4fe845c382c0afba1ca586f52b5bdcc85..f414d92814cc3af01a22d8c68ccb689457c811d2 100644 --- a/src/test/helm/keycloak_crd_test.yaml +++ b/src/test/helm/keycloak_crd_test.yaml @@ -32,6 +32,7 @@ set: ozgcloud: environment: test bezeichner: helm + bundesland: sh tests: - it: should contain header data asserts: @@ -136,4 +137,9 @@ tests: - it: should not create realm roles by default asserts: - isNull: - path: spec.realmRoles \ No newline at end of file + path: spec.realmRoles + - it: should have a bundesland + asserts: + - equal: + path: spec.bundesland + value: sh \ No newline at end of file