Skip to content

Commit

Permalink
[#51] Remove websockets
Browse files Browse the repository at this point in the history
  • Loading branch information
palagdan committed Oct 14, 2024
1 parent b2d3c29 commit e630cbb
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/components/dagre/Dagre.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { ICONS_MAP } from "./DagreIcons";
import ScriptFunctionSelection from "../ScriptFunctionSelection";
import { Button } from "react-bootstrap";
import ValidationReportModal from "../modal/ValidationReportModal";
import { w3cwebsocket as W3CWebSocket } from "websocket";
import MoveModuleModal from "../modal/MoveModuleModal";
import ScriptOntologyModal from "../modal/ScriptOntologyModal";
import ScriptExecutionModal from "../modal/ScriptExecutionModal";
Expand Down Expand Up @@ -58,10 +57,6 @@ const rankDirOptions = [
{ text: "TopBottom", key: "TB", value: "TB" },
];

const websocketURL = new URL("/rest/notifications", window.location.href);
websocketURL.protocol = websocketURL.protocol.replace("http", "ws");
const client = new W3CWebSocket(websocketURL);

const cyLayout = (rank) => {
return {
name: "dagre",
Expand Down Expand Up @@ -122,7 +117,6 @@ class Dagre extends React.Component {
cytoscape.use(navigator);
cytoscape.use(expandCollapse);
cytoscape.warnings(false);
this._keepAlive = this._keepAlive.bind(this);
this.renderCytoscapeElement = this.renderCytoscapeElement.bind(this);
this.handleRenderChange = this.handleRenderChange.bind(this);
this.handleValidateReport = this.handleValidateReport.bind(this);
Expand All @@ -142,16 +136,6 @@ class Dagre extends React.Component {
});
}

//prevent session timeout
_keepAlive(timeout = 20000) {
if (client.readyState === client.OPEN) {
client.send("");
}
setTimeout(() => {
this._keepAlive(20000);
}, timeout);
}

_addNode(n, newNodes, newGroups) {
if (n[GROUP] !== undefined) {
if (!newGroups.has(n[GROUP])) {
Expand Down

0 comments on commit e630cbb

Please sign in to comment.