formbuilder fix
This commit is contained in:
parent
2b8d0fa88b
commit
f11dfa7e57
8 changed files with 113 additions and 104 deletions
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"cSpell.words": ["Ведите"]
|
"cSpell.words": [
|
||||||
|
"Ведите",
|
||||||
|
"typedataset"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,15 +6,15 @@ import { MongoIdValidation } from "../../../core/validations/mongo_id_validation
|
||||||
import { DatasetDBModel } from "../models/dataset_database_model";
|
import { DatasetDBModel } from "../models/dataset_database_model";
|
||||||
import { IDatasetModel } from "../models/dataset_validation_model";
|
import { IDatasetModel } from "../models/dataset_validation_model";
|
||||||
import { ProcessWatcherAndDatabaseUpdateService } from "./create_dataset_scenario";
|
import { ProcessWatcherAndDatabaseUpdateService } from "./create_dataset_scenario";
|
||||||
|
|
||||||
export class ExecDatasetProcessScenario extends CallbackStrategyWithIdQuery {
|
export class ExecDatasetProcessScenario extends CallbackStrategyWithIdQuery {
|
||||||
idValidationExpression = new MongoIdValidation();
|
idValidationExpression = new MongoIdValidation();
|
||||||
|
|
||||||
call = async (id: string): ResponseBase => {
|
call = async (id: string): ResponseBase => {
|
||||||
return (await new ReadByIdDataBaseModelUseCase<IDatasetModel>(DatasetDBModel).call(id)).map(async (model) => {
|
return (await new ReadByIdDataBaseModelUseCase<IDatasetModel>(DatasetDBModel).call(id)).map(async (model) => {
|
||||||
return (await new IsHaveActiveProcessUseCase().call()).map(async () => {
|
return (await new IsHaveActiveProcessUseCase().call()).map(async () => {
|
||||||
await DatasetDBModel.findById(id).updateOne({processStatus:"RUN"})
|
await DatasetDBModel.findById(id).updateOne({ processStatus: "RUN" });
|
||||||
return new ExecProcessUseCase().call(
|
return new ExecProcessUseCase().call(
|
||||||
`${model.project.rootDir}/`,
|
`${model.project.rootDir}/`,
|
||||||
`python3 $PYTHON_BLENDER_PROC --path '${model.project.rootDir}/${model.name}/'`,
|
`python3 $PYTHON_BLENDER_PROC --path '${model.project.rootDir}/${model.name}/'`,
|
||||||
id,
|
id,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { InputBuilderViewModel, InputType } from "./form_view_model";
|
import { FormViewModel, InputBuilderViewModel, InputType } from "./form_view_model";
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
import { FormBuilderStore } from "./form_builder_store";
|
import { FormBuilderStore } from "./form_builder_store";
|
||||||
import { FormBuilderValidationModel } from "../../../features/dataset/dataset_model";
|
import { FormBuilderValidationModel } from "../../../features/dataset/dataset_model";
|
||||||
|
@ -9,8 +9,7 @@ import { Icon } from "../icons/icons";
|
||||||
import { CoreText, CoreTextType } from "../text/text";
|
import { CoreText, CoreTextType } from "../text/text";
|
||||||
|
|
||||||
export interface IFormBuilder {
|
export interface IFormBuilder {
|
||||||
context: string;
|
formBuilder: FormBuilderValidationModel;
|
||||||
result: string;
|
|
||||||
onChange: (change: FormBuilderValidationModel) => void;
|
onChange: (change: FormBuilderValidationModel) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,11 +17,19 @@ export const FormBuilder = observer((props: IFormBuilder) => {
|
||||||
const [store] = React.useState(() => new FormBuilderStore());
|
const [store] = React.useState(() => new FormBuilderStore());
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
store.init(props.context, props.result);
|
store.init(props.formBuilder.context, props.formBuilder.result);
|
||||||
|
if (props.formBuilder.form.isNotEmpty()) {
|
||||||
|
store.formViewModel = new FormViewModel(
|
||||||
|
props.formBuilder.form.map((el) => InputBuilderViewModel.fromJSON(el)),
|
||||||
|
props.formBuilder.context,
|
||||||
|
props.formBuilder.result
|
||||||
|
);
|
||||||
|
console.log(props.formBuilder.form.map((el) => InputBuilderViewModel.fromJSON(el)));
|
||||||
|
}
|
||||||
store.changerForm.on((event) => {
|
store.changerForm.on((event) => {
|
||||||
if (event) props.onChange(event);
|
if (event) props.onChange(event);
|
||||||
});
|
});
|
||||||
}, [store, props]);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
@ -105,7 +112,7 @@ export const FormBuilder = observer((props: IFormBuilder) => {
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
error="только числа"
|
error="только числа"
|
||||||
value={subSubArrayItem.defaultValue}
|
value={subSubArrayItem.totalValue ?? subSubArrayItem.defaultValue}
|
||||||
label={subSubArrayItem.name}
|
label={subSubArrayItem.name}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -131,7 +138,7 @@ export const FormBuilder = observer((props: IFormBuilder) => {
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
store.changeTotalValue(element.id, e);
|
store.changeTotalValue(element.id, e);
|
||||||
}}
|
}}
|
||||||
value={element.defaultValue}
|
value={element.totalValue ?? element.defaultValue}
|
||||||
error="только числа"
|
error="только числа"
|
||||||
label={element.name}
|
label={element.name}
|
||||||
style={{ margin: 20 }}
|
style={{ margin: 20 }}
|
||||||
|
|
|
@ -40,7 +40,7 @@ export class FormBuilderStore {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(this.formViewModel?.fromFormBuilderValidationModel());
|
this.changerForm.emit(this.formViewModel?.fromFormBuilderValidationModel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,10 +72,6 @@ export class FormBuilderStore {
|
||||||
this.changerForm.emit(this.formViewModel?.fromFormBuilderValidationModel());
|
this.changerForm.emit(this.formViewModel?.fromFormBuilderValidationModel());
|
||||||
}
|
}
|
||||||
|
|
||||||
saveForm(): void {
|
|
||||||
console.log(this.formViewModel?.toResult());
|
|
||||||
}
|
|
||||||
|
|
||||||
open = (id: string) => {
|
open = (id: string) => {
|
||||||
if (this.formViewModel)
|
if (this.formViewModel)
|
||||||
this.formViewModel.inputs = this.formViewModel?.inputs.map((el) => {
|
this.formViewModel.inputs = this.formViewModel?.inputs.map((el) => {
|
||||||
|
|
|
@ -19,15 +19,33 @@ export class InputBuilderViewModel {
|
||||||
public values: string[] | undefined | InputBuilderViewModel[] = undefined,
|
public values: string[] | undefined | InputBuilderViewModel[] = undefined,
|
||||||
public totalValue: any | undefined = undefined,
|
public totalValue: any | undefined = undefined,
|
||||||
public isOpen: boolean = false,
|
public isOpen: boolean = false,
|
||||||
public subType: string | undefined = undefined
|
public subType: string | undefined = undefined,
|
||||||
|
id: string | undefined = undefined
|
||||||
) {
|
) {
|
||||||
this.id = uuidv4();
|
this.id = id ?? uuidv4();
|
||||||
}
|
}
|
||||||
static fromJSON(json: any) {
|
static fromJSON(json: any) {
|
||||||
return new InputBuilderViewModel(json.name, json.type, json.defaultValue, json.values, json.isOpen, json.id);
|
try {
|
||||||
|
const value = JSON.parse(json);
|
||||||
|
return new InputBuilderViewModel(
|
||||||
|
value.name,
|
||||||
|
value.type,
|
||||||
|
value.defaultValue,
|
||||||
|
value.values,
|
||||||
|
value.totalValue,
|
||||||
|
value.isOpen,
|
||||||
|
value.subType,
|
||||||
|
value.id
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
console.log("InputBuilderViewModel.fromJSON(): " + json);
|
||||||
|
throw new Error("InputBuilderViewModel.fromJSON");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public toJson(): string {
|
public toJson(): string {
|
||||||
try {
|
try {
|
||||||
|
console.log(this.id);
|
||||||
|
console.log(this.totalValue);
|
||||||
return JSON.stringify(this);
|
return JSON.stringify(this);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("InputBuilderViewModel.toJson(): " + this.id);
|
console.log("InputBuilderViewModel.toJson(): " + this.id);
|
||||||
|
@ -54,8 +72,13 @@ export class FormViewModel {
|
||||||
this.inputs = inputs;
|
this.inputs = inputs;
|
||||||
makeAutoObservable(this);
|
makeAutoObservable(this);
|
||||||
}
|
}
|
||||||
public json(){
|
public json() {
|
||||||
return JSON.parse(this.toResult().replaceAll("\n", "").replaceAll("\\", "").replaceAll("/", ""))
|
const result = this.toResult();
|
||||||
|
try {
|
||||||
|
return JSON.parse(result).replaceAll("\n", "").replaceAll("\\", "").replaceAll("/", "");
|
||||||
|
} catch (error) {
|
||||||
|
console.log(result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public fromFormBuilderValidationModel() {
|
public fromFormBuilderValidationModel() {
|
||||||
return new FormBuilderValidationModel(
|
return new FormBuilderValidationModel(
|
||||||
|
@ -66,7 +89,7 @@ export class FormViewModel {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
public toResult(): string {
|
public toResult(): string {
|
||||||
let result = this.result;
|
let result = "";
|
||||||
|
|
||||||
this.inputs.forEach((element) => {
|
this.inputs.forEach((element) => {
|
||||||
let inputResult = element.totalValue ?? element.defaultValue;
|
let inputResult = element.totalValue ?? element.defaultValue;
|
||||||
|
@ -81,25 +104,26 @@ export class FormViewModel {
|
||||||
inputResult = "[]";
|
inputResult = "[]";
|
||||||
} else {
|
} else {
|
||||||
inputResult = [];
|
inputResult = [];
|
||||||
// @ts-ignore
|
if (element.totalValue instanceof Array) {
|
||||||
element.totalValue.forEach((el) => {
|
element.totalValue.forEach((el) => {
|
||||||
const objectUnion = {};
|
const objectUnion = {};
|
||||||
if (el instanceof Array)
|
if (el instanceof Array)
|
||||||
el.forEach((subElement) => {
|
el.forEach((subElement) => {
|
||||||
let subResult = subElement.totalValue ?? subElement.defaultValue;
|
let subResult = subElement.totalValue ?? subElement.defaultValue;
|
||||||
if (element.type.isEqualMany([InputType.STRING, InputType.ENUM])) {
|
if (element.type.isEqualMany([InputType.STRING, InputType.ENUM])) {
|
||||||
subResult = `"${String(subResult)}"`;
|
subResult = `"${String(subResult)}"`;
|
||||||
}
|
}
|
||||||
if (element.type.isEqual(InputType.NUMBER)) {
|
if (element.type.isEqual(InputType.NUMBER)) {
|
||||||
subResult = Number(subResult);
|
subResult = Number(subResult);
|
||||||
}
|
}
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
objectUnion[subElement.name] = subResult;
|
objectUnion[subElement.name] = subResult;
|
||||||
});
|
});
|
||||||
if (Object.keys(objectUnion).length !== 0) {
|
if (Object.keys(objectUnion).length !== 0) {
|
||||||
inputResult.push(objectUnion);
|
inputResult.push(objectUnion);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (inputResult instanceof Array) inputResult = JSON.stringify(inputResult);
|
if (inputResult instanceof Array) inputResult = JSON.stringify(inputResult);
|
||||||
|
|
|
@ -15,7 +15,7 @@ export interface IDatasetModel {
|
||||||
processStatus: ProcessStatus;
|
processStatus: ProcessStatus;
|
||||||
projectId: string;
|
projectId: string;
|
||||||
name: string;
|
name: string;
|
||||||
formBuilder: FormBuilder;
|
formBuilder: FormBuilderValidationModel;
|
||||||
unixTime: number;
|
unixTime: number;
|
||||||
datasetType: string;
|
datasetType: string;
|
||||||
local_path: string;
|
local_path: string;
|
||||||
|
@ -28,13 +28,7 @@ export interface Dataset {
|
||||||
local_path: string;
|
local_path: string;
|
||||||
dataSetObjects: string[];
|
dataSetObjects: string[];
|
||||||
unixDate: number;
|
unixDate: number;
|
||||||
formBuilder: FormBuilder;
|
formBuilder: FormBuilderValidationModel;
|
||||||
}
|
|
||||||
|
|
||||||
export interface FormBuilder {
|
|
||||||
result: string;
|
|
||||||
context: string;
|
|
||||||
form: InputBuilderViewModel[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Assets {
|
export interface Assets {
|
||||||
|
@ -68,10 +62,16 @@ export class DataSetModel {
|
||||||
name: string;
|
name: string;
|
||||||
formBuilder: FormBuilderValidationModel = FormBuilderValidationModel.empty();
|
formBuilder: FormBuilderValidationModel = FormBuilderValidationModel.empty();
|
||||||
project?: string;
|
project?: string;
|
||||||
processStatus?:string
|
processStatus?: string;
|
||||||
isNew:boolean;
|
isNew: boolean;
|
||||||
_id?:string;
|
_id?: string;
|
||||||
constructor(dataSetObjects: string[], datasetType = datasetTypes[0], datasetName: string, isNew = true, id:string | undefined = undefined) {
|
constructor(
|
||||||
|
dataSetObjects: string[],
|
||||||
|
datasetType = datasetTypes[0],
|
||||||
|
datasetName: string,
|
||||||
|
isNew = true,
|
||||||
|
id: string | undefined = undefined
|
||||||
|
) {
|
||||||
this.dataSetObjects = dataSetObjects;
|
this.dataSetObjects = dataSetObjects;
|
||||||
this.datasetType = datasetType;
|
this.datasetType = datasetType;
|
||||||
this.name = datasetName;
|
this.name = datasetName;
|
||||||
|
@ -85,16 +85,12 @@ export class DataSetModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
isValid(): Result<string, void> {
|
isValid(): Result<string, void> {
|
||||||
|
|
||||||
if (this.project === undefined) {
|
if (this.project === undefined) {
|
||||||
return Result.error("project is unknow");
|
return Result.error("project is unknow");
|
||||||
}
|
}
|
||||||
if (this.dataSetObjects.isEmpty()) {
|
if (this.dataSetObjects.isEmpty()) {
|
||||||
return Result.error("Не выделены детали");
|
return Result.error("Не выделены детали");
|
||||||
}
|
}
|
||||||
if (this.datasetType.isEmpty()) {
|
|
||||||
return Result.error("Навык датасета не выбран");
|
|
||||||
}
|
|
||||||
if (this.name.isEmpty()) {
|
if (this.name.isEmpty()) {
|
||||||
return Result.error("ВВедите имя датасета");
|
return Result.error("ВВедите имя датасета");
|
||||||
}
|
}
|
||||||
|
@ -102,35 +98,37 @@ export class DataSetModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
static fromIDatasetModel(model: IDatasetModel) {
|
static fromIDatasetModel(model: IDatasetModel) {
|
||||||
return new DataSetModel(model.dataSetObjects, model.datasetType, model.name, false, model._id);
|
const dataSetModel = new DataSetModel(model.dataSetObjects, model.datasetType, model.name, false, model._id);
|
||||||
|
dataSetModel.formBuilder = model.formBuilder;
|
||||||
|
return dataSetModel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const datasetTypes = ["Object Detection - YOLOv8", "Pose Estimation - DOPE"];
|
export const datasetTypes = ["Object Detection - YOLOv8", "Pose Estimation - DOPE"];
|
||||||
|
|
||||||
export const datasetFormMockResult = `{
|
export const datasetFormMockResult = `{
|
||||||
"typedataset": \${typedataset:Enum<T>:ObjectDetection},
|
"typedataset": \${typedataset:Enum<T>:ObjectDetection},
|
||||||
"models_randomization":{
|
"models_randomization":{
|
||||||
"loc_range_low": [\${LOC_RANGE_LOW_1:number:-1}, \${LOC_RANGE_LOW_2:number:-1},/\${LOC_RANGE_LOW_3:number:0}],
|
"loc_range_low": [\${LOC_RANGE_LOW_1:number:-1}, \${LOC_RANGE_LOW_2:number:-1},/\${LOC_RANGE_LOW_3:number:0}],
|
||||||
"loc_range_high": [\${LOC_RANGE_HIGH_1:number:1}, \${LOC_RANGE_HIGH_2:number:1},/\${LOC_RANGE_HIGH_3:number:2}]
|
"loc_range_high": [\${LOC_RANGE_HIGH_1:number:1}, \${LOC_RANGE_HIGH_2:number:1},/\${LOC_RANGE_HIGH_3:number:2}]
|
||||||
},
|
},
|
||||||
"scene":{
|
"scene":{
|
||||||
"objects": \${OBJECTS_SCENE:Array<OBJECTS_SCENE>:[]},
|
"objects": \${OBJECTS_SCENE:Array<OBJECTS_SCENE>:[]},
|
||||||
"lights": \${LIGHTS:Array<LIGHTS>:[]}
|
"lights": \${LIGHTS:Array<LIGHTS>:[]}
|
||||||
},
|
},
|
||||||
"camera_position":{
|
"camera_position":{
|
||||||
"center_shell": [\${CENTER_SHELL_1:number:0}, \${CENTER_SHELL_2:number:0}, \${CENTER_SHELL_3:number:0}],
|
"center_shell": [\${CENTER_SHELL_1:number:0}, \${CENTER_SHELL_2:number:0}, \${CENTER_SHELL_3:number:0}],
|
||||||
"radius_range": [\${RADIUS_RANGE_1:number:1}, \${RADIUS_RANGE_2:number:1.4}],
|
"radius_range": [\${RADIUS_RANGE_1:number:1}, \${RADIUS_RANGE_2:number:1.4}],
|
||||||
"elevation_range": [\${ELEVATION_RANGE_1:number:10}, \${ELEVATION_RANGE_2:number:90}]
|
"elevation_range": [\${ELEVATION_RANGE_1:number:10}, \${ELEVATION_RANGE_2:number:90}]
|
||||||
},
|
},
|
||||||
"generation":{
|
"generation":{
|
||||||
"n_cam_pose": \${N_CAM_POSE:number:5},
|
"n_cam_pose": \${N_CAM_POSE:number:5},
|
||||||
"n_sample_on_pose": \${N_SAMPLE_ON_POSE:number:3},
|
"n_sample_on_pose": \${N_SAMPLE_ON_POSE:number:3},
|
||||||
"n_series": \${N_SERIES:number:100},
|
"n_series": \${N_SERIES:number:100},
|
||||||
"image_format": \${image_format:Enum<F>:jpg},
|
"image_format": \${image_format:Enum<F>:jpg},
|
||||||
"image_size_wh": [\${IMAGE_SIZE_WH_1:number:640}, \${IMAGE_SIZE_WH_2:number:480}]
|
"image_size_wh": [\${IMAGE_SIZE_WH_1:number:640}, \${IMAGE_SIZE_WH_2:number:480}]
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const datasetFormMockContext = `
|
export const datasetFormMockContext = `
|
||||||
|
|
|
@ -45,8 +45,8 @@ export const DataSetScreen: React.FunctionComponent = observer(() => {
|
||||||
objects={el.dataSetObjects}
|
objects={el.dataSetObjects}
|
||||||
unixDate={el.unixTime}
|
unixDate={el.unixTime}
|
||||||
processStatus={el.processStatus}
|
processStatus={el.processStatus}
|
||||||
neuralNetworkAction={el.datasetType.split(" - ").at(0)}
|
neuralNetworkAction={el.datasetType}
|
||||||
neuralNetworkName={el.datasetType.split(" - ").at(1)}
|
neuralNetworkName={el.name}
|
||||||
id={el._id}
|
id={el._id}
|
||||||
onClickButton={(id: string) => store.runProcess(id)}
|
onClickButton={(id: string) => store.runProcess(id)}
|
||||||
onDelete={(id: string) => store.deleteDataset(id)}
|
onDelete={(id: string) => store.deleteDataset(id)}
|
||||||
|
@ -67,8 +67,7 @@ export const DataSetScreen: React.FunctionComponent = observer(() => {
|
||||||
open={store.drawers.find((el) => el.name === DrawersDataset.FormBuilderDrawer)?.status ?? false}
|
open={store.drawers.find((el) => el.name === DrawersDataset.FormBuilderDrawer)?.status ?? false}
|
||||||
>
|
>
|
||||||
<FormBuilder
|
<FormBuilder
|
||||||
context={store.dataSetModel.formBuilder.context}
|
formBuilder={store.dataSetModel.formBuilder}
|
||||||
result={store.dataSetModel.formBuilder.result}
|
|
||||||
onChange={(el) => {
|
onChange={(el) => {
|
||||||
store.dataSetModel.formBuilder = el;
|
store.dataSetModel.formBuilder = el;
|
||||||
}}
|
}}
|
||||||
|
@ -94,26 +93,7 @@ export const DataSetScreen: React.FunctionComponent = observer(() => {
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<CoreInput value={store.dataSetModel.name} label={"Имя датасета"} onChange={(e) => store.setNewDatasetName(e)} />
|
<CoreInput value={store.dataSetModel.name} label={"Имя датасета"} onChange={(e) => store.setNewDatasetName(e)} />
|
||||||
<div>
|
|
||||||
<CoreText type={CoreTextType.header} text="Тип навыка" />
|
|
||||||
{datasetTypes.map((el) => {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
onClick={() => store.setSkillSelected(el)}
|
|
||||||
style={{
|
|
||||||
backgroundColor: store.skillIsSelected(el) ? "rgb(103 80 164)" : "rgba(254, 247, 255, 1)",
|
|
||||||
borderRadius: 25,
|
|
||||||
color: store.skillIsSelected(el) ? "white" : "",
|
|
||||||
margin: 10,
|
|
||||||
padding: 10,
|
|
||||||
cursor: "pointer",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{el}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
<div style={{ width: 180, marginTop: 10, marginBottom: 30 }}>
|
<div style={{ width: 180, marginTop: 10, marginBottom: 30 }}>
|
||||||
<CoreButton
|
<CoreButton
|
||||||
onClick={() => store.editDrawer(DrawersDataset.FormBuilderDrawer, true)}
|
onClick={() => store.editDrawer(DrawersDataset.FormBuilderDrawer, true)}
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { makeAutoObservable } from "mobx";
|
import { makeAutoObservable } from "mobx";
|
||||||
import { SocketRepository, socketRepository } from "../../core/repository/socket_repository";
|
import { SocketRepository, socketRepository } from "../../core/repository/socket_repository";
|
||||||
|
import { setTimeout } from "timers/promises";
|
||||||
|
|
||||||
class SocketListerStore {
|
class SocketListerStore {
|
||||||
repository: SocketRepository;
|
repository: SocketRepository;
|
||||||
socketHasDisconnect = false;
|
socketHasDisconnect = true;
|
||||||
|
|
||||||
constructor(repository: SocketRepository) {
|
constructor(repository: SocketRepository) {
|
||||||
this.repository = repository;
|
this.repository = repository;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue