mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Prevent showing View YAML button on new rules (#72278)
This commit is contained in:
parent
d6e43a44bd
commit
fe77d039e6
@ -227,15 +227,17 @@ export const AlertRuleForm = ({ existing, prefill }: Props) => {
|
||||
</Button>
|
||||
) : null}
|
||||
|
||||
<Button
|
||||
variant="secondary"
|
||||
type="button"
|
||||
onClick={() => setShowEditYaml(true)}
|
||||
disabled={submitState.loading}
|
||||
size="sm"
|
||||
>
|
||||
{isCortexLokiOrRecordingRule(watch) ? 'Edit YAML' : 'View YAML'}
|
||||
</Button>
|
||||
{existing ? (
|
||||
<Button
|
||||
variant="secondary"
|
||||
type="button"
|
||||
onClick={() => setShowEditYaml(true)}
|
||||
disabled={submitState.loading}
|
||||
size="sm"
|
||||
>
|
||||
{isCortexLokiOrRecordingRule(watch) ? 'Edit YAML' : 'View YAML'}
|
||||
</Button>
|
||||
) : null}
|
||||
</HorizontalGroup>
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user