Skip to content

Commit

Permalink
Merge pull request #1556 from bjoernricks/use-fast-xml-parser-by-default
Browse files Browse the repository at this point in the history
Use fast xml parser by default
  • Loading branch information
swaterkamp committed Aug 8, 2019
2 parents 34cf09d + 25e92ea commit ac781a8
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 69 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
[#1466](https://github.com/greenbone/gsa/pull/1466) [#1467](https://github.com/greenbone/gsa/pull/1467)

### Changed
- Use fast xml parser by default [#1556](https://github.com/greenbone/gsa/pull/1556)
- Updated dependencies [#1555](https://github.com/greenbone/gsa/pull/1555)
- Changed schedule dialog (added Now button) to help users jump to current time ASAP [#1519](https://github.com/greenbone/gsa/pull/1519)
- Changed the filter dialogues for tasks and overrides [#1511](https://github.com/greenbone/gsa/pull/1511)
Expand Down
1 change: 0 additions & 1 deletion gsa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ set (GSA_JS_SRC_FILES
${GSA_SRC_DIR}/src/gmp/http/response.js
${GSA_SRC_DIR}/src/gmp/http/transform/default.js
${GSA_SRC_DIR}/src/gmp/http/transform/fastxml.js
${GSA_SRC_DIR}/src/gmp/http/transform/x2js.js
${GSA_SRC_DIR}/src/gmp/http/utils.js
${GSA_SRC_DIR}/src/gmp/index.js
${GSA_SRC_DIR}/src/gmp/locale/date.js
Expand Down
3 changes: 1 addition & 2 deletions gsa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@
"redux-thunk": "^2.3.0",
"styled-components": "^4.3.1",
"uuid": "^3.3.2",
"whatwg-fetch": "^3.0.0",
"x2js": "^3.2.6"
"whatwg-fetch": "^3.0.0"
},
"scripts": {
"test": "react-scripts test",
Expand Down
5 changes: 2 additions & 3 deletions gsa/src/gmp/commands/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import Report from '../models/report';
import {ALL_FILTER} from '../models/filter';

import DefaultTransform from '../http/transform/default';
import FastXmlTransform from '../http/transform/fastxml';

import EntitiesCommand from './entities';
import EntityCommand from './entity';
Expand Down Expand Up @@ -123,7 +122,7 @@ class ReportCommand extends EntityCommand {
filter,
ignore_pagination: 1,
},
{...options, transform: FastXmlTransform},
options,
).then(this.transformResponse);
}

Expand All @@ -134,7 +133,7 @@ class ReportCommand extends EntityCommand {
filter,
ignore_pagination: 1,
},
{...options, transform: FastXmlTransform},
options,
).then(this.transformResponse);
}

Expand Down
8 changes: 4 additions & 4 deletions gsa/src/gmp/http/gmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
import Http from './http.js';
import {buildServerUrl} from './utils.js';
import Http from './http';
import {buildServerUrl} from './utils';

import X2JsTransform from './transform/x2js.js';
import transform from './transform/fastxml';

class GmpHttp extends Http {
constructor(settings) {
const {server, protocol, timeout} = settings;
const url = buildServerUrl(server, 'gmp', protocol);
super(url, {timeout, transform: X2JsTransform});
super(url, {timeout, transform});
this.settings = settings;
}

Expand Down
47 changes: 0 additions & 47 deletions gsa/src/gmp/http/transform/x2js.js

This file was deleted.

12 changes: 0 additions & 12 deletions gsa/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13214,13 +13214,6 @@ ws@^6.1.2:
dependencies:
async-limiter "~1.0.0"

x2js@^3.2.6:
version "3.2.6"
resolved "https://registry.yarnpkg.com/x2js/-/x2js-3.2.6.tgz#5be54bd5e65972c2886f0dcc178cbc75e9b42219"
integrity sha512-AtIflg7LRYhayFwujlyujD0qi9C9XwMkV6fHFOhc6FPqTvuVSDbUeFimbd91zO9QophYJsnaW4mz6p/U/MQ9rA==
dependencies:
xmldom "^0.1.19"

xml-name-validator@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
Expand All @@ -13236,11 +13229,6 @@ xmlchars@^2.1.1:
resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.1.1.tgz#ef1a81c05bff629c2280007f12daca21bd6f6c93"
integrity sha512-7hew1RPJ1iIuje/Y01bGD/mXokXxegAgVS+e+E0wSi2ILHQkYAH1+JXARwTjZSM4Z4Z+c73aKspEcqj+zPPL/w==

xmldom@^0.1.19:
version "0.1.27"
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9"
integrity sha1-1QH5ezvbQDr4757MIFcxh6rawOk=

xregexp@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020"
Expand Down

0 comments on commit ac781a8

Please sign in to comment.