Compare commits
No commits in common. "8e8c93ef2cb454d9c02b7c595937c28b2db03bcf" and "c6b09aa075ec15bf0010abe61a623e562d4773a7" have entirely different histories.
8e8c93ef2c
...
c6b09aa075
@ -1,5 +1,5 @@
|
||||
overwrite: true
|
||||
schema: "http://localhost:7122/graphql"
|
||||
schema: "http://api.fennec.localhost/graphql"
|
||||
# documents: "src/**/*.graphql"
|
||||
generates:
|
||||
src/generated/graphql.tsx:
|
||||
|
@ -1949,6 +1949,22 @@
|
||||
"description": null,
|
||||
"fields": null,
|
||||
"inputFields": [
|
||||
{
|
||||
"name": "projectId",
|
||||
"description": null,
|
||||
"type": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "SCALAR",
|
||||
"name": "String",
|
||||
"ofType": null
|
||||
}
|
||||
},
|
||||
"defaultValue": null,
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "branch",
|
||||
"description": null,
|
||||
|
@ -255,6 +255,7 @@ export enum TaskStatuses {
|
||||
}
|
||||
|
||||
export type UpdatePipelineInput = {
|
||||
projectId: Scalars['String'];
|
||||
branch: Scalars['String'];
|
||||
name: Scalars['String'];
|
||||
workUnitMetadata: WorkUnitMetadataInput;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { gql, Reference, useMutation } from "@apollo/client";
|
||||
import { gql, Reference, useMutation, useQuery } from "@apollo/client";
|
||||
import { useRouter } from "@curi/react-dom";
|
||||
import {
|
||||
Button,
|
||||
@ -13,17 +13,21 @@ import {
|
||||
import { Delete } from "@material-ui/icons";
|
||||
import { FormikHelpers, Formik, Form, Field } from "formik";
|
||||
import { TextField, TextFieldProps } from "formik-material-ui";
|
||||
import { TextField as MuiTextField } from "@material-ui/core";
|
||||
import { useConfirm } from "material-ui-confirm";
|
||||
import { useSnackbar } from "notistack";
|
||||
import { not, omit } from "ramda";
|
||||
import { ChangeEvent, FC } from "react";
|
||||
import {
|
||||
Pipeline,
|
||||
WorkUnitMetadata,
|
||||
PipelineUnits,
|
||||
} from "../generated/graphql";
|
||||
import { useHeaderContainer } from "../layouts";
|
||||
import { CREATE_PIPELINE, DELETE_PIPELINE, UPDATE_PIPELINE } from "./mutations";
|
||||
import { PIPELINE } from "./queries";
|
||||
import * as Yup from "yup";
|
||||
import { useField } from "formik";
|
||||
|
||||
type Values = Partial<Pipeline>;
|
||||
|
||||
@ -104,7 +108,7 @@ export const PipelineEditor: FC<Props> = ({ pipeline }) => {
|
||||
if (isCreate) {
|
||||
await createPipeline({
|
||||
variables: {
|
||||
pipeline: values,
|
||||
input: values,
|
||||
},
|
||||
}).then(({ data }) => {
|
||||
pipelineId = data!.createPipeline.id;
|
||||
@ -273,7 +277,7 @@ const ScriptsField: FC<TextFieldProps> = ({ field, form, meta, ...props }) => {
|
||||
onChange: (ev: ChangeEvent<HTMLInputElement>) =>
|
||||
form.setFieldValue(
|
||||
field.name,
|
||||
ev.target.value?.split("\n").map((it) => it) ?? []
|
||||
ev.target.value?.split("\n").map((it) => it.trim()) ?? []
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
@ -1,20 +1,10 @@
|
||||
import { Project } from "../generated/graphql";
|
||||
import React, { FC, Fragment } from "react";
|
||||
import {
|
||||
IconButton,
|
||||
Grid,
|
||||
makeStyles,
|
||||
Paper,
|
||||
Portal,
|
||||
Typography,
|
||||
Box,
|
||||
} from "@material-ui/core";
|
||||
import { IconButton, Grid, makeStyles, Paper, Portal, Typography } from "@material-ui/core";
|
||||
import { useHeaderContainer } from "../layouts";
|
||||
import { PipelineList } from "../pipelines/pipeline-list";
|
||||
import { Edit } from '@material-ui/icons';
|
||||
import { Link } from '@curi/react-dom';
|
||||
import { Button } from "@material-ui/core";
|
||||
import { AddBox } from "@material-ui/icons";
|
||||
|
||||
interface Props {
|
||||
project: Project;
|
||||
@ -72,18 +62,6 @@ export const ProjectDetail: FC<Props> = ({ project, children }) => {
|
||||
>
|
||||
<Grid item xs={3} lg={2} style={{ height: "100%", display: "flex" }}>
|
||||
<Paper className={classes.pipelineListContainer}>
|
||||
<Box m={2}>
|
||||
<Link name="create-pipeline" params={{ projectId: project.id }}>
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
title="New Pipeline"
|
||||
startIcon={<AddBox />}
|
||||
>
|
||||
New Pipeline
|
||||
</Button>
|
||||
</Link>
|
||||
</Box>
|
||||
<PipelineList projectId={project.id} />
|
||||
</Paper>
|
||||
</Grid>
|
||||
|
@ -1,19 +1,17 @@
|
||||
import { ApolloClient, InMemoryCache } from "@apollo/client";
|
||||
import { prepareRoutes } from "@curi/router";
|
||||
import { omit } from "ramda";
|
||||
import { omit } from 'ramda';
|
||||
import React from "react";
|
||||
import { ProjectDetail, ProjectEditor, PROJECT } from "./projects";
|
||||
import { COMMIT_LIST_QUERY } from "./commons/graphql/queries";
|
||||
import { CommitList } from "./commits/commit-list";
|
||||
import { PipelineTaskDetail } from "./pipeline-tasks/pipeline-task-detail";
|
||||
import { COMMIT_LIST_QUERY } from './commons/graphql/queries';
|
||||
import { CommitList } from './commits/commit-list';
|
||||
import { PipelineTaskDetail } from './pipeline-tasks/pipeline-task-detail';
|
||||
import { PipelineEditor } from "./pipelines/pipeline-editor";
|
||||
import {
|
||||
CreatePipelineInput,
|
||||
CreateProjectInput,
|
||||
Pipeline,
|
||||
PipelineUnits,
|
||||
Project,
|
||||
WorkUnitInput,
|
||||
} from "./generated/graphql";
|
||||
import { PIPELINE } from "./pipelines";
|
||||
|
||||
@ -67,20 +65,13 @@ export default prepareRoutes([
|
||||
matched,
|
||||
{ client }: { client: ApolloClient<InMemoryCache> }
|
||||
) {
|
||||
const units = [
|
||||
PipelineUnits.Checkout,
|
||||
PipelineUnits.InstallDependencies,
|
||||
PipelineUnits.Test,
|
||||
PipelineUnits.Deploy,
|
||||
PipelineUnits.CleanUp,
|
||||
];
|
||||
const input: CreatePipelineInput = {
|
||||
name: "",
|
||||
branch: "",
|
||||
projectId: matched!.params.projectId,
|
||||
workUnitMetadata: {
|
||||
version: 1,
|
||||
units: units.map((util) => ({ type: util, scripts: [] })),
|
||||
units: [],
|
||||
},
|
||||
};
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user