diff --git a/CHANGELOG.md b/CHANGELOG.md index 59f1b4bc3b..5df5cd1571 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [21.4.2] (unreleased) ### Added +- Added new InfoIcon and use it in TargetDialog for information about the elevate credential feature [#3091](https://github.com/greenbone/gsa/pull/3091) ### Changed - Changed defaults for installation locations [#3045](https://github.com/greenbone/gsa/pull/3045) - LOCALSTATEDIR is /var by default now diff --git a/gsa/public/locales/gsa-de.json b/gsa/public/locales/gsa-de.json index 4c302c88e8..598ece302f 100644 --- a/gsa/public/locales/gsa-de.json +++ b/gsa/public/locales/gsa-de.json @@ -1693,6 +1693,7 @@ "This CPE does not appear in the CPE dictionary but is referenced by one or more CVE.": "Diese CPE ist nicht im CPE-Dictionary, wird aber von einem oder mehreren CVE referenziert.", "This NVT is deprecated.": "Dieser NVT ist veraltet.", "This dialog will open a new window for {{- to}} if you click on \"follow link\". Following this link is on your own responsibility. Greenbone does not endorse the content you will see there.": "Dieser Dialog öffnet ein neues Fenster für {{-to}}, wenn Sie auf \"Link folgen\" klicken. Diesem Link zu folgen liegt in Ihrer Verantwortung. Greenbone hat keinen Einfluss auf den Inhalt, den Sie dort sehen werden.", + "This feature is experimental and may not work reliable under all circumstances.": "Dieses Feature ist experimentell und funktioniert eventuell nicht unter allen Bedingungen verlässlich.", "This form received invalid values. Please check the inputs and submit again.": "Dieses Formular erhielt ungültige Werte. Bitte überprüfen Sie Ihre Eingaben und senden sie erneut ab.", "This is an Alterable Audit. Reports may not relate to current Policy or Target!": "Dies ist ein änderbares Audit. Berichte könnten sich nicht auf die aktuelle Richtlinie oder das aktuelle Ziel beziehen!", "This is an Alterable Task. Reports may not relate to current Scan Config or Target!": "Dies ist eine änderbare Aufgabe. Berichte könnten sich nicht auf die aktuelle Scan-Konfiguration oder das aktuelle Ziel beziehen!", diff --git a/gsa/src/web/components/icon/__tests__/infoicon.js b/gsa/src/web/components/icon/__tests__/infoicon.js new file mode 100644 index 0000000000..d8af6cab35 --- /dev/null +++ b/gsa/src/web/components/icon/__tests__/infoicon.js @@ -0,0 +1,26 @@ +/* Copyright (C) 2021 Greenbone Networks GmbH + * + * SPDX-License-Identifier: AGPL-3.0-or-later + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +import {testIcon} from 'web/components/icon/testing'; + +import InfoIcon from '../infoicon'; + +describe('InfoIcon component tests', () => { + testIcon(InfoIcon); +}); + +// vim: set ts=2 sw=2 tw=80: diff --git a/gsa/src/web/components/icon/infoicon.js b/gsa/src/web/components/icon/infoicon.js new file mode 100644 index 0000000000..da926bf9c4 --- /dev/null +++ b/gsa/src/web/components/icon/infoicon.js @@ -0,0 +1,26 @@ +/* Copyright (C) 2021 Greenbone Networks GmbH + * + * SPDX-License-Identifier: AGPL-3.0-or-later + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +import withSvgIcon from './withSvgIcon'; + +import {ReactComponent as Icon} from './svg/info.svg'; + +const InfoIcon = withSvgIcon()(Icon); + +export default InfoIcon; + +// vim: set ts=2 sw=2 tw=80: diff --git a/gsa/src/web/components/icon/svg/info.svg b/gsa/src/web/components/icon/svg/info.svg new file mode 100644 index 0000000000..1a0f384a69 --- /dev/null +++ b/gsa/src/web/components/icon/svg/info.svg @@ -0,0 +1,28 @@ + + + + + + + + + + diff --git a/gsa/src/web/pages/targets/dialog.js b/gsa/src/web/pages/targets/dialog.js index 098ff880f5..034c1f5ad5 100644 --- a/gsa/src/web/pages/targets/dialog.js +++ b/gsa/src/web/pages/targets/dialog.js @@ -34,6 +34,7 @@ import Select from 'web/components/form/select'; import TextField from 'web/components/form/textfield'; import YesNoRadio from 'web/components/form/yesnoradio'; +import InfoIcon from 'web/components/icon/infoicon'; import NewIcon from 'web/components/icon/newicon'; import Divider from 'web/components/layout/divider'; @@ -390,7 +391,17 @@ const TargetDialog = ({ {state.ssh_credential_id !== UNSET_VALUE && ( - {_('Elevate privileges')} + + + + {_('Elevate privileges')} + +