diff --git a/client/src/app/tabs/rpa/RPAEditor.js b/client/src/app/tabs/rpa/RPAEditor.js
index 26e05961f..9726ce721 100644
--- a/client/src/app/tabs/rpa/RPAEditor.js
+++ b/client/src/app/tabs/rpa/RPAEditor.js
@@ -39,18 +39,16 @@ import { getRPAEditMenu } from './getRobotEditMenu';
import { Fill } from '../../slot-fill';
import RunButton from './RunButton';
import StatusButton from './StatusButton';
+import { Loader } from '../../primitives';
export class RPAEditor extends CachedComponent {
constructor(props) {
super(props);
- console.log('props', props);
-
- console.log('config', props.getConfig('rpa', {}));
-
this.state = {
- save: true
+ save: true,
+ loaded: false
};
this.modelerRef = React.createRef();
@@ -69,18 +67,29 @@ export class RPAEditor extends CachedComponent {
// editor.attachTo(this.modelerRef.current);
+ this.createEditor();
+
+ // this.checkImport();
+ }
+
+
+ async createEditor() {
+ const rpaConfig = await this.props.getConfig('rpa', {});
this._editor = coolRpaEditor({
container: this.modelerRef.current,
propertiesPanel: {
container: this.propertiesPanelRef.current
},
+ runnerConfig: rpaConfig.runnerConfig,
value: this.props.xml
});
- this.handleChanged();
+ this._editor.eventBus.on('config.updated', (config) => {
+ this.props.setConfig('rpa', { runnerConfig: config });
+ });
- // this.checkImport();
+ this.handleChanged();
}
// componentWillUnmount() {
@@ -164,6 +173,7 @@ export class RPAEditor extends CachedComponent {
const dirty = this.isDirty();
const newState = {
+ loaded: true,
canExport: false,
dirty,
save: true,
@@ -218,8 +228,15 @@ export class RPAEditor extends CachedComponent {
}
render() {
+
+ const loading = !this.state.loaded;
+
+ console.log('loading', loading, this.state) ;
+
return (
<>
+