Skip to content
Permalink
Browse files

JENKINS-9598 - Initial installation wizard & curated list of plugins

  • Loading branch information
kzantow
kzantow committed Sep 23, 2015
1 parent 2827e7a commit 0b0c7f7bd9b52e16fbf4d372e366b9844c8f2f41
Showing with 1,568 additions and 191 deletions.
  1. +1 −0 core/src/main/java/hudson/model/UpdateCenter.java
  2. +1 −1 core/src/main/java/jenkins/I18n.java
  3. +2 −2 core/src/main/java/jenkins/model/Jenkins.java
  4. +22 −0 core/src/main/resources/jenkins/install/pluginSetupWizard.properties
  5. +1 −0 core/src/main/resources/jenkins/install/pluginSetupWizard_de.properties
  6. +1 −0 core/src/main/resources/jenkins/install/pluginSetupWizard_es.properties
  7. +6 −5 core/src/main/resources/lib/layout/layout.jelly
  8. +10 −3 war/gulpfile.js
  9. +3 −2 war/package.json
  10. +12 −0 war/pom.xml
  11. +0 −18 war/src/main/js/pluginManager.js
  12. +10 −0 war/src/main/js/pluginSetupWizard.js
  13. +555 −0 war/src/main/js/pluginSetupWizardGui.js
  14. +125 −0 war/src/main/js/recommendedPlugins.js
  15. +8 −0 war/src/main/js/templates/errorPanel.hbs
  16. +9 −0 war/src/main/js/templates/offlinePanel.hbs
  17. +54 −0 war/src/main/js/templates/pluginSelectionPanel.hbs
  18. +7 −0 war/src/main/js/templates/pluginSetupWizard.hbs
  19. +15 −0 war/src/main/js/templates/progressPanel.hbs
  20. +12 −0 war/src/main/js/templates/successPanel.hbs
  21. +26 −0 war/src/main/js/templates/welcomePanel.hbs
  22. +0 −15 war/src/main/js/templates/wizard.hbs
  23. +0 −14 war/src/main/js/util/ajax.js
  24. +0 −7 war/src/main/js/util/browser.js
  25. +113 −0 war/src/main/js/util/jenkins.js
  26. +0 −11 war/src/main/js/util/system.js
  27. +0 −42 war/src/main/js/wizard.js
  28. +343 −0 war/src/main/less/pluginSetupWizard.less
  29. 0 war/src/main/less/wizard.less
  30. +2 −2 war/src/main/webapp/WEB-INF/web.xml
  31. +0 −21 war/src/test/js/pluginManager-spec.js
  32. +230 −0 war/src/test/js/pluginSetupWizard-spec.js
  33. +0 −12 war/src/test/js/util.js
  34. +0 −36 war/src/test/js/wizard-spec.js
@@ -710,6 +710,7 @@ private XmlFile getConfigFile() {
UpdateCenter.class.getName()+".xml"));
}

@Exported
public List<Plugin> getAvailables() {
Map<String,Plugin> pluginMap = new LinkedHashMap<String, Plugin>();
for (UpdateSite site : sites) {
@@ -93,7 +93,7 @@ public HttpResponse doResourceBundle(StaplerRequest request) {
String variant = request.getParameter("variant");

try {
Locale locale = Locale.getDefault();
Locale locale = request.getLocale();

if (language != null && country != null && variant != null) {
locale = new Locale(language, country, variant);
@@ -897,8 +897,8 @@ public StartupType getStartupType() {
* @since FIXME
*/
@Restricted(NoExternalUse.class)
public String getInstallWizardJS() {
return servletContext.getInitParameter("install-wizard-js");
public String getInstallWizardPath() {
return servletContext.getInitParameter("install-wizard-path");
}

/**
@@ -0,0 +1,22 @@
installWizard_welcomePanel_title=Plugin Selection
installWizard_welcomePanel_banner=Welcome to Jenkins
installWizard_welcomePanel_message=Choose the initial set of plugins you would like to have installed in Jenkins
installWizard_welcomePanel_recommendedActionTitle=Recommended Jenkins plugins
installWizard_welcomePanel_recommendedActionDetails=Install the set of plugins the community finds more useful
installWizard_welcomePanel_customizeActionTitle=Customize your plugins
installWizard_welcomePanel_customizeActionDetails=Select your plugins from a community approved list of top plugins
installWizard_offline_title=Offline
installWizard_offline_message=This Jenkins instance appears to be offline...
installWizard_installCustom_title=Plugin Selection
installWizard_installCustom_selectAll=All
installWizard_installCustom_selectNone=None
installWizard_installCustom_selectRecommended=Recommended
installWizard_installCustom_selected=Selected
installWizard_goBack=Back
installWizard_goInstall=Install
installWizard_installing_title=Installing...
installWizard_installing_detailsLink=Details...
installWizard_installComplete_title=Installed
installWizard_installComplete_banner=Jenkins is ready!
installWizard_installComplete_message=Your plugin installations are complete.
installWizard_installComplete_finishButtonLabel=Get Started
@@ -0,0 +1 @@
installWizard_welcomePanel_banner=Willkommen zu Jenkins
@@ -0,0 +1 @@
installWizard_welcomePanel_banner=Bienvenido a Jenkins
@@ -102,11 +102,6 @@ ${h.initPageVariables(context)}
<script src="${resURL}/scripts/prototype.js" type="text/javascript"/>
<script src="${resURL}/scripts/behavior.js" type="text/javascript"/>

<j:if test="${h.startupType.name() == 'NEW'}">
<j:invokeStatic var="j" className="jenkins.model.Jenkins" method="getActiveInstance" />
<script src="${resURL}/${j.installWizardJS}" type="text/javascript"/>
</j:if>

<!-- we include our own prototype.js, so don't let stapler pull in another. -->
<st:adjunct assumes="org.kohsuke.stapler.framework.prototype.prototype"
includes="org.kohsuke.stapler.bind"/>
@@ -159,6 +154,12 @@ ${h.initPageVariables(context)}
</j:forEach>
</j:if>

<j:if test="${h.startupType.name() == 'NEW'}">
<j:invokeStatic var="j" className="jenkins.model.Jenkins" method="getActiveInstance" />
<script src="${resURL}/${j.installWizardPath}.js" type="text/javascript"/>
<link rel="stylesheet" href="${resURL}/${j.installWizardPath}.css" type="text/css" />
</j:if>

<j:if test="${isMSIE}">
<script src="${resURL}/scripts/msie.js" type="text/javascript"/>
</j:if>
@@ -9,6 +9,13 @@ var builder = require('jenkins-js-builder');
//
builder.defineTasks(['test', 'bundle', 'rebundle']);

var gulp = require('gulp');
gulp.task('default', ['bundle']);
gulp.task('watch:less', function() {
gulp.watch('src/main/less/**/*.less', ['bundle'])
});
gulp.task('watch', ['watch:less', 'rebundle']);

//
// Sources are not in the default locations. Following a more maven-like pattern here.
// See https://github.com/tfennelly/jenkins-js-builder#setting-src-and-test-spec-paths
@@ -20,9 +27,9 @@ builder.tests('src/test/js');
// Bundle the modules.
// See https://github.com/tfennelly/jenkins-js-builder#bundling
//
builder.bundle('src/main/js/wizard.js')
builder.bundle('src/main/js/pluginSetupWizard.js')
.withExternalModuleMapping('jquery-detached', 'jquery-detached:jquery2')
.withExternalModuleMapping('jqueryui-detached', 'jquery-detached:jqueryui1')
.withExternalModuleMapping('bootstrap', 'bootstrap:bootstrap3')
.withExternalModuleMapping('handlebars', 'handlebars:handlebars3')
.less('src/main/less/wizard.less')
.less('src/main/less/pluginSetupWizard.less')
.inDir('src/main/webapp/jsbundles');
@@ -6,13 +6,14 @@
"devDependencies": {
"gulp": "^3.9.0",
"jenkins-js-builder": "0.0.19",
"jenkins-js-test": "0.0.12"
"jenkins-js-test": "0.0.14",
"handlebars": "^3.0.3"
},
"dependencies": {
"jenkins-handlebars-rt": "^1.0.1",
"jenkins-js-modules": "1.0.1",
"jqueryui-detached": "^1.11.4-v8",
"jquery-detached": "^2.1.4-v2",
"bootstrap-detached": "^3.3.4-v6",
"window-handle": "0.0.6"
}
}
@@ -268,6 +268,18 @@ THE SOFTWARE.
<version>1.1</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<groupId>org.jenkins-ci.ui</groupId>
<artifactId>bootstrap</artifactId>
<version>1.0</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<groupId>org.jenkins-ci.ui</groupId>
<artifactId>momentjs</artifactId>
<version>1.0</version>
<type>hpi</type>
</artifactItem>
<artifactItem>
<groupId>org.jenkins-ci.ui</groupId>
<artifactId>handlebars</artifactId>

This file was deleted.

@@ -0,0 +1,10 @@
// Initialize all modules by requiring them. Also makes sure they get bundled (see gulpfile.js).
var $ = require('jquery-detached').getJQuery();

// This is the main module
var pluginSetupWizard = require('./pluginSetupWizardGui');

// This entry point for the bundle only bootstraps the main module in a browser
$(function() {
pluginSetupWizard.init();
});

0 comments on commit 0b0c7f7

Please sign in to comment.
You can’t perform that action at this time.