1+ import { processFields } from '../../../utils/proccess-fields' ;
2+ import { validateKubeconfigProps } from '../../../utils/ts-guargs/validate-kubeconfig-props' ;
3+ import { ValueCellComponent } from '../value-cell/value-cell.component' ;
4+ import { kubeConfigTemplate } from './kubeconfig-template' ;
15import {
26 ChangeDetectionStrategy ,
37 Component ,
@@ -10,7 +14,7 @@ import {
1014} from '@angular/core' ;
1115import { LuigiClient } from '@luigi-project/client/luigi-element' ;
1216import { EnvConfigService } from '@openmfp/portal-ui-lib' ;
13- import { FieldDefinition , Resource } from '@platform-mesh/portal-ui-lib/models' ;
17+ import { Resource } from '@platform-mesh/portal-ui-lib/models' ;
1418import {
1519 GatewayService ,
1620 ResourceNodeContext ,
@@ -31,18 +35,6 @@ import {
3135 ToolbarButtonComponent ,
3236 ToolbarComponent ,
3337} from '@ui5/webcomponents-ngx' ;
34- import { processFields } from '../../../utils/proccess-fields' ;
35- import { ValueCellComponent } from '../value-cell/value-cell.component' ;
36- import { kubeConfigTemplate } from './kubeconfig-template' ;
37- import { validateKubeconfigProps } from '../../../utils/ts-guargs/validate-kubeconfig-props' ;
38-
39- const defaultFields : FieldDefinition [ ] = [
40- {
41- label : 'Workspace Status' ,
42- jsonPathExpression : 'status.conditions[?(@.type=="Ready")].status' ,
43- property : [ 'status.conditions.status' , 'status.conditions.type' ] ,
44- } ,
45- ] ;
4638
4739@Component ( {
4840 selector : 'detail-view' ,
@@ -75,7 +67,7 @@ export class DetailViewComponent {
7567
7668 resourceDefinition = computed ( ( ) => this . context ( ) . resourceDefinition ) ;
7769 resourceFields = computed (
78- ( ) => this . resourceDefinition ( ) ?. ui ?. detailView ?. fields || defaultFields ,
70+ ( ) => this . resourceDefinition ( ) ?. ui ?. detailView ?. fields ?? [ ] ,
7971 ) ;
8072 resourceId = computed ( ( ) => this . context ( ) . entity ?. metadata . name ) ;
8173 workspacePath = computed ( ( ) =>
@@ -193,4 +185,4 @@ export class DetailViewComponent {
193185
194186 return resourceDefinition ;
195187 }
196- }
188+ }
0 commit comments