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
- Are you sure you want to restore the CoderBot?
92
- <br >
93
- <h3 ><b >Every saved file will be lost</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
- Cancel
104
- </v-btn >
105
- <v-btn
106
- color =" error"
107
- @click =" restore" >
108
- <b >Restore</b >
109
- </v-btn >
110
- </v-card-actions >
111
- </v-card >
112
- </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 >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 >
113
99
<!--
114
100
<v-btn color="warning">Aggiorna</v-btn>
115
101
<v-btn color="error">Ripristina ad Impostazioni di fabbrica</v-btn> -->
119
105
<h3 class =" text-xs-left" > Reset Logs </h3 >
120
106
<v-card >
121
107
<div class =" cardContent" >
122
- <div v-for =" value in cb.logs.log" >
123
- {{ value }}
124
- </div >
108
+ <div v-for =" value in cb.logs.log" >
109
+ {{ value }}
110
+ </div >
125
111
</div >
126
112
</v-card >
127
113
<br >
@@ -332,20 +318,20 @@ export default {
332
318
this .prepopulate ()
333
319
}.bind (this ))
334
320
},
335
- restore () {
336
- let axios = this .$axios
337
- let CB = this .CB
338
- axios .post (CB + ' /reset' )
339
- .then (function (response ) {
321
+ restore () {
322
+ let axios = this .$axios
323
+ let CB = this .CB
324
+ axios .post (CB + ' /reset' )
325
+ .then (function (response ) {
340
326
this .snackText = ' Ripristino ad impostazioni di fabbrica \
341
327
Reboot in corso...'
342
328
this .snackbar = true
343
329
this .prepopulate ()
344
- setTimeout (() => $ (dialog).close (), 5000 )
345
- this .dialog = false
330
+ setTimeout (() => $ (dialog).close (), 5000 )
331
+ this .dialog = false
346
332
}.bind (this ))
347
- },
348
-
333
+ },
334
+
349
335
shutdown () {
350
336
let axios = this .$axios
351
337
let CBv1 = this .CBv1
@@ -372,7 +358,7 @@ export default {
372
358
axios .get (this .CB + ' /status' )
373
359
.then (function (response ) {
374
360
this .cb .status = response .data
375
- this .cb .logs .log = response .data .log
361
+ this .cb .logs .log = response .data .log
376
362
}.bind (this ))
377
363
axios .get (this .CB + ' /info' )
378
364
.then (function (response ) {
@@ -394,7 +380,7 @@ export default {
394
380
395
381
this .statusData = response .data
396
382
this .status = response .status
397
- this .cb .logs .log = response .data .log
383
+ this .cb .logs .log = response .data .log
398
384
}.bind (this ))
399
385
.catch (function (error ) {
400
386
// handle error
@@ -552,7 +538,7 @@ export default {
552
538
formdata: null ,
553
539
files: null ,
554
540
status: null ,
555
- dialog: false ,
541
+ dialog: false ,
556
542
lastCommit: process .env .lastCommit ,
557
543
CB : process .env .CB_ENDPOINT + process .env .APIv2 ,
558
544
CBv1: process .env .CB_ENDPOINT ,
@@ -613,9 +599,9 @@ export default {
613
599
vueVersion: null ,
614
600
kernel: null
615
601
},
616
- logs: {
617
- log: null
618
- }
602
+ logs: {
603
+ log: null
604
+ }
619
605
},
620
606
drawer: null ,
621
607
tab: null ,
0 commit comments