The server list no longer renders a bogus server entry in case no

monotone server has been configured yet in the connected usher instance.
Also display a short info text if the server or connection list for
a running monotone server is empty.
This commit is contained in:
Thomas Keller 2011-06-04 23:15:58 +02:00
parent 8693418d39
commit 1b1b00a10c
4 changed files with 17 additions and 2 deletions

View File

@ -17,6 +17,9 @@
- Fix SSH public key parsing issues and improve the check for existing, uploaded keys (issue 679)
- Diff views now show empty context lines for git and hg again (issue 688)
- Let the SVN command line client not store the login credentials we give him as arguments
- The usher section in the forge administration no longer displays a bogus
server enty in case no monotone server is configured in the connected
usher instance
## Documentation

View File

@ -48,7 +48,7 @@ class IDF_Scm_Monotone_Usher
if ($conn == 'none')
return array();
return preg_split('/[ ]/', $conn);
return preg_split('/[ ]/', $conn, -1, PREG_SPLIT_NO_EMPTY);
}
/**
@ -73,7 +73,7 @@ class IDF_Scm_Monotone_Usher
if ($conn == 'none')
return array();
$single_conns = preg_split('/[ ]/', $conn);
$single_conns = preg_split('/[ ]/', $conn, -1, PREG_SPLIT_NO_EMPTY);
$ret = array();
foreach ($single_conns as $conn) {
preg_match('/\((\w+)\)([^:]+):(\d+)/', $conn, $matches);

View File

@ -8,12 +8,18 @@
<th>{trans "address"}</th>
<th>{trans "port"}</th>
</tr>
{if count($connections) == 0}
<tr>
<td colspan="2" align="center">{trans 'No connections found.'}</td>
</tr>
{else}
{foreach $connections as $connection}
<tr>
<td>{$connection.address}</td>
<td>{$connection.port}</td>
</tr>
{/foreach}
{/if}
</table>
{/block}

View File

@ -9,6 +9,11 @@
<th>{trans "status"}</th>
<th>{trans "action"}</th>
</tr>
{if count($servers) == 0}
<tr>
<td colspan="3" align="center">{trans 'No monotone servers configured.'}</td>
</tr>
{else}
{foreach $servers as $server}
<tr>
<td>{$server.name}</td>
@ -31,6 +36,7 @@
{/if}
</tr>
{/foreach}
{/if}
</table>
{/block}