mirror of https://github.com/apache/cloudstack.git
Merge branch 'master' into ui-cisco-asa1000v-support
This commit is contained in:
commit
f0941420e9
16
pom.xml
16
pom.xml
|
|
@ -237,6 +237,22 @@
|
|||
<defaultGoal>install</defaultGoal>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default</id>
|
||||
<goals>
|
||||
<goal>perform</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<pomFileName>pom.xml</pomFileName>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings
|
||||
only. It has no influence on the Maven build itself. -->
|
||||
<plugin>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@
|
|||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
(function($, cloudStack, require) {
|
||||
if (!cloudStack.pluginAPI) cloudStack.pluginAPI = {};
|
||||
if (!cloudStack.pluginAPI) {
|
||||
cloudStack.pluginAPI = {};
|
||||
}
|
||||
|
||||
var loadCSS = function(path) {
|
||||
var $link = $('<link>');
|
||||
|
|
@ -40,7 +42,7 @@
|
|||
error: function(json) {
|
||||
args.error(parseXMLHttpResponse(json));
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
addSection: function(section) {
|
||||
cloudStack.sections[section.id] = $.extend(section, {
|
||||
|
|
@ -58,49 +60,40 @@
|
|||
show: cloudStack.uiCustom.pluginListing
|
||||
};
|
||||
|
||||
// Load plugins
|
||||
$(cloudStack.plugins).map(function(index, pluginID) {
|
||||
var basePath = 'plugins/' + pluginID + '/';
|
||||
var pluginJS = basePath + pluginID + '.js';
|
||||
var configJS = basePath + 'config.js';
|
||||
var pluginCSS = basePath + pluginID + '.css';
|
||||
// Load
|
||||
$(['modules', 'plugins']).each(function() {
|
||||
var type = this;
|
||||
var paths = $(cloudStack[type]).map(function(index, id) {
|
||||
return type + '/' + id + '/' + id;
|
||||
}).toArray();
|
||||
|
||||
require([pluginJS], function() {
|
||||
require([configJS]);
|
||||
loadCSS(pluginCSS);
|
||||
// Load modules
|
||||
require(
|
||||
paths,
|
||||
function() {
|
||||
$(cloudStack[type]).map(function(index, id) {
|
||||
var basePath = type + '/' + id + '/';
|
||||
var css = basePath + id + '.css';
|
||||
var configJS = type == 'plugins' ? basePath + 'config' : null;
|
||||
|
||||
// Execute plugin
|
||||
cloudStack.plugins[pluginID](
|
||||
$.extend(true, {}, cloudStack.pluginAPI, {
|
||||
pluginAPI: {
|
||||
extend: function(api) {
|
||||
cloudStack.pluginAPI[pluginID] = api;
|
||||
}
|
||||
if (configJS) {
|
||||
// Load config metadata
|
||||
require([configJS]);
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
// Load modules
|
||||
$(cloudStack.modules).map(function(index, moduleID) {
|
||||
var basePath = 'modules/' + moduleID + '/';
|
||||
var moduleJS = basePath + moduleID + '.js';
|
||||
var moduleCSS = basePath + moduleID + '.css';
|
||||
|
||||
require([moduleJS], function() {
|
||||
loadCSS(moduleCSS);
|
||||
|
||||
// Execute module
|
||||
cloudStack.modules[moduleID](
|
||||
$.extend(true, {}, cloudStack.pluginAPI, {
|
||||
pluginAPI: {
|
||||
extend: function(api) {
|
||||
cloudStack.pluginAPI[moduleID] = api;
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
});
|
||||
// Execute module
|
||||
cloudStack[type][id](
|
||||
$.extend(true, {}, cloudStack.pluginAPI, {
|
||||
pluginAPI: {
|
||||
extend: function(api) {
|
||||
cloudStack.pluginAPI[id] = api;
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
loadCSS(css);
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
}(jQuery, cloudStack, require));
|
||||
|
|
|
|||
Loading…
Reference in New Issue