50
50
<v-card >
51
51
<div class =" cardContent" >
52
52
<div v-for =" (value, key, index) in cb.status" >
53
- <div v-if =" key != 'log'" >
54
- {{ key }}: <code >{{ value }}</code >
55
- </div >
53
+ <div v-if =" key != 'log'" >
54
+ {{ key }}: <code >{{ value }}</code >
55
+ </div >
56
56
</div >
57
57
<br >
58
58
</div >
70
70
<v-btn @click =" restoreConfig" color =" warning" >
71
71
<v-icon >fas fa-redo</v-icon > Ripristina Impostazioni
72
72
</v-btn >
73
- <!-- ** Restore button + dialog box** -->
74
- <v-dialog v-model =" dialog" width =" 500" >
75
- <v-btn slot =" activator" color =" error" dark >
76
- <v-icon >fas fa-wrench</v-icon > Ripristina ad impostazioni di fabbrica
77
- </v-btn >
78
- <v-card >
79
- <v-card-title class =" headline grey lighten-2" primary-title >
80
- <h3 >Ripristina impostazioni</h3 >
81
- </v-card-title >
82
- <v-card-text >
83
- Sei sicuro di voler ripristinare alle impostazioni di fabbrica?
84
- <br >
85
- <h4 ><b >TUTTI I DATI VERRANNO PERSI</b ></h4 >
86
- </v-card-text >
87
- <v-divider ></v-divider >
88
- <v-card-actions >
89
- <v-spacer ></v-spacer >
90
- <v-btn color =" primary" @click =" dialog = false" >
91
- Annulla
92
- </v-btn >
93
- <v-btn color =" error" @click =" restore" >
94
- <b >Ripristina</b >
95
- </v-btn >
96
- </v-card-actions >
97
- </v-card >
98
- </v-dialog >
73
+ <!-- ** Restore button + dialog box** -->
74
+ <v-dialog
75
+ v-model =" dialog"
76
+ width =" 500" >
77
+ <v-btn
78
+ slot =" activator"
79
+ color =" error" dark >
80
+ <v-icon >fas fa-wrench</v-icon > Ripristina ad impostazioni di fabbrica
81
+ </v-btn >
82
+
83
+ <v-card >
84
+ <v-card-title
85
+ class =" headline grey lighten-2"
86
+ primary-title >
87
+ <h3 >CoderBot - Restore</h3 >
88
+ </v-card-title >
89
+
90
+ <v-card-text >
91
+ Sei sicuro di voler ripristinare il CoderBot?
92
+ <br >
93
+ <h3 ><b >Tutti i file salvati verranno cancellati</b ></h3 >
94
+ </v-card-text >
95
+
96
+ <v-divider ></v-divider >
97
+
98
+ <v-card-actions >
99
+ <v-spacer ></v-spacer >
100
+ <v-btn
101
+ color =" primary"
102
+ @click =" dialog = false" >
103
+ Esci
104
+ </v-btn >
105
+ <v-btn
106
+ color =" error"
107
+ @click =" restore" >
108
+ <b >Ripristina</b >
109
+ </v-btn >
110
+ </v-card-actions >
111
+ </v-card >
112
+ </v-dialog >
113
+
114
+ <!-- Logs -->
115
+ <v-dialog
116
+ v-model =" dialog_logs"
117
+ width =" 700" >
118
+ <v-btn
119
+ slot =" activator"
120
+ color =" warning" dark >
121
+ <v-icon >fas fa-file-signature</v-icon > Show logs
122
+ </v-btn >
123
+
124
+ <v-card >
125
+ <v-card-title
126
+ class =" headline grey lighten-2"
127
+ primary-title >
128
+ <h3 >CoderBot - Logs</h3 >
129
+ </v-card-title >
130
+
131
+ <div class =" cardContent" >
132
+ <div v-for =" value in cb.logs.log" >
133
+ {{ value }}
134
+ </div >
135
+ </div >
136
+ <v-divider ></v-divider >
137
+
138
+ <v-card-actions >
139
+ <v-spacer ></v-spacer >
140
+ <v-btn
141
+ color =" primary"
142
+ @click =" dialog_logs = false" >
143
+ Esci
144
+ </v-btn >
145
+ </v-card-actions >
146
+ </v-card >
147
+ </v-dialog >
99
148
<!--
100
149
<v-btn color="warning">Aggiorna</v-btn>
101
150
<v-btn color="error">Ripristina ad Impostazioni di fabbrica</v-btn> -->
102
151
</div >
103
152
</v-card >
104
153
<br >
105
- <h3 class =" text-xs-left" > Reset Logs </h3 >
106
- <v-card >
107
- <div class =" cardContent" >
108
- <div v-for =" value in cb.logs.log" >
109
- {{ value }}
110
- </div >
111
- </div >
112
- </v-card >
113
- <br >
114
154
<h3 class =" text-xs-left" > Aggiornamento </h3 >
115
155
<v-card >
116
156
<div class =" cardContent" >
@@ -318,20 +358,20 @@ export default {
318
358
this .prepopulate ()
319
359
}.bind (this ))
320
360
},
321
- restore () {
322
- let axios = this .$axios
323
- let CB = this .CB
324
- axios .post (CB + ' /reset' )
325
- .then (function (response ) {
361
+ restore () {
362
+ let axios = this .$axios
363
+ let CB = this .CB
364
+ axios .post (CB + ' /reset' )
365
+ .then (function (response ) {
326
366
this .snackText = ' Ripristino ad impostazioni di fabbrica \
327
367
Reboot in corso...'
328
368
this .snackbar = true
329
369
this .prepopulate ()
330
- setTimeout (() => $ (dialog).close (), 5000 )
331
- this .dialog = false
370
+ setTimeout (() => $ (dialog).close (), 5000 )
371
+ this .dialog = false
332
372
}.bind (this ))
333
- },
334
-
373
+ },
374
+
335
375
shutdown () {
336
376
let axios = this .$axios
337
377
let CBv1 = this .CBv1
@@ -358,7 +398,7 @@ export default {
358
398
axios .get (this .CB + ' /status' )
359
399
.then (function (response ) {
360
400
this .cb .status = response .data
361
- this .cb .logs .log = response .data .log
401
+ this .cb .logs .log = response .data .log
362
402
}.bind (this ))
363
403
axios .get (this .CB + ' /info' )
364
404
.then (function (response ) {
@@ -380,7 +420,7 @@ export default {
380
420
381
421
this .statusData = response .data
382
422
this .status = response .status
383
- this .cb .logs .log = response .data .log
423
+ this .cb .logs .log = response .data .log
384
424
}.bind (this ))
385
425
.catch (function (error ) {
386
426
// handle error
@@ -538,7 +578,7 @@ export default {
538
578
formdata: null ,
539
579
files: null ,
540
580
status: null ,
541
- dialog: false ,
581
+ dialog: false ,
542
582
lastCommit: process .env .lastCommit ,
543
583
CB : process .env .CB_ENDPOINT + process .env .APIv2 ,
544
584
CBv1: process .env .CB_ENDPOINT ,
@@ -599,9 +639,9 @@ export default {
599
639
vueVersion: null ,
600
640
kernel: null
601
641
},
602
- logs: {
603
- log: null
604
- }
642
+ logs: {
643
+ log: null
644
+ }
605
645
},
606
646
drawer: null ,
607
647
tab: null ,
0 commit comments