@platform-mesh/portal-ui-lib 0.53.2 → 0.54.0
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 +1710 -104
- package/fesm2022/platform-mesh-portal-ui-lib-models.mjs +3 -1
- package/fesm2022/platform-mesh-portal-ui-lib-models.mjs.map +1 -1
- package/fesm2022/platform-mesh-portal-ui-lib-portal-options.mjs +60 -49
- package/fesm2022/platform-mesh-portal-ui-lib-portal-options.mjs.map +1 -1
- package/fesm2022/platform-mesh-portal-ui-lib-services.mjs +139 -29
- package/fesm2022/platform-mesh-portal-ui-lib-services.mjs.map +1 -1
- package/fesm2022/platform-mesh-portal-ui-lib-utils.mjs.map +1 -1
- package/package.json +3 -3
- package/types/platform-mesh-portal-ui-lib-models.d.ts +22 -3
- package/types/platform-mesh-portal-ui-lib-services.d.ts +41 -6
- package/assets/216.js +0 -1
- package/assets/353.js +0 -1
- package/assets/418.js +0 -1
- package/assets/550.js +0 -1
- package/assets/646.js +0 -1
- package/assets/716.js +0 -1
- package/assets/874.js +0 -1
- package/assets/90.js +0 -1
- package/assets/ui5-webcomponents-fiori-sap-fiori_3-parameters-bundle.js +0 -1
- package/assets/ui5-webcomponents-fiori-sap-fiori_3_dark-parameters-bundle.js +0 -1
- package/assets/ui5-webcomponents-fiori-sap-fiori_3_hcb-parameters-bundle.js +0 -1
- package/assets/ui5-webcomponents-fiori-sap-fiori_3_hcw-parameters-bundle.js +0 -1
- package/assets/ui5-webcomponents-fiori-sap-horizon-parameters-bundle.js +0 -1
- package/assets/ui5-webcomponents-fiori-sap-horizon_auto-parameters-bundle.js +0 -1
- package/assets/ui5-webcomponents-fiori-sap-horizon_dark-parameters-bundle.js +0 -1
- package/assets/ui5-webcomponents-fiori-sap-horizon_hc_auto-parameters-bundle.js +0 -1
- package/assets/ui5-webcomponents-fiori-sap-horizon_hcb-parameters-bundle.js +0 -1
- package/assets/ui5-webcomponents-fiori-sap-horizon_hcw-parameters-bundle.js +0 -1
- package/assets/ui5-webcomponents-sap-icons-v4.js +0 -1
- package/assets/ui5-webcomponents-sap-icons-v5.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injectable } from '@angular/core';
|
|
3
3
|
import { LuigiCoreService, AuthService, ConfigService, EnvConfigService } from '@openmfp/portal-ui-lib';
|
|
4
|
-
import { kcpRootOrgsPath, ALL_NAMESPACE } from '@platform-mesh/portal-ui-lib/models';
|
|
4
|
+
import { kcpRootOrgsPath, ALL_NAMESPACE, DOWNLOAD_KUBECONFIG_FROM_SECRET_REF_ACTION } from '@platform-mesh/portal-ui-lib/models';
|
|
5
5
|
import { HttpHeaders, HttpClient } from '@angular/common/http';
|
|
6
6
|
import { ApolloLink, Observable, split, InMemoryCache } from '@apollo/client/core';
|
|
7
7
|
import { SetContextLink } from '@apollo/client/link/context';
|
|
@@ -10,9 +10,9 @@ import { Apollo, gql } from 'apollo-angular';
|
|
|
10
10
|
import { HttpLink } from 'apollo-angular/http';
|
|
11
11
|
import { print } from 'graphql';
|
|
12
12
|
import { createClient } from 'graphql-sse';
|
|
13
|
-
import { of, throwError, Subject, filter, exhaustMap, EMPTY } from 'rxjs';
|
|
13
|
+
import { of, throwError, catchError as catchError$1, map as map$1, Subject, filter, exhaustMap, EMPTY } from 'rxjs';
|
|
14
14
|
import { catchError, map, shareReplay } from 'rxjs/operators';
|
|
15
|
-
import { isNamespacedResource, getValueByPath, buildResourcePath, getResourceValueByJsonPath, buildGraphQLInputTypeName, stripTypename } from '@platform-mesh/portal-ui-lib/utils';
|
|
15
|
+
import { isNamespacedResource, getValueByPath, buildResourcePath, getResourceValueByJsonPath, buildGraphQLInputTypeName, stripTypename, decodeBase64 } from '@platform-mesh/portal-ui-lib/utils';
|
|
16
16
|
import * as gqlBuilder from 'gql-query-builder';
|
|
17
17
|
|
|
18
18
|
class GatewayService {
|
|
@@ -47,10 +47,10 @@ class GatewayService {
|
|
|
47
47
|
extractKcpPath(gatewayUrl) {
|
|
48
48
|
return gatewayUrl.match(new RegExp(`(${kcpRootOrgsPath}[^/]*)`))?.[1] || '';
|
|
49
49
|
}
|
|
50
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
51
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
50
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: GatewayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
51
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: GatewayService, providedIn: 'root' }); }
|
|
52
52
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: GatewayService, decorators: [{
|
|
54
54
|
type: Injectable,
|
|
55
55
|
args: [{ providedIn: 'root' }]
|
|
56
56
|
}] });
|
|
@@ -197,10 +197,10 @@ class ApolloFactory {
|
|
|
197
197
|
cache,
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
201
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
200
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ApolloFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
201
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ApolloFactory, providedIn: 'root' }); }
|
|
202
202
|
}
|
|
203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ApolloFactory, decorators: [{
|
|
204
204
|
type: Injectable,
|
|
205
205
|
args: [{
|
|
206
206
|
providedIn: 'root',
|
|
@@ -244,10 +244,10 @@ class InstancePermissionsService {
|
|
|
244
244
|
checkInstances(nodeContext, permissionsDefinition, instances) {
|
|
245
245
|
return this.requestChecks(nodeContext, permissionsDefinition, instances);
|
|
246
246
|
}
|
|
247
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
248
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
247
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: InstancePermissionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
248
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: InstancePermissionsService, providedIn: 'root' }); }
|
|
249
249
|
}
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: InstancePermissionsService, decorators: [{
|
|
251
251
|
type: Injectable,
|
|
252
252
|
args: [{ providedIn: 'root' }]
|
|
253
253
|
}] });
|
|
@@ -613,8 +613,9 @@ class ResourceService {
|
|
|
613
613
|
`;
|
|
614
614
|
}
|
|
615
615
|
catch (error) {
|
|
616
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
616
617
|
this.luigiCoreService.showAlert({
|
|
617
|
-
text: `Could not parse gql query: <br/><br/> ${query} <br/><br/> ${
|
|
618
|
+
text: `Could not parse gql query: <br/><br/> ${query} <br/><br/> ${message}`,
|
|
618
619
|
type: 'error',
|
|
619
620
|
});
|
|
620
621
|
throw error;
|
|
@@ -658,10 +659,119 @@ class ResourceService {
|
|
|
658
659
|
},
|
|
659
660
|
};
|
|
660
661
|
}
|
|
661
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
662
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
662
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ResourceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
663
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ResourceService, providedIn: 'root' }); }
|
|
663
664
|
}
|
|
664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ResourceService, decorators: [{
|
|
666
|
+
type: Injectable,
|
|
667
|
+
args: [{
|
|
668
|
+
providedIn: 'root',
|
|
669
|
+
}]
|
|
670
|
+
}] });
|
|
671
|
+
|
|
672
|
+
const SECRET_RESOURCE_DEFINITION = {
|
|
673
|
+
version: 'v1',
|
|
674
|
+
entity: 'Secret',
|
|
675
|
+
entityCollection: 'Secrets',
|
|
676
|
+
scope: 'Namespaced',
|
|
677
|
+
};
|
|
678
|
+
const DEFAULT_DATA_KEY = 'kubeconfig';
|
|
679
|
+
const DEFAULT_FILENAME = 'kubeconfig.yaml';
|
|
680
|
+
function isDownloadKubeconfigButtonSettings(buttonSettings) {
|
|
681
|
+
return buttonSettings?.action === DOWNLOAD_KUBECONFIG_FROM_SECRET_REF_ACTION;
|
|
682
|
+
}
|
|
683
|
+
class KubeconfigSecretService {
|
|
684
|
+
constructor() {
|
|
685
|
+
this.resourceService = inject(ResourceService);
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Fields the detail-view query has to read so the action can resolve its
|
|
689
|
+
* Secret reference from the loaded resource.
|
|
690
|
+
*/
|
|
691
|
+
secretReferenceQueryFields(buttonSettings) {
|
|
692
|
+
if (!isDownloadKubeconfigButtonSettings(buttonSettings)) {
|
|
693
|
+
return [];
|
|
694
|
+
}
|
|
695
|
+
const fields = [];
|
|
696
|
+
const resourceProperty = this.readString(buttonSettings.resourceProperty);
|
|
697
|
+
if (resourceProperty) {
|
|
698
|
+
fields.push({ property: resourceProperty });
|
|
699
|
+
}
|
|
700
|
+
const namespaceProperty = this.readString(buttonSettings.namespaceProperty);
|
|
701
|
+
if (namespaceProperty) {
|
|
702
|
+
fields.push({ property: namespaceProperty });
|
|
703
|
+
}
|
|
704
|
+
return fields;
|
|
705
|
+
}
|
|
706
|
+
isSecretReferenceAvailable(buttonSettings, resource, context) {
|
|
707
|
+
return (isDownloadKubeconfigButtonSettings(buttonSettings) &&
|
|
708
|
+
this.resolveSecretReference(buttonSettings, resource, context) !==
|
|
709
|
+
undefined);
|
|
710
|
+
}
|
|
711
|
+
readKubeconfig(buttonSettings, resource, context) {
|
|
712
|
+
if (!isDownloadKubeconfigButtonSettings(buttonSettings)) {
|
|
713
|
+
return throwError(() => new Error('Button is not a kubeconfig download action'));
|
|
714
|
+
}
|
|
715
|
+
const secretReference = this.resolveSecretReference(buttonSettings, resource, context);
|
|
716
|
+
if (!secretReference) {
|
|
717
|
+
return throwError(() => new Error('Kubeconfig Secret reference is not available'));
|
|
718
|
+
}
|
|
719
|
+
const dataKey = this.readString(buttonSettings.dataKey) ?? DEFAULT_DATA_KEY;
|
|
720
|
+
const filename = this.readString(buttonSettings.filename) ?? DEFAULT_FILENAME;
|
|
721
|
+
const secretContext = {
|
|
722
|
+
...context,
|
|
723
|
+
namespaceId: secretReference.namespace,
|
|
724
|
+
resourceDefinition: SECRET_RESOURCE_DEFINITION,
|
|
725
|
+
};
|
|
726
|
+
return this.resourceService
|
|
727
|
+
.read(secretReference.name, SECRET_RESOURCE_DEFINITION, ['data'], secretContext, false)
|
|
728
|
+
.pipe(catchError$1(() => throwError(() => new Error('Kubeconfig Secret could not be read'))), map$1((secret) => {
|
|
729
|
+
const encodedKubeconfig = this.readString(secret?.data?.[dataKey]);
|
|
730
|
+
if (!encodedKubeconfig) {
|
|
731
|
+
throw new Error(`Kubeconfig data key "${dataKey}" is not available`);
|
|
732
|
+
}
|
|
733
|
+
return {
|
|
734
|
+
contents: decodeBase64(encodedKubeconfig),
|
|
735
|
+
filename,
|
|
736
|
+
};
|
|
737
|
+
}));
|
|
738
|
+
}
|
|
739
|
+
resolveSecretReference(buttonSettings, resource, context) {
|
|
740
|
+
if (!resource) {
|
|
741
|
+
return undefined;
|
|
742
|
+
}
|
|
743
|
+
try {
|
|
744
|
+
const resourceProperty = this.readString(buttonSettings.resourceProperty);
|
|
745
|
+
if (!resourceProperty) {
|
|
746
|
+
return undefined;
|
|
747
|
+
}
|
|
748
|
+
const name = this.readString(getResourceValueByJsonPath(resource, {
|
|
749
|
+
property: resourceProperty,
|
|
750
|
+
}));
|
|
751
|
+
const namespaceProperty = this.readString(buttonSettings.namespaceProperty);
|
|
752
|
+
const namespace = namespaceProperty
|
|
753
|
+
? this.namespaceOf(getResourceValueByJsonPath(resource, {
|
|
754
|
+
property: namespaceProperty,
|
|
755
|
+
}))
|
|
756
|
+
: (this.namespaceOf(resource.metadata?.namespace) ??
|
|
757
|
+
this.namespaceOf(this.resourceService.getNamespace(context)));
|
|
758
|
+
return name && namespace ? { name, namespace } : undefined;
|
|
759
|
+
}
|
|
760
|
+
catch {
|
|
761
|
+
return undefined;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
namespaceOf(value) {
|
|
765
|
+
const namespace = this.readString(value);
|
|
766
|
+
return namespace && namespace !== ALL_NAMESPACE ? namespace : undefined;
|
|
767
|
+
}
|
|
768
|
+
readString(value) {
|
|
769
|
+
return typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
770
|
+
}
|
|
771
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: KubeconfigSecretService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
772
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: KubeconfigSecretService, providedIn: 'root' }); }
|
|
773
|
+
}
|
|
774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: KubeconfigSecretService, decorators: [{
|
|
665
775
|
type: Injectable,
|
|
666
776
|
args: [{
|
|
667
777
|
providedIn: 'root',
|
|
@@ -734,10 +844,10 @@ class AccountInfoService {
|
|
|
734
844
|
this.readCache.set(cacheKey, request$);
|
|
735
845
|
return request$;
|
|
736
846
|
}
|
|
737
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
738
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
847
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: AccountInfoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
848
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: AccountInfoService, providedIn: 'root' }); }
|
|
739
849
|
}
|
|
740
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
850
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: AccountInfoService, decorators: [{
|
|
741
851
|
type: Injectable,
|
|
742
852
|
args: [{
|
|
743
853
|
providedIn: 'root',
|
|
@@ -770,10 +880,10 @@ class LogicalClusterService {
|
|
|
770
880
|
})
|
|
771
881
|
.pipe(map((res) => res.data.core_kcp_io.v1alpha1.LogicalCluster));
|
|
772
882
|
}
|
|
773
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
774
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
883
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: LogicalClusterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
884
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: LogicalClusterService, providedIn: 'root' }); }
|
|
775
885
|
}
|
|
776
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
886
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: LogicalClusterService, decorators: [{
|
|
777
887
|
type: Injectable,
|
|
778
888
|
args: [{
|
|
779
889
|
providedIn: 'root',
|
|
@@ -804,10 +914,10 @@ class ErrorHandlerService {
|
|
|
804
914
|
return (!!error?.message?.toLowerCase().includes('forbidden') ||
|
|
805
915
|
!!error?.message?.toLowerCase()?.includes('access denied'));
|
|
806
916
|
}
|
|
807
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
808
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
917
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
918
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ErrorHandlerService, providedIn: 'root' }); }
|
|
809
919
|
}
|
|
810
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
920
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ErrorHandlerService, decorators: [{
|
|
811
921
|
type: Injectable,
|
|
812
922
|
args: [{ providedIn: 'root' }]
|
|
813
923
|
}] });
|
|
@@ -853,10 +963,10 @@ class OrganizationReadyService {
|
|
|
853
963
|
checkOrganizationReady() {
|
|
854
964
|
this.check$.next();
|
|
855
965
|
}
|
|
856
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
857
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
966
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: OrganizationReadyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
967
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: OrganizationReadyService, providedIn: 'root' }); }
|
|
858
968
|
}
|
|
859
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
969
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: OrganizationReadyService, decorators: [{
|
|
860
970
|
type: Injectable,
|
|
861
971
|
args: [{ providedIn: 'root' }]
|
|
862
972
|
}], ctorParameters: () => [] });
|
|
@@ -865,5 +975,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
|
|
|
865
975
|
* Generated bundle index. Do not edit.
|
|
866
976
|
*/
|
|
867
977
|
|
|
868
|
-
export { AccountInfoService, ApolloFactory, ErrorHandlerService, GatewayService, InstancePermissionsService, LogicalClusterService, OrganizationReadyService, ResourceService };
|
|
978
|
+
export { AccountInfoService, ApolloFactory, ErrorHandlerService, GatewayService, InstancePermissionsService, KubeconfigSecretService, LogicalClusterService, OrganizationReadyService, ResourceService, isDownloadKubeconfigButtonSettings };
|
|
869
979
|
//# sourceMappingURL=platform-mesh-portal-ui-lib-services.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-mesh-portal-ui-lib-services.mjs","sources":["../../projects/lib/services/resource/gateway.service.ts","../../projects/lib/services/resource/apollo-factory.ts","../../projects/lib/services/resource/instance-permissions.service.ts","../../projects/lib/services/resource/resource.service.ts","../../projects/lib/services/resource/account-info.queries.ts","../../projects/lib/services/resource/account-info.service.ts","../../projects/lib/services/resource/logical-cluster.queries.ts","../../projects/lib/services/resource/logical-cluster.service.ts","../../projects/lib/services/error-handler.service.ts","../../projects/lib/services/org-ready.service.ts","../../projects/lib/services/platform-mesh-portal-ui-lib-services.ts"],"sourcesContent":["import { ResourceNodeContext } from './resource-node-context';\nimport { Injectable, inject } from '@angular/core';\nimport { LuigiCoreService } from '@openmfp/portal-ui-lib';\nimport { kcpRootOrgsPath } from '@platform-mesh/portal-ui-lib/models';\n\n@Injectable({ providedIn: 'root' })\nexport class GatewayService {\n private luigiCoreService = inject(LuigiCoreService);\n\n public getGatewayUrl(\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath = false,\n ) {\n const gatewayUrl = nodeContext.portalContext.crdGatewayApiUrl;\n const currentKcpPath = this.extractKcpPath(gatewayUrl);\n return gatewayUrl?.replace(\n currentKcpPath,\n this.resolveKcpPath(nodeContext, readFromParentKcpPath),\n );\n }\n\n public updateCrdGatewayUrlWithEntityPath(kcpPath: string) {\n const gatewayUrl =\n this.luigiCoreService.getGlobalContext().portalContext.crdGatewayApiUrl;\n const currentKcpPath = this.extractKcpPath(gatewayUrl);\n this.luigiCoreService.getGlobalContext().portalContext.crdGatewayApiUrl =\n gatewayUrl.replace(currentKcpPath, kcpPath);\n }\n\n public resolveKcpPath(\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath = false,\n ): string {\n const gatewayUrl = nodeContext.portalContext.crdGatewayApiUrl;\n\n let kcpPath = this.extractKcpPath(gatewayUrl);\n if (nodeContext.kcpPath) {\n kcpPath = nodeContext.kcpPath;\n }\n\n if (readFromParentKcpPath) {\n const lastIndex = kcpPath.lastIndexOf(':');\n if (lastIndex !== -1) {\n kcpPath = kcpPath.slice(0, lastIndex);\n }\n }\n\n return kcpPath;\n }\n\n private extractKcpPath(gatewayUrl: string): string {\n return gatewayUrl.match(new RegExp(`(${kcpRootOrgsPath}[^/]*)`))?.[1] || '';\n }\n}\n","import { GatewayService } from './gateway.service';\nimport { ResourceNodeContext } from './resource-node-context';\nimport { HttpHeaders } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { AuthService, LuigiCoreService } from '@openmfp/portal-ui-lib';\nimport {\n type ApolloClientOptions,\n ApolloLink,\n Observable as ApolloObservable,\n FetchResult,\n InMemoryCache,\n Operation,\n split,\n} from '@apollo/client/core';\nimport { SetContextLink } from '@apollo/client/link/context';\nimport { getMainDefinition } from '@apollo/client/utilities';\nimport { Apollo } from 'apollo-angular';\nimport { HttpLink } from 'apollo-angular/http';\nimport { print } from 'graphql';\nimport { Client, ClientOptions, createClient } from 'graphql-sse';\n\nclass SSELink extends ApolloLink {\n private client: Client;\n\n constructor(options: ClientOptions) {\n super();\n this.client = createClient(options);\n }\n\n public override request(operation: Operation): ApolloObservable<FetchResult> {\n return new ApolloObservable((sink) => {\n return this.client.subscribe(\n { ...operation, query: print(operation.query) },\n {\n next: sink.next.bind(sink),\n complete: sink.complete.bind(sink),\n error: sink.error.bind(sink),\n },\n );\n });\n }\n}\n\nconst noopZone = {\n run: (fn: any) => fn(),\n runOutsideAngular: (fn: any) => fn(),\n} as any;\n\n// Long enough for an in-flight boot refresh to land, short enough to be\n// invisible next to a reload.\nconst AUTH_RETRY_DELAY_MS = 750;\n\nconst isUnauthorized = (error: unknown): boolean => {\n const err = error as {\n status?: number;\n statusCode?: number;\n networkError?: { status?: number; statusCode?: number };\n };\n return [\n err?.status,\n err?.statusCode,\n err?.networkError?.status,\n err?.networkError?.statusCode,\n ].includes(401);\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ApolloFactory {\n private httpLink = inject(HttpLink);\n private gatewayService = inject(GatewayService);\n private authService = inject(AuthService);\n private luigiCoreService = inject(LuigiCoreService);\n\n public readonly apollo = (\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath = false,\n ): Apollo =>\n new Apollo(\n noopZone,\n this.createApolloOptions(nodeContext, readFromParentKcpPath),\n );\n\n /**\n * The token must be resolved per request, never captured at client\n * creation: a client built before the shell delivers the token would\n * otherwise send \"Bearer undefined\" for its whole lifetime (silent 401s,\n * empty views until a hard reload). Prefer live sources over the node\n * context, which is a mount-time snapshot: in web-component bundles the\n * injected AuthService belongs to a separate injector that never runs a\n * refresh, so the shell's Luigi auth store is the only value that tracks\n * the boot refresh and later scheduled refreshes.\n */\n private resolveToken(nodeContext: ResourceNodeContext): string | undefined {\n return (\n this.authService.getToken() ||\n this.resolveLuigiStoreToken() ||\n nodeContext.token\n );\n }\n\n // Web components run on the shell window; iframe-based MFEs have no\n // window.Luigi, so the service throws and we fall through to the node\n // context. LuigiCoreService wraps the same shell global (stateless), so\n // it is injector-safe for web-component bundles.\n private resolveLuigiStoreToken(): string | undefined {\n try {\n return this.luigiCoreService.getAuthData()?.idToken;\n } catch {\n return undefined;\n }\n }\n\n /**\n * Retries an operation exactly once when the gateway answers 401. The\n * Authorization header is rebuilt by the context link on the retry, so a\n * request that raced ahead of token delivery (or whose token expired in\n * flight) heals itself instead of leaving the view empty until a manual\n * reload. 401 means the request was rejected before execution, so this\n * is safe for mutations too.\n */\n private createAuthRetryLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n return new ApolloObservable((observer) => {\n let activeSub: { unsubscribe(): void } | undefined;\n let retryTimer: ReturnType<typeof setTimeout> | undefined;\n const attempt = (isRetry: boolean) => {\n // A retry replaces the failed subscription; release the previous\n // one explicitly instead of relying on the errored link having\n // closed it downstream.\n activeSub?.unsubscribe();\n activeSub = forward(operation).subscribe({\n next: observer.next.bind(observer),\n complete: observer.complete.bind(observer),\n error: (error: unknown) => {\n if (!isRetry && isUnauthorized(error)) {\n retryTimer = setTimeout(\n () => attempt(true),\n AUTH_RETRY_DELAY_MS,\n );\n return;\n }\n observer.error(error);\n },\n });\n };\n attempt(false);\n return () => {\n if (retryTimer !== undefined) {\n clearTimeout(retryTimer);\n }\n activeSub?.unsubscribe();\n };\n });\n });\n }\n\n private createApolloOptions(\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath = false,\n ): ApolloClientOptions {\n const contextLink = new SetContextLink((prevContext) => {\n const baseHeaders =\n prevContext.headers instanceof HttpHeaders\n ? prevContext.headers\n : new HttpHeaders(prevContext.headers ?? {});\n\n return {\n ...prevContext,\n uri: () =>\n this.gatewayService.getGatewayUrl(nodeContext, readFromParentKcpPath),\n headers: baseHeaders\n .set('Authorization', `Bearer ${this.resolveToken(nodeContext)}`)\n .set('Accept', 'charset=utf-8'),\n };\n });\n\n const splitClient = split(\n ({ query }) => {\n const definition = getMainDefinition(query);\n return (\n definition.kind === 'OperationDefinition' &&\n definition.operation === 'subscription'\n );\n },\n new SSELink({\n url: () =>\n this.gatewayService.getGatewayUrl(nodeContext, readFromParentKcpPath),\n headers: () => ({\n Authorization: `Bearer ${this.resolveToken(nodeContext)}`,\n }),\n }),\n this.httpLink.create({}),\n );\n\n // Retry sits outermost so a retry re-runs the context link and picks\n // up a freshly resolved token.\n const link = ApolloLink.from([\n this.createAuthRetryLink(),\n contextLink,\n splitClient,\n ]);\n const cache = new InMemoryCache();\n\n return {\n link,\n cache,\n };\n }\n}\n","import { ResourceNodeContext } from './resource-node-context';\nimport { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { LuigiCoreService } from '@openmfp/portal-ui-lib';\nimport { PermissionsDefinition } from '@platform-mesh/portal-ui-lib/models';\nimport { Observable, of } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nexport interface InstanceCheck {\n resource: string;\n group: string;\n namespace?: string;\n name: string;\n actions: string[];\n}\n\nexport interface ResourceCheckRequest {\n organization: string;\n accountPath?: string;\n checks: InstanceCheck[];\n}\n\nexport interface InstancePermissionResponse {\n resource: string;\n namespace?: string;\n name?: string;\n actions: string[];\n}\n\n@Injectable({ providedIn: 'root' })\nexport class InstancePermissionsService {\n private httpClient = inject(HttpClient);\n private luigiCoreService = inject(LuigiCoreService);\n\n private requestChecks(\n nodeContext: ResourceNodeContext,\n permissionsDefinition: PermissionsDefinition,\n instances: { name: string; namespace?: string }[],\n ): Observable<InstancePermissionResponse[]> {\n if (!permissionsDefinition?.entityActions.length || !instances.length) {\n return of([]);\n }\n\n const organization = nodeContext.organization;\n const accountPath = nodeContext.accountPath;\n const token = this.luigiCoreService.getAuthData()?.idToken;\n\n if (!organization || !token) {\n return of([]);\n }\n\n const checks: InstanceCheck[] = instances.map((instance) => ({\n resource: permissionsDefinition.resource,\n group: permissionsDefinition.group,\n name: instance.name,\n namespace: instance.namespace,\n actions: permissionsDefinition.entityActions,\n }));\n\n const body: ResourceCheckRequest = {\n organization,\n accountPath,\n checks,\n };\n\n return this.httpClient\n .post<InstancePermissionResponse[]>(\n '/rest/permissions/resource-check',\n body,\n { headers: { Authorization: `Bearer ${token}` } },\n )\n .pipe(catchError(() => of([])));\n }\n\n checkInstance(\n nodeContext: ResourceNodeContext,\n permissionsDefinition: PermissionsDefinition,\n instance: { name: string; namespace?: string },\n ): Observable<InstancePermissionResponse[]> {\n return this.requestChecks(nodeContext, permissionsDefinition, [instance]);\n }\n\n checkInstances(\n nodeContext: ResourceNodeContext,\n permissionsDefinition: PermissionsDefinition,\n instances: { name: string; namespace?: string }[],\n ): Observable<InstancePermissionResponse[]> {\n return this.requestChecks(nodeContext, permissionsDefinition, instances);\n }\n}\n","import {\n ReadResources,\n ReadResourcesPagination,\n ReadResourcesParams,\n ReadResourcesResult,\n ReadResourcesSubscriptionResult,\n} from '../read-resources/read-resources';\nimport { ApolloFactory } from './apollo-factory';\nimport { ResourceNodeContext } from './resource-node-context';\nimport { Injectable, inject } from '@angular/core';\nimport { TypedDocumentNode } from '@apollo/client/core';\nimport { LuigiCoreService } from '@openmfp/portal-ui-lib';\nimport {\n ALL_NAMESPACE,\n Resource,\n ResourceDefinition,\n ResourceListResult,\n ResourcePagination,\n ResourceSubscriptionResult,\n} from '@platform-mesh/portal-ui-lib/models';\nimport {\n buildGraphQLInputTypeName,\n buildResourcePath,\n getResourceValueByJsonPath,\n getValueByPath,\n isNamespacedResource,\n stripTypename,\n} from '@platform-mesh/portal-ui-lib/utils';\nimport { gql } from 'apollo-angular';\nimport type {\n Fields,\n NestedField,\n QueryBuilderOptions,\n VariableOptions,\n} from 'gql-query-builder';\nimport * as gqlBuilder from 'gql-query-builder';\nimport { Observable, throwError } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\ninterface ResourceResponseError extends Record<string, any> {\n message: string;\n}\n\nexport interface ResourceRequestParams {\n entity: string;\n version: string;\n apiGroup?: string;\n}\n\nexport interface ListOptions {\n readFromParentKcpPath?: boolean;\n pagination?: ResourcePagination;\n variables?: VariableOptions;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ResourceService {\n private apolloFactory = inject(ApolloFactory);\n private luigiCoreService = inject(LuigiCoreService);\n\n read(\n resourceId: string,\n params: ResourceRequestParams,\n fieldsOrRawQuery: any[] | string,\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath: boolean = true,\n ): Observable<Resource> {\n const isNamespaced = isNamespacedResource(nodeContext);\n const namespace = this.getNamespace(nodeContext);\n\n let query: string | TypedDocumentNode<any, any> = this.resolveReadQuery(\n params,\n fieldsOrRawQuery,\n resourceId,\n isNamespaced ? namespace : undefined,\n );\n\n query = this.parseGQLQuery(query);\n\n return this.apolloFactory\n .apollo(nodeContext, readFromParentKcpPath)\n .query({\n query,\n variables: {\n name: resourceId,\n ...(isNamespaced && {\n namespace: namespace,\n }),\n },\n })\n .pipe(\n map((res) =>\n getValueByPath<any, any>(res.data, buildResourcePath(params, '.')),\n ),\n );\n }\n\n private resolveReadQuery(\n params: ResourceRequestParams,\n fieldsOrRawQuery: any[] | string,\n resourceId: string,\n namespace: string | undefined,\n ) {\n if (fieldsOrRawQuery instanceof Array) {\n const { entity, version, apiGroup } = params;\n const queryFields = [\n {\n operation: entity,\n variables: {\n name: { value: resourceId, type: 'String!' },\n ...(namespace && {\n namespace: { value: namespace, type: 'String' },\n }),\n },\n fields: fieldsOrRawQuery,\n },\n ];\n\n const queryOptions = this.calcQueryOptions(queryFields, [\n { operation: apiGroup },\n { operation: version },\n ]);\n return gqlBuilder.query(queryOptions).query;\n } else {\n return fieldsOrRawQuery;\n }\n }\n\n list(\n operation: string,\n fieldsOrRawQuery: any[] | string,\n nodeContext: ResourceNodeContext,\n options: ListOptions = {},\n ): Observable<ResourceListResult | any> {\n const {\n readFromParentKcpPath = false,\n pagination,\n variables: extraVariables,\n } = options;\n\n const isNamespaced = isNamespacedResource(nodeContext);\n const variables = {\n ...(isNamespaced && {\n namespace: { type: 'String', value: this.getNamespace(nodeContext) },\n }),\n ...(pagination?.limit && {\n limit: { type: 'Int', value: pagination?.limit },\n }),\n ...(pagination?.continue && {\n continue: { type: 'String', value: pagination?.continue },\n }),\n ...extraVariables,\n };\n\n const resourceDefinition = nodeContext.resourceDefinition;\n if (!resourceDefinition) {\n return throwError(() => new Error('Resource definition is required'));\n }\n\n return fieldsOrRawQuery instanceof Array\n ? this.listWithFields(\n resourceDefinition,\n fieldsOrRawQuery,\n nodeContext,\n readFromParentKcpPath,\n variables,\n )\n : this.listWithRawQuery(\n operation,\n fieldsOrRawQuery,\n nodeContext,\n readFromParentKcpPath,\n variables,\n );\n }\n\n private getResourceReadyStatus(\n resource: Resource,\n nodeContext: ResourceNodeContext,\n ) {\n const readyCondition = nodeContext.resourceDefinition?.readyCondition;\n if (readyCondition) {\n return getResourceValueByJsonPath(resource, readyCondition);\n }\n\n return true;\n }\n\n private listWithFields(\n resourceDefinition: ResourceDefinition,\n fields: any[],\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath: boolean,\n variables: VariableOptions,\n ): Observable<ResourceListResult> {\n const { apiGroup, entityCollection, version } = resourceDefinition;\n const queryFields = [\n {\n operation: entityCollection,\n variables,\n fields: [\n 'resourceVersion',\n 'remainingItemCount',\n 'continue',\n { items: fields },\n ],\n },\n ];\n const queryOptions = this.calcQueryOptions(queryFields, [\n { operation: apiGroup },\n { operation: version },\n ]);\n const listQuery = gqlBuilder.query(queryOptions);\n const query = this.parseGQLQuery(listQuery.query);\n\n return this.apolloFactory\n .apollo(nodeContext, readFromParentKcpPath)\n .query({\n query,\n variables: listQuery.variables,\n })\n .pipe(\n map((res: any): ResourceListResult => {\n const resourceListResult = getValueByPath<any, any>(\n res.data,\n buildResourcePath(\n { apiGroup, version, entity: entityCollection },\n '.',\n ),\n );\n if (!resourceListResult) {\n throw new Error('Resource list result not found');\n }\n\n return resourceListResult;\n }),\n map((resourceListResult) => {\n const processedResult: Resource[] = resourceListResult.items\n .map((resource) => ({\n ...resource,\n ready: this.getResourceReadyStatus(resource, nodeContext),\n }))\n .map((r) => ({\n ...r,\n id: r.metadata.name,\n isAvailable: this.isAvailable(\n r,\n resourceDefinition.availableWhenNotReady,\n ),\n accessibleName: this.getAccessibleName(r),\n }));\n return { ...resourceListResult, items: processedResult };\n }),\n );\n }\n\n isAvailable(item: Resource, availableWhenNotReady = false) {\n return (\n (!!item.ready || availableWhenNotReady) &&\n !item.metadata?.deletionTimestamp\n );\n }\n\n getAccessibleName(item: Resource): string | undefined {\n if (item.metadata?.deletionTimestamp) {\n return 'Resource is pending deletion';\n } else if (!item.ready) {\n return 'Resource is not ready';\n }\n\n return undefined;\n }\n\n private listWithRawQuery(\n operation: string,\n rawQuery: string,\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath: boolean,\n variables: VariableOptions,\n ): Observable<any> {\n const query = this.parseGQLQuery(rawQuery);\n return this.apolloFactory\n .apollo(nodeContext, readFromParentKcpPath)\n .query({\n query,\n variables: this.normalizeGqlBuilderVariables(variables),\n })\n .pipe(\n map(\n (res: any): Resource[] =>\n getValueByPath<any, any>(res.data, operation) ?? [],\n ),\n catchError((error) => {\n this.alertErrors(error);\n console.error('Error executing GraphQL query.', error);\n return throwError(() => error);\n }),\n );\n }\n\n resourceChangeSubscription(\n operation: string,\n fields: any[],\n nodeContext: ResourceNodeContext,\n resourceVersion: string,\n readFromParentKcpPath: boolean,\n ): Observable<ResourceSubscriptionResult | undefined> {\n const isNamespaced = isNamespacedResource(nodeContext);\n const variables = {\n ...(isNamespaced && {\n namespace: { type: 'String', value: this.getNamespace(nodeContext) },\n }),\n };\n const lowerCaseOperation = operation.toLowerCase();\n\n const subscriptionQuery = gqlBuilder.subscription({\n operation: lowerCaseOperation,\n fields: ['type', { object: fields }],\n variables: {\n ...variables,\n resourceVersion: {\n type: 'String',\n value: resourceVersion,\n },\n },\n });\n\n const query = this.parseGQLQuery(subscriptionQuery.query);\n\n return this.apolloFactory\n .apollo(nodeContext, readFromParentKcpPath)\n .subscribe({\n query,\n variables: subscriptionQuery.variables,\n })\n .pipe(\n map((res: any): ResourceSubscriptionResult | undefined => {\n const resource: ResourceSubscriptionResult | undefined =\n getValueByPath(res.data, lowerCaseOperation);\n if (resource) {\n resource.object.ready = this.getResourceReadyStatus(\n resource.object,\n nodeContext,\n );\n resource.object.id = resource.object.metadata.name;\n resource.object.isAvailable = this.isAvailable(\n resource.object,\n nodeContext.resourceDefinition?.availableWhenNotReady,\n );\n resource.object.accessibleName = this.getAccessibleName(\n resource.object,\n );\n }\n return resource;\n }),\n );\n }\n\n private alertErrors(res: ResourceResponseError) {\n this.luigiCoreService.showAlert({\n text: res.message,\n type: 'error',\n });\n }\n\n delete(\n resource: Resource,\n resourceDefinition: ResourceDefinition,\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath: boolean = false,\n ) {\n const isNamespaced = isNamespacedResource(nodeContext);\n const { apiGroup, entity, version } = resourceDefinition;\n const fields = [\n {\n operation: `delete${entity}`,\n variables: {\n name: { type: 'String!', value: resource.metadata.name },\n ...(isNamespaced && {\n namespace: {\n type: 'String',\n value: this.getNamespace(nodeContext),\n },\n }),\n },\n fields: [],\n },\n ];\n const queryOptions = this.calcQueryOptions(fields, [\n { operation: apiGroup },\n { operation: version },\n ]);\n const mutation = gqlBuilder.mutation(queryOptions);\n const query = this.parseGQLQuery(mutation.query);\n\n return this.apolloFactory\n .apollo(nodeContext, readFromParentKcpPath)\n .mutate<void>({\n mutation: query,\n variables: mutation.variables,\n })\n .pipe(\n catchError((error) => {\n this.alertErrors(error);\n console.error('Error executing GraphQL query.', error);\n return throwError(() => error);\n }),\n );\n }\n\n create(\n resource: Resource,\n resourceDefinition: ResourceDefinition,\n nodeContext: ResourceNodeContext,\n ) {\n const isNamespaced = isNamespacedResource(nodeContext);\n const { apiGroup, entity, version } = resourceDefinition;\n const namespace = this.getNamespace(nodeContext, resource);\n\n const mutationFields: any[] = [\n {\n operation: `create${entity}`,\n variables: {\n ...(isNamespaced && {\n namespace: { type: 'String', value: namespace },\n }),\n object: {\n type: `${buildGraphQLInputTypeName(apiGroup, version, entity)}!`,\n value: resource,\n },\n },\n fields: ['__typename'],\n },\n ];\n const queryOptions = this.calcQueryOptions(mutationFields, [\n { operation: apiGroup },\n { operation: version },\n ]);\n const mutation = gqlBuilder.mutation(queryOptions);\n const query = this.parseGQLQuery(mutation.query);\n\n return this.apolloFactory\n .apollo(nodeContext)\n .mutate({\n mutation: query,\n fetchPolicy: 'no-cache',\n variables: mutation.variables,\n })\n .pipe(\n catchError((error) => {\n this.alertErrors(error);\n console.error('Error executing GraphQL query.', error);\n return throwError(() => error);\n }),\n );\n }\n\n update(\n resource: Resource,\n resourceDefinition: ResourceDefinition,\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath: boolean = false,\n fields: any[] = ['__typename'],\n ) {\n const isNamespaced = isNamespacedResource(nodeContext);\n const { apiGroup, entity, version } = resourceDefinition;\n const namespace = this.getNamespace(nodeContext);\n\n const cleanResource = stripTypename(resource);\n\n const mutationFields: any[] = [\n {\n operation: `update${entity}`,\n variables: {\n ...(isNamespaced && {\n namespace: { type: 'String', value: namespace },\n }),\n name: { type: 'String!', value: resource.metadata.name },\n object: {\n type: `${buildGraphQLInputTypeName(apiGroup, version, entity)}!`,\n value: cleanResource,\n },\n },\n fields: fields,\n },\n ];\n const queryOptions = this.calcQueryOptions(mutationFields, [\n { operation: apiGroup },\n { operation: version },\n ]);\n const mutation = gqlBuilder.mutation(queryOptions);\n const query = this.parseGQLQuery(mutation.query);\n\n return this.apolloFactory\n .apollo(nodeContext, readFromParentKcpPath)\n .mutate({\n mutation: query,\n fetchPolicy: 'no-cache',\n variables: mutation.variables,\n })\n .pipe(\n map((res: any) =>\n getValueByPath(\n res.data,\n buildResourcePath(\n { apiGroup, entity: `update${entity}`, version },\n '.',\n ),\n ),\n ),\n catchError((error) => {\n this.alertErrors(error);\n console.error('Error executing GraphQL query.', error);\n return throwError(() => error);\n }),\n );\n }\n\n getNamespace(\n nodeContext: ResourceNodeContext,\n resource?: Resource,\n ): string | undefined {\n if (nodeContext.namespaceId) {\n return nodeContext.namespaceId;\n }\n\n if (resource?.metadata?.namespace) {\n return resource.metadata.namespace;\n }\n\n const namespace = this.luigiCoreService\n .routing()\n .getSearchParams().namespace;\n\n if (namespace) {\n return namespace === ALL_NAMESPACE ? undefined : namespace;\n }\n\n return undefined;\n }\n\n private normalizeGqlBuilderVariables(\n variables: VariableOptions,\n ): Record<string, any> {\n return Object.fromEntries(\n Object.entries(variables).map(([key, value]) => [key, value.value]),\n );\n }\n\n private calcQueryOptions(\n innerFields: Fields,\n wrappers: Partial<Omit<QueryBuilderOptions, 'fields'>>[],\n ): QueryBuilderOptions {\n const filteredWrappers = wrappers.filter(\n (wrapper): wrapper is Omit<QueryBuilderOptions, 'fields'> =>\n !!wrapper?.operation,\n );\n\n if (filteredWrappers.length === 0) {\n const completeQuery = innerFields.pop() as NestedField;\n if (completeQuery && completeQuery.operation && completeQuery.fields) {\n return completeQuery;\n }\n\n throw new Error('At least one wrapper or inner fields is required');\n }\n\n let fields = innerFields;\n let nextWrapper = filteredWrappers.pop() as Omit<\n QueryBuilderOptions,\n 'fields'\n >;\n\n filteredWrappers.forEach((wrapper) => {\n fields = [\n {\n operation: nextWrapper.operation,\n fields: innerFields,\n variables: nextWrapper.variables,\n },\n ];\n nextWrapper = wrapper;\n });\n\n return {\n operation: nextWrapper.operation,\n fields,\n variables: nextWrapper.variables,\n };\n }\n\n private parseGQLQuery(query: string) {\n try {\n return gql`\n ${query}\n `;\n } catch (error) {\n this.luigiCoreService.showAlert({\n text: `Could not parse gql query: <br/><br/> ${query} <br/><br/> ${error.message}`,\n type: 'error',\n });\n throw error;\n }\n }\n\n /**\n * Returns a {@link ReadResources}-shaped adapter over this service so that\n * consumers can swap implementations behind a feature toggle without depending\n * on the GraphQL-specific signatures of `list` / `resourceChangeSubscription`.\n */\n asReadResources(): ReadResources {\n return {\n list: (\n nodeContext: ResourceNodeContext,\n pagination: ReadResourcesPagination,\n params: ReadResourcesParams,\n ): Observable<ReadResourcesResult> => {\n const operation =\n params.operation ??\n nodeContext.resourceDefinition?.entityCollection ??\n '';\n const fields =\n params.fields ??\n nodeContext.resourceDefinition?.ui?.listView?.fields ??\n [];\n const resourcePagination: ResourcePagination = {\n limit: pagination.limit,\n continue: pagination.cursor,\n };\n\n return this.list(operation, fields, nodeContext, {\n readFromParentKcpPath: params.readFromParentKcpPath ?? false,\n pagination: resourcePagination,\n }).pipe(\n map((result: ResourceListResult): ReadResourcesResult => ({\n items: result?.items ?? [],\n nextCursor: result?.continue,\n remainingItemCount: result?.remainingItemCount,\n resourceVersion: result?.resourceVersion,\n })),\n );\n },\n subscribe: (\n nodeContext: ResourceNodeContext,\n params: ReadResourcesParams & { resourceVersion?: string },\n ): Observable<ReadResourcesSubscriptionResult | undefined> => {\n const operation =\n nodeContext.resourceDefinition?.entityCollection ?? '';\n const fields = Array.isArray(params.fields)\n ? params.fields\n : ((nodeContext.resourceDefinition?.ui?.listView?.fields as any[]) ??\n []);\n\n return this.resourceChangeSubscription(\n operation,\n fields,\n nodeContext,\n params.resourceVersion ?? '',\n params.readFromParentKcpPath ?? false,\n );\n },\n };\n }\n}\n","import { gql } from 'apollo-angular';\n\nexport const accountInfoRead = gql`\n {\n core_platform_mesh_io {\n v1alpha1 {\n AccountInfo(name: \"account\") {\n metadata {\n name\n annotations\n }\n spec {\n account {\n originClusterId\n }\n clusterInfo {\n ca\n }\n organization {\n originClusterId\n name\n }\n oidc {\n clients\n issuerUrl\n }\n }\n }\n }\n }\n }\n`;\n","import { accountInfoRead } from './account-info.queries';\nimport { ApolloFactory } from './apollo-factory';\nimport { ResourceNodeContext } from './resource-node-context';\nimport { Injectable, inject } from '@angular/core';\nimport { AccountInfo } from '@platform-mesh/portal-ui-lib/models';\nimport { Observable, throwError } from 'rxjs';\nimport { catchError, map, shareReplay } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AccountInfoService {\n private apolloFactory = inject(ApolloFactory);\n private readCache = new Map<string, Observable<AccountInfo>>();\n\n read(nodeContext: ResourceNodeContext): Observable<AccountInfo> {\n const cacheKey = nodeContext.kcpPath ?? '';\n const cachedRead = this.readCache.get(cacheKey);\n if (cachedRead) {\n return cachedRead;\n }\n\n const request$ = this.apolloFactory\n .apollo(nodeContext)\n .query<AccountInfo>({\n query: accountInfoRead,\n })\n .pipe(\n map((res: any) => {\n const rawAccountInfo =\n res.data.core_platform_mesh_io.v1alpha1.AccountInfo;\n\n return {\n ...rawAccountInfo,\n spec: {\n ...rawAccountInfo.spec,\n oidc: {\n ...rawAccountInfo.spec.oidc,\n clients: JSON.parse(rawAccountInfo.spec.oidc.clients),\n },\n },\n };\n }),\n shareReplay(1),\n catchError((error) => {\n this.readCache.delete(cacheKey);\n return throwError(() => error);\n }),\n );\n\n this.readCache.set(cacheKey, request$);\n return request$;\n }\n}\n","import { gql } from 'apollo-angular';\n\nexport const queryLoginCluster = gql`\n {\n core_kcp_io {\n v1alpha1 {\n LogicalCluster(name: \"cluster\") {\n status {\n phase\n }\n }\n }\n }\n }\n`;\n","import { ApolloFactory } from './apollo-factory';\nimport { queryLoginCluster } from './logical-cluster.queries';\nimport { ResourceNodeContext } from './resource-node-context';\nimport { Injectable, inject } from '@angular/core';\nimport { LogicalCluster } from '@platform-mesh/portal-ui-lib/models';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LogicalClusterService {\n private apolloFactory = inject(ApolloFactory);\n\n public read(nodeContext: ResourceNodeContext): Observable<LogicalCluster> {\n return this.apolloFactory\n .apollo(nodeContext)\n .query<LogicalCluster>({\n query: queryLoginCluster,\n })\n .pipe(map((res: any) => res.data.core_kcp_io.v1alpha1.LogicalCluster));\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { LuigiCoreService } from '@openmfp/portal-ui-lib';\nimport { Resource } from '@platform-mesh/portal-ui-lib/models';\n\n@Injectable({ providedIn: 'root' })\nexport class ErrorHandlerService {\n private luigiCoreService = inject(LuigiCoreService);\n\n handleError(error: any) {\n if (this.isUnauthorizedAccess(error)) {\n this.luigiCoreService.navigation().navigate('/error/403');\n } else {\n const message =\n error?.message || error?.errors?.map((e) => e.message).join('\\n');\n this.luigiCoreService.showAlert({\n text: message || 'An unknown error occurred',\n type: 'error',\n });\n console.error(error);\n }\n }\n\n handleResourcePendingDeletion(_resource: Resource) {\n this.luigiCoreService.navigation().navigate('/error/422');\n }\n\n isUnauthorizedAccess(error: any): boolean {\n return (\n !!error?.message?.toLowerCase().includes('forbidden') ||\n !!error?.message?.toLowerCase()?.includes('access denied')\n );\n }\n}\n","import { LogicalClusterService } from './resource';\nimport { Injectable, inject } from '@angular/core';\nimport {\n AuthService,\n ConfigService,\n EnvConfigService,\n LuigiCoreService,\n} from '@openmfp/portal-ui-lib';\nimport { LogicalCluster } from '@platform-mesh/portal-ui-lib/models';\nimport { EMPTY, Subject, exhaustMap, filter } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\n@Injectable({ providedIn: 'root' })\nexport class OrganizationReadyService {\n private configService = inject(ConfigService);\n private envConfigService = inject(EnvConfigService);\n private luigiCoreService = inject(LuigiCoreService);\n private logicalClusterService = inject(LogicalClusterService);\n private authService = inject(AuthService);\n\n private isReady = false;\n private check$ = new Subject<void>();\n\n constructor() {\n void this.initChecks();\n }\n\n private async initChecks() {\n const portalConfig = await this.configService.getPortalConfig();\n const { idpName } = await this.envConfigService.getEnvConfig();\n\n if (idpName === 'welcome') {\n return;\n }\n\n this.check$\n .pipe(\n filter(() => !this.isReady),\n exhaustMap(() =>\n this.logicalClusterService\n .read({\n portalContext: {\n crdGatewayApiUrl:\n portalConfig.portalContext['crdGatewayApiUrl'],\n },\n token: this.authService.getToken(),\n accountId: idpName,\n })\n .pipe(\n catchError((error) => {\n console.error('Org check failed', error);\n // Return EMPTY so the exhaustMap completes without killing the check$ stream\n return EMPTY;\n }),\n ),\n ),\n map((res: LogicalCluster) => {\n this.isReady = res.status.phase === 'Ready';\n if (!this.isReady) {\n this.luigiCoreService.navigation().navigate('/error/503');\n }\n }),\n )\n .subscribe();\n }\n\n public checkOrganizationReady() {\n this.check$.next();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ApolloObservable"],"mappings":";;;;;;;;;;;;;;;;;MAMa,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;AAEU,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AA8CpD,IAAA;AA5CQ,IAAA,aAAa,CAClB,WAAgC,EAChC,qBAAqB,GAAG,KAAK,EAAA;AAE7B,QAAA,MAAM,UAAU,GAAG,WAAW,CAAC,aAAa,CAAC,gBAAgB;QAC7D,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC;AACtD,QAAA,OAAO,UAAU,EAAE,OAAO,CACxB,cAAc,EACd,IAAI,CAAC,cAAc,CA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AS,EAAE,OAAO;SACnB;AACA,aAAA,IAAI,CACH,UAAU,CAAC,CAAC,KAAK,KAAI;AACnB,YAAA,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,KAAK,CAAC;;AAExC,YAAA,OAAO,KAAK;QACd,CAAC,CAAC,CACH,CACJ,EACD,GAAG,CAAC,CAAC,GAAmB,KAAI;YAC1B,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,OAAO;AAC3C,YAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;gBACjB,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC;YAC3D;AACF,QAAA,CAAC,CAAC;AAEH,aAAA,SAAS,EAAE;IAChB;IAEO,sBAAsB,GAAA;AAC3B,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;IACpB;+GAvDW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cADX,MAAM,EAAA,CAAA,CAAA;;4FACnB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACZlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"platform-mesh-portal-ui-lib-services.mjs","sources":["../../projects/lib/services/resource/gateway.service.ts","../../projects/lib/services/resource/apollo-factory.ts","../../projects/lib/services/resource/instance-permissions.service.ts","../../projects/lib/services/resource/resource.service.ts","../../projects/lib/services/resource/kubeconfig-secret.service.ts","../../projects/lib/services/resource/account-info.queries.ts","../../projects/lib/services/resource/account-info.service.ts","../../projects/lib/services/resource/logical-cluster.queries.ts","../../projects/lib/services/resource/logical-cluster.service.ts","../../projects/lib/services/error-handler.service.ts","../../projects/lib/services/org-ready.service.ts","../../projects/lib/services/platform-mesh-portal-ui-lib-services.ts"],"sourcesContent":["import { ResourceNodeContext } from './resource-node-context';\nimport { Injectable, inject } from '@angular/core';\nimport { LuigiCoreService } from '@openmfp/portal-ui-lib';\nimport { kcpRootOrgsPath } from '@platform-mesh/portal-ui-lib/models';\n\n@Injectable({ providedIn: 'root' })\nexport class GatewayService {\n private luigiCoreService = inject(LuigiCoreService);\n\n public getGatewayUrl(\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath = false,\n ) {\n const gatewayUrl = nodeContext.portalContext.crdGatewayApiUrl;\n const currentKcpPath = this.extractKcpPath(gatewayUrl);\n return gatewayUrl?.replace(\n currentKcpPath,\n this.resolveKcpPath(nodeContext, readFromParentKcpPath),\n );\n }\n\n public updateCrdGatewayUrlWithEntityPath(kcpPath: string) {\n const gatewayUrl =\n this.luigiCoreService.getGlobalContext().portalContext.crdGatewayApiUrl;\n const currentKcpPath = this.extractKcpPath(gatewayUrl);\n this.luigiCoreService.getGlobalContext().portalContext.crdGatewayApiUrl =\n gatewayUrl.replace(currentKcpPath, kcpPath);\n }\n\n public resolveKcpPath(\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath = false,\n ): string {\n const gatewayUrl = nodeContext.portalContext.crdGatewayApiUrl;\n\n let kcpPath = this.extractKcpPath(gatewayUrl);\n if (nodeContext.kcpPath) {\n kcpPath = nodeContext.kcpPath;\n }\n\n if (readFromParentKcpPath) {\n const lastIndex = kcpPath.lastIndexOf(':');\n if (lastIndex !== -1) {\n kcpPath = kcpPath.slice(0, lastIndex);\n }\n }\n\n return kcpPath;\n }\n\n private extractKcpPath(gatewayUrl: string): string {\n return gatewayUrl.match(new RegExp(`(${kcpRootOrgsPath}[^/]*)`))?.[1] || '';\n }\n}\n","import { GatewayService } from './gateway.service';\nimport { ResourceNodeContext } from './resource-node-context';\nimport { HttpHeaders } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { AuthService, LuigiCoreService } from '@openmfp/portal-ui-lib';\nimport {\n type ApolloClientOptions,\n ApolloLink,\n Observable as ApolloObservable,\n FetchResult,\n InMemoryCache,\n Operation,\n split,\n} from '@apollo/client/core';\nimport { SetContextLink } from '@apollo/client/link/context';\nimport { getMainDefinition } from '@apollo/client/utilities';\nimport { Apollo } from 'apollo-angular';\nimport { HttpLink } from 'apollo-angular/http';\nimport { print } from 'graphql';\nimport { Client, ClientOptions, createClient } from 'graphql-sse';\n\nclass SSELink extends ApolloLink {\n private client: Client;\n\n constructor(options: ClientOptions) {\n super();\n this.client = createClient(options);\n }\n\n public override request(operation: Operation): ApolloObservable<FetchResult> {\n return new ApolloObservable((sink) => {\n return this.client.subscribe(\n { ...operation, query: print(operation.query) },\n {\n next: sink.next.bind(sink),\n complete: sink.complete.bind(sink),\n error: sink.error.bind(sink),\n },\n );\n });\n }\n}\n\nconst noopZone = {\n run: (fn: any) => fn(),\n runOutsideAngular: (fn: any) => fn(),\n} as any;\n\n// Long enough for an in-flight boot refresh to land, short enough to be\n// invisible next to a reload.\nconst AUTH_RETRY_DELAY_MS = 750;\n\nconst isUnauthorized = (error: unknown): boolean => {\n const err = error as {\n status?: number;\n statusCode?: number;\n networkError?: { status?: number; statusCode?: number };\n };\n return [\n err?.status,\n err?.statusCode,\n err?.networkError?.status,\n err?.networkError?.statusCode,\n ].includes(401);\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ApolloFactory {\n private httpLink = inject(HttpLink);\n private gatewayService = inject(GatewayService);\n private authService = inject(AuthService);\n private luigiCoreService = inject(LuigiCoreService);\n\n public readonly apollo = (\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath = false,\n ): Apollo =>\n new Apollo(\n noopZone,\n this.createApolloOptions(nodeContext, readFromParentKcpPath),\n );\n\n /**\n * The token must be resolved per request, never captured at client\n * creation: a client built before the shell delivers the token would\n * otherwise send \"Bearer undefined\" for its whole lifetime (silent 401s,\n * empty views until a hard reload). Prefer live sources over the node\n * context, which is a mount-time snapshot: in web-component bundles the\n * injected AuthService belongs to a separate injector that never runs a\n * refresh, so the shell's Luigi auth store is the only value that tracks\n * the boot refresh and later scheduled refreshes.\n */\n private resolveToken(nodeContext: ResourceNodeContext): string | undefined {\n return (\n this.authService.getToken() ||\n this.resolveLuigiStoreToken() ||\n nodeContext.token\n );\n }\n\n // Web components run on the shell window; iframe-based MFEs have no\n // window.Luigi, so the service throws and we fall through to the node\n // context. LuigiCoreService wraps the same shell global (stateless), so\n // it is injector-safe for web-component bundles.\n private resolveLuigiStoreToken(): string | undefined {\n try {\n return this.luigiCoreService.getAuthData()?.idToken;\n } catch {\n return undefined;\n }\n }\n\n /**\n * Retries an operation exactly once when the gateway answers 401. The\n * Authorization header is rebuilt by the context link on the retry, so a\n * request that raced ahead of token delivery (or whose token expired in\n * flight) heals itself instead of leaving the view empty until a manual\n * reload. 401 means the request was rejected before execution, so this\n * is safe for mutations too.\n */\n private createAuthRetryLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n return new ApolloObservable((observer) => {\n let activeSub: { unsubscribe(): void } | undefined;\n let retryTimer: ReturnType<typeof setTimeout> | undefined;\n const attempt = (isRetry: boolean) => {\n // A retry replaces the failed subscription; release the previous\n // one explicitly instead of relying on the errored link having\n // closed it downstream.\n activeSub?.unsubscribe();\n activeSub = forward(operation).subscribe({\n next: observer.next.bind(observer),\n complete: observer.complete.bind(observer),\n error: (error: unknown) => {\n if (!isRetry && isUnauthorized(error)) {\n retryTimer = setTimeout(\n () => attempt(true),\n AUTH_RETRY_DELAY_MS,\n );\n return;\n }\n observer.error(error);\n },\n });\n };\n attempt(false);\n return () => {\n if (retryTimer !== undefined) {\n clearTimeout(retryTimer);\n }\n activeSub?.unsubscribe();\n };\n });\n });\n }\n\n private createApolloOptions(\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath = false,\n ): ApolloClientOptions {\n const contextLink = new SetContextLink((prevContext) => {\n const baseHeaders =\n prevContext.headers instanceof HttpHeaders\n ? prevContext.headers\n : new HttpHeaders(prevContext.headers ?? {});\n\n return {\n ...prevContext,\n uri: () =>\n this.gatewayService.getGatewayUrl(nodeContext, readFromParentKcpPath),\n headers: baseHeaders\n .set('Authorization', `Bearer ${this.resolveToken(nodeContext)}`)\n .set('Accept', 'charset=utf-8'),\n };\n });\n\n const splitClient = split(\n ({ query }) => {\n const definition = getMainDefinition(query);\n return (\n definition.kind === 'OperationDefinition' &&\n definition.operation === 'subscription'\n );\n },\n new SSELink({\n url: () =>\n this.gatewayService.getGatewayUrl(nodeContext, readFromParentKcpPath),\n headers: () => ({\n Authorization: `Bearer ${this.resolveToken(nodeContext)}`,\n }),\n }),\n this.httpLink.create({}),\n );\n\n // Retry sits outermost so a retry re-runs the context link and picks\n // up a freshly resolved token.\n const link = ApolloLink.from([\n this.createAuthRetryLink(),\n contextLink,\n splitClient,\n ]);\n const cache = new InMemoryCache();\n\n return {\n link,\n cache,\n };\n }\n}\n","import { ResourceNodeContext } from './resource-node-context';\nimport { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { LuigiCoreService } from '@openmfp/portal-ui-lib';\nimport { PermissionsDefinition } from '@platform-mesh/portal-ui-lib/models';\nimport { Observable, of } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nexport interface InstanceCheck {\n resource: string;\n group: string;\n namespace?: string;\n name: string;\n actions: string[];\n}\n\nexport interface ResourceCheckRequest {\n organization: string;\n accountPath?: string;\n checks: InstanceCheck[];\n}\n\nexport interface InstancePermissionResponse {\n resource: string;\n namespace?: string;\n name?: string;\n actions: string[];\n}\n\n@Injectable({ providedIn: 'root' })\nexport class InstancePermissionsService {\n private httpClient = inject(HttpClient);\n private luigiCoreService = inject(LuigiCoreService);\n\n private requestChecks(\n nodeContext: ResourceNodeContext,\n permissionsDefinition: PermissionsDefinition,\n instances: { name: string; namespace?: string }[],\n ): Observable<InstancePermissionResponse[]> {\n if (!permissionsDefinition?.entityActions.length || !instances.length) {\n return of([]);\n }\n\n const organization = nodeContext.organization;\n const accountPath = nodeContext.accountPath;\n const token = this.luigiCoreService.getAuthData()?.idToken;\n\n if (!organization || !token) {\n return of([]);\n }\n\n const checks: InstanceCheck[] = instances.map((instance) => ({\n resource: permissionsDefinition.resource,\n group: permissionsDefinition.group,\n name: instance.name,\n namespace: instance.namespace,\n actions: permissionsDefinition.entityActions,\n }));\n\n const body: ResourceCheckRequest = {\n organization,\n accountPath,\n checks,\n };\n\n return this.httpClient\n .post<InstancePermissionResponse[]>(\n '/rest/permissions/resource-check',\n body,\n { headers: { Authorization: `Bearer ${token}` } },\n )\n .pipe(catchError(() => of([])));\n }\n\n checkInstance(\n nodeContext: ResourceNodeContext,\n permissionsDefinition: PermissionsDefinition,\n instance: { name: string; namespace?: string },\n ): Observable<InstancePermissionResponse[]> {\n return this.requestChecks(nodeContext, permissionsDefinition, [instance]);\n }\n\n checkInstances(\n nodeContext: ResourceNodeContext,\n permissionsDefinition: PermissionsDefinition,\n instances: { name: string; namespace?: string }[],\n ): Observable<InstancePermissionResponse[]> {\n return this.requestChecks(nodeContext, permissionsDefinition, instances);\n }\n}\n","import {\n ReadResources,\n ReadResourcesPagination,\n ReadResourcesParams,\n ReadResourcesResult,\n ReadResourcesSubscriptionResult,\n} from '../read-resources/read-resources';\nimport { ApolloFactory } from './apollo-factory';\nimport { ResourceNodeContext } from './resource-node-context';\nimport { Injectable, inject } from '@angular/core';\nimport { TypedDocumentNode } from '@apollo/client/core';\nimport { LuigiCoreService } from '@openmfp/portal-ui-lib';\nimport {\n ALL_NAMESPACE,\n Resource,\n ResourceDefinition,\n ResourceListResult,\n ResourcePagination,\n ResourceSubscriptionResult,\n} from '@platform-mesh/portal-ui-lib/models';\nimport {\n buildGraphQLInputTypeName,\n buildResourcePath,\n getResourceValueByJsonPath,\n getValueByPath,\n isNamespacedResource,\n stripTypename,\n} from '@platform-mesh/portal-ui-lib/utils';\nimport { gql } from 'apollo-angular';\nimport type {\n Fields,\n NestedField,\n QueryBuilderOptions,\n VariableOptions,\n} from 'gql-query-builder';\nimport * as gqlBuilder from 'gql-query-builder';\nimport { Observable, throwError } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\ninterface ResourceResponseError extends Record<string, any> {\n message: string;\n}\n\nexport interface ResourceRequestParams {\n entity: string;\n version: string;\n apiGroup?: string;\n}\n\nexport interface ListOptions {\n readFromParentKcpPath?: boolean;\n pagination?: ResourcePagination;\n variables?: VariableOptions;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ResourceService {\n private apolloFactory = inject(ApolloFactory);\n private luigiCoreService = inject(LuigiCoreService);\n\n read(\n resourceId: string,\n params: ResourceRequestParams,\n fieldsOrRawQuery: any[] | string,\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath: boolean = true,\n ): Observable<Resource> {\n const isNamespaced = isNamespacedResource(nodeContext);\n const namespace = this.getNamespace(nodeContext);\n\n let query: string | TypedDocumentNode<any, any> = this.resolveReadQuery(\n params,\n fieldsOrRawQuery,\n resourceId,\n isNamespaced ? namespace : undefined,\n );\n\n query = this.parseGQLQuery(query);\n\n return this.apolloFactory\n .apollo(nodeContext, readFromParentKcpPath)\n .query({\n query,\n variables: {\n name: resourceId,\n ...(isNamespaced && {\n namespace: namespace,\n }),\n },\n })\n .pipe(\n map((res) =>\n getValueByPath<any, any>(res.data, buildResourcePath(params, '.')),\n ),\n );\n }\n\n private resolveReadQuery(\n params: ResourceRequestParams,\n fieldsOrRawQuery: any[] | string,\n resourceId: string,\n namespace: string | undefined,\n ) {\n if (fieldsOrRawQuery instanceof Array) {\n const { entity, version, apiGroup } = params;\n const queryFields = [\n {\n operation: entity,\n variables: {\n name: { value: resourceId, type: 'String!' },\n ...(namespace && {\n namespace: { value: namespace, type: 'String' },\n }),\n },\n fields: fieldsOrRawQuery,\n },\n ];\n\n const queryOptions = this.calcQueryOptions(queryFields, [\n { operation: apiGroup },\n { operation: version },\n ]);\n return gqlBuilder.query(queryOptions).query;\n } else {\n return fieldsOrRawQuery;\n }\n }\n\n list(\n operation: string,\n fieldsOrRawQuery: any[] | string,\n nodeContext: ResourceNodeContext,\n options: ListOptions = {},\n ): Observable<ResourceListResult | any> {\n const {\n readFromParentKcpPath = false,\n pagination,\n variables: extraVariables,\n } = options;\n\n const isNamespaced = isNamespacedResource(nodeContext);\n const variables = {\n ...(isNamespaced && {\n namespace: { type: 'String', value: this.getNamespace(nodeContext) },\n }),\n ...(pagination?.limit && {\n limit: { type: 'Int', value: pagination?.limit },\n }),\n ...(pagination?.continue && {\n continue: { type: 'String', value: pagination?.continue },\n }),\n ...extraVariables,\n };\n\n const resourceDefinition = nodeContext.resourceDefinition;\n if (!resourceDefinition) {\n return throwError(() => new Error('Resource definition is required'));\n }\n\n return fieldsOrRawQuery instanceof Array\n ? this.listWithFields(\n resourceDefinition,\n fieldsOrRawQuery,\n nodeContext,\n readFromParentKcpPath,\n variables,\n )\n : this.listWithRawQuery(\n operation,\n fieldsOrRawQuery,\n nodeContext,\n readFromParentKcpPath,\n variables,\n );\n }\n\n private getResourceReadyStatus(\n resource: Resource,\n nodeContext: ResourceNodeContext,\n ) {\n const readyCondition = nodeContext.resourceDefinition?.readyCondition;\n if (readyCondition) {\n return getResourceValueByJsonPath(resource, readyCondition);\n }\n\n return true;\n }\n\n private listWithFields(\n resourceDefinition: ResourceDefinition,\n fields: any[],\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath: boolean,\n variables: VariableOptions,\n ): Observable<ResourceListResult> {\n const { apiGroup, entityCollection, version } = resourceDefinition;\n const queryFields = [\n {\n operation: entityCollection,\n variables,\n fields: [\n 'resourceVersion',\n 'remainingItemCount',\n 'continue',\n { items: fields },\n ],\n },\n ];\n const queryOptions = this.calcQueryOptions(queryFields, [\n { operation: apiGroup },\n { operation: version },\n ]);\n const listQuery = gqlBuilder.query(queryOptions);\n const query = this.parseGQLQuery(listQuery.query);\n\n return this.apolloFactory\n .apollo(nodeContext, readFromParentKcpPath)\n .query({\n query,\n variables: listQuery.variables,\n })\n .pipe(\n map((res: any): ResourceListResult => {\n const resourceListResult = getValueByPath<any, any>(\n res.data,\n buildResourcePath(\n { apiGroup, version, entity: entityCollection },\n '.',\n ),\n );\n if (!resourceListResult) {\n throw new Error('Resource list result not found');\n }\n\n return resourceListResult;\n }),\n map((resourceListResult) => {\n const processedResult: Resource[] = resourceListResult.items\n .map((resource) => ({\n ...resource,\n ready: this.getResourceReadyStatus(resource, nodeContext),\n }))\n .map((r) => ({\n ...r,\n id: r.metadata.name,\n isAvailable: this.isAvailable(\n r,\n resourceDefinition.availableWhenNotReady,\n ),\n accessibleName: this.getAccessibleName(r),\n }));\n return { ...resourceListResult, items: processedResult };\n }),\n );\n }\n\n isAvailable(item: Resource, availableWhenNotReady = false) {\n return (\n (!!item.ready || availableWhenNotReady) &&\n !item.metadata?.deletionTimestamp\n );\n }\n\n getAccessibleName(item: Resource): string | undefined {\n if (item.metadata?.deletionTimestamp) {\n return 'Resource is pending deletion';\n } else if (!item.ready) {\n return 'Resource is not ready';\n }\n\n return undefined;\n }\n\n private listWithRawQuery(\n operation: string,\n rawQuery: string,\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath: boolean,\n variables: VariableOptions,\n ): Observable<any> {\n const query = this.parseGQLQuery(rawQuery);\n return this.apolloFactory\n .apollo(nodeContext, readFromParentKcpPath)\n .query({\n query,\n variables: this.normalizeGqlBuilderVariables(variables),\n })\n .pipe(\n map(\n (res: any): Resource[] =>\n getValueByPath<any, any>(res.data, operation) ?? [],\n ),\n catchError((error) => {\n this.alertErrors(error);\n console.error('Error executing GraphQL query.', error);\n return throwError(() => error);\n }),\n );\n }\n\n resourceChangeSubscription(\n operation: string,\n fields: any[],\n nodeContext: ResourceNodeContext,\n resourceVersion: string,\n readFromParentKcpPath: boolean,\n ): Observable<ResourceSubscriptionResult | undefined> {\n const isNamespaced = isNamespacedResource(nodeContext);\n const variables = {\n ...(isNamespaced && {\n namespace: { type: 'String', value: this.getNamespace(nodeContext) },\n }),\n };\n const lowerCaseOperation = operation.toLowerCase();\n\n const subscriptionQuery = gqlBuilder.subscription({\n operation: lowerCaseOperation,\n fields: ['type', { object: fields }],\n variables: {\n ...variables,\n resourceVersion: {\n type: 'String',\n value: resourceVersion,\n },\n },\n });\n\n const query = this.parseGQLQuery(subscriptionQuery.query);\n\n return this.apolloFactory\n .apollo(nodeContext, readFromParentKcpPath)\n .subscribe({\n query,\n variables: subscriptionQuery.variables,\n })\n .pipe(\n map((res: any): ResourceSubscriptionResult | undefined => {\n const resource: ResourceSubscriptionResult | undefined =\n getValueByPath(res.data, lowerCaseOperation);\n if (resource) {\n resource.object.ready = this.getResourceReadyStatus(\n resource.object,\n nodeContext,\n );\n resource.object.id = resource.object.metadata.name;\n resource.object.isAvailable = this.isAvailable(\n resource.object,\n nodeContext.resourceDefinition?.availableWhenNotReady,\n );\n resource.object.accessibleName = this.getAccessibleName(\n resource.object,\n );\n }\n return resource;\n }),\n );\n }\n\n private alertErrors(res: ResourceResponseError) {\n this.luigiCoreService.showAlert({\n text: res.message,\n type: 'error',\n });\n }\n\n delete(\n resource: Resource,\n resourceDefinition: ResourceDefinition,\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath: boolean = false,\n ) {\n const isNamespaced = isNamespacedResource(nodeContext);\n const { apiGroup, entity, version } = resourceDefinition;\n const fields = [\n {\n operation: `delete${entity}`,\n variables: {\n name: { type: 'String!', value: resource.metadata.name },\n ...(isNamespaced && {\n namespace: {\n type: 'String',\n value: this.getNamespace(nodeContext),\n },\n }),\n },\n fields: [],\n },\n ];\n const queryOptions = this.calcQueryOptions(fields, [\n { operation: apiGroup },\n { operation: version },\n ]);\n const mutation = gqlBuilder.mutation(queryOptions);\n const query = this.parseGQLQuery(mutation.query);\n\n return this.apolloFactory\n .apollo(nodeContext, readFromParentKcpPath)\n .mutate<void>({\n mutation: query,\n variables: mutation.variables,\n })\n .pipe(\n catchError((error) => {\n this.alertErrors(error);\n console.error('Error executing GraphQL query.', error);\n return throwError(() => error);\n }),\n );\n }\n\n create(\n resource: Resource,\n resourceDefinition: ResourceDefinition,\n nodeContext: ResourceNodeContext,\n ) {\n const isNamespaced = isNamespacedResource(nodeContext);\n const { apiGroup, entity, version } = resourceDefinition;\n const namespace = this.getNamespace(nodeContext, resource);\n\n const mutationFields: any[] = [\n {\n operation: `create${entity}`,\n variables: {\n ...(isNamespaced && {\n namespace: { type: 'String', value: namespace },\n }),\n object: {\n type: `${buildGraphQLInputTypeName(apiGroup, version, entity)}!`,\n value: resource,\n },\n },\n fields: ['__typename'],\n },\n ];\n const queryOptions = this.calcQueryOptions(mutationFields, [\n { operation: apiGroup },\n { operation: version },\n ]);\n const mutation = gqlBuilder.mutation(queryOptions);\n const query = this.parseGQLQuery(mutation.query);\n\n return this.apolloFactory\n .apollo(nodeContext)\n .mutate({\n mutation: query,\n fetchPolicy: 'no-cache',\n variables: mutation.variables,\n })\n .pipe(\n catchError((error) => {\n this.alertErrors(error);\n console.error('Error executing GraphQL query.', error);\n return throwError(() => error);\n }),\n );\n }\n\n update(\n resource: Resource,\n resourceDefinition: ResourceDefinition,\n nodeContext: ResourceNodeContext,\n readFromParentKcpPath: boolean = false,\n fields: any[] = ['__typename'],\n ) {\n const isNamespaced = isNamespacedResource(nodeContext);\n const { apiGroup, entity, version } = resourceDefinition;\n const namespace = this.getNamespace(nodeContext);\n\n const cleanResource = stripTypename(resource);\n\n const mutationFields: any[] = [\n {\n operation: `update${entity}`,\n variables: {\n ...(isNamespaced && {\n namespace: { type: 'String', value: namespace },\n }),\n name: { type: 'String!', value: resource.metadata.name },\n object: {\n type: `${buildGraphQLInputTypeName(apiGroup, version, entity)}!`,\n value: cleanResource,\n },\n },\n fields: fields,\n },\n ];\n const queryOptions = this.calcQueryOptions(mutationFields, [\n { operation: apiGroup },\n { operation: version },\n ]);\n const mutation = gqlBuilder.mutation(queryOptions);\n const query = this.parseGQLQuery(mutation.query);\n\n return this.apolloFactory\n .apollo(nodeContext, readFromParentKcpPath)\n .mutate({\n mutation: query,\n fetchPolicy: 'no-cache',\n variables: mutation.variables,\n })\n .pipe(\n map((res: any) =>\n getValueByPath(\n res.data,\n buildResourcePath(\n { apiGroup, entity: `update${entity}`, version },\n '.',\n ),\n ),\n ),\n catchError((error) => {\n this.alertErrors(error);\n console.error('Error executing GraphQL query.', error);\n return throwError(() => error);\n }),\n );\n }\n\n getNamespace(\n nodeContext: ResourceNodeContext,\n resource?: Resource,\n ): string | undefined {\n if (nodeContext.namespaceId) {\n return nodeContext.namespaceId;\n }\n\n if (resource?.metadata?.namespace) {\n return resource.metadata.namespace;\n }\n\n const namespace = this.luigiCoreService\n .routing()\n .getSearchParams().namespace;\n\n if (namespace) {\n return namespace === ALL_NAMESPACE ? undefined : namespace;\n }\n\n return undefined;\n }\n\n private normalizeGqlBuilderVariables(\n variables: VariableOptions,\n ): Record<string, any> {\n return Object.fromEntries(\n Object.entries(variables).map(([key, value]) => [key, value.value]),\n );\n }\n\n private calcQueryOptions(\n innerFields: Fields,\n wrappers: Partial<Omit<QueryBuilderOptions, 'fields'>>[],\n ): QueryBuilderOptions {\n const filteredWrappers = wrappers.filter(\n (wrapper): wrapper is Omit<QueryBuilderOptions, 'fields'> =>\n !!wrapper?.operation,\n );\n\n if (filteredWrappers.length === 0) {\n const completeQuery = innerFields.pop() as NestedField;\n if (completeQuery && completeQuery.operation && completeQuery.fields) {\n return completeQuery;\n }\n\n throw new Error('At least one wrapper or inner fields is required');\n }\n\n let fields = innerFields;\n let nextWrapper = filteredWrappers.pop() as Omit<\n QueryBuilderOptions,\n 'fields'\n >;\n\n filteredWrappers.forEach((wrapper) => {\n fields = [\n {\n operation: nextWrapper.operation,\n fields: innerFields,\n variables: nextWrapper.variables,\n },\n ];\n nextWrapper = wrapper;\n });\n\n return {\n operation: nextWrapper.operation,\n fields,\n variables: nextWrapper.variables,\n };\n }\n\n private parseGQLQuery(query: string) {\n try {\n return gql`\n ${query}\n `;\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n this.luigiCoreService.showAlert({\n text: `Could not parse gql query: <br/><br/> ${query} <br/><br/> ${message}`,\n type: 'error',\n });\n throw error;\n }\n }\n\n /**\n * Returns a {@link ReadResources}-shaped adapter over this service so that\n * consumers can swap implementations behind a feature toggle without depending\n * on the GraphQL-specific signatures of `list` / `resourceChangeSubscription`.\n */\n asReadResources(): ReadResources {\n return {\n list: (\n nodeContext: ResourceNodeContext,\n pagination: ReadResourcesPagination,\n params: ReadResourcesParams,\n ): Observable<ReadResourcesResult> => {\n const operation =\n params.operation ??\n nodeContext.resourceDefinition?.entityCollection ??\n '';\n const fields =\n params.fields ??\n nodeContext.resourceDefinition?.ui?.listView?.fields ??\n [];\n const resourcePagination: ResourcePagination = {\n limit: pagination.limit,\n continue: pagination.cursor,\n };\n\n return this.list(operation, fields, nodeContext, {\n readFromParentKcpPath: params.readFromParentKcpPath ?? false,\n pagination: resourcePagination,\n }).pipe(\n map((result: ResourceListResult): ReadResourcesResult => ({\n items: result?.items ?? [],\n nextCursor: result?.continue,\n remainingItemCount: result?.remainingItemCount,\n resourceVersion: result?.resourceVersion,\n })),\n );\n },\n subscribe: (\n nodeContext: ResourceNodeContext,\n params: ReadResourcesParams & { resourceVersion?: string },\n ): Observable<ReadResourcesSubscriptionResult | undefined> => {\n const operation =\n nodeContext.resourceDefinition?.entityCollection ?? '';\n const fields = Array.isArray(params.fields)\n ? params.fields\n : ((nodeContext.resourceDefinition?.ui?.listView?.fields as any[]) ??\n []);\n\n return this.resourceChangeSubscription(\n operation,\n fields,\n nodeContext,\n params.resourceVersion ?? '',\n params.readFromParentKcpPath ?? false,\n );\n },\n };\n }\n}\n","import { ResourceNodeContext } from './resource-node-context';\nimport { ResourceService } from './resource.service';\nimport { Injectable, inject } from '@angular/core';\nimport {\n ALL_NAMESPACE,\n ButtonSettings,\n DOWNLOAD_KUBECONFIG_FROM_SECRET_REF_ACTION,\n DownloadKubeconfigFromSecretRefButtonSettings,\n PlatformMeshFieldDefinition,\n Resource,\n ResourceDefinition,\n} from '@platform-mesh/portal-ui-lib/models';\nimport {\n decodeBase64,\n getResourceValueByJsonPath,\n} from '@platform-mesh/portal-ui-lib/utils';\nimport { Observable, catchError, map, throwError } from 'rxjs';\n\nconst SECRET_RESOURCE_DEFINITION: ResourceDefinition = {\n version: 'v1',\n entity: 'Secret',\n entityCollection: 'Secrets',\n scope: 'Namespaced',\n};\n\nconst DEFAULT_DATA_KEY = 'kubeconfig';\nconst DEFAULT_FILENAME = 'kubeconfig.yaml';\n\nexport interface KubeconfigDownload {\n contents: string;\n filename: string;\n}\n\ninterface SecretReference {\n name: string;\n namespace: string;\n}\n\nexport function isDownloadKubeconfigButtonSettings(\n buttonSettings: ButtonSettings | undefined,\n): buttonSettings is DownloadKubeconfigFromSecretRefButtonSettings {\n return buttonSettings?.action === DOWNLOAD_KUBECONFIG_FROM_SECRET_REF_ACTION;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class KubeconfigSecretService {\n private resourceService = inject(ResourceService);\n\n /**\n * Fields the detail-view query has to read so the action can resolve its\n * Secret reference from the loaded resource.\n */\n secretReferenceQueryFields(\n buttonSettings: ButtonSettings | undefined,\n ): PlatformMeshFieldDefinition[] {\n if (!isDownloadKubeconfigButtonSettings(buttonSettings)) {\n return [];\n }\n\n const fields: PlatformMeshFieldDefinition[] = [];\n const resourceProperty = this.readString(buttonSettings.resourceProperty);\n if (resourceProperty) {\n fields.push({ property: resourceProperty });\n }\n const namespaceProperty = this.readString(buttonSettings.namespaceProperty);\n if (namespaceProperty) {\n fields.push({ property: namespaceProperty });\n }\n\n return fields;\n }\n\n isSecretReferenceAvailable(\n buttonSettings: ButtonSettings | undefined,\n resource: Resource | undefined,\n context: ResourceNodeContext,\n ): boolean {\n return (\n isDownloadKubeconfigButtonSettings(buttonSettings) &&\n this.resolveSecretReference(buttonSettings, resource, context) !==\n undefined\n );\n }\n\n readKubeconfig(\n buttonSettings: ButtonSettings,\n resource: Resource | undefined,\n context: ResourceNodeContext,\n ): Observable<KubeconfigDownload> {\n if (!isDownloadKubeconfigButtonSettings(buttonSettings)) {\n return throwError(\n () => new Error('Button is not a kubeconfig download action'),\n );\n }\n\n const secretReference = this.resolveSecretReference(\n buttonSettings,\n resource,\n context,\n );\n if (!secretReference) {\n return throwError(\n () => new Error('Kubeconfig Secret reference is not available'),\n );\n }\n\n const dataKey = this.readString(buttonSettings.dataKey) ?? DEFAULT_DATA_KEY;\n const filename =\n this.readString(buttonSettings.filename) ?? DEFAULT_FILENAME;\n const secretContext: ResourceNodeContext = {\n ...context,\n namespaceId: secretReference.namespace,\n resourceDefinition: SECRET_RESOURCE_DEFINITION,\n };\n\n return this.resourceService\n .read(\n secretReference.name,\n SECRET_RESOURCE_DEFINITION,\n ['data'],\n secretContext,\n false,\n )\n .pipe(\n catchError(() =>\n throwError(() => new Error('Kubeconfig Secret could not be read')),\n ),\n map((secret) => {\n const encodedKubeconfig = this.readString(secret?.data?.[dataKey]);\n if (!encodedKubeconfig) {\n throw new Error(\n `Kubeconfig data key \"${dataKey}\" is not available`,\n );\n }\n\n return {\n contents: decodeBase64(encodedKubeconfig),\n filename,\n };\n }),\n );\n }\n\n private resolveSecretReference(\n buttonSettings: DownloadKubeconfigFromSecretRefButtonSettings,\n resource: Resource | undefined,\n context: ResourceNodeContext,\n ): SecretReference | undefined {\n if (!resource) {\n return undefined;\n }\n\n try {\n const resourceProperty = this.readString(buttonSettings.resourceProperty);\n if (!resourceProperty) {\n return undefined;\n }\n\n const name = this.readString(\n getResourceValueByJsonPath(resource, {\n property: resourceProperty,\n }),\n );\n const namespaceProperty = this.readString(\n buttonSettings.namespaceProperty,\n );\n const namespace = namespaceProperty\n ? this.namespaceOf(\n getResourceValueByJsonPath(resource, {\n property: namespaceProperty,\n }),\n )\n : (this.namespaceOf(resource.metadata?.namespace) ??\n this.namespaceOf(this.resourceService.getNamespace(context)));\n\n return name && namespace ? { name, namespace } : undefined;\n } catch {\n return undefined;\n }\n }\n\n private namespaceOf(value: unknown): string | undefined {\n const namespace = this.readString(value);\n return namespace && namespace !== ALL_NAMESPACE ? namespace : undefined;\n }\n\n private readString(value: unknown): string | undefined {\n return typeof value === 'string' && value.trim() ? value.trim() : undefined;\n }\n}\n","import { gql } from 'apollo-angular';\n\nexport const accountInfoRead = gql`\n {\n core_platform_mesh_io {\n v1alpha1 {\n AccountInfo(name: \"account\") {\n metadata {\n name\n annotations\n }\n spec {\n account {\n originClusterId\n }\n clusterInfo {\n ca\n }\n organization {\n originClusterId\n name\n }\n oidc {\n clients\n issuerUrl\n }\n }\n }\n }\n }\n }\n`;\n","import { accountInfoRead } from './account-info.queries';\nimport { ApolloFactory } from './apollo-factory';\nimport { ResourceNodeContext } from './resource-node-context';\nimport { Injectable, inject } from '@angular/core';\nimport { AccountInfo } from '@platform-mesh/portal-ui-lib/models';\nimport { Observable, throwError } from 'rxjs';\nimport { catchError, map, shareReplay } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AccountInfoService {\n private apolloFactory = inject(ApolloFactory);\n private readCache = new Map<string, Observable<AccountInfo>>();\n\n read(nodeContext: ResourceNodeContext): Observable<AccountInfo> {\n const cacheKey = nodeContext.kcpPath ?? '';\n const cachedRead = this.readCache.get(cacheKey);\n if (cachedRead) {\n return cachedRead;\n }\n\n const request$ = this.apolloFactory\n .apollo(nodeContext)\n .query<AccountInfo>({\n query: accountInfoRead,\n })\n .pipe(\n map((res: any) => {\n const rawAccountInfo =\n res.data.core_platform_mesh_io.v1alpha1.AccountInfo;\n\n return {\n ...rawAccountInfo,\n spec: {\n ...rawAccountInfo.spec,\n oidc: {\n ...rawAccountInfo.spec.oidc,\n clients: JSON.parse(rawAccountInfo.spec.oidc.clients),\n },\n },\n };\n }),\n shareReplay(1),\n catchError((error) => {\n this.readCache.delete(cacheKey);\n return throwError(() => error);\n }),\n );\n\n this.readCache.set(cacheKey, request$);\n return request$;\n }\n}\n","import { gql } from 'apollo-angular';\n\nexport const queryLoginCluster = gql`\n {\n core_kcp_io {\n v1alpha1 {\n LogicalCluster(name: \"cluster\") {\n status {\n phase\n }\n }\n }\n }\n }\n`;\n","import { ApolloFactory } from './apollo-factory';\nimport { queryLoginCluster } from './logical-cluster.queries';\nimport { ResourceNodeContext } from './resource-node-context';\nimport { Injectable, inject } from '@angular/core';\nimport { LogicalCluster } from '@platform-mesh/portal-ui-lib/models';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LogicalClusterService {\n private apolloFactory = inject(ApolloFactory);\n\n public read(nodeContext: ResourceNodeContext): Observable<LogicalCluster> {\n return this.apolloFactory\n .apollo(nodeContext)\n .query<LogicalCluster>({\n query: queryLoginCluster,\n })\n .pipe(map((res: any) => res.data.core_kcp_io.v1alpha1.LogicalCluster));\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { LuigiCoreService } from '@openmfp/portal-ui-lib';\nimport { Resource } from '@platform-mesh/portal-ui-lib/models';\n\n@Injectable({ providedIn: 'root' })\nexport class ErrorHandlerService {\n private luigiCoreService = inject(LuigiCoreService);\n\n handleError(error: any) {\n if (this.isUnauthorizedAccess(error)) {\n this.luigiCoreService.navigation().navigate('/error/403');\n } else {\n const message =\n error?.message || error?.errors?.map((e: any) => e.message).join('\\n');\n this.luigiCoreService.showAlert({\n text: message || 'An unknown error occurred',\n type: 'error',\n });\n console.error(error);\n }\n }\n\n handleResourcePendingDeletion(_resource: Resource) {\n this.luigiCoreService.navigation().navigate('/error/422');\n }\n\n isUnauthorizedAccess(error: any): boolean {\n return (\n !!error?.message?.toLowerCase().includes('forbidden') ||\n !!error?.message?.toLowerCase()?.includes('access denied')\n );\n }\n}\n","import { LogicalClusterService } from './resource';\nimport { Injectable, inject } from '@angular/core';\nimport {\n AuthService,\n ConfigService,\n EnvConfigService,\n LuigiCoreService,\n} from '@openmfp/portal-ui-lib';\nimport { LogicalCluster } from '@platform-mesh/portal-ui-lib/models';\nimport { EMPTY, Subject, exhaustMap, filter } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\n@Injectable({ providedIn: 'root' })\nexport class OrganizationReadyService {\n private configService = inject(ConfigService);\n private envConfigService = inject(EnvConfigService);\n private luigiCoreService = inject(LuigiCoreService);\n private logicalClusterService = inject(LogicalClusterService);\n private authService = inject(AuthService);\n\n private isReady = false;\n private check$ = new Subject<void>();\n\n constructor() {\n void this.initChecks();\n }\n\n private async initChecks() {\n const portalConfig = await this.configService.getPortalConfig();\n const { idpName } = await this.envConfigService.getEnvConfig();\n\n if (idpName === 'welcome') {\n return;\n }\n\n this.check$\n .pipe(\n filter(() => !this.isReady),\n exhaustMap(() =>\n this.logicalClusterService\n .read({\n portalContext: {\n crdGatewayApiUrl:\n portalConfig.portalContext['crdGatewayApiUrl'],\n },\n token: this.authService.getToken(),\n accountId: idpName,\n })\n .pipe(\n catchError((error) => {\n console.error('Org check failed', error);\n // Return EMPTY so the exhaustMap completes without killing the check$ stream\n return EMPTY;\n }),\n ),\n ),\n map((res: LogicalCluster) => {\n this.isReady = res.status.phase === 'Ready';\n if (!this.isReady) {\n this.luigiCoreService.navigation().navigate('/error/503');\n }\n }),\n )\n .subscribe();\n }\n\n public checkOrganizationReady() {\n this.check$.next();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ApolloObservable","catchError","map"],"mappings":";;;;;;;;;;;;;;;;;MAMa,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;AAEU,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AA8CpD,IAAA;AA5CQ,IAAA,aAAa,CAClB,WAAgC,EAChC,qBAAqB,GAAG,KAAK,EAAA;AAE7B,QAAA,MAAM,UAAU,GAAG,WAAW,CAAC,aAAa,CAAC,gBAAgB;QAC7D,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CA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