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

[AP1596] Add information about elevate credential being experimental #3091

Merged
merged 5 commits into from
Jul 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions gsa/public/locales/gsa-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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!",
Expand Down
26 changes: 26 additions & 0 deletions gsa/src/web/components/icon/__tests__/infoicon.js
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/
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:
26 changes: 26 additions & 0 deletions gsa/src/web/components/icon/infoicon.js
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/
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:
28 changes: 28 additions & 0 deletions gsa/src/web/components/icon/svg/info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion gsa/src/web/pages/targets/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -390,7 +391,17 @@ const TargetDialog = ({
{state.ssh_credential_id !== UNSET_VALUE && (
<FormGroup title={' '}>
<Divider>
<Layout>{_('Elevate privileges')}</Layout>
<Layout>
<Divider>
<InfoIcon
title={_(
'This feature is experimental and may ' +
'not work reliable under all circumstances.',
)}
/>
<span>{_('Elevate privileges')}</span>
</Divider>
</Layout>
<Select
name="ssh_elevate_credential_id"
disabled={in_use}
Expand Down