context-path 대응 추가 수정

This commit is contained in:
현성필
2024-01-24 13:33:03 +09:00
parent be1053d832
commit 1a0a32d427
14 changed files with 3705 additions and 10 deletions
+5 -2
View File
@@ -8,13 +8,16 @@
class APIClient {
CLIENT_URL = 'mgmt/api/test.do';
CLIENT_URL = '/mgmt/api/test.do';
constructor(contextPath) {
window.globals = {};
this.variables = {};
this.abortController = null;
this.contextPath = contextPath || '/';
this.contextPath = document.querySelector('meta[name="context-path"]').getAttribute('content');
if (!this.contextPath) {
this.contextPath = '/';
}
}
getClientUrl() {
+9 -4
View File
@@ -3,17 +3,22 @@ import APIScenario from "./APIScenario";
window.MonacoEnvironment = {
getWorkerUrl: function (moduleId, label) {
let contextPath = document.querySelector('meta[name="context-path"]').getAttribute('content');
if (!contextPath) {
contextPath = '/';
}
if (label === 'json') {
return '/plugins/apitestmanager/json.worker.bundle.js';
return contextPath + '/plugins/apitestmanager/json.worker.bundle.js';
}
if (label === 'css' || label === 'scss' || label === 'less') {
return '/plugins/apitestmanager/css.worker.bundle.js';
return contextPath + '/plugins/apitestmanager/css.worker.bundle.js';
}
if (label === 'html' || label === 'handlebars' || label === 'razor') {
return '/plugins/apitestmanager/html.worker.bundle.js';
return contextPath + '/plugins/apitestmanager/html.worker.bundle.js';
}
if (label === 'typescript' || label === 'javascript') {
return '/plugins/apitestmanager/ts.worker.bundle.js';
return contextPath + '/plugins/apitestmanager/ts.worker.bundle.js';
}
return '/plugins/apitestmanager/editor.worker.bundle.js';
}