Browse Source

Added option to generate test variations - updated error messages.

pull/9/head
Roman Axelrod 2 years ago
parent
commit
c408f2f5b3
  1. 5
      layouts/scripts/dist/index.min.js
  2. 2
      layouts/scripts/dist/index.min.js.map
  3. 3
      layouts/scripts/toolbar/data-options/DataOptions.jsx
  4. 6
      package.json

5
layouts/scripts/dist/index.min.js

@ -10013,13 +10013,16 @@ function DataOptions(props = {}) {
errorMessage: null
});
return fetch(url, requestOptions).then(response => response.json()).then(result => {
console.log(result);
if (result.statusCode !== 200) {
throw new Error(result.message);
}
const data = result.variation;
updateState({
dataText: JSON.stringify(data, null, 2),
data
data,
errorMessage: null,
loading: false
});
updateIframe(data);
}).catch(error => {

2
layouts/scripts/dist/index.min.js.map

File diff suppressed because one or more lines are too long

3
layouts/scripts/toolbar/data-options/DataOptions.jsx

@ -125,12 +125,13 @@ function DataOptions(props = {}) {
return fetch(url, requestOptions)
.then(response => response.json())
.then(result => {
console.log(result)
if (result.statusCode !== 200) {
throw new Error(result.message);
}
const data = result.variation;
updateState({dataText: JSON.stringify(data, null, 2), data});
updateState({dataText: JSON.stringify(data, null, 2), data, errorMessage: null, loading: false});
updateIframe(data);
})
.catch(error => {

6
package.json

@ -7,9 +7,9 @@
"url": "https://axe-web.com/"
},
"scripts": {
"info": "NODE_ENV=development BLOCK_NAME=header MODULE_PATH= node debug.js",
"dev": "NODE_ENV=development BLOCK_NAME=header MODULE_PATH= node server.js",
"build-platform": "NODE_ENV=development BLOCK_NAME=header MODULE_PATH= node ./build.js",
"info": "NODE_ENV=development BLOCK_NAME=comparison-table MODULE_PATH= node debug.js",
"dev": "NODE_ENV=development BLOCK_NAME=comparison-table MODULE_PATH= node server.js",
"build-platform": "NODE_ENV=development BLOCK_NAME=comparison-table MODULE_PATH= node ./build.js",
"dev-dev-tool": "NODE_ENV=development rollup --config rollup.config.js --watch",
"build-dev-tool": "rollup --config rollup.config.js"
},

Loading…
Cancel
Save