{css} {js}
{$lastonline_limit=ConfigHelper::getConfig('phpui.lastonline_limit')} {if ConfigHelper::checkConfig('phpui.ewx_support')}{assign var=ewx value=1}{else}{assign var=ewx value=0}{/if} {assign var=today value=$today|date_format:"%s"} {tab_container id="customernodesbox" label="Customer Nodes"} {tab_header content_id="nodespanel-`$layout.module`"} {tab_header_cell icon="lms-ui-icon-node"} {t a=$customernodes|@count|default:"0"}Customer Nodes ($a):{/t} {/tab_header_cell} {tab_header_cell} {if $customerinfo.status != $smarty.const.CSTATUS_INTERESTED && ! $customerinfo.deleted} {trans("New Node")} » {/if} {/tab_header_cell} {/tab_header} {tab_contents id="nodespanel-`$layout.module`"} {tab_table} {if $customernodes}
{trans("Name:")}
{trans("ID:")}
{if $ewx}
{trans("Channel:")}
{/if}
{trans("Address:")}
{trans("MAC:")}
{trans("Groups:")}
{trans("Network:")}
 
{/if} {foreach $customernodes as $node}
{if $node.lastonline} {if ($smarty.now-$node.lastonline) > $lastonline_limit} {else} {/if} {else} {/if} {$node.name} {if isset($nodeassignments[$node.id])} ({foreach $nodeassignments[$node.id] as $assignment}{$assignment.name}{if !$assignment@last}, {/if}{/foreach}) {/if} {if $node.location}
{if $node.teryt} {t a=$node.location|truncate:60:"...":true}$a (TERRIT){/t} {else} {$node.location|truncate:60:"...":true} {/if} {/if} {if $node.info}
{$node.info|truncate:60:"...":true} {/if}
({$node.id|string_format:"%04d"})
{if $ewx}
{if $node.channelname} {$node.channelname|truncate:30:"...":true} {elseif $node.channelid} {if !$node.cid} [{trans("default")}] {else} [{$node.channelid|string_format:"%04d"}] {/if} {/if} {if $node.downceil}({$node.downceil}/{$node.upceil|default:0} kbit/s){/if}
{/if}
{$node.ip} {if $node.ip_pub != "0.0.0.0"} ({$node.ip_pub}){/if}
{$node.mac|replace:",":"
"}
{if $node.gcount} {else} - {/if}
{button type="link" href="?m=nodeset&id={$node.id}" icon="{if $node.access}connected{else}disconnected{/if}" tip="{if $node.access}Disconnect{else}Connect{/if}"} {button type="link" href="?m=nodewarn&id={$node.id}" icon="{if $node.warning}warnon{else}warnoff{/if}" tip="{if $node.warning}Disable notice{else}Enable notice{/if}"} {button type="link" class="delete-node" href="?m=nodedel&id={$node.id}" icon="delete" tip="Delete"} {button type="link" href="?m=nodeadd&ownerid={$customerinfo.id}&premac[]={$node.mac|replace:",":"&premac[]="}&prename={t a=$node.name}$a_clone{/t}{if $node.address_id}&pre_address_id={$node.address_id}{/if}" icon="clone" tip="Clone"} {button type="link" href="?m=nodeedit&id={$node.id}" icon="edit" tip="Edit"} {button type="link" href="?m=nodeinfo&id={$node.id}" icon="view" tip="Info"}
{foreachelse}
{if $customerinfo.deleted} {trans("That customer has been deleted.")} {else} {trans("That customer hasn't got any node.")} {/if}
{/foreach} {/tab_table} {if $customernodes} {tab_button_panel} {tab_buttons} {button onclick="javascript:setstatus(1);" label="Connect"} {button onclick="javascript:setstatus(0);" label="Disconnect"} {button onclick="javascript:setwarning(1);" label="Enable"} {button onclick="javascript:setwarning(0);" label="Disable"} {if $allnodegroups} {button onclick="javascript:setgroup('setgroup');" label="Add"} {button onclick="javascript:setgroup('unsetgroup');" label="Remove"} {/if} {/tab_buttons} {tab_buttons} {/tab_buttons} {/tab_button_panel} {/if} {/tab_contents} {/tab_container}