Skip to content

Commit 9c28d9e

Browse files
committed
feat: update content configuration
1 parent c70e46d commit 9c28d9e

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/portal-options/service-providers/content-configuration-service-providers.service.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ describe('ContentConfigurationServiceProvidersService', () => {
4343

4444
it('returns parsed content configurations', async () => {
4545
mockClient.request.mockResolvedValue({
46-
core_openmfp_io: {
46+
ui_platform_mesh_io: {
4747
ContentConfigurations: [
4848
{
4949
metadata: {
5050
name: 'conf1',
51-
labels: { 'portal.openmfp.org/entity': 'entity' },
51+
labels: { 'ui.platform-mesh.io/entity': 'entity' },
5252
},
5353
spec: { remoteConfiguration: { url: 'http://remote' } },
5454
status: {
@@ -70,12 +70,12 @@ describe('ContentConfigurationServiceProvidersService', () => {
7070

7171
it('falls back to spec.remoteConfiguration.url if missing in parsed config', async () => {
7272
mockClient.request.mockResolvedValue({
73-
core_openmfp_io: {
73+
ui_platform_mesh_io: {
7474
ContentConfigurations: [
7575
{
7676
metadata: {
7777
name: 'conf1',
78-
labels: { 'portal.openmfp.org/entity': 'entity' },
78+
labels: { 'ui.platform-mesh.io/entity': 'entity' },
7979
},
8080
spec: { remoteConfiguration: { url: 'http://remote' } },
8181
status: { configurationResult: JSON.stringify({}) },
@@ -95,12 +95,12 @@ describe('ContentConfigurationServiceProvidersService', () => {
9595

9696
it('throws on missing configurationResult', async () => {
9797
mockClient.request.mockResolvedValue({
98-
core_openmfp_io: {
98+
ui_platform_mesh_io: {
9999
ContentConfigurations: [
100100
{
101101
metadata: {
102102
name: 'conf1',
103-
labels: { 'portal.openmfp.org/entity': 'entity' },
103+
labels: { 'ui.platform-mesh.io/entity': 'entity' },
104104
},
105105
spec: { remoteConfiguration: { url: 'http://remote' } },
106106
status: {},

src/portal-options/service-providers/content-configuration-service-providers.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { GraphQLClient, gql } from 'graphql-request';
99

1010
export const contentConfigurationsQuery = gql`
1111
query {
12-
core_openmfp_io {
12+
ui_platform_mesh_io {
1313
ContentConfigurations {
1414
metadata {
1515
name
@@ -66,17 +66,17 @@ export class ContentConfigurationServiceProvidersService
6666
);
6767

6868
// Validate response structure
69-
if (!response?.core_openmfp_io?.ContentConfigurations) {
69+
if (!response?.ui_platform_mesh_io?.ContentConfigurations) {
7070
throw new Error(
7171
'Invalid response structure: missing ContentConfigurations',
7272
);
7373
}
7474

7575
const entity = !entities || !entities.length ? 'main' : entities[0];
7676
const contentConfigurations =
77-
response.core_openmfp_io.ContentConfigurations.filter(
77+
response.ui_platform_mesh_io.ContentConfigurations.filter(
7878
(item) =>
79-
item.metadata.labels?.['portal.openmfp.org/entity'] === entity,
79+
item.metadata.labels?.['ui.platform-mesh.io/entity'] === entity,
8080
).map((item) => {
8181
try {
8282
// Validate required fields

src/portal-options/service-providers/kubernetes-service-providers.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class KubernetesServiceProvidersService
7979
group: 'core.openmfp.io',
8080
version: 'v1alpha1',
8181
plural: 'contentconfigurations',
82-
labelSelector: `portal.openmfp.org/entity=${entity}`,
82+
labelSelector: `ui.platform-mesh.io/entity=${entity}`,
8383
};
8484
return await this.k8sApi.listClusterCustomObject(gvr, {
8585
middleware: [

src/portal-options/service-providers/models/contentconfigurations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export interface ContentConfigurationQueryResponse {
2-
core_openmfp_io: ContentConfigurationsResponse;
2+
ui_platform_mesh_io: ContentConfigurationsResponse;
33
}
44

55
export interface ContentConfigurationsResponse {

0 commit comments

Comments
 (0)