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

Remove sort by credential from Target view #1300

Merged
merged 2 commits into from
Apr 23, 2019
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 @@ -41,6 +41,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix release build [#1259](https://github.com/greenbone/gsa/pull/1259), [#1265](https://github.com/greenbone/gsa/pull/1265)

### Removed
- Remove sort by credential from Target view [1300](https://github.com/greenbone/gsa/pull/1300)
- Remove fifth from schedule [#1279](https://github.com/greenbone/gsa/pull/1279)
- Removed obsolete CLI arguments [#1265](https://github.com/greenbone/gsa/pull/1265)
- --login-label
Expand Down
48 changes: 1 addition & 47 deletions gsa/src/web/pages/targets/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ import {withEntitiesHeader} from 'web/entities/header';
import {createEntitiesTable} from 'web/entities/table';
import withRowDetails from 'web/entities/withRowDetails';

import Select from 'web/components/form/select';

import Divider from 'web/components/layout/divider';

import Sort from 'web/components/sortby/sortby';

import TableHead from 'web/components/table/head';
import TableHeader from 'web/components/table/header';
import TableRow from 'web/components/table/row';
Expand All @@ -49,16 +43,6 @@ const Header = ({
currentSortDir,
onSortChange,
}) => {
let selectSort = 'ssh_credential';
const sortBy = filter ? filter.getSortBy() : undefined;

if (
sortBy === 'smb_credential' ||
sortBy === 'esxi_credential' ||
sortBy === 'snmp_credential'
) {
selectSort = sortBy;
}
return (
<TableHeader>
<TableRow>
Expand Down Expand Up @@ -98,37 +82,7 @@ const Header = ({
>
{_('Port List')}
</TableHead>
<TableHead width="22%">
<Divider>
<Sort by={sort ? selectSort : false} onClick={onSortChange}>
{_('Credentials')}
</Sort>
{sort !== false && (
<Select
items={[
{
value: 'ssh_credential',
label: _('SSH'),
},
{
value: 'smb_credential',
label: _('SMB'),
},
{
value: 'esxi_credential',
label: _('ESXi'),
},
{
value: 'snmp_credential',
label: _('SNMP'),
},
]}
value={selectSort}
onChange={onSortChange}
/>
)}
</Divider>
</TableHead>
<TableHead width="15%">{_('Credentials')}</TableHead>
{actionsColumn}
</TableRow>
</TableHeader>
Expand Down