Skip to content

Commit

Permalink
MID-6271 ace editor worker-xml.js loading fixed + minor typo in tomca…
Browse files Browse the repository at this point in the history
…t root valve
  • Loading branch information
1azyman committed May 25, 2022
1 parent 3e02928 commit d209748
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions gui/admin-gui/src/frontend/js/vendors.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,12 @@ ace.config.setModuleUrl('ace/ext/searchbox',
require('../../../node_modules/ace-builds/src-noconflict/ext-searchbox.js'));

// ace.config.setModuleUrl('ace/mode/xml_worker', require('../../../node_modules/ace-builds/src-noconflict/worker-xml.js'));
ace.config.setModuleUrl('ace/mode/xml_worker',
require('file-loader?publicPath=../../static/&name=[name].[ext]&esModule=false!../../../node_modules/ace-builds/src-noconflict/worker-xml.js'));
require('file-loader?publicPath=../../static/&name=[name].[ext]&esModule=false!../../../node_modules/ace-builds/src-noconflict/worker-xml.js')


// xml worker module is being loaded always using some url, it's different that theme and ext modules, therefore we'll compute
// <midpoint_context>/static/worker-xml.js from current script URL and use it to load correctly worker-xml.js script
var url = document.currentScript.src;
url = url.replace(/vendors.js/, "worker-xml.js");

ace.config.setModuleUrl('ace/mode/xml_worker', url);
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public class TomcatRootValve extends ValveBase {

private String servletPath;

public TomcatRootValve(String serlvetPath) {
public TomcatRootValve(String servletPath) {
super();

this.servletPath = serlvetPath == null ? "" : serlvetPath;
this.servletPath = servletPath == null ? "" : servletPath;
}

@Override
Expand Down

0 comments on commit d209748

Please sign in to comment.