@@ -7,6 +7,7 @@ | |||||
"history": "^4.10.1", | "history": "^4.10.1", | ||||
"jquery": "^3.4.1", | "jquery": "^3.4.1", | ||||
"js-uuid": "0.0.6", | "js-uuid": "0.0.6", | ||||
"js-yaml": "^3.13.1", | |||||
"linkstate": "^1.1.1", | "linkstate": "^1.1.1", | ||||
"popper.js": "^1.16.1", | "popper.js": "^1.16.1", | ||||
"preact": "^8.2.9", | "preact": "^8.2.9", | ||||
@@ -46,6 +46,7 @@ export default { | |||||
'node_modules/crypto-js/core.js': 'dist/js/crypto-js/core.js', | 'node_modules/crypto-js/core.js': 'dist/js/crypto-js/core.js', | ||||
'node_modules/crypto-js/md5.js': 'dist/js/crypto-js/md5.js', | 'node_modules/crypto-js/md5.js': 'dist/js/crypto-js/md5.js', | ||||
'src/js/misc/wb-manifest-worker.js': 'dist/js/wb-manifest-worker.js', | 'src/js/misc/wb-manifest-worker.js': 'dist/js/wb-manifest-worker.js', | ||||
'node_modules/js-yaml/dist/js-yaml.min.js': 'dist/js/js-yaml.min.js', | |||||
verbose: true | verbose: true | ||||
}), | }), | ||||
buble({jsx: 'h'}), | buble({jsx: 'h'}), | ||||
@@ -14,6 +14,7 @@ | |||||
<script language="javascript" src="/js/filesize.js"></script> | <script language="javascript" src="/js/filesize.js"></script> | ||||
<script language="javascript" src="/js/crypto-js/core.js"></script> | <script language="javascript" src="/js/crypto-js/core.js"></script> | ||||
<script language="javascript" src="/js/crypto-js/md5.js"></script> | <script language="javascript" src="/js/crypto-js/md5.js"></script> | ||||
<script language="javascript" src="/js/js-yaml.min.js"></script> | |||||
</head> | </head> | ||||
<body> | <body> | ||||
<script language="javascript" src="/js/app.min.js"></script> | <script language="javascript" src="/js/app.min.js"></script> | ||||
@@ -22,7 +22,12 @@ class WBWorkflowFields extends Component { | |||||
prom = prom.then(xhr => { | prom = prom.then(xhr => { | ||||
const item = xhr.response; | const item = xhr.response; | ||||
const definition = JSON.parse(item.definition); | |||||
let definition; | |||||
try { | |||||
definition = JSON.parse(item.definition); | |||||
} catch (_) { | |||||
definition = jsyaml.load(item.definition); | |||||
} | |||||
const graph = definition['$graph']; | const graph = definition['$graph']; | ||||
let rows = [ | let rows = [ | ||||