Skip to content

Commit 2950a26

Browse files
authored
Update overview.tpl for Mode Feature
The client section is now displayed with bootstrap coloured buttons to assist customers controlling their Instance, this change also introduces the new Mode feature for server owners
1 parent f55c2ed commit 2950a26

1 file changed

Lines changed: 41 additions & 24 deletions

File tree

modules/servers/AMP/templates/overview.tpl

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -47,34 +47,51 @@
4747
</div>
4848

4949

50-
{if !empty($endpoints)}
51-
<div class="panel panel-primary">
52-
<div class="panel-heading"><h4>Server Endpoints</h4></div>
53-
<div class="panel-body" >
54-
55-
{foreach $endpoints as $e}
56-
<h6>{$e['DisplayName']}</h6>
57-
{assign var='cleanAppUrl' value=$appUrl|replace:'https://':''|replace:'http://':''}
58-
{if $e['Endpoint']}
59-
{assign var='parts' value=":"|explode:$e['Endpoint']}
60-
<a target="_blank" href="{$cleanAppUrl}:{$parts[1]}" style="vertical-align: middle;" target="_blank">{$cleanAppUrl}:{$parts[1]}</a>
61-
{else}
62-
{$e['Endpoint']}
50+
{if $mode == 'Standalone URL'}
51+
{if !empty($endpoints)}
52+
<div class="panel panel-primary">
53+
<div class="panel-heading">
54+
<h4>Server Endpoints</h4>
55+
</div>
56+
<div class="panel-body">
57+
{foreach $endpoints as $e}
58+
<h6>{$e['DisplayName']}</h6>
59+
{assign var='cleanAppUrl' value=$appUrl|replace:'https://':''|replace:'http://':''}
60+
{if $e['Endpoint']}
61+
{assign var='parts' value=":"|explode:$e['Endpoint']}
62+
<a target="_blank" href="{$cleanAppUrl}:{$parts[1]}" style="vertical-align: middle;" target="_blank">{$cleanAppUrl}:{$parts[1]}</a>
63+
{else}
64+
{$e['Endpoint']}
65+
{/if}
66+
<button style="margin-left: 16px;" onclick="copyToClipboard('{$cleanAppUrl}:{$parts[1]}')" class="btn btn-default">Copy to clipboard</button>
67+
<hr>
68+
{/foreach}
69+
</div>
70+
</div>
71+
{/if}
72+
{elseif $mode == 'Target/Node IP Address'}
73+
{if !empty($endpoints)}
74+
<div class="panel panel-primary">
75+
<div class="panel-heading">
76+
<h4>Server Endpoints</h4>
77+
</div>
78+
<div class="panel-body">
79+
{foreach $endpoints as $e}
80+
<h6>{$e['DisplayName']}</h6>
81+
{if !empty($e['Uri'])}
82+
<a target="_blank" href="{$e['Uri']}" style="vertical-align: middle;" target="_blank">{$e['Endpoint']}</a>
83+
{else}
84+
{$e['Endpoint']}
85+
{/if}
86+
<button style="margin-left: 16px;" onclick="copyToClipboard('{$e['Endpoint']}')" class="btn btn-default">Copy to clipboard</button>
87+
<hr>
88+
{/foreach}
89+
</div>
90+
</div>
6391
{/if}
64-
65-
<button style="margin-left: 16px;" onclick="copyToClipboard('{$cleanAppUrl}:{$parts[1]}')" class="btn btn-default">Copy to clipboard</button>
66-
67-
<hr>
68-
{/foreach}
69-
70-
</div>
71-
</div>
7292
{/if}
7393

7494

75-
76-
77-
7895
<div class="panel panel-default">
7996
<div class="panel-heading"><h4>Application Management</h4></div>
8097
<div class="panel-body">

0 commit comments

Comments
 (0)