mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-28 02:41:49 -05:00
use code-mirror directive for host facts
This commit is contained in:
@@ -77,6 +77,14 @@ function atCodeMirrorController (
|
||||
return true;
|
||||
}
|
||||
|
||||
if (typeof str !== 'string') {
|
||||
const yamlStr = jsyaml.safeDump(str);
|
||||
// jsyaml.safeDump doesn't process an empty object correctly
|
||||
if (yamlStr === '{}\n') {
|
||||
return '---';
|
||||
}
|
||||
return yamlStr;
|
||||
}
|
||||
if (str === '' || str === '{}') {
|
||||
return '---';
|
||||
} else if (IsJsonString(str)) {
|
||||
|
||||
Reference in New Issue
Block a user