|
458 | 458 |
|
459 | 459 | <div v-for="pkgnames in settings.packagesInstalled">
|
460 | 460 | <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> |
462 | 462 | <v-icon>fas fa-trash</v-icon> Rimuovi
|
463 | 463 | </v-btn></span>
|
464 | 464 | </li>
|
465 | 465 | </ul>
|
466 | 466 | </div>
|
467 |
| - |
| 467 | + <br> |
468 | 468 | </v-card>
|
469 |
| - <h3 class="text-xs-left"> Aggiungi Pacchetto ssh with python</h3> |
| 469 | + <h3 class="text-xs-left"> Aggiungi Pacchetto </h3> |
470 | 470 | <v-card>
|
471 | 471 | <div class="cardContent">
|
472 | 472 | <template v-if="updateStatus==1">
|
473 |
| - Caricamento del file: |
474 |
| - <h3>{{ counter }} %</h3> |
| 473 | + <h3>File Caricato</h3> |
475 | 474 | <br>
|
476 | 475 | {{ updateStatusText }}
|
| 476 | + <v-btn @click="refresh" color="error">Aggiorna</v-btn> |
477 | 477 | </template>
|
478 | 478 | <template v-if="updateStatus==2">
|
| 479 | + Errore, pacchetto non installato. |
479 | 480 | </template>
|
480 | 481 | <template v-if="updateStatus==0">
|
481 | 482 | <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 {
|
576 | 577 | 'nameID': this.fileName,
|
577 | 578 | })
|
578 | 579 |
|
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 | +
|
585 | 582 | this.updateStatus = 1
|
586 | 583 |
|
587 |
| - this.$axios.post(this.CB + '/updatePackages', this.formdata).then(function(result) { |
588 | 584 | this.uploadCompleted = true;
|
589 | 585 | this.uploadInProgress = false;
|
590 | 586 | console.dir(result.data);
|
591 | 587 |
|
592 |
| - this.updateStatusText = 'Upload completato. Riavvio in corso.' |
| 588 | + this.updateStatusText = 'Pacchetto installato. Clicca "AGGIORNA" per visualizzare le modifiche.' |
593 | 589 |
|
594 | 590 | }.bind(this))
|
595 | 591 |
|
|
0 commit comments