MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / request

Method request

html/js/network_ts.js:209–231  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

207 this.cmd = cmd;
208 }
209 request(data) {
210 if (SERVER_CONNECTION == true) {
211 return;
212 }
213 SERVER_CONNECTION = true;
214 console.log(data);
215 if (this.cmd != "updateLog") {
216 UNDO = new Object();
217 }
218 // Prepare the request data
219 data["cmd"] = this.cmd;
220 const requestData = JSON.stringify(data);
221 // Use existing WebSocket connection
222 if (globalWS && globalWS.readyState === WebSocket.OPEN) {
223 globalWS.send(requestData);
224 }
225 else {
226 // Initialize connection if not available
227 initWebSocket();
228 // Add to pending requests queue
229 pendingRequests.push({ cmd: this.cmd, data: data });
230 }
231 }
232}
233// Initialize WebSocket connection when the page loads
234document.addEventListener('DOMContentLoaded', function () {

Callers 10

PageReadyFunction · 0.95
savePopupDataFunction · 0.95
readyForConfigurationFunction · 0.95
saveWizardFunction · 0.95
resetLogsFunction · 0.95
backupFunction · 0.95
restoreFunction · 0.95
uploadLogoFunction · 0.95
probeChannelFunction · 0.95
saveSettingsFunction · 0.95

Calls 1

initWebSocketFunction · 0.70

Tested by

no test coverage detected