Skip to content

Commit

Permalink
Merge branch 'opensight-ui' into rebase-opensight-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-mng committed Aug 20, 2024
2 parents 7ee4347 + 3fb6c23 commit 0334c01
Show file tree
Hide file tree
Showing 135 changed files with 356 additions and 502 deletions.
137 changes: 21 additions & 116 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"d3-scale": "^4.0.2",
"d3-shape": "^3.2.0",
"downshift": "^9.0.7",
"eslint-plugin-header": "^3.1.1",
"fast-deep-equal": "^3.1.3",
"fast-xml-parser": "^4.4.1",
"history": "^4.10.1",
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import {RELEASE_VERSION} from '../version';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/cancel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


/*
* The CancelToken class is based on the cancelable-promises tc39 proposal
*
Expand Down
1 change: 0 additions & 1 deletion src/gmp/collection/collectioncounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {isDefined} from '../utils/identity';

import {parseInt} from '../parser.js';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/certbund.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {isDefined} from 'gmp/utils/identity';

import InfoEntitiesCommand from './infoentities';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import logger from 'gmp/log';

import {trace} from 'gmp/utils/trace';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/cves.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {isDefined} from 'gmp/utils/identity';

import InfoEntitiesCommand from './infoentities';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/dfncert.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {isDefined} from 'gmp/utils/identity';

import InfoEntitiesCommand from './infoentities';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {isDefined} from 'gmp/utils/identity';

import logger from 'gmp/log';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


class HttpCommand {
constructor(http, params = {}) {
this.http = http;
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/infoentities.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {
parseCollectionList,
parseInfoEntities,
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/license.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import registerCommand from 'gmp/command';

import {License} from 'gmp/models/license';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/nvt.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {isDefined} from 'gmp/utils/identity';

import InfoEntitiesCommand from './infoentities';
Expand Down
5 changes: 2 additions & 3 deletions src/gmp/commands/nvtfamilies.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ export class NvtFamiliesCommand extends GmpCommand {
get(params, options) {
return this.httpGet(params, options).then(response => {
const {data} = response;
const {
family: families,
} = data.get_nvt_families.get_nvt_families_response.families;
const {family: families} =
data.get_nvt_families.get_nvt_families_response.families;
return response.set(
map(families, family => ({
name: family.name,
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/policies.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import logger from 'gmp/log';

import {forEach, map} from 'gmp/utils/array';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/resourcenames.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import registerCommand from 'gmp/command';

import ResourceName from 'gmp/models/resourcename';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import registerCommand from 'gmp/command';

import logger from 'gmp/log';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/scanconfigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import logger from 'gmp/log';

import {forEach, map} from 'gmp/utils/array';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/commands/testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {testing} from '@gsa/testing';

import Response from 'gmp/http/response';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/gmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {isDefined} from 'gmp/utils/identity';
import {isEmpty} from 'gmp/utils/string';

Expand Down
1 change: 0 additions & 1 deletion src/gmp/gmpsettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {isDefined} from './utils/identity';

export const DEFAULT_RELOAD_INTERVAL = 15 * 1000; // fifteen seconds
Expand Down
1 change: 0 additions & 1 deletion src/gmp/http/transform/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


const noop = arg => arg;

const noopObject = {
Expand Down
34 changes: 18 additions & 16 deletions src/gmp/http/transform/xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,24 @@ import {isDefined} from 'gmp/utils/identity';

import Rejection from 'gmp/http//rejection';

export const success = transform => (response, options = {}) => {
try {
return transform(response);
} catch (error) {
throw new Rejection(
response.xhr,
Rejection.REASON_ERROR,
_(
'An error occurred while converting gmp response to js for ' +
'url {{- url}}',
{url: options.url},
),
error,
);
}
};
export const success =
transform =>
(response, options = {}) => {
try {
return transform(response);
} catch (error) {
throw new Rejection(
response.xhr,
Rejection.REASON_ERROR,
_(
'An error occurred while converting gmp response to js for ' +
'url {{- url}}',
{url: options.url},
),
error,
);
}
};

export const rejection = transform => (rej, options) => {
if (rej.isError && rej.isError()) {
Expand Down
1 change: 0 additions & 1 deletion src/gmp/http/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {isDefined} from 'gmp/utils/identity';

export const buildUrlParams = params => {
Expand Down
1 change: 0 additions & 1 deletion src/gmp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import Gmp from 'gmp/gmp';

export default Gmp;
Expand Down
1 change: 0 additions & 1 deletion src/gmp/locale/__tests__/languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import {isString} from 'gmp/utils/identity';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/locale/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import i18next from 'i18next';
import HttpBackend from 'i18next-http-backend';
import {initReactI18next} from 'react-i18next';
Expand Down
5 changes: 2 additions & 3 deletions src/gmp/locale/languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


export const BROWSER_LANGUAGE = 'Browser Language';

export const getLanguageCodes = () => Object.keys(Languages);
Expand All @@ -17,8 +16,8 @@ const Languages = {
name: 'English',
native_name: 'English',
},
zh_TW: {
name: 'Traditional Chinese',
zh_TW: {
name: 'Traditional Chinese',
native_name: '繁體中文',
},
};
Expand Down
1 change: 0 additions & 1 deletion src/gmp/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {isDefined, isString} from 'gmp/utils/identity';

export const DEFAULT_LOG_LEVEL = 'error';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import Model from 'gmp/model';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import Asset from 'gmp/models/asset';
import {testModel} from 'gmp/models/testing';

Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/certbund.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import CertBundAdv from 'gmp/models/certbund';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/cpe.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import Cpe from 'gmp/models/cpe';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/credential.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import {setLocale} from 'gmp/locale/lang';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/cve.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import Cve from 'gmp/models/cve';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/dfncert.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import DfnCertAdv from 'gmp/models/dfncert';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import Info from 'gmp/models/info';
import {testModel} from 'gmp/models/testing';

Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/license.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import {parseDate} from 'gmp/parser';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/nvt.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import Nvt, {getRefs, hasRefType, getFilteredRefIds} from 'gmp/models/nvt';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import Model from 'gmp/model';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/reportconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import ReportConfig from 'gmp/models/reportconfig';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/reportformat.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import Model from 'gmp/model';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/resourcename.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import {ResourceName} from '../resourcename';
Expand Down
1 change: 0 additions & 1 deletion src/gmp/models/__tests__/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/


import {describe, test, expect} from '@gsa/testing';

import Model from 'gmp/model';
Expand Down
Loading

0 comments on commit 0334c01

Please sign in to comment.