IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Browse Source

Support for YAML workflow definitions.

pull/1/head
parent
commit
12192c5b93
4 changed files with 9 additions and 1 deletions
  1. +1
    -0
      frontend/package.json
  2. +1
    -0
      frontend/rollup.config.js
  3. +1
    -0
      frontend/src/html/index.html
  4. +6
    -1
      frontend/src/js/component/wb-workflow-fields.js

+ 1
- 0
frontend/package.json View File

@@ -7,6 +7,7 @@
"history": "^4.10.1",
"jquery": "^3.4.1",
"js-uuid": "0.0.6",
"js-yaml": "^3.13.1",
"linkstate": "^1.1.1",
"popper.js": "^1.16.1",
"preact": "^8.2.9",


+ 1
- 0
frontend/rollup.config.js View File

@@ -46,6 +46,7 @@ export default {
'node_modules/crypto-js/core.js': 'dist/js/crypto-js/core.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',
'node_modules/js-yaml/dist/js-yaml.min.js': 'dist/js/js-yaml.min.js',
verbose: true
}),
buble({jsx: 'h'}),


+ 1
- 0
frontend/src/html/index.html View File

@@ -14,6 +14,7 @@
<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/md5.js"></script>
<script language="javascript" src="/js/js-yaml.min.js"></script>
</head>
<body>
<script language="javascript" src="/js/app.min.js"></script>


+ 6
- 1
frontend/src/js/component/wb-workflow-fields.js View File

@@ -22,7 +22,12 @@ class WBWorkflowFields extends Component {
prom = prom.then(xhr => {
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'];
let rows = [


Loading…
Cancel
Save