149
149
Esegui Script
150
150
</CButton >
151
151
</div >
152
- <div class =" col-2" >
153
- <CButton
154
- shape =" square"
155
- size =" sm"
156
- color =" primary"
157
- @click =" runScript"
158
- >
159
- Attiva Rserver
160
- </CButton >
152
+ <div class =" col-2" v-if =" isRServeOn" >
153
+ <CBadge color =" success" >RSERVE Connesso</CBadge >
154
+ </div >
155
+ <div class =" col-2" v-else >
156
+ <CBadge color =" warning" >RSERVE non risponde</CBadge >
161
157
</div >
162
158
</div >
163
159
</CCardBody >
@@ -286,6 +282,7 @@ export default {
286
282
returnValueScript: " " ,
287
283
intervalId: null ,
288
284
intervalIdScriptRunning: null ,
285
+ rServerConnesso: false ,
289
286
btnLabel : () => " Elenco Province" ,
290
287
filters: [
291
288
{
@@ -326,7 +323,7 @@ export default {
326
323
... mapGetters (" tabella" , [" tabellaScript" ]),
327
324
... mapGetters (" elenco" , [" elencoScript" ]),
328
325
... mapGetters (" elenco" , [" lastScriptRunning" ]),
329
-
326
+ ... mapGetters ( " rServe " , [ " rResponse " ]),
330
327
province: {
331
328
get : function () {
332
329
return this .provinceScript ;
@@ -438,6 +435,9 @@ export default {
438
435
this .$store .dispatch (" elenco/findElencoByUser" );
439
436
clearInterval (this .intervalId );
440
437
},
438
+ isRServeOn () {
439
+ return this .rResponse == " ok" ? true : false ;
440
+ },
441
441
async verifyScriptRunning () {
442
442
console .log (" Verifica in Corso......" );
443
443
await this .$store .dispatch (" elenco/findScriptRunningByUser" );
@@ -547,6 +547,7 @@ export default {
547
547
? this .filterTopProvincia .denominazioneProvincia
548
548
: null
549
549
};
550
+ this .$store .dispatch (" rServe/getResponse" );
550
551
this .$store .dispatch (" coreui/setContext" , state);
551
552
this .$store .dispatch (" toponimo/clearTop" );
552
553
this .$store .dispatch (" toponimo/findByUserAndState" , state);
@@ -558,7 +559,6 @@ export default {
558
559
);
559
560
this .$store .dispatch (" elencoProvinceScript/findProvinceByScript" );
560
561
this .$store .dispatch (" archivio/findArchivioCodes" );
561
- // this.$store.dispatch("tabella/findTabellaByUser");
562
562
this .$store .dispatch (" elenco/findElencoByUser" );
563
563
this .sorterValue .column = parseInt (state) > 1 ? " dataMod" : null ;
564
564
}
0 commit comments