Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
JENKINS-33813 - fix error page styling issue, add option to retry, fix
check for setup wizard js include
  • Loading branch information
kzantow committed Mar 28, 2016
1 parent 6219c8f commit 2757b47
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
Expand Up @@ -29,7 +29,6 @@
<label class="control-label" for="security-token">${%Administrator password}</label>
<input name="j_username" value="${j.setupWizard.initialSetupAdminUserName}" type="hidden"/>
<input id="security-token" class="form-control" type="password" name="j_password"/>
<link rel="stylesheet" href="${j.installWizardPath}.css" type="text/css" />
</div>

</div>
Expand Down
Expand Up @@ -49,3 +49,4 @@ installWizard_configureProxy_save=Save and Continue
installWizard_skipPluginInstallations=Skip Plugin Installations
installWizard_installIncomplete_dependenciesLabel=Dependencies
installWizard_installingConsole_dependencyIndicatorNote=** - required dependency
installWizard_retry=Retry
5 changes: 2 additions & 3 deletions core/src/main/resources/lib/layout/html.jelly
Expand Up @@ -155,9 +155,8 @@ ${h.initPageVariables(context)}
</j:forEach>
</j:if>

<j:invokeStatic var="j" className="jenkins.model.Jenkins" method="getActiveInstance" />
<j:set var="installState" value="${j.installState.name()}" />
<j:if test="${installState == 'NEW' || installState == 'INITIAL_PLUGINS_INSTALLING'}">
<j:invokeStatic var="j" className="jenkins.model.Jenkins" method="getInstance" />
<j:if test="${!j.installState.setupComplete}">
<script src="${resURL}/${j.installWizardPath}.js" type="text/javascript"/>
<link rel="stylesheet" href="${resURL}/${j.installWizardPath}.css" type="text/css" />
</j:if>
Expand Down
7 changes: 6 additions & 1 deletion war/src/main/js/pluginSetupWizardGui.js
Expand Up @@ -777,6 +777,10 @@ var createPluginSetupWizard = function(appendTarget) {
jenkins.goTo('/');
}));
};

var startOver = function() {
jenkins.goTo('/');
};

// scoped click handler, prevents default actions automatically
var bindClickHandler = function(cls, action) {
Expand Down Expand Up @@ -807,7 +811,8 @@ var createPluginSetupWizard = function(appendTarget) {
'.skip-first-user': skipFirstUser,
'.show-proxy-config': setupProxy,
'.save-proxy-config': saveProxyConfig,
'.skip-plugin-installs': function() { installPlugins([]); }
'.skip-plugin-installs': function() { installPlugins([]); },
'.start-over': startOver
};
for(var cls in actions) {
bindClickHandler(cls, actions[cls]);
Expand Down
7 changes: 6 additions & 1 deletion war/src/main/js/templates/errorPanel.hbs
Expand Up @@ -2,10 +2,15 @@
<h4 class="modal-title">Error</h4>
</div>
<div class="modal-body">
<div class="container error-container">
<div class="container error-container" id="error-message">
<h1>{{translations.installWizard_error_header}}</h1>
<div class="alert alert-danger fade in">
{{errorMessage}}
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary start-over">
{{translations.installWizard_retry}}
</button>
</div>
3 changes: 2 additions & 1 deletion war/src/main/less/pluginSetupWizard.less
Expand Up @@ -78,7 +78,8 @@

.container.error-container {
padding: 4em 3em;

max-width: 100%;

h1 {
color: #a94442;
}
Expand Down

0 comments on commit 2757b47

Please sign in to comment.