diff --git a/src/components/TableActionCells/InstanceActionCells.tsx b/src/components/TableActionCells/InstanceActionCells.tsx
index 6f3a85f5..65424898 100644
--- a/src/components/TableActionCells/InstanceActionCells.tsx
+++ b/src/components/TableActionCells/InstanceActionCells.tsx
@@ -1,13 +1,8 @@
-import {
- envCreateInstance,
- envOnPremiseFleet,
- envOnPremiseRobot,
-} from "../../helpers/envProvider";
+import { envCreateInstance } from "../../helpers/envProvider";
import ChangeStateInstanceModal from "../../modals/ChangeStateInstanceModal";
import TerminateInstanceModal from "../../modals/TerminateInstanceModal";
-import { BiTrash, BiStopCircle, BiPlayCircle } from "react-icons/bi";
-import { Fragment, ReactElement, useEffect, useState } from "react";
-import Button from "../Button/Button";
+import { Fragment, ReactElement, useState } from "react";
+import TableActionButtons from "../TableActionButtons/TableActionButtons";
interface IInstanceActionCells {
data: any;
reload: () => void;
@@ -21,88 +16,20 @@ export default function InstanceActionCells({
useState
(false);
const [isTerminateModalVisible, setIsTerminateModalVisible] =
useState(false);
- const [isApplicationMode, setIsApplicationMode] = useState(false);
-
- useEffect(() => {
- setIsApplicationMode(envOnPremiseRobot || envOnPremiseFleet);
- }, []);
return (
-
-
- ) : data?.state === "stopped" ? (
-
- ) : (
-
- )
- }
- disabled={
- isApplicationMode ||
- data?.state === "running" ||
- data?.state === "stopped"
- ? false
- : true || !envCreateInstance
- }
- onClick={
- data?.state === "running" || data?.state === "stopped"
- ? () => setIsChangeStateModalVisible(true)
- : () => {}
- }
- />
-
- ) : (
-
- )
- }
- disabled={!envCreateInstance}
- onClick={() => setIsTerminateModalVisible(true)}
- />
-
+ setIsTerminateModalVisible(true)}
+ />
+
{isChangeStateModalVisible && (
setIsChangeStateModalVisible(false)}
- visibleModal={isChangeStateModalVisible}
/>
)}
{isTerminateModalVisible && (
@@ -110,7 +37,6 @@ export default function InstanceActionCells({
data={data}
reload={reload}
handleCloseModal={() => setIsTerminateModalVisible(false)}
- visibleModal={isTerminateModalVisible}
/>
)}
diff --git a/src/controllers/RegionTableData.tsx b/src/controllers/RegionTableData.tsx
index fc186970..9027210c 100644
--- a/src/controllers/RegionTableData.tsx
+++ b/src/controllers/RegionTableData.tsx
@@ -100,11 +100,6 @@ export function RegionTableData() {
);
}
- console.log(
- "res",
- responseInstances?.[0]?.cloudInstanceResource?.networkUsage?.[0],
- );
-
const data: IInstanceDashboardData[] = useMemo(
() =>
responseInstances?.map((instance: IInstance) => {
@@ -122,7 +117,7 @@ export function RegionTableData() {
),
architecture: instance?.cloudInstanceResource?.architecture,
OSResources: `${instance?.cloudInstanceResource?.operatingSystemDistro}
- (${instance?.cloudInstanceResource?.operatingSystem}})
+ (${instance?.cloudInstanceResource?.operatingSystem})
`,
kernel: instance?.cloudInstanceResource?.kernelVersion,
k8s: instance?.cloudInstanceResource?.kubernetesVersion,
@@ -179,7 +174,14 @@ export function RegionTableData() {
[pagesState, responseInstances],
);
- const columns: any = useMemo(
+ const columns: {
+ key: string;
+ header: string;
+ sortable?: boolean;
+ filter?: boolean;
+ align: "left" | "right" | "center";
+ body?: (rowData: any) => JSX.Element;
+ }[] = useMemo(
() => [
{
key: "name",
@@ -210,7 +212,7 @@ export function RegionTableData() {
filter: false,
align: "left",
body: (rowData: { organization: string }) => {
- return ;
+ return ;
},
},
{
@@ -230,6 +232,7 @@ export function RegionTableData() {
filter: false,
align: "left",
body: (rowData: { OSResources: string }) => {
+ console.log("x", rowData?.OSResources);
return ;
},
},
@@ -293,12 +296,12 @@ export function RegionTableData() {
return (
setReload((prevState: boolean) => !prevState)}
/>
diff --git a/src/modals/ChangeStateInstanceModal.tsx b/src/modals/ChangeStateInstanceModal.tsx
index 2a0a29c2..afeb9d20 100644
--- a/src/modals/ChangeStateInstanceModal.tsx
+++ b/src/modals/ChangeStateInstanceModal.tsx
@@ -7,14 +7,12 @@ import { startInstance, stopInstance } from "../toolkit/InstanceSlice";
interface IChangeInstanceModal {
data: any;
reload: () => void;
- visibleModal: boolean;
handleCloseModal: () => void;
}
export default function ChangeInstanceModal({
data,
reload,
- visibleModal,
handleCloseModal,
}: IChangeInstanceModal): ReactElement {
const [isLoading, setIsLoading] = useState(false);
@@ -51,7 +49,7 @@ export default function ChangeInstanceModal({
return (