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 <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
This commit is contained in:
Alexander Cherepanov 2023-06-05 18:25:51 +06:00 committed by GitHub
parent d3921a5386
commit 5f067af14f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -166,7 +166,7 @@ class LiveSettings extends React.Component<LiveSettingsProps, LiveSettingsState>
onTextChange={this.getEditValueChangeHandler(item)}
editable={isUserActionAllowed(UserActions.OtherSettingsWrite)}
clearBeforeEdit={item.is_secret}
hidden={hideValues}
hidden={hideValues && item.is_secret}
>
{normalizeValue(item.value)}
</Text>
@ -208,7 +208,7 @@ class LiveSettings extends React.Component<LiveSettingsProps, LiveSettingsState>
return (
<div style={{ wordWrap: 'break-word', wordBreak: 'break-word' }}>
<Text>{hideValues ? PLACEHOLDER : normalizeValue(item.default_value)}</Text>
<Text>{hideValues && item.is_secret ? PLACEHOLDER : normalizeValue(item.default_value)}</Text>
</div>
);
};