3636 <h3 class =" text-xs-left" >Sistema </h3 >
3737 <v-card >
3838 <div class =" cardContent" >
39+
3940 <v-select v-model =" settings.progLevel" :items =" blocklyToolboxItems" label =" Livello Toolbox Blockly" ></v-select >
4041 <!-- <v-text-field v-model="settings.cbName" label="Nome CoderBot"></v-text-field>
4142 <br>-->
4243 <div v-for =" (value, key, index) in cb.info" >
4344 {{ key }}: <code >{{ value }}</code >
4445 </div >
46+ Vue app commit build: <code > {{ lastCommit }} </code >
4547 </div >
4648 </v-card >
4749 <br >
7678 <h3 class =" text-xs-left" > Aggiornamento </h3 >
7779 <v-card >
7880 <div class =" cardContent" >
81+ <template v-if =" updateStatus == 1 " >
7982 {{ counter }} %
80- {{ updateStatusText }}
83+
84+ </template >
85+ <template v-if =" updateStatus == 2 " >
86+ {{ updateStatusText }}
87+ </template >
8188 <template v-if =" updateStatus == 0 " >
8289 <v-text-field label =" Seleziona il pacchetto di aggiornamento" @click =' pickFile' v-model =' fileName' prepend-icon =' attach_file' ></v-text-field >
8390 <input type =" file" style =" display : none " ref =" file" @change =" onFilePicked" >
@@ -257,7 +264,6 @@ export default {
257264 }
258265 },
259266 upload () {
260- console .log (this .fileObj )
261267 var formdata = new FormData ();
262268 formdata .append (' file_to_upload' , this .fileObj )
263269 const config = {
@@ -266,12 +272,14 @@ export default {
266272 this .counter = Math .floor ((progressEvent .loaded * 100 ) / progressEvent .total );
267273 }
268274 }
275+ this .updateStatus = 1
269276 this .$axios .post (this .CB + ' /uploadFile' , formdata, config).then (result => {
270277 this .uploadCompleted = true ;
271278 this .uploadInProgress = false ;
272279 console .dir (result .data );
280+ this .updateStatus = 2
273281 this .updateStatusText = ' Upload completato. Aggiornamento in corso...'
274- this . updateStatus = 1
282+
275283 })
276284
277285 },
@@ -488,6 +496,7 @@ export default {
488496 data () {
489497 return {
490498 status: null ,
499+ lastCommit: process .env .lastCommit ,
491500 CB : process .env .CB_ENDPOINT + process .env .APIv2 ,
492501 CBv1: process .env .CB_ENDPOINT ,
493502 snackbar: null ,
0 commit comments