Compare commits

..

No commits in common. "832d77d57a96e2907aef417b1e104a85d18c706b" and "320506af6831bbf58863ac757b7ce1b6abf7f880" have entirely different histories.

9 changed files with 2370 additions and 5992 deletions

8214
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,9 +9,9 @@
"@curi/router": "^2.1.2",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/react-fontawesome": "^0.1.16",
"@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/react-fontawesome": "^0.1.14",
"@hickory/browser": "^2.1.0",
"@mui/icons-material": "^5.0.1",
"@mui/lab": "^5.0.0-alpha.49",
@ -35,7 +35,7 @@
"graphql": "^15.5.0",
"graphql-scalars": "^1.10.0",
"material-ui-confirm": "^2.1.2",
"notistack": "^2.0.2",
"notistack": "^1.0.6",
"ramda": "^0.27.1",
"react": "^17.0.2",
"react-ace": "^9.4.4",

View File

@ -1176,22 +1176,6 @@
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "environment",
"description": null,
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
@ -2037,9 +2021,13 @@
}
],
"type": {
"kind": "OBJECT",
"name": "Configuration",
"ofType": null
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "OBJECT",
"name": "Configuration",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
@ -2056,18 +2044,6 @@
"description": null,
"fields": null,
"inputFields": [
{
"name": "id",
"description": null,
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "pipelineId",
"description": null,
@ -2131,18 +2107,6 @@
"defaultValue": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "name",
"description": null,
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": "\"Default Configuration\"",
"isDeprecated": false,
"deprecationReason": null
}
],
"interfaces": null,

View File

@ -148,7 +148,6 @@ export type Pipeline = {
branch: Scalars['String'];
name: Scalars['String'];
workUnitMetadata: WorkUnitMetadata;
environment: Scalars['String'];
};
export type PipelineTask = {
@ -215,7 +214,7 @@ export type Query = {
commits?: Maybe<Array<Commit>>;
listPipelineTaskByPipelineId: Array<PipelineTask>;
pipelineTask: PipelineTask;
getConfiguration?: Maybe<Configuration>;
getConfiguration: Configuration;
};
@ -256,12 +255,10 @@ export type QueryGetConfigurationArgs = {
};
export type SetConfigurationInput = {
id?: Maybe<Scalars['String']>;
pipelineId: Scalars['String'];
projectId: Scalars['String'];
content: Scalars['String'];
language: ConfigurationLanguage;
name?: Maybe<Scalars['String']>;
};
export type Subscription = {

View File

@ -9,7 +9,8 @@ import { ConfirmProvider } from "material-ui-confirm";
import { SnackbarProvider } from "notistack";
import Router from "./commons/route/router";
import { AuthProvider } from "./commons/auth/auth.provider";
import { zhCN } from "@mui/material/locale";
import { LocalizationProvider } from "@mui/lab";
import AdapterDateFns from "@mui/lab/AdapterDateFns";
import {
ThemeProvider,
Theme,
@ -22,7 +23,7 @@ declare module "@mui/styles/defaultTheme" {
interface DefaultTheme extends Theme {}
}
const theme = createTheme({}, zhCN);
const theme = createTheme();
ReactDOM.render(
<React.StrictMode>
@ -32,9 +33,11 @@ ReactDOM.render(
<SnackbarProvider maxSnack={5}>
<AuthProvider>
<AppApolloClientProvider>
<Router>
<App />
</Router>
<LocalizationProvider dateAdapter={AdapterDateFns}>
<Router>
<App />
</Router>
</LocalizationProvider>
</AppApolloClientProvider>
</AuthProvider>
</SnackbarProvider>

View File

@ -7,7 +7,6 @@ export const CREATE_PIPELINE = gql`
projectId
branch
name
environment
workUnitMetadata {
version
units {
@ -26,7 +25,6 @@ export const UPDATE_PIPELINE = gql`
projectId
branch
name
environment
workUnitMetadata {
version
units {

View File

@ -61,7 +61,6 @@ export const PipelineEditor: FC<Props> = ({ pipeline }) => {
id
projectId
branch
environment
name
workUnitMetadata {
version
@ -174,12 +173,7 @@ export const PipelineEditor: FC<Props> = ({ pipeline }) => {
{isCreate ? "Create" : "Edit"} Pipeline
</Typography>
{isCreate ? null : (
<IconButton
color="inherit"
onClick={handleDelete}
disabled={deleting}
size="large"
>
<IconButton color="inherit" onClick={handleDelete} disabled={deleting} size="large">
<Delete />
</IconButton>
)}
@ -192,10 +186,7 @@ export const PipelineEditor: FC<Props> = ({ pipeline }) => {
.max(32, "Must be 32 characters or less")
.required("Required"),
branch: Yup.string()
.max(64, "Must be 64 characters or less")
.required("Required"),
environment: Yup.string()
.max(64, "Must be 64 characters or less")
.max(32, "Must be 32 characters or less")
.required("Required"),
})}
onSubmit={submitForm}
@ -211,13 +202,6 @@ export const PipelineEditor: FC<Props> = ({ pipeline }) => {
fullWidth
margin="normal"
/>
<Field
component={TextField}
name="environment"
label="Environment"
fullWidth
margin="normal"
/>
<Paper className={classes.metadataContainer}>
<Field
component={TextField}

View File

@ -13,12 +13,6 @@ import { FC, useMemo, useState, MouseEvent } from "react";
import { Pipeline, Project } from "../generated/graphql";
import { CallMerge } from "@mui/icons-material";
import { Divider } from "@material-ui/core";
import { Box } from "@mui/system";
import {
faCodeBranch,
faMapMarkerAlt,
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
interface Props {
projectId: string;
@ -30,7 +24,6 @@ const PIPELINES = gql`
id
name
branch
environment
}
project(id: $projectId) {
id
@ -147,44 +140,10 @@ const Item = ({ pipeline }: { pipeline: Pipeline }) => {
<ListItemText
primary={pipeline.name}
secondary={
<Box sx={{ display: "flex", flexFlow: "column" }}>
<Box
sx={{
display: "flex",
alignItems: "center",
}}
>
<FontAwesomeIcon
style={{ width: "1em", marginRight: "0.5em" }}
icon={faCodeBranch}
/>
<Typography
component="span"
variant="body2"
color="textSecondary"
>
{pipeline.branch}
</Typography>
</Box>
<Box
sx={{
display: "flex",
alignItems: "center",
}}
>
<FontAwesomeIcon
style={{ width: "1em", marginRight: "0.5em" }}
icon={faMapMarkerAlt}
/>
<Typography
component="span"
variant="body2"
color="textSecondary"
>
{pipeline.environment}
</Typography>
</Box>
</Box>
<Typography component="span" variant="body2" color="textSecondary">
<CallMerge fontSize="small" />
{pipeline.branch}
</Typography>
}
/>
</ListItem>

View File

@ -7,7 +7,6 @@ export const PIPELINE = gql`
name
projectId
branch
environment
workUnitMetadata {
version
units {