File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ export const URLS = {
77
77
DEPLOYMENT_HISTORY_CONFIGURATIONS : '/configuration' ,
78
78
GLOBAL_CONFIG_SCOPED_VARIABLES : '/global-config/scoped-variables' ,
79
79
GLOBAL_CONFIG_DEPLOYMENT_CHARTS_LIST : '/global-config/deployment-charts' ,
80
+ GLOBAL_CONFIG_DEPLOYMENT_CHARTS_UPLOAD_CHART : '/global-config/deployment-charts/upload-chart' ,
80
81
NETWORK_STATUS_INTERFACE : '/network-status-interface' ,
81
82
CONFIG_DRIFT : 'config-drift' ,
82
83
RESOURCE_BROWSER : '/resource-browser' ,
Original file line number Diff line number Diff line change @@ -960,3 +960,8 @@ export const TriggerType = {
960
960
Auto : 'AUTOMATIC' ,
961
961
Manual : 'MANUAL' ,
962
962
} as const
963
+
964
+ export interface AppEnvIdType {
965
+ appId : number
966
+ envId : number
967
+ }
Original file line number Diff line number Diff line change 16
16
17
17
import { getSanitizedIframe } from '@Common/Helper'
18
18
import { PATTERNS } from '@Common/Constants'
19
+ import { parse } from 'yaml'
19
20
import { URLProtocolType } from './types'
20
21
import { SKIP_LABEL_KEY_VALIDATION_PREFIX } from './constants'
21
22
@@ -453,3 +454,19 @@ export const validateCMVolumeMountPath = (value: string): { isValid: boolean; me
453
454
}
454
455
return { isValid : true , message : '' }
455
456
}
457
+
458
+ export const validateYAML = ( yamlString : string ) : ValidationResponseType => {
459
+ try {
460
+ if ( yamlString ) {
461
+ parse ( yamlString )
462
+ }
463
+ return {
464
+ isValid : true ,
465
+ }
466
+ } catch ( err ) {
467
+ return {
468
+ isValid : false ,
469
+ message : err . message ,
470
+ }
471
+ }
472
+ }
You can’t perform that action at this time.
0 commit comments