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
Changes from 1 commit
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
Next Next commit
Remove sort by credential type from Target view
  • Loading branch information
sarahd93 committed Apr 23, 2019
commit f0eddb102890fe2ff8f13aa4df4e460417705401
48 changes: 1 addition & 47 deletions gsa/src/web/pages/targets/table.js
Original file line number Diff line number Diff line change
@@ -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';
@@ -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>
@@ -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>