Skip to content

Commit 2a13170

Browse files
author
talhainvenxion
committed
initial commit
1 parent 6cf4651 commit 2a13170

File tree

467 files changed

+30719
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

467 files changed

+30719
-0
lines changed

.ci/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM node:13.7.0-slim
2+
3+
WORKDIR /dependencies
4+
5+
ADD package.json package.json
6+
RUN yarn install
7+
8+
CMD /bin/bash

.ci/force-builds

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
goddamn.
2+
goddamn 3.

.eslintrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
extends: [
4+
'plugin:react/recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:prettier/recommended',
7+
],
8+
parserOptions: {
9+
ecmaVersion: 2018,
10+
sourceType: 'module',
11+
ecmaFeatures: {
12+
jsx: true,
13+
},
14+
},
15+
rules: {
16+
'react/prop-types': [0],
17+
'react/display-name': "off",
18+
},
19+
settings: {
20+
react: {
21+
version: 'detect',
22+
},
23+
},
24+
};

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ typings/
7171
# dotenv environment variables file
7272
.env
7373
.env.test
74+
.env.development
7475

7576
# parcel-bundler cache (https://parceljs.org/)
7677
.cache

.gitlab-ci.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
image: docker:git
2+
3+
stages:
4+
- build-container
5+
- deploy
6+
7+
services:
8+
- docker:dind
9+
10+
# variables:
11+
# DOCKER_HOST: tcp://localhost:2375/
12+
13+
initial:
14+
stage: build-container
15+
script:
16+
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
17+
- >-
18+
docker build -t registry.gitlab.com/maiot/frontend/ci:latest
19+
-f .ci/Dockerfile .
20+
- docker push registry.gitlab.com/maiot/frontend/ci:latest
21+
only:
22+
changes:
23+
- .ci/Dockerfile
24+
- package.json
25+
- .ci/force-builds
26+
27+
production:
28+
stage: deploy
29+
variables:
30+
AWS_BUCKET: app.zenml.io
31+
REACT_APP_BASE_API_URL: https://api.zenml.io/api/v1
32+
REACT_APP_STRIPE_PUBLISHABLE_KEY: pk_live_51HHtJnCvKKdV9NkDX6raJvgd1gGxNHiPir1Zny3c7Y2M24HpG3MatuRNgZpAEFxuxibmhgtDdnyaETDpySYcwHA7002wYvNMHK
33+
CLOUDFRONT_DISTRIBUTION: E3U43JWH3PYEHB
34+
before_script:
35+
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
36+
script:
37+
- >-
38+
docker run
39+
-v $(pwd):/ci
40+
-w /ci
41+
-e REACT_APP_BASE_API_URL=${REACT_APP_BASE_API_URL}
42+
-e REACT_APP_STRIPE_PUBLISHABLE_KEY=${REACT_APP_STRIPE_PUBLISHABLE_KEY}
43+
registry.gitlab.com/maiot/frontend/ci:latest
44+
/bin/bash -c "mv /dependencies/* ./ && yarn build"
45+
- >-
46+
docker run
47+
-v $(pwd):/ci
48+
-w /ci
49+
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
50+
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
51+
mesosphere/aws-cli:1.14.5
52+
s3 sync ./build/ s3://${AWS_BUCKET} --region eu-central-1 --delete
53+
- >-
54+
docker run
55+
-v $(pwd):/ci
56+
-w /ci
57+
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
58+
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
59+
mesosphere/aws-cli:1.14.5
60+
s3api put-bucket-website --bucket ${AWS_BUCKET} --website-configuration=file://website-config.json
61+
- >-
62+
docker run
63+
-v $(pwd):/ci
64+
-w /ci
65+
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
66+
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
67+
mesosphere/aws-cli:1.14.5
68+
cloudfront create-invalidation --distribution-id ${CLOUDFRONT_DISTRIBUTION} --paths "/*"
69+
environment:
70+
name: production
71+
url: https://app.zenml.io
72+
only:
73+
- master

.prettierrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
semi: true,
3+
trailingComma: 'all',
4+
singleQuote: true,
5+
tabWidth: 2,
6+
};

global.d.ts

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
declare module 'json2yaml';
2+
3+
type TId = string;
4+
5+
type TToasterTypes = 'success' | 'failure';
6+
7+
interface TApiActionsTypes {
8+
request: string;
9+
success: string;
10+
failure: string;
11+
}
12+
13+
interface TRequestActionPayload {
14+
apiMethod: TApiMethod;
15+
isAuthenticated: boolean;
16+
failureActionType?: string;
17+
successActionType?: string;
18+
params?: Record<string, unknown>;
19+
onSuccess?: () => void;
20+
onFailure?: (errorText: string) => void;
21+
}
22+
23+
interface TRequestAction {
24+
type: string;
25+
payload: TRequestActionPayload;
26+
}
27+
28+
interface TAction {
29+
type: string;
30+
payload: any;
31+
}
32+
33+
type TClickEvent = (arg1: React.MouseEvent) => void;
34+
35+
interface TUser {
36+
id: TId;
37+
fullName: string;
38+
email: string;
39+
organizationId: TId;
40+
}
41+
42+
interface TOrganization {
43+
id: TId;
44+
name: string;
45+
}
46+
47+
interface TInvite {
48+
id: TId;
49+
organizationId: string;
50+
organizationName: string;
51+
code: string;
52+
email: string;
53+
createdAt: Date;
54+
}
55+
56+
interface TMember {
57+
id: TId;
58+
organizationId: string;
59+
fullName: string;
60+
email: string;
61+
createdAt: Date;
62+
role: string;
63+
}
64+
65+
interface TWorkspace {
66+
id: TId;
67+
name: string;
68+
createdAt: Date;
69+
}
70+
71+
interface TPipeline {
72+
id: TId;
73+
name: string;
74+
createdAt: Date;
75+
workspaceId: TId;
76+
pipelineConfig: any;
77+
userId: TId;
78+
}
79+
80+
type TRunStatus = 'Succeeded' | 'Running' | 'Failed';
81+
82+
interface TRun {
83+
id: TId;
84+
status: TRunStatus;
85+
kubeflowStartTime: Date;
86+
kubeflowEndTime: Date;
87+
pipelineRunType: string;
88+
datasourceCommitId: TId;
89+
workspaceId: TId;
90+
pipelineId: TId;
91+
userId: TId;
92+
}
93+
94+
interface TBreadcrumb {
95+
name: string;
96+
clickable?: boolean;
97+
to?: string;
98+
}
99+
100+
interface TDatasourceCommit {
101+
id: TId;
102+
message: string;
103+
}
104+
105+
interface TabPage {
106+
text: string;
107+
Component: React.FC;
108+
path: string;
109+
}
110+
111+
interface TBilling {
112+
id: TId;
113+
trainingCost: string;
114+
savedCost: string;
115+
computeCost: string;
116+
pipelineRunId: TId;
117+
}
118+
119+
interface TOrganizationBilling {
120+
totalProcessedDatapoints: number;
121+
costTotal: number;
122+
processedDatapointsThisMonth: number;
123+
costThisMonth: number;
124+
}
125+
126+
interface TPaymentMethod {
127+
id: TId;
128+
billingDetails: {
129+
name: string;
130+
address: {
131+
city: string;
132+
country: string;
133+
line1: string;
134+
postal_code: string;
135+
};
136+
};
137+
card: {
138+
exp_month: number;
139+
exp_year: number;
140+
last4: number;
141+
};
142+
}
143+
144+
interface TSubscription {
145+
id: TId;
146+
planType: TSubscriptionPlanType;
147+
}
148+
149+
type TSubscriptionPlanType = 'unlimited' | 'explorer';
150+
151+
interface TInvoice {
152+
id: TId;
153+
invoicePdf: string;
154+
total: number;
155+
status: TInvoiceStatus;
156+
created: number;
157+
}
158+
159+
type TInvoiceStatus = 'draft' | 'open' | 'paid' | 'uncollectible';

package.json

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"name": "web",
3+
"version": "0.1.0",
4+
"private": true,
5+
"proxy": "https://testing.ce-dev.cloud.maiot.io/api/v1",
6+
"dependencies": {
7+
"@stripe/react-stripe-js": "^1.1.2",
8+
"@stripe/stripe-js": "^1.9.0",
9+
"@testing-library/dom": "^7.21.7",
10+
"@testing-library/jest-dom": "^5.11.2",
11+
"@testing-library/react": "^10.4.7",
12+
"@testing-library/user-event": "^12.1.0",
13+
"@types/classnames": "^2.2.10",
14+
"@types/country-list": "^2.1.0",
15+
"@types/jest": "^26.0.8",
16+
"@types/lodash": "^4.14.158",
17+
"@types/node": "^14.0.27",
18+
"@types/react": "^16.9.44",
19+
"@types/react-dom": "^16.9.8",
20+
"@types/react-outside-click-handler": "^1.3.0",
21+
"@types/react-redux": "^7.1.9",
22+
"@types/react-router-dom": "^5.1.5",
23+
"@types/react-scroll": "^1.5.5",
24+
"@types/react-syntax-highlighter": "^11.0.4",
25+
"@types/redux-logger": "^3.0.8",
26+
"axios": "^0.19.2",
27+
"axios-mock-adapter": "^1.18.2",
28+
"bootstrap": "^4.5.0",
29+
"classnames": "^2.2.6",
30+
"country-list": "^2.2.0",
31+
"date-fns": "^2.15.0",
32+
"eslint-import-resolver-babel-module": "^5.1.2",
33+
"eslint-plugin-react-hooks": "^4.0.8",
34+
"framer-motion": "^2.3.0",
35+
"i18next": "^19.6.3",
36+
"i18next-browser-languagedetector": "^5.0.0",
37+
"json2yaml": "^1.1.0",
38+
"node-sass": "^4.14.1",
39+
"query-string": "^6.13.1",
40+
"react": "^16.13.1",
41+
"react-bootstrap": "^1.3.0",
42+
"react-dom": "^16.13.1",
43+
"react-outside-click-handler": "^1.3.0",
44+
"react-redux": "^7.2.1",
45+
"react-router-dom": "^5.2.0",
46+
"react-scripts": "^3.4.1",
47+
"react-syntax-highlighter": "^13.3.1",
48+
"react-tooltip": "^4.2.10",
49+
"react-tooltip-lite": "^1.12.0",
50+
"redux": "^4.0.5",
51+
"redux-logger": "^3.0.6",
52+
"redux-persist": "^6.0.0",
53+
"redux-saga": "^1.1.3",
54+
"redux-saga-test-plan": "^4.0.0-rc.3",
55+
"reselect": "^4.0.0",
56+
"typescript": "^3.9.7"
57+
},
58+
"scripts": {
59+
"start": "react-scripts start",
60+
"build": "react-scripts build",
61+
"test": "react-scripts test --maxWorkers=4",
62+
"eject": "react-scripts eject",
63+
"lint": "eslint './src/**/*.ts*'",
64+
"fix-lint": "eslint './src/**/*.ts*' --fix",
65+
"tslint": "tsc",
66+
"all": "eslint './src/**/*.ts*' & react-scripts test --all & tsc"
67+
},
68+
"browserslist": {
69+
"production": [
70+
">0.2%",
71+
"not dead",
72+
"not op_mini all"
73+
],
74+
"development": [
75+
"last 1 chrome version",
76+
"last 1 firefox version",
77+
"last 1 safari version"
78+
]
79+
},
80+
"devDependencies": {
81+
"@typescript-eslint/eslint-plugin": "^3.7.1",
82+
"@typescript-eslint/parser": "^3.7.1",
83+
"babel-plugin-inline-react-svg": "^1.1.1",
84+
"eslint-config-prettier": "^6.11.0",
85+
"eslint-plugin-import": "^2.22.0",
86+
"eslint-plugin-prettier": "^3.1.4",
87+
"eslint-plugin-react": "^7.20.5",
88+
"eslint-plugin-redux-saga": "^1.1.3",
89+
"prettier": "^2.0.5",
90+
"react-hooks-testing-library": "^0.6.0",
91+
"react-test-renderer": "^16.13.1"
92+
}
93+
}

public/favicon.ico

15 KB
Binary file not shown.

0 commit comments

Comments
 (0)