Skip to content

Commit 269d229

Browse files
feat: add code repository page (#512)
* feat: component import * feat: removed errors, styled landingheader * feat: checkbox * feat: static page pt.2 * fix: package.json * fix: eslint errors * fix: styles overwrite * feat: update code repo table * feat: add code repository page * fix: type error * feat: code repository one of components * fix: styling pt. 1 * feat: update optional secret field * feat: add delete button with confirm modal * fix: input select arrow styles * fix: create repository page & update create secret flow * fix: validate repository urls using the selected gitService * fix: label validation * fix: textField input color * fix: validation errors & improve error messages * fix: test private repo connect * feat: improve coderepository validations for SSH urls * fix: repository url validation * feat: add auto-select for git service * fix: show connection result --------- Co-authored-by: dennisvankekem <dvankeke@akamai.com>
1 parent 7ae643c commit 269d229

Some content is hidden

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

74 files changed

+4255
-417
lines changed

package-lock.json

Lines changed: 512 additions & 294 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
},
1313
"dependencies": {
1414
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
15+
"@braintree/sanitize-url": "^6.0.4",
1516
"@emotion/react": "^11.14.0",
1617
"@emotion/styled": "^11.14.0",
1718
"@fortawesome/fontawesome-free": "5.15.4",
19+
"@hookform/resolvers": "^3.9.0",
1820
"@iconify/react": "^3.2.1",
1921
"@monaco-editor/react": "^4.6.0",
2022
"@mui/icons-material": "5.8.4",
@@ -40,10 +42,12 @@
4042
"lodash": "4.17.21",
4143
"markdown-to-jsx": "^7.7.3",
4244
"notistack": "2.0.5",
45+
"ramda": "^0.30.1",
4346
"react": "18.3.1",
4447
"react-dom": "18.3.1",
4548
"react-error-boundary": "5.0.0",
4649
"react-helmet": "6.1.0",
50+
"react-hook-form": "^7.53.0",
4751
"react-i18next": "^12.0.0",
4852
"react-linkify": "^1.0.0-alpha",
4953
"react-redux": "7.2.8",
@@ -55,7 +59,8 @@
5559
"tss-react": "3.7.0",
5660
"typeface-comfortaa": "1.1.13",
5761
"typeface-roboto": "0.0.75",
58-
"yaml": "^2.7.0"
62+
"yaml": "^2.7.0",
63+
"yup": "^0.32.9"
5964
},
6065
"devDependencies": {
6166
"@commitlint/cli": "11.0.0",
@@ -95,6 +100,7 @@
95100
"prettier": "2.7.0",
96101
"standard-version": "9.5.0",
97102
"ts-jest": "26.5.6",
103+
"ts-node": "^10.9.2",
98104
"typescript": "4.7.3"
99105
},
100106
"engines": {
Lines changed: 3 additions & 0 deletions
Loading

public/i18n/en/common.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"TITLE_NETPOL": "Network Policy {{secretId}} - {{role}}",
6363
"TITLE_SECRETS": "Secrets",
6464
"TITLE_SEALEDSECRETS": "Sealed Secrets",
65-
"TITLE_NETPOLS": "Sealed Secrets",
65+
"TITLE_NETPOLS": "Network Policies",
6666
"TITLE_SERVICE": "Service details",
6767
"TITLE_SERVICES": "Services - {{scope}}",
6868
"TITLE_SETTINGS": "Settings - {{settingId}}",
@@ -100,5 +100,9 @@
100100
"edit": "edit",
101101
"enabled": "enabled",
102102
"help": "help",
103-
"submit": "submit"
103+
"submit": "submit",
104+
"CodeRepository": "Code Repository",
105+
"CodeRepository_plural": "Code Repositories",
106+
"TITLE_CODEREPOSITORY": "Code Repository Details",
107+
"TITLE_CODEREPOSITORIES": "Code Repositories - {{scope}}"
104108
}

public/logos/github_logo.svg

Lines changed: 14 additions & 0 deletions
Loading

public/logos/gitlab_logo.svg

Lines changed: 10 additions & 0 deletions
Loading

src/App.tsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ import Policy from 'pages/Policy'
5353
import Maintenance from 'pages/Maintenance'
5454
import PrivateRoute from 'components/AuthzRoute'
5555
import Logout from 'pages/Logout'
56+
import CodeRepository from 'pages/code-repositories/create-edit'
57+
import CodeRepositories from 'pages/code-repositories/overview'
5658
import { HttpErrorBadRequest } from './utils/error'
5759
import { NotistackProvider, SnackbarUtilsConfigurator } from './utils/snack'
5860

@@ -86,8 +88,29 @@ function App() {
8688
<CssBaseline />
8789
<Helmet titleTemplate='%s | APL' defaultTitle='Akamai APL Platform' />
8890
<Switch>
89-
{/* ! user && <Route path='/' component={Home} exact /> */}
9091
<Route path='/' component={Dashboard} exact />
92+
<PrivateRoute
93+
path='/coderepositories'
94+
component={CodeRepositories}
95+
platformAdminRoute
96+
exact
97+
/>
98+
<PrivateRoute
99+
path='/teams/:teamId/coderepositories'
100+
component={CodeRepositories}
101+
exact
102+
/>
103+
<PrivateRoute
104+
path='/teams/:teamId/create-coderepository'
105+
component={CodeRepository}
106+
exact
107+
/>
108+
<PrivateRoute
109+
path='/teams/:teamId/coderepositories/:coderepositoryId'
110+
component={CodeRepository}
111+
exact
112+
/>
113+
91114
<PrivateRoute path='/apps/:teamId' component={Apps} exact />
92115
<PrivateRoute path='/apps/:teamId/:appId' component={OtomiApp} exact />
93116
<PrivateRoute path='/backups' component={Backups} platformAdminRoute exact />

src/assets/icons/checkbox.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react'
2+
3+
function Checkbox() {
4+
return (
5+
<svg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'>
6+
<g fill='none' fillRule='evenodd' stroke='currentColor' strokeWidth='2'>
7+
<path d='M0 0H26V26H0z' className='defaultFill' />
8+
</g>
9+
</svg>
10+
)
11+
}
12+
13+
export default Checkbox
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React from 'react'
2+
3+
function CheckboxChecked() {
4+
return (
5+
<svg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'>
6+
<g fill='none' fillRule='evenodd' stroke='none' strokeWidth='1'>
7+
<path fill='currentColor' d='M0 0H26V26H0z' />
8+
<path
9+
fill='#FFF'
10+
fillRule='nonzero'
11+
d='M10.33 14.6l6.88-6.888a.366.366 0 01.519 0l.955.954a.381.381 0 010 .537l-8.094 8.085a.366.366 0 01-.518 0l-3.756-3.751a.381.381 0 01-.002-.535l.949-.954a.354.354 0 01.51-.003l2.558 2.554z'
12+
/>
13+
</g>
14+
</svg>
15+
)
16+
}
17+
18+
export default CheckboxChecked

src/assets/icons/docs.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from 'react'
2+
3+
function Docs() {
4+
return (
5+
<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20'>
6+
<path
7+
fill='none'
8+
fillRule='evenodd'
9+
stroke='currentColor'
10+
strokeLinecap='round'
11+
strokeLinejoin='round'
12+
strokeWidth='1.25'
13+
d='M1.974 19.375c-.727 0-1.316-.56-1.316-1.25V1.875c0-.69.589-1.25 1.316-1.25h13.158c.343 0 .672.127.918.355l2.632 2.402c.254.236.397.558.397.895v15.098H1.974zm2.631-12.5h10.527m-10.527 3.75h5.263m-5.263 3.75l7.5.125'
14+
/>
15+
</svg>
16+
)
17+
}
18+
19+
export default Docs

0 commit comments

Comments
 (0)