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

Opensight UI #4000

Open
wants to merge 154 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
b18c422
Add: Add opensight-ui-components and mantine for new UI
bjoernricks Apr 11, 2024
cf751df
Add: Add new components for row and column layouts
bjoernricks Apr 16, 2024
0d0e5f2
Add: Add useValueChange hook for form components
bjoernricks Apr 16, 2024
ccb064d
Provide userEvent from @testing-library/user-event@14
bjoernricks Apr 16, 2024
f781093
Render theme provider for opensight-ui in tests
bjoernricks Apr 16, 2024
17c66e9
Add: Add a useDownload hook
bjoernricks Apr 16, 2024
411b94c
Setup ResizeObserver for components based on opensight-ui/mantine
bjoernricks Apr 16, 2024
53b033e
Add: Add a hook to load the user's capabilities from the backend
bjoernricks Apr 16, 2024
9cea0cf
Add: Add hooks for handling the filter dialog state
bjoernricks Apr 16, 2024
066583d
Add theme provider for opensight-ui based components
bjoernricks Apr 16, 2024
43601a4
Change: Refactor all form UI components
bjoernricks Apr 16, 2024
2abf16e
Change: Rework dialog components to use Modal as base
bjoernricks Apr 16, 2024
db3e57b
Add: Implement new Menu
bjoernricks Apr 16, 2024
9d50deb
Add: Implement new Menubar
bjoernricks Apr 16, 2024
f26958b
Fix rendering of list page content
bjoernricks Apr 16, 2024
82ef032
Change: Adjust login page for new UI
bjoernricks Apr 16, 2024
37f1394
Change: Update DialogNotification for new Dialog UI
bjoernricks Apr 16, 2024
27acf47
Change: Refactor TrashCan page to function component with new UI
bjoernricks Apr 16, 2024
0a43c21
Improve dialog footer layout
bjoernricks Apr 16, 2024
beaf28a
Change: Update wizards for new UI
bjoernricks Apr 16, 2024
68e39d9
Change: Adjust dashboard dialogs for new UI
bjoernricks Apr 16, 2024
38e75bf
Change: Adjust performance page for new UI
bjoernricks Apr 16, 2024
fae7989
Change: Adjust powerfilter components for new UI elements
bjoernricks Apr 16, 2024
8c4d8a0
Change: Update create and edit dialog to new UI layout
bjoernricks Apr 16, 2024
2cd26aa
Change: Update usersettings dialog to new UI
bjoernricks Apr 16, 2024
de0c769
Change: Update all filter dialogs for new UI
bjoernricks Apr 16, 2024
b592292
Update menu entries
bjoernricks Apr 17, 2024
ae98727
Fix issue with using opensight-ui as CJS but shipping with ESM
bjoernricks Apr 22, 2024
7e4c115
Cleanup dependencies
bjoernricks Apr 22, 2024
92ae608
Deploy compose file automatically
bjoernricks Apr 24, 2024
7b26cad
Deploy compose file automatically
bjoernricks Apr 25, 2024
b94394a
Remove obsolete dialog components
bjoernricks Apr 25, 2024
fe9e1b1
Use react-i18next to initialize translations for opensight-ui
bjoernricks Apr 25, 2024
53980a8
Update to latest version of opensight-ui
bjoernricks Apr 25, 2024
bb6aadc
Change: Don't require the to prop for Link component
bjoernricks Apr 25, 2024
e989a08
Extract opensight-ui and its dependencies into an own chunk
bjoernricks Apr 25, 2024
79f93a4
Provide a mock implementation for window.matchMedia
bjoernricks Apr 26, 2024
a23b26f
Change: Remove obsolete TitleBar component
bjoernricks Apr 30, 2024
e99bd95
Fix, update and improve dialog tests
bjoernricks Apr 30, 2024
de06924
Update form tests for new testing functions
bjoernricks Apr 30, 2024
63a2e81
Update all powerfilter component tests
bjoernricks Apr 30, 2024
b882fc2
Fix remaining web/component tests
bjoernricks Apr 30, 2024
421247f
Fix additional tests and components
bjoernricks Apr 30, 2024
35a99b3
Update and improve layout of alert dialog
bjoernricks Apr 30, 2024
2b890d7
Rename function method from clickItem to clickElement
bjoernricks May 2, 2024
1f8b5a5
Fix typo for flexbox layout `stetch` -> `stretch`
bjoernricks May 2, 2024
42454f2
Make component testing functions more flexible
bjoernricks May 2, 2024
cc16b4d
Extend the testing functions for querying pages tests components
bjoernricks May 2, 2024
cfcafac
Fix the alert page tests
bjoernricks May 2, 2024
9e3af9e
Add testing function for getting action items
bjoernricks May 2, 2024
d16e8b8
Update audit tests
bjoernricks May 2, 2024
87c45e3
Update cpe pages tests
bjoernricks May 2, 2024
d1eefc0
Define where to find the `@gsa/testing` module
bjoernricks May 3, 2024
4d13044
Add testing functions for getting the dialog buttons
bjoernricks May 3, 2024
cd95a64
Fix getting the options of select components
bjoernricks May 3, 2024
5bd1546
Add a changeInputValue testing method
bjoernricks May 3, 2024
cc6b341
Update and fix credential pages tests
bjoernricks May 3, 2024
b2bfb30
Update and fix cve pages tests
bjoernricks May 3, 2024
5ec4f80
Update and fix cvss calculator page tests
bjoernricks May 3, 2024
0990d81
Drop snapshot test for dialog closebutton
bjoernricks May 3, 2024
846c59c
Update and fix about page tests
bjoernricks May 3, 2024
38ccd5e
Update and fix LDAP page tests
bjoernricks May 3, 2024
a08fc85
Update and fix tests for hosts list page
bjoernricks May 3, 2024
ccbfb6c
Update and fix radius page tests
bjoernricks May 3, 2024
fb8a1c1
Update and fix notes list page tests
bjoernricks May 3, 2024
625a232
Drop snapshot of StartTimeSelection tests
bjoernricks May 3, 2024
82c26bb
Update and fix NVT list page tests
bjoernricks May 3, 2024
d58752a
Update and fix overrides list page tests
bjoernricks May 6, 2024
bd8a2d5
Update and improve policies pages
bjoernricks May 6, 2024
a6ba59e
Allow for easier testing of multiselect components
bjoernricks May 7, 2024
b274e68
Update and fix report config pages tests
bjoernricks May 7, 2024
c710739
Allow to display a menu entry for asset management
bjoernricks May 7, 2024
9d552a3
Update and fix report pages tests
bjoernricks May 7, 2024
b5e9804
Update and fix result pages tests
bjoernricks May 7, 2024
d3d14a0
Add a testing function for getting a table header
bjoernricks May 7, 2024
8a16076
Update and fix scan config pages tests
bjoernricks May 7, 2024
42be556
Update and fix scanner dialog tests
bjoernricks May 7, 2024
c1a2ff6
Update and fix schedule pages tests
bjoernricks May 7, 2024
0229d5e
Update and fix ticket pages tests
bjoernricks May 7, 2024
31fb8d3
Update and fix task pages tests
bjoernricks May 8, 2024
caceaca
Update and fix tls cert list page tests
bjoernricks May 8, 2024
ab5f35d
Add a testing function for getting file inputs
bjoernricks May 8, 2024
2100832
Update and fix target pages tests
bjoernricks May 8, 2024
815a854
Avoid issues causing flaky tests with pointer events
bjoernricks May 8, 2024
e9d8588
Fix warning about emotion css-in-js library already loaded during tests
bjoernricks May 8, 2024
cad3144
Use an own language switcher component for the app header
bjoernricks May 8, 2024
e9372a2
Mark asset-management link as external
bjoernricks May 22, 2024
9970de6
Change: powerFilter width and select loading state
daniele-mng Jun 13, 2024
eebf2a3
fix test
daniele-mng Jun 13, 2024
d08e8f5
add: new UI error
daniele-mng Jun 17, 2024
971cb77
add dependency lucide-react
daniele-mng Jun 18, 2024
e2b65ad
Add: ci job to run on opensight-ui branch (#4105)
daniele-mng Jul 19, 2024
9b46f3b
Change: opensight version 0.3.0
daniele-mng Jul 12, 2024
7810a80
Add: Session timer
daniele-mng Jul 12, 2024
d856dc5
Add: opensight date picker
daniele-mng Jun 24, 2024
8b38f9c
add tests
daniele-mng Jun 24, 2024
e3f4536
remove unused dep
daniele-mng Jun 27, 2024
804ea7c
split date and time components
daniele-mng Jun 28, 2024
9c7e4ef
add test
daniele-mng Jun 28, 2024
55a3114
fix imports
daniele-mng Jul 19, 2024
94af841
add missing props to select timezone
daniele-mng Jul 19, 2024
871e248
Fix: Error panel in dialog (#4106)
daniele-mng Jul 23, 2024
39f389f
fix: Select component label (#4107)
daniele-mng Jul 24, 2024
3fb6c23
Add: eslint rule for the file header (#4126)
daniele-mng Aug 20, 2024
42e0689
Rebase opensight UI (#4121)
daniele-mng Aug 23, 2024
a8c2435
merge main into opensight (#4131)
daniele-mng Aug 28, 2024
653d6da
Add confirmation dialog for table bulk trashand delete (#4133)
daniele-mng Aug 28, 2024
07f468f
Fix app header language flag doesn't set the user preference in BE (#…
daniele-mng Aug 28, 2024
49657d7
Add feedback notification for feed sync (#4120)
daniele-mng Sep 5, 2024
299125a
Icons and main menu and active tabs (#4098)
daniele-mng Sep 6, 2024
638cf34
fix: footer at bottom of the page (#4153)
daniele-mng Sep 9, 2024
2cce73f
Fix opensight Icons (#4160)
daniele-mng Sep 10, 2024
28cac79
change: update from main
daniele-mng Sep 9, 2024
60f2739
update test
daniele-mng Sep 10, 2024
82e0a08
Merge branch 'main' into update-from-main
daniele-mng Sep 23, 2024
956c893
fixes router v6
daniele-mng Sep 24, 2024
a6b9506
fix tests
daniele-mng Sep 24, 2024
89efc29
fix audit components and tests
daniele-mng Sep 24, 2024
3e4c81e
address comments
daniele-mng Sep 24, 2024
40e19d4
Merge pull request #4159 from greenbone/update-from-main
daniele-mng Sep 25, 2024
4d67f0a
change: add confirmation dialog for trashcan
daniele-mng Sep 25, 2024
4664dea
Merge pull request #4165 from greenbone/improve-empty-trashcan-btn-op…
daniele-mng Sep 27, 2024
bebbf43
deps: bump dependencies and devDependencies (11)
daniele-mng Sep 27, 2024
674a388
Merge pull request #4167 from greenbone/update-packages
daniele-mng Sep 27, 2024
830cc44
Add: Appliance logo in the app header
daniele-mng Sep 4, 2024
1f78c72
Add: logo for VM
daniele-mng Sep 30, 2024
6301c72
fix: hide theme switch from app header
daniele-mng Sep 30, 2024
546254c
add: appliance model to page title
daniele-mng Oct 1, 2024
48a2292
Merge pull request #4150 from greenbone/Add-Appliance-logo-in-the-app…
daniele-mng Oct 2, 2024
a2534c6
deps: bump dependencies and devDependencies (19)
daniele-mng Oct 7, 2024
5fabb0a
fix: add loading state to handle authentication status check
daniele-mng Oct 8, 2024
a0de56d
Merge pull request #4182 from greenbone/fix-add-loading-state-to-hand…
daniele-mng Oct 9, 2024
ed32a25
Merge branch 'opensight-ui' into deps-bump-dependencies-and-devDepend…
daniele-mng Oct 9, 2024
23dc9df
Merge pull request #4181 from greenbone/deps-bump-dependencies-and-de…
daniele-mng Oct 9, 2024
daeac9a
fix: reject request error in authorized.jsx
daniele-mng Oct 9, 2024
3988553
add: enhance error message with feed owner and feed resurce access
daniele-mng Oct 9, 2024
2d64a3f
add: tests enhanced reject error for missing feed details
daniele-mng Oct 10, 2024
d872a7e
add: make conditions more specific
daniele-mng Oct 15, 2024
4079463
Automatic release to 24.0.0
greenbonebot Oct 16, 2024
d5c6502
Automatic adjustments after release [skip ci]
greenbonebot Oct 16, 2024
532c646
add: user settings time and date format
daniele-mng Aug 29, 2024
d974f68
change dateTimeWithTimeZone
daniele-mng Aug 29, 2024
44d3778
change shortDate
daniele-mng Aug 29, 2024
721f75f
change longDate
daniele-mng Aug 29, 2024
fea5b36
add translation and sys default
daniele-mng Aug 30, 2024
109bba5
update dialog for sys default
daniele-mng Aug 30, 2024
c7b3f4b
address comments
daniele-mng Sep 2, 2024
f49afb2
Merge pull request #4144 from greenbone/Add-user-setting-time-date-fo…
a-h-abdelsalam Oct 16, 2024
e71a454
Change: Enable EPSS toggle
a-h-abdelsalam Oct 16, 2024
d5579dd
Merge pull request #4184 from greenbone/enable-epss-toggle
a-h-abdelsalam Oct 16, 2024
ab016a6
Automatic release to 24.0.1
greenbonebot Oct 16, 2024
a0d5ec2
Automatic adjustments after release [skip ci]
greenbonebot Oct 16, 2024
f4393fb
Merge branch 'opensight-ui' into add-enhance-error-feed-for-missing-d…
a-h-abdelsalam Oct 22, 2024
bfbd85a
Merge pull request #4183 from greenbone/add-enhance-error-feed-for-mi…
a-h-abdelsalam Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
218 changes: 218 additions & 0 deletions .docker/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
name: gsa-opensight-ui

services:
vulnerability-tests:
image: greenbone/vulnerability-tests
environment:
STORAGE_PATH: /var/lib/openvas/22.04/vt-data/nasl
volumes:
- vt_data_vol:/mnt

notus-data:
image: greenbone/notus-data
volumes:
- notus_data_vol:/mnt

scap-data:
image: greenbone/scap-data
volumes:
- scap_data_vol:/mnt

cert-bund-data:
image: greenbone/cert-bund-data
volumes:
- cert_data_vol:/mnt

dfn-cert-data:
image: greenbone/dfn-cert-data
volumes:
- cert_data_vol:/mnt
depends_on:
- cert-bund-data

data-objects:
image: greenbone/data-objects
volumes:
- data_objects_vol:/mnt

report-formats:
image: greenbone/report-formats
volumes:
- data_objects_vol:/mnt
depends_on:
- data-objects

gpg-data:
image: greenbone/gpg-data
volumes:
- gpg_data_vol:/mnt

redis-server:
image: greenbone/redis-server
restart: on-failure
volumes:
- redis_socket_vol:/run/redis/

pg-gvm:
image: greenbone/pg-gvm:edge
restart: on-failure
volumes:
- psql_data_vol:/var/lib/postgresql
- psql_socket_vol:/var/run/postgresql

gvmd:
image: greenbone/gvmd:edge
restart: on-failure
volumes:
- gvmd_data_vol:/var/lib/gvm
- scap_data_vol:/var/lib/gvm/scap-data/
- cert_data_vol:/var/lib/gvm/cert-data
- data_objects_vol:/var/lib/gvm/data-objects/gvmd
- vt_data_vol:/var/lib/openvas/plugins
- psql_data_vol:/var/lib/postgresql
- gvmd_socket_vol:/run/gvmd
- ospd_openvas_socket_vol:/run/ospd
- psql_socket_vol:/var/run/postgresql
depends_on:
pg-gvm:
condition: service_started
scap-data:
condition: service_completed_successfully
cert-bund-data:
condition: service_completed_successfully
dfn-cert-data:
condition: service_completed_successfully
data-objects:
condition: service_completed_successfully
report-formats:
condition: service_completed_successfully

gsa:
image: ghcr.io/greenbone/gsa:opensight-ui
restart: on-failure
ports:
- 80:80
volumes:
- gvmd_socket_vol:/run/gvmd
depends_on:
- gvmd

# Sets log level of openvas to the set LOG_LEVEL within the env
# and changes log output to /var/log/openvas instead /var/log/gvm
# to reduce likelyhood of unwanted log interferences
configure-openvas:
image: greenbone/openvas-scanner:stable
volumes:
- openvas_data_vol:/mnt
- openvas_log_data_vol:/var/log/openvas
command:
- /bin/sh
- -c
- |
printf "table_driven_lsc = yes\nopenvasd_server = http://openvasd:80\n" > /mnt/openvas.conf
sed "s/127/128/" /etc/openvas/openvas_log.conf | sed 's/gvm/openvas/' > /mnt/openvas_log.conf
chmod 644 /mnt/openvas.conf
chmod 644 /mnt/openvas_log.conf
touch /var/log/openvas/openvas.log
chmod 666 /var/log/openvas/openvas.log

# shows logs of openvas
openvas:
image: greenbone/openvas-scanner:stable
restart: on-failure
volumes:
- openvas_data_vol:/etc/openvas
- openvas_log_data_vol:/var/log/openvas
command:
- /bin/sh
- -c
- |
cat /etc/openvas/openvas.conf
tail -f /var/log/openvas/openvas.log
depends_on:
configure-openvas:
condition: service_completed_successfully

openvasd:
image: greenbone/openvas-scanner:stable
restart: on-failure
environment:
# `service_notus` is set to disable everything but notus,
# if you want to utilize openvasd directly removed `OPENVAS_MOD`
OPENVASD_MOD: service_notus
GNUPGHOME: /etc/openvas/gnupg
LISTENING: 0.0.0.0:80
volumes:
- openvas_data_vol:/etc/openvas
- openvas_log_data_vol:/var/log/openvas
- gpg_data_vol:/etc/openvas/gnupg
- notus_data_vol:/var/lib/notus
# enable port forwarding when you want to use the http api from your host machine
# ports:
# - 127.0.0.1:3000:80
depends_on:
vulnerability-tests:
condition: service_completed_successfully
configure-openvas:
condition: service_completed_successfully
gpg-data:
condition: service_completed_successfully
networks:
default:
aliases:
- openvasd

ospd-openvas:
image: greenbone/ospd-openvas:stable
restart: on-failure
hostname: ospd-openvas.local
cap_add:
- NET_ADMIN # for capturing packages in promiscuous mode
- NET_RAW # for raw sockets e.g. used for the boreas alive detection
security_opt:
- seccomp=unconfined
- apparmor=unconfined
command:
[
'ospd-openvas',
'-f',
'--config',
'/etc/gvm/ospd-openvas.conf',
'--notus-feed-dir',
'/var/lib/notus/advisories',
'-m',
'666',
]
volumes:
- gpg_data_vol:/etc/openvas/gnupg
- vt_data_vol:/var/lib/openvas/plugins
- notus_data_vol:/var/lib/notus
- ospd_openvas_socket_vol:/run/ospd
- redis_socket_vol:/run/redis/
- openvas_data_vol:/etc/openvas
- openvas_log_data_vol:/var/log/openvas
depends_on:
redis-server:
condition: service_started
gpg-data:
condition: service_completed_successfully
vulnerability-tests:
condition: service_completed_successfully
configure-openvas:
condition: service_completed_successfully

volumes:
gpg_data_vol:
scap_data_vol:
cert_data_vol:
data_objects_vol:
gvmd_data_vol:
psql_data_vol:
vt_data_vol:
notus_data_vol:
psql_socket_vol:
gvmd_socket_vol:
ospd_openvas_socket_vol:
redis_socket_vol:
openvas_data_vol:
openvas_log_data_vol:
2 changes: 2 additions & 0 deletions .github/workflows/ci-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- main
- opensight-ui
pull_request:
branches:
- main
- opensight-ui

jobs:
testing:
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,20 @@ jobs:
build-args: |
VERSION=${{ steps.container-opts.outputs.version }}
file: .docker/prod.Dockerfile
platforms: linux/amd64,linux/arm64
platforms: ${{ steps.container-opts.outputs.version == 'edge' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

deployment:
name: Deploy with Docker Compose
needs: images
runs-on: self-hosted-persist-gsa01
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Docker compose
working-directory: ./.docker
run: |
docker compose pull
docker compose up -d --remove-orphans
docker image prune -f
3 changes: 3 additions & 0 deletions allowedSnakeCase.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@
'family_list',
'feed_event',
'feed_type',
'feed_owner_set',
'feed_resources_access',

Check warning on line 180 in allowedSnakeCase.cjs

View check run for this annotation

Codecov / codecov/patch

allowedSnakeCase.cjs#L179-L180

Added lines #L179 - L180 were not covered by tests
'field_value',
'filtered_count',
'filter_func',
Expand Down Expand Up @@ -625,6 +627,7 @@
'start_minute',
'start_time',
'start_timezone',
'sync_not_available',

Check warning on line 630 in allowedSnakeCase.cjs

View check run for this annotation

Codecov / codecov/patch

allowedSnakeCase.cjs#L630

Added line #L630 was not covered by tests
'subgroup_column',
'subject_dn',
'subject_type',
Expand Down
23 changes: 21 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/img/favicon.png" type="image/png"/>
<link rel="icon" href="/img/favicon.png" type="image/png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Greenbone Security Assistant</title>
<script type="text/javascript" src="/config.js"></script>
Expand All @@ -11,5 +11,24 @@
<div id="app"></div>
<div id="portals"></div>
<script type="module" src="/src/index.jsx"></script>
<script>
window.addEventListener('DOMContentLoaded', () => {
try {
const vendorLabel = config.vendorLabel;

const match = vendorLabel.match(/gsm-(\w+)_label\.svg/);
if (match) {
let labelPart = match[1];
if (isNaN(labelPart)) {
labelPart = labelPart.toUpperCase();
}
const pageTitle = `Greenbone - ${labelPart}`;
document.title = pageTitle;
} else {
document.title = 'Greenbone Security Assistant';
}
} catch (error) {}
});
</script>
</body>
</html>
4 changes: 3 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
"baseUrl": "src",
"paths": {
"gmp/*": ["./gmp/*"],
"web/*": ["./web/*"]
"web/*": ["./web/*"],
"@gsa/testing": ["./testing"]
}
},
"include": ["src/**/*"],
"exclude": ["build", "coverage", "node_modules"],
"typeAcquisition": {
"enable": true
Expand Down
Loading