Added improvements for empty database

master
Thomas Hooge 2 years ago
parent cf27c1377c
commit 23b73a387b
  1. 2
      .gitignore
  2. 6
      lang/de.php
  3. 5
      lang/en.php
  4. 106
      tpl/asset.tpl
  5. 68
      tpl/assetclass.tpl
  6. 58
      tpl/assetclassgroup.tpl
  7. 56
      tpl/location.tpl
  8. 80
      tpl/node.tpl
  9. 80
      tpl/subnet.tpl
  10. 80
      tpl/vlan.tpl
  11. 82
      tpl/zone.tpl

2
.gitignore vendored

@ -0,0 +1,2 @@
*~
tpl_c/*.php

@ -88,6 +88,7 @@ $lang = array(
'lang_location_name' => 'Standortname', 'lang_location_name' => 'Standortname',
'lang_location_parent' => 'Übergeordneter Standort', 'lang_location_parent' => 'Übergeordneter Standort',
'lang_sublocation_add' => 'Unterstandort hinzufügen', 'lang_sublocation_add' => 'Unterstandort hinzufügen',
'lang_location_none' => 'Es sind keine Standorte vorhanden',
'lang_locationsubnet' => 'Standort/Subnetz', 'lang_locationsubnet' => 'Standort/Subnetz',
'lang_locationsubnet_edit' => 'Standort/Subnetz bearbeiten', 'lang_locationsubnet_edit' => 'Standort/Subnetz bearbeiten',
@ -96,6 +97,7 @@ $lang = array(
'lang_node_del' => 'Knoten löschen', 'lang_node_del' => 'Knoten löschen',
'lang_node_edit' => 'Knoten ändern', 'lang_node_edit' => 'Knoten ändern',
'lang_node_info' => 'Knoteninfo', 'lang_node_info' => 'Knoteninfo',
'lang_node_none' => 'Es sind keine Knoten vorhanden',
'lang_dns1' => 'DNS-Name', 'lang_dns1' => 'DNS-Name',
'lang_dns2' => 'DNS-Alias', 'lang_dns2' => 'DNS-Alias',
'lang_ip' => 'IP-Adresse', 'lang_ip' => 'IP-Adresse',
@ -128,6 +130,7 @@ $lang = array(
'lang_subnet_dhcpstart' => 'DHCP Anfang', 'lang_subnet_dhcpstart' => 'DHCP Anfang',
'lang_subnet_dhcpend' => 'DHCP Ende', 'lang_subnet_dhcpend' => 'DHCP Ende',
'lang_subnet_ntp_server' => 'NTP-Server', 'lang_subnet_ntp_server' => 'NTP-Server',
'lang_subnet_none' => 'Es sind keine Subnetze vorhanden',
'lang_subnetlocation' => 'Subnetz/Ort', 'lang_subnetlocation' => 'Subnetz/Ort',
'lang_subnetlocation_edit' => 'Subnetz/Ort bearbeiten', 'lang_subnetlocation_edit' => 'Subnetz/Ort bearbeiten',
@ -145,7 +148,7 @@ $lang = array(
'lang_zone_add' => 'Zone hinzufügen', 'lang_zone_add' => 'Zone hinzufügen',
'lang_zone_del' => 'Zone löschen', 'lang_zone_del' => 'Zone löschen',
'lang_zone_edit' => 'Zone bearbeiten', 'lang_zone_edit' => 'Zone bearbeiten',
'lang_zone_none' => 'Es sind keine Zonen vorhanden',
'lang_vlan_add' => 'VLAN hinzufügen', 'lang_vlan_add' => 'VLAN hinzufügen',
'lang_vlan_del' => 'VLAN löschen', 'lang_vlan_del' => 'VLAN löschen',
@ -154,6 +157,7 @@ $lang = array(
'lang_vlan_info' => 'VLAN Info', 'lang_vlan_info' => 'VLAN Info',
'lang_vlan_new' => 'VLAN Info', 'lang_vlan_new' => 'VLAN Info',
'lang_vlan_name' => 'VLAN Name', 'lang_vlan_name' => 'VLAN Name',
'lang_vlan_none' => 'Es sind keine VLANs vorhanden',
'lang_vlansubnet' => 'VLAN/Subnetz', 'lang_vlansubnet' => 'VLAN/Subnetz',
'lang_vlansubnet_edit' => 'VLAN/Subnetz bearbeiten', 'lang_vlansubnet_edit' => 'VLAN/Subnetz bearbeiten',

@ -88,6 +88,7 @@ $lang = array(
'lang_location_name' => 'Location name', 'lang_location_name' => 'Location name',
'lang_location_parent' => 'Parent', 'lang_location_parent' => 'Parent',
'lang_sublocation_add' => 'Add Sub-location', 'lang_sublocation_add' => 'Add Sub-location',
'lang_location_none' => 'There are no locations defined',
'lang_locationsubnet' => 'Location/Subnet', 'lang_locationsubnet' => 'Location/Subnet',
'lang_locationsubnet_edit' => 'Edit Location/Subnet', 'lang_locationsubnet_edit' => 'Edit Location/Subnet',
@ -96,6 +97,7 @@ $lang = array(
'lang_node_del' => 'Delete node', 'lang_node_del' => 'Delete node',
'lang_node_edit' => 'Modify node', 'lang_node_edit' => 'Modify node',
'lang_node_info' => 'Node info', 'lang_node_info' => 'Node info',
'lang_node_none' => 'There are no nodes defined',
'lang_dns1' => 'DNS name', 'lang_dns1' => 'DNS name',
'lang_dns2' => 'DNS Alias', 'lang_dns2' => 'DNS Alias',
'lang_ip' => 'IP Address', 'lang_ip' => 'IP Address',
@ -128,6 +130,7 @@ $lang = array(
'lang_subnet_dhcpstart' => 'DHCP Start', 'lang_subnet_dhcpstart' => 'DHCP Start',
'lang_subnet_dhcpend' => 'DHCP End', 'lang_subnet_dhcpend' => 'DHCP End',
'lang_subnet_ntp_server' => 'NTP Server', 'lang_subnet_ntp_server' => 'NTP Server',
'lang_subnet_none' => 'There are no subnets defined',
'lang_subnetlocation' => 'Subnet/Location', 'lang_subnetlocation' => 'Subnet/Location',
'lang_subnetlocation_edit' => 'Edit Subnet/Location', 'lang_subnetlocation_edit' => 'Edit Subnet/Location',
@ -144,6 +147,7 @@ $lang = array(
'lang_zone_add' => 'Add zone', 'lang_zone_add' => 'Add zone',
'lang_zone_del' => 'Delete zone', 'lang_zone_del' => 'Delete zone',
'lang_zone_edit' => 'Mofidy zone', 'lang_zone_edit' => 'Mofidy zone',
'lang_zone_none' => 'There are no zones defined',
'lang_vlan_add' => 'Add VLAN', 'lang_vlan_add' => 'Add VLAN',
'lang_vlan_del' => 'Delete VLAN', 'lang_vlan_del' => 'Delete VLAN',
@ -152,6 +156,7 @@ $lang = array(
'lang_vlan_info' => 'VLAN info', 'lang_vlan_info' => 'VLAN info',
'lang_vlan_new' => 'VLAN info', 'lang_vlan_new' => 'VLAN info',
'lang_vlan_name' => 'VLAN name', 'lang_vlan_name' => 'VLAN name',
'lang_vlan_none' => 'There are no VLANs defined',
'lang_user_language' => 'Language', 'lang_user_language' => 'Language',
'lang_vlansubnet' => 'VLAN/Subnet', 'lang_vlansubnet' => 'VLAN/Subnet',

@ -1,53 +1,53 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assets} ({$assets|@count}) {$lang_assets} ({$assets|@count})
</td> </td>
<td align="right"> <td align="right">
<a href="assetadd.php"><img src="image.php?icon=add" alt="{$lang_asset_add}" {if $suser_tooltips}title="{$lang_asset_add}" {/if}/></a> <a href="assetadd.php"><img src="image.php?icon=add" alt="{$lang_asset_add}" {if $suser_tooltips}title="{$lang_asset_add}" {/if}/></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="submenu initials"> <table class="submenu initials">
<tr> <tr>
{foreach item=letter from=$alphabet} {foreach item=letter from=$alphabet}
<td> <td>
<a href="asset.php?asset_letter={$letter.asset_letter}">{$letter.asset_letter}</a>&nbsp; <a href="asset.php?asset_letter={$letter.asset_letter}">{$letter.asset_letter}</a>&nbsp;
</td> </td>
{/foreach} {/foreach}
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_asset_name} {$lang_asset_name}
</td> </td>
<td class="header"> <td class="header">
{$lang_assetclass_name} {$lang_assetclass_name}
</td> </td>
<td class="header"> <td class="header">
{$lang_asset_info} {$lang_asset_info}
</td> </td>
</tr> </tr>
{foreach item=asset from=$assets} {foreach item=asset from=$assets}
<tr> <tr>
<td class="label"> <td class="label">
<a href="assetview.php?asset.id={$asset.asset_id}">{$asset.asset_name}</a> <a href="assetview.php?asset.id={$asset.asset_id}">{$asset.asset_name}</a>
</td> </td>
<td class="value"> <td class="value">
<a href="assetclassview.php?assetclass_id={$asset.assetclass_id}">{$asset.assetclass_name}</a> <a href="assetclassview.php?assetclass_id={$asset.assetclass_id}">{$asset.assetclass_name}</a>
</td> </td>
<td class="value"> <td class="value">
{$asset.asset_info} {$asset.asset_info}
</td> </td>
</tr> </tr>
{foreachelse} {foreachelse}
<tr> <tr>
<td colspan="2"> <td colspan="3">
{$lang_asset_none} {$lang_asset_none}
</td> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>

@ -1,31 +1,37 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclasses} ({$assetclasses|@count}) {$lang_assetclasses} ({$assetclasses|@count})
</td> </td>
<td align="right"> <td align="right">
<a href="assetclassadd.php"><img src="image.php?icon=add" alt="{$lang_assetclass_add}" {if $suser_tooltips}title="{$lang_assetclass_add}" {/if}/></a> <a href="assetclassadd.php"><img src="image.php?icon=add" alt="{$lang_assetclass_add}" {if $suser_tooltips}title="{$lang_assetclass_add}" {/if}/></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclass} {$lang_assetclass}
</td> </td>
<td class="header"> <td class="header">
{$lang_assetclassgroup_name} {$lang_assetclassgroup_name}
</td> </td>
</tr> </tr>
{foreach item=assetclass from=$assetclasses} {foreach item=assetclass from=$assetclasses}
<tr> <tr>
<td class="label"> <td class="label">
<a href="assetclassview.php?assetclass_id={$assetclass.assetclass_id}">{$assetclass.assetclass_name}</a> <a href="assetclassview.php?assetclass_id={$assetclass.assetclass_id}">{$assetclass.assetclass_name}</a>
</td> </td>
<td class="value"> <td class="value">
<a href="assetclassgroupview.php?assetclassgroup_id={$assetclass.assetclassgroup_id}">{$assetclass.assetclassgroup_name}</a> <a href="assetclassgroupview.php?assetclassgroup_id={$assetclass.assetclassgroup_id}">{$assetclass.assetclassgroup_name}</a>
</td> </td>
</tr> </tr>
{/foreach} {foreachelse}
</table> <tr>
<td colspan="3">
{$lang_assetclass_none}
</td>
</tr>
{/foreach}
</table>

@ -1,26 +1,32 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclassgroups} ({$assetclassgroups|@count}) {$lang_assetclassgroups} ({$assetclassgroups|@count})
</td> </td>
<td align="right"> <td align="right">
<a href="assetclassgroupadd.php"><img src="image.php?icon=add" alt="{$lang_assetclassgroup_add}" {if $suser_tooltips}title="{$lang_assetclassgroup_add}" {/if}/></a> <a href="assetclassgroupadd.php"><img src="image.php?icon=add" alt="{$lang_assetclassgroup_add}" {if $suser_tooltips}title="{$lang_assetclassgroup_add}" {/if}/></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_assetclassgroup_name} {$lang_assetclassgroup_name}
</td> </td>
</tr> </tr>
{foreach item=assetclassgroup from=$assetclassgroups} {foreach item=assetclassgroup from=$assetclassgroups}
<tr> <tr>
<td class="label"> <td class="label">
<img src="image.php?color={$assetclassgroup.assetclassgroup_color}" alt="#{$assetclassgroup.assetclassgroup_color}"> <img src="image.php?color={$assetclassgroup.assetclassgroup_color}" alt="#{$assetclassgroup.assetclassgroup_color}">
<a href="assetclassgroupview.php?assetclassgroup_id={$assetclassgroup.assetclassgroup_id}">{$assetclassgroup.assetclassgroup_name}</a> <a href="assetclassgroupview.php?assetclassgroup_id={$assetclassgroup.assetclassgroup_id}">{$assetclassgroup.assetclassgroup_name}</a>
</td> </td>
</tr> </tr>
{/foreach} {foreachelse}
</table> <tr>
<td>
{$lang_assetclassgroup_none}
</td>
</tr>
{/foreach}
</table>

@ -1,25 +1,31 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
<img class="icon" src="images/building.png" alt="" /> <img class="icon" src="images/building.png" alt="" />
{$lang_locations} ({$locations|@count}) {$lang_locations} ({$locations|@count})
</td> </td>
<td align="right"> <td align="right">
<a href="locationadd.php"><img src="images/building_add.png" alt="{$lang_location_add}" title="{$lang_location_add}" /></a> <a href="locationadd.php"><img src="images/building_add.png" alt="{$lang_location_add}" title="{$lang_location_add}" /></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_location_name} {$lang_location_name}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="value"> {if $locations}
{treelist tree=$locations} <td class="value">
</td> {treelist tree=$locations}
</tr> </td>
</table> {else}
<td class="value">
{$lang_location_none}
</td>
{/if}
</tr>
</table>

@ -1,38 +1,44 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
<img class="icon" src="images/network-ethernet.png" alt="" /> <img class="icon" src="images/network-ethernet.png" alt="" />
{$lang_nodes} ({$node|@count}) {$lang_nodes} ({$node|@count})
</td> </td>
<td align="right"> <td align="right">
<a href="nodeadd.php?subnet_id={$subnet_id}"><img src="image.php?icon=add" alt="{$lang_node_add}"></a> <a href="nodeadd.php?subnet_id={$subnet_id}"><img src="image.php?icon=add" alt="{$lang_node_add}"></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_ip} {$lang_ip}
</td> </td>
<td class="header"> <td class="header">
{$lang_asset_name} {$lang_asset_name}
</td> </td>
<td class="header"> <td class="header">
{$lang_asset_info} {$lang_asset_info}
</td> </td>
</tr> </tr>
{foreach item=node from=$nodes} {foreach item=node from=$nodes}
<tr> <tr>
<td class="label"> <td class="label">
<a href="nodeview.php?node_id={$node.node_id}">{if $node.node_ip}{$node.node_ip}{else}(leer){/if}</a> <a href="nodeview.php?node_id={$node.node_id}">{if $node.node_ip}{$node.node_ip}{else}(leer){/if}</a>
</td> </td>
<td class="value"> <td class="value">
<a href="assetview.php?asset_id={$node.asset_id}">{$node.asset_name}</a> <a href="assetview.php?asset_id={$node.asset_id}">{$node.asset_name}</a>
</td> </td>
<td class="value"> <td class="value">
{$node.asset_info} {$node.asset_info}
</td> </td>
</tr> </tr>
{/foreach} {foreachelse}
<tr>
<td colspan="3">
{$lang_node_none}
</td>
</tr>
{/foreach}
</table> </table>

@ -1,37 +1,43 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnets} ({$subnets|@count}) {$lang_subnets} ({$subnets|@count})
</td> </td>
<td align="right"> <td align="right">
<a href="subnetadd.php"><img src="image.php?icon=add" alt="{$lang_subnet_add}"></a> <a href="subnetadd.php"><img src="image.php?icon=add" alt="{$lang_subnet_add}"></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_subnet_subnetaddress_mask} {$lang_subnet_subnetaddress_mask}
</td> </td>
<td class="header"> <td class="header">
{$lang_nodes} {$lang_nodes}
</td> </td>
<td class="header"> <td class="header">
{$lang_subnet_info} {$lang_subnet_info}
</td> </td>
</tr> </tr>
{foreach item=subnet from=$subnets} {foreach item=subnet from=$subnets}
<tr> <tr>
<td class="label"> <td class="label">
<a href="subnetview.php?subnet_id={$subnet.subnet_id}">{$subnet.subnet_address}/{$subnet.subnet_mask}</a> <a href="subnetview.php?subnet_id={$subnet.subnet_id}">{$subnet.subnet_address}/{$subnet.subnet_mask}</a>
</td> </td>
<td class="value"> <td class="value">
<a href="node.php?subnet_id={$subnet.subnet_id}">{$subnet.node_counter}</a> <a href="node.php?subnet_id={$subnet.subnet_id}">{$subnet.node_counter}</a>
</td> </td>
<td> <td>
{$subnet.subnet_info} {$subnet.subnet_info}
</td> </td>
</tr> </tr>
{/foreach} {foreachelse}
</table> <tr>
<td colspan="3">
{$lang_subnet_none}
</td>
</tr>
{/foreach}
</table>

@ -1,37 +1,43 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_vlans} ({$vlans|@count}) {$lang_vlans} ({$vlans|@count})
</td> </td>
<td align="right"> <td align="right">
<a href="vlanadd.php"><img src="image.php?icon=add" alt="{$lang_vlan_add}" {if $suser_tooltips}title="{$lang_vlan_add}" {/if}/></a> <a href="vlanadd.php"><img src="image.php?icon=add" alt="{$lang_vlan_add}" {if $suser_tooltips}title="{$lang_vlan_add}" {/if}/></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_vlan_number} {$lang_vlan_number}
</td> </td>
<td class="header"> <td class="header">
{$lang_vlan_name} {$lang_vlan_name}
</td> </td>
<td class="header"> <td class="header">
{$lang_vlan_info} {$lang_vlan_info}
</td> </td>
</tr> </tr>
{foreach item=vlan from=$vlans} {foreach item=vlan from=$vlans}
<tr> <tr>
<td class="label"> <td class="label">
{$vlan.vlan_number} {$vlan.vlan_number}
</td> </td>
<td class="value"> <td class="value">
<a href="vlanview.php?vlan_id={$vlan.vlan_id}">{$vlan.vlan_name}</a> <a href="vlanview.php?vlan_id={$vlan.vlan_id}">{$vlan.vlan_name}</a>
</td> </td>
<td> <td>
{$vlan.vlan_info} {$vlan.vlan_info}
</td> </td>
</tr> </tr>
{/foreach} {foreachelse}
</table> <tr>
<td colspan="3">
{$lang_vlan_none}
</td>
</tr>
{/foreach}
</table>

@ -1,38 +1,44 @@
<table class="title"> <table class="title">
<tr> <tr>
<td class="header"> <td class="header">
<img class="icon" src="images/table.png" alt="" /> <img class="icon" src="images/table.png" alt="" />
{$lang_zones} ({$zones|@count}) {$lang_zones} ({$zones|@count})
</td> </td>
<td align="right"> <td align="right">
<a href="zoneadd.php"><img src="image.php?icon=add" alt="{$lang_zone_add}"></a> <a href="zoneadd.php"><img src="image.php?icon=add" alt="{$lang_zone_add}"></a>
</td> </td>
</tr> </tr>
</table> </table>
<table class="info"> <table class="info">
<tr> <tr>
<td class="header"> <td class="header">
{$lang_zone} {$lang_zone}
</td> </td>
<td class="header"> <td class="header">
Hostmaster Hostmaster
</td> </td>
<td class="header"> <td class="header">
Serial Serial
</td> </td>
</tr> </tr>
{foreach item=zone from=$zones} {foreach item=zone from=$zones}
<tr> <tr>
<td class="label"> <td class="label">
<a href="zoneview.php?zone_id={$zone.zone_id}">{$zone.zone_origin}</a> <a href="zoneview.php?zone_id={$zone.zone_id}">{$zone.zone_origin}</a>
</td> </td>
<td class="value"> <td class="value">
{$zone.zone_hostmaster} {$zone.zone_hostmaster}
</td> </td>
<td class="value"> <td class="value">
{$zone.zone_serial} {$zone.zone_serial}
</td> </td>
</tr> </tr>
{/foreach} {foreachelse}
</table> <tr>
<td colspan="3">
{$lang_zone_none}
</td>
</tr>
{/foreach}
</table>