diff --git a/src/gmp/commands/reportformats.js b/src/gmp/commands/reportformats.js index c6b8418a74..034ec893f5 100644 --- a/src/gmp/commands/reportformats.js +++ b/src/gmp/commands/reportformats.js @@ -41,7 +41,7 @@ class ReportFormatCommand extends EntityCommand { } save(args) { - const {active, id, id_lists = {}, name, preferences = {}, summary} = args; + const {active, id, name, summary} = args; const data = { cmd: 'save_report_format', @@ -50,19 +50,6 @@ class ReportFormatCommand extends EntityCommand { name, summary, }; - for (const prefname in preferences) { - const prefix = 'preference:nvt[string]:'; // only the format of the prefix is important - data[prefix + prefname] = preferences[prefname]; - } - - const id_list = []; - for (const lname in id_lists) { - data['include_id_list:' + lname] = 1; - for (const val of id_lists[lname]) { - id_list.push(lname + ':' + val); - } - } - data['id_list:'] = id_list; log.debug('Saving report format', args, data); return this.action(data); diff --git a/src/web/pages/reportformats/dialog.jsx b/src/web/pages/reportformats/dialog.jsx index c6541f0d5b..a451625997 100644 --- a/src/web/pages/reportformats/dialog.jsx +++ b/src/web/pages/reportformats/dialog.jsx @@ -20,8 +20,7 @@ import React from 'react'; import _ from 'gmp/locale'; -import {isDefined, isArray, hasValue} from 'gmp/utils/identity'; -import {map} from 'gmp/utils/array'; +import {isDefined} from 'gmp/utils/identity'; import PropTypes from 'web/utils/proptypes'; @@ -29,155 +28,17 @@ import SaveDialog from 'web/components/dialog/savedialog'; import FileField from 'web/components/form/filefield'; import FormGroup from 'web/components/form/formgroup'; -import Spinner from 'web/components/form/spinner'; -import TextArea from 'web/components/form/textarea'; import TextField from 'web/components/form/textfield'; -import MultiSelect from 'web/components/form/multiselect'; -import Select from 'web/components/form/select'; import YesNoRadio from 'web/components/form/yesnoradio'; import Layout from 'web/components/layout/layout'; -import Table from 'web/components/table/table'; -import TableBody from 'web/components/table/body'; -import TableData from 'web/components/table/data'; -import TableHeader from 'web/components/table/header'; -import TableHead from 'web/components/table/head'; -import TableRow from 'web/components/table/row'; - -const ReportFormatListParam = ({formats, idList, name, onValueChange}) => { - const formatOptions = map(formats, format => ({ - label: format.name, - value: format.id, - })); - - return ( - - {name} - - - - - ); -}; - -ReportFormatListParam.propTypes = { - formats: PropTypes.array.isRequired, - idList: PropTypes.array.isRequired, - name: PropTypes.string.isRequired, - onValueChange: PropTypes.func.isRequired, -}; - -const Param = ({data, value, onPrefChange}) => { - const {name, type, min, max} = value; - const field_value = data[name]; - - let field; - if (type === 'boolean') { - field = ( - - ); - } else if (type === 'integer') { - field = ( - - ); - } else if (type === 'string') { - field = ( - - ); - } else if (type === 'selection') { - const typeOptions = map(value.options, opt => ({ - label: opt.name, - value: opt.value, - })); - - field = ( -