allow plugin config changes on standalone
This commit is contained in:
@@ -308,7 +308,9 @@ class AppRouter {
|
||||
url = route.contentPath || route.path;
|
||||
}
|
||||
|
||||
if (url.indexOf('://') === -1) {
|
||||
if (url.includes('configurationpage')) {
|
||||
url = ApiClient.getUrl('/web' + url);
|
||||
} else if (url.indexOf('://') === -1) {
|
||||
// Put a slash at the beginning but make sure to avoid a double slash
|
||||
if (url.indexOf('/') !== 0) {
|
||||
url = '/' + url;
|
||||
|
||||
@@ -13,8 +13,9 @@ import 'css!components/viewManager/viewContainer';
|
||||
controllerUrl = controllerUrl.substring('__plugin/'.length);
|
||||
}
|
||||
|
||||
controllerUrl = Dashboard.getConfigurationResourceUrl(controllerUrl);
|
||||
return import(controllerUrl).then((ControllerFactory) => {
|
||||
controllerUrl = Dashboard.getPluginUrl(controllerUrl);
|
||||
let apiUrl = ApiClient.getUrl('/web/' + controllerUrl);
|
||||
return import(apiUrl).then((ControllerFactory) => {
|
||||
options.controllerFactory = ControllerFactory;
|
||||
});
|
||||
}
|
||||
@@ -32,7 +33,7 @@ import 'css!components/viewManager/viewContainer';
|
||||
pageIndex = 0;
|
||||
}
|
||||
|
||||
const isPluginpage = options.url.toLowerCase().indexOf('/configurationpage') !== -1;
|
||||
const isPluginpage = options.url.includes('configurationpage');
|
||||
const newViewInfo = normalizeNewView(options, isPluginpage);
|
||||
const newView = newViewInfo.elem;
|
||||
|
||||
@@ -243,4 +244,3 @@ export default {
|
||||
reset: reset,
|
||||
setOnBeforeChange: setOnBeforeChange
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user