Re: CVS update: /hudson/hudson/main/core/src/main/java/hudson/model/, /hudson/hudson/main/war/resources/images/16x16/, /hudson/hudson/main/war/images/,...

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: CVS update: /hudson/hudson/main/core/src/main/java/hudson/model/, /hudson/hudson/main/war/resources/images/16x16/, /hudson/hudson/main/war/images/,...

Kohsuke Kawaguchi
Administrator
[hidden email] wrote:

> @@ -33,10 +34,25 @@
>          <j:forEach var="job" items="${jobs}">
>            <j:set var="lsBuild" value="${job.lastSuccessfulBuild}" />
>            <j:set var="lfBuild" value="${job.lastFailedBuild}" />
> +          <j:set var="buildHealth" value="${job.buildHealth}" />
>            <tr class="${h.ifThenElse(job.disabled,'disabledJob',null)}">
>              <td data="${job.iconColor.ordinal()}">
>                <img src="${rootURL}/images/${iconSize}/${job.buildStatusUrl}" alt="${job.iconColor.description}" />
>              </td>
> +            <td data="${buildHealth.score}">
> +              <x:element name="img">
> +                <x:attribute name="alt">${buildHealth.score}%</x:attribute>
> +                <x:attribute name="title">${buildHealth.description}</x:attribute>
> +              <j:choose>                
> +                <j:when test="${buildHealth.iconUrl.startsWith('/')}">
> +                  <x:attribute name="src">${rootURL}${buildHealth.iconUrl}</x:attribute>
> +                </j:when>
> +                <j:otherwise>
> +                  <x:attribute name="src">${rootURL}/images/${iconSize}/${buildHealth.iconUrl}</x:attribute>
> +                </j:otherwise>
> +              </j:choose>
> +              </x:element>
> +            </td>
>              <td>
>                <a href="${jobBaseUrl}${job.shortUrl}">
>                    ${job.displayName}
I can make this little less intimidating if you'd like.

(but I didn't want to step on your toe if you are making changes.)

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: CVS update: /hudson/hudson/main/core/src/main/java/hudson/model/, /hudson/hudson/main/war/resources/images/16x16/, /hudson/hudson/main/war/images/,...

             +                         
Stephen Connolly-2
kohsuke wrote
stephenconnolly wrote
@@ -33,10 +34,25 @@
         <j:forEach var="job" items="${jobs}">
           <j:set var="lsBuild" value="${job.lastSuccessfulBuild}" />
           <j:set var="lfBuild" value="${job.lastFailedBuild}" />
+          <j:set var="buildHealth" value="${job.buildHealth}" />
           
               
             
+              <x:element name="img">
+                <x:attribute name="alt">${buildHealth.score}%</x:attribute>
+                <x:attribute name="title">${buildHealth.description}</x:attribute>
+              <j:choose>               
+                <j:when test="${buildHealth.iconUrl.startsWith('/')}">
+                  <x:attribute name="src">${rootURL}${buildHealth.iconUrl}</x:attribute>
+                </j:when>
+                <j:otherwise>
+                  <x:attribute name="src">${rootURL}/images/${iconSize}/${buildHealth.iconUrl}</x:attribute>
+                </j:otherwise>
+              </j:choose>
+              </x:element>
+            
I can make this little less intimidating if you'd like.

(but I didn't want to step on your toe if you are making changes.) Please do, though since my day job's main project is a Cocoon based web application i'm not exactly finding that the most intimidating.  My main concern with the above code is how plugins can provide their own icons without breaking the icon size selection.

I think I'm finished with that specific jelly script though (i.e. the remaining changes should be in Java code only)
Reply | Threaded
Open this post in threaded view
|

Re: CVS update: /hudson/hudson/main/core/src/main/java/hudson/model/, /hudson/hudson/main/war/resources/images/16x16/, /hudson/hudson/main/war/images/,...

             +                         
Stephen Connolly-2

Stephen Connolly wrote
kohsuke wrote
stephenconnolly wrote
@@ -33,10 +34,25 @@
         <j:forEach var="job" items="${jobs}">
           <j:set var="lsBuild" value="${job.lastSuccessfulBuild}" />
           <j:set var="lfBuild" value="${job.lastFailedBuild}" />
+          <j:set var="buildHealth" value="${job.buildHealth}" />
           
               
             
+              <x:element name="img">
+                <x:attribute name="alt">${buildHealth.score}%</x:attribute>
+                <x:attribute name="title">${buildHealth.description}</x:attribute>
+              <j:choose>               
+                <j:when test="${buildHealth.iconUrl.startsWith('/')}">
+                  <x:attribute name="src">${rootURL}${buildHealth.iconUrl}</x:attribute>
+                </j:when>
+                <j:otherwise>
+                  <x:attribute name="src">${rootURL}/images/${iconSize}/${buildHealth.iconUrl}</x:attribute>
+                </j:otherwise>
+              </j:choose>
+              </x:element>
+            
I can make this little less intimidating if you'd like.

(but I didn't want to step on your toe if you are making changes.) Please do, though since my day job's main project is a Cocoon based web application i'm not exactly finding that the most intimidating.  My main concern with the above code is how plugins can provide their own icons without breaking the icon size selection.

I think I'm finished with that specific jelly script though (i.e. the remaining changes should be in Java code only) FYI I'll need 1.115 to be released before I can add health reporting to the emma plugin (as it will need the HealthReportingAction interface)
Reply | Threaded
Open this post in threaded view
|

Re: CVS update: /hudson/hudson/main/core/src/main/java/hudson/model/, /hudson/hudson/main/war/resources/images/16x16/, /hudson/hudson/main/war/images/,...

Kohsuke Kawaguchi
Administrator
Stephen Connolly wrote:
> FYI I'll need 1.115 to be released before I can add health reporting to the
> emma plugin (as it will need the HealthReportingAction interface)

OK. I'll post 1.115 shortly,.

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment