From 5f067af14f16e41d1340b7d865745cb23eb2c6ac Mon Sep 17 00:00:00 2001 From: Alexander Cherepanov Date: Mon, 5 Jun 2023 18:25:51 +0600 Subject: [PATCH] Do not hide not secret settings in the web plugin UI (#1964) # What this PR does In the web plugin UI Settings -> Env Variables if variable is not secret, do not hide its value. ## Which issue(s) this PR fixes ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --------- Co-authored-by: Joey Orlando Co-authored-by: Joey Orlando Co-authored-by: Vadim Stepanov --- CHANGELOG.md | 6 ++++++ .../pages/settings/tabs/LiveSettings/LiveSettingsPage.tsx | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fc43310..5ada6af0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Do not hide not secret settings in the web plugin UI by @alexintech ([#1964](https://github.com/grafana/oncall/pull/1964)) + ## v1.2.36 (2023-06-02) ### Fixed diff --git a/grafana-plugin/src/pages/settings/tabs/LiveSettings/LiveSettingsPage.tsx b/grafana-plugin/src/pages/settings/tabs/LiveSettings/LiveSettingsPage.tsx index b93662e6..e6f6da03 100644 --- a/grafana-plugin/src/pages/settings/tabs/LiveSettings/LiveSettingsPage.tsx +++ b/grafana-plugin/src/pages/settings/tabs/LiveSettings/LiveSettingsPage.tsx @@ -166,7 +166,7 @@ class LiveSettings extends React.Component onTextChange={this.getEditValueChangeHandler(item)} editable={isUserActionAllowed(UserActions.OtherSettingsWrite)} clearBeforeEdit={item.is_secret} - hidden={hideValues} + hidden={hideValues && item.is_secret} > {normalizeValue(item.value)} @@ -208,7 +208,7 @@ class LiveSettings extends React.Component return (
- {hideValues ? PLACEHOLDER : normalizeValue(item.default_value)} + {hideValues && item.is_secret ? PLACEHOLDER : normalizeValue(item.default_value)}
); };