File tree Expand file tree Collapse file tree 11 files changed +47
-18
lines changed Expand file tree Collapse file tree 11 files changed +47
-18
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ export default {
139
139
return ;
140
140
}
141
141
}
142
- console .log (error);
142
+ console .warn (error);
143
143
this .noDataMessage = " Sorry, an unknown error has occured." ;
144
144
},
145
145
retrieveData () {
@@ -273,7 +273,7 @@ export default {
273
273
value = this [' format' + col .format ](value, col);
274
274
}
275
275
else {
276
- console .log (col .format + ' is an invalid formatter.' );
276
+ console .warn (col .format + ' is an invalid formatter.' );
277
277
}
278
278
}
279
279
else if (typeof col .format === ' function' ) {
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ export default {
55
55
},
56
56
data () {
57
57
return {
58
+ lastPgToInsert: null ,
58
59
pgToInsert: null
59
60
};
60
61
},
@@ -124,7 +125,11 @@ export default {
124
125
125
126
transferProcessGraph () {
126
127
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
+ }
128
133
this .pgToInsert = null ;
129
134
}
130
135
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export default {
97
97
this .$set (this .uploadProgressPerFile , i, 100 );
98
98
Utils .ok (this , ' File upload completed.' , file .name );
99
99
}).catch (error => {
100
- console .log (error);
100
+ console .error (error);
101
101
Utils .exception (this , error, file .name );
102
102
});
103
103
},
@@ -129,7 +129,7 @@ export default {
129
129
this .connection .subscribe (
130
130
' openeo.files' , {},
131
131
(data , info ) => {
132
- console .log (" File change: " + JSON .stringify (data));
132
+ console .info (" File change: " + JSON .stringify (data));
133
133
}
134
134
);
135
135
this .subscribed = true ;
Original file line number Diff line number Diff line change @@ -310,19 +310,19 @@ export default {
310
310
this .connection .subscribe (
311
311
' openeo.jobs.debug' , params,
312
312
(data , info ) => {
313
- console .log (" Debugging information for job " + id + " : " + JSON .stringify (data));
313
+ console .info (" Debugging information for job " + id + " : " + JSON .stringify (data));
314
314
}
315
315
);
316
316
this .connection .subscribe (
317
317
' openeo.jobs.output' , params,
318
318
(data , info ) => {
319
- console .log (" Output from job " + id + " : " + JSON .stringify (data));
319
+ console .info (" Output from job " + id + " : " + JSON .stringify (data));
320
320
}
321
321
);
322
322
this .connection .subscribe (
323
323
' openeo.jobs.status' , params,
324
324
(data , info ) => {
325
- console .log (" Status information for job " + id + " : " + JSON .stringify (data));
325
+ console .info (" Status information for job " + id + " : " + JSON .stringify (data));
326
326
}
327
327
);
328
328
this .jobSubscriptions .push (id);
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export default {
45
45
}
46
46
else if (Array .isArray (type)) {
47
47
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 ));
49
49
this .type = type[0 ];
50
50
}
51
51
else {
Original file line number Diff line number Diff line change 1
1
<template >
2
- <div class =" tabs" :id =" id" >
2
+ <div : class =" { tabs: true, hide: !hasEnabledTabs} " :id =" id" >
3
3
<div class =" tabsHeader" >
4
4
<button type =" button" v-show =" tab.enabled" :class =" {'tabItem': true, 'tabActive': tab.active }" @click =" selectTab(tab)" v-for =" tab in tabs" :key =" tab.id" >
5
5
<i :class =" ['fas', tab.icon]" ></i > {{ tab.name }}
@@ -25,11 +25,16 @@ export default {
25
25
tabs: []
26
26
};
27
27
},
28
- created () {
29
- this .tabs = this .$children ;
30
- },
31
28
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
+ }
33
38
},
34
39
methods: {
35
40
getTab (id ) {
@@ -64,11 +69,18 @@ export default {
64
69
if (activeTab === selectedTab) {
65
70
return ;
66
71
}
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 ) {
68
77
activeTab .hide ();
69
78
}
70
79
},
71
80
resetActiveTab (force = false ) {
81
+ if (this .tabs .length === 0 ) {
82
+ return ;
83
+ }
72
84
if (force || this .getActiveTab () === null ) {
73
85
this .selectTab (this .tabs [0 ]);
74
86
}
@@ -89,6 +101,9 @@ export default {
89
101
border : 1px solid #aaa ;
90
102
margin-bottom : 10px ;
91
103
}
104
+ .tabs.hide {
105
+ display : none ;
106
+ }
92
107
#viewer .tabs {
93
108
height : 97% ;
94
109
}
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export default {
66
66
},
67
67
watch: {
68
68
active (newVal ) {
69
- if (newVal) {
69
+ if (newVal && this . editor !== null ) {
70
70
this .editor .refresh ();
71
71
}
72
72
}
Original file line number Diff line number Diff line change @@ -139,9 +139,17 @@ class Field extends ProcessSchema {
139
139
this . hasValue = true ;
140
140
}
141
141
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 ) ;
142
145
// ToDo: It is not quite clear what to do when multiple refs are available.
143
146
}
144
147
}
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
+ }
145
153
}
146
154
147
155
_removeValueForEdge ( edge ) {
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Vue.use(Snotify);
9
9
10
10
Vue . config . productionTip = false ;
11
11
Vue . config . errorHandler = function ( err , vm , info ) {
12
- console . log ( err , info ) ;
12
+ console . error ( err , info ) ;
13
13
if ( ( err instanceof Error || typeof err === 'string' ) && vm && vm . $snotify ) {
14
14
vm . $snotify . error ( err . message || err , 'Fatal error' , Config . snotifyDefaults ) ;
15
15
}
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ class ProcessSchema {
67
67
68
68
dataTypes ( includeNull = false , native = false ) {
69
69
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
70
71
if ( ! includeNull ) {
71
72
types = types . filter ( s => s !== 'null' ) ;
72
73
}
You can’t perform that action at this time.
0 commit comments