mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 11:27:36 -02:30
delete unused function
This commit is contained in:
@@ -23,23 +23,6 @@ import {
|
|||||||
import CodeEditor from './CodeEditor';
|
import CodeEditor from './CodeEditor';
|
||||||
import { JSON_MODE, YAML_MODE } from './constants';
|
import { JSON_MODE, YAML_MODE } from './constants';
|
||||||
|
|
||||||
function getValueAsMode(value, mode) {
|
|
||||||
if (!value) {
|
|
||||||
if (mode === JSON_MODE) {
|
|
||||||
return '{}';
|
|
||||||
}
|
|
||||||
return '---';
|
|
||||||
}
|
|
||||||
const modeMatches = isJsonString(value) === (mode === JSON_MODE);
|
|
||||||
if (modeMatches) {
|
|
||||||
if (mode === YAML_MODE) {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
return JSON.stringify(JSON.parse(value), null, 2);
|
|
||||||
}
|
|
||||||
return mode === YAML_MODE ? jsonToYaml(value) : yamlToJson(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function VariablesDetail({
|
function VariablesDetail({
|
||||||
dataCy,
|
dataCy,
|
||||||
helpText,
|
helpText,
|
||||||
|
|||||||
Reference in New Issue
Block a user