From be8494326b9dc2459f93251b035c5ff1754982a7 Mon Sep 17 00:00:00 2001 From: nightflyza Date: Thu, 3 Sep 2015 13:40:12 +0300 Subject: [PATCH] 0.7.0 rev 4720 --- RELEASE | 2 +- api/libs/api.pon.php | 58 ++++++++++++++++++++++++++++++++-- config/alter.ini | 2 +- config/globalmenu.ini | 9 ++++++ skins/menuicons/warehouse.png | Bin 0 -> 380 bytes 5 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 skins/menuicons/warehouse.png diff --git a/RELEASE b/RELEASE index 604a2a50b..960701f5c 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -0.7.0 rev 4716 +0.7.0 rev 4720 diff --git a/api/libs/api.pon.php b/api/libs/api.pon.php index eb56aaa3f..fdc008ad4 100644 --- a/api/libs/api.pon.php +++ b/api/libs/api.pon.php @@ -2,14 +2,59 @@ class PONizer { + /** + * All available ONU devices + * + * @var array + */ protected $allOnu = array(); + /** + * OLT models data as id=>model data array + * + * @var array + */ protected $allModelsData = array(); + /** + * All available OLT devices + * + * @var array + */ protected $allOltDevices = array(); + /** + * OLT devices snmp data as id=>snmp data array + * + * @var array + */ protected $allOltSnmp = array(); + /** + * Available OLT models as id=>modelname + snmptemplate + * + * @var array + */ protected $allOltModels = array(); + /** + * Contains available SNMP templates for OLT modelids + * + * @var array + */ protected $snmpTemplates = array(); + /** + * Contains current ONU signal cache data as mac=>signal + * + * @var array + */ protected $signalCache = array(); + /** + * System alter.ini config stored as key=>value + * + * @var array + */ protected $altCfg = array(); + /** + * SNMPHelper object instance + * + * @var array + */ protected $snmp = ''; protected $sup = ''; @@ -624,7 +669,7 @@ public function controls() { * @return string */ public function renderOnuList() { - $columns = array('ID', 'Model', 'OLT', 'IP', 'MAC', 'Signal', 'Serial number', 'Login', 'Actions'); + $columns = array('ID', 'Model', 'OLT', 'IP', 'MAC', 'Signal', 'Address', 'Real Name', 'Actions'); $result = wf_JqDtLoader($columns, '?module=ponizer&ajaxonu=true', false, 'ONU'); return ($result); } @@ -653,6 +698,9 @@ protected function loadSignalsCache() { * @return string */ public function ajaxOnuData() { + $allRealnames= zb_UserGetAllRealnames(); + $allAddress= zb_AddressGetFulladdresslistCached(); + if ($this->altCfg['ADCOMMENTS_ENABLED']) { $adcomments = new ADcomments('PONONU'); $adc = true; @@ -668,11 +716,15 @@ public function ajaxOnuData() { if (!empty($this->allOnu)) { foreach ($this->allOnu as $io => $each) { if (!empty($each['login'])) { - $userLink = wf_Link('?module=userprofile&username=' . $each['login'], web_profile_icon() . ' ' . $each['login'], false); + $userLink = wf_Link('?module=userprofile&username=' . $each['login'], web_profile_icon() . ' ' . @$allAddress[$each['login']], false); $userLink = str_replace('"', '', $userLink); $userLink = trim($userLink); + @$userRealName=$allRealnames[$each['login']]; + $userRealName=str_replace('"', '', $userRealName); + $userRealName = trim($userRealName); } else { $userLink = ''; + $userRealName=''; } //checking adcomments availability if ($adc) { @@ -702,8 +754,8 @@ public function ajaxOnuData() { "' . $each['ip'] . '", "' . $each['mac'] . '", "' . $signal . '", - "' . $each['serial'] . '", "' . $userLink . '", + "' . $userRealName . '", "' . $actLinks . '" ],'; } diff --git a/config/alter.ini b/config/alter.ini index 280e2025e..d71a11ece 100644 --- a/config/alter.ini +++ b/config/alter.ini @@ -433,4 +433,4 @@ TARIFFINFO_IN_PROFILE=0 ;Is phonebook module enabled? PHONEBOOK_ENABLED=0 ;Is warehouse accounting enabled? -WAREHOUSE_ENABLED=0 +WAREHOUSE_ENABLED=0 \ No newline at end of file diff --git a/config/globalmenu.ini b/config/globalmenu.ini index a589545dc..cce3e656b 100644 --- a/config/globalmenu.ini +++ b/config/globalmenu.ini @@ -614,6 +614,15 @@ CATEGORY=3 NEED_RIGHT=UBIM NEED_OPTION= + +[warehouse] +NAME="Warehouse" +URL="?module=warehouse" +ICON="warehouse.png" +CATEGORY=3 +NEED_RIGHT=WAREHOUSE +NEED_OPTION=WAREHOUSE_ENABLED + [uhw] NAME="UHW" URL="?module=uhw" diff --git a/skins/menuicons/warehouse.png b/skins/menuicons/warehouse.png new file mode 100644 index 0000000000000000000000000000000000000000..8facacf6d6c487c315920c1cf5f92834ef3affdd GIT binary patch literal 380 zcmV-?0fYXDP)x@TLH0MKRO~*0 zS$tsWF9H=f!E_#`4$G**d&rez1y?D>&l0+^hNoD*5?feE6d}){2J?C3MZ6#bg#`nCyryg1bt!7Eb5WNaj2RIZNnwLP#Oet ac>V@NvNCG`tHQ1T0000