Debug autostart plugins.

This commit is contained in:
Julia Radzhabova 2017-09-13 14:35:20 +03:00
parent 2e36f36dbe
commit 28b92b60f7
3 changed files with 27 additions and 21 deletions

View file

@ -1895,12 +1895,17 @@ define([
} }
}); });
if (arr.length>0) if (arr.length>0) {
var autostart = plugins.autostart || plugins.autoStartGuid;
if (typeof (autostart) == 'string')
autostart = [autostart];
plugins.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration.");
this.updatePluginsList({ this.updatePluginsList({
autoStartGuid: plugins.autoStartGuid, autostart: autostart,
autostart: plugins.autostart,
pluginsData: arr pluginsData: arr
}, !!uiCustomize); }, !!uiCustomize);
}
}, },
updatePluginsList: function(plugins, uiCustomize) { updatePluginsList: function(plugins, uiCustomize) {
@ -1962,10 +1967,7 @@ define([
} }
if (this.appOptions.canPlugins) { if (this.appOptions.canPlugins) {
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions); this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions);
if (plugins.autoStartGuid) { if (plugins.autostart && plugins.autostart.length>0) {
console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration.");
this.api.asc_pluginRun(plugins.autoStartGuid, 0, '');
} else if (plugins.autostart && plugins.autostart.length>0) {
// run array of plugins // run array of plugins
this.api.asc_pluginRun(plugins.autostart[0], 0, ''); this.api.asc_pluginRun(plugins.autostart[0], 0, '');
} }

View file

@ -1664,12 +1664,17 @@ define([
} }
}); });
if (arr.length>0) if (arr.length>0) {
var autostart = plugins.autostart || plugins.autoStartGuid;
if (typeof (autostart) == 'string')
autostart = [autostart];
plugins.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration.");
this.updatePluginsList({ this.updatePluginsList({
autoStartGuid: plugins.autoStartGuid, autostart: autostart,
autostart: plugins.autostart,
pluginsData: arr pluginsData: arr
}, !!uiCustomize); }, !!uiCustomize);
}
}, },
updatePluginsList: function(plugins, uiCustomize) { updatePluginsList: function(plugins, uiCustomize) {
@ -1734,10 +1739,7 @@ define([
} }
if (this.appOptions.canPlugins) { if (this.appOptions.canPlugins) {
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions); this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions);
if (plugins.autoStartGuid) { if (plugins.autostart && plugins.autostart.length>0) {
console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration.");
this.api.asc_pluginRun(plugins.autoStartGuid, 0, '');
} else if (plugins.autostart && plugins.autostart.length>0) {
// run array of plugins // run array of plugins
this.api.asc_pluginRun(plugins.autostart[0], 0, ''); this.api.asc_pluginRun(plugins.autostart[0], 0, '');
} }

View file

@ -1859,12 +1859,17 @@ define([
} }
}); });
if (arr.length>0) if (arr.length>0) {
var autostart = plugins.autostart || plugins.autoStartGuid;
if (typeof (autostart) == 'string')
autostart = [autostart];
plugins.autoStartGuid && console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration.");
this.updatePluginsList({ this.updatePluginsList({
autoStartGuid: plugins.autoStartGuid, autostart: autostart,
autostart: plugins.autostart,
pluginsData: arr pluginsData: arr
}, !!uiCustomize); }, !!uiCustomize);
}
}, },
updatePluginsList: function(plugins, uiCustomize) { updatePluginsList: function(plugins, uiCustomize) {
@ -1928,10 +1933,7 @@ define([
} }
if (this.appOptions.canPlugins) { if (this.appOptions.canPlugins) {
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions); this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions);
if (plugins.autoStartGuid) { if (plugins.autostart && plugins.autostart.length>0) {
console.warn("Obsolete: The autoStartGuid parameter is deprecated. Please check the documentation for new plugin connection configuration.");
this.api.asc_pluginRun(plugins.autoStartGuid, 0, '');
} else if (plugins.autostart && plugins.autostart.length>0) {
// run array of plugins // run array of plugins
this.api.asc_pluginRun(plugins.autostart[0], 0, ''); this.api.asc_pluginRun(plugins.autostart[0], 0, '');
} }