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
3 changed files with 7 additions and 0 deletions

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';