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
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 >
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 >CoderBot - Restore</h3 >
81
+ </v-card-title >
82
+ <v-card-text >
83
+ Sei sicuro di voler ripristinare il CoderBot?
84
+ <br >
85
+ <h3 ><b >Tutti i file salvati verranno cancellati</b ></h3 >
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
+ Esci
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 >
99
+ <!-- Logs -->
100
+ <v-dialog v-model =" dialog_logs" width =" 700" >
101
+ <v-btn slot =" activator" color =" warning" dark >
102
+ <v-icon >fas fa-file-signature</v-icon > Show logs
103
+ </v-btn >
104
+ <v-card >
105
+ <v-card-title class =" headline grey lighten-2" primary-title >
106
+ <h3 >CoderBot - Logs</h3 >
107
+ </v-card-title >
108
+ <div class =" cardContent" >
109
+ <div v-for =" value in cb.logs.log" >
110
+ {{ value }}
111
+ </div >
112
+ </div >
113
+ <v-divider ></v-divider >
114
+ <v-card-actions >
115
+ <v-spacer ></v-spacer >
116
+ <v-btn color =" primary" @click =" dialog_logs = false" >
117
+ Esci
118
+ </v-btn >
119
+ </v-card-actions >
120
+ </v-card >
121
+ </v-dialog >
148
122
<!--
149
123
<v-btn color="warning">Aggiorna</v-btn>
150
124
<v-btn color="error">Ripristina ad Impostazioni di fabbrica</v-btn> -->
@@ -358,20 +332,20 @@ export default {
358
332
this .prepopulate ()
359
333
}.bind (this ))
360
334
},
361
- restore () {
362
- let axios = this .$axios
363
- let CB = this .CB
364
- axios .post (CB + ' /reset' )
365
- .then (function (response ) {
335
+ restore () {
336
+ let axios = this .$axios
337
+ let CB = this .CB
338
+ axios .post (CB + ' /reset' )
339
+ .then (function (response ) {
366
340
this .snackText = ' Ripristino ad impostazioni di fabbrica \
367
341
Reboot in corso...'
368
342
this .snackbar = true
369
343
this .prepopulate ()
370
- setTimeout (() => $ (dialog).close (), 5000 )
371
- this .dialog = false
344
+ setTimeout (() => $ (dialog).close (), 5000 )
345
+ this .dialog = false
372
346
}.bind (this ))
373
- },
374
-
347
+ },
348
+
375
349
shutdown () {
376
350
let axios = this .$axios
377
351
let CBv1 = this .CBv1
@@ -398,7 +372,7 @@ export default {
398
372
axios .get (this .CB + ' /status' )
399
373
.then (function (response ) {
400
374
this .cb .status = response .data
401
- this .cb .logs .log = response .data .log
375
+ this .cb .logs .log = response .data .log
402
376
}.bind (this ))
403
377
axios .get (this .CB + ' /info' )
404
378
.then (function (response ) {
@@ -420,7 +394,7 @@ export default {
420
394
421
395
this .statusData = response .data
422
396
this .status = response .status
423
- this .cb .logs .log = response .data .log
397
+ this .cb .logs .log = response .data .log
424
398
}.bind (this ))
425
399
.catch (function (error ) {
426
400
// handle error
@@ -578,7 +552,8 @@ export default {
578
552
formdata: null ,
579
553
files: null ,
580
554
status: null ,
581
- dialog: false ,
555
+ dialog: false ,
556
+ dialog_logs: false ,
582
557
lastCommit: process .env .lastCommit ,
583
558
CB : process .env .CB_ENDPOINT + process .env .APIv2 ,
584
559
CBv1: process .env .CB_ENDPOINT ,
@@ -639,9 +614,9 @@ export default {
639
614
vueVersion: null ,
640
615
kernel: null
641
616
},
642
- logs: {
643
- log: null
644
- }
617
+ logs: {
618
+ log: null
619
+ }
645
620
},
646
621
drawer: null ,
647
622
tab: null ,
0 commit comments