Skip to content

Commit 3114b85

Browse files
committed
Merge remote-tracking branch 'origin/development'
2 parents eeede5a + d0e2fa9 commit 3114b85

File tree

11 files changed

+47
-18
lines changed

11 files changed

+47
-18
lines changed

src/components/DataTable.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export default {
139139
return;
140140
}
141141
}
142-
console.log(error);
142+
console.warn(error);
143143
this.noDataMessage = "Sorry, an unknown error has occured.";
144144
},
145145
retrieveData() {
@@ -273,7 +273,7 @@ export default {
273273
value = this['format' + col.format](value, col);
274274
}
275275
else {
276-
console.log(col.format + ' is an invalid formatter.');
276+
console.warn(col.format + ' is an invalid formatter.');
277277
}
278278
}
279279
else if (typeof col.format === 'function') {

src/components/Editor.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export default {
5555
},
5656
data() {
5757
return {
58+
lastPgToInsert: null,
5859
pgToInsert: null
5960
};
6061
},
@@ -124,7 +125,11 @@ export default {
124125
125126
transferProcessGraph() {
126127
this.activeEditor.onShow();
127-
this.insertProcessGraph(this.pgToInsert);
128+
// Don't update process graph if it hasn' changed
129+
if (!this.lastPgToInsert || JSON.stringify(this.pgToInsert) !== this.lastPgToInsert) {
130+
this.insertProcessGraph(this.pgToInsert);
131+
this.lastPgToInsert = JSON.stringify(this.pgToInsert);
132+
}
128133
this.pgToInsert = null;
129134
}
130135

src/components/FilePanel.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default {
9797
this.$set(this.uploadProgressPerFile, i, 100);
9898
Utils.ok(this, 'File upload completed.', file.name);
9999
}).catch(error => {
100-
console.log(error);
100+
console.error(error);
101101
Utils.exception(this, error, file.name);
102102
});
103103
},
@@ -129,7 +129,7 @@ export default {
129129
this.connection.subscribe(
130130
'openeo.files', {},
131131
(data, info) => {
132-
console.log("File change: " + JSON.stringify(data));
132+
console.info("File change: " + JSON.stringify(data));
133133
}
134134
);
135135
this.subscribed = true;

src/components/JobPanel.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,19 +310,19 @@ export default {
310310
this.connection.subscribe(
311311
'openeo.jobs.debug', params,
312312
(data, info) => {
313-
console.log("Debugging information for job " + id + ": " + JSON.stringify(data));
313+
console.info("Debugging information for job " + id + ": " + JSON.stringify(data));
314314
}
315315
);
316316
this.connection.subscribe(
317317
'openeo.jobs.output', params,
318318
(data, info) => {
319-
console.log("Output from job " + id + ": " + JSON.stringify(data));
319+
console.info("Output from job " + id + ": " + JSON.stringify(data));
320320
}
321321
);
322322
this.connection.subscribe(
323323
'openeo.jobs.status', params,
324324
(data, info) => {
325-
console.log("Status information for job " + id + ": " + JSON.stringify(data));
325+
console.info("Status information for job " + id + ": " + JSON.stringify(data));
326326
}
327327
);
328328
this.jobSubscriptions.push(id);

src/components/ParameterFields.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default {
4545
}
4646
else if (Array.isArray(type)) {
4747
Utils.info("Data type can't be detected, please select it yourself.");
48-
console.log("Parameter schema is ambiguous. Potential types: " + type.join(', ') + ". Value: " + JSON.stringify(this.pass));
48+
console.warn("Parameter schema is ambiguous. Potential types: " + type.join(', ') + ". Value: " + JSON.stringify(this.pass));
4949
this.type = type[0];
5050
}
5151
else {

src/components/Tabs.vue

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="tabs" :id="id">
2+
<div :class="{tabs: true, hide: !hasEnabledTabs} " :id="id">
33
<div class="tabsHeader">
44
<button type="button" v-show="tab.enabled" :class="{'tabItem': true, 'tabActive': tab.active }" @click="selectTab(tab)" v-for="tab in tabs" :key="tab.id">
55
<i :class="['fas', tab.icon]"></i> {{ tab.name }}
@@ -25,11 +25,16 @@ export default {
2525
tabs: []
2626
};
2727
},
28-
created() {
29-
this.tabs = this.$children;
30-
},
3128
mounted() {
32-
this.resetActiveTab();
29+
if (Array.isArray(this.$children)) {
30+
this.tabs = this.$children;
31+
this.resetActiveTab();
32+
}
33+
},
34+
computed: {
35+
hasEnabledTabs() {
36+
return this.tabs.filter(t => t.enabled).length > 0;
37+
}
3338
},
3439
methods: {
3540
getTab(id) {
@@ -64,11 +69,18 @@ export default {
6469
if (activeTab === selectedTab) {
6570
return;
6671
}
67-
if (selectedTab !== null && await selectedTab.show() && activeTab !== null) {
72+
if (!selectedTab || typeof selectedTab.show !== 'function') {
73+
console.warn("Invalid tab", selectedTab);
74+
return;
75+
}
76+
if (await selectedTab.show() && activeTab !== null) {
6877
activeTab.hide();
6978
}
7079
},
7180
resetActiveTab(force = false) {
81+
if (this.tabs.length === 0) {
82+
return;
83+
}
7284
if (force || this.getActiveTab() === null) {
7385
this.selectTab(this.tabs[0]);
7486
}
@@ -89,6 +101,9 @@ export default {
89101
border: 1px solid #aaa;
90102
margin-bottom: 10px;
91103
}
104+
.tabs.hide {
105+
display: none;
106+
}
92107
#viewer .tabs {
93108
height: 97%;
94109
}

src/components/TextEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default {
6666
},
6767
watch: {
6868
active(newVal) {
69-
if (newVal) {
69+
if (newVal && this.editor !== null) {
7070
this.editor.refresh();
7171
}
7272
}

src/components/blocks/field.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,17 @@ class Field extends ProcessSchema {
139139
this.hasValue = true;
140140
}
141141
else {
142+
var errorMsg = "Can't determine which object property this input should be assigned to. Please specify manually in Process Graph mode.";
143+
console.warn(errorMsg);
144+
this.block.blocks.showError(errorMsg);
142145
// ToDo: It is not quite clear what to do when multiple refs are available.
143146
}
144147
}
148+
else {
149+
// ToDo: This is probably of data type mixed or any, how to handle?
150+
this.value = ref;
151+
this.hasValue = true;
152+
}
145153
}
146154

147155
_removeValueForEdge(edge) {

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Vue.use(Snotify);
99

1010
Vue.config.productionTip = false;
1111
Vue.config.errorHandler = function (err, vm, info) {
12-
console.log(err, info);
12+
console.error(err, info);
1313
if ((err instanceof Error || typeof err === 'string') && vm && vm.$snotify) {
1414
vm.$snotify.error(err.message || err, 'Fatal error', Config.snotifyDefaults);
1515
}

src/processSchema.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class ProcessSchema {
6767

6868
dataTypes(includeNull = false, native = false) {
6969
var types = this.schemas.map(s => s.dataType(native));
70+
types = types.filter((v, i, a) => a.indexOf(v) === i); // Return each type only once
7071
if (!includeNull) {
7172
types = types.filter(s => s !== 'null');
7273
}

0 commit comments

Comments
 (0)