3434 <div class =" title" >Cert Expired</div >
3535 <div class =" value" >{{ statusData.cert_expired ? 'Yes' : 'No' }}</div >
3636 </div >
37+ <div class =" status-item" >
38+ <div class =" title" >Celery Queue Length</div >
39+ <div class =" value" >{{ statusData.celery_queue_len }}</div >
40+ </div >
41+ <div class =" status-item" >
42+ <div class =" title" >Celery Queue Health</div >
43+ <div class =" value" >{{ statusData.celery_queue_health }}</div >
44+ </div >
45+ <div class =" status-item" >
46+ <div class =" title" >NATS STD Ping</div >
47+ <div class =" value" >{{ statusData.nats_std_ping ? 'Healthy' : 'Unhealthy' }}</div >
48+ </div >
49+ <div class =" status-item" >
50+ <div class =" title" >NATS WS Ping</div >
51+ <div class =" value" >{{ statusData.nats_ws_ping ? 'Healthy' : 'Unhealthy' }}</div >
52+ </div >
53+ <div class =" status-item" >
54+ <div class =" title" >Mesh Ping</div >
55+ <div class =" value" >{{ statusData.mesh_ping ? 'Healthy' : 'Unhealthy' }}</div >
56+ </div >
3757 <div class =" status-item services" >
3858 <div class =" title" >Services Running</div >
3959 <div class =" services-list" >
6181</template >
6282
6383<script >
64- import request from ' @/utils/request' ;
6584import WidgetMixin from ' @/mixins/WidgetMixin' ;
66- import { serviceEndpoints } from ' @/utils/defaults' ;
6785
6886export default {
6987 mixins: [WidgetMixin],
70- props: {
71- options: {
72- type: Object ,
73- default : () => ({}),
74- },
75- },
7688 data () {
7789 return {
7890 statusData: null ,
@@ -95,50 +107,27 @@ export default {
95107 },
96108 authHeaders () {
97109 return {
110+ ' X-MON-TOKEN' : this .token ,
98111 ' Content-Type' : ' application/json' ,
99112 };
100113 },
101- proxyReqEndpoint () {
102- const baseUrl = process .env .VUE_APP_DOMAIN || window .location .origin ;
103- return ` ${ baseUrl}${ serviceEndpoints .corsProxy } ` ;
104- },
105114 },
106115 methods: {
107116 update () {
108117 this .startLoading ();
109118 this .fetchData ();
110119 },
111120 fetchData () {
112- const {
113- authHeaders , url , token , proxyReqEndpoint ,
114- } = this ;
115-
121+ const { authHeaders , url , token } = this ;
116122 if (! this .optionsValid ({ url, token })) {
117123 return ;
118124 }
119-
120- const targetURL = url;
121- const customHeaders = JSON .stringify (authHeaders);
122-
123- request .post (
124- proxyReqEndpoint,
125- { auth: token },
126- {
127- headers: {
128- ' Target-URL' : targetURL,
129- CustomHeaders: customHeaders,
130- ' Content-Type' : ' application/json' ,
131- },
132- },
133- )
125+ this .makeRequest (url, authHeaders)
134126 .then ((response ) => {
135- this .processData (response . data );
127+ this .processData (response);
136128 })
137129 .catch (() => {
138130 this .errorMessage = ' Failed to fetch data' ;
139- })
140- .finally (() => {
141- this .finishLoading ();
142131 });
143132 },
144133 processData (response ) {
0 commit comments