-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-34670] Add support for a new full screen layout #2445
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
fe07641
[JENKINS-34670] Add support for a new full screen layout
recena abd7a8f
[JENKINS-34670] In order to verify an use case, the Setup Wizard has …
recena 875e412
[JENKINS-34670] Resolving conflicts after several months without acti…
recena e271be8
[JENKINS-34670] Addressed @kzantow's comment
recena 482716c
[JENKINS-34670] Keeping the same namespaces
recena 42936a7
[JENKINS-34670] Addressed the @daniel-beck's comment
f9ac314
[JENKINS-34670] Addressed other @daniel-beck's comment
recena c8970db
[JENKINS-34670] Reverting html.jelly and noting as deprecated
bb1ff6a
Merge branch 'JENKINS-34670' of https://github.com/recena/jenkins int…
f3f29c0
Merge branch 'master' of https://github.com/jenkinsci/jenkins into JE…
recena File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 10 additions & 6 deletions
16
core/src/main/resources/jenkins/install/SetupWizard/index.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
<?jelly escape-by-default='true'?> | ||
<l:html norefresh="true" title="${it.displayName}" xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | ||
<l:main-panel> | ||
<div class="plugin-setup-wizard-container"></div> | ||
<st:include page="wizard-ui"/> | ||
</l:main-panel> | ||
</l:html> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | ||
|
||
<l:layout norefresh="true" type="full-screen" title="${it.displayName}"> | ||
<l:main-panel> | ||
<div class="plugin-setup-wizard-container"></div> | ||
<st:include page="wizard-ui"/> | ||
</l:main-panel> | ||
</l:layout> | ||
|
||
</j:jelly> |
38 changes: 26 additions & 12 deletions
38
core/src/main/resources/jenkins/install/SetupWizard/proxy-configuration.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
<?jelly escape-by-default='true'?> | ||
<l:html norefresh="true" title="${it.displayName}" xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | ||
<l:main-panel> | ||
<h1>${%HTTP Proxy Configuration}</h1> | ||
<f:form method="post" action="/pluginManager/proxyConfigure" name="proxyConfigure"> | ||
<j:scope> | ||
<j:set var="instance" value="${app.proxy}"/> | ||
<j:set var="descriptor" value="${app.pluginManager.proxyDescriptor}"/> | ||
<st:include from="${descriptor}" page="${descriptor.configPage}" /> | ||
</j:scope> | ||
</f:form> | ||
</l:main-panel> | ||
</l:html> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | ||
|
||
<l:layout norefresh="true" type="full-screen" title="${it.displayName}"> | ||
<l:main-panel> | ||
<style type="text/css"> | ||
|
||
#proxy-configuration { | ||
margin: 8px; | ||
} | ||
|
||
</style> | ||
|
||
<div id="proxy-configuration"> | ||
<h1>${%HTTP Proxy Configuration}</h1> | ||
<f:form method="post" action="/pluginManager/proxyConfigure" name="proxyConfigure"> | ||
<j:scope> | ||
<j:set var="instance" value="${app.proxy}"/> | ||
<j:set var="descriptor" value="${app.pluginManager.proxyDescriptor}"/> | ||
<st:include from="${descriptor}" page="${descriptor.configPage}" /> | ||
</j:scope> | ||
</f:form> | ||
</div> | ||
</l:main-panel> | ||
</l:layout> | ||
|
||
</j:jelly> |
79 changes: 38 additions & 41 deletions
79
core/src/main/resources/jenkins/install/SetupWizard/setupWizardFirstUser.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,52 @@ | ||
<!-- | ||
This is used to create the first user. | ||
--> | ||
<?jelly escape-by-default='true'?> | ||
<l:html norefresh="true" title="${it.displayName}" xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/form"> | ||
|
||
<l:main-panel> | ||
<l:layout norefresh="true" type="full-screen" title="${it.displayName}"> | ||
<l:main-panel> | ||
<link rel="stylesheet" href="${resURL}/css/google-fonts/roboto/css/roboto.css" type="text/css" /> | ||
<style type="text/css"> | ||
|
||
<link rel="stylesheet" href="${resURL}/css/google-fonts/roboto/css/roboto.css" type="text/css" /> | ||
|
||
<style type="text/css"> | ||
|
||
#main-panel { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
tr td { | ||
padding-bottom: 2px; | ||
} | ||
body { | ||
#create-admin-user { | ||
padding: 20px 20px 20px 100px; | ||
font-family: 'roboto'; | ||
} | ||
form > div { | ||
margin: 8px; | ||
} | ||
|
||
#create-admin-user form > div { | ||
margin: 0 !important; | ||
} | ||
h1 { | ||
} | ||
|
||
#create-admin-user h1 { | ||
font-family: 'roboto', sans-serif; | ||
font-size: 48px; | ||
margin-top: 30px; | ||
font-weight: 500; | ||
} | ||
h1 img { | ||
position: absolute; | ||
right: -80px; | ||
top: 38px; | ||
} | ||
tr td, input { | ||
} | ||
|
||
#create-admin-user tr td { | ||
padding-bottom: 2px; | ||
} | ||
|
||
#create-admin-user tr td, #create-admin-user input { | ||
line-height: 25px; | ||
margin-bottom: 6px; | ||
} | ||
input[type=text], input[type=password] { | ||
} | ||
|
||
#create-admin-user input[type=text], input[type=password] { | ||
border: 1px solid #ddd; | ||
border-radius: 2px; | ||
padding: 1px 8px; | ||
} | ||
</style> | ||
<form action="${rootURL}/setupWizard/createAdminUser" method="post"> | ||
<local:_entryForm it="${app.securityRealm}" host="${app.securityRealm}" title="${%Create First Admin User}" captcha="${false}" xmlns:local="/hudson/security/HudsonPrivateSecurityRealm" /> | ||
<script> | ||
$('username').focus(); | ||
</script> | ||
</form> | ||
</l:main-panel> | ||
</l:html> | ||
} | ||
</style> | ||
|
||
<div id="create-admin-user"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More robust while removing the usage of |
||
<form action="${rootURL}/setupWizard/createAdminUser" method="post"> | ||
<local:_entryForm it="${app.securityRealm}" host="${app.securityRealm}" title="${%Create First Admin User}" captcha="${false}" xmlns:local="/hudson/security/HudsonPrivateSecurityRealm" /> | ||
<script> | ||
$('username').focus(); | ||
</script> | ||
</form> | ||
</div> | ||
</l:main-panel> | ||
</l:layout> | ||
|
||
</j:jelly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ THE SOFTWARE. | |
(The permission will be checked against the "it" object.) | ||
</st:attribute> | ||
<st:attribute name="type" use="optional"> | ||
Available values: two-column (by default) or one-column (full-width size). | ||
Available values: two-column (by default), one-column (full-width size) or full-screen (since TODO). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
</st:attribute> | ||
</st:documentation> | ||
<st:setHeader name="Expires" value="0" /> | ||
|
@@ -69,9 +69,14 @@ ${h.initPageVariables(context)} | |
this also allows us to configure HttpSessionContextIntegrationFilter not to create sessions, | ||
which I suspect can end up creating sessions for wrong resource types (such as static resources.) | ||
--> | ||
|
||
<j:if test="${attrs.type==null}"> | ||
<j:set var="layoutType" value="two-column"/> | ||
</j:if> | ||
<j:if test="${attrs.type!=null}"> | ||
<j:set var="layoutType" value="${attrs.type}"/> | ||
</j:if> | ||
|
||
<j:set var="isMSIE" value="${userAgent.contains('MSIE')}"/> | ||
<j:set var="_" value="${request.getSession()}"/> | ||
<j:set var="_" value="${h.configureAutoRefresh(request, response, attrs.norefresh!=null and !attrs.norefresh.equals(false))}"/> | ||
|
@@ -169,7 +174,9 @@ ${h.initPageVariables(context)} | |
<script src="${resURL}/jsbundles/page-init.js" type="text/javascript"/> | ||
|
||
</head> | ||
<body id="jenkins" class="yui-skin-sam jenkins-${h.version} ${layoutType}" data-version="${h.version}" data-model-type="${it.class.name}"> | ||
<body id="jenkins" class="yui-skin-sam ${layoutType} jenkins-${h.version}" data-version="${h.version}" data-model-type="${it.class.name}"> | ||
|
||
<j:if test="${layoutType!='full-screen'}"> | ||
<!-- for accessibility, skip the entire navigation bar and etc and go straight to the head of the content --> | ||
<a href="#skip2content" class="skiplink">Skip to content</a> | ||
|
||
|
@@ -235,6 +242,7 @@ ${h.initPageVariables(context)} | |
</l:breadcrumbBar> | ||
</div> | ||
</div> | ||
</j:if> | ||
|
||
<div id="page-body" class="clear"> | ||
<j:if test="${layoutType=='two-column'}"> | ||
|
@@ -260,6 +268,7 @@ ${h.initPageVariables(context)} | |
</div> | ||
</div> | ||
|
||
<j:if test="${layoutType!='full-screen'}"> | ||
<footer> | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
|
@@ -279,6 +288,7 @@ ${h.initPageVariables(context)} | |
</div> | ||
</div> | ||
</footer> | ||
</j:if> | ||
|
||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How this step of the Setup Wizard is managed (by using a
iframe
) needs to be changed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why, exactly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kzantow I think we should not use
iframes
. I would like to work on a proposal based on a wizard (flow) with real steps / states, where we can have a URL per state.