From 8c4d8a07cdb9ed66f25f7b400fdf60a13f97f8e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Tue, 16 Apr 2024 14:57:44 +0200 Subject: [PATCH] Change: Update create and edit dialog to new UI layout Adjust create and edit dialogs for new UI components and layout. --- src/web/pages/audits/dialog.jsx | 256 +++--- src/web/pages/credentials/dialog.jsx | 141 ++- src/web/pages/filters/dialog.jsx | 23 +- src/web/pages/groups/dialog.jsx | 25 +- src/web/pages/hosts/dialog.jsx | 18 +- src/web/pages/ldap/dialog.jsx | 51 +- src/web/pages/notes/dialog.jsx | 75 +- src/web/pages/overrides/dialog.jsx | 226 +++-- src/web/pages/permissions/dialog.jsx | 142 +-- src/web/pages/permissions/multipledialog.jsx | 335 ++++--- src/web/pages/policies/dialog.jsx | 25 +- src/web/pages/portlists/dialog.jsx | 130 ++- src/web/pages/portlists/importdialog.jsx | 15 +- src/web/pages/portlists/portrangedialog.jsx | 26 +- src/web/pages/portlists/portrangestable.jsx | 5 +- src/web/pages/radius/dialog.jsx | 32 +- src/web/pages/reportconfigs/dialog.jsx | 71 +- src/web/pages/reportformats/dialog.jsx | 262 +++++- .../pages/reports/downloadreportdialog.jsx | 79 +- src/web/pages/reports/importdialog.jsx | 59 +- src/web/pages/reports/triggeralertdialog.jsx | 59 +- src/web/pages/roles/dialog.jsx | 34 +- src/web/pages/scanconfigs/dialog.jsx | 104 ++- .../scanconfigs/editconfigfamilydialog.jsx | 41 +- src/web/pages/scanconfigs/editdialog.jsx | 14 +- .../scanconfigs/editnvtdetailsdialog.jsx | 4 +- src/web/pages/scanconfigs/importdialog.jsx | 19 +- src/web/pages/scanconfigs/nvtfamilies.jsx | 6 +- src/web/pages/scanconfigs/nvtpreferences.jsx | 86 +- .../pages/scanconfigs/scannerpreferences.jsx | 8 +- src/web/pages/scanners/dialog.jsx | 94 +- src/web/pages/schedules/dayselect.jsx | 75 +- src/web/pages/schedules/dialog.jsx | 820 ++++++++---------- src/web/pages/schedules/monthdaysselect.jsx | 180 ++-- src/web/pages/schedules/timeunitselect.jsx | 23 +- src/web/pages/schedules/weekdayselect.jsx | 171 ++-- src/web/pages/tags/dialog.jsx | 12 +- src/web/pages/targets/dialog.jsx | 510 +++++------ .../pages/tasks/addresultstoassetsgroup.jsx | 5 +- .../pages/tasks/autodeletereportsgroup.jsx | 64 +- src/web/pages/tasks/containerdialog.jsx | 17 +- src/web/pages/tasks/dialog.jsx | 287 +++--- src/web/pages/tickets/createdialog.jsx | 32 +- src/web/pages/tickets/editdialog.jsx | 49 +- src/web/pages/users/confirmdeletedialog.jsx | 10 +- src/web/pages/users/dialog.jsx | 643 +++++++------- 46 files changed, 2622 insertions(+), 2741 deletions(-) diff --git a/src/web/pages/audits/dialog.jsx b/src/web/pages/audits/dialog.jsx index 4c09cad37b..6dd82bd07e 100644 --- a/src/web/pages/audits/dialog.jsx +++ b/src/web/pages/audits/dialog.jsx @@ -18,7 +18,7 @@ import React from 'react'; -import _ from 'gmp/locale'; +import styled from 'styled-components'; import {isDefined} from 'gmp/utils/identity'; import {selectSaveId} from 'gmp/utils/id'; @@ -39,7 +39,6 @@ import { } from 'gmp/models/scanner'; import PropTypes from 'web/utils/proptypes'; -import withCapabilities from 'web/utils/withCapabilities'; import {renderSelectItems, UNSET_VALUE} from 'web/utils/render'; import SaveDialog from 'web/components/dialog/savedialog'; @@ -54,12 +53,16 @@ import TextField from 'web/components/form/textfield'; import NewIcon from 'web/components/icon/newicon'; -import Divider from 'web/components/layout/divider'; -import Layout from 'web/components/layout/layout'; - import AddResultsToAssetsGroup from 'web/pages/tasks/addresultstoassetsgroup'; import AutoDeleteReportsGroup from 'web/pages/tasks/autodeletereportsgroup'; +import useTranslation from 'web/hooks/useTranslation'; +import useCapabilities from 'web/utils/useCapabilities'; + +const Title = styled.div` + flex-grow: 1; +`; + const getScanner = (scanners, scanner_id) => { if (!isDefined(scanners)) { return undefined; @@ -70,9 +73,14 @@ const getScanner = (scanners, scanner_id) => { }); }; -const ScannerSelect = props => { - const {changeAudit, isLoading, scannerId, scanners, onChange} = props; - +const ScannerSelect = ({ + changeAudit, + isLoading, + scannerId, + scanners, + onChange, +}) => { + const [_] = useTranslation(); return ( + - - - - - + + + - - - - - - - - - - - - + +