36
36
<h3 class =" text-xs-left" >Sistema </h3 >
37
37
<v-card >
38
38
<div class =" cardContent" >
39
+
39
40
<v-select v-model =" settings.progLevel" :items =" blocklyToolboxItems" label =" Livello Toolbox Blockly" ></v-select >
40
41
<!-- <v-text-field v-model="settings.cbName" label="Nome CoderBot"></v-text-field>
41
42
<br>-->
42
43
<div v-for =" (value, key, index) in cb.info" >
43
44
{{ key }}: <code >{{ value }}</code >
44
45
</div >
46
+ Vue app commit build: <code > {{ lastCommit }} </code >
45
47
</div >
46
48
</v-card >
47
49
<br >
76
78
<h3 class =" text-xs-left" > Aggiornamento </h3 >
77
79
<v-card >
78
80
<div class =" cardContent" >
81
+ <template v-if =" updateStatus == 1 " >
79
82
{{ counter }} %
80
- {{ updateStatusText }}
83
+
84
+ </template >
85
+ <template v-if =" updateStatus == 2 " >
86
+ {{ updateStatusText }}
87
+ </template >
81
88
<template v-if =" updateStatus == 0 " >
82
89
<v-text-field label =" Seleziona il pacchetto di aggiornamento" @click =' pickFile' v-model =' fileName' prepend-icon =' attach_file' ></v-text-field >
83
90
<input type =" file" style =" display : none " ref =" file" @change =" onFilePicked" >
@@ -257,7 +264,6 @@ export default {
257
264
}
258
265
},
259
266
upload () {
260
- console .log (this .fileObj )
261
267
var formdata = new FormData ();
262
268
formdata .append (' file_to_upload' , this .fileObj )
263
269
const config = {
@@ -266,12 +272,14 @@ export default {
266
272
this .counter = Math .floor ((progressEvent .loaded * 100 ) / progressEvent .total );
267
273
}
268
274
}
275
+ this .updateStatus = 1
269
276
this .$axios .post (this .CB + ' /uploadFile' , formdata, config).then (result => {
270
277
this .uploadCompleted = true ;
271
278
this .uploadInProgress = false ;
272
279
console .dir (result .data );
280
+ this .updateStatus = 2
273
281
this .updateStatusText = ' Upload completato. Aggiornamento in corso...'
274
- this . updateStatus = 1
282
+
275
283
})
276
284
277
285
},
@@ -488,6 +496,7 @@ export default {
488
496
data () {
489
497
return {
490
498
status: null ,
499
+ lastCommit: process .env .lastCommit ,
491
500
CB : process .env .CB_ENDPOINT + process .env .APIv2 ,
492
501
CBv1: process .env .CB_ENDPOINT ,
493
502
snackbar: null ,
0 commit comments