Skip to content

Commit

Permalink
feat(version): release 0.34.0 version
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Feb 12, 2024
1 parent 5d873c8 commit a787dd2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 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.33.9",
"version": "0.34.0",
"private": true,
"scripts": {
"dev": "GENERATE_SOURCEMAP=false react-scripts start",
Expand Down
4 changes: 2 additions & 2 deletions src/components/CFStep0/CFStep0.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function CFStep0(): ReactElement {
category: "private",
template: undefined,
});
const { getTemplates } = useFunctions();
const { getTemplatesFC } = useFunctions();
const [isLoading, setIsLoading] = useState<boolean>(false);

useEffect(() => {
Expand Down Expand Up @@ -47,7 +47,7 @@ export default function CFStep0(): ReactElement {
const { handleCreateRobotNextStep } = useMain();

async function handleGetTemplates() {
setTemplates(await getTemplates());
setTemplates(await getTemplatesFC());
}

const box = (template: ITemplate) => {
Expand Down
18 changes: 9 additions & 9 deletions src/components/CreateForms/CFAppStep1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,18 @@ export default function CFAppStep1({
)}
</Fragment>

<Fragment>
<CFSection>
<CFSharing formik={formik} />
<Seperator />
</CFSection>
</Fragment>
<CFSection>
<CFSharing formik={formik} />
<Seperator />
</CFSection>

<CFAdvancedSettings formik={formik} disabled={isImportRobot} />
<CFSection>
<CFAdvancedSettings formik={formik} disabled={isImportRobot} />
</CFSection>

<Fragment>
<CFSection>
<CFStep1AppButtons isImportRobot={isImportRobot} />
</Fragment>
</CFSection>
</CFLoader>
);
}
2 changes: 1 addition & 1 deletion src/components/WidgetGPUCell/WidgetGPUCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function WidgetGPUCell(): ReactElement {
{pagesState?.instance?.resources?.hardware?.gpu?.hardware?.map(
(gpu, index: number) => {
return (
<option value={index}>
<option key={index} value={index}>
GPU {index + 1} {gpu?.model}
</option>
);
Expand Down
7 changes: 4 additions & 3 deletions src/contexts/FunctionsContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ import {
import { IPhysicalInstance } from "../interfaces/global/physicalInstance.interface";
import { dataScienceAppsMapper } from "../handler/dataScience.handler";
import { IDataScienceApp } from "../interfaces/global/dataSciende.interface";
import { ITemplate } from "../interfaces/global/template.interface";

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

Expand Down Expand Up @@ -862,8 +863,8 @@ export default ({ children }: any) => {
});
}

async function getTemplates(): Promise<any> {
return new Promise<any>(async (resolve, reject) => {
async function getTemplatesFC(): Promise<ITemplate[]> {
return new Promise<ITemplate[]>(async (resolve, reject) => {
try {
const response: any = await dispatch(
getTemplatesDispatch({
Expand Down Expand Up @@ -1511,6 +1512,7 @@ export default ({ children }: any) => {
deleteRobotFC,
//// Tools ////
getSystemStatusFC,
getTemplatesFC,
getFreePortFC,
////
////
Expand All @@ -1530,7 +1532,6 @@ export default ({ children }: any) => {

getIP,
getFilesFromFileManager,
getTemplates,
}}
>
{children}
Expand Down
5 changes: 2 additions & 3 deletions src/interfaces/hook/functions.hook.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { INamespace } from "../global/namespace.interface";
import { ISystemStatus } from "../global/system.interface";
import { IRegion } from "../global/region.interface";
import { IFleet } from "../global/fleet.interface";
import { ITemplate } from "../global/template.interface";

export interface IsingleGetParameters {
isSetState?: boolean;
Expand Down Expand Up @@ -162,12 +163,12 @@ export interface IuseFunctions {
deleteRobotFC: (robotName: string) => Promise<void>;
//// Tools ////
getSystemStatusFC: () => Promise<ISystemStatus>;
getTemplatesFC: () => Promise<ITemplate[]>;
getFreePortFC: () => Promise<number | undefined>;
////
////
////
////

getPhysicalFleet: (
values: IgetPhysicalFleet,
parameters?: IsingleGetParameters,
Expand All @@ -186,6 +187,4 @@ export interface IuseFunctions {
instanceIP: string;
paths?: string[];
}) => Promise<any>;

getTemplates: () => Promise<any>;
}

0 comments on commit a787dd2

Please sign in to comment.