Skip to content

Commit ddc6355

Browse files
author
Antonino Tramontana
committed
modificata routine installazione pacchetti
1 parent e5c8c77 commit ddc6355

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/components/Settings.vue

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -458,24 +458,25 @@
458458

459459
<div v-for="pkgnames in settings.packagesInstalled">
460460
<ul>
461-
<li> nome: {{pkgnames[0][0]}} tipo: {{pkgnames[1]}} <span align="right"><v-btn @click="deletePkg(pkgnames[0][1])" color="red" dark>
461+
<li> nome: {{pkgnames[0][0]}} tipo: {{pkgnames[1]}} <span style="display: flex; justify-content: flex-end"><v-btn @click="deletePkg(pkgnames[0][1])" color="red" dark>
462462
<v-icon>fas fa-trash</v-icon> Rimuovi
463463
</v-btn></span>
464464
</li>
465465
</ul>
466466
</div>
467-
467+
<br>
468468
</v-card>
469-
<h3 class="text-xs-left"> Aggiungi Pacchetto ssh with python</h3>
469+
<h3 class="text-xs-left"> Aggiungi Pacchetto </h3>
470470
<v-card>
471471
<div class="cardContent">
472472
<template v-if="updateStatus==1">
473-
Caricamento del file:
474-
<h3>{{ counter }} %</h3>
473+
<h3>File Caricato</h3>
475474
<br>
476475
{{ updateStatusText }}
476+
<v-btn @click="refresh" color="error">Aggiorna</v-btn>
477477
</template>
478478
<template v-if="updateStatus==2">
479+
Errore, pacchetto non installato.
479480
</template>
480481
<template v-if="updateStatus==0">
481482
<v-text-field label="Seleziona il pacchetto da installare" @click='pickFile' v-model='fileName' prepend-icon='attach_file'></v-text-field>
@@ -576,20 +577,15 @@ export default {
576577
'nameID': this.fileName,
577578
})
578579
579-
const config = {
580-
headers: { 'Content-Type': 'multipart/form-data' },
581-
onUploadProgress: progressEvent => {
582-
this.counter = Math.floor((progressEvent.loaded * 100) / progressEvent.total);
583-
}
584-
}
580+
this.$axios.post(this.CB + '/updatePackages', this.formdata).then(function(result) {
581+
585582
this.updateStatus = 1
586583
587-
this.$axios.post(this.CB + '/updatePackages', this.formdata).then(function(result) {
588584
this.uploadCompleted = true;
589585
this.uploadInProgress = false;
590586
console.dir(result.data);
591587
592-
this.updateStatusText = 'Upload completato. Riavvio in corso.'
588+
this.updateStatusText = 'Pacchetto installato. Clicca "AGGIORNA" per visualizzare le modifiche.'
593589
594590
}.bind(this))
595591

0 commit comments

Comments
 (0)