Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7dbaf5f
[JENKINS-43786] Initial source code modifications
recena Apr 23, 2017
52654eb
[JENKINS-43786] Adding a customized Bootstrap version and some messag…
recena May 6, 2017
d8b4526
Merge branch 'master' of https://github.com/jenkinsci/jenkins into JE…
recena May 6, 2017
8774f3c
[JENKINS-43786] Some Monitors included in the core have been adapted
recena May 30, 2017
beaf805
[JENKINS-43786] Rebasing with master
recena Jul 9, 2017
7dd0429
[JENKINS-43786] Reverting an unexisting typo
recena Jul 9, 2017
a4b4771
[JENKINS-43786] Applying final styles
recena Jul 9, 2017
427ab29
[JENKINS-43786] Addressing more use cases
recena Jul 28, 2017
7de4a81
[JENKINS-43786] Revisiting how the buttons are shown
recena Aug 10, 2017
5c14800
[JENKINS-43786] Adjustments in the administrative monitor pop-up
recena Aug 10, 2017
672af73
[JENKINS-43786] Added more use cases related with administrative mess…
recena Aug 12, 2017
8126460
[JENKINS-43786] Adapted the Administrative Monitors provided by Jenki…
recena Aug 13, 2017
9485c88
[JENKINS-43786] Addressed the @daniel-beck's review
recena Aug 13, 2017
31bfe00
[JENKINS-43786] Wrong indent
recena Aug 13, 2017
bcae594
[JENKINS-43786] Better semantic HTML
recena Aug 13, 2017
20461b2
[JENKINS-43786] Better semantic HTML
recena Aug 13, 2017
317c734
[JENKINS-43786] Applying the same criteria for listing items
recena Aug 13, 2017
e93c464
[JENKINS-43786] Adapted tests
recena Aug 14, 2017
9f2304a
[JENKINS-43786] Removing redirect links in the administrative monitor…
recena Aug 14, 2017
077bbd8
[JENKINS-43786] Adapted Administrative Monitor
recena Aug 14, 2017
b3acf08
[JENKINS-43786] Reverted Redirect URLs
recena Aug 15, 2017
af73959
[JENKINS-43786] Applying the same code style
recena Aug 29, 2017
a398fff
[JENKINS-43786] Applying the same code style
recena Aug 29, 2017
4735288
Merge branch 'master' into JENKINS-43786
recena Sep 4, 2017
a93b2d6
[JENKINS-43786] Apply a common HTML markup to the Administrative Moni…
recena Sep 4, 2017
bae6127
Merge branch 'JENKINS-43786' of https://github.com/recena/jenkins int…
recena Sep 4, 2017
cc25e51
[JENKINS-43786] One more Administrative Monitor updated
recena Sep 4, 2017
f49131b
[JENKINS-43786] Polishing some details
recena Sep 4, 2017
849938f
[JENKINS-43786] Deprecating CSS Styles
recena Oct 29, 2017
9a175ab
[JENKINS-43786] We are ready for deprecating anything
recena Oct 29, 2017
4641644
[JENKINS-43786] We are ready for deprecating anything
recena Oct 29, 2017
d6395f1
[JENKINS-43786] Details
recena Oct 29, 2017
5fc308d
Merge branch 'master' of https://github.com/jenkinsci/jenkins into JE…
recena Oct 29, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ public HttpResponse doForward(@QueryParameter String fix, @QueryParameter String
}

/**
* Returns true iff there are applicable but ignored (i.e. hidden) warnings.
* Returns true if there are applicable but ignored (i.e. hidden) warnings.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not typos.

iff is shorthand for if and only if, see e.g. http://www.dictionary.com/browse/iff

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad English. Thanks for noticing it.

*
* @return true iff there are applicable but ignored (i.e. hidden) warnings.
* @return true if there are applicable but ignored (i.e. hidden) warnings.
*/
public boolean hasApplicableHiddenWarnings() {
ExtensionList<UpdateSiteWarningsConfiguration> configurations = ExtensionList.lookup(UpdateSiteWarningsConfiguration.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<div class="error">
<div class="alert alert-danger" role="alert">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<div style="float:right">
<f:submit name="correct" value="${%Correct}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?jelly escape-by-default='true'?>
<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">
<div class="warning">
<div class="alert alert-info">
<j:set var="ucData" value="${it.data}" />
<j:set var="upJob" value="${app.updateCenter.hudsonJob}" />
<j:choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ SystemInfoLink.DisplayName=System Information
SystemInfoLink.Description=Displays various environmental information to assist trouble-shooting.

SystemLogLink.DisplayName=System Log
SystemLogLink.Description=System log captures output from <tt>java.util.logging</tt> output related to Jenkins.
SystemLogLink.Description=System log captures output from <code>java.util.logging</code> output related to Jenkins.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated but <tt> is a obsolete element. Oldschool 😄


StatisticsLink.DisplayName=Load Statistics
StatisticsLink.Description=Check your resource utilization and see if you need more computers for your builds.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler">
<j:if test="${!empty app.updateCenter.updates}">
<st:nbsp/><span style="color:red; font-weight:bold">(${%updates available})</span>
</j:if>
<j:if test="${!empty app.updateCenter.updates}">
<st:nbsp/><span style="color:red; font-weight:bold">(${%updates available})</span>
</j:if>
</j:jelly>
75 changes: 70 additions & 5 deletions core/src/main/resources/jenkins/model/Jenkins/manage.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<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 title="${%Manage Jenkins}" xmlns:local="local" permission="${app.ADMINISTER}">
<l:layout title="${%Manage Jenkins}" xmlns:local="local" permission="${app.ADMINISTER}" css="/bootstrap/css/bootstrap.min.css">

<d:taglib uri="local">
<!-- table to show a map -->
<d:tag name="feature">
<j:set var="iconUrl" value="${icon.startsWith('/') ? resURL+icon : imagesURL+'/48x48/'+icon}"/>
${taskTags!=null and attrs.contextMenu!='false' ? taskTags.add(href,iconUrl,title,post,requiresConfirmation) : null}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was removed without replacement.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed it looks like taskTags is involved with context menu creation, see ModelObjectWithContextMenu.java.

<!-- TODO summary.jelly should be modified to accept requiresConfirmation so the icon link can be included -->
<j:set var="_href" value="${href}"/>
<t:summary icon="${icon}"
href="${requiresConfirmation || post ? null : href}" iconOnly="true">
<t:summary icon="${icon}" href="${requiresConfirmation || post ? null : href}" iconOnly="true">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easier to read.

<div class="link">
<j:choose>
<j:when test="${requiresConfirmation}">
Expand All @@ -57,6 +57,7 @@ THE SOFTWARE.
<j:if test="${taskTags==null}">
<st:include page="sidepanel.jelly" />
</j:if>

<l:main-panel>
<h1>${%Manage Jenkins}</h1>

Expand All @@ -68,12 +69,76 @@ THE SOFTWARE.

<st:include page="downgrade.jelly" />

<table style="padding-left: 2em;" id="management-links">
<style type="text/css">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The final definition will be placed on the proper CSS file.

.manage-option {
border: 1px solid transparent;
margin-bottom: 4px;
}
.manage-option:hover {
border: 1px solid #ccc;
border-radius: 3px;
background-color: #fafafa;
}
.manage-option dl {
padding: 0;
margin: 0 0 0 62px;
min-height: 48px;
}
.manage-option dl dt {
font-size: 16px;
line-height: 24px;
}
.manage-option dl dd {
margin-left: 0;
line-height: 20px;
color: #333;
font-size: 14px;
}

.manage-option a, .manage-option a:visited {
display: block;
padding: 8px;
margin: 0;
text-decoration: none;
color: #000;
outline: 0;
}
.manage-option .icon {
display: block;
float: left;
position: relative;
width: 48px;
height: 48px;
}

</style>

<j:forEach var="m" items="${it.managementLinks}">
<l:hasPermission permission="${m.requiredPermission}">
<j:set var="icon" value="${m.iconClassName != null ? m.iconClassName : m.iconFileName}" />
<j:if test="${icon!=null}">
<div class="manage-option">
<a href="${m.urlName}" title="">
<j:set var="iconUrl" value="${icon.startsWith('/') ? resURL+icon : imagesURL + '/48x48/' + icon}" />
<img class="icon" src="${iconUrl}" />
<dl>
<dt>${m.displayName}</dt>
<dd><j:out value="${m.description}"/></dd>
<dd><st:include it="${m}" page="info.jelly" optional="true"/></dd>
</dl>
</a>
</div>
</j:if>
</l:hasPermission>
</j:forEach>


<table style="padding-left: 2em; display: none;" id="management-links">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be removed. It is still here for testing purposes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this block of code will be removed, this functional test needs to reviewed.

@recena recena Jul 9, 2017

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And maybe this code.

<j:forEach var="m" items="${it.managementLinks}">
<l:hasPermission permission="${m.requiredPermission}">
<j:set var="icon" value="${m.iconClassName != null ? m.iconClassName : m.iconFileName}"/>
<j:if test="${icon!=null}">
<local:feature icon="${icon}" href="${m.urlName}" title="${m.displayName}" requiresConfirmation="${m.requiresConfirmation}" post="${m.requiresPOST}">
<local:feature icon="${icon}" href="${m.urlName}" title="${m.displayName}" requiresConfirmation="${m.requiresConfirmation}" post="${m.requiresPOST}">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary spaces.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daniel-beck Do you know any case where <local:feature> is involved? I'd like to include this part in this re-style. Thanks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oleg-nenashev And you? Could you help me?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@recena local:feature is a local taglib defined directly in manage.jelly. https://github.com/recena/jenkins/blob/a4b4771a90484b8326fafea92fc47921492cd8a2/core/src/main/resources/jenkins/model/Jenkins/manage.jelly#L32-L55

AFAIK it cannot be used elsewhere outside this file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oleg-nenashev What I really wanted was to know how exercising this taglib. Some use-case.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@recena Reusability for less repetition, see https://github.com/recena/jenkins/blob/6d119ef16946312d8c4ca319babb2e2b292b9b79/core/src/main/resources/jenkins/model/Jenkins/manage.jelly.

The October 2012 changes converted those to ManagementLinks in one loop, so it's not relevant anymore, but it was before then.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daniel-beck I appreciate your feedback. Can I understand we could make a cleanup?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming by cleanup you mean inlining the tag, yes.

<j:out value="${m.description}"/>
<st:include it="${m}" page="info.jelly" optional="true"/>
</local:feature>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def listWarnings(warnings) {
def coreWarnings = my.activeCoreWarnings
def pluginWarnings = my.activePluginWarningsByPlugin

div(class: "error") {
div(class: "alert alert-danger", role: "alert") {
text(_("blurb"))
ul {
if (!coreWarnings.isEmpty()) {
Expand Down
Loading