progress
This commit is contained in:
parent
8ecb036b1d
commit
d70253d6a6
33 changed files with 201 additions and 81 deletions
|
@ -84,7 +84,6 @@ export class App {
|
|||
}
|
||||
|
||||
async appStartController() {
|
||||
console.log(App.staticFilesStoreDir());
|
||||
if (await dirIsExists(App.staticFilesStoreDir())) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ export class CrudController<V, D> extends CoreHttpController<V> {
|
|||
|
||||
constructor(routerModel: IRouteModel) {
|
||||
super(routerModel);
|
||||
this.url = "/" + routerModel.url;
|
||||
this.mainURL = "/" + routerModel.url;
|
||||
this.validationModel = routerModel.validationModel;
|
||||
this.dataBaseModel = routerModel.databaseModel;
|
||||
this.init();
|
||||
|
|
|
@ -3,16 +3,33 @@ import { Result } from "../helper/result";
|
|||
import { Router, Request, Response } from "express";
|
||||
import { IRouteModel, Routes } from "../interfaces/router";
|
||||
|
||||
export type CallBackFunction<T> = (a: T) => Promise<Result<any, any>>;
|
||||
type Method =
|
||||
| "all"
|
||||
| "get"
|
||||
| "post"
|
||||
| "put"
|
||||
| "delete"
|
||||
| "patch"
|
||||
| "options"
|
||||
| "head";
|
||||
|
||||
export type CallbackStrategyWithValidationModel<T> = (
|
||||
a: T
|
||||
) => Promise<Result<any, any>>;
|
||||
// TODO(IDOTSUDO):NEED IMPLEMENTS
|
||||
// interface ISubSetFeatureRouter<T>{
|
||||
// method:Method,
|
||||
// fn:CallbackStrategyWithValidationModel<T>
|
||||
// }
|
||||
|
||||
abstract class ICoreHttpController {
|
||||
abstract url: string;
|
||||
abstract mainURL: string;
|
||||
public router = Router();
|
||||
abstract call(): Routes;
|
||||
}
|
||||
|
||||
export class CoreHttpController<V> implements ICoreHttpController {
|
||||
url: string;
|
||||
mainURL: string;
|
||||
validationModel: any;
|
||||
|
||||
routes = {
|
||||
|
@ -25,35 +42,34 @@ export class CoreHttpController<V> implements ICoreHttpController {
|
|||
public router = Router();
|
||||
|
||||
constructor(routerModel: IRouteModel) {
|
||||
this.url = "/" + routerModel.url;
|
||||
this.mainURL = "/" + routerModel.url;
|
||||
this.validationModel = routerModel.validationModel;
|
||||
}
|
||||
|
||||
call(): Routes {
|
||||
if (this.routes["POST"] != null) {
|
||||
|
||||
this.router.post(
|
||||
this.url,
|
||||
this.mainURL,
|
||||
validationModelMiddleware(this.validationModel),
|
||||
(req, res) =>
|
||||
this.requestResponseController<V>(req, res, this.routes["POST"])
|
||||
);
|
||||
}
|
||||
if (this.routes["DELETE"] != null) {
|
||||
this.router.delete(this.url, (req, res) =>
|
||||
this.router.delete(this.mainURL, (req, res) =>
|
||||
this.requestResponseController<V>(req, res, this.routes["DELETE"])
|
||||
);
|
||||
}
|
||||
if (this.routes["PUT"] != null) {
|
||||
this.router.put(
|
||||
this.url,
|
||||
this.mainURL,
|
||||
validationModelMiddleware(this.validationModel),
|
||||
(req, res) =>
|
||||
this.requestResponseController<V>(req, res, this.routes["PUT"])
|
||||
);
|
||||
}
|
||||
if (this.routes["GET"] != null) {
|
||||
this.router.get(this.url, (req, res) =>
|
||||
this.router.get(this.mainURL, (req, res) =>
|
||||
this.requestResponseController<V>(req, res, this.routes["GET"])
|
||||
);
|
||||
}
|
||||
|
@ -62,18 +78,17 @@ export class CoreHttpController<V> implements ICoreHttpController {
|
|||
router: this.router,
|
||||
};
|
||||
}
|
||||
public put(usecase: CallBackFunction<V>) {
|
||||
public put(usecase: CallbackStrategyWithValidationModel<V>) {
|
||||
this.routes["PUT"] = usecase;
|
||||
}
|
||||
public delete(usecase: CallBackFunction<V>) {
|
||||
public delete(usecase: CallbackStrategyWithValidationModel<V>) {
|
||||
this.routes["DELETE"] = usecase;
|
||||
}
|
||||
public async requestResponseController<T>(
|
||||
req: Request,
|
||||
res: Response,
|
||||
usecase: CallBackFunction<T>
|
||||
usecase: CallbackStrategyWithValidationModel<T>
|
||||
) {
|
||||
|
||||
let payload = null;
|
||||
|
||||
if (req["model"] != undefined) {
|
||||
|
@ -98,11 +113,11 @@ export class CoreHttpController<V> implements ICoreHttpController {
|
|||
}
|
||||
);
|
||||
}
|
||||
public post(usecase: CallBackFunction<V>) {
|
||||
public post(usecase: CallbackStrategyWithValidationModel<V>) {
|
||||
this.routes["POST"] = usecase;
|
||||
}
|
||||
|
||||
public get(usecase: CallBackFunction<V>) {
|
||||
public get(usecase: CallbackStrategyWithValidationModel<V>) {
|
||||
this.routes["GET"] = usecase;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
// import { RequestHandler } from "express";
|
||||
import { RequestHandler } from "express";
|
||||
|
||||
// export const validationMiddleware = (
|
||||
// type: any,
|
||||
// value = 'body',
|
||||
// skipMissingProperties = false,
|
||||
// whitelist = true,
|
||||
// forbidNonWhitelisted = true,
|
||||
// ): RequestHandler => {
|
||||
|
||||
|
||||
// }
|
||||
export const validationMiddleware = (
|
||||
type: any,
|
||||
value = "body",
|
||||
skipMissingProperties = false,
|
||||
whitelist = true,
|
||||
forbidNonWhitelisted = true
|
||||
): RequestHandler => {
|
||||
// TODO:(IDONTSUDO) need TOKEN
|
||||
// return nextTick
|
||||
return (req, res, next) => {
|
||||
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
export enum EventsFileChanger {
|
||||
remove = "remove",
|
||||
update = "update",
|
||||
delete = "delete",
|
||||
create = "create",
|
||||
|
@ -18,6 +17,7 @@ export class MetaDataFileManagerModel {
|
|||
this.event = event;
|
||||
this.unixTime = Date.now();
|
||||
}
|
||||
|
||||
public get timeString(): string {
|
||||
const date = new Date(this.unixTime * 1000);
|
||||
const hours = date.getHours();
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
export interface IPipelineMeta {
|
||||
pipelineIsRunning: boolean;
|
||||
projectUUID?: string | null;
|
||||
lastProcessCompleteCount: number | null;
|
||||
error: any;
|
||||
}
|
||||
|
||||
pipelineIsRunning: boolean;
|
||||
projectUUID?: string | null;
|
||||
lastProcessCompleteCount: number | null;
|
||||
error: any;
|
||||
}
|
||||
|
|
|
@ -9,9 +9,7 @@ import { EXEC_TYPE, ExecError, SpawnError } from "../model/exec_error_model";
|
|||
abstract class IExecutorProgramService {
|
||||
abstract execPath: string;
|
||||
}
|
||||
class P{
|
||||
|
||||
}
|
||||
export class ExecutorProgramService
|
||||
extends TypedEvent<Result<ExecError | SpawnError, ExecutorResult>>
|
||||
implements IExecutorProgramService
|
||||
|
|
|
@ -34,11 +34,12 @@ export class PipelineRealTimeService extends TypedEvent<IPipelineMeta> {
|
|||
this.iterationErrorObserver(iteration);
|
||||
|
||||
// TODO(IDONTSUDO): implements
|
||||
// this.iterationLogSaver()
|
||||
this.iterationLogSaver(iteration);
|
||||
}
|
||||
|
||||
iterationLogSaver() {
|
||||
throw new Error("Method not implemented.");
|
||||
iterationLogSaver(iteration: Iteration): void {
|
||||
// throw new Error("Method not implemented.");
|
||||
// citeration.result.data
|
||||
}
|
||||
|
||||
iterationErrorObserver(iteration: Iteration): void {
|
||||
|
@ -70,8 +71,7 @@ export class PipelineRealTimeService extends TypedEvent<IPipelineMeta> {
|
|||
path: string,
|
||||
projectUUID: string
|
||||
): void {
|
||||
const testPath = path + "/context";
|
||||
const stack = new StackService(pipelineModels, testPath);
|
||||
const stack = new StackService(pipelineModels, path);
|
||||
this.status["projectUUID"] = projectUUID;
|
||||
this.status["pipelineIsRunning"] = true;
|
||||
stack.on(this.pipelineSubscriber);
|
||||
|
|
|
@ -51,6 +51,7 @@ export class StackService
|
|||
"$PATH",
|
||||
this.path
|
||||
);
|
||||
console.log(processMetaData.process.command)
|
||||
return processMetaData;
|
||||
}
|
||||
public async call() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { IsMongoId, IsEnum, IsOptional } from "class-validator";
|
||||
import { IsMongoId, IsOptional } from "class-validator";
|
||||
import { Schema, model } from "mongoose";
|
||||
import { IProcess, StackGenerateType } from "../../core/model/process_model";
|
||||
import { TriggerModel, triggerSchema } from "../triggers/trigger_model";
|
||||
|
|
|
@ -12,5 +12,4 @@ export class PipelinePresentation extends CrudController<
|
|||
databaseModel: PipelineDBModel,
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import { PipelineModel, schemaPipeline } from "../pipelines/pipeline_model";
|
|||
import { IsArray, IsOptional, IsString } from "class-validator";
|
||||
|
||||
export interface IProjectModel {
|
||||
_id: string;
|
||||
_id?:string;
|
||||
pipelines: [PipelineModel];
|
||||
rootDir: string;
|
||||
description: string;
|
||||
|
|
|
@ -11,6 +11,7 @@ export class RealTimeValidationModel {
|
|||
public id: string;
|
||||
}
|
||||
|
||||
|
||||
export class RealTimePresentation extends CoreHttpController<RealTimeValidationModel> {
|
||||
constructor() {
|
||||
super({
|
||||
|
@ -20,5 +21,6 @@ export class RealTimePresentation extends CoreHttpController<RealTimeValidationM
|
|||
});
|
||||
super.post(new RunInstancePipelineUseCase().call);
|
||||
super.get(new PipelineStatusUseCase().call);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import { App } from "../../../core/controllers/app";
|
||||
import { Result } from "../../../core/helper/result";
|
||||
import { EXEC_TYPE } from "../../../core/model/exec_error_model";
|
||||
import { ReadByIdDataBaseModelUseCase } from "../../../core/usecases/read_by_id_database_model_usecase";
|
||||
import { IProjectModel, ProjectDBModel } from "../../projects/projects_model";
|
||||
import {
|
||||
|
@ -18,13 +20,19 @@ export class RunInstancePipelineUseCase {
|
|||
}
|
||||
|
||||
const projectModel = readByIdDataBaseModelUseCase.value;
|
||||
|
||||
projectModel.pipelines.map((el) => {
|
||||
el.process.type = EXEC_TYPE.EXEC;
|
||||
});
|
||||
|
||||
pipelineRealTimeService.runPipeline(
|
||||
projectModel.pipelines,
|
||||
projectModel.rootDir,
|
||||
App.staticFilesStoreDir() + projectModel.rootDir + "/",
|
||||
projectModel._id
|
||||
);
|
||||
|
||||
|
||||
return Result.ok({ status: "ok" });
|
||||
}
|
||||
}
|
||||
|
||||
// /Users/idontsudo/Desktop/testdeck-mocha-seed/server/build/public/ce4e7710-73dc-47fc-87ee-d448ea2412ce
|
||||
// new ObjectId("6554c22d2ef337587505a494")
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import { EXEC_TYPE } from "../../src/core/model/exec_error_model";
|
||||
import {
|
||||
IPipeline,
|
||||
IssueType,
|
||||
StackGenerateType,
|
||||
} from "../../src/core/model/process_model";
|
||||
import { TriggerType } from "../../src/features/triggers/trigger_model";
|
||||
|
||||
export const mockSimplePipeline = [
|
||||
export const mockSimplePipeline:IPipeline[] = [
|
||||
{
|
||||
process: {
|
||||
type: EXEC_TYPE.EXEC,
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"i18next": "^23.6.0",
|
||||
"mobx": "^6.10.0",
|
||||
"mobx-react-lite": "^4.0.4",
|
||||
"mobx-store-inheritance": "^1.0.6",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-i18next": "^13.3.1",
|
||||
|
|
|
@ -4,6 +4,7 @@ export class SocketRepository {
|
|||
serverURL = "ws://localhost:4001";
|
||||
socket: Socket | undefined;
|
||||
async connect() {
|
||||
console.log('connect')
|
||||
const socket = io(this.serverURL);
|
||||
this.socket = socket;
|
||||
socket.connect();
|
||||
|
|
|
@ -5,7 +5,7 @@ import {
|
|||
} from "../../features/all_projects/presentation/all_projects_screen";
|
||||
import {
|
||||
PipelineInstanceScreen,
|
||||
PipelineScreenPath,
|
||||
PipelineInstanceScreenPath,
|
||||
} from "../../features/pipeline_instance_main_screen/pipeline_instance_screen";
|
||||
import {
|
||||
SelectProjectScreen,
|
||||
|
@ -15,7 +15,15 @@ import {
|
|||
CreatePipelineScreen,
|
||||
CreatePipelineScreenPath,
|
||||
} from "../../features/create_pipeline/presentation/create_pipeline_screen";
|
||||
import { CreateProjectScreen, CreateProjectScreenPath } from "../../features/create_project/create_project_screen";
|
||||
import {
|
||||
CreateProjectScreen,
|
||||
CreateProjectScreenPath,
|
||||
} from "../../features/create_project/create_project_screen";
|
||||
import {
|
||||
CreateTriggerScreenPath,
|
||||
TriggerScreen,
|
||||
} from "../../features/create_trigger/presentation/create_trigger_screen";
|
||||
import { CreateProcessScreen, CreateProcessScreenPath } from "../../features/create_process/presentation/create_process_screen";
|
||||
|
||||
export const router = createBrowserRouter([
|
||||
{
|
||||
|
@ -23,7 +31,7 @@ export const router = createBrowserRouter([
|
|||
element: <AllProjectScreen />,
|
||||
},
|
||||
{
|
||||
path: PipelineScreenPath,
|
||||
path: PipelineInstanceScreenPath,
|
||||
element: <PipelineInstanceScreen />,
|
||||
},
|
||||
{
|
||||
|
@ -38,4 +46,12 @@ export const router = createBrowserRouter([
|
|||
path: CreateProjectScreenPath,
|
||||
element: <CreateProjectScreen />,
|
||||
},
|
||||
{
|
||||
path: CreateTriggerScreenPath,
|
||||
element: <TriggerScreen />,
|
||||
},
|
||||
{
|
||||
path: CreateProcessScreenPath,
|
||||
element: <CreateProcessScreen />,
|
||||
},
|
||||
]);
|
||||
|
|
|
@ -4,6 +4,7 @@ import { ReactComponent as DeleteIcon } from "../../assets/icons/delete.svg";
|
|||
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { v4 } from "uuid";
|
||||
import { ILinkTypography, LinkTypography } from "../link/link";
|
||||
|
||||
export type CallBackFunction = (el: ListElement, index: number) => void;
|
||||
|
||||
|
@ -20,6 +21,7 @@ export enum Icon {
|
|||
export interface IPropsList {
|
||||
values: ListElement[];
|
||||
headers?: string;
|
||||
link?: ILinkTypography;
|
||||
onClick?: CallBackFunction;
|
||||
icon: Icon;
|
||||
}
|
||||
|
@ -28,13 +30,20 @@ export const List: React.FunctionComponent<IPropsList> = observer((props) => {
|
|||
props.values.map((el) => {
|
||||
if (el.id === undefined) {
|
||||
el.id = v4();
|
||||
return el
|
||||
return el;
|
||||
}
|
||||
return el
|
||||
return el;
|
||||
});
|
||||
return (
|
||||
<div>
|
||||
{props.headers !== undefined ? <>{props.headers}</> : <></>}
|
||||
{props.link !== undefined ? (
|
||||
<div>
|
||||
<LinkTypography path={props.link.path} text={props.link.text} />
|
||||
</div>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
{props.values.map((el, index) => {
|
||||
return (
|
||||
<Row
|
||||
|
|
|
@ -20,6 +20,7 @@ export const LoadPage: React.FunctionComponent<ILoadPage> = observer(
|
|||
path={props.path}
|
||||
largeText={props.largeText}
|
||||
minText={props.minText}
|
||||
needBackButton={props.needBackButton}
|
||||
/>
|
||||
{props.isError ? (
|
||||
<>
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
import { HttpRepository } from "../../../core/repository/http_repository";
|
||||
import { HttpMethod, HttpRepository } from "../../../core/repository/http_repository";
|
||||
import { IProjectModel } from "../model/project_model";
|
||||
|
||||
export class ProjectRepository extends HttpRepository {}
|
||||
export class ProjectRepository extends HttpRepository {
|
||||
async getAllProject() {
|
||||
return this.jsonRequest<IProjectModel[]>(HttpMethod.GET,'/project')
|
||||
}
|
||||
}
|
||||
|
|
8
ui/src/features/all_projects/model/project_model.ts
Normal file
8
ui/src/features/all_projects/model/project_model.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { PipelineModel } from "../../create_project/create_project_repository";
|
||||
|
||||
export interface IProjectModel {
|
||||
_id?: string;
|
||||
pipelines: [PipelineModel];
|
||||
rootDir: string;
|
||||
description: string;
|
||||
}
|
|
@ -1,18 +1,35 @@
|
|||
import * as React from "react";
|
||||
import { AllProjectStore } from "./all_projects_store";
|
||||
import { ProjectRepository } from "../data/project_repository";
|
||||
import { LoadPage } from "../../../core/ui/pages/load_page";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { SelectProjectScreenPath } from "../../select_project/presentation/select_project";
|
||||
import { Header } from "../../../core/ui/header/header";
|
||||
|
||||
export const AllProjectScreenPath = "/";
|
||||
|
||||
export const AllProjectScreen: React.FunctionComponent = () => {
|
||||
export const AllProjectScreen: React.FunctionComponent = observer(() => {
|
||||
const [allProjectStore] = React.useState(
|
||||
() => new AllProjectStore(new ProjectRepository())
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header
|
||||
path={SelectProjectScreenPath}
|
||||
<LoadPage
|
||||
|
||||
largeText={"Projects"}
|
||||
minText={"select instance project?"}
|
||||
needBackButton={true}
|
||||
needBackButton={false}
|
||||
minText="create project?"
|
||||
path={SelectProjectScreenPath}
|
||||
isError={allProjectStore.isError}
|
||||
isLoading={allProjectStore.isLoading}
|
||||
children={
|
||||
<div>
|
||||
{allProjectStore.projectsModels?.map((el) => {
|
||||
return <div>{el.description}</div>;
|
||||
})}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,12 +1,42 @@
|
|||
import { makeAutoObservable } from "mobx";
|
||||
import makeAutoObservable from "mobx-store-inheritance";
|
||||
import { ProjectRepository } from "../data/project_repository";
|
||||
|
||||
class AllProjectStore {
|
||||
import { IProjectModel } from "../model/project_model";
|
||||
import { Result } from "../../../core/helper/result";
|
||||
|
||||
// TODO(IDONTSUDO): нужно переписать все сторы под BaseStore
|
||||
class BaseStore {
|
||||
isLoading = false;
|
||||
isError = false;
|
||||
|
||||
async loadingHelper<T>(callBack: Promise<Result<any, T>>) {
|
||||
this.isLoading = true;
|
||||
|
||||
const result = await callBack;
|
||||
if (result.isFailure()) {
|
||||
this.isError = true;
|
||||
this.isLoading = false;
|
||||
return result.forward();
|
||||
}
|
||||
|
||||
this.isLoading = false;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
export class AllProjectStore extends BaseStore {
|
||||
projectsModels?: IProjectModel[];
|
||||
repository: ProjectRepository;
|
||||
constructor(repository: ProjectRepository) {
|
||||
|
||||
super();
|
||||
this.repository = repository;
|
||||
this.getProjects();
|
||||
makeAutoObservable(this);
|
||||
}
|
||||
|
||||
async getProjects() {
|
||||
const result = await this.loadingHelper(this.repository.getAllProject());
|
||||
if (result.isSuccess()) {
|
||||
this.projectsModels = result.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const allProjectStore = new AllProjectStore(new ProjectRepository());
|
||||
|
|
@ -4,6 +4,8 @@ import { LoadPage } from "../../../core/ui/pages/load_page";
|
|||
import { createPipelineStore } from "./create_pipeline_store";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Icon, List } from "../../../core/ui/list/list";
|
||||
import { CreateTriggerScreenPath } from "../../create_trigger/presentation/create_trigger_screen";
|
||||
import { CreateProcessScreenPath } from "../../create_process/presentation/create_process_screen";
|
||||
|
||||
export const CreatePipelineScreenPath = "/create_pipeline";
|
||||
|
||||
|
@ -19,6 +21,7 @@ export const CreatePipelineScreen: React.FunctionComponent = observer(() => {
|
|||
<Row>
|
||||
<List
|
||||
headers={"process"}
|
||||
link={{ path: CreateProcessScreenPath, text: "create process" }}
|
||||
values={createPipelineStore.processModels.map((el) => {
|
||||
return { text: el.description, id: el._id };
|
||||
})}
|
||||
|
@ -41,6 +44,7 @@ export const CreatePipelineScreen: React.FunctionComponent = observer(() => {
|
|||
|
||||
<List
|
||||
headers="triggers"
|
||||
link={{ path: CreateTriggerScreenPath, text: "create trigger" }}
|
||||
values={createPipelineStore.triggersModels.map((el) => {
|
||||
return { text: el.description, id: el._id };
|
||||
})}
|
||||
|
|
|
@ -10,6 +10,7 @@ export interface IProcess extends DatabaseModel {
|
|||
timeout?: number;
|
||||
commit?: string | undefined;
|
||||
}
|
||||
|
||||
export enum EXEC_TYPE {
|
||||
SPAWN = "SPAWN",
|
||||
EXEC = "EXEC",
|
||||
|
@ -19,7 +20,6 @@ export enum IssueType {
|
|||
ERROR = "ERROR",
|
||||
}
|
||||
export const processModelMock: IProcess = {
|
||||
_id: "",
|
||||
description: "",
|
||||
type: EXEC_TYPE.SPAWN,
|
||||
command: "",
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
import { Formik } from "formik";
|
||||
import { Row, Col } from "antd";
|
||||
import { EXEC_TYPE, IssueType, processModelMock } from "../model/process_model";
|
||||
|
||||
export const CreateProcessScreenPath = '/create/process'
|
||||
export const CreateProcessScreen = observer(() => {
|
||||
return (
|
||||
<div>
|
||||
|
|
|
@ -87,3 +87,4 @@ export const CreateProjectScreen: React.FunctionComponent = observer(() => {
|
|||
</>
|
||||
);
|
||||
});
|
||||
|
|
@ -4,7 +4,7 @@ import { CodeTriggerForm } from "./components/code_trigger_form";
|
|||
import { observer } from "mobx-react-lite";
|
||||
import { triggerStore } from "./trigger_store";
|
||||
import { FileTriggerForm } from "./components/file_trigger_form";
|
||||
import { ReactComponent as DeleteIcon } from "../../../assets/icons/delete.svg";
|
||||
import { ReactComponent as DeleteIcon } from "../../../core/assets/icons/delete.svg";
|
||||
import { Loader } from "../../../core/ui/loader/loader";
|
||||
|
||||
const { Title } = Typography;
|
||||
|
@ -45,7 +45,7 @@ const Bottom = observer(() => {
|
|||
</Col>
|
||||
);
|
||||
});
|
||||
|
||||
export const CreateTriggerScreenPath = '/create/trigger'
|
||||
export const TriggerScreen: React.FunctionComponent = observer(() => {
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Button } from "antd";
|
|||
|
||||
|
||||
|
||||
export const PipelineScreenPath = '/pipeline_instance/:id'
|
||||
export const PipelineInstanceScreenPath = '/pipeline_instance/:id'
|
||||
export const PipelineInstanceScreen: React.FunctionComponent = () => {
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
import * as React from "react";
|
||||
import { selectProjectStore } from "./select_project_store";
|
||||
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { LoadPage } from "../../../core/ui/pages/load_page";
|
||||
import { CreateProjectScreenPath } from "../../create_project/create_project_screen";
|
||||
import { SelectProjectStore } from "./select_project_store";
|
||||
import { SelectProjectRepository } from "../data/select_project_repository";
|
||||
|
||||
export const SelectProjectScreenPath = "/select_project";
|
||||
|
||||
export const SelectProjectScreen: React.FunctionComponent = observer(() => {
|
||||
const [selectProjectStore] = React.useState(
|
||||
() => new SelectProjectStore(new SelectProjectRepository())
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<LoadPage
|
||||
|
|
|
@ -2,7 +2,7 @@ import { makeAutoObservable } from "mobx";
|
|||
import { SelectProjectRepository } from "../data/select_project_repository";
|
||||
import { IProjectModel } from "../model/project_model";
|
||||
|
||||
class SelectProjectStore {
|
||||
export class SelectProjectStore {
|
||||
repository: SelectProjectRepository;
|
||||
isLoading = false;
|
||||
isError = false;
|
||||
|
@ -29,7 +29,4 @@ class SelectProjectStore {
|
|||
this.isLoading = false;
|
||||
}
|
||||
}
|
||||
|
||||
export const selectProjectStore = new SelectProjectStore(
|
||||
new SelectProjectRepository()
|
||||
);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue