Skip to content

Commit

Permalink
#297 Displaying a configuration message when no branch is configured …
Browse files Browse the repository at this point in the history
…for a dashboard
  • Loading branch information
dcoraboeuf committed Jan 28, 2014
1 parent 28cc29c commit 4f296f7
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions ontrack-web/src/main/webapp/WEB-INF/views/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,32 @@
noscript=true
>
<!-- List of branches -->
<#assign width = 100 / dashboard.branches?size />
<table width="100%" class="dashboard">
<tbody>
<tr>
<#list dashboard.branches as branch>
<td valign="top" width="${width}%">
<h1><a href="gui/project/${branch.project.name?html}">${branch.project.name?html}</a></h1>
<h2><a href="gui/project/${branch.project.name?html}/branch/${branch.name?html}">${branch.name?html}</a></h2>
<div
id="branch-${branch.id?c}"
class="dynamic"
dynamic-controller="dashboard-branch"
dynamic-project="${branch.project.name?html}"
dynamic-branch="${branch.name?html}"
dynamic-refresh="true"
dynamic-refresh-interval="60000"
></div>
</td>
</#list>
</tr>
</tbody>
</table>
<#if dashboard.branches?size == 0>
<div class="alert alert-error">No project/branch configured.</div>
<#else>
<#assign width = 100 / dashboard.branches?size />
<table width="100%" class="dashboard">
<tbody>
<tr>
<#list dashboard.branches as branch>
<td valign="top" width="${width}%">
<h1><a href="gui/project/${branch.project.name?html}">${branch.project.name?html}</a></h1>
<h2><a href="gui/project/${branch.project.name?html}/branch/${branch.name?html}">${branch.name?html}</a></h2>
<div
id="branch-${branch.id?c}"
class="dynamic"
dynamic-controller="dashboard-branch"
dynamic-project="${branch.project.name?html}"
dynamic-branch="${branch.name?html}"
dynamic-refresh="true"
dynamic-refresh-interval="60000"
></div>
</td>
</#list>
</tr>
</tbody>
</table>
</#if>

<div id="logo">
<a href=".">
Expand Down

0 comments on commit 4f296f7

Please sign in to comment.