| author | akozak | 2011-11-23 02:17:57 (EST) |
|---|---|---|
| committer | Winston Prakash | 2011-12-01 20:47:04 (EST) |
| commit | 28fd63add6c1d105e405dde8964b83fec87d7b9b (patch) (side-by-side diff) | |
| tree | b582fc433f509df382f6a3df545c2dc9883e3831 | |
| parent | 68af55deb53987ef0259a18d9c8f03c63e0b82c7 (diff) | |
| download | org.eclipse.hudson.core-28fd63add6c1d105e405dde8964b83fec87d7b9b.zip org.eclipse.hudson.core-28fd63add6c1d105e405dde8964b83fec87d7b9b.tar.gz org.eclipse.hudson.core-28fd63add6c1d105e405dde8964b83fec87d7b9b.tar.bz2 | |
Improved UI for log rotator and touch stone combination filter on Matrix configuration page
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
10 files changed, 58 insertions, 34 deletions
diff --git a/hudson-core/src/main/java/hudson/model/Job.java b/hudson-core/src/main/java/hudson/model/Job.java index 4d9e7fc..ab9de57 100644 --- a/hudson-core/src/main/java/hudson/model/Job.java +++ b/hudson-core/src/main/java/hudson/model/Job.java @@ -260,6 +260,10 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R return (IntegerProjectProperty) getProperty(key, IntegerProjectProperty.class); } + public LogRotatorProjectProperty getLogRotatorProjectProperty(String key) { + return (LogRotatorProjectProperty) getProperty(key, LogRotatorProjectProperty.class); + } + @Override public synchronized void save() throws IOException { if (null == allowSave) { diff --git a/hudson-core/src/main/resources/hudson/matrix/MatrixProject/configure-entries.jelly b/hudson-core/src/main/resources/hudson/matrix/MatrixProject/configure-entries.jelly index e47e23d..cf45716 100644 --- a/hudson-core/src/main/resources/hudson/matrix/MatrixProject/configure-entries.jelly +++ b/hudson-core/src/main/resources/hudson/matrix/MatrixProject/configure-entries.jelly @@ -68,7 +68,7 @@ isPropertyOverridden="${combinationFilterProperty.isOverridden()}" resetUrl="${jobUrl}/resetProjectProperty?propertyName=${it.COMBINATION_FILTER_PROPERTY_NAME}" help="/help/matrix/combinationfilter.html"> - <f:entry title="${%Filter}"> + <f:entry title="${%Filter}" isPropertyOverridden="${combinationFilterProperty.isOverridden()}"> <f:textbox name="combinationFilter" value="${combinationFilter}" /> </f:entry> </f:optionalBlock> @@ -78,16 +78,20 @@ <j:set var="touchStoneResultConditionProperty" value="${it.getResultProperty(it.TOUCH_STONE_RESULT_CONDITION_PROPERTY_NAME)}"/> <j:set var="touchStoneResultCondition" value="${touchStoneResultConditionProperty.getValue()}"/> + <j:set var="isTouchStoneCombinationFilterOverridden" value="${touchStoneCombinationFilterProperty.isOverridden() || + touchStoneResultConditionProperty.isOverridden()}"/> + <f:optionalBlock name="hasTouchStoneCombinationFilter" title="${%Execute touchstone builds first}" checked="${!empty(touchStoneCombinationFilter)}" - isPropertyOverridden="${touchStoneCombinationFilterProperty.isOverridden() || touchStoneResultConditionProperty.isOverridden()}" + isPropertyOverridden="${isTouchStoneCombinationFilterOverridden}" resetUrl="${jobUrl}/resetProjectProperty?propertyName=${it.TOUCH_STONE_COMBINATION_FILTER_PROPERTY_NAME + it.PROPERTY_NAME_SEPARATOR + it.TOUCH_STONE_RESULT_CONDITION_PROPERTY_NAME}" help="/help/matrix/touchstone.html"> - <f:entry title="${%Filter}"> + <f:entry title="${%Filter}" isPropertyOverridden="${isTouchStoneCombinationFilterOverridden}"> <f:textbox name="touchStoneCombinationFilter" value="${touchStoneCombinationFilter}" /> </f:entry> - <f:entry title="${%Required result}" description="${%required.result.description}"> + <f:entry title="${%Required result}" description="${%required.result.description}" + isPropertyOverridden="${isTouchStoneCombinationFilterOverridden}"> <select name="touchStoneResultCondition"> <f:option value="SUCCESS" selected='${touchStoneResultCondition.toExportedObject()=="SUCCESS"}'>${%Stable}</f:option> <f:option value="UNSTABLE" selected='${touchStoneResultCondition.toExportedObject()=="UNSTABLE"}'>${%Unstable}</f:option> diff --git a/hudson-core/src/main/resources/hudson/model/Job/configure.jelly b/hudson-core/src/main/resources/hudson/model/Job/configure.jelly index 0599cd1..445a8be 100644 --- a/hudson-core/src/main/resources/hudson/model/Job/configure.jelly +++ b/hudson-core/src/main/resources/hudson/model/Job/configure.jelly @@ -9,7 +9,7 @@ # # Contributors: # -# Kohsuke Kawaguchi, id:cactusman, Nikita Levyankov +# Kohsuke Kawaguchi, id:cactusman, Nikita Levyankov, Anton Kozak # # #************************************************************************** --> @@ -20,6 +20,7 @@ --> <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" xmlns:i="jelly:fmt"> <l:layout title="${it.displayName} Config" norefresh="true" permission="${it.EXTENDED_READ}"> + <j:set var="jobUrl" value="${h.getNearestAncestorUrl(request,it)}"/> <st:include page="sidepanel.jelly" /> <l:main-panel> <div class="behavior-loading">${%LOADING}</div> @@ -51,9 +52,13 @@ <j:if test="${it.supportsLogRotator()}"> <!-- log rotator --> + <j:set var="logRotatorProperty" value="${it.getLogRotatorProjectProperty(it.LOG_ROTATOR_PROPERTY_NAME)}"/> + <j:set var="logRotator" value="${logRotatorProperty.getValue()}"/> <f:optionalBlock name="logrotate" help="/help/project-config/log-rotation.html" - title="${%Discard Old Builds}" checked="${it.logRotator!=null}"> + title="${%Discard Old Builds}" checked="${logRotator!=null}" + resetUrl="${jobUrl}/resetProjectProperty?propertyName=${it.LOG_ROTATOR_PROPERTY_NAME}" + isPropertyOverridden="${logRotatorProperty.isOverridden()}"> <st:include page="/hudson/tasks/LogRotator/config.jelly"/> </f:optionalBlock> </j:if> diff --git a/hudson-core/src/main/resources/hudson/tasks/LogRotator/config.jelly b/hudson-core/src/main/resources/hudson/tasks/LogRotator/config.jelly index 6f2bdc6..c8849b2 100644 --- a/hudson-core/src/main/resources/hudson/tasks/LogRotator/config.jelly +++ b/hudson-core/src/main/resources/hudson/tasks/LogRotator/config.jelly @@ -1,6 +1,6 @@ <!-- ************************************************************************** # -# Copyright (c) 2004-2009 Oracle Corporation. +# Copyright (c) 2004-2011 Oracle Corporation. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 @@ -9,33 +9,36 @@ # # Contributors: # -# Kohsuke Kawaguchi +# Kohsuke Kawaguchi, Anton Kozak # # #************************************************************************** --> - <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"> <f:entry title="${%Days to keep builds}" - description="${%if not empty, build records are only kept up to this number of days}"> + description="${%if not empty, build records are only kept up to this number of days}" + isPropertyOverridden="${logRotatorProperty.isOverridden()}"> <f:textbox clazz="positive-number" - name="logrotate_days" value="${it.logRotator.daysToKeepStr}"/> + name="logrotate_days" value="${logRotator.daysToKeepStr}"/> </f:entry> <f:entry title="${%Max # of builds to keep}" - description="${%if not empty, only up to this number of build records are kept}"> + description="${%if not empty, only up to this number of build records are kept}" + isPropertyOverridden="${logRotatorProperty.isOverridden()}"> <f:textbox clazz="positive-number" - name="logrotate_nums" value="${it.logRotator.numToKeepStr}"/> + name="logrotate_nums" value="${logRotator.numToKeepStr}"/> </f:entry> <f:advanced> <f:entry title="${%Days to keep artifacts}" - description="${%if not empty, artifacts from builds older than this number of days will be deleted, but the logs, history, reports, etc for the build will be kept}"> + description="${%if not empty, artifacts from builds older than this number of days will be deleted, but the logs, history, reports, etc for the build will be kept}" + isPropertyOverridden="${logRotatorProperty.isOverridden()}"> <f:textbox clazz="positive-number" - name="logrotate_artifact_days" value="${it.logRotator.artifactDaysToKeepStr}" /> + name="logrotate_artifact_days" value="${ilogRotator.artifactDaysToKeepStr}" /> </f:entry> <f:entry title="${%Max # of builds to keep with artifacts}" - description="${%if not empty, only up to this number of builds have their artifacts retained}"> + description="${%if not empty, only up to this number of builds have their artifacts retained}" + isPropertyOverridden="${logRotatorProperty.isOverridden()}"> <f:textbox clazz="positive-number" - name="logrotate_artifact_nums" value="${it.logRotator.artifactNumToKeepStr}" /> + name="logrotate_artifact_nums" value="${logRotator.artifactNumToKeepStr}" /> </f:entry> </f:advanced> -</j:jelly> +</j:jelly>
\ No newline at end of file diff --git a/hudson-core/src/main/resources/lib/form/description.jelly b/hudson-core/src/main/resources/lib/form/description.jelly index d378809..341858a 100644 --- a/hudson-core/src/main/resources/lib/form/description.jelly +++ b/hudson-core/src/main/resources/lib/form/description.jelly @@ -1,6 +1,6 @@ <!-- ************************************************************************** # -# Copyright (c) 2004-2009 Oracle Corporation. +# Copyright (c) 2004-2011 Oracle Corporation. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 @@ -9,20 +9,25 @@ # # Contributors: # -# Kohsuke Kawaguchi +# Kohsuke Kawaguchi, Anton Kozak # # #************************************************************************** --> - <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"> <st:documentation> Renders a row that shows description text below an input field. + <st:attribute name="isPropertyOverridden"> + if present and true - value is overridden + </st:attribute> </st:documentation> - <tr> - <td colspan="2"/> + <j:if test="${attrs.isPropertyOverridden==null}"> + <j:set target="${attrs}" property="isPropertyOverridden" value="false"/> + </j:if> + <tr class="${attrs.isPropertyOverridden? 'modified': 'original'}"> + <td colspan="2" class="setting-description"/> <td class="setting-description"> <d:invokeBody /> - </td> + </td> </tr> </j:jelly> diff --git a/hudson-core/src/main/resources/lib/form/entry.jelly b/hudson-core/src/main/resources/lib/form/entry.jelly index e822b29..4af3537 100644 --- a/hudson-core/src/main/resources/lib/form/entry.jelly +++ b/hudson-core/src/main/resources/lib/form/entry.jelly @@ -1,6 +1,6 @@ <!-- ************************************************************************** # -# Copyright (c) 2004-2009 Oracle Corporation. +# Copyright (c) 2004-2011 Oracle Corporation. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 @@ -9,7 +9,7 @@ # # Contributors: # -# Kohsuke Kawaguchi +# Kohsuke Kawaguchi, Anton Kozak # # #************************************************************************** --> @@ -79,7 +79,7 @@ <!-- used to display the form validation error --> <tr class="validation-error-area"><td colspan="2" /><td /></tr> <j:if test="${!empty(attrs.description)}"> - <f:description> + <f:description isPropertyOverridden="${attrs.isPropertyOverridden}"> ${description} </f:description> </j:if> diff --git a/hudson-core/src/main/resources/lib/hudson/project/config-customWorkspace.jelly b/hudson-core/src/main/resources/lib/hudson/project/config-customWorkspace.jelly index 7ddbd5e..3cfecee 100644 --- a/hudson-core/src/main/resources/lib/hudson/project/config-customWorkspace.jelly +++ b/hudson-core/src/main/resources/lib/hudson/project/config-customWorkspace.jelly @@ -23,7 +23,7 @@ isPropertyOverridden="${customWorkspaceProperty.isOverridden()}" resetUrl="${jobUrl}/resetProjectProperty?propertyName=${it.CUSTOM_WORKSPACE_PROPERTY_NAME}" help="/help/project-config/custom-workspace.html"> - <f:entry title="${%Directory}"> + <f:entry title="${%Directory}" isPropertyOverridden="${customWorkspaceProperty.isOverridden()}"> <f:textbox name="customWorkspace.directory" value="${customWorkspace}" /> </f:entry> </f:optionalBlock> diff --git a/hudson-core/src/main/resources/lib/hudson/project/config-quietPeriod.jelly b/hudson-core/src/main/resources/lib/hudson/project/config-quietPeriod.jelly index 7b9c41a..3c57949 100644 --- a/hudson-core/src/main/resources/lib/hudson/project/config-quietPeriod.jelly +++ b/hudson-core/src/main/resources/lib/hudson/project/config-quietPeriod.jelly @@ -1,6 +1,6 @@ <!-- ************************************************************************** # -# Copyright (c) 2004-2009 Oracle Corporation. +# Copyright (c) 2004-2011 Oracle Corporation. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 @@ -25,7 +25,7 @@ resetUrl="${jobUrl}/resetProjectProperty?propertyName=${it.QUIET_PERIOD_PROPERTY_NAME}" help="/help/project-config/quietPeriod.html"> <f:entry title="${%Quiet period}" - description="${%Number of seconds}"> + description="${%Number of seconds}" isPropertyOverridden="${quietPeriodProperty.isOverridden()}"> <f:textbox clazz="number" name="quiet_period" value="${quietPeriod}"/> </f:entry> </f:optionalBlock> diff --git a/hudson-core/src/main/resources/lib/hudson/project/config-retryCount.jelly b/hudson-core/src/main/resources/lib/hudson/project/config-retryCount.jelly index d053055..cd593df 100644 --- a/hudson-core/src/main/resources/lib/hudson/project/config-retryCount.jelly +++ b/hudson-core/src/main/resources/lib/hudson/project/config-retryCount.jelly @@ -1,6 +1,6 @@ <!-- ************************************************************************** # -# Copyright (c) 2004-2009 Oracle Corporation. +# Copyright (c) 2004-2011 Oracle Corporation. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 @@ -24,7 +24,7 @@ isPropertyOverridden="${scmCheckoutRetryCountProperty.isOverridden()}" resetUrl="${jobUrl}/resetProjectProperty?propertyName=${it.SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME}" help="/help/project-config/scmCheckoutRetryCount.html"> - <f:entry title="${%SCM checkout retry count}"> + <f:entry title="${%SCM checkout retry count}" isPropertyOverridden="${scmCheckoutRetryCountProperty.isOverridden()}"> <f:textbox name="scmCheckoutRetryCount" value="${scmCheckoutRetryCount}"/> </f:entry> </f:optionalBlock> diff --git a/hudson-war/src/main/webapp/css/style.css b/hudson-war/src/main/webapp/css/style.css index a382b92..a8e6c84 100644 --- a/hudson-war/src/main/webapp/css/style.css +++ b/hudson-war/src/main/webapp/css/style.css @@ -9,7 +9,7 @@ * * Contributors: * - * Kohsuke Kawaguchi, Daniel Dyer, Stephen Connolly, Nikita Levyankov + * Kohsuke Kawaguchi, Daniel Dyer, Stephen Connolly, Nikita Levyankov, Anton Kozak * *******************************************************************************/ @@ -1006,10 +1006,13 @@ td.modified, div.modified, tr.optional-block-start > td.modified, tr.modified > td.setting-name, -tr.modified > td.setting-main, tr.modified > td.setting-leftspace { +tr.modified > td.setting-description, +tr.modified > td.setting-main, +tr.modified > td.setting-leftspace { background-color: #FFE8C9; } + /* ======================= Job Configuration table ========================== */ table.configure { border-spacing: 0px; |

