Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added useAlert hook to display danger and success alerts #180

Closed
wants to merge 55 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
e8f1ab2
fix(vcs): fixed the analysis of scanData
Shruti3004 Jul 28, 2021
9a71a8c
fix(react-helmet): use react-helmet-async to fix console error
Aman-Codes Jul 28, 2021
de0d2eb
fix(test): update test to use react-helmet-async
Aman-Codes Jul 28, 2021
94116ff
fix(errors): Added the error checks in deleteUploads
Shruti3004 Jul 28, 2021
44c7200
feat(alert): alert message on homepage for logout error
Aman-Codes Jul 26, 2021
b59e32c
fix(ux): fixed the ux of upload pages
Shruti3004 Jul 28, 2021
dffc945
Revert "fix(react-helmet): use react-helmet-async to fix console error"
GMishx Jul 30, 2021
5af05f1
feat(reuse): add reuse report and copyright option
Aman-Codes Jul 27, 2021
ba1d360
feat(reuse): add all reuse options and update corresponding api
Aman-Codes Jul 28, 2021
fb8cffb
fix(reuse): add recursive to false and add custom no data message in …
Aman-Codes Jul 30, 2021
dbb0a31
fix(reuse): update handle change function
Aman-Codes Jul 30, 2021
3de2c99
fix(uplods-move-copy): added the fallback condition
Shruti3004 Jul 28, 2021
73a600d
feat(API): migrate API from v1 to v2
Aman-Codes Aug 3, 2021
1eea8d8
feat(browse): added the browsing of uploads with folders
Shruti3004 Aug 1, 2021
ed5465d
fix(browse): fixed the ui and recursive call
Shruti3004 Aug 4, 2021
1913946
feat(url): added the upload from url page
Shruti3004 Jul 28, 2021
e6b2517
fix(upload): fixed the vcs and server accesslevel
Shruti3004 Aug 4, 2021
23fe314
fix(upload): fixed the ids of all the common-fields
Shruti3004 Aug 4, 2021
cbc75bb
feat(search): added the pagination in search page
Shruti3004 Jul 31, 2021
0f12b16
feat(group): use default group returned from API
Aman-Codes Aug 4, 2021
2669e63
feat(browseUplods): added the pages and routes for it
Shruti3004 Aug 5, 2021
2bee671
feat(header): added header for browse uploads
Shruti3004 Aug 5, 2021
a78bd68
fix(style): fixed the styling of header
Shruti3004 Aug 5, 2021
0504b25
fix(nameInitials): add null check in name initials function
Aman-Codes Aug 5, 2021
665fc20
fix(highlight-group): highlight the current selected group
Aman-Codes Aug 6, 2021
f13652e
fix(login-form): add border to form in dark theme
Aman-Codes Aug 6, 2021
1c8ba7c
fix(test): update snapshot to include border in dark theme
Aman-Codes Aug 6, 2021
67e4b55
fix(ui): fixed the snackbar now ui not shifting
Shruti3004 Aug 6, 2021
dcf686e
fix(jobs): fixed the jobs api of scheduleAnalysis
Shruti3004 Aug 6, 2021
6b716e1
fix(header): made the header sticky
Shruti3004 Aug 12, 2021
3197a2a
fix(test): fixed the snapshot for header
Shruti3004 Aug 12, 2021
8590f53
fix(footer): fixed the footer alignment
Shruti3004 Aug 11, 2021
896f1ac
fix(test): fixed the snapshot for footer
Shruti3004 Aug 11, 2021
5f34ab6
fix(browse): fixed the browse headings
Shruti3004 Aug 11, 2021
c510ae7
feat(fossology-version): use fossology version from info API
Aman-Codes Aug 5, 2021
7c6f530
fix(snapshot): update footer snapshot
Aman-Codes Aug 5, 2021
7b64cd9
fix(footer): ensure single request to info API
Aman-Codes Aug 9, 2021
201afbe
feat(sessionStorage): cache fossology version in session storage
Aman-Codes Aug 12, 2021
565444c
feat(copyright): add copyright table
Aman-Codes Aug 10, 2021
f0b4c26
fix(darkTheme): fix table styling in dark theme
Aman-Codes Aug 12, 2021
58d257a
fix(dark-theme): change table border to grey in dark theme
Aman-Codes Aug 18, 2021
c613088
feat(report): add export report option on browse page
Aman-Codes Aug 9, 2021
f84ca7f
fix(groupname): remove groupname header from download report api
Aman-Codes Aug 12, 2021
e83611f
fix(groupname): add groupname header in download report
Aman-Codes Aug 18, 2021
298f7ce
Create errorMessages.js in constants
caffeinated-pixels Oct 4, 2021
58f89f4
test(api): add tests
Oct 8, 2021
8b89878
added lazy loading components
Oct 8, 2021
fa2b8d8
fix(ui): fixed the textareas in all the pages
Shruti3004 Aug 6, 2021
00fb0d1
fix(style): fixed the styling of textarea
Shruti3004 Aug 11, 2021
791cfa4
fix(font): fixed the license textarea font
Shruti3004 Aug 12, 2021
e69b19d
feat: Dark theme toggle button
mayank2021 Feb 16, 2022
ee30e2d
feat: run prettier script
mayank2021 Feb 17, 2022
8308a9a
fix(ui): login button alignment fixed
soham4abc Feb 17, 2022
bafffe0
docs(README.md): Added copy boxes on commands
d-e-v-esh Mar 16, 2022
4938e08
feat(alert-hook): added useAlert hook to display danger and success a…
pushkarsaneja Mar 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# following keys are required

#backend endpoint
REACT_APP_SERVER_URL=localhost/repo/api/v1
REACT_APP_SERVER_URL=localhost/repo/api/v2

#for enabling https for backend url
REACT_APP_HTTPS=false
Expand Down
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
}
],
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"prefer-destructuring": ["error", { "object": true, "array": false }],
"react/require-default-props": 0,
"jsx-a11y/control-has-associated-label": 0
"jsx-a11y/control-has-associated-label": 0,
"react/jsx-props-no-spreading": 0
}
}
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Build pages
env:
PUBLIC_URL: /FOSSologyUI
REACT_APP_SERVER_URL: localhost/repo/api/v1
REACT_APP_SERVER_URL: localhost/repo/api/v2
REACT_APP_HTTPS: false
run:
yarn build
Expand Down
47 changes: 25 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ The UI Migration project is an effort focused on generating the new component-ba

## Requirements

NodeJS and NPM or yarn\
[https://nodejs.org/en/download/](https://nodejs.org/en/download/)
[https://yarnpkg.com/getting-started/install](https://yarnpkg.com/getting-started/install)
- [NodeJS](https://nodejs.org/en/download/) and NPM or [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#windows-stable)

## Installation

Expand All @@ -43,45 +41,50 @@ Run the following commands inside the project directory.
```sh
docker build \
-t fossologyui:react1.0 \
--build-arg REACT_APP_SERVER_URL="localhost/repo/api/v1" \
--build-arg REACT_APP_SERVER_URL="localhost/repo/api/v2" \
--build-arg REACT_APP_HTTPS="false" .
```

```sh
docker run -p 3000:3000 fossologyui:react1.0
```

The docker image can then be used using http://IP_OF_DOCKER_HOST:3000/ user fossy password fossy.
The docker image can then be used using `http://IP_OF_DOCKER_HOST:3000/` user `fossy` password `fossy`.

<hr />
### Project Setup

In the project directory, you can run:
- Create a `.env` in root directory of project and copy the contents from `.env.sample`

create a `.env` in root directory of project and copy the contents from `.env.sample`
- Installs the packages:

#### `yarn`

#### `yarn start`
```sh
yarn
```

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
- Runs the app in the development mode at [http://localhost:3000](http://localhost:3000)

The page will reload if you make edits.\
You will also see any lint errors in the console.
```sh
yarn start
```

#### `yarn test`
### Deployment

Launches the test runner in the interactive watch mode.\
Launches the test runner in the interactive watch mode.
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

#### `yarn build`
```sh
yarn test
```

Builds the app for production to the `build` folder.

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
```sh
yarn build
```

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes. Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

## Support
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"react-helmet": "^6.1.0",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"react-table": "^7.7.0",
"react-virtualized": "^9.22.3",
"react-virtualized-tree": "^3.4.1",
"styled-components": "^5.3.0",
Expand Down Expand Up @@ -83,6 +84,7 @@
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react-hooks": "^1.7.0",
"jest-fetch-mock": "3.0.3",
"prettier": "^2.3.1"
}
}
9 changes: 7 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ import "react-virtualized-tree/lib/main.css";
import "styles/global.css";
import GlobalStyles from "styles/globalStyle";

// useAlert hook provider
import AlertProvider from "components/Widgets/AlertProvider";

function App() {
const { theme } = useContext(GlobalContext);
return (
<GlobalProvider>
<ThemeProvider theme={theme === "light" ? lightTheme : darkTheme}>
<GlobalStyles />
<Routes />
<AlertProvider>
<GlobalStyles />
<Routes />
</AlertProvider>
</ThemeProvider>
</GlobalProvider>
);
Expand Down
Loading