Skip to content

Commit

Permalink
feat(version): release 0.25.4 version
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Dec 21, 2023
1 parent 0cff653 commit 4aa9d5d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui",
"version": "0.25.3",
"version": "0.25.4",
"private": true,
"scripts": {
"dev": "react-scripts start",
Expand Down
40 changes: 32 additions & 8 deletions src/contexts/RobotContext.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { useEffect, createContext, useState, useReducer } from "react";
import { IrobotTab } from "../interfaces/robotInterfaces";
import { envApplication } from "../helpers/envProvider";
import { envApplication, isProduction } from "../helpers/envProvider";
import useFunctions from "../hooks/useFunctions";
import { useParams } from "react-router-dom";
import useMain from "../hooks/useMain";
import ROSLIB from "roslib";
import axios, { AxiosResponse } from "axios";

export const RobotContext: any = createContext<any>(null);

Expand Down Expand Up @@ -305,13 +306,6 @@ export default ({ children }: any) => {
});
});

// vdiClient?.addEventListener("close", () => {
// dispatcher({
// type: "vdi",
// payload: false,
// });
// });

connectionsReducer?.vdi !== null && vdiClient && vdiClient.close();

return () => {
Expand All @@ -321,6 +315,36 @@ export default ({ children }: any) => {
}, [isSettedCookie, connectionsReducer?.vdi]);
// VDI Test Connection

// V-IDE Test Connection
useEffect(() => {
try {
if (isSettedCookie && isProduction) {
axios
.get(responseRobot?.ideIngressEndpoint + "healthz")
.then((response: AxiosResponse<any>) => {
console.log(response.data);
dispatcher({
type: "virtualIDE",
payload: true,
});
});
} else {
dispatcher({
type: "virtualIDE",
payload: false,
});
}
} catch (error) {
dispatcher({
type: "virtualIDE",
payload: false,
});
}

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isSettedCookie]);
// V-IDE Test Connection

function handleGetOrganization() {
getOrganization(
{
Expand Down

0 comments on commit 4aa9d5d

Please sign in to comment.