support to routes with peer group
updated the view logic to support the new type
updated peer view as well
for now, we are supporting a single group, but that can be extended
* add last login to user overview for regular entries without tag
* add backward compatability to properly show with older version of management
* Merge main and update delete user popup messages
---------
Co-authored-by: Maycon Santos <mlsmaycon@gmail.com>
Fixed flaky test by changing the way to access
Access Control Page and add some test ids of Add Rules buttons.
Temporary removed tests for Firefox and webkit(safari)
Add tests with playwright for:
- add peer modal on first access
- add peer modal on empty peer list
- test install buttons and instructions for Linux,
Docker, macOS, Windows and Android
- check default ACL
The tests are using a modified version of the getting
started scripts to run a local environment of
management services and run the dashboard from the current version
Todo:
- run tests before create docker container
- add more tests
Changes:
user tab was split in service users and regular users
user edit view was reworked:
shows PAT box for service users and self (hides for rest)
hides email and groups for service users as no usage
reverted settings tab to only contain account settings + hide for normal users
Use navbar avatar dropdown to link to users list and open user edit page for self
extend api-client to handle requests with query parameters
use popup form for PAT creation, user invite and service user creation
validate all form fields before trying to send API call and show faulty fields
Additional fixes:
groups popup was only visible after 2nd hover after tab switch on every view, fixed to also show on first hover
fix setup keys page throwing errors from time to time and not loading
peers view was sending getRoute requests that are only allowed for admins which was throwing errors (only console) for normal users -> disabled requests for non-admin users
* Add working UI + API calls [missing token popup]
* use popup view to add new token
* show userID if user name not available
* switch from description to name
* show "Me" instead of own name
* removed created_by column
* update add token explanation
* use object instead of plain text for token create response
* some style changes
* disable information button for tokens
* last_used can contain nil
* fix delete popups
* lower case letters for dates
* add activity and fix visibility
* show settings tab for non admins
* remove spaces on top of setting tabs
* fix copy button size and position
* fix list footers
* continue merge changes to new files
On many IDP providers, the access token
is used to access the IDP's own API
With these changes, we allow users to define the proper token to be used for
management API calls
Reduce duplicated code with single helper for pagination
On larger deployments we should allow for larger pages
fix popover key issue and vertical spacing
update deprecated keys
New Settings tab added to the dashboard.
It is possible to enable or disable peer login expiration globally for an account.
As well as defining the expiration time period.
Users can add distribution groups to network routes
Groups can be added to individual network routes or to all routes in the group
Adding a new group in the modal is restricted to individual network route operations
Validate if the users state is empty and issue a GET call to /api/users
We check if the call was issued and if not on tabs that already does such a call
Check if domains is not empty when primary is false
Validate domain and primary fields before submit
Display validation errors as message too
Reload groups on failure too
Display API call error
Added call to action message when nameserver is empty
Added DNS tab for managing Nameservers.
Users will be able to add multiple nameservers
and set distribution groups that dictate to which peers the settings will be applied.
With this PR we also got a set of group handlers that can be reused.
This PR brings an "Invite User" button to the Users view
and a view to creating (inviting) a new user to the account.
This function calls the Management API POST /users
endpoint that creates a new user.
* Fix popover for groups
Fixed all popover overlay when opening
update modal
also fixed group input size problem
with peers update
* remove style display flex from form tittle
* fix missing peer when disabling route
and passing peer to modal view
* group rows by HA routes
* Adjust high availability and show fields disabled
* add groupedRoutes to GroupedDataTable
* remove unused fields
* filter by grouped routes
* group routes by network id and network
* use better check for save button
Cleans up config.json providing generic OIDC properties.
This allows for using other IDP providers besides Auth0.
The change is backward compatible with the previous versions.
Init scripts will remove ports for replacement when the user
provided default HTTP and HTTPS ports.
This was causing issues with trusted domain logic from the OIDC library.
Replacing Auth0's SDK with a more generic implementation of an OIDC client.
This will allow us to use other IDP providers that follow the OIDC standards.
Validate tag naming input
check if only spaces has been added
check if group All is being removed
group All is not closeable in peers
Fixed issue when group list is too large,
preventing click on the group counter
removed arrows from rule inputs
Refactoring UI using ant design
This will allow us to move forward faster because of its popularity
We also rewrote the code in TypeScript,
we believe this is also a major step moving forward
with the project as it brings more struct and clear/clean code.
Co-authored-by: Raphael Oliveira <raphael.oliveira@dataontabs.com>
Co-authored-by: braginini <bangvalo@gmail.com>
Add React-Table library replacing the default table.
Integrated a search function by name.
Added sorting by Name and LastSeen
Co-authored-by: Misha Bragin <bangvalo@gmail.com>
Previously all peers used to be displayed on a single page.
This change aims to improve the usability of the Peers page
by paginating the peer list.
By default 25 peers will be shown per page,
and there will be 5 pages shown in the pagination bar per default.
The current page shown will be centered in the bar shown below.
Copyright (c) 2024 Wiretrustee UG (haftungsbeschränkt) & AUTHORS
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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.
## Technologies Used
### `npm run build`
- NextJS
- ReactJS
- Tailwind CSS
- Auth0
- Nginx
- Docker
- Let's Encrypt
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
## How to run
Disclaimer. We believe that proper user management system is not a trivial task and requires quite some effort to make it right. Therefore we decided to
use Auth0 service that covers all our needs (user management, social login, JTW for the management API).
Auth0 so far is the only 3rd party dependency that can't be really self-hosted.
The build is minified and the filenames include the hashes.\
3. Running NetBird UI Dashboard requires the following Auth0 environmental variables to be set (see docker command below):
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
`AUTH0_DOMAIN``AUTH0_CLIENT_ID``AUTH0_AUDIENCE`
### `npm run eject`
To obtain these, please use [Auth0 React SDK Guide](https://auth0.com/docs/quickstart/spa/react/01-login#configure-auth0) up until "Configure Allowed Web Origins"
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
4. NetBird UI Dashboard uses NetBirds Management Service HTTP API, so setting `NETBIRD_MGMT_API_ENDPOINT` is required. Most likely it will be `http://localhost:33071` if you are hosting Management API on the same server.
5. Run docker container without SSL (Let's Encrypt):
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
```shell
docker run -d --name netbird-dashboard \
--rm -p 80:80 -p 443:443 \
-e AUTH0_DOMAIN=<SET YOUR AUTH DOMAIN> \
-e AUTH0_CLIENT_ID=<SET YOUR CLIENT ID> \
-e AUTH0_AUDIENCE=<SET YOUR AUDIENCE> \
-e NETBIRD_MGMT_API_ENDPOINT=<SET YOUR MANAGEMETN API URL> \
netbirdio/dashboard:main
```
6. Run docker container with SSL (Let's Encrypt):
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
```shell
docker run -d --name netbird-dashboard \
--rm -p 80:80 -p 443:443 \
-e NGINX_SSL_PORT=443 \
-e LETSENCRYPT_DOMAIN=<YOUR PUBLIC DOMAIN> \
-e LETSENCRYPT_EMAIL=<YOUR EMAIL> \
-e AUTH0_DOMAIN=<SET YOUR AUTH DOMAIN> \
-e AUTH0_CLIENT_ID=<SET YOUR CLEITN ID> \
-e AUTH0_AUDIENCE=<SET YOUR AUDIENCE> \
-e NETBIRD_MGMT_API_ENDPOINT=<SET YOUR MANAGEMETN API URL> \
netbirdio/dashboard:main
```
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
## How to run local development
## Learn More
1. Install [Node](https://nodejs.org/)
2. Create and update the `.local-config.json` file. This file should contain values to be replaced from `config.json`
3. Run `npm install` to install dependencies
4. Run `npm run dev` to start the development server
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
To learn React, check out the [React documentation](https://reactjs.org/).
You can start editing by modifying the code inside `src/..`
The page auto-updates as you edit the file.
### Code Splitting
## How to migrate from old dashboard (v1)
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
The new dashboard comes with a new docker image `netbirdio/dashboard:main`.
To migrate from the old dashboard (v1) `wiretrustee/dashboard:main` to the new one, please follow the steps below.
### Analyzing the Bundle Size
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
1. Stop the dashboard container `docker compose down dashboard`
2. Replace the docker image name in your `docker-compose.yml` with `netbirdio/dashboard:main`
3. Recreate the dashboard container `docker compose up -d --force-recreate dashboard`
Loaded 20 of 420 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.