diff --git a/doc/lms.mysql b/doc/lms.mysql
index f78d64a4ab..03d0c7fd29 100644
--- a/doc/lms.mysql
+++ b/doc/lms.mysql
@@ -1590,6 +1590,8 @@ CREATE TABLE netnodes (
address_id int(11) DEFAULT NULL,
info text DEFAULT NULL,
ownerid int(11) DEFAULT NULL,
+ flags smallint NOT NULL DEFAULT 0,
+ services varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (id),
CONSTRAINT netnodes_address_id_fkey
FOREIGN KEY (address_id) REFERENCES addresses (id) ON DELETE SET NULL ON UPDATE CASCADE,
@@ -4371,4 +4373,4 @@ INSERT INTO netdevicemodels (name, alternative_name, netdeviceproducerid) VALUES
('XR7', 'XR7 MINI PCI PCBA', 2),
('XR9', 'MINI PCI 600MW 900MHZ', 2);
-INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2024071900');
+INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2024072200');
diff --git a/doc/lms.pgsql b/doc/lms.pgsql
index 438c272266..c31452a5fb 100644
--- a/doc/lms.pgsql
+++ b/doc/lms.pgsql
@@ -1454,6 +1454,8 @@ CREATE TABLE netnodes (
info text DEFAULT NULL,
ownerid integer DEFAULT NULL
CONSTRAINT netnodes_ownerid_fkey REFERENCES customers (id) ON DELETE SET NULL ON UPDATE CASCADE,
+ flags smallint NOT NULL DEFAULT 0,
+ services varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY(id)
);
@@ -4418,6 +4420,6 @@ INSERT INTO netdevicemodels (name, alternative_name, netdeviceproducerid) VALUES
('XR7', 'XR7 MINI PCI PCBA', 2),
('XR9', 'MINI PCI 600MW 900MHZ', 2);
-INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2024071900');
+INSERT INTO dbinfo (keytype, keyvalue) VALUES ('dbversion', '2024072200');
COMMIT;
diff --git a/lib/LMSDB_common.class.php b/lib/LMSDB_common.class.php
index 8e01eac3dc..2b89b6536e 100644
--- a/lib/LMSDB_common.class.php
+++ b/lib/LMSDB_common.class.php
@@ -25,7 +25,7 @@
*/
// here should be always the newest version of database!
-define('DBVERSION', '2024071900');
+define('DBVERSION', '2024072200');
/**
*
diff --git a/lib/LMSManagers/LMSNetNodeManager.php b/lib/LMSManagers/LMSNetNodeManager.php
index 51afc4fb93..4e5f9da25e 100644
--- a/lib/LMSManagers/LMSNetNodeManager.php
+++ b/lib/LMSManagers/LMSNetNodeManager.php
@@ -29,6 +29,8 @@ class LMSNetNodeManager extends LMSManager implements LMSNetNodeManagerInterface
public function GetNetNodeList($search = array(), $order = 'name,asc')
{
+ global $NETWORK_NODE_FLAGS, $NETWORK_NODE_SERVICES;
+
$search = $search ?? array();
$order = $order ?? 'name,asc';
@@ -128,6 +130,8 @@ public function GetNetNodeList($search = array(), $order = 'name,asc')
'SELECT n.id, n.name' . ($short ? ''
: ', n.type, n.status, n.invprojectid, n.info, n.lastinspectiontime, p.name AS project,
n.divisionid, d.shortname AS division, longitude, latitude, ownership, coowner, uip, miar,
+ n.flags,
+ n.services,
netdevcount.netdevcount,
lc.ident AS location_city_ident,
(CASE WHEN lst.ident IS NULL
@@ -167,6 +171,23 @@ public function GetNetNodeList($search = array(), $order = 'name,asc')
);
}
+ foreach ($nlist as &$netnode) {
+ $flags = $netnode['flags'];
+ $netnode['flags'] = array();
+ foreach ($NETWORK_NODE_FLAGS as $flag => $label) {
+ if ($flags & $flag) {
+ $netnode['flags'][$flag] = $flag;
+ }
+ }
+
+ $services = explode(',', $netnode['services']);
+ $netnode['services'] = array();
+ foreach ($services as $service) {
+ $netnodes['services'][$service] = $service;
+ }
+ }
+ unset($netnode);
+
if (!$short && $nlist) {
$filecontainers = $this->db->GetAllByKey(
'SELECT fc.netnodeid
@@ -234,6 +255,17 @@ public function NetNodeAdd($netnodedata)
'ownerid' => !empty($netnodedata['ownerid']) && !empty($netnodedata['ownership']) ? $netnodedata['ownerid'] : null
);
+ if (array_key_exists('flags', $netnodedata)) {
+ $args['flags'] = 0;
+ foreach ($netnodedata['flags'] as $flag) {
+ $args['flags'] += $flag;
+ }
+ }
+
+ if (array_key_exists('services', $netnodedata)) {
+ $args['services'] = implode(',', $netnodedata['services']);
+ }
+
$this->db->Execute("INSERT INTO netnodes (" . implode(', ', array_keys($args))
. ") VALUES (" . implode(', ', array_fill(0, count($args), '?')) . ")", array_values($args));
@@ -310,6 +342,17 @@ public function NetNodeUpdate($netnodedata)
$args['ownerid'] = empty($netnodedata['ownerid']) || empty($netnodedata['ownership']) ? null : $netnodedata['ownerid'];
}
+ if (array_key_exists('flags', $netnodedata)) {
+ $args['flags'] = 0;
+ foreach ($netnodedata['flags'] as $flag) {
+ $args['flags'] += $flag;
+ }
+ }
+
+ if (array_key_exists('services', $netnodedata)) {
+ $args['services'] = implode(',', $netnodedata['services']);
+ }
+
if (empty($args)) {
return null;
}
@@ -359,6 +402,8 @@ public function NetNodeUpdate($netnodedata)
public function GetNetNode($id)
{
+ global $NETWORK_NODE_FLAGS;
+
$result = $this->db->GetRow("SELECT n.*, p.name AS projectname,
addr.location, addr.name as location_name, addr.id as address_id,
addr.state as location_state_name, addr.state_id as location_state,
@@ -380,6 +425,20 @@ public function GetNetNode($id)
LEFT JOIN location_states ls ON ls.id = ld.stateid
WHERE n.id=?", array($id));
+ $flags = $result['flags'];
+ $result['flags'] = array();
+ foreach ($NETWORK_NODE_FLAGS as $flag => $label) {
+ if ($flags & $flag) {
+ $result['flags'][$flag] = $flag;
+ }
+ }
+
+ $services = explode(',', $result['services']);
+ $result['services'] = array();
+ foreach ($services as $service) {
+ $result['services'][$service] = $service;
+ }
+
if (!empty($result['location_city'])) {
$result['teryt'] = 1;
}
diff --git a/lib/definitions.php b/lib/definitions.php
index 0d6bac7323..7d0df08774 100644
--- a/lib/definitions.php
+++ b/lib/definitions.php
@@ -426,6 +426,29 @@
RTMESSAGE_ASSIGNED_EVENT_CHANGE = 4194304,
RTMESSAGE_ASSIGNED_EVENT_DELETE = 8388608;
+const NETWORK_NODE_FLAG_BSA = 1,
+ NETWORK_NODE_FLAG_INTERFACE_COUNT_INCREASE_POSSIBILITY = 2,
+ NETWORK_NODE_FLAG_CRITICAL_INFRASTRUCTURE = 4;
+
+$NETWORK_NODE_FLAGS = array(
+ NETWORK_NODE_FLAG_BSA => trans('BSA service'),
+ NETWORK_NODE_FLAG_INTERFACE_COUNT_INCREASE_POSSIBILITY => trans('interface count increase possibility'),
+ NETWORK_NODE_FLAG_CRITICAL_INFRASTRUCTURE => trans('critical infrastructure'),
+);
+
+$NETWORK_NODE_SERVICES = array(
+ 1 => trans('access to cable ducting'),
+ 2 => trans('access to dark fibers'),
+ 3 => trans('LLU'),
+ 4 => trans('VULA'),
+ 5 => trans('access to pole substructure, towers and masts'),
+ 6 => trans('collocation'),
+ 7 => trans('network connection in collocation mode'),
+ 8 => trans('network connection in linear mode'),
+ 9 => trans('provided to end user'),
+ 10 => trans('other'),
+);
+
const NETWORK_INTERFACE_TYPE_UNI = 0,
NETWORK_INTERFACE_TYPE_NNI = 1;
@@ -1685,6 +1708,8 @@ function ($link_technology) {
if (isset($SMARTY)) {
$SMARTY->assign(
array(
+ '_NETWORK_NODE_FLAGS' => $NETWORK_NODE_FLAGS,
+ '_NETWORK_NODE_SERVICES' => $NETWORK_NODE_SERVICES,
'_NETWORK_INTERFACE_TYPES' => $NETWORK_INTERFACE_TYPES,
'_CTYPES' => $CTYPES,
'_CSTATUSES' => $CSTATUSES,
diff --git a/lib/locale/pl_PL/strings.php b/lib/locale/pl_PL/strings.php
index 2f60c15982..a3f4e89d3c 100644
--- a/lib/locale/pl_PL/strings.php
+++ b/lib/locale/pl_PL/strings.php
@@ -5937,3 +5937,17 @@
$_LANG['Mark as LLU service'] = 'Oznacz jako usługę LLU';
$_LANG['BSA service'] = 'Usługa BSA';
$_LANG['Mark as BSA service'] = 'Oznacz jako usługę BSA';
+
+$_LANG['BSA service'] = 'usługa BSA';
+$_LANG['critical infrastructure'] = 'infrastruktura krytyczna';
+$_LANG['interface count increase possibility'] = 'możliwość zwiększenia liczby interfejsów';
+$_LANG['access to cable ducting'] = 'dostęp do kanalizacji kablowej';
+$_LANG['access to dark fibers'] = 'dostęp do ciemnych włókien';
+$_LANG['LLU'] = 'LLU';
+$_LANG['VULA'] = 'VULA';
+$_LANG['access to pole substructure, towers and masts'] = 'dostęp do podbudowy słupowej, wież i masztów';
+$_LANG['collocation'] = 'kolokacja';
+$_LANG['network connection in collocation mode'] = 'połączenie sieci w trybie kolokacji';
+$_LANG['network connection in linear mode'] = 'połączenie sieci w trybie liniowym';
+$_LANG['provided to end user'] = 'świadczona dla użytkowników końcowych';
+$_LANG['other'] = 'inna';
diff --git a/lib/upgradedb/mysql.2024072200.php b/lib/upgradedb/mysql.2024072200.php
new file mode 100644
index 0000000000..b4e2285fae
--- /dev/null
+++ b/lib/upgradedb/mysql.2024072200.php
@@ -0,0 +1,36 @@
+BeginTrans();
+
+if (!$this->ResourceExists('netnodes.flags', LMSDB::RESOURCE_TYPE_COLUMN)) {
+ $this->Execute("ALTER TABLE netnodes ADD COLUMN flags smallint NOT NULL DEFAULT 0");
+}
+
+if (!$this->ResourceExists('netnodes.services', LMSDB::RESOURCE_TYPE_COLUMN)) {
+ $this->Execute("ALTER TABLE netnodes ADD COLUMN services varchar(100) NOT NULL DEFAULT ''");
+}
+
+$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2024072200', 'dbversion'));
+
+$this->CommitTrans();
diff --git a/lib/upgradedb/postgres.2024072200.php b/lib/upgradedb/postgres.2024072200.php
new file mode 100644
index 0000000000..b4e2285fae
--- /dev/null
+++ b/lib/upgradedb/postgres.2024072200.php
@@ -0,0 +1,36 @@
+BeginTrans();
+
+if (!$this->ResourceExists('netnodes.flags', LMSDB::RESOURCE_TYPE_COLUMN)) {
+ $this->Execute("ALTER TABLE netnodes ADD COLUMN flags smallint NOT NULL DEFAULT 0");
+}
+
+if (!$this->ResourceExists('netnodes.services', LMSDB::RESOURCE_TYPE_COLUMN)) {
+ $this->Execute("ALTER TABLE netnodes ADD COLUMN services varchar(100) NOT NULL DEFAULT ''");
+}
+
+$this->Execute("UPDATE dbinfo SET keyvalue = ? WHERE keytype = ?", array('2024072200', 'dbversion'));
+
+$this->CommitTrans();
diff --git a/modules/ukepit.php b/modules/ukepit.php
index 6120e147a1..76792f3d0b 100644
--- a/modules/ukepit.php
+++ b/modules/ukepit.php
@@ -3,7 +3,7 @@
/*
* LMS version 1.11-git
*
- * (C) Copyright 2001-2023 LMS Developers
+ * (C) Copyright 2001-2024 LMS Developers
*
* Please, see the doc/AUTHORS for more information about authors!
*
@@ -24,6 +24,9 @@
* $Id$
*/
+define('ELEMENT_MODE_FLEXIBILITY_POINT', 1);
+define('ELEMENT_MODE_NETWORK_NODE', 2);
+
ini_set('memory_limit', '512M');
ini_set('max_execution_time', '0');
@@ -489,6 +492,8 @@ function to_csv($data)
$real_netnodes = $DB->GetAllByKey(
"SELECT nn.id, nn.name, nn.invprojectid, nn.type, nn.status, nn.ownership, nn.coowner,
nn.longitude, nn.latitude,
+ nn.flags,
+ nn.services,
a.city_id as location_city, a.street_id as location_street, a.house as location_house, a.flat as location_flat,
a.city as location_city_name, a.street as location_street_name,
a.zip AS location_zip,
@@ -933,6 +938,8 @@ function find_nodes_for_netdev($customerid, $netdevid, &$customer_nodes, &$custo
$netnodes[$netnodename]['id'] = $netnodeid;
$netnodes[$netnodename]['invproject'] = strlen($projectname) ? array($projectname) : array();
$netnodes[$netnodename]['name'] = $netnodename;
+ $netnodes[$netnodename]['flags'] = array();
+ $netnodes[$netnodename]['services'] = array();
if (array_key_exists($netdevice['netnodeid'], $real_netnodes)) {
$netnode = $real_netnodes[$netdevice['netnodeid']];
@@ -949,6 +956,21 @@ function find_nodes_for_netdev($customerid, $netdevid, &$customer_nodes, &$custo
$netnodes[$netnodename]['ownership'] = intval($netnode['ownership']);
$netnodes[$netnodename]['coowner'] = $netnode['coowner'];
+ $flags = $netnodes[$netnodename]['flags'];
+ $netnodes[$netnodename]['flags'] = array();
+ foreach ($NETWORK_NODE_FLAGS as $flag => $label) {
+ if ($flags & $flag) {
+ $netnodes[$netnodename]['flags'][$flag] = $flag;
+ }
+ }
+
+ $netnodes[$netnodename]['services'] = array_map(
+ function ($service) {
+ return sprintf('%02d', $service);
+ },
+ $netnodes[$netnodename]['services']
+ );
+
if (strlen($netnode['coowner'])) {
$coowner = $netnode['coowner'];
@@ -1082,7 +1104,7 @@ function find_nodes_for_netdev($customerid, $netdevid, &$customer_nodes, &$custo
$netnodes[$netnodename]['latitudes'] = array();
}
- $netnodes[$netnodename]['mode'] = empty($netdevice['passive']) ? 2 : 1;
+ $netnodes[$netnodename]['mode'] = empty($netdevice['passive']) ? ELEMENT_MODE_NETWORK_NODE : ELEMENT_MODE_FLEXIBILITY_POINT;
$netnodes[$netnodename]['media'] = array();
$netnodes[$netnodename]['technologies'] = array();
@@ -1090,8 +1112,8 @@ function find_nodes_for_netdev($customerid, $netdevid, &$customer_nodes, &$custo
$netnodes[$netnodename]['parent_netnodename'] = null;
$netnodeid++;
- } elseif (empty($netdevice['passive']) && $netnodes[$netnodename]['mode'] < 2) {
- $netnodes[$netnodename]['mode'] = 2;
+ } elseif (empty($netdevice['passive']) && $netnodes[$netnodename]['mode'] < ELEMENT_MODE_NETWORK_NODE) {
+ $netnodes[$netnodename]['mode'] = ELEMENT_MODE_NETWORK_NODE;
}
$netdevice['ownership'] = $netnodes[$netnodename]['ownership'];
@@ -1891,7 +1913,7 @@ function analyze_network_tree($netnode_name, $netnode_netdevid, $netnode_netlink
echo ' komentarz: ' . $nd['comment'] . '
';
}
echo ' ' . trans('location: $a', $nd['location']) . '
';
- echo ' typ: ' . ($netnode['mode'] == 1 ? 'punkt elastyczności' : 'węzeł') . '
';
+ echo ' typ: ' . ($netnode['mode'] == ELEMENT_MODE_FLEXIBILITY_POINT ? 'punkt elastyczności' : 'węzeł') . '
';
echo ' ' . trans(
'device: $a (#$b)',
'' . $netdevices[$nd['netdevid']]['name'] . '',
@@ -1916,7 +1938,7 @@ function analyze_network_tree($netnode_name, $netnode_netdevid, $netnode_netlink
$processed_netdevices[$netnode_netdevid] = true;
if (!$same_netnode) {
- if ($netnode['mode'] == 2) {
+ if ($netnode['mode'] == ELEMENT_MODE_NETWORK_NODE) {
$current_netnode_name = $netnode_name;
} else {
$netnode['parent_netnodename'] = $current_netnode_name;
@@ -1957,7 +1979,7 @@ function analyze_network_tree($netnode_name, $netnode_netdevid, $netnode_netlink
}
foreach ($netnodes as $netnodename => $netnode) {
- if ($netnodename == $root_netnode_name && $netnode['mode'] != 2) {
+ if ($netnodename == $root_netnode_name && $netnode['mode'] != ELEMENT_MODE_NETWORK_NODE) {
echo trans(
'Root network node \'$a\' does not contain any active network devices!',
empty($netnode['real_id'])
@@ -1983,7 +2005,7 @@ function analyze_network_tree($netnode_name, $netnode_netdevid, $netnode_netlink
$processed_netnodes = analyze_network_tree($root_netnode_name, $root_netdevice_id, null, false, $root_netnode_name, array(), $netnodes, $netdevices, $all_netlinks);
foreach ($netnodes as $netnodename => $netnode) {
- if ($netnode['mode'] != 2 && !isset($netnode['parent_netnodename'])
+ if ($netnode['mode'] != ELEMENT_MODE_NETWORK_NODE && !isset($netnode['parent_netnodename'])
&& $verify_feeding_netnodes_of_flexibility_points
&& (isset($processed_netnodes[$netnodename]) || $report_elements_outside_network_infrastructure)) {
$errors['flexibility-points'][] = array(
@@ -2163,10 +2185,10 @@ function analyze_network_tree($netnode_name, $netnode_netdevid, $netnode_netlink
'dstname' => $othernetdevice['name'],
'dstnetnode' => $othernetnode,
);
- if ($netdevnetnode['mode'] == 1) {
+ if ($netdevnetnode['mode'] == ELEMENT_MODE_FLEXIBILITY_POINT) {
$error['srcerror'] = true;
}
- if ($othernetnode['mode'] == 1) {
+ if ($othernetnode['mode'] == ELEMENT_MODE_FLEXIBILITY_POINT) {
$error['dsterror'] = true;
}
if (isset($error['srcerror']) || isset($error['dsterror'])) {
@@ -2303,6 +2325,17 @@ function analyze_network_tree($netnode_name, $netnode_netdevid, $netnode_netlink
$netnodes[$netnode['parent_netnodename']]['technologies'][$netnode['uplink_technology']] = $netnode['uplink_technology'];
}
}
+
+ if ($netnode['mode'] < ELEMENT_MODE_NETWORK_NODE && !empty($netnode['parent_netnodename'])) {
+ if (!empty($netnode['flags'])) {
+ $netnodes[$netnode['parent_netnodename']]['flags'] = array_merge($netnodes[$netnode['parent_netnodename']]['flags'], $netnode['flags']);
+ }
+
+ if (!empty($netnode['services'])) {
+ $netnodes[$netnode['parent_netnodename']]['services'] = array_merge($netnodes[$netnode['parent_netnodename']]['services'], $netnode['services']);
+ }
+ }
+
$netnode['ethernet_technologies'] = array_filter(
array_unique($netnode['local_technologies']),
function ($technology) use ($pit_ethernet_technologies) {
@@ -2330,7 +2363,7 @@ function ($technology) use ($pit_ethernet_technologies) {
$media[$mediaCode][$technology] = $technology;
}
- if ($netnode['mode'] == 2) {
+ if ($netnode['mode'] == ELEMENT_MODE_NETWORK_NODE) {
if (strlen($netnode['coowner']) && !empty($netnode['ownership'])) {
$used_foreigners[$netnode['coowner']] = true;
}
@@ -2346,15 +2379,15 @@ function ($technology) use ($pit_ethernet_technologies) {
'we08_szerokosc' => $netnode['latitude'] ?? '',
'we09_dlugosc' => $netnode['longitude'] ?? '',
'we10_medium' => '',
- 'we11_bsa' => 'Nie',
+ 'we11_bsa' => isset($netnode['flags'][NETWORK_NODE_FLAG_BSA]) ? 'Tak' : 'Nie',
'we12_technologia_dostepowa' => '',
'we13_uslugi_transmisji_danych' => '',
- 'we14_mozliwosc_zwiekszenia_liczby_interfejsow' => 'Nie',
+ 'we14_mozliwosc_zwiekszenia_liczby_interfejsow' => isset($netnode['flags'][NETWORK_NODE_FLAG_INTERFACE_COUNT_INCREASE_POSSIBILITY]) ? 'Tak' : 'Nie',
'we15_finansowanie_publ' => empty($netnode['invproject']) ? 'Nie' : 'Tak',
'we16_numery_projektow_publ' => empty($netnode['invproject'])
? ''
: implode(';', $netnode['invproject']),
- 'we17_infrastruktura_o_duzym_znaczeniu' => 'Nie',
+ 'we17_infrastruktura_o_duzym_znaczeniu' => isset($netnode['flags'][NETWORK_NODE_FLAG_CRITICAL_INFRASTRUCTURE]) ? 'Tak' : 'Nie',
'we18_typ_interfejsu' => empty($netnode['ethernet_technologies'])
? ''
: implode(
@@ -2400,6 +2433,11 @@ function ($technology) use ($mediaCode) {
$w_buffer .= to_csv($data) . EOL;
}
} else {
+ if (!empty($netnode['technologies'])) {
+ $netnode['services'][] = '09';
+ }
+ $netnode['services'] = array_unique($netnode['services']);
+
$data = array(
'pe01_id_pe' => '',
'pe02_typ_pe' => pointCodeByNetNodeType($netnode['type']),
@@ -2413,7 +2451,7 @@ function ($technology) use ($mediaCode) {
'pe10_dlugosc' => $netnode['longitude'] ?? '',
'pe11_medium_transmisyjne' => '',
'pe12_technologia_dostepowa' => '',
- 'pe13_mozliwosc_swiadczenia_uslug' => empty($netnode['technologies']) ? '' : '09',
+ 'pe13_mozliwosc_swiadczenia_uslug' => implode(';', $netnode['services']),
'pe14_finansowanie_publ' => empty($netnode['invproject']) ? 'Nie' : 'Tak',
'pe15_numery_projektow_publ' => empty($netnode['invproject'])
? ''
@@ -2463,9 +2501,9 @@ function ($technology) use ($mediaCode) {
if (!empty($netnode['ranges'])) {
foreach ($netnode['ranges'] as $range_key => $range) {
- if ($netnode['mode'] == 2) {
+ if ($netnode['mode'] == ELEMENT_MODE_NETWORK_NODE) {
$new_pe = $netnodes[$netnodename];
- $new_pe['mode'] = 1;
+ $new_pe['mode'] = ELEMENT_MODE_FLEXIBILITY_POINT;
$new_pe['parent_netnodename'] = $netnodename;
$new_netnodename = 'V-' . (strlen($netnodename) ? $netnodename : 'BEZ-NAZWY');
$netnodes[$new_netnodename] = $new_pe;
@@ -2528,7 +2566,7 @@ function ($technology) use ($mediaCode) {
} else {
echo '' . (isset($netnode['real_id']) ? '' . $netnodename . '' : $netnodename) . ':
';
echo ' lokalizacja: ' . $netnode['location_city_name'] . (empty($netnode['location_street_name']) ? '' : ', ' . $netnode['location_street_name']) . ' ' . $netnode['location_house'] . '
';
- echo ' typ: ' . ($netnode['mode'] == 1 ? 'punkt elastyczności' : 'węzeł') . '
';
+ echo ' typ: ' . ($netnode['mode'] == ELEMENT_MODE_FLEXIBILITY_POINT ? 'punkt elastyczności' : 'węzeł') . '
';
echo ' obecny w drzewie: ';
if (isset($processed_netnodes[$netnodename])) {
@@ -2538,7 +2576,7 @@ function ($technology) use ($mediaCode) {
}
echo '
';
- if ($netnode['mode'] == 1) {
+ if ($netnode['mode'] == ELEMENT_MODE_FLEXIBILITY_POINT) {
echo ' zasilany z węzła: ' . ($netnode['parent_netnodename'] ?? '-') . '
';
}
@@ -2554,7 +2592,7 @@ function ($technology) use ($mediaCode) {
}
}
- if ($netnode['mode'] == 2) {
+ if ($netnode['mode'] == ELEMENT_MODE_NETWORK_NODE) {
echo ' technologie ethernetowe w węźle:
';
if (empty($netnode['ethernet_technologies'])) {
echo ' (brak)
';
@@ -2688,8 +2726,8 @@ function ($technology) use ($mediaCode) {
$data = array(
'lb01_id_lb' => 'LB-' . $netlink['id'],
- 'lb02_id_punktu_poczatkowego' => ($srcnetnode['mode'] == 1 ? 'P' : 'W') . '-' . $srcnetnodename,
- 'lb03_id_punktu_koncowego' => ($dstnetnode['mode'] == 1 ? 'P' : 'W') . '-' . $dstnetnodename,
+ 'lb02_id_punktu_poczatkowego' => ($srcnetnode['mode'] == ELEMENT_MODE_FLEXIBILITY_POINT ? 'P' : 'W') . '-' . $srcnetnodename,
+ 'lb03_id_punktu_koncowego' => ($dstnetnode['mode'] == ELEMENT_MODE_FLEXIBILITY_POINT ? 'P' : 'W') . '-' . $dstnetnodename,
'lb04_medium_transmisyjne' => strlen($netlink['license']) ? 'radiowe na częstotliwości wymagającej uzyskanie pozwolenia radiowego' : 'radiowe na częstotliwości ogólnodostępnej',
'lb05_nr_pozwolenia_radiowego' => $netlink['license'],
'lb06_pasmo_radiowe' => strlen($netlink['license']) ? '' : $frequency,
@@ -2730,7 +2768,7 @@ function ($technology) use ($mediaCode) {
$data = array(
'lk01_id_lk' => 'LK-' . $netlink['id'],
- 'lk02_id_punktu_poczatkowego' => ($srcnetnode['mode'] == 1 ? 'P' : 'W') . '-' . $srcnetnodename,
+ 'lk02_id_punktu_poczatkowego' => ($srcnetnode['mode'] == ELEMENT_MODE_FLEXIBILITY_POINT ? 'P' : 'W') . '-' . $srcnetnodename,
'lk03_punkty_zalamania' => 'LINESTRING('
. implode(
',',
@@ -2741,7 +2779,7 @@ function ($point) {
$points
)
) . ')',
- 'lk04_id_punktu_koncowego' => ($dstnetnode['mode'] == 1 ? 'P' : 'W') . '-' . $dstnetnodename,
+ 'lk04_id_punktu_koncowego' => ($dstnetnode['mode'] == ELEMENT_MODE_FLEXIBILITY_POINT ? 'P' : 'W') . '-' . $dstnetnodename,
'lk05_medium_transmisyjne' => mediaNameByTechnology($technology),
'lk06_rodzaj_linii_kablowej' => routeTypeName($netlink['routetype']),
'lk07_liczba_wlokien' => $netlink['type'] == LINKTYPE_FIBER
diff --git a/templates/default/netnode/netnodeinfobox.html b/templates/default/netnode/netnodeinfobox.html
index 03640f07fa..fd1544582b 100644
--- a/templates/default/netnode/netnodeinfobox.html
+++ b/templates/default/netnode/netnodeinfobox.html
@@ -1,4 +1,14 @@
+
+ {icon name="options" class="fa-fw"} + | ++ {trans("Flags")} + | +
+ {strip}
+ {foreach $nodeinfo.flags as $flag}
+ {$_NETWORK_NODE_FLAGS[$flag]}
+ {if !$flag@last},{/if}
+ + {/foreach} + {/strip} + |
+
+ {icon name="money" class="fa-fw"} + | ++ {trans("Services")} + | +
+
|
+
diff --git a/templates/default/netnode/netnodemodify.html b/templates/default/netnode/netnodemodify.html
index b142a01a7c..375cc074dc 100644
--- a/templates/default/netnode/netnodemodify.html
+++ b/templates/default/netnode/netnodemodify.html
@@ -15,6 +15,15 @@ {$layout.pagetitle}flex-direction: column !important; } + #netnode-services { + align-items: flex-start; + } + + #netnode-services .lms-ui-box-row-field { + flex-direction: column; + align-items: flex-start; + } + @@ -195,6 +204,26 @@{$layout.pagetitle}{/box_row} + {box_row icon="options" icon_class="fa-fw" label="Flags"} + {foreach $_NETWORK_NODE_FLAGS as $flag => $label} + + {/foreach} + {/box_row} + + {box_row icon="money" icon_class="fa-fw" label="Services" id="netnode-services"} + {foreach $_NETWORK_NODE_SERVICES as $service => $label} + + {/foreach} + {/box_row} + {box_row icon="note" icon_class="fa-fw" label="Note"} |