PhantomJS: Fix rendering of panels using Prometheus datasource

In 043bb59 a URLSearchParams usage was introduced which is not supported by PhantomJS. @babel/polyfill(deprecated) does not contain polyfill for URLSearchParams, hence the code (and Prometheus graphs rendering) was failing in PhantomJS environment.

The solution is to add https://www.npmjs.com/package/url-search-params-polyfill that takes care of the URLSearchParams
This commit is contained in:
Dominik Prokop 2020-01-23 13:10:38 +01:00 committed by GitHub
parent 87af7d9987
commit cdfac32dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -268,6 +268,7 @@
"tether-drop": "https://github.com/torkelo/drop/tarball/master",
"tinycolor2": "1.4.1",
"tti-polyfill": "0.2.2",
"url-search-params-polyfill": "7.0.1",
"whatwg-fetch": "3.0.0",
"xss": "1.0.3"
},

View File

@ -1,6 +1,7 @@
import '@babel/polyfill';
import 'whatwg-fetch'; // fetch polyfill needed for PhantomJs rendering
import 'abortcontroller-polyfill/dist/polyfill-patch-fetch'; // fetch polyfill needed for PhantomJs rendering
import 'url-search-params-polyfill'; // fetch polyfill needed for PhantomJs rendering
import 'file-saver';
import 'lodash';
import 'jquery';

View File

@ -21744,6 +21744,11 @@ url-parse@^1.4.3:
querystringify "^2.1.1"
requires-port "^1.0.0"
url-search-params-polyfill@7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/url-search-params-polyfill/-/url-search-params-polyfill-7.0.1.tgz#b900cd9a0d9d2ff757d500135256f2344879cbff"
integrity sha512-bAw7L2E+jn9XHG5P9zrPnHdO0yJub4U+yXJOdpcpkr7OBd9T8oll4lUos0iSGRcDvfZoLUKfx9a6aNmIhJ4+mQ==
url@0.11.0, url@^0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"