From f6a03c468f8f7fd7cba3d7e9011fd8e181d65fef Mon Sep 17 00:00:00 2001 From: stevenlandrydd Date: Tue, 14 May 2024 09:35:33 -0400 Subject: [PATCH] feat(kayenta): expose option to disable ui editing of canary configs --- package.json | 2 +- src/kayenta/canary.settings.ts | 1 + src/kayenta/reducers/app.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9ef586d1..ac9edce8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@spinnaker/kayenta", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "repository": { "type": "git", diff --git a/src/kayenta/canary.settings.ts b/src/kayenta/canary.settings.ts index 5bee905f..dd4ce29d 100644 --- a/src/kayenta/canary.settings.ts +++ b/src/kayenta/canary.settings.ts @@ -19,6 +19,7 @@ export interface ICanarySettings { atlasGraphBaseUrl: string; templatesEnabled: boolean; manualAnalysisEnabled: boolean; + disableConfigEdit: boolean; legacySiteLocalFieldsEnabled: boolean; // legacy fields for backwards-compat with old systems, no long term support planned } diff --git a/src/kayenta/reducers/app.ts b/src/kayenta/reducers/app.ts index cf314d13..c733fb2d 100644 --- a/src/kayenta/reducers/app.ts +++ b/src/kayenta/reducers/app.ts @@ -45,7 +45,7 @@ const configJsonModalTabState = handleActions( ConfigJsonModalTabState.Edit, ); -const disableConfigEdit = handleActions({}, false); +const disableConfigEdit = handleActions({}, CanarySettings.disableConfigEdit ?? false); export const app: Reducer = combineReducers({ executionsCount,