WarpView Editor Elements
npm install @senx/warpview-editor
This web components embed a WarpScript editor dedicated to Warp 10™.
- licence Apache 2
- Contribute
Demo: https://senx.github.io/warpview-editor
npm i @senx/warpview-editor --save
yarn add @senx/warpview-editor
``html`
2 2 +
| Name | Type | Default | Description |
|------|------|---------|-------------|
| url | string | | Warp 10 url, eg: https://warp.senx.io/api/v0/exec |string
| theme | | 'light' | Editor theme (light or dark) |string
| warpscript | | '' | WarpScript to edit (optional, could be inside HTML tag) |boolean
| showDataviz | | false | Display the "Show dataviz" button |boolean
| showExecute | | true | Display the "Execute" button |boolean
| horizontalLayout | | false | Horizontal or vertical layout |object
| config | | default config | Configuration |boolean
| displayMessages | | true | Displays messages from WarpScript execution |number
| widthPx | | | Fixed width |number
| heightPx | | | Fixed height |number
| heightLine | | | Fixed number of lines |
| imageTab | boolean | false | Display the tab for image results |
`json`
{
"buttons" : {
"class": ""
},
"execButton" : {
"class": "",
"label": "Execute"
},
"datavizButton" : {
"class": "",
"label": "Visualize"
},
"hover" : true,
"readOnly" : false,
"messageClass" : "",
"errorClass" : "",
"editor": {
"quickSuggestionsDelay": 10,
"quickSuggestions": true,
"tabSize": 2,
"minLineNumber": 10,
"enableDebug": false
}
}
String execution status :
`text`
Your script execution took 527.749 ms serverside, fetched 138156 datapoints and performed 21 WarpScript operations.
String execution error :
`text``
ERROR line #4 in section '[TOP]': Unknown symbol 'TOKEN2'
String representation of the WarpScript typed in the editor.
Json of the the WarpScript execution result triggered by a click on the execute button.
Json of the the WarpScript execution result triggered by a click on the dataViz button