-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api-codegen): replaced with new more excplicit codegen. Added re…
…act-query. Refactored app.tsx. Updated linting
- Loading branch information
Wilhelm
committed
Oct 11, 2023
1 parent
b01c94d
commit aa2be72
Showing
158 changed files
with
3,046 additions
and
2,041 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,3 @@ jobs: | |
|
||
- name: Publish Container Image | ||
run: IMAGE_TAG=${{inputs.IMAGE_TAG}} docker compose push | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "CI" | ||
name: 'CI' | ||
|
||
on: | ||
push: | ||
|
@@ -27,4 +27,4 @@ jobs: | |
yarn test | ||
yarn build | ||
env: | ||
CI: false | ||
CI: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// default config | ||
module.exports = { | ||
trailingComma: 'es5', | ||
trailingComma: 'all', | ||
tabWidth: 2, | ||
semi: false, | ||
semi: true, | ||
singleQuote: true, | ||
endOfLine: 'auto', | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,11 +18,11 @@ spec: | |
- name: http | ||
port: 3000 | ||
variables: | ||
REACT_APP_AAD_TENANT_ID: "" | ||
REACT_APP_AAD_CLIENT_ID: "" | ||
REACT_APP_AAD_REDIRECT_URI: "" | ||
REACT_APP_BACKEND_URL: "" | ||
REACT_APP_BACKEND_API_SCOPE: "" | ||
REACT_APP_AAD_TENANT_ID: '' | ||
REACT_APP_AAD_CLIENT_ID: '' | ||
REACT_APP_AAD_REDIRECT_URI: '' | ||
REACT_APP_BACKEND_URL: '' | ||
REACT_APP_BACKEND_API_SCOPE: '' | ||
environmentConfig: | ||
- environment: dev | ||
- environment: test | ||
|
@@ -42,30 +42,30 @@ spec: | |
- environment: dev | ||
imageTagName: latest | ||
variables: | ||
ASPNETCORE_ENVIRONMENT: "Development" | ||
ASPNETCORE_ENVIRONMENT: 'Development' | ||
- environment: test | ||
imageTagName: latest | ||
variables: | ||
ASPNETCORE_ENVIRONMENT: "Test" | ||
ASPNETCORE_ENVIRONMENT: 'Test' | ||
- environment: prod | ||
imageTagName: latest | ||
variables: | ||
ASPNETCORE_ENVIRONMENT: "Production" | ||
ASPNETCORE_ENVIRONMENT: 'Production' | ||
jobs: | ||
- name: pepm-nrresqml | ||
image: ghcr.io/equinor/pepm-worker-api/pepm-nrresqml:latest | ||
schedulerPort: 8090 | ||
resources: | ||
requests: | ||
memory: "2048Mi" | ||
cpu: "1000m" | ||
memory: '2048Mi' | ||
cpu: '1000m' | ||
limits: | ||
memory: "4096Mi" | ||
cpu: "2000m" | ||
memory: '4096Mi' | ||
cpu: '2000m' | ||
payload: | ||
path: /app/args | ||
variables: | ||
MODELS_PATH: "/mnt/azure-storage/models" | ||
MODELS_PATH: '/mnt/azure-storage/models' | ||
environmentConfig: | ||
- environment: dev | ||
volumeMounts: | ||
|
@@ -86,15 +86,15 @@ spec: | |
schedulerPort: 8090 | ||
resources: | ||
requests: | ||
memory: "4096Mi" | ||
cpu: "1000m" | ||
memory: '4096Mi' | ||
cpu: '1000m' | ||
limits: | ||
memory: "8192Mi" | ||
cpu: "2000m" | ||
memory: '8192Mi' | ||
cpu: '2000m' | ||
payload: | ||
path: /app/args | ||
variables: | ||
MODELS_PATH: "/mnt/azure-storage/models" | ||
MODELS_PATH: '/mnt/azure-storage/models' | ||
environmentConfig: | ||
- environment: dev | ||
volumeMounts: | ||
|
@@ -113,4 +113,4 @@ spec: | |
privateImageHubs: | ||
ghcr.io: | ||
username: hakoneriksson | ||
email: [email protected] | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import styled from 'styled-components' | ||
import styled from 'styled-components'; | ||
|
||
const StyledOutletWrapper = styled.section` | ||
height: calc(100% - 128px); | ||
overflow: scroll; | ||
` | ||
export { StyledOutletWrapper as OutletWrapper } | ||
`; | ||
export { StyledOutletWrapper as OutletWrapper }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { render } from '@testing-library/react' | ||
import { App } from './App' | ||
import { render } from '@testing-library/react'; | ||
import { App } from './App'; | ||
|
||
test('renders without crashing', () => { | ||
render(<App />) | ||
}) | ||
render(<App />); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,25 @@ | ||
import { | ||
AuthenticatedTemplate, | ||
UnauthenticatedTemplate, | ||
useMsal, | ||
} from '@azure/msal-react' | ||
import { Outlet } from 'react-router-dom' | ||
import * as Styled from './App.styled' | ||
import AppBar from './features/AppBar/AppBar' | ||
import { Footer } from './features/Footer/Footer' | ||
import { NoAccess } from './pages/NoAccess/NoAccess' | ||
useMsalAuthentication, | ||
} from '@azure/msal-react'; | ||
import { InteractionType } from '@azure/msal-browser'; | ||
import { Layout } from './pages/Layout'; | ||
import { OpenAPI } from './api/generated'; | ||
import { apiConfig } from './auth/authConfig'; | ||
|
||
export function App() { | ||
const { instance } = useMsal() | ||
useMsalAuthentication(InteractionType.Redirect); | ||
OpenAPI.BASE = apiConfig.baseUrl; | ||
|
||
return ( | ||
<> | ||
<AuthenticatedTemplate> | ||
<AppBar title="PEPM" /> | ||
<Styled.OutletWrapper> | ||
<Outlet /> | ||
</Styled.OutletWrapper> | ||
<Footer text="All information is proprietary of Equinor © 2023 Equinor ASA" /> | ||
<Layout /> | ||
</AuthenticatedTemplate> | ||
<UnauthenticatedTemplate> | ||
<p>Not authenticated</p> | ||
<button onClick={() => instance.loginRedirect()}>Log in</button> | ||
<NoAccess /> | ||
<div>You are not authorized</div> | ||
</UnauthenticatedTemplate> | ||
</> | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* generated using openapi-typescript-codegen -- do no edit */ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
import type { ApiRequestOptions } from './ApiRequestOptions'; | ||
import type { ApiResult } from './ApiResult'; | ||
|
||
export class ApiError extends Error { | ||
public readonly url: string; | ||
public readonly status: number; | ||
public readonly statusText: string; | ||
public readonly body: any; | ||
public readonly request: ApiRequestOptions; | ||
|
||
constructor( | ||
request: ApiRequestOptions, | ||
response: ApiResult, | ||
message: string, | ||
) { | ||
super(message); | ||
|
||
this.name = 'ApiError'; | ||
this.url = response.url; | ||
this.status = response.status; | ||
this.statusText = response.statusText; | ||
this.body = response.body; | ||
this.request = request; | ||
} | ||
} |
Oops, something went wrong.