@platform-mesh/portal-ui-lib 0.42.1 → 0.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/platform-mesh-portal-ui-wc.js +21 -21
- package/fesm2022/platform-mesh-portal-ui-lib-models.mjs.map +1 -1
- package/fesm2022/platform-mesh-portal-ui-lib-portal-options.mjs +2 -1
- package/fesm2022/platform-mesh-portal-ui-lib-portal-options.mjs.map +1 -1
- package/fesm2022/platform-mesh-portal-ui-lib-services.mjs +21 -29
- package/fesm2022/platform-mesh-portal-ui-lib-services.mjs.map +1 -1
- package/fesm2022/platform-mesh-portal-ui-lib-utils.mjs +2 -17
- package/fesm2022/platform-mesh-portal-ui-lib-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/types/platform-mesh-portal-ui-lib-models.d.ts +3 -4
- package/types/platform-mesh-portal-ui-lib-services.d.ts +2 -2
- package/types/platform-mesh-portal-ui-lib-utils.d.ts +3 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-mesh-portal-ui-lib-models.mjs","sources":["../../projects/lib/models/constants/constants.ts","../../projects/lib/models/models/resource.ts","../../projects/lib/models/platform-mesh-portal-ui-lib-models.ts"],"sourcesContent":["export const ALL_NAMESPACE = '-all-';\n","import {\n FieldDefinition,\n GenericResource,\n UIDefinition,\n} from './ui-definition';\nimport { Condition, ObjectMeta } from 'kubernetes-types/meta/v1';\n\nexport interface ResourceStatus {\n conditions: Condition[];\n}\n\nexport interface ResourceSpec extends Record<string, any> {\n type: string;\n description?: string;\n displayName?: string;\n}\n\nexport interface ResourceMeta extends ObjectMeta {\n name: string;\n}\n\nexport interface Resource extends GenericResource {\n metadata: ResourceMeta;\n spec?: ResourceSpec;\n status?: ResourceStatus;\n __typename?: string;\n data?: Record<string, any>;\n ready?: boolean;\n isAvailable?: boolean;\n accessibleName?: string;\n}\n\nexport interface ResourceDefinition {\n
|
|
1
|
+
{"version":3,"file":"platform-mesh-portal-ui-lib-models.mjs","sources":["../../projects/lib/models/constants/constants.ts","../../projects/lib/models/models/resource.ts","../../projects/lib/models/platform-mesh-portal-ui-lib-models.ts"],"sourcesContent":["export const ALL_NAMESPACE = '-all-';\n","import {\n FieldDefinition,\n GenericResource,\n UIDefinition,\n} from './ui-definition';\nimport { Condition, ObjectMeta } from 'kubernetes-types/meta/v1';\n\nexport interface ResourceStatus {\n conditions: Condition[];\n}\n\nexport interface ResourceSpec extends Record<string, any> {\n type: string;\n description?: string;\n displayName?: string;\n}\n\nexport interface ResourceMeta extends ObjectMeta {\n name: string;\n}\n\nexport interface Resource extends GenericResource {\n metadata: ResourceMeta;\n spec?: ResourceSpec;\n status?: ResourceStatus;\n __typename?: string;\n data?: Record<string, any>;\n ready?: boolean;\n isAvailable?: boolean;\n accessibleName?: string;\n}\n\nexport interface ResourceDefinition {\n apiGroup?: string;\n version: string;\n entityCollection: string;\n entity: string;\n name?: string;\n scope?: KubernetesScope;\n namespace?: string;\n readyCondition?: FieldDefinition;\n ui?: UIDefinition;\n}\n\nexport const ResourceOperationTypeMap = {\n ADDED: 'ADDED',\n MODIFIED: 'MODIFIED',\n DELETED: 'DELETED',\n} as const;\n\nexport type ResourceOperationType =\n (typeof ResourceOperationTypeMap)[keyof typeof ResourceOperationTypeMap];\n\nexport interface ResourceSubscriptionResult {\n type: ResourceOperationType;\n object: Resource;\n}\n\nexport interface ResourcePagination {\n limit: number | undefined;\n continue: string | undefined;\n}\n\nexport interface ResourceListResult {\n resourceVersion: string;\n items: Resource[];\n continue: string | undefined;\n remainingItemCount?: number;\n}\n\nexport type KubernetesScope = 'Cluster' | 'Namespaced';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAO,MAAM,aAAa,GAAG;;AC4CtB,MAAM,wBAAwB,GAAG;AACtC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,OAAO,EAAE,SAAS;;;AC/CpB;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-mesh-portal-ui-lib-portal-options.mjs","sources":["../../projects/lib/portal-options/services/custom-global-nodes.service.ts","../../projects/lib/portal-options/services/header-bar-renderers/namespace-selection-renderer.service.ts","../../projects/lib/portal-options/services/header-bar-renderers/breadcrumb-renderer.ts","../../projects/lib/portal-options/services/header-bar-config.service.ts","../../projects/lib/portal-options/models/constants.ts","../../projects/lib/portal-options/services/luigi-extended-global-context-config.service.ts","../../projects/lib/portal-options/services/navigation-redirect-strategy.service.ts","../../projects/lib/portal-options/utils/account-hierarchy.util.ts","../../projects/lib/portal-options/services/crd-gateway-kcp-patch-resolver.service.ts","../../projects/lib/portal-options/services/node-change-hook-config.service.ts","../../projects/lib/portal-options/services/node-context-processing.service.ts","../../projects/lib/portal-options/services/router-config.service.ts","../../projects/lib/portal-options/services/user-profile-config.service.ts","../../projects/lib/portal-options/platform-mesh-portal-ui-lib-portal-options.ts"],"sourcesContent":["import { PortalNodeContext } from '../models/luigi-context';\nimport { PortalLuigiNode } from '../models/luigi-node';\nimport { inject } from '@angular/core';\nimport {\n CustomGlobalNodesService,\n EntityType,\n I18nService,\n NodeContext,\n} from '@openmfp/portal-ui-lib';\n\nexport class CustomGlobalNodesServiceImpl implements CustomGlobalNodesService {\n private i18nService = inject(I18nService);\n\n async getCustomGlobalNodes(): Promise<PortalLuigiNode[]> {\n return [\n {\n pathSegment: 'error',\n order: 1000,\n hideFromNav: true,\n showBreadcrumbs: false,\n context: {} as PortalNodeContext,\n children: [\n {\n pathSegment: ':id',\n entityType: EntityType.ENTITY_ERROR,\n hideFromNav: true,\n hideSideNav: true,\n viewUrl: '/assets/platform-mesh-portal-ui-wc.js#error-component',\n context: {\n id: ':id',\n translationTable: this.i18nService.translationTable,\n } as any as NodeContext,\n webcomponent: {\n selfRegistered: true,\n },\n },\n ],\n },\n {\n pathSegment: 'users',\n showBreadcrumbs: false,\n hideSideNav: true,\n hideFromNav: true,\n context: {} as PortalNodeContext,\n entityType: 'global',\n children: [\n {\n pathSegment: ':userId',\n hideSideNav: true,\n hideFromNav: true,\n defineEntity: {\n id: 'user',\n },\n context: {\n userId: ':userId',\n } as PortalNodeContext,\n children: [\n {\n pathSegment: 'overview',\n context: {} as PortalNodeContext,\n hideSideNav: true,\n hideFromNav: true,\n defineEntity: {\n id: 'overview',\n },\n compound: {\n children: [],\n },\n },\n ],\n },\n ],\n },\n ];\n }\n}\n","import { DestroyRef, Injectable, inject } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n AuthService,\n LuigiCoreService,\n LuigiNode,\n PortalConfig,\n} from '@openmfp/portal-ui-lib';\nimport {\n FieldDefinition,\n Resource,\n ResourceDefinition,\n ResourceListResult,\n ALL_NAMESPACE,\n} from '@platform-mesh/portal-ui-lib/models';\nimport {\n ResourceNodeContext,\n ResourceService,\n} from '@platform-mesh/portal-ui-lib/services';\nimport {\n generateGraphQLFields,\n isNamespacedResource,\n mergeListWithSubscriptionResult,\n} from '@platform-mesh/portal-ui-lib/utils';\nimport '@ui5/webcomponents/dist/ComboBox.js';\nimport { Observable, Subject, defer, of } from 'rxjs';\nimport {\n catchError,\n retry,\n scan,\n shareReplay,\n startWith,\n switchMap,\n takeUntil,\n} from 'rxjs/operators';\n\nconst defaultColumns: FieldDefinition[] = [\n {\n label: 'Name',\n property: 'metadata.name',\n },\n];\n\n@Injectable({ providedIn: 'root' })\nexport class NamespaceSelectionRendererService {\n private namespaceResourcesCache?: {\n key: string;\n value$: Observable<Resource[]>;\n stop$: Subject<void>;\n };\n\n private resourceService = inject(ResourceService);\n private authService = inject(AuthService);\n private luigiCoreService = inject(LuigiCoreService);\n private destroyRef = inject(DestroyRef);\n\n public create(portalConfig: PortalConfig) {\n return (\n containerElement: HTMLElement,\n nodeItems: any[],\n _clickHandler: any,\n ) => {\n containerElement.style.paddingBottom = '0.5rem';\n\n const lastNode = nodeItems.at(-1)?.node as LuigiNode | undefined;\n const namespace = this.luigiCoreService\n .routing()\n .getSearchParams().namespace;\n const kcpPath = lastNode?.context?.kcpPath;\n\n if (lastNode?.context && !isNamespacedResource(lastNode.context)) {\n return containerElement;\n }\n\n const ui5combobox = this.createCombobox(containerElement);\n\n this.addComboboxItems(portalConfig, ui5combobox, namespace, kcpPath);\n\n ui5combobox.addEventListener('change', (event: any) => {\n const value = (event?.target as any)?.value.trim() ?? '';\n this.changeNamespace(value);\n });\n\n return ui5combobox as HTMLElement;\n };\n }\n\n private createCombobox(containerElement: HTMLElement) {\n const ui5combobox = document.createElement('ui5-combobox');\n ui5combobox.setAttribute('placeholder', 'Namespaces');\n ui5combobox.setAttribute('data-testid', 'namespace-selection-combobox');\n containerElement.appendChild(ui5combobox);\n\n return ui5combobox;\n }\n\n private addComboboxItems(\n portalConfig: PortalConfig,\n ui5combobox: HTMLElement,\n namespace: string | null,\n kcpPath?: string,\n ) {\n this.getNamespaceResourcesCached(portalConfig, kcpPath).subscribe(\n (resources) => {\n this.syncComboboxItems(ui5combobox, resources);\n this.setSelectedValue(ui5combobox, resources, namespace);\n },\n );\n }\n\n private getNamespaceResourcesCached(\n portalConfig: PortalConfig,\n kcpPath?: string,\n ): Observable<Resource[]> {\n const cacheKey = this.getNamespaceResourcesCacheKey(kcpPath);\n if (this.namespaceResourcesCache?.key === cacheKey) {\n return this.namespaceResourcesCache.value$;\n }\n\n if (this.namespaceResourcesCache) {\n this.namespaceResourcesCache.stop$.next();\n this.namespaceResourcesCache.stop$.complete();\n this.namespaceResourcesCache = undefined;\n }\n\n const stop$ = new Subject<void>();\n const value$ = this.getNamespaceResources(\n portalConfig,\n kcpPath,\n stop$,\n ).pipe(shareReplay(1), takeUntilDestroyed(this.destroyRef));\n this.namespaceResourcesCache = {\n key: cacheKey,\n value$,\n stop$,\n };\n\n return value$;\n }\n\n private getNamespaceResourcesCacheKey(kcpPath?: string): string {\n return kcpPath ?? '';\n }\n\n private syncComboboxItems(ui5combobox: HTMLElement, resources: Resource[]) {\n ui5combobox.replaceChildren();\n\n resources.forEach((resource) => {\n const name = resource.metadata?.name;\n if (!name) {\n return;\n }\n const resourceOption = document.createElement('ui5-cb-item');\n resourceOption.setAttribute('text', name);\n resourceOption.setAttribute(\n 'data-testid',\n `namespace-selection-combobox-item-${name}`,\n );\n ui5combobox.appendChild(resourceOption);\n });\n\n const allOption = document.createElement('ui5-cb-item');\n allOption.setAttribute('text', ALL_NAMESPACE);\n allOption.setAttribute(\n 'data-testid',\n 'namespace-selection-combobox-item-all',\n );\n ui5combobox.appendChild(allOption);\n }\n\n private setSelectedValue(\n ui5combobox: HTMLElement,\n resources: Resource[],\n namespace: string | null,\n ) {\n const currentNamespace = this.luigiCoreService\n .routing()\n .getSearchParams().namespace;\n\n if (currentNamespace) {\n ui5combobox.setAttribute('value', currentNamespace);\n return;\n }\n\n if (\n namespace &&\n resources.find((resource) => resource.metadata?.name === namespace)\n ) {\n ui5combobox.setAttribute('value', namespace);\n } else {\n ui5combobox.setAttribute('value', ALL_NAMESPACE);\n this.changeNamespace(ALL_NAMESPACE);\n }\n }\n\n private getNamespaceResources(\n portalConfig: PortalConfig,\n kcpPath: string | undefined,\n stop$: Subject<void>,\n ): Observable<Resource[]> {\n const operation = 'v1_namespaces';\n const fields = generateGraphQLFields(defaultColumns);\n const context = {\n portalContext: {\n crdGatewayApiUrl: portalConfig.portalContext['crdGatewayApiUrl'],\n },\n resourceDefinition: {\n version: 'v1',\n plural: 'namespaces',\n scope: 'Cluster',\n } as ResourceDefinition,\n kcpPath,\n token: this.authService.getToken(),\n } as ResourceNodeContext;\n\n return defer(() =>\n this.resourceService.list(operation, fields, context),\n ).pipe(\n retry(3),\n takeUntil(stop$),\n switchMap((result: ResourceListResult) =>\n this.resourceService\n .resourceChangeSubscription(\n operation,\n fields,\n context,\n result.resourceVersion,\n false,\n )\n .pipe(\n startWith(undefined),\n scan(\n (resources, subscriptionResult) =>\n mergeListWithSubscriptionResult(resources, subscriptionResult, {\n getItemKey: (resource) => resource.metadata?.name,\n mapSubscriptionObjectToItem: (object) => object,\n }),\n result.items,\n ),\n takeUntil(stop$),\n ),\n ),\n catchError((error) => {\n console.error(`Failed to read entities from ${operation}`, error);\n return of([]);\n }),\n );\n }\n\n private changeNamespace(value: string): void {\n if (!value) {\n return;\n }\n\n const oldValue = this.luigiCoreService\n .routing()\n .getSearchParams().namespace;\n\n if (oldValue === value) {\n return;\n }\n\n this.luigiCoreService.routing().addSearchParams({ namespace: value });\n }\n}\n","import '@ui5/webcomponents/dist/Breadcrumbs.js';\nimport '@ui5/webcomponents/dist/BreadcrumbsItem.js';\n\nexport const breadcrumbRenderer = (\n containerElement: HTMLElement,\n nodeItems: any[],\n clickHandler: (item: any) => void,\n): HTMLElement => {\n containerElement.style.width = '100%';\n\n const ui5breadcrumbs = document.createElement('ui5-breadcrumbs');\n ui5breadcrumbs.setAttribute('separators', 'Slash');\n containerElement.appendChild(ui5breadcrumbs);\n\n nodeItems.forEach((item) => {\n if (item.node?.hideFromBreadcrumb) {\n return;\n }\n\n const itemCmp = document.createElement('ui5-breadcrumbs-item');\n itemCmp.textContent = item.label ?? '';\n (itemCmp as any)._item = item;\n ui5breadcrumbs.appendChild(itemCmp);\n });\n\n ui5breadcrumbs.addEventListener('item-click', (event: any) => {\n if (\n !(\n event.detail.ctrlKey ||\n event.detail.altKey ||\n event.detail.shiftKey ||\n event.detail.metaKey\n )\n ) {\n event.preventDefault();\n clickHandler(event.detail.item._item);\n }\n });\n\n return ui5breadcrumbs;\n};\n","import { Injectable, inject } from '@angular/core';\nimport {\n ConfigService,\n HeaderBarConfig,\n HeaderBarConfigService,\n} from '@openmfp/portal-ui-lib';\nimport { NamespaceSelectionRendererService } from './header-bar-renderers/namespace-selection-renderer.service';\nimport { breadcrumbRenderer } from './header-bar-renderers/breadcrumb-renderer';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class HeaderBarConfigServiceImpl implements HeaderBarConfigService {\n private configService = inject(ConfigService);\n private namespaceSelectionRendererService = inject(NamespaceSelectionRendererService);\n\n public async getConfig(): Promise<HeaderBarConfig> {\n const portalConfig = await this.configService.getPortalConfig();\n\n return {\n pendingItemLabel: '...',\n omitRoot: false,\n clearBeforeRender: true,\n autoHide: true,\n leftRenderers: [breadcrumbRenderer],\n rightRenderers: [this.namespaceSelectionRendererService.create(portalConfig)],\n };\n }\n}\n","export const kcpRootOrgsPath = 'root:orgs';\n","import { kcpRootOrgsPath } from '../models/constants';\nimport { Injectable, inject } from '@angular/core';\nimport {\n EnvConfigService,\n LuigiExtendedGlobalContextConfigService,\n} from '@openmfp/portal-ui-lib';\n\n@Injectable({ providedIn: 'root' })\nexport class LuigiExtendedGlobalContextConfigServiceImpl implements LuigiExtendedGlobalContextConfigService {\n private envConfigService = inject(EnvConfigService);\n\n async createLuigiExtendedGlobalContext(): Promise<Record<string, any>> {\n const idpName = (await this.envConfigService.getEnvConfig()).idpName;\n\n if (idpName === 'welcome') {\n return {};\n }\n\n return {\n organization: idpName,\n kcpPath: `${kcpRootOrgsPath}:${idpName}`,\n entityName: idpName,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { LocalStorageKeys, NavigationRedirectStrategy } from '@openmfp/portal-ui-lib';\n\n@Injectable({ providedIn: 'root' })\nexport class NavigationRedirectStrategyServiceImpl implements NavigationRedirectStrategy {\n getRedirectUrl(): string {\n return localStorage.getItem(LocalStorageKeys.LAST_NAVIGATION_URL) || '';\n }\n\n saveRedirectUrl(url: string): void {\n if (url.startsWith('/error')) {\n return;\n }\n\n localStorage.setItem(LocalStorageKeys.LAST_NAVIGATION_URL, url);\n }\n\n clearRedirectUrl(): void {\n localStorage.removeItem(LocalStorageKeys.LAST_NAVIGATION_URL);\n }\n}\n","import { PortalLuigiNode } from '../models/luigi-node';\n\nexport function collectAccountNamesFromNodeHierarchy(\n node: PortalLuigiNode | undefined,\n): string[] {\n const accountNames: string[] = [];\n let currentNode: PortalLuigiNode | undefined = node;\n\n while (currentNode) {\n const entityName = currentNode.context?.entityName;\n const entityKind = currentNode.context?.entityKind;\n if (entityName && entityKind?.toLowerCase() === 'account') {\n accountNames.unshift(entityName);\n }\n currentNode = currentNode.parent;\n }\n\n return accountNames;\n}\n\nexport function getInitialAccountId(\n entityId?: string,\n kind?: string,\n): string | undefined {\n return kind?.toLowerCase() === 'account' && entityId ? entityId : undefined;\n}\n\nexport function calculateAccountHierarchy(\n entityNode: PortalLuigiNode,\n entityId?: string,\n kind?: string,\n): string[] {\n const initialAccountId = getInitialAccountId(entityId, kind);\n // when we are on a dynamic node and the id any kind has changed we need to reset the context data\n if (entityNode.defineEntity?.contextKey && initialAccountId) {\n entityNode.context.entityName = undefined;\n entityNode.context.entityKind = undefined;\n }\n\n const accountNames = collectAccountNamesFromNodeHierarchy(entityNode);\n\n if (initialAccountId) {\n accountNames.push(initialAccountId);\n }\n return accountNames;\n}\n","import { kcpRootOrgsPath } from '../models/constants';\nimport { PortalLuigiNode } from '../models/luigi-node';\nimport {\n calculateAccountHierarchy,\n getInitialAccountId,\n} from '../utils/account-hierarchy.util';\nimport { Injectable, inject } from '@angular/core';\nimport { EnvConfigService } from '@openmfp/portal-ui-lib';\nimport { GatewayService } from '@platform-mesh/portal-ui-lib/services';\n\nexport interface KcpData {\n kcpPath: string;\n accountPath: string | undefined;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class CrdGatewayKcpPatchResolver {\n private gatewayService = inject(GatewayService);\n private envConfigService = inject(EnvConfigService);\n\n public async resolveCrdGatewayKcpPath(\n nextNode: PortalLuigiNode,\n entityId?: string,\n kind?: string,\n ): Promise<KcpData> {\n if (nextNode.context?.kcpPath && !getInitialAccountId(entityId, kind)) {\n this.gatewayService.updateCrdGatewayUrlWithEntityPath(\n nextNode.context.kcpPath,\n );\n return {\n kcpPath: nextNode.context.kcpPath,\n accountPath: nextNode.context.accountPath,\n };\n }\n\n const accountNames = calculateAccountHierarchy(nextNode, entityId, kind);\n\n const accountPath =\n accountNames.length > 0 ? `${accountNames.join(':')}` : '';\n\n const org = (await this.envConfigService.getEnvConfig()).idpName;\n const kcpPath = `${kcpRootOrgsPath}:${org}${accountPath ? ':' + accountPath : ''}`;\n this.gatewayService.updateCrdGatewayUrlWithEntityPath(kcpPath);\n\n if (nextNode.context) {\n nextNode.context.kcpPath = kcpPath;\n nextNode.context.accountPath = accountPath;\n }\n return { kcpPath, accountPath };\n }\n}\n","import { PortalLuigiNode } from '../models/luigi-node';\nimport { CrdGatewayKcpPatchResolver } from './crd-gateway-kcp-patch-resolver.service';\nimport { Injectable, inject } from '@angular/core';\nimport {\n LuigiCoreService,\n NodeChangeHookConfigService,\n NodeContext,\n} from '@openmfp/portal-ui-lib';\n\n@Injectable({ providedIn: 'root' })\nexport class NodeChangeHookConfigServiceImpl implements NodeChangeHookConfigService {\n private luigiCoreService = inject(LuigiCoreService);\n private crdGatewayKcpPatchResolver = inject(CrdGatewayKcpPatchResolver);\n\n async nodeChangeHook(\n prevNode: PortalLuigiNode,\n nextNode: PortalLuigiNode,\n currentContext: NodeContext,\n ) {\n if (\n nextNode.initialRoute &&\n nextNode.virtualTree &&\n !(nextNode as any)._virtualTree\n ) {\n this.luigiCoreService.navigation().navigate(nextNode.initialRoute);\n }\n\n await this.crdGatewayKcpPatchResolver.resolveCrdGatewayKcpPath(nextNode);\n }\n}\n","import { PortalNodeContext } from '../models/luigi-context';\nimport { PortalLuigiNode } from '../models/luigi-node';\nimport { CrdGatewayKcpPatchResolver } from './crd-gateway-kcp-patch-resolver.service';\nimport { Injectable, inject } from '@angular/core';\nimport { NodeContextProcessingService } from '@openmfp/portal-ui-lib';\nimport { AccountInfo } from '@platform-mesh/portal-ui-lib/models';\nimport {\n AccountInfoService,\n ErrorHandlerService,\n OrganizationReadyService,\n} from '@platform-mesh/portal-ui-lib/services';\nimport { firstValueFrom } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NodeContextProcessingServiceImpl implements NodeContextProcessingService {\n private crdGatewayKcpPatchResolver = inject(CrdGatewayKcpPatchResolver);\n private accountInfoService = inject(AccountInfoService);\n private organizationReadyService = inject(OrganizationReadyService);\n private errorHandlerService = inject(ErrorHandlerService);\n\n public async processNodeContext(\n dynamicEntityId: string,\n entityNode: PortalLuigiNode,\n ctx: PortalNodeContext,\n ) {\n const kind = entityNode.defineEntity?.type;\n const entityId =\n dynamicEntityId || entityNode.context.resourceDefinition?.name;\n\n if (!entityId) {\n return;\n }\n\n const { kcpPath, accountPath } =\n await this.crdGatewayKcpPatchResolver.resolveCrdGatewayKcpPath(\n entityNode,\n entityId,\n kind,\n );\n\n // update the current already calculated by Luigi context for a node\n this.addFieldsToContext(ctx, entityId, kcpPath, accountPath, kind);\n\n // update the node context of sa node to contain the entity for future context calculations\n this.addFieldsToContext(\n entityNode.context,\n entityId,\n kcpPath,\n accountPath,\n kind,\n );\n\n try {\n const accountInfo = await firstValueFrom(\n this.accountInfoService.read({\n portalContext: {\n crdGatewayApiUrl: ctx.portalContext.crdGatewayApiUrl,\n },\n token: ctx.token,\n accountId: entityId,\n }),\n );\n\n // update the current already calculated by Luigi context for a node\n this.addFieldsToContextFromAccountInfo(ctx, entityId, accountInfo);\n\n // update the node context of sa node to contain the entity for future context calculations\n this.addFieldsToContextFromAccountInfo(\n entityNode.context,\n entityId,\n accountInfo,\n );\n\n // we were able to ready the account info so on this kcpPath we can query for the organization ready state\n this.organizationReadyService.checkOrganizationReady();\n } catch (e) {\n if (!this.errorHandlerService.isUnauthorizedAccess(e)) {\n console.error('Failed to read account info', e);\n }\n }\n }\n\n private addFieldsToContext(\n ctx: PortalNodeContext,\n entityId: string | undefined,\n kcpPath: string,\n accountPath: string | undefined,\n kind: string | undefined,\n ) {\n ctx.kcpPath = kcpPath;\n ctx.entityName = entityId;\n ctx.entityKind = kind;\n ctx.accountPath = accountPath;\n }\n\n private addFieldsToContextFromAccountInfo(\n ctx: PortalNodeContext,\n entityId: string,\n accountInfo: AccountInfo,\n ) {\n const accountOriginClusterId = accountInfo.spec.account.originClusterId;\n const organizationOriginClusterId =\n accountInfo.spec.organization.originClusterId;\n const organization = accountInfo.spec.organization.name;\n\n ctx.organizationId = `${organizationOriginClusterId}/${organization}`;\n ctx.entityId = `${accountOriginClusterId}/${entityId}`;\n ctx.kcpCA = btoa(accountInfo.spec.clusterInfo.ca);\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport {\n ClientEnvironment,\n EnvConfigService,\n RoutingConfigService,\n} from '@openmfp/portal-ui-lib';\n\n@Injectable()\nexport class CustomRoutingConfigServiceImpl implements RoutingConfigService {\n private envConfigService = inject(EnvConfigService);\n private envConfig: ClientEnvironment | null = null;\n\n constructor() {\n this.getEnvConfig();\n }\n\n async getEnvConfig(): Promise<void> {\n this.envConfig = await this.envConfigService.getEnvConfig();\n }\n\n getRoutingConfig(): any {\n return {\n preserveQueryParams: true,\n pageNotFoundHandler: () => {\n if (!this.envConfig?.baseDomain) {\n return this.redirectTo('error/404');\n }\n\n if (window.location.hostname === this.envConfig.baseDomain) {\n return this.redirectTo('welcome');\n }\n\n return this.redirectTo('error/404');\n },\n };\n }\n\n public redirectTo(path: string, keepURL = true): any {\n return {\n redirectTo: path,\n keepURL,\n };\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport {\n AuthService,\n UserProfile,\n UserProfileConfigService,\n} from '@openmfp/portal-ui-lib';\n\n@Injectable({ providedIn: 'root' })\nexport class UserProfileConfigServiceImpl implements UserProfileConfigService {\n private authService = inject(AuthService);\n async getProfile(): Promise<UserProfile> {\n const { email } = this.authService.getUserInfo();\n\n return {\n items: [\n {\n label: 'PROFILE_PROFILE',\n icon: 'customer',\n link: `/users/${email}/overview`,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAUa,4BAA4B,CAAA;AAAzC,IAAA,WAAA,GAAA;AACU,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAgE3C;AA9DE,IAAA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A,CAAA,CAAA;AAA5B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,cADf,MAAM,EAAA,CAAA,CAAA;;2FACnB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACPlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"platform-mesh-portal-ui-lib-portal-options.mjs","sources":["../../projects/lib/portal-options/services/custom-global-nodes.service.ts","../../projects/lib/portal-options/services/header-bar-renderers/namespace-selection-renderer.service.ts","../../projects/lib/portal-options/services/header-bar-renderers/breadcrumb-renderer.ts","../../projects/lib/portal-options/services/header-bar-config.service.ts","../../projects/lib/portal-options/models/constants.ts","../../projects/lib/portal-options/services/luigi-extended-global-context-config.service.ts","../../projects/lib/portal-options/services/navigation-redirect-strategy.service.ts","../../projects/lib/portal-options/utils/account-hierarchy.util.ts","../../projects/lib/portal-options/services/crd-gateway-kcp-patch-resolver.service.ts","../../projects/lib/portal-options/services/node-change-hook-config.service.ts","../../projects/lib/portal-options/services/node-context-processing.service.ts","../../projects/lib/portal-options/services/router-config.service.ts","../../projects/lib/portal-options/services/user-profile-config.service.ts","../../projects/lib/portal-options/platform-mesh-portal-ui-lib-portal-options.ts"],"sourcesContent":["import { PortalNodeContext } from '../models/luigi-context';\nimport { PortalLuigiNode } from '../models/luigi-node';\nimport { inject } from '@angular/core';\nimport {\n CustomGlobalNodesService,\n EntityType,\n I18nService,\n NodeContext,\n} from '@openmfp/portal-ui-lib';\n\nexport class CustomGlobalNodesServiceImpl implements CustomGlobalNodesService {\n private i18nService = inject(I18nService);\n\n async getCustomGlobalNodes(): Promise<PortalLuigiNode[]> {\n return [\n {\n pathSegment: 'error',\n order: 1000,\n hideFromNav: true,\n showBreadcrumbs: false,\n context: {} as PortalNodeContext,\n children: [\n {\n pathSegment: ':id',\n entityType: EntityType.ENTITY_ERROR,\n hideFromNav: true,\n hideSideNav: true,\n viewUrl: '/assets/platform-mesh-portal-ui-wc.js#error-component',\n context: {\n id: ':id',\n translationTable: this.i18nService.translationTable,\n } as any as NodeContext,\n webcomponent: {\n selfRegistered: true,\n },\n },\n ],\n },\n {\n pathSegment: 'users',\n showBreadcrumbs: false,\n hideSideNav: true,\n hideFromNav: true,\n context: {} as PortalNodeContext,\n entityType: 'global',\n children: [\n {\n pathSegment: ':userId',\n hideSideNav: true,\n hideFromNav: true,\n defineEntity: {\n id: 'user',\n },\n context: {\n userId: ':userId',\n } as PortalNodeContext,\n children: [\n {\n pathSegment: 'overview',\n context: {} as PortalNodeContext,\n hideSideNav: true,\n hideFromNav: true,\n defineEntity: {\n id: 'overview',\n },\n compound: {\n children: [],\n },\n },\n ],\n },\n ],\n },\n ];\n }\n}\n","import { DestroyRef, Injectable, inject } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n AuthService,\n LuigiCoreService,\n LuigiNode,\n PortalConfig,\n} from '@openmfp/portal-ui-lib';\nimport {\n FieldDefinition,\n Resource,\n ResourceDefinition,\n ResourceListResult,\n ALL_NAMESPACE,\n} from '@platform-mesh/portal-ui-lib/models';\nimport {\n ResourceNodeContext,\n ResourceService,\n} from '@platform-mesh/portal-ui-lib/services';\nimport {\n generateGraphQLFields,\n isNamespacedResource,\n mergeListWithSubscriptionResult,\n} from '@platform-mesh/portal-ui-lib/utils';\nimport '@ui5/webcomponents/dist/ComboBox.js';\nimport { Observable, Subject, defer, of } from 'rxjs';\nimport {\n catchError,\n retry,\n scan,\n shareReplay,\n startWith,\n switchMap,\n takeUntil,\n} from 'rxjs/operators';\n\nconst defaultColumns: FieldDefinition[] = [\n {\n label: 'Name',\n property: 'metadata.name',\n },\n];\n\n@Injectable({ providedIn: 'root' })\nexport class NamespaceSelectionRendererService {\n private namespaceResourcesCache?: {\n key: string;\n value$: Observable<Resource[]>;\n stop$: Subject<void>;\n };\n\n private resourceService = inject(ResourceService);\n private authService = inject(AuthService);\n private luigiCoreService = inject(LuigiCoreService);\n private destroyRef = inject(DestroyRef);\n\n public create(portalConfig: PortalConfig) {\n return (\n containerElement: HTMLElement,\n nodeItems: any[],\n _clickHandler: any,\n ) => {\n containerElement.style.paddingBottom = '0.5rem';\n\n const lastNode = nodeItems.at(-1)?.node as LuigiNode | undefined;\n const namespace = this.luigiCoreService\n .routing()\n .getSearchParams().namespace;\n const kcpPath = lastNode?.context?.kcpPath;\n\n if (lastNode?.context && !isNamespacedResource(lastNode.context)) {\n return containerElement;\n }\n\n const ui5combobox = this.createCombobox(containerElement);\n\n this.addComboboxItems(portalConfig, ui5combobox, namespace, kcpPath);\n\n ui5combobox.addEventListener('change', (event: any) => {\n const value = (event?.target as any)?.value.trim() ?? '';\n this.changeNamespace(value);\n });\n\n return ui5combobox as HTMLElement;\n };\n }\n\n private createCombobox(containerElement: HTMLElement) {\n const ui5combobox = document.createElement('ui5-combobox');\n ui5combobox.setAttribute('placeholder', 'Namespaces');\n ui5combobox.setAttribute('data-testid', 'namespace-selection-combobox');\n containerElement.appendChild(ui5combobox);\n\n return ui5combobox;\n }\n\n private addComboboxItems(\n portalConfig: PortalConfig,\n ui5combobox: HTMLElement,\n namespace: string | null,\n kcpPath?: string,\n ) {\n this.getNamespaceResourcesCached(portalConfig, kcpPath).subscribe(\n (resources) => {\n this.syncComboboxItems(ui5combobox, resources);\n this.setSelectedValue(ui5combobox, resources, namespace);\n },\n );\n }\n\n private getNamespaceResourcesCached(\n portalConfig: PortalConfig,\n kcpPath?: string,\n ): Observable<Resource[]> {\n const cacheKey = this.getNamespaceResourcesCacheKey(kcpPath);\n if (this.namespaceResourcesCache?.key === cacheKey) {\n return this.namespaceResourcesCache.value$;\n }\n\n if (this.namespaceResourcesCache) {\n this.namespaceResourcesCache.stop$.next();\n this.namespaceResourcesCache.stop$.complete();\n this.namespaceResourcesCache = undefined;\n }\n\n const stop$ = new Subject<void>();\n const value$ = this.getNamespaceResources(\n portalConfig,\n kcpPath,\n stop$,\n ).pipe(shareReplay(1), takeUntilDestroyed(this.destroyRef));\n this.namespaceResourcesCache = {\n key: cacheKey,\n value$,\n stop$,\n };\n\n return value$;\n }\n\n private getNamespaceResourcesCacheKey(kcpPath?: string): string {\n return kcpPath ?? '';\n }\n\n private syncComboboxItems(ui5combobox: HTMLElement, resources: Resource[]) {\n ui5combobox.replaceChildren();\n\n resources.forEach((resource) => {\n const name = resource.metadata?.name;\n if (!name) {\n return;\n }\n const resourceOption = document.createElement('ui5-cb-item');\n resourceOption.setAttribute('text', name);\n resourceOption.setAttribute(\n 'data-testid',\n `namespace-selection-combobox-item-${name}`,\n );\n ui5combobox.appendChild(resourceOption);\n });\n\n const allOption = document.createElement('ui5-cb-item');\n allOption.setAttribute('text', ALL_NAMESPACE);\n allOption.setAttribute(\n 'data-testid',\n 'namespace-selection-combobox-item-all',\n );\n ui5combobox.appendChild(allOption);\n }\n\n private setSelectedValue(\n ui5combobox: HTMLElement,\n resources: Resource[],\n namespace: string | null,\n ) {\n const currentNamespace = this.luigiCoreService\n .routing()\n .getSearchParams().namespace;\n\n if (currentNamespace) {\n ui5combobox.setAttribute('value', currentNamespace);\n return;\n }\n\n if (\n namespace &&\n resources.find((resource) => resource.metadata?.name === namespace)\n ) {\n ui5combobox.setAttribute('value', namespace);\n } else {\n ui5combobox.setAttribute('value', ALL_NAMESPACE);\n this.changeNamespace(ALL_NAMESPACE);\n }\n }\n\n private getNamespaceResources(\n portalConfig: PortalConfig,\n kcpPath: string | undefined,\n stop$: Subject<void>,\n ): Observable<Resource[]> {\n const operation = 'v1_namespaces';\n const fields = generateGraphQLFields(defaultColumns);\n const context = {\n portalContext: {\n crdGatewayApiUrl: portalConfig.portalContext['crdGatewayApiUrl'],\n },\n resourceDefinition: {\n version: 'v1',\n entityCollection: 'Namespaces',\n entity: 'Namespace',\n scope: 'Cluster',\n } as ResourceDefinition,\n kcpPath,\n token: this.authService.getToken(),\n } as ResourceNodeContext;\n\n return defer(() =>\n this.resourceService.list(operation, fields, context),\n ).pipe(\n retry(3),\n takeUntil(stop$),\n switchMap((result: ResourceListResult) =>\n this.resourceService\n .resourceChangeSubscription(\n operation,\n fields,\n context,\n result.resourceVersion,\n false,\n )\n .pipe(\n startWith(undefined),\n scan(\n (resources, subscriptionResult) =>\n mergeListWithSubscriptionResult(resources, subscriptionResult, {\n getItemKey: (resource) => resource.metadata?.name,\n mapSubscriptionObjectToItem: (object) => object,\n }),\n result.items,\n ),\n takeUntil(stop$),\n ),\n ),\n catchError((error) => {\n console.error(`Failed to read entities from ${operation}`, error);\n return of([]);\n }),\n );\n }\n\n private changeNamespace(value: string): void {\n if (!value) {\n return;\n }\n\n const oldValue = this.luigiCoreService\n .routing()\n .getSearchParams().namespace;\n\n if (oldValue === value) {\n return;\n }\n\n this.luigiCoreService.routing().addSearchParams({ namespace: value });\n }\n}\n","import '@ui5/webcomponents/dist/Breadcrumbs.js';\nimport '@ui5/webcomponents/dist/BreadcrumbsItem.js';\n\nexport const breadcrumbRenderer = (\n containerElement: HTMLElement,\n nodeItems: any[],\n clickHandler: (item: any) => void,\n): HTMLElement => {\n containerElement.style.width = '100%';\n\n const ui5breadcrumbs = document.createElement('ui5-breadcrumbs');\n ui5breadcrumbs.setAttribute('separators', 'Slash');\n containerElement.appendChild(ui5breadcrumbs);\n\n nodeItems.forEach((item) => {\n if (item.node?.hideFromBreadcrumb) {\n return;\n }\n\n const itemCmp = document.createElement('ui5-breadcrumbs-item');\n itemCmp.textContent = item.label ?? '';\n (itemCmp as any)._item = item;\n ui5breadcrumbs.appendChild(itemCmp);\n });\n\n ui5breadcrumbs.addEventListener('item-click', (event: any) => {\n if (\n !(\n event.detail.ctrlKey ||\n event.detail.altKey ||\n event.detail.shiftKey ||\n event.detail.metaKey\n )\n ) {\n event.preventDefault();\n clickHandler(event.detail.item._item);\n }\n });\n\n return ui5breadcrumbs;\n};\n","import { Injectable, inject } from '@angular/core';\nimport {\n ConfigService,\n HeaderBarConfig,\n HeaderBarConfigService,\n} from '@openmfp/portal-ui-lib';\nimport { NamespaceSelectionRendererService } from './header-bar-renderers/namespace-selection-renderer.service';\nimport { breadcrumbRenderer } from './header-bar-renderers/breadcrumb-renderer';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class HeaderBarConfigServiceImpl implements HeaderBarConfigService {\n private configService = inject(ConfigService);\n private namespaceSelectionRendererService = inject(NamespaceSelectionRendererService);\n\n public async getConfig(): Promise<HeaderBarConfig> {\n const portalConfig = await this.configService.getPortalConfig();\n\n return {\n pendingItemLabel: '...',\n omitRoot: false,\n clearBeforeRender: true,\n autoHide: true,\n leftRenderers: [breadcrumbRenderer],\n rightRenderers: [this.namespaceSelectionRendererService.create(portalConfig)],\n };\n }\n}\n","export const kcpRootOrgsPath = 'root:orgs';\n","import { kcpRootOrgsPath } from '../models/constants';\nimport { Injectable, inject } from '@angular/core';\nimport {\n EnvConfigService,\n LuigiExtendedGlobalContextConfigService,\n} from '@openmfp/portal-ui-lib';\n\n@Injectable({ providedIn: 'root' })\nexport class LuigiExtendedGlobalContextConfigServiceImpl implements LuigiExtendedGlobalContextConfigService {\n private envConfigService = inject(EnvConfigService);\n\n async createLuigiExtendedGlobalContext(): Promise<Record<string, any>> {\n const idpName = (await this.envConfigService.getEnvConfig()).idpName;\n\n if (idpName === 'welcome') {\n return {};\n }\n\n return {\n organization: idpName,\n kcpPath: `${kcpRootOrgsPath}:${idpName}`,\n entityName: idpName,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { LocalStorageKeys, NavigationRedirectStrategy } from '@openmfp/portal-ui-lib';\n\n@Injectable({ providedIn: 'root' })\nexport class NavigationRedirectStrategyServiceImpl implements NavigationRedirectStrategy {\n getRedirectUrl(): string {\n return localStorage.getItem(LocalStorageKeys.LAST_NAVIGATION_URL) || '';\n }\n\n saveRedirectUrl(url: string): void {\n if (url.startsWith('/error')) {\n return;\n }\n\n localStorage.setItem(LocalStorageKeys.LAST_NAVIGATION_URL, url);\n }\n\n clearRedirectUrl(): void {\n localStorage.removeItem(LocalStorageKeys.LAST_NAVIGATION_URL);\n }\n}\n","import { PortalLuigiNode } from '../models/luigi-node';\n\nexport function collectAccountNamesFromNodeHierarchy(\n node: PortalLuigiNode | undefined,\n): string[] {\n const accountNames: string[] = [];\n let currentNode: PortalLuigiNode | undefined = node;\n\n while (currentNode) {\n const entityName = currentNode.context?.entityName;\n const entityKind = currentNode.context?.entityKind;\n if (entityName && entityKind?.toLowerCase() === 'account') {\n accountNames.unshift(entityName);\n }\n currentNode = currentNode.parent;\n }\n\n return accountNames;\n}\n\nexport function getInitialAccountId(\n entityId?: string,\n kind?: string,\n): string | undefined {\n return kind?.toLowerCase() === 'account' && entityId ? entityId : undefined;\n}\n\nexport function calculateAccountHierarchy(\n entityNode: PortalLuigiNode,\n entityId?: string,\n kind?: string,\n): string[] {\n const initialAccountId = getInitialAccountId(entityId, kind);\n // when we are on a dynamic node and the id any kind has changed we need to reset the context data\n if (entityNode.defineEntity?.contextKey && initialAccountId) {\n entityNode.context.entityName = undefined;\n entityNode.context.entityKind = undefined;\n }\n\n const accountNames = collectAccountNamesFromNodeHierarchy(entityNode);\n\n if (initialAccountId) {\n accountNames.push(initialAccountId);\n }\n return accountNames;\n}\n","import { kcpRootOrgsPath } from '../models/constants';\nimport { PortalLuigiNode } from '../models/luigi-node';\nimport {\n calculateAccountHierarchy,\n getInitialAccountId,\n} from '../utils/account-hierarchy.util';\nimport { Injectable, inject } from '@angular/core';\nimport { EnvConfigService } from '@openmfp/portal-ui-lib';\nimport { GatewayService } from '@platform-mesh/portal-ui-lib/services';\n\nexport interface KcpData {\n kcpPath: string;\n accountPath: string | undefined;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class CrdGatewayKcpPatchResolver {\n private gatewayService = inject(GatewayService);\n private envConfigService = inject(EnvConfigService);\n\n public async resolveCrdGatewayKcpPath(\n nextNode: PortalLuigiNode,\n entityId?: string,\n kind?: string,\n ): Promise<KcpData> {\n if (nextNode.context?.kcpPath && !getInitialAccountId(entityId, kind)) {\n this.gatewayService.updateCrdGatewayUrlWithEntityPath(\n nextNode.context.kcpPath,\n );\n return {\n kcpPath: nextNode.context.kcpPath,\n accountPath: nextNode.context.accountPath,\n };\n }\n\n const accountNames = calculateAccountHierarchy(nextNode, entityId, kind);\n\n const accountPath =\n accountNames.length > 0 ? `${accountNames.join(':')}` : '';\n\n const org = (await this.envConfigService.getEnvConfig()).idpName;\n const kcpPath = `${kcpRootOrgsPath}:${org}${accountPath ? ':' + accountPath : ''}`;\n this.gatewayService.updateCrdGatewayUrlWithEntityPath(kcpPath);\n\n if (nextNode.context) {\n nextNode.context.kcpPath = kcpPath;\n nextNode.context.accountPath = accountPath;\n }\n return { kcpPath, accountPath };\n }\n}\n","import { PortalLuigiNode } from '../models/luigi-node';\nimport { CrdGatewayKcpPatchResolver } from './crd-gateway-kcp-patch-resolver.service';\nimport { Injectable, inject } from '@angular/core';\nimport {\n LuigiCoreService,\n NodeChangeHookConfigService,\n NodeContext,\n} from '@openmfp/portal-ui-lib';\n\n@Injectable({ providedIn: 'root' })\nexport class NodeChangeHookConfigServiceImpl implements NodeChangeHookConfigService {\n private luigiCoreService = inject(LuigiCoreService);\n private crdGatewayKcpPatchResolver = inject(CrdGatewayKcpPatchResolver);\n\n async nodeChangeHook(\n prevNode: PortalLuigiNode,\n nextNode: PortalLuigiNode,\n currentContext: NodeContext,\n ) {\n if (\n nextNode.initialRoute &&\n nextNode.virtualTree &&\n !(nextNode as any)._virtualTree\n ) {\n this.luigiCoreService.navigation().navigate(nextNode.initialRoute);\n }\n\n await this.crdGatewayKcpPatchResolver.resolveCrdGatewayKcpPath(nextNode);\n }\n}\n","import { PortalNodeContext } from '../models/luigi-context';\nimport { PortalLuigiNode } from '../models/luigi-node';\nimport { CrdGatewayKcpPatchResolver } from './crd-gateway-kcp-patch-resolver.service';\nimport { Injectable, inject } from '@angular/core';\nimport { NodeContextProcessingService } from '@openmfp/portal-ui-lib';\nimport { AccountInfo } from '@platform-mesh/portal-ui-lib/models';\nimport {\n AccountInfoService,\n ErrorHandlerService,\n OrganizationReadyService,\n} from '@platform-mesh/portal-ui-lib/services';\nimport { firstValueFrom } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NodeContextProcessingServiceImpl implements NodeContextProcessingService {\n private crdGatewayKcpPatchResolver = inject(CrdGatewayKcpPatchResolver);\n private accountInfoService = inject(AccountInfoService);\n private organizationReadyService = inject(OrganizationReadyService);\n private errorHandlerService = inject(ErrorHandlerService);\n\n public async processNodeContext(\n dynamicEntityId: string,\n entityNode: PortalLuigiNode,\n ctx: PortalNodeContext,\n ) {\n const kind = entityNode.defineEntity?.type;\n const entityId =\n dynamicEntityId || entityNode.context.resourceDefinition?.name;\n\n if (!entityId) {\n return;\n }\n\n const { kcpPath, accountPath } =\n await this.crdGatewayKcpPatchResolver.resolveCrdGatewayKcpPath(\n entityNode,\n entityId,\n kind,\n );\n\n // update the current already calculated by Luigi context for a node\n this.addFieldsToContext(ctx, entityId, kcpPath, accountPath, kind);\n\n // update the node context of sa node to contain the entity for future context calculations\n this.addFieldsToContext(\n entityNode.context,\n entityId,\n kcpPath,\n accountPath,\n kind,\n );\n\n try {\n const accountInfo = await firstValueFrom(\n this.accountInfoService.read({\n portalContext: {\n crdGatewayApiUrl: ctx.portalContext.crdGatewayApiUrl,\n },\n token: ctx.token,\n accountId: entityId,\n }),\n );\n\n // update the current already calculated by Luigi context for a node\n this.addFieldsToContextFromAccountInfo(ctx, entityId, accountInfo);\n\n // update the node context of sa node to contain the entity for future context calculations\n this.addFieldsToContextFromAccountInfo(\n entityNode.context,\n entityId,\n accountInfo,\n );\n\n // we were able to ready the account info so on this kcpPath we can query for the organization ready state\n this.organizationReadyService.checkOrganizationReady();\n } catch (e) {\n if (!this.errorHandlerService.isUnauthorizedAccess(e)) {\n console.error('Failed to read account info', e);\n }\n }\n }\n\n private addFieldsToContext(\n ctx: PortalNodeContext,\n entityId: string | undefined,\n kcpPath: string,\n accountPath: string | undefined,\n kind: string | undefined,\n ) {\n ctx.kcpPath = kcpPath;\n ctx.entityName = entityId;\n ctx.entityKind = kind;\n ctx.accountPath = accountPath;\n }\n\n private addFieldsToContextFromAccountInfo(\n ctx: PortalNodeContext,\n entityId: string,\n accountInfo: AccountInfo,\n ) {\n const accountOriginClusterId = accountInfo.spec.account.originClusterId;\n const organizationOriginClusterId =\n accountInfo.spec.organization.originClusterId;\n const organization = accountInfo.spec.organization.name;\n\n ctx.organizationId = `${organizationOriginClusterId}/${organization}`;\n ctx.entityId = `${accountOriginClusterId}/${entityId}`;\n ctx.kcpCA = btoa(accountInfo.spec.clusterInfo.ca);\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport {\n ClientEnvironment,\n EnvConfigService,\n RoutingConfigService,\n} from '@openmfp/portal-ui-lib';\n\n@Injectable()\nexport class CustomRoutingConfigServiceImpl implements RoutingConfigService {\n private envConfigService = inject(EnvConfigService);\n private envConfig: ClientEnvironment | null = null;\n\n constructor() {\n this.getEnvConfig();\n }\n\n async getEnvConfig(): Promise<void> {\n this.envConfig = await this.envConfigService.getEnvConfig();\n }\n\n getRoutingConfig(): any {\n return {\n preserveQueryParams: true,\n pageNotFoundHandler: () => {\n if (!this.envConfig?.baseDomain) {\n return this.redirectTo('error/404');\n }\n\n if (window.location.hostname === this.envConfig.baseDomain) {\n return this.redirectTo('welcome');\n }\n\n return this.redirectTo('error/404');\n },\n };\n }\n\n public redirectTo(path: string, keepURL = true): any {\n return {\n redirectTo: path,\n keepURL,\n };\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport {\n AuthService,\n UserProfile,\n UserProfileConfigService,\n} from '@openmfp/portal-ui-lib';\n\n@Injectable({ providedIn: 'root' })\nexport class UserProfileConfigServiceImpl implements UserProfileConfigService {\n private authService = inject(AuthService);\n async getProfile(): Promise<UserProfile> {\n const { email } = this.authService.getUserInfo();\n\n return {\n items: [\n {\n label: 'PROFILE_PROFILE',\n icon: 'customer',\n link: `/users/${email}/overview`,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAUa,4BAA4B,CAAA;AAAzC,IAAA,WAAA,GAAA;AACU,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAgE3C;AA9DE,IAAA,MAAM,oBAAoB,GAAA;QACxB,OAAO;AACL,YAAA;AACE,gBAAA,WAAW,EAAE,OAAO;AACpB,gBAAA,KAAK,EAAE,IAAI;AACX,gBAAA,WAAW,EAAE,IAAI;AACjB,gBAAA,eAAe,EAAE,KAAK;AACtB,gBAAA,OAAO,EAAE,EAAuB;AAChC,gBAAA,QAAQ,EAAE;AACR,oBAAA;AACE,wBAAA,WAAW,EAAE,KAAK;wBAClB,UAAU,EAAE,UAAU,CAAC,YAAY;AACnC,wBAAA,WAAW,EAAE,IAAI;AACjB,wBAAA,WAAW,EAAE,IAAI;AACjB,wBAAA,OAAO,EAAE,uDAAuD;AAChE,wBAAA,OAAO,EAAE;AACP,4BAAA,EAAE,EAAE,KAAK;AACT,4BAAA,gBAAgB,EAAE,IAAI,CAAC,WAAW,CAAC,gBAAgB;AAC9B,yBAAA;AACvB,wBAAA,YAAY,EAAE;AACZ,4BAAA,cAAc,EAAE,IAAI;AACrB,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;AACD,YAAA;AACE,gBAAA,WAAW,EAAE,OAAO;AACpB,gBAAA,eAAe,EAAE,KAAK;AACtB,gBAAA,WAAW,EAAE,IAAI;AACjB,gBAAA,WAAW,EAAE,IAAI;AACjB,gBAAA,OAAO,EAAE,EAAuB;AAChC,gBAAA,UAAU,EAAE,QAAQ;AACpB,gBAAA,QAAQ,EAAE;AACR,oBAAA;AACE,wBAAA,WAAW,EAAE,SAAS;AACtB,wBAAA,WAAW,EAAE,IA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,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE;QAEhD,OAAO;AACL,YAAA,KAAK,EAAE;AACL,gBAAA;AACE,oBAAA,KAAK,EAAE,iBAAiB;AACxB,oBAAA,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,CAAA,OAAA,EAAU,KAAK,CAAA,SAAA,CAAW;AACjC,iBAAA;AACF,aAAA;SACF;IACH;8GAdW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA5B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,cADf,MAAM,EAAA,CAAA,CAAA;;2FACnB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACPlC;;AAEG;;;;"}
|
|
@@ -10,7 +10,7 @@ import { HttpLink } from 'apollo-angular/http';
|
|
|
10
10
|
import { print } from 'graphql';
|
|
11
11
|
import { createClient } from 'graphql-sse';
|
|
12
12
|
import { ALL_NAMESPACE } from '@platform-mesh/portal-ui-lib/models';
|
|
13
|
-
import { isNamespacedResource, getValueByPath, buildResourcePath, getResourceValueByJsonPath,
|
|
13
|
+
import { isNamespacedResource, getValueByPath, buildResourcePath, getResourceValueByJsonPath, stripTypename } from '@platform-mesh/portal-ui-lib/utils';
|
|
14
14
|
import * as gqlBuilder from 'gql-query-builder';
|
|
15
15
|
import { throwError, Subject, filter, exhaustMap, EMPTY } from 'rxjs';
|
|
16
16
|
import { map, catchError, shareReplay } from 'rxjs/operators';
|
|
@@ -142,10 +142,10 @@ class ResourceService {
|
|
|
142
142
|
}
|
|
143
143
|
resolveReadQuery(params, fieldsOrRawQuery, resourceId, namespace) {
|
|
144
144
|
if (fieldsOrRawQuery instanceof Array) {
|
|
145
|
-
const {
|
|
145
|
+
const { entity, version, apiGroup } = params;
|
|
146
146
|
const queryFields = [
|
|
147
147
|
{
|
|
148
|
-
operation:
|
|
148
|
+
operation: entity,
|
|
149
149
|
variables: {
|
|
150
150
|
name: { value: resourceId, type: 'String!' },
|
|
151
151
|
...(namespace && {
|
|
@@ -156,7 +156,7 @@ class ResourceService {
|
|
|
156
156
|
},
|
|
157
157
|
];
|
|
158
158
|
const queryOptions = this.calcQueryOptions(queryFields, [
|
|
159
|
-
{ operation:
|
|
159
|
+
{ operation: apiGroup },
|
|
160
160
|
{ operation: version },
|
|
161
161
|
]);
|
|
162
162
|
return gqlBuilder.query(queryOptions).query;
|
|
@@ -194,12 +194,10 @@ class ResourceService {
|
|
|
194
194
|
return true;
|
|
195
195
|
}
|
|
196
196
|
listWithFields(resourceDefinition, fields, nodeContext, readFromParentKcpPath, variables) {
|
|
197
|
-
const
|
|
198
|
-
const version = resourceDefinition.version;
|
|
199
|
-
const kind = capitalize(resourceDefinition.plural);
|
|
197
|
+
const { apiGroup, entityCollection, version } = resourceDefinition;
|
|
200
198
|
const queryFields = [
|
|
201
199
|
{
|
|
202
|
-
operation:
|
|
200
|
+
operation: entityCollection,
|
|
203
201
|
variables,
|
|
204
202
|
fields: [
|
|
205
203
|
'resourceVersion',
|
|
@@ -210,7 +208,7 @@ class ResourceService {
|
|
|
210
208
|
},
|
|
211
209
|
];
|
|
212
210
|
const queryOptions = this.calcQueryOptions(queryFields, [
|
|
213
|
-
{ operation:
|
|
211
|
+
{ operation: apiGroup },
|
|
214
212
|
{ operation: version },
|
|
215
213
|
]);
|
|
216
214
|
const listQuery = gqlBuilder.query(queryOptions);
|
|
@@ -222,7 +220,7 @@ class ResourceService {
|
|
|
222
220
|
variables: listQuery.variables,
|
|
223
221
|
})
|
|
224
222
|
.pipe(map((res) => {
|
|
225
|
-
const resourceListResult = getValueByPath(res.data, buildResourcePath({
|
|
223
|
+
const resourceListResult = getValueByPath(res.data, buildResourcePath({ apiGroup, version, entity: entityCollection }, '.'));
|
|
226
224
|
if (!resourceListResult) {
|
|
227
225
|
throw new Error('Resource list result not found');
|
|
228
226
|
}
|
|
@@ -310,13 +308,11 @@ class ResourceService {
|
|
|
310
308
|
});
|
|
311
309
|
}
|
|
312
310
|
delete(resource, resourceDefinition, nodeContext, readFromParentKcpPath = false) {
|
|
313
|
-
const group = replaceDotsAndHyphensWithUnderscores(resourceDefinition.group);
|
|
314
311
|
const isNamespaced = isNamespacedResource(nodeContext);
|
|
315
|
-
const
|
|
316
|
-
const version = resourceDefinition.version;
|
|
312
|
+
const { apiGroup, entity, version } = resourceDefinition;
|
|
317
313
|
const fields = [
|
|
318
314
|
{
|
|
319
|
-
operation: `delete${
|
|
315
|
+
operation: `delete${entity}`,
|
|
320
316
|
variables: {
|
|
321
317
|
name: { type: 'String!', value: resource.metadata.name },
|
|
322
318
|
...(isNamespaced && {
|
|
@@ -330,7 +326,7 @@ class ResourceService {
|
|
|
330
326
|
},
|
|
331
327
|
];
|
|
332
328
|
const queryOptions = this.calcQueryOptions(fields, [
|
|
333
|
-
{ operation:
|
|
329
|
+
{ operation: apiGroup },
|
|
334
330
|
{ operation: version },
|
|
335
331
|
]);
|
|
336
332
|
const mutation = gqlBuilder.mutation(queryOptions);
|
|
@@ -349,24 +345,22 @@ class ResourceService {
|
|
|
349
345
|
}
|
|
350
346
|
create(resource, resourceDefinition, nodeContext) {
|
|
351
347
|
const isNamespaced = isNamespacedResource(nodeContext);
|
|
352
|
-
const
|
|
353
|
-
const
|
|
354
|
-
const kind = resourceDefinition.kind;
|
|
355
|
-
const namespace = this.getNamespace(nodeContext, resource);
|
|
348
|
+
const { apiGroup, entity, version } = resourceDefinition;
|
|
349
|
+
const namespace = this.getNamespace(nodeContext);
|
|
356
350
|
const mutationFields = [
|
|
357
351
|
{
|
|
358
|
-
operation: `create${
|
|
352
|
+
operation: `create${entity}`,
|
|
359
353
|
variables: {
|
|
360
354
|
...(isNamespaced && {
|
|
361
355
|
namespace: { type: 'String', value: namespace },
|
|
362
356
|
}),
|
|
363
|
-
object: { type: `${
|
|
357
|
+
object: { type: `${entity}Input!`, value: resource },
|
|
364
358
|
},
|
|
365
359
|
fields: ['__typename'],
|
|
366
360
|
},
|
|
367
361
|
];
|
|
368
362
|
const queryOptions = this.calcQueryOptions(mutationFields, [
|
|
369
|
-
{ operation:
|
|
363
|
+
{ operation: apiGroup },
|
|
370
364
|
{ operation: version },
|
|
371
365
|
]);
|
|
372
366
|
const mutation = gqlBuilder.mutation(queryOptions);
|
|
@@ -386,21 +380,19 @@ class ResourceService {
|
|
|
386
380
|
}
|
|
387
381
|
update(resource, resourceDefinition, nodeContext, readFromParentKcpPath = false, fields = ['__typename']) {
|
|
388
382
|
const isNamespaced = isNamespacedResource(nodeContext);
|
|
389
|
-
const
|
|
390
|
-
const kind = resourceDefinition.kind;
|
|
391
|
-
const version = resourceDefinition.version;
|
|
383
|
+
const { apiGroup, entity, version } = resourceDefinition;
|
|
392
384
|
const namespace = this.getNamespace(nodeContext);
|
|
393
385
|
const cleanResource = stripTypename(resource);
|
|
394
386
|
const mutationFields = [
|
|
395
387
|
{
|
|
396
|
-
operation: `update${
|
|
388
|
+
operation: `update${entity}`,
|
|
397
389
|
variables: {
|
|
398
390
|
...(isNamespaced && {
|
|
399
391
|
namespace: { type: 'String', value: namespace },
|
|
400
392
|
}),
|
|
401
393
|
name: { type: 'String!', value: resource.metadata.name },
|
|
402
394
|
object: {
|
|
403
|
-
type: `${
|
|
395
|
+
type: `${entity}Input!`,
|
|
404
396
|
value: cleanResource,
|
|
405
397
|
},
|
|
406
398
|
},
|
|
@@ -408,7 +400,7 @@ class ResourceService {
|
|
|
408
400
|
},
|
|
409
401
|
];
|
|
410
402
|
const queryOptions = this.calcQueryOptions(mutationFields, [
|
|
411
|
-
{ operation:
|
|
403
|
+
{ operation: apiGroup },
|
|
412
404
|
{ operation: version },
|
|
413
405
|
]);
|
|
414
406
|
const mutation = gqlBuilder.mutation(queryOptions);
|
|
@@ -420,7 +412,7 @@ class ResourceService {
|
|
|
420
412
|
fetchPolicy: 'no-cache',
|
|
421
413
|
variables: mutation.variables,
|
|
422
414
|
})
|
|
423
|
-
.pipe(map((res) => getValueByPath(res.data, buildResourcePath({
|
|
415
|
+
.pipe(map((res) => getValueByPath(res.data, buildResourcePath({ apiGroup, entity: `update${entity}`, version }, '.'))), catchError((error) => {
|
|
424
416
|
this.alertErrors(error);
|
|
425
417
|
console.error('Error executing GraphQL query.', error);
|
|
426
418
|
return throwError(() => error);
|