Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/sv_SE/LC_MESSAGES/dashboard.po =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/sv_SE/LC_MESSAGES/dashboard.po (revision 9884) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/sv_SE/LC_MESSAGES/dashboard.po (revision 9884) @@ -0,0 +1,349 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# Copyright 2009, Mikael Carlsson +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: FreePBX dashboard 2.6\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-25 11:50+0100\n" +"PO-Revision-Date: 2009-12-25 11:50+0100\n" +"Last-Translator: Mikael Carlsson \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Swedish\n" +"X-Poedit-Country: SWEDEN\n" + +#: class.astinfo.php:234 page.index.php:162 +msgid "seconds" +msgstr "sekunder" + +#: class.astinfo.php:234 +msgid "second" +msgstr "sekund" + +#: class.astinfo.php:235 page.index.php:160 page.index.php:188 +msgid "minutes" +msgstr "minuter" + +#: class.astinfo.php:235 page.index.php:188 +msgid "minute" +msgstr "minut" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hours" +msgstr "timmar" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hour" +msgstr "timme" + +#: class.astinfo.php:237 page.index.php:182 +msgid "days" +msgstr "dagar" + +#: class.astinfo.php:237 +msgid "day" +msgstr "dag" + +#: class.astinfo.php:238 page.index.php:179 +msgid "weeks" +msgstr "veckor" + +#: class.astinfo.php:238 page.index.php:179 +msgid "week" +msgstr "vecka" + +#: class.astinfo.php:239 +msgid "years" +msgstr "Ã¥r" + +#: class.astinfo.php:239 +msgid "year" +msgstr "Ã¥r" + +#: page.index.php:119 +msgid "OK" +msgstr "OK" + +#: page.index.php:123 +msgid "Warn" +msgstr "Varning" + +#: page.index.php:127 +msgid "ERROR" +msgstr "FEL" + +#: page.index.php:131 +msgid "Disabled" +msgstr "Avaktiverad" + +#: page.index.php:198 +msgid "System Statistics" +msgstr "Systemstatistik" + +#: page.index.php:199 +msgid "Processor" +msgstr "Processor" + +#: page.index.php:201 +msgid "Load Average" +msgstr "Genomsnittlig belastning" + +#: page.index.php:202 +msgid "CPU" +msgstr "CPU" + +#: page.index.php:204 +msgid "Memory" +msgstr "Minne" + +#: page.index.php:207 +msgid "App Memory" +msgstr "Applikationsminne" + +#: page.index.php:208 +msgid "Swap" +msgstr "VÀxlingsfil" + +#: page.index.php:210 +msgid "Disks" +msgstr "Enheter" + +#: page.index.php:215 +msgid "Networks" +msgstr "NÀtverket" + +#: page.index.php:226 +msgid "receive" +msgstr "mottagna" + +#: page.index.php:227 +msgid "transmit" +msgstr "skickade" + +#: page.index.php:261 +msgid "FreePBX Statistics" +msgstr "FreePBX statistik" + +#: page.index.php:262 +msgid "Total active calls" +msgstr "Totalt antal aktiva samtal" + +#: page.index.php:263 +msgid "Internal calls" +msgstr "Interna samtal" + +#: page.index.php:264 +msgid "External calls" +msgstr "Externa samtal" + +#: page.index.php:265 +msgid "Total active channels" +msgstr "Totalt antal aktiva kanaler" + +#: page.index.php:267 +msgid "FreePBX Connections" +msgstr "Anslutningar till FreePBX" + +#: page.index.php:284 +msgid "IP Phones Online" +msgstr "IP-telefoner on-line" + +#: page.index.php:287 +msgid "IP Trunks Online" +msgstr "IP-trunkar on-line" + +#: page.index.php:290 +msgid "IP Trunk Registrations" +msgstr "Registrerade IP-trunkar" + +#: page.index.php:299 +msgid "Uptime" +msgstr "Upptid" + +#: page.index.php:300 +msgid "System Information Table" +msgstr "Tabell för systeminformation" + +#: page.index.php:308 +msgid "System Uptime" +msgstr "Systemets upptid" + +#: page.index.php:316 +msgid "Asterisk Uptime" +msgstr "Asterisk upptid" + +#: page.index.php:317 +msgid "Last Reload" +msgstr "Senaste omladdning" + +#: page.index.php:329 +msgid "Server Status" +msgstr "Serverstatus" + +#: page.index.php:332 page.index.php:334 +msgid "Asterisk" +msgstr "Asterisk" + +#: page.index.php:332 +#, php-format +msgid "Asterisk is running: %s" +msgstr "Asterisk körs: %s" + +#: page.index.php:334 +msgid "Asterisk is not running, this is a critical service!" +msgstr "Asterisk körs inte. detta Àr en kritisk tjÀnst!" + +#: page.index.php:340 page.index.php:342 +msgid "Manager Proxy" +msgstr "Proxyhanterare" + +#: page.index.php:340 +msgid "Asterisk Manager Proxy is running" +msgstr "Asterisk proxyhanterare körs" + +#: page.index.php:342 +msgid "" +"Asterisk Manager Proxy is not running, FreePBX will fall back to using " +"Asterisk directly, which may result in poor performance" +msgstr "" +"Asterisk proxyhanterare körs inte, FreePBX kommer att köra direkt mot " +"Asterisk, detta kan innebÀra dÃ¥lig prestanda" + +#: page.index.php:349 page.index.php:353 page.index.php:355 +msgid "Op Panel" +msgstr "Operatörspanel" + +#: page.index.php:349 +msgid "FOP Operator Panel Server is running" +msgstr "Operatörspanelen körs" + +#: page.index.php:353 +msgid "" +"FOP Operator Panel Server is not running, you will not be able to use the " +"operator panel, but the system will run fine without it." +msgstr "" +"Operatörspanelen körs inte, du kommer inte att kunna anvÀnda den, men " +"systemet kommer att fungera fint utan den." + +#: page.index.php:355 +msgid "FOP Operator Panel is disabled in amportal.conf" +msgstr "Operatörspanelen Àr avaktiverad i amportal.conf" + +#: page.index.php:369 +msgid "MySQL" +msgstr "MySQL" + +#: page.index.php:369 +msgid "MySQL Server is running" +msgstr "MySQL-servern körs" + +#: page.index.php:373 +msgid "Web Server" +msgstr "Webserver" + +#: page.index.php:373 +msgid "Web Server is running" +msgstr "Webservern körs" + +#: page.index.php:378 page.index.php:380 +msgid "SSH Server" +msgstr "SSH-server" + +#: page.index.php:378 +msgid "SSH Server is running" +msgstr "SSH-servern körs" + +#: page.index.php:380 +msgid "" +"SSH Server is not running, you will not be able to connect to the system " +"console remotely" +msgstr "" +"SSH-servern körs inte, du kommer inte att kunna koppla upp dig mot systemet " +"via SSH" + +#: page.index.php:400 +msgid "Critical Error" +msgstr "Kritiskt fel" + +#: page.index.php:401 +msgid "Security Update" +msgstr "SÀkerhetsuppdatering" + +#: page.index.php:402 +msgid "Update" +msgstr "Uppdatering" + +#: page.index.php:403 +msgid "Error" +msgstr "Fel" + +#: page.index.php:404 +msgid "Warning" +msgstr "Varning" + +#: page.index.php:405 +msgid "Notice" +msgstr "Notering" + +#: page.index.php:414 +msgid "FreePBX Notices" +msgstr "Meddelanden frÃ¥n FreePBX" + +#: page.index.php:438 page.index.php:440 +msgid "Delete this" +msgstr "Ta bort denna" + +#: page.index.php:443 page.index.php:445 +msgid "Ignore this" +msgstr "Ignorera denna" + +#: page.index.php:452 +#, php-format +msgid "Added %s ago" +msgstr "Adderad för %s sedan" + +#: page.index.php:461 +msgid "No notifications" +msgstr "Inga meddelanden" + +#: page.index.php:463 +msgid "No new notifications" +msgstr "Inga nya meddelanden" + +#: page.index.php:471 +msgid "show new" +msgstr "Visa nya" + +#: page.index.php:473 +msgid "show all" +msgstr "Visa alla" + +#: page.index.php:618 +msgid "loading..." +msgstr "Laddar.." + +#: page.index.php:634 +msgid "FreePBX System Status" +msgstr "FreePBX systemstatus" + +#: moudle.xml +msgid "System Dashboard" +msgstr "Instrumentpanelen" Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/bg_BG/LC_MESSAGES/dashboard.po =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/bg_BG/LC_MESSAGES/dashboard.po (revision 8451) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/bg_BG/LC_MESSAGES/dashboard.po (revision 8451) @@ -0,0 +1,351 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# Copyright 2008 FreePBX +# Copyright 2009 Chavdar Iliev +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: FreePBX v2.6\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-25 11:50+0100\n" +"PO-Revision-Date: 2009-01-16 14:06+0200\n" +"Last-Translator: \n" +"Language-Team: Chavdar Iliev \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Bulgarian\n" +"X-Poedit-Country: BULGARIA\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: class.astinfo.php:234 page.index.php:162 +msgid "seconds" +msgstr "секуМЎО" + +#: class.astinfo.php:234 +msgid "second" +msgstr "секуМЎа" + +#: class.astinfo.php:235 page.index.php:160 page.index.php:188 +msgid "minutes" +msgstr "ЌОМутО" + +#: class.astinfo.php:235 page.index.php:188 +msgid "minute" +msgstr "ЌОМута" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hours" +msgstr "часа" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hour" +msgstr "час" + +#: class.astinfo.php:237 page.index.php:182 +msgid "days" +msgstr "ЎМО" + +#: class.astinfo.php:237 +msgid "day" +msgstr "ЎеМ" + +#: class.astinfo.php:238 page.index.php:179 +msgid "weeks" +msgstr "сеЎЌОцО" + +#: class.astinfo.php:238 page.index.php:179 +msgid "week" +msgstr "сеЎЌОца" + +#: class.astinfo.php:239 +msgid "years" +msgstr "гПЎОМО" + +#: class.astinfo.php:239 +msgid "year" +msgstr "гПЎОМа" + +#: page.index.php:119 +msgid "OK" +msgstr "OK" + +#: page.index.php:123 +msgid "Warn" +msgstr "ПреЎупрежЎаваЌ" + +#: page.index.php:127 +msgid "ERROR" +msgstr "ГРЕККА" + +#: page.index.php:131 +msgid "Disabled" +msgstr "" + +#: page.index.php:198 +msgid "System Statistics" +msgstr "СОстеЌеМ Статус" + +#: page.index.php:199 +msgid "Processor" +msgstr "ИзпПлзваМ ПрПцесПр" + +#: page.index.php:201 +msgid "Load Average" +msgstr "СреЎМП НатПварваМе" + +#: page.index.php:202 +msgid "CPU" +msgstr "CPU" + +#: page.index.php:204 +msgid "Memory" +msgstr "ИзпПлзваМа ПаЌет" + +#: page.index.php:207 +msgid "App Memory" +msgstr "ПаЌет" + +#: page.index.php:208 +msgid "Swap" +msgstr "Swap" + +#: page.index.php:210 +msgid "Disks" +msgstr "ДОскПве" + +#: page.index.php:215 +msgid "Networks" +msgstr "МрежО" + +#: page.index.php:226 +msgid "receive" +msgstr "пПлучеМО" + +#: page.index.php:227 +msgid "transmit" +msgstr "ОзпратеМО" + +#: page.index.php:261 +msgid "FreePBX Statistics" +msgstr "FreePBX СтатОстОка" + +#: page.index.php:262 +msgid "Total active calls" +msgstr "ОбщП актОвМО разгПвПрО" + +#: page.index.php:263 +msgid "Internal calls" +msgstr "ВътрешМО разгПвПрО" + +#: page.index.php:264 +msgid "External calls" +msgstr "ВъМшМО разгПвПрО" + +#: page.index.php:265 +msgid "Total active channels" +msgstr "ОбщП актОвМО каМалО" + +#: page.index.php:267 +msgid "FreePBX Connections" +msgstr "FreePBX СвързаМО" + +#: page.index.php:284 +msgid "IP Phones Online" +msgstr "IP ТелефПМО ОМлайМ" + +#: page.index.php:287 +msgid "IP Trunks Online" +msgstr "IP ВъМшМО ЛОМОО ОМлайМ" + +#: page.index.php:290 +msgid "IP Trunk Registrations" +msgstr "IP ВъМшМО ЛОМОО РегОстрацОО" + +#: page.index.php:299 +msgid "Uptime" +msgstr "ЕксплПатацОя" + +#: page.index.php:300 +msgid "System Information Table" +msgstr "ИМфПрЌацОя за СОстеЌата" + +#: page.index.php:308 +msgid "System Uptime" +msgstr "ЕксплПатацОя Ма СОстеЌата " + +#: page.index.php:316 +msgid "Asterisk Uptime" +msgstr "ЕксплПатацОя Ма АстерОск" + +#: page.index.php:317 +msgid "Last Reload" +msgstr "ППслеЎМП ПрезарежЎаМе" + +#: page.index.php:329 +msgid "Server Status" +msgstr "СъстПяМОе Ма Сървъра" + +#: page.index.php:332 page.index.php:334 +msgid "Asterisk" +msgstr "АстерОск" + +#: page.index.php:332 +#, php-format +msgid "Asterisk is running: %s" +msgstr "АстерОск рабПтО: %s" + +#: page.index.php:334 +msgid "Asterisk is not running, this is a critical service!" +msgstr "АстерОск Ме рабПтО, тПва е крОтОчМа услуга!" + +#: page.index.php:340 page.index.php:342 +msgid "Manager Proxy" +msgstr "Manager ПрПксО" + +#: page.index.php:340 +msgid "Asterisk Manager Proxy is running" +msgstr "АстерОск Manager ПрПксО рабПтО" + +#: page.index.php:342 +msgid "" +"Asterisk Manager Proxy is not running, FreePBX will fall back to using " +"Asterisk directly, which may result in poor performance" +msgstr "" +"АстерОск Manager ПрПксО Ме рабПтО, FreePBX ще ОзпПлзва АстерОск ЎОректМП, " +"кПетП ЌПже Ўа ЎПвеЎе ЎП влПшеМа прПОзвПЎОтелМПст" + +#: page.index.php:349 page.index.php:353 page.index.php:355 +msgid "Op Panel" +msgstr "ЀОП" + +#: page.index.php:349 +msgid "FOP Operator Panel Server is running" +msgstr "ЀОП Сървъра рабПтО" + +#: page.index.php:353 +msgid "" +"FOP Operator Panel Server is not running, you will not be able to use the " +"operator panel, but the system will run fine without it." +msgstr "" +"ЀОП Сървъра Ме рабПтО, МяЌа Ўа ЌПжете Ўа ОзпПлзвате ПператПр паМела, МП " +"сОстеЌата ще рабПтО МПрЌалМП без МегП." + +#: page.index.php:355 +msgid "FOP Operator Panel is disabled in amportal.conf" +msgstr "ЀОП е забраМеМ в amportal.conf" + +#: page.index.php:369 +msgid "MySQL" +msgstr "MySQL" + +#: page.index.php:369 +msgid "MySQL Server is running" +msgstr "MySQL Сървъра рабПтО" + +#: page.index.php:373 +msgid "Web Server" +msgstr "Уеб Сървър" + +#: page.index.php:373 +msgid "Web Server is running" +msgstr "Уеб Сървъра рабПтО" + +#: page.index.php:378 page.index.php:380 +msgid "SSH Server" +msgstr "SSH Сървър" + +#: page.index.php:378 +msgid "SSH Server is running" +msgstr "SSH Сървъра рабПтО" + +#: page.index.php:380 +msgid "" +"SSH Server is not running, you will not be able to connect to the system " +"console remotely" +msgstr "" +"SSH Сървъра Ме рабПтО, МяЌа Ўа ЌПжете Ўа се свързвате със сОстеЌата " +"ЎОстаМцОПММП." + +#: page.index.php:400 +msgid "Critical Error" +msgstr "КрОтОчМа Грешка" + +#: page.index.php:401 +msgid "Security Update" +msgstr "ЗащОтМП ОбМПвяваМе" + +#: page.index.php:402 +msgid "Update" +msgstr "ОбМПвяваМе" + +#: page.index.php:403 +msgid "Error" +msgstr "Грешка" + +#: page.index.php:404 +msgid "Warning" +msgstr "ВМОЌаМОе" + +#: page.index.php:405 +msgid "Notice" +msgstr "ПреЎупрежЎеМОе" + +#: page.index.php:414 +msgid "FreePBX Notices" +msgstr "FreePBX ПреЎупрежЎеМОя" + +#: page.index.php:438 page.index.php:440 +msgid "Delete this" +msgstr "ИзтрОй тПва" + +#: page.index.php:443 page.index.php:445 +msgid "Ignore this" +msgstr "ИгМПрОрай тПва" + +#: page.index.php:452 +#, php-format +msgid "Added %s ago" +msgstr "ДПбавеМП преЎО %s" + +#: page.index.php:461 +msgid "No notifications" +msgstr "НяЌа преЎупрежЎеМОя" + +#: page.index.php:463 +msgid "No new notifications" +msgstr "НяЌа МПвО преЎупрежЎеМОя" + +#: page.index.php:471 +msgid "show new" +msgstr "пПкажО МПвОте" + +#: page.index.php:473 +msgid "show all" +msgstr "пПкажО всОчкО" + +#: page.index.php:618 +msgid "loading..." +msgstr "зарежЎаЌ..." + +#: page.index.php:634 +msgid "FreePBX System Status" +msgstr "FreePBX СОстеЌеМ Статус" + +#: moudle.xml +msgid "System Dashboard" +msgstr "ИМфПрЌацОя за СОстеЌата" Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/zh_CN/LC_MESSAGES/dashboard.po =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/zh_CN/LC_MESSAGES/dashboard.po (revision 8451) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/zh_CN/LC_MESSAGES/dashboard.po (revision 8451) @@ -0,0 +1,353 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# Copyright 2008 FreePBX +# Copyright 2009 EdwardBadBoy +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: FreePBX 2.6 Chinese Translation\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-25 11:50+0100\n" +"PO-Revision-Date: 2009-01-30 17:45+0800\n" +"Last-Translator: 呚埁晟 \n" +"Language-Team: EdwardBadBoy \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: class.astinfo.php:234 page.index.php:162 +msgid "seconds" +msgstr "秒" + +#: class.astinfo.php:234 +msgid "second" +msgstr "秒" + +#: class.astinfo.php:235 page.index.php:160 page.index.php:188 +msgid "minutes" +msgstr "分钟" + +#: class.astinfo.php:235 page.index.php:188 +msgid "minute" +msgstr "分钟" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hours" +msgstr "小时" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hour" +msgstr "小时" + +#: class.astinfo.php:237 page.index.php:182 +msgid "days" +msgstr "倩" + +#: class.astinfo.php:237 +msgid "day" +msgstr "倩" + +#: class.astinfo.php:238 page.index.php:179 +msgid "weeks" +msgstr "星期" + +#: class.astinfo.php:238 page.index.php:179 +msgid "week" +msgstr "星期" + +#: class.astinfo.php:239 +msgid "years" +msgstr "幎" + +#: class.astinfo.php:239 +msgid "year" +msgstr "幎" + +#: page.index.php:119 +msgid "OK" +msgstr "正垞" + +#: page.index.php:123 +msgid "Warn" +msgstr "譊告" + +#: page.index.php:127 +msgid "ERROR" +msgstr "错误" + +#: page.index.php:131 +msgid "Disabled" +msgstr "" + +#: page.index.php:198 +msgid "System Statistics" +msgstr "系统统计数据" + +#: page.index.php:199 +msgid "Processor" +msgstr "倄理噚" + +#: page.index.php:201 +msgid "Load Average" +msgstr "平均莟蜜" + +#: page.index.php:202 +msgid "CPU" +msgstr "CPU" + +#: page.index.php:204 +msgid "Memory" +msgstr "å† +存" + +#: page.index.php:207 +msgid "App Memory" +msgstr "åº”ç”šçš‹åºå† +存" + +#: page.index.php:208 +msgid "Swap" +msgstr "亀换空闎" + +#: page.index.php:210 +msgid "Disks" +msgstr "磁盘" + +#: page.index.php:215 +msgid "Networks" +msgstr "眑络" + +#: page.index.php:226 +msgid "receive" +msgstr "接收" + +#: page.index.php:227 +msgid "transmit" +msgstr "䌠蟓" + +#: page.index.php:261 +msgid "FreePBX Statistics" +msgstr "FreePBX 统计数据" + +#: page.index.php:262 +msgid "Total active calls" +msgstr "总掻劚呌叫数" + +#: page.index.php:263 +msgid "Internal calls" +msgstr "å† +郚呌叫数" + +#: page.index.php:264 +msgid "External calls" +msgstr "倖郚呌叫数" + +#: page.index.php:265 +msgid "Total active channels" +msgstr "总掻劚频道数" + +#: page.index.php:267 +msgid "FreePBX Connections" +msgstr "FreePBX 连接" + +#: page.index.php:284 +msgid "IP Phones Online" +msgstr "圚线的IP电话" + +#: page.index.php:287 +msgid "IP Trunks Online" +msgstr "圚线的IPäž­ç»§" + +#: page.index.php:290 +msgid "IP Trunk Registrations" +msgstr "泚册的IPäž­ç»§" + +#: page.index.php:299 +msgid "Uptime" +msgstr "已运行时闎" + +#: page.index.php:300 +msgid "System Information Table" +msgstr "系统信息衚" + +#: page.index.php:308 +msgid "System Uptime" +msgstr "系统已运行时闎" + +#: page.index.php:316 +msgid "Asterisk Uptime" +msgstr "Asterisk已运行时闎" + +#: page.index.php:317 +msgid "Last Reload" +msgstr "最后䞀次重蜜" + +#: page.index.php:329 +msgid "Server Status" +msgstr "系统状态" + +#: page.index.php:332 page.index.php:334 +msgid "Asterisk" +msgstr "Asterisk" + +#: page.index.php:332 +#, php-format +msgid "Asterisk is running: %s" +msgstr "Asterisk正圚运行%s" + +#: page.index.php:334 +msgid "Asterisk is not running, this is a critical service!" +msgstr "Asterisk未运行而它是å +³é”®æœåŠ¡ïŒ" + +#: page.index.php:340 page.index.php:342 +msgid "Manager Proxy" +msgstr "管理噚的代理" + +#: page.index.php:340 +msgid "Asterisk Manager Proxy is running" +msgstr "Asterisk管理噚代理皋序正圚运行" + +#: page.index.php:342 +msgid "" +"Asterisk Manager Proxy is not running, FreePBX will fall back to using " +"Asterisk directly, which may result in poor performance" +msgstr "" +"Asterisk的管理噚代理皋序未运行FreePBX将盎接管理Asterisk这可胜䌚垊来性胜损" +"倱" + +#: page.index.php:349 page.index.php:353 page.index.php:355 +msgid "Op Panel" +msgstr "Op面版" + +#: page.index.php:349 +msgid "FOP Operator Panel Server is running" +msgstr "FOP操䜜面版服务正圚运行" + +#: page.index.php:353 +msgid "" +"FOP Operator Panel Server is not running, you will not be able to use the " +"operator panel, but the system will run fine without it." +msgstr "FOP操䜜面版服务未运行䜠将无法䜿甚操䜜面版䜆系统仍然正垞运行。" + +#: page.index.php:355 +msgid "FOP Operator Panel is disabled in amportal.conf" +msgstr "FOP操䜜面版圚amportal.conf䞭被犁甚" + +#: page.index.php:369 +msgid "MySQL" +msgstr "MySQL" + +#: page.index.php:369 +msgid "MySQL Server is running" +msgstr "MySQL服务正圚运行" + +#: page.index.php:373 +msgid "Web Server" +msgstr "Web服务噚" + +#: page.index.php:373 +msgid "Web Server is running" +msgstr "Web服务噚正圚运行" + +#: page.index.php:378 page.index.php:380 +msgid "SSH Server" +msgstr "SSH服务噚" + +#: page.index.php:378 +msgid "SSH Server is running" +msgstr "SSH服务噚正圚运行" + +#: page.index.php:380 +msgid "" +"SSH Server is not running, you will not be able to connect to the system " +"console remotely" +msgstr "SSH服务噚未运行䜠将无法远皋登圕到系统终端" + +#: page.index.php:400 +msgid "Critical Error" +msgstr "䞥重错误" + +#: page.index.php:401 +msgid "Security Update" +msgstr "安å +šæ›Žæ–°" + +#: page.index.php:402 +msgid "Update" +msgstr "曎新" + +#: page.index.php:403 +msgid "Error" +msgstr "错误" + +#: page.index.php:404 +msgid "Warning" +msgstr "譊告" + +#: page.index.php:405 +msgid "Notice" +msgstr "通知" + +#: page.index.php:414 +msgid "FreePBX Notices" +msgstr "FreePBX通知" + +#: page.index.php:438 page.index.php:440 +msgid "Delete this" +msgstr "删陀" + +#: page.index.php:443 page.index.php:445 +msgid "Ignore this" +msgstr "応略" + +#: page.index.php:452 +#, php-format +msgid "Added %s ago" +msgstr "是圚 %s 以前添加的" + +#: page.index.php:461 +msgid "No notifications" +msgstr "没有通知消息" + +#: page.index.php:463 +msgid "No new notifications" +msgstr "没有新的通知消息" + +#: page.index.php:471 +msgid "show new" +msgstr "星瀺新项" + +#: page.index.php:473 +msgid "show all" +msgstr "星瀺所有项" + +#: page.index.php:618 +msgid "loading..." +msgstr "è£ +蜜䞭。。。" + +#: page.index.php:634 +msgid "FreePBX System Status" +msgstr "FreePBX系统状态" + +#: moudle.xml +msgid "System Dashboard" +msgstr "系统状态" Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/pt_BR/LC_MESSAGES/dashboard.po =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/pt_BR/LC_MESSAGES/dashboard.po (revision 8451) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/pt_BR/LC_MESSAGES/dashboard.po (revision 8451) @@ -0,0 +1,346 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# Copyright 2009, Marcelo Arauj +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-25 11:50+0100\n" +"PO-Revision-Date: 2009-05-11 20:10-0300\n" +"Last-Translator: Marcelo Araujo \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: class.astinfo.php:234 page.index.php:162 +msgid "seconds" +msgstr "segundos" + +#: class.astinfo.php:234 +msgid "second" +msgstr "" + +#: class.astinfo.php:235 page.index.php:160 page.index.php:188 +msgid "minutes" +msgstr "minutos" + +#: class.astinfo.php:235 page.index.php:188 +msgid "minute" +msgstr "minuto" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hours" +msgstr "horas" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hour" +msgstr "hora" + +#: class.astinfo.php:237 page.index.php:182 +msgid "days" +msgstr "dias" + +#: class.astinfo.php:237 +msgid "day" +msgstr "dias" + +#: class.astinfo.php:238 page.index.php:179 +msgid "weeks" +msgstr "semanas" + +#: class.astinfo.php:238 page.index.php:179 +msgid "week" +msgstr "semana" + +#: class.astinfo.php:239 +msgid "years" +msgstr "" + +#: class.astinfo.php:239 +msgid "year" +msgstr "" + +#: page.index.php:119 +msgid "OK" +msgstr "OK" + +#: page.index.php:123 +msgid "Warn" +msgstr "Alerta" + +#: page.index.php:127 +msgid "ERROR" +msgstr "Erro" + +#: page.index.php:131 +msgid "Disabled" +msgstr "" + +#: page.index.php:198 +msgid "System Statistics" +msgstr "Estatísticas do sistema" + +#: page.index.php:199 +msgid "Processor" +msgstr "Processador" + +#: page.index.php:201 +msgid "Load Average" +msgstr "Média de Carga" + +#: page.index.php:202 +msgid "CPU" +msgstr "CPU" + +#: page.index.php:204 +msgid "Memory" +msgstr "Memória" + +#: page.index.php:207 +msgid "App Memory" +msgstr "Memória App" + +#: page.index.php:208 +msgid "Swap" +msgstr "Swap" + +#: page.index.php:210 +msgid "Disks" +msgstr "Discos" + +#: page.index.php:215 +msgid "Networks" +msgstr "Redes" + +#: page.index.php:226 +msgid "receive" +msgstr "média rx" + +#: page.index.php:227 +msgid "transmit" +msgstr "média tx" + +#: page.index.php:261 +msgid "FreePBX Statistics" +msgstr "Estatísticas do freePBX" + +#: page.index.php:262 +msgid "Total active calls" +msgstr "Total de chamadas ativas" + +#: page.index.php:263 +msgid "Internal calls" +msgstr "Chamadas internas" + +#: page.index.php:264 +msgid "External calls" +msgstr "Chamadas externas" + +#: page.index.php:265 +msgid "Total active channels" +msgstr "Total de canais ativos" + +#: page.index.php:267 +msgid "FreePBX Connections" +msgstr "Conexões freePBX" + +#: page.index.php:284 +msgid "IP Phones Online" +msgstr "Telefones IP Online" + +#: page.index.php:287 +msgid "IP Trunks Online" +msgstr "Troncos IP Online" + +#: page.index.php:290 +msgid "IP Trunk Registrations" +msgstr "Registros de troncos IP" + +#: page.index.php:299 +msgid "Uptime" +msgstr "Tempo ativo" + +#: page.index.php:300 +msgid "System Information Table" +msgstr "Tabela de Informações do sistema" + +#: page.index.php:308 +msgid "System Uptime" +msgstr "Tempo ativo do Sistema" + +#: page.index.php:316 +msgid "Asterisk Uptime" +msgstr "Tempo ativo do Asterisk" + +#: page.index.php:317 +msgid "Last Reload" +msgstr "Última recarga" + +#: page.index.php:329 +msgid "Server Status" +msgstr "Status do Servidor" + +#: page.index.php:332 page.index.php:334 +msgid "Asterisk" +msgstr "Asterisk" + +#: page.index.php:332 +#, php-format +msgid "Asterisk is running: %s" +msgstr "Asterisk está rodando: %s" + +#: page.index.php:334 +msgid "Asterisk is not running, this is a critical service!" +msgstr "Asterisk não está rodando, este é um serviço crítico!" + +#: page.index.php:340 page.index.php:342 +msgid "Manager Proxy" +msgstr "Manager Proxy" + +#: page.index.php:340 +msgid "Asterisk Manager Proxy is running" +msgstr "O Manager Proxy está rodando" + +#: page.index.php:342 +msgid "" +"Asterisk Manager Proxy is not running, FreePBX will fall back to using " +"Asterisk directly, which may result in poor performance" +msgstr "" +"O Manager Proxy não está rodando, o freePBX acessará o Asterisk diretamente," +"o que pode resultar uma performance fraca" + +#: page.index.php:349 page.index.php:353 page.index.php:355 +msgid "Op Panel" +msgstr "Op Panel" + +#: page.index.php:349 +msgid "FOP Operator Panel Server is running" +msgstr "Servidor FOP está rodando" + +#: page.index.php:353 +msgid "" +"FOP Operator Panel Server is not running, you will not be able to use the " +"operator panel, but the system will run fine without it." +msgstr "" +"O servidor FOP não está rodando, não será possível usar o Operator panel," +"porém o sistema funciona normalmente sem ele." + +#: page.index.php:355 +msgid "FOP Operator Panel is disabled in amportal.conf" +msgstr "FOP Operator Panel está desabilitado no amporta.conf" + +#: page.index.php:369 +msgid "MySQL" +msgstr "MySQL" + +#: page.index.php:369 +msgid "MySQL Server is running" +msgstr "Servidor MySQL está rodando" + +#: page.index.php:373 +msgid "Web Server" +msgstr "Servidor Web" + +#: page.index.php:373 +msgid "Web Server is running" +msgstr "Servidor Web está rodando" + +#: page.index.php:378 page.index.php:380 +msgid "SSH Server" +msgstr "Servidor SSH" + +#: page.index.php:378 +msgid "SSH Server is running" +msgstr "Servidor SSH está rodando" + +#: page.index.php:380 +msgid "" +"SSH Server is not running, you will not be able to connect to the system " +"console remotely" +msgstr "" +"Servidor SSH não está rodando, Não é possível acessar a console do sistema " +"remotamente" + +#: page.index.php:400 +msgid "Critical Error" +msgstr "Erro Crítico" + +#: page.index.php:401 +msgid "Security Update" +msgstr "Atualização de Segurança" + +#: page.index.php:402 +msgid "Update" +msgstr "Atualização" + +#: page.index.php:403 +msgid "Error" +msgstr "Erro" + +#: page.index.php:404 +msgid "Warning" +msgstr "Alerta" + +#: page.index.php:405 +msgid "Notice" +msgstr "Notificação" + +#: page.index.php:414 +msgid "FreePBX Notices" +msgstr "Notificações do freePBX" + +#: page.index.php:438 page.index.php:440 +msgid "Delete this" +msgstr "Excluír este" + +#: page.index.php:443 page.index.php:445 +msgid "Ignore this" +msgstr "Ignorar este" + +#: page.index.php:452 +#, php-format +msgid "Added %s ago" +msgstr "" + +#: page.index.php:461 +msgid "No notifications" +msgstr "Sem notificações" + +#: page.index.php:463 +msgid "No new notifications" +msgstr "Sem novas notificações" + +#: page.index.php:471 +msgid "show new" +msgstr "mostrar novo" + +#: page.index.php:473 +msgid "show all" +msgstr "mostrar todos" + +#: page.index.php:618 +msgid "loading..." +msgstr "carregando..." + +#: page.index.php:634 +msgid "FreePBX System Status" +msgstr "Status do freePBX" + +#: moudle.xml +msgid "System Dashboard" +msgstr "Painel do sistema" Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/dashboard.pot =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/dashboard.pot (revision 8957) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/dashboard.pot (revision 8957) @@ -0,0 +1,273 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# FreePBX language template for dashboard +# Copyright (C) 2008, 2009, 2010 Bandwith.com +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-02-27 17:34+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "seconds" +msgstr "" + +msgid "second" +msgstr "" + +msgid "minutes" +msgstr "" + +msgid "minute" +msgstr "" + +msgid "hours" +msgstr "" + +msgid "hour" +msgstr "" + +msgid "days" +msgstr "" + +msgid "day" +msgstr "" + +msgid "weeks" +msgstr "" + +msgid "week" +msgstr "" + +msgid "years" +msgstr "" + +msgid "year" +msgstr "" + +msgid "System Dashboard" +msgstr "" + +msgid "Basic" +msgstr "" + +msgid "" +"Provides a system information dashboard, showing information about Calls, " +"CPU, Memory, Disks, Network, and processes." +msgstr "" + +msgid "FreePBX System Status" +msgstr "" + +msgid "OK" +msgstr "" + +msgid "Warn" +msgstr "" + +msgid "ERROR" +msgstr "" + +msgid "Disabled" +msgstr "" + +msgid "System Statistics" +msgstr "" + +msgid "Processor" +msgstr "" + +msgid "Load Average" +msgstr "" + +msgid "CPU" +msgstr "" + +msgid "Memory" +msgstr "" + +msgid "App Memory" +msgstr "" + +msgid "Swap" +msgstr "" + +msgid "Disks" +msgstr "" + +msgid "Networks" +msgstr "" + +msgid "receive" +msgstr "" + +msgid "transmit" +msgstr "" + +msgid "FreePBX Statistics" +msgstr "" + +msgid "Total active calls" +msgstr "" + +msgid "Internal calls" +msgstr "" + +msgid "External calls" +msgstr "" + +msgid "Total active channels" +msgstr "" + +msgid "FreePBX Connections" +msgstr "" + +msgid "IP Phones Online" +msgstr "" + +msgid "IP Trunks Online" +msgstr "" + +msgid "IP Trunk Registrations" +msgstr "" + +msgid "Uptime" +msgstr "" + +msgid "System Information Table" +msgstr "" + +msgid "System Uptime" +msgstr "" + +msgid "Asterisk Uptime" +msgstr "" + +msgid "Last Reload" +msgstr "" + +msgid "Server Status" +msgstr "" + +msgid "Asterisk" +msgstr "" + +#, php-format +msgid "Asterisk is running: %s" +msgstr "" + +msgid "Asterisk is not running, this is a critical service!" +msgstr "" + +msgid "Manager Proxy" +msgstr "" + +msgid "Asterisk Manager Proxy is running" +msgstr "" + +msgid "" +"Asterisk Manager Proxy is not running, FreePBX will fall back to using " +"Asterisk directly, which may result in poor performance" +msgstr "" + +msgid "Op Panel" +msgstr "" + +msgid "FOP Operator Panel Server is running" +msgstr "" + +msgid "" +"FOP Operator Panel Server is not running, you will not be able to use the " +"operator panel, but the system will run fine without it." +msgstr "" + +msgid "FOP Operator Panel is disabled in amportal.conf" +msgstr "" + +msgid "MySQL" +msgstr "" + +msgid "MySQL Server is running" +msgstr "" + +msgid "Web Server" +msgstr "" + +msgid "Web Server is running" +msgstr "" + +msgid "SSH Server" +msgstr "" + +msgid "SSH Server is running" +msgstr "" + +msgid "" +"SSH Server is not running, you will not be able to connect to the system " +"console remotely" +msgstr "" + +msgid "Critical Error" +msgstr "" + +msgid "Security Update" +msgstr "" + +msgid "Update" +msgstr "" + +msgid "Error" +msgstr "" + +msgid "Warning" +msgstr "" + +msgid "Notice" +msgstr "" + +msgid "FreePBX Notices" +msgstr "" + +msgid "Delete this" +msgstr "" + +msgid "Ignore this" +msgstr "" + +#, php-format +msgid "Added %s ago" +msgstr "" + +msgid "No notifications" +msgstr "" + +msgid "No new notifications" +msgstr "" + +msgid "show new" +msgstr "" + +msgid "show all" +msgstr "" + +msgid "loading..." +msgstr "" Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/it_IT/LC_MESSAGES/dashboard.po =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/it_IT/LC_MESSAGES/dashboard.po (revision 8451) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/it_IT/LC_MESSAGES/dashboard.po (revision 8451) @@ -0,0 +1,351 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# Copyright 2008 FreePBX +# Copyright 2008 Francesco Romano +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 2.5\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-25 11:50+0100\n" +"PO-Revision-Date: 2008-11-10 11:55+0100\n" +"Last-Translator: Francesco Romano \n" +"Language-Team: Italian\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Italian\n" +"X-Poedit-Country: ITALY\n" + +#: class.astinfo.php:234 page.index.php:162 +msgid "seconds" +msgstr "" + +#: class.astinfo.php:234 +msgid "second" +msgstr "" + +#: class.astinfo.php:235 page.index.php:160 page.index.php:188 +msgid "minutes" +msgstr "minuti" + +#: class.astinfo.php:235 page.index.php:188 +msgid "minute" +msgstr "minuti" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hours" +msgstr "ore" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hour" +msgstr "ora" + +#: class.astinfo.php:237 page.index.php:182 +msgid "days" +msgstr "giorni" + +#: class.astinfo.php:237 +msgid "day" +msgstr "" + +#: class.astinfo.php:238 page.index.php:179 +msgid "weeks" +msgstr "settimane" + +#: class.astinfo.php:238 page.index.php:179 +msgid "week" +msgstr "settimana" + +#: class.astinfo.php:239 +msgid "years" +msgstr "" + +#: class.astinfo.php:239 +msgid "year" +msgstr "" + +#: page.index.php:119 +msgid "OK" +msgstr "OK" + +#: page.index.php:123 +msgid "Warn" +msgstr "Attenz" + +#: page.index.php:127 +msgid "ERROR" +msgstr "ERRORE" + +#: page.index.php:131 +msgid "Disabled" +msgstr "" + +#: page.index.php:198 +msgid "System Statistics" +msgstr "Statistiche di Sistema" + +#: page.index.php:199 +msgid "Processor" +msgstr "Processore" + +#: page.index.php:201 +msgid "Load Average" +msgstr "Carico Medio" + +#: page.index.php:202 +msgid "CPU" +msgstr "CPU" + +#: page.index.php:204 +msgid "Memory" +msgstr "Memoria" + +#: page.index.php:207 +msgid "App Memory" +msgstr "Memoria App" + +#: page.index.php:208 +msgid "Swap" +msgstr "Swap" + +#: page.index.php:210 +msgid "Disks" +msgstr "Dischi" + +#: page.index.php:215 +msgid "Networks" +msgstr "Reti" + +#: page.index.php:226 +msgid "receive" +msgstr "riceve" + +#: page.index.php:227 +msgid "transmit" +msgstr "trasmette" + +#: page.index.php:261 +msgid "FreePBX Statistics" +msgstr "Statistiche FreePBX" + +#: page.index.php:262 +msgid "Total active calls" +msgstr "Totale chiamate attive" + +#: page.index.php:263 +msgid "Internal calls" +msgstr "Chiamate interne" + +#: page.index.php:264 +msgid "External calls" +msgstr "Chiamate esterne" + +#: page.index.php:265 +msgid "Total active channels" +msgstr "Totale canali attivi" + +#: page.index.php:267 +msgid "FreePBX Connections" +msgstr "Connessioni FreePBX" + +#: page.index.php:284 +msgid "IP Phones Online" +msgstr "Telefoni IP Online" + +#: page.index.php:287 +msgid "IP Trunks Online" +msgstr "Fasci IP Online" + +#: page.index.php:290 +msgid "IP Trunk Registrations" +msgstr "Registrazioni Fasci IP" + +#: page.index.php:299 +msgid "Uptime" +msgstr "Tempo di esercizio" + +#: page.index.php:300 +msgid "System Information Table" +msgstr "" + +#: page.index.php:308 +msgid "System Uptime" +msgstr "Sistema" + +#: page.index.php:316 +msgid "Asterisk Uptime" +msgstr "Asterisk" + +#: page.index.php:317 +msgid "Last Reload" +msgstr "Ultimo ricaricamento" + +#: page.index.php:329 +msgid "Server Status" +msgstr "Stato Server" + +#: page.index.php:332 page.index.php:334 +msgid "Asterisk" +msgstr "Asterisk" + +#: page.index.php:332 +#, php-format +msgid "Asterisk is running: %s" +msgstr "Asterisk Ú in esecuzione: %s" + +#: page.index.php:334 +msgid "Asterisk is not running, this is a critical service!" +msgstr "Asterisk non Ú in esecuzione, questo Ú un servizio critico!" + +#: page.index.php:340 page.index.php:342 +msgid "Manager Proxy" +msgstr "Proxy Manager" + +#: page.index.php:340 +msgid "Asterisk Manager Proxy is running" +msgstr "Asterisk Manager Proxy in esecuzione" + +#: page.index.php:342 +msgid "" +"Asterisk Manager Proxy is not running, FreePBX will fall back to using " +"Asterisk directly, which may result in poor performance" +msgstr "" +"Asterisk Manager Proxy non Ú in esecuzione, FreePBX si connetterà " +"utilizzando direttamente Asterisk, e le prestazioni saranno degradate" + +#: page.index.php:349 page.index.php:353 page.index.php:355 +msgid "Op Panel" +msgstr "Pannello Operatore" + +#: page.index.php:349 +msgid "FOP Operator Panel Server is running" +msgstr "Pannello Operatore FOP in esecuzione" + +#: page.index.php:353 +msgid "" +"FOP Operator Panel Server is not running, you will not be able to use the " +"operator panel, but the system will run fine without it." +msgstr "" +"Il Pannello Operatore FOP non Ú in esecuzione, non sarai in grado di " +"utilizzare il pannello operatore, ma il sistema funzionerà ugualmente in " +"maniera regolare" + +#: page.index.php:355 +msgid "FOP Operator Panel is disabled in amportal.conf" +msgstr "Pannello Operatore FOP disabilitato in amportal.conf" + +#: page.index.php:369 +msgid "MySQL" +msgstr "MySQL" + +#: page.index.php:369 +msgid "MySQL Server is running" +msgstr "Server MySQL in esecuzione" + +#: page.index.php:373 +msgid "Web Server" +msgstr "Server Web" + +#: page.index.php:373 +msgid "Web Server is running" +msgstr "Server Web in esecuzione" + +#: page.index.php:378 page.index.php:380 +msgid "SSH Server" +msgstr "Server SSH" + +#: page.index.php:378 +msgid "SSH Server is running" +msgstr "Server SSH in esecuzione" + +#: page.index.php:380 +msgid "" +"SSH Server is not running, you will not be able to connect to the system " +"console remotely" +msgstr "" +"Il Server SSH non Ú in esecuzione, non sarai in grado di connetterti in " +"remoto alla console di sistema" + +#: page.index.php:400 +msgid "Critical Error" +msgstr "Errore Critico" + +#: page.index.php:401 +msgid "Security Update" +msgstr "Aggiornamento di Sicurezza" + +#: page.index.php:402 +msgid "Update" +msgstr "Aggiorna" + +#: page.index.php:403 +msgid "Error" +msgstr "Errore" + +#: page.index.php:404 +msgid "Warning" +msgstr "Attenz" + +#: page.index.php:405 +msgid "Notice" +msgstr "Notifica" + +#: page.index.php:414 +msgid "FreePBX Notices" +msgstr "Notifiche FreePBX" + +#: page.index.php:438 page.index.php:440 +msgid "Delete this" +msgstr "Elimina" + +#: page.index.php:443 page.index.php:445 +msgid "Ignore this" +msgstr "Ignora" + +#: page.index.php:452 +#, php-format +msgid "Added %s ago" +msgstr "" + +#: page.index.php:461 +msgid "No notifications" +msgstr "Nessuna notifica" + +#: page.index.php:463 +msgid "No new notifications" +msgstr "Nessuna nuova notifica" + +#: page.index.php:471 +msgid "show new" +msgstr "visualizza nuove" + +#: page.index.php:473 +msgid "show all" +msgstr "visualizza tutte" + +#: page.index.php:618 +msgid "loading..." +msgstr "caricamento..." + +#: page.index.php:634 +msgid "FreePBX System Status" +msgstr "Stato Sistema FreePBX" + +#: moudle.xml +msgid "System Dashboard" +msgstr "Cruscotto di Sistema" Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/ru_RU/LC_MESSAGES/dashboard.po =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/ru_RU/LC_MESSAGES/dashboard.po (revision 8451) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/ru_RU/LC_MESSAGES/dashboard.po (revision 8451) @@ -0,0 +1,346 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# Copyright 2008 FreePBX +# +# Russian freePBX ver. translation +# Copyright (c) 2006-2008 PostMet Corporation +# Alexander Kozyrev , Sergey Nikolayev , 2006-2008. +# +# žáßÞÛì×ÞÒÐâì iconv amp.new -f UTF-8 -t ISO-8859-5 -o amp.po +# fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.3\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-25 11:50+0100\n" +"PO-Revision-Date: 2008-01-16 16:38+0100\n" +"Last-Translator: Alexander Kozyrev \n" +"Language-Team: Russian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-5\n" +"Content-Transfer-Encoding: 8bit\n" + +#: class.astinfo.php:234 page.index.php:162 +msgid "seconds" +msgstr "" + +#: class.astinfo.php:234 +msgid "second" +msgstr "" + +#: class.astinfo.php:235 page.index.php:160 page.index.php:188 +msgid "minutes" +msgstr "ÜØÝãâ" + +#: class.astinfo.php:235 page.index.php:188 +msgid "minute" +msgstr "ÜØÝãâÐ" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hours" +msgstr "çÐáÞÒ" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hour" +msgstr "çÐá" + +#: class.astinfo.php:237 page.index.php:182 +msgid "days" +msgstr "ÔÝÕÙ" + +#: class.astinfo.php:237 +msgid "day" +msgstr "" + +#: class.astinfo.php:238 page.index.php:179 +msgid "weeks" +msgstr "ÝÕÔÕÛì" + +#: class.astinfo.php:238 page.index.php:179 +msgid "week" +msgstr "ÝÕÔÕÛï" + +#: class.astinfo.php:239 +msgid "years" +msgstr "" + +#: class.astinfo.php:239 +msgid "year" +msgstr "" + +#: page.index.php:119 +msgid "OK" +msgstr "OK" + +#: page.index.php:123 +msgid "Warn" +msgstr "ŸÓÞ!" + +#: page.index.php:127 +msgid "ERROR" +msgstr "ŸèØÑÚÐ" + +#: page.index.php:131 +msgid "Disabled" +msgstr "" + +#: page.index.php:198 +msgid "System Statistics" +msgstr "ÁâÐâØáâØÚÐ ÁØáâÕÜë" + +#: page.index.php:199 +msgid "Processor" +msgstr "¿àÞæÕááÞà" + +#: page.index.php:201 +msgid "Load Average" +msgstr "ÁàÕÔÝïï ×ÐÓàã×ÚÐ" + +#: page.index.php:202 +msgid "CPU" +msgstr "Æ¿Ã" + +#: page.index.php:204 +msgid "Memory" +msgstr "¿ÐÜïâì" + +#: page.index.php:207 +msgid "App Memory" +msgstr "·ÐÝïâÞ ßàØÛÞÖÕÝØïÜØ" + +#: page.index.php:208 +msgid "Swap" +msgstr "ÄÐÙÛ ßÞÔÚÐçÚØ" + +#: page.index.php:210 +msgid "Disks" +msgstr "ŽØáÚÞÒÐï ßÞÔáØáâÕÜÐ" + +#: page.index.php:215 +msgid "Networks" +msgstr "ÁÕâì" + +#: page.index.php:226 +msgid "receive" +msgstr "ßÞÛãçÕÝÞ" + +#: page.index.php:227 +msgid "transmit" +msgstr "ßÕàÕÔÐÝÞ" + +#: page.index.php:261 +msgid "FreePBX Statistics" +msgstr "FreePBX ÁâÐâØáâØÚÐ" + +#: page.index.php:262 +msgid "Total active calls" +msgstr "°ÚâØÒÝëå ×ÒÞÝÚÞÒ - ÒáÕÓÞ" + +#: page.index.php:263 +msgid "Internal calls" +msgstr "²ÝãâàÕÝÝØå ×ÒÞÝÚÞÒ" + +#: page.index.php:264 +msgid "External calls" +msgstr "²ÝÕèÝØå ×ÒÞÝÚÞÒ" + +#: page.index.php:265 +msgid "Total active channels" +msgstr "°ÚâØÒÝëå ÚÐÝÐÛÞÒ - ÒáÕÓÞ" + +#: page.index.php:267 +msgid "FreePBX Connections" +msgstr "ÁÞÕÔØÝÕÝØÙ FreePBX" + +#: page.index.php:284 +msgid "IP Phones Online" +msgstr "ž¿ ÂÕÛÕäÞÝÞÒ Ò ÞÝÛÐÙÝÕ" + +#: page.index.php:287 +msgid "IP Trunks Online" +msgstr "" + +#: page.index.php:290 +msgid "IP Trunk Registrations" +msgstr "ÀÕÓØáâàÐæØÙ ž¿ âàÐÝÚÞÒ" + +#: page.index.php:299 +msgid "Uptime" +msgstr "" + +#: page.index.php:300 +msgid "System Information Table" +msgstr "" + +#: page.index.php:308 +msgid "System Uptime" +msgstr "ÁØáâÕÜÐ ÖØÒÐ" + +#: page.index.php:316 +msgid "Asterisk Uptime" +msgstr "Asterisk ÖØÒ" + +#: page.index.php:317 +msgid "Last Reload" +msgstr "¿ÕàÕ×ÐÓàãÖÐÛáï" + +#: page.index.php:329 +msgid "Server Status" +msgstr "" + +#: page.index.php:332 page.index.php:334 +msgid "Asterisk" +msgstr "Asterisk" + +#: page.index.php:332 +#, php-format +msgid "Asterisk is running: %s" +msgstr "" + +#: page.index.php:334 +msgid "Asterisk is not running, this is a critical service!" +msgstr "" + +#: page.index.php:340 page.index.php:342 +msgid "Manager Proxy" +msgstr "¿àÞÚáØ ÜÕÝÕÔÖÕà" + +#: page.index.php:340 +msgid "Asterisk Manager Proxy is running" +msgstr "" + +#: page.index.php:342 +msgid "" +"Asterisk Manager Proxy is not running, FreePBX will fall back to using " +"Asterisk directly, which may result in poor performance" +msgstr "" + +#: page.index.php:349 page.index.php:353 page.index.php:355 +msgid "Op Panel" +msgstr "¿ÐÝÕÛì ŸßÕàÐâÞàÐ" + +#: page.index.php:349 +msgid "FOP Operator Panel Server is running" +msgstr "" + +#: page.index.php:353 +msgid "" +"FOP Operator Panel Server is not running, you will not be able to use the " +"operator panel, but the system will run fine without it." +msgstr "" + +#: page.index.php:355 +msgid "FOP Operator Panel is disabled in amportal.conf" +msgstr "" + +#: page.index.php:369 +msgid "MySQL" +msgstr "MySQL" + +#: page.index.php:369 +msgid "MySQL Server is running" +msgstr "" + +#: page.index.php:373 +msgid "Web Server" +msgstr "²íÑ áÕàÒÕà" + +#: page.index.php:373 +msgid "Web Server is running" +msgstr "" + +#: page.index.php:378 page.index.php:380 +msgid "SSH Server" +msgstr "ÁÕàÒÕà SSH" + +#: page.index.php:378 +msgid "SSH Server is running" +msgstr "" + +#: page.index.php:380 +msgid "" +"SSH Server is not running, you will not be able to connect to the system " +"console remotely" +msgstr "" + +#: page.index.php:400 +msgid "Critical Error" +msgstr "" + +#: page.index.php:401 +msgid "Security Update" +msgstr "" + +#: page.index.php:402 +msgid "Update" +msgstr "" + +#: page.index.php:403 +msgid "Error" +msgstr "" + +#: page.index.php:404 +msgid "Warning" +msgstr "" + +#: page.index.php:405 +msgid "Notice" +msgstr "" + +#: page.index.php:414 +msgid "FreePBX Notices" +msgstr "FreePBX áÞÞÑéÕÝØï" + +#: page.index.php:438 page.index.php:440 +msgid "Delete this" +msgstr "" + +#: page.index.php:443 page.index.php:445 +msgid "Ignore this" +msgstr "" + +#: page.index.php:452 +#, php-format +msgid "Added %s ago" +msgstr "ŽÞÑÐÒÛÕÝÞ %s ÝÐ×ÐÔ" + +#: page.index.php:461 +msgid "No notifications" +msgstr "" + +#: page.index.php:463 +msgid "No new notifications" +msgstr "" + +#: page.index.php:471 +msgid "show new" +msgstr "ßÞÚÐ×Ðâì ÝÞÒëå" + +#: page.index.php:473 +msgid "show all" +msgstr "ßÞÚÐ×Ðâì ÒáÕ" + +#: page.index.php:618 +msgid "loading..." +msgstr "ÓàãרÜáï..." + +#: page.index.php:634 +msgid "FreePBX System Status" +msgstr "ÁâÐâãá áØáâÕÜë FreePBX" + +#: moudle.xml +msgid "System Dashboard" +msgstr "" Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/es_ES/LC_MESSAGES/dashboard.po =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/es_ES/LC_MESSAGES/dashboard.po (revision 8451) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/es_ES/LC_MESSAGES/dashboard.po (revision 8451) @@ -0,0 +1,354 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# Copyright 2008 FreePBX +# Copyright 2009 Juan Asensio Sánchez +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: FreePBX - dashboard module spanish translation\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-25 11:50+0100\n" +"PO-Revision-Date: 2009-01-23 10:45+0100\n" +"Last-Translator: Juan Asensio Sánchez \n" +"Language-Team: Juan Asensio Sánchez \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Spanish\n" +"X-Poedit-Country: SPAIN\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: class.astinfo.php:234 page.index.php:162 +msgid "seconds" +msgstr "segundos" + +#: class.astinfo.php:234 +msgid "second" +msgstr "segundo" + +#: class.astinfo.php:235 page.index.php:160 page.index.php:188 +msgid "minutes" +msgstr "minutos" + +#: class.astinfo.php:235 page.index.php:188 +msgid "minute" +msgstr "minuto" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hours" +msgstr "horas" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hour" +msgstr "hora" + +#: class.astinfo.php:237 page.index.php:182 +msgid "days" +msgstr "días" + +#: class.astinfo.php:237 +msgid "day" +msgstr "días" + +#: class.astinfo.php:238 page.index.php:179 +msgid "weeks" +msgstr "semanas" + +#: class.astinfo.php:238 page.index.php:179 +msgid "week" +msgstr "semana" + +#: class.astinfo.php:239 +msgid "years" +msgstr "años" + +#: class.astinfo.php:239 +msgid "year" +msgstr "año" + +#: page.index.php:119 +msgid "OK" +msgstr "OK" + +#: page.index.php:123 +msgid "Warn" +msgstr "Atención" + +#: page.index.php:127 +msgid "ERROR" +msgstr "ERROR" + +#: page.index.php:131 +msgid "Disabled" +msgstr "" + +#: page.index.php:198 +msgid "System Statistics" +msgstr "Estadísticas del sistema" + +#: page.index.php:199 +msgid "Processor" +msgstr "Procesador" + +#: page.index.php:201 +msgid "Load Average" +msgstr "Carga media" + +#: page.index.php:202 +msgid "CPU" +msgstr "CPU" + +#: page.index.php:204 +msgid "Memory" +msgstr "Memoria" + +#: page.index.php:207 +msgid "App Memory" +msgstr "Memoria de aplicaciones" + +#: page.index.php:208 +msgid "Swap" +msgstr "Memoria Swap" + +#: page.index.php:210 +msgid "Disks" +msgstr "Discos" + +#: page.index.php:215 +msgid "Networks" +msgstr "Redes" + +#: page.index.php:226 +msgid "receive" +msgstr "recibidos" + +#: page.index.php:227 +msgid "transmit" +msgstr "enviados" + +#: page.index.php:261 +msgid "FreePBX Statistics" +msgstr "Estadísticas de FreePBX" + +#: page.index.php:262 +msgid "Total active calls" +msgstr "Total de llamadas activas" + +#: page.index.php:263 +msgid "Internal calls" +msgstr "Llamadas internas" + +#: page.index.php:264 +msgid "External calls" +msgstr "Llamadas externas" + +#: page.index.php:265 +msgid "Total active channels" +msgstr "Total de canales activos" + +#: page.index.php:267 +msgid "FreePBX Connections" +msgstr "Conexiones de FreePBX" + +#: page.index.php:284 +msgid "IP Phones Online" +msgstr "Teléfonos IP online" + +#: page.index.php:287 +msgid "IP Trunks Online" +msgstr "Líneas troncales IP online" + +#: page.index.php:290 +msgid "IP Trunk Registrations" +msgstr "Registros de líneas troncales IP" + +#: page.index.php:299 +msgid "Uptime" +msgstr "Tiempo encendido" + +#: page.index.php:300 +msgid "System Information Table" +msgstr "Tabla de información del sistema" + +#: page.index.php:308 +msgid "System Uptime" +msgstr "Tiempo encendido del sistema" + +#: page.index.php:316 +msgid "Asterisk Uptime" +msgstr "Tiempo encendido de Asterisk" + +#: page.index.php:317 +msgid "Last Reload" +msgstr "Última recarga" + +#: page.index.php:329 +msgid "Server Status" +msgstr "Estado del servidor" + +#: page.index.php:332 page.index.php:334 +msgid "Asterisk" +msgstr "Asterisk" + +#: page.index.php:332 +#, php-format +msgid "Asterisk is running: %s" +msgstr "Asterisk se está ejecutando: %s" + +#: page.index.php:334 +msgid "Asterisk is not running, this is a critical service!" +msgstr "Asterisk no se está ejecutando; ¡éste es un servicio crítico!" + +#: page.index.php:340 page.index.php:342 +msgid "Manager Proxy" +msgstr "Proxy del manager" + +#: page.index.php:340 +msgid "Asterisk Manager Proxy is running" +msgstr "El proxy del manager de Asterisk se está ejecutando" + +#: page.index.php:342 +msgid "" +"Asterisk Manager Proxy is not running, FreePBX will fall back to using " +"Asterisk directly, which may result in poor performance" +msgstr "" +"El proxy del manager de Asterisk no se está ejecutando; FreePBX usará en su " +"lugar Asterisk directamente, lo que puede resultar en un rendimiento pobre" + +#: page.index.php:349 page.index.php:353 page.index.php:355 +msgid "Op Panel" +msgstr "Panel de operador FOP" + +#: page.index.php:349 +msgid "FOP Operator Panel Server is running" +msgstr "El servidor del panel de operador FOP se está ejecutando" + +#: page.index.php:353 +msgid "" +"FOP Operator Panel Server is not running, you will not be able to use the " +"operator panel, but the system will run fine without it." +msgstr "" +"El servidor del panel de operador FOP no se está ejecutando; no podrá usar " +"el panel de operador, aunque el sistema continuará ejecutándose " +"correctamente sin él." + +#: page.index.php:355 +msgid "FOP Operator Panel is disabled in amportal.conf" +msgstr "" +"El panel de operador FOP está deshabilitado en el archivo de configuración " +"amportal.conf" + +#: page.index.php:369 +msgid "MySQL" +msgstr "MySQL" + +#: page.index.php:369 +msgid "MySQL Server is running" +msgstr "El servidor MySQL se está ejecutando" + +#: page.index.php:373 +msgid "Web Server" +msgstr "Servidor web" + +#: page.index.php:373 +msgid "Web Server is running" +msgstr "El servidor web se está ejecutando" + +#: page.index.php:378 page.index.php:380 +msgid "SSH Server" +msgstr "Servidor SSH" + +#: page.index.php:378 +msgid "SSH Server is running" +msgstr "El servidor SSH se está ejecutando" + +#: page.index.php:380 +msgid "" +"SSH Server is not running, you will not be able to connect to the system " +"console remotely" +msgstr "" +"El servidor SSH no se está ejecutando; no podrá conectarse a la consola del " +"sistema de forma remota" + +#: page.index.php:400 +msgid "Critical Error" +msgstr "Error crítico" + +#: page.index.php:401 +msgid "Security Update" +msgstr "Actualización de seguridad" + +#: page.index.php:402 +msgid "Update" +msgstr "Actualizar" + +#: page.index.php:403 +msgid "Error" +msgstr "Error" + +#: page.index.php:404 +msgid "Warning" +msgstr "Aviso" + +#: page.index.php:405 +msgid "Notice" +msgstr "Notificación" + +#: page.index.php:414 +msgid "FreePBX Notices" +msgstr "Notificaciones de FreePBX" + +#: page.index.php:438 page.index.php:440 +msgid "Delete this" +msgstr "Eliminar esto" + +#: page.index.php:443 page.index.php:445 +msgid "Ignore this" +msgstr "Ignorar esto" + +#: page.index.php:452 +#, php-format +msgid "Added %s ago" +msgstr "Añadido hace %s" + +#: page.index.php:461 +msgid "No notifications" +msgstr "No hay notificaciones" + +#: page.index.php:463 +msgid "No new notifications" +msgstr "No hay notificaciones nuevas." + +#: page.index.php:471 +msgid "show new" +msgstr "Mostrar nuevas" + +#: page.index.php:473 +msgid "show all" +msgstr "Mostrar todas las notificaciones" + +#: page.index.php:618 +msgid "loading..." +msgstr "Cargando..." + +#: page.index.php:634 +msgid "FreePBX System Status" +msgstr "Estado del sistema de FreePBX" + +#: moudle.xml +msgid "System Dashboard" +msgstr "Resumen del sistema" Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/fr_FR/LC_MESSAGES/dashboard.po =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/fr_FR/LC_MESSAGES/dashboard.po (revision 8451) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/i18n/fr_FR/LC_MESSAGES/dashboard.po (revision 8451) @@ -0,0 +1,348 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# Copyright 2008 FreePBX +# Copyright 2009 Jouniaux +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-25 11:50+0100\n" +"PO-Revision-Date: \n" +"Last-Translator: Jouniaux \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: class.astinfo.php:234 page.index.php:162 +msgid "seconds" +msgstr "" + +#: class.astinfo.php:234 +msgid "second" +msgstr "" + +#: class.astinfo.php:235 page.index.php:160 page.index.php:188 +msgid "minutes" +msgstr "minutes" + +#: class.astinfo.php:235 page.index.php:188 +msgid "minute" +msgstr "minute" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hours" +msgstr "heures" + +#: class.astinfo.php:236 page.index.php:185 +msgid "hour" +msgstr "heure" + +#: class.astinfo.php:237 page.index.php:182 +msgid "days" +msgstr "jours" + +#: class.astinfo.php:237 +msgid "day" +msgstr "" + +#: class.astinfo.php:238 page.index.php:179 +msgid "weeks" +msgstr "semaines" + +#: class.astinfo.php:238 page.index.php:179 +msgid "week" +msgstr "semaine" + +#: class.astinfo.php:239 +msgid "years" +msgstr "" + +#: class.astinfo.php:239 +msgid "year" +msgstr "" + +#: page.index.php:119 +msgid "OK" +msgstr "OK" + +#: page.index.php:123 +msgid "Warn" +msgstr "Att" + +#: page.index.php:127 +msgid "ERROR" +msgstr "ERREUR" + +#: page.index.php:131 +msgid "Disabled" +msgstr "" + +#: page.index.php:198 +msgid "System Statistics" +msgstr "Statistiques SystÚme" + +#: page.index.php:199 +msgid "Processor" +msgstr "Processeur" + +#: page.index.php:201 +msgid "Load Average" +msgstr "Charge moyenne" + +#: page.index.php:202 +msgid "CPU" +msgstr "CPU" + +#: page.index.php:204 +msgid "Memory" +msgstr "Mémoire" + +#: page.index.php:207 +msgid "App Memory" +msgstr "Mémoire utilisée" + +#: page.index.php:208 +msgid "Swap" +msgstr "Swap" + +#: page.index.php:210 +msgid "Disks" +msgstr "Disques" + +#: page.index.php:215 +msgid "Networks" +msgstr "Réseaux" + +#: page.index.php:226 +msgid "receive" +msgstr "reçu" + +#: page.index.php:227 +msgid "transmit" +msgstr "transmis" + +#: page.index.php:261 +msgid "FreePBX Statistics" +msgstr "Statistiques FreePBX" + +#: page.index.php:262 +msgid "Total active calls" +msgstr "Total appels actifs" + +#: page.index.php:263 +msgid "Internal calls" +msgstr "Appels internes" + +#: page.index.php:264 +msgid "External calls" +msgstr "Appels externes" + +#: page.index.php:265 +msgid "Total active channels" +msgstr "Total canaux actifs" + +#: page.index.php:267 +msgid "FreePBX Connections" +msgstr "Connexions FreePBX" + +#: page.index.php:284 +msgid "IP Phones Online" +msgstr "Téléphones IP connectés" + +#: page.index.php:287 +msgid "IP Trunks Online" +msgstr "Trunks IP connectés" + +#: page.index.php:290 +msgid "IP Trunk Registrations" +msgstr "Trunks IP enregistrés" + +#: page.index.php:299 +msgid "Uptime" +msgstr "Durée de fonctionnement" + +#: page.index.php:300 +msgid "System Information Table" +msgstr "" + +#: page.index.php:308 +msgid "System Uptime" +msgstr "SystÚme" + +#: page.index.php:316 +msgid "Asterisk Uptime" +msgstr "Asterisk" + +#: page.index.php:317 +msgid "Last Reload" +msgstr "Dernier rechargement" + +#: page.index.php:329 +msgid "Server Status" +msgstr "Statut serveurs" + +#: page.index.php:332 page.index.php:334 +msgid "Asterisk" +msgstr "Serveur Asterisk" + +#: page.index.php:332 +#, php-format +msgid "Asterisk is running: %s" +msgstr "Asterisk est démarré depuis: %s" + +#: page.index.php:334 +msgid "Asterisk is not running, this is a critical service!" +msgstr "Asterisk n'est pas démarré, c'est un service critique!" + +#: page.index.php:340 page.index.php:342 +msgid "Manager Proxy" +msgstr "Manager Proxy" + +#: page.index.php:340 +msgid "Asterisk Manager Proxy is running" +msgstr "Le Manager Proxy Asterisk est démarré" + +#: page.index.php:342 +msgid "" +"Asterisk Manager Proxy is not running, FreePBX will fall back to using " +"Asterisk directly, which may result in poor performance" +msgstr "" +"Le Proxy Manager Asterisk n'est pas démarré. FreePBX va être connecté à " +"Asterisk en direct, ce qui peut entraîler de mauvaises performances." + +#: page.index.php:349 page.index.php:353 page.index.php:355 +msgid "Op Panel" +msgstr "Serveur Opérateur" + +#: page.index.php:349 +msgid "FOP Operator Panel Server is running" +msgstr "Le serveur Standard est démarré" + +#: page.index.php:353 +msgid "" +"FOP Operator Panel Server is not running, you will not be able to use the " +"operator panel, but the system will run fine without it." +msgstr "" +"Le serveur Opérateur n'est pas démarré. Vous ne pourrez utiliser cette " +"fonction." + +#: page.index.php:355 +msgid "FOP Operator Panel is disabled in amportal.conf" +msgstr "La fonction Opérateur est désactivée dans amportal.conf" + +#: page.index.php:369 +msgid "MySQL" +msgstr "Serveur MySQL" + +#: page.index.php:369 +msgid "MySQL Server is running" +msgstr "Le serveur MYSQL est démarré" + +#: page.index.php:373 +msgid "Web Server" +msgstr "Serveur Web" + +#: page.index.php:373 +msgid "Web Server is running" +msgstr "Le serveur Web est démarré" + +#: page.index.php:378 page.index.php:380 +msgid "SSH Server" +msgstr "Serveur SSH" + +#: page.index.php:378 +msgid "SSH Server is running" +msgstr "Le serveur SSH est démarré" + +#: page.index.php:380 +msgid "" +"SSH Server is not running, you will not be able to connect to the system " +"console remotely" +msgstr "" +"Le serveur SSH n'est pas démarré. Vous ne pourrez vous connecter à distance " +"à la console systÚme." + +#: page.index.php:400 +msgid "Critical Error" +msgstr "Erreur critique" + +#: page.index.php:401 +msgid "Security Update" +msgstr "Mis à jour sécurité" + +#: page.index.php:402 +msgid "Update" +msgstr "Mis à jour" + +#: page.index.php:403 +msgid "Error" +msgstr "Erreur" + +#: page.index.php:404 +msgid "Warning" +msgstr "Attention" + +#: page.index.php:405 +msgid "Notice" +msgstr "Information" + +#: page.index.php:414 +msgid "FreePBX Notices" +msgstr "Informations FreePBX" + +#: page.index.php:438 page.index.php:440 +msgid "Delete this" +msgstr "Supprimer" + +#: page.index.php:443 page.index.php:445 +msgid "Ignore this" +msgstr "Ignorer" + +#: page.index.php:452 +#, php-format +msgid "Added %s ago" +msgstr "" + +#: page.index.php:461 +msgid "No notifications" +msgstr "Pas d'information" + +#: page.index.php:463 +msgid "No new notifications" +msgstr "Pas de nouvelle information" + +#: page.index.php:471 +msgid "show new" +msgstr "Afficher nouveaux" + +#: page.index.php:473 +msgid "show all" +msgstr "Afficher tous" + +#: page.index.php:618 +msgid "loading..." +msgstr "chargement..." + +#: page.index.php:634 +msgid "FreePBX System Status" +msgstr "Statut SystÚme FreePBX" + +#: moudle.xml +msgid "System Dashboard" +msgstr "" Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.BSD.common.inc.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.BSD.common.inc.php (revision 9654) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.BSD.common.inc.php (revision 9654) @@ -0,0 +1,300 @@ +parser = new Parser(); + $this->parser->df_param = ""; + } + + // read /var/run/dmesg.boot, but only if we haven't already. + function read_dmesg () { + if (! $this->dmesg) { + $parts = explode("rebooting", rfts( '/var/run/dmesg.boot' ) ); + $this->dmesg = explode("\n", $parts[count($parts) - 1]); + } + return $this->dmesg; + } + + // grabs a key from sysctl(8) + function grab_key ($key) { + return execute_program('sysctl', "-n $key"); + } + // get our apache SERVER_NAME or vhost + function hostname () { + if (!($result = getenv('SERVER_NAME'))) { + $result = "N.A."; + } + return $result; + } + // get our canonical hostname + function chostname () { + return execute_program('hostname'); + } + // get the IP address of our canonical hostname + function ip_addr () { + if (!($result = getenv('SERVER_ADDR'))) { + $result = gethostbyname($this->chostname()); + } + return $result; + } + + function kernel () { + $s = $this->grab_key('kern.version'); + $a = explode(':', $s); + return $a[0] . $a[1] . ':' . $a[2]; + } + + function uptime () { + $result = $this->get_sys_ticks(); + + return $result; + } + + function users () { + return execute_program('who', '| wc -l'); + } + + function loadavg ($bar = false) { + $s = $this->grab_key('vm.loadavg'); + $s = preg_replace('/{\s/', '', $s); + $s = preg_replace('/\s}/', '', $s); + $results['avg'] = explode(' ', $s); + + if ($bar) { + if ($fd = $this->grab_key('kern.cp_time')) { + // Find out the CPU load + // user + sys = load + // total = total + preg_match($this->cpu_regexp2, $fd, $res ); + $load = $res[2] + $res[3] + $res[4]; // cpu.user + cpu.sys + $total = $res[2] + $res[3] + $res[4] + $res[5]; // cpu.total + + // we need a second value, wait 1 second befor getting (< 1 second no good value will occour) + sleep(1); + $fd = $this->grab_key('kern.cp_time'); + preg_match($this->cpu_regexp2, $fd, $res ); + $load2 = $res[2] + $res[3] + $res[4]; + $total2 = $res[2] + $res[3] + $res[4] + $res[5]; + $results['cpupercent'] = ($total2 != $total)?((100*($load2 - $load)) / ($total2 - $total)):0; + } + } + return $results; + } + + function cpu_info () { + $results = array(); + $ar_buf = array(); + + $results['model'] = $this->grab_key('hw.model'); + $results['cpus'] = $this->grab_key('hw.ncpu'); + + for ($i = 0, $max = count($this->read_dmesg()); $i < $max; $i++) { + $buf = $this->dmesg[$i]; + if (preg_match("/$this->cpu_regexp/", $buf, $ar_buf)) { + $results['cpuspeed'] = round($ar_buf[2]); + break; + } + } + return $results; + } + // get the scsi device information out of dmesg + function scsi () { + $results = array(); + $ar_buf = array(); + + for ($i = 0, $max = count($this->read_dmesg()); $i < $max; $i++) { + $buf = $this->dmesg[$i]; + + if (preg_match("/$this->scsi_regexp1/", $buf, $ar_buf)) { + $s = $ar_buf[1]; + $results[$s]['model'] = $ar_buf[2]; + $results[$s]['media'] = 'Hard Disk'; + } elseif (preg_match("/$this->scsi_regexp2/", $buf, $ar_buf)) { + $s = $ar_buf[1]; + $results[$s]['capacity'] = $ar_buf[2] * 2048 * 1.049; + } + } + // return array_values(array_unique($results)); + // 1. more useful to have device names + // 2. php 4.1.1 array_unique() deletes non-unique values. + asort($results); + return $results; + } + + // get the pci device information out of dmesg + function pci () { + $results = array(); + + if( !( is_array($results = $this->parser->parse_lspci()) || is_array($results = $this->parser->parse_pciconf() ))) { + for ($i = 0, $s = 0; $i < count($this->read_dmesg()); $i++) { + $buf = $this->dmesg[$i]; + if(!isset($this->pci_regexp1) && !isset($this->pci_regexp2)) { + $this->pci_regexp1 = '/(.*): <(.*)>(.*) pci[0-9]$/'; + $this->pci_regexp2 = '/(.*): <(.*)>.* at [.0-9]+ irq/'; + } + if (preg_match($this->pci_regexp1, $buf, $ar_buf)) { + $results[$s++] = $ar_buf[1] . ": " . $ar_buf[2]; + } elseif (preg_match($this->pci_regexp2, $buf, $ar_buf)) { + $results[$s++] = $ar_buf[1] . ": " . $ar_buf[2]; + } + } + asort($results); + } + return $results; + } + + // get the ide device information out of dmesg + function ide () { + $results = array(); + + $s = 0; + for ($i = 0, $max = count($this->read_dmesg()); $i < $max; $i++) { + $buf = $this->dmesg[$i]; + + if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $buf, $ar_buf)) { + $s = $ar_buf[1]; + $results[$s]['model'] = $ar_buf[3]; + $results[$s]['media'] = 'Hard Disk'; + $results[$s]['capacity'] = $ar_buf[2] * 2048 * 1.049; + } elseif (preg_match('/^(acd[0-9]+): (.*) <(.*)> (.*)/', $buf, $ar_buf)) { + $s = $ar_buf[1]; + $results[$s]['model'] = $ar_buf[3]; + $results[$s]['media'] = 'CD-ROM'; + } + } + // return array_values(array_unique($results)); + // 1. more useful to have device names + // 2. php 4.1.1 array_unique() deletes non-unique values. + asort($results); + return $results; + } + + // place holder function until we add acual usb detection + function usb () { + return array(); + } + + function sbus () { + $results = array(); + $_results[0] = ""; + // TODO. Nothing here yet. Move along. + $results = $_results; + return $results; + } + + function memory () { + $s = $this->grab_key('hw.physmem'); + + if (PHP_OS == 'FreeBSD' || PHP_OS == 'OpenBSD') { + // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize + // I should probably add some version checking here, but for now + // we only support fbsd 4.4 + $pagesize = 1024; + } else { + $pagesize = $this->grab_key('hw.pagesize'); + } + + $results['ram'] = array(); + + $pstat = execute_program('vmstat'); + $lines = preg_split("/\n/", $pstat); + for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { + $ar_buf = preg_split("/\s+/", $lines[$i], 19); + if ($i == 2) { + if(PHP_OS == 'NetBSD') { + $results['ram']['free'] = $ar_buf[5]; + } else { + $results['ram']['free'] = $ar_buf[5] * $pagesize / 1024; + } + } + } + + $results['ram']['total'] = $s / 1024; + $results['ram']['shared'] = 0; + $results['ram']['buffers'] = 0; + $results['ram']['used'] = $results['ram']['total'] - $results['ram']['free']; + $results['ram']['cached'] = 0; + $results['ram']['t_used'] = $results['ram']['used']; + $results['ram']['t_free'] = $results['ram']['free']; + + $results['ram']['percent'] = round(($results['ram']['used'] * 100) / $results['ram']['total']); + + if (PHP_OS == 'OpenBSD' || PHP_OS == 'NetBSD') { + $pstat = execute_program('swapctl', '-l -k'); + } else { + $pstat = execute_program('swapinfo', '-k'); + } + + $lines = preg_split("/\n/", $pstat); + + $results['swap']['total'] = 0; + $results['swap']['used'] = 0; + $results['swap']['free'] = 0; + + for ($i = 1, $max = sizeof($lines); $i < $max; $i++) { + $ar_buf = preg_split("/\s+/", $lines[$i], 6); + + if ($ar_buf[0] != 'Total') { + $results['swap']['total'] = $results['swap']['total'] + $ar_buf[1]; + $results['swap']['used'] = $results['swap']['used'] + $ar_buf[2]; + $results['swap']['free'] = $results['swap']['free'] + $ar_buf[3]; + + $results['devswap'][$i - 1] = array(); + $results['devswap'][$i - 1]['dev'] = $ar_buf[0]; + $results['devswap'][$i - 1]['total'] = $ar_buf[1]; + $results['devswap'][$i - 1]['used'] = $ar_buf[2]; + $results['devswap'][$i - 1]['free'] = ($results['devswap'][$i - 1]['total'] - $results['devswap'][$i - 1]['used']); + $results['devswap'][$i - 1]['percent'] = $ar_buf[2] > 0 ? round(($ar_buf[2] * 100) / $ar_buf[1]) : 0; + } + } + $results['swap']['percent'] = round(($results['swap']['used'] * 100) / $results['swap']['total']); + + if( is_callable( array( 'sysinfo', 'memory_additional' ) ) ) { + $results = $this->memory_additional( $results ); + } + return $results; + } + + function filesystems () { + return $this->parser->parse_filesystems(); + } + + function distro () { + $distro = execute_program('uname', '-s'); + $result = $distro; + return($result); + } +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.Linux.inc.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.Linux.inc.php (revision 9639) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.Linux.inc.php (revision 9639) @@ -0,0 +1,532 @@ +parser = new Parser(); + $this->parser->df_param = 'Pl'; + + $list = parse_ini_file(APP_ROOT . "/" . $this->inifile, true); + if (!$list) { + return; + } + foreach ($list as $section => $distribution) { + if (!isset($distribution["Files"])) { + continue; + } else { + foreach (explode(";", $distribution["Files"]) as $filename) { + if (file_exists($filename)) { + $buf = rfts( $filename ); + $this->icon = isset($distribution["Image"]) ? $distribution["Image"] : $this->icon; + $this->distro = isset($distribution["Name"]) ? $distribution["Name"] . " " . trim($buf) : trim($buf); + $this->distroname = $section; + break 2; + } + } + } + } + } + + // get our apache SERVER_NAME or vhost + function vhostname () { + if (! ($result = getenv('SERVER_NAME'))) { + $result = 'N.A.'; + } + return $result; + } + // get our canonical hostname + function chostname () { + $result = rfts( '/proc/sys/kernel/hostname', 1 ); + if ( $result == "ERROR" ) { + $result = "N.A."; + } else { + $result = gethostbyaddr( gethostbyname( trim( $result ) ) ); + } + return $result; + } + // get the IP address of our canonical hostname + function ip_addr () { + if (!($result = getenv('SERVER_ADDR'))) { + $result = gethostbyname($this->chostname()); + } + return $result; + } + + function kernel () { + $buf = rfts( '/proc/version', 1 ); + if ( $buf == "ERROR" ) { + $result = "N.A."; + } else { + if (preg_match('/version (.*?) /', $buf, $ar_buf)) { + $result = $ar_buf[1]; + + if (preg_match('/SMP/', $buf)) { + $result .= ' (SMP)'; + } + } + } + return $result; + } + + function uptime () { + $buf = rfts( '/proc/uptime', 1 ); + $ar_buf = preg_split( '/\s/', $buf ); + $result = trim( $ar_buf[0] ); + + return $result; + } + + function users () { + $who = preg_split('/=/', execute_program('who', '-q')); + $result = $who[1]; + return $result; + } + + function loadavg ($bar = false) { + $buf = rfts( '/proc/loadavg' ); + if( $buf == "ERROR" ) { + $results['avg'] = array('N.A.', 'N.A.', 'N.A.'); + } else { + $results['avg'] = preg_split("/\s/", $buf, 4); + unset($results['avg'][3]); // don't need the extra values, only first three + } + if ($bar) { + $buf = rfts( '/proc/stat', 1 ); + if( $buf != "ERROR" ) { + sscanf($buf, "%*s %f %f %f %f", $ab, $ac, $ad, $ae); + // Find out the CPU load + // user + sys = load + // total = total + $load = $ab + $ac + $ad; // cpu.user + cpu.sys + $total = $ab + $ac + $ad + $ae; // cpu.total + + // we need a second value, wait 1 second befor getting (< 1 second no good value will occour) + sleep(1); + $buf = rfts( '/proc/stat', 1 ); + sscanf($buf, "%*s %f %f %f %f", $ab, $ac, $ad, $ae); + $load2 = $ab + $ac + $ad; + $total2 = $ab + $ac + $ad + $ae; + $results['cpupercent'] = ($total2 != $total)?((100*($load2 - $load)) / ($total2 - $total)):0; + } + } + return $results; + } + + function cpu_info () { + $bufr = rfts( '/proc/cpuinfo' ); + + if ( $bufr != "ERROR" ) { + $bufe = explode("\n", $bufr); + + $results = array('cpus' => 0, 'bogomips' => 0); + $ar_buf = array(); + + foreach( $bufe as $buf ) { + if(trim($buf) != "") { + list($key, $value) = preg_split('/\s+:\s+/', trim($buf), 2); + // All of the tags here are highly architecture dependant. + // the only way I could reconstruct them for machines I don't + // have is to browse the kernel source. So if your arch isn't + // supported, tell me you want it written in. + switch ($key) { + case 'model name': + $results['model'] = $value; + break; + case 'cpu MHz': + $results['cpuspeed'] = sprintf('%.2f', $value); + break; + case 'cycle frequency [Hz]': // For Alpha arch - 2.2.x + $results['cpuspeed'] = sprintf('%.2f', $value / 1000000); + break; + case 'clock': // For PPC arch (damn borked POS) + $results['cpuspeed'] = sprintf('%.2f', $value); + break; + case 'cpu': // For PPC arch (damn borked POS) + $results['model'] = $value; + break; + case 'L2 cache': // More for PPC + $results['cache'] = $value; + break; + case 'revision': // For PPC arch (damn borked POS) + $results['model'] .= ' ( rev: ' . $value . ')'; + break; + case 'cpu model': // For Alpha arch - 2.2.x + $results['model'] .= ' (' . $value . ')'; + break; + case 'cache size': + $results['cache'] = $value; + break; + case 'bogomips': + $results['bogomips'] += $value; + break; + case 'BogoMIPS': // For alpha arch - 2.2.x + $results['bogomips'] += $value; + break; + case 'BogoMips': // For sparc arch + $results['bogomips'] += $value; + break; + case 'cpus detected': // For Alpha arch - 2.2.x + $results['cpus'] += $value; + break; + case 'system type': // Alpha arch - 2.2.x + $results['model'] .= ', ' . $value . ' '; + break; + case 'platform string': // Alpha arch - 2.2.x + $results['model'] .= ' (' . $value . ')'; + break; + case 'processor': + $results['cpus'] += 1; + break; + case 'Cpu0ClkTck': // Linux sparc64 + $results['cpuspeed'] = sprintf('%.2f', hexdec($value) / 1000000); + break; + case 'Cpu0Bogo': // Linux sparc64 & sparc32 + $results['bogomips'] = $value; + break; + case 'ncpus probed': // Linux sparc64 & sparc32 + $results['cpus'] = $value; + break; + } + } + } + } + + // sparc64 specific code follows + // This adds the ability to display the cache that a CPU has + // Originally made by Sven Blumenstein in 2004 + // Modified by Tom Weustink in 2004 + $sparclist = array('SUNW,UltraSPARC@0,0', 'SUNW,UltraSPARC-II@0,0', 'SUNW,UltraSPARC@1c,0', 'SUNW,UltraSPARC-IIi@1c,0', 'SUNW,UltraSPARC-II@1c,0'); + foreach ($sparclist as $name) { + $buf = rfts( '/proc/openprom/' . $name . '/ecache-size',1 , 32, false ); + if( $buf != "ERROR" ) { + $results['cache'] = base_convert($buf, 16, 10)/1024 . ' KB'; + } + } + // sparc64 specific code ends + + // XScale detection code + if ( $results['cpus'] == 0 ) { + foreach( $bufe as $buf ) { + if($buf != "\n") { + list($key, $value) = preg_split('/\s+:\s+/', trim($buf), 2); + switch($key) { + case 'Processor': + $results['cpus'] += 1; + $results['model'] = $value; + break; + case 'BogoMIPS': //BogoMIPS are not BogoMIPS on this CPU, it's the speed, no BogoMIPS available + $results['cpuspeed'] = $value; + break; + case 'I size': + $results['cache'] = $value; + break; + case 'D size': + $results['cache'] += $value; + break; + } + } + } + $results['cache'] = $results['cache'] / 1024 . " KB"; + } + + $keys = array_keys($results); + $keys2be = array('model', 'cpuspeed', 'cache', 'bogomips', 'cpus'); + + while ($ar_buf = each($keys2be)) { + if (! in_array($ar_buf[1], $keys)) { + $results[$ar_buf[1]] = 'N.A.'; + } + } + return $results; + } + + function pci () { + $results = array(); + + if( !$results = $this->parser->parse_lspci() ) { + $bufr = rfts( '/proc/pci' ); + foreach( $bufr as $buf ) { + if (preg_match('/Bus/', $buf)) { + $device = true; + continue; + } + + if ($device) { + list($key, $value) = preg_split('/:\s/', $buf, 2); + + if (!preg_match('/bridge/i', $key) && !preg_match('/USB/i', $key)) { + $results[] = preg_replace('/\([^\)]+\)\.$/', '', trim($value)); + } + $device = false; + } + } + } + asort($results); + return $results; + } + + function ide () { + $results = array(); + $bufd = gdc( '/proc/ide' ); + + foreach( $bufd as $file ) { + if (preg_match('/^hd/', $file)) { + $results[$file] = array(); + $buf = rfts("/proc/ide/" . $file . "/media", 1 ); + if ( $buf != "ERROR" ) { + $results[$file]['media'] = trim($buf); + if ($results[$file]['media'] == 'disk') { + $results[$file]['media'] = 'Hard Disk'; + $buf = rfts( "/proc/ide/" . $file . "/capacity", 1, 4096, false); + if( $buf == "ERROR" ) { + $buf = rfts( "/sys/block/" . $file . "/size", 1, 4096, false); + } + if ( $buf != "ERROR" ) { + $results[$file]['capacity'] = trim( $buf ); + } + } elseif ($results[$file]['media'] == 'cdrom') { + $results[$file]['media'] = 'CD-ROM'; + unset($results[$file]['capacity']); + } + } + + $buf = rfts( "/proc/ide/" . $file . "/model", 1 ); + if ( $buf != "ERROR" ) { + $results[$file]['model'] = trim( $buf ); + if (preg_match('/WDC/', $results[$file]['model'])) { + $results[$file]['manufacture'] = 'Western Digital'; + } elseif (preg_match('/IBM/', $results[$file]['model'])) { + $results[$file]['manufacture'] = 'IBM'; + } elseif (preg_match('/FUJITSU/', $results[$file]['model'])) { + $results[$file]['manufacture'] = 'Fujitsu'; + } else { + $results[$file]['manufacture'] = 'Unknown'; + } + } + + } + } + + asort($results); + return $results; + } + + function scsi () { + $results = array(); + $dev_vendor = ''; + $dev_model = ''; + $dev_rev = ''; + $dev_type = ''; + $s = 1; + $get_type = 0; + + $bufr = execute_program('lsscsi', '-c', false); + if( is_null( $bufr )) { + $bufr = rfts( '/proc/scsi/scsi' ); + } + if ( $bufr != "ERROR" ) { + $bufe = explode("\n", $bufr); + foreach( $bufe as $buf ) { + if (preg_match('/Vendor/', $buf)) { + preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i', $buf, $dev); + list($key, $value) = preg_split('/:\s/', $buf, 2); + $dev_str = $value; + $get_type = true; + continue; + } + + if ($get_type) { + preg_match('/Type:\s+(\S+)/i', $buf, $dev_type); + $results[$s]['model'] = "$dev[1] $dev[2] ($dev_type[1])"; + $results[$s]['media'] = "Hard Disk"; + $s++; + $get_type = false; + } + } + } + asort($results); + return $results; + } + + function usb () { + $results = array(); + $devnum = -1; + + $bufr = execute_program('lsusb', '', false); + if( is_null( $bufr )) { + $bufr = rfts( '/proc/bus/usb/devices' ); + if ( $bufr != "ERROR" ) { + $bufe = explode("\n", $bufr); + foreach( $bufe as $buf ) { + if (preg_match('/^T/', $buf)) { + $devnum += 1; + $results[$devnum] = ""; + } elseif (preg_match('/^S:/', $buf)) { + list($key, $value) = preg_split('/:\s/', $buf, 2); + list($key, $value2) = preg_split('/=/', $value, 2); + if (trim($key) != "SerialNumber") { + $results[$devnum] .= " " . trim($value2); + $devstring = 0; + } + } + } + } + } else { + $bufe = explode( "\n", $bufr ); + foreach( $bufe as $buf ) { + $device = preg_split("/ /", $buf, 7); + if( isset( $device[6] ) && trim( $device[6] ) != "" ) { + $results[$devnum++] = trim( $device[6] ); + } + } + } + return $results; + } + + function sbus () { + $results = array(); + $_results[0] = ""; + // TODO. Nothing here yet. Move along. + $results = $_results; + return $results; + } + + function network () { + $results = array(); + + $bufr = rfts( '/proc/net/dev' ); + if ( $bufr != "ERROR" ) { + $bufe = explode("\n", $bufr); + foreach( $bufe as $buf ) { + if (preg_match('/:/', $buf)) { + list($dev_name, $stats_list) = preg_split('/:/', $buf, 2); + $stats = preg_split('/\s+/', trim($stats_list)); + $results[$dev_name] = array(); + + $results[$dev_name]['rx_bytes'] = $stats[0]; + $results[$dev_name]['rx_packets'] = $stats[1]; + $results[$dev_name]['rx_errs'] = $stats[2]; + $results[$dev_name]['rx_drop'] = $stats[3]; + + $results[$dev_name]['tx_bytes'] = $stats[8]; + $results[$dev_name]['tx_packets'] = $stats[9]; + $results[$dev_name]['tx_errs'] = $stats[10]; + $results[$dev_name]['tx_drop'] = $stats[11]; + + $results[$dev_name]['errs'] = $stats[2] + $stats[10]; + $results[$dev_name]['drop'] = $stats[3] + $stats[11]; + } + } + } + return $results; + } + + function memory () { + $results['ram'] = array(); + $results['swap'] = array(); + $results['devswap'] = array(); + + $bufr = rfts( '/proc/meminfo' ); + if ( $bufr != "ERROR" ) { + $bufe = explode("\n", $bufr); + foreach( $bufe as $buf ) { + if (preg_match('/^MemTotal:\s+(.*)\s*kB/i', $buf, $ar_buf)) { + $results['ram']['total'] = $ar_buf[1]; + } else if (preg_match('/^MemFree:\s+(.*)\s*kB/i', $buf, $ar_buf)) { + $results['ram']['t_free'] = $ar_buf[1]; + } else if (preg_match('/^Cached:\s+(.*)\s*kB/i', $buf, $ar_buf)) { + $results['ram']['cached'] = $ar_buf[1]; + } else if (preg_match('/^Buffers:\s+(.*)\s*kB/i', $buf, $ar_buf)) { + $results['ram']['buffers'] = $ar_buf[1]; + } else if (preg_match('/^SwapTotal:\s+(.*)\s*kB/i', $buf, $ar_buf)) { + $results['swap']['total'] = $ar_buf[1]; + } else if (preg_match('/^SwapFree:\s+(.*)\s*kB/i', $buf, $ar_buf)) { + $results['swap']['free'] = $ar_buf[1]; + } + } + + $results['ram']['t_used'] = $results['ram']['total'] - $results['ram']['t_free']; + $results['ram']['percent'] = $results['ram']['total'] ? (round(($results['ram']['t_used'] * 100) / $results['ram']['total'])) : 0; + $results['swap']['used'] = $results['swap']['total'] - $results['swap']['free']; + + // If no swap, avoid divide by 0 + // + if (trim($results['swap']['total'])) { + $results['swap']['percent'] = round(($results['swap']['used'] * 100) / $results['swap']['total']); + } else { + $results['swap']['percent'] = 0; + } + + // values for splitting memory usage + if (isset($results['ram']['cached']) && isset($results['ram']['buffers'])) { + $results['ram']['app'] = $results['ram']['t_used'] - $results['ram']['cached'] - $results['ram']['buffers']; + $results['ram']['app_percent'] = round(($results['ram']['app'] * 100) / $results['ram']['total']); + $results['ram']['buffers_percent'] = round(($results['ram']['buffers'] * 100) / $results['ram']['total']); + $results['ram']['cached_percent'] = round(($results['ram']['cached'] * 100) / $results['ram']['total']); + } + + $bufr = rfts( '/proc/swaps' ); + if ( $bufr != "ERROR" ) { + $swaps = explode("\n", $bufr); + for ($i = 1; $i < (sizeof($swaps)); $i++) { + if( trim( $swaps[$i] ) != "" ) { + $ar_buf = preg_split('/\s+/', $swaps[$i], 6); + $results['devswap'][$i - 1] = array(); + $results['devswap'][$i - 1]['dev'] = $ar_buf[0]; + $results['devswap'][$i - 1]['total'] = $ar_buf[2]; + $results['devswap'][$i - 1]['used'] = $ar_buf[3]; + $results['devswap'][$i - 1]['free'] = ($results['devswap'][$i - 1]['total'] - $results['devswap'][$i - 1]['used']); + $results['devswap'][$i - 1]['percent'] = round(($ar_buf[3] * 100) / $ar_buf[2]); + } + } + } + } + return $results; + } + + function filesystems () { + return $this->parser->parse_filesystems(); + } + + function distro () { + return $this->distro; + } + function distroname () { + return $this->distroname; + } + + function distroicon () { + return $this->icon; + } + +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.NetBSD.inc.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.NetBSD.inc.php (revision 7633) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.NetBSD.inc.php (revision 7633) @@ -0,0 +1,114 @@ +bsd_common(); + + $this->cpu_regexp = "^cpu(.*)\, (.*) MHz"; + $this->scsi_regexp1 = "^(.*) at scsibus.*: <(.*)> .*"; + $this->scsi_regexp2 = "^(da[0-9]): (.*)MB "; + $this->cpu_regexp2 = "/user = (.*), nice = (.*), sys = (.*), intr = (.*), idle = (.*)/"; + $this->pci_regexp1 = '/(.*) at pci[0-9] dev [0-9]* function [0-9]*: (.*)$/'; + $this->pci_regexp2 = '/"(.*)" (.*).* at [.0-9]+ irq/'; + } + + function get_sys_ticks () { + $a = $this->grab_key('kern.boottime'); + $sys_ticks = time() - $a; + return $sys_ticks; + } + + function network () { + $netstat_b = execute_program('netstat', '-nbdi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"'); + $netstat_n = execute_program('netstat', '-ndi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"'); + $lines_b = split("\n", $netstat_b); + $lines_n = split("\n", $netstat_n); + $results = array(); + for ($i = 0, $max = sizeof($lines_b); $i < $max; $i++) { + $ar_buf_b = preg_split("/\s+/", $lines_b[$i]); + $ar_buf_n = preg_split("/\s+/", $lines_n[$i]); + if (!empty($ar_buf_b[0]) && !empty($ar_buf_n[3])) { + $results[$ar_buf_b[0]] = array(); + + $results[$ar_buf_b[0]]['rx_bytes'] = $ar_buf_b[3]; + $results[$ar_buf_b[0]]['rx_packets'] = $ar_buf_n[3]; + $results[$ar_buf_b[0]]['rx_errs'] = $ar_buf_n[4]; + $results[$ar_buf_b[0]]['rx_drop'] = $ar_buf_n[8]; + + $results[$ar_buf_b[0]]['tx_bytes'] = $ar_buf_b[4]; + $results[$ar_buf_b[0]]['tx_packets'] = $ar_buf_n[5]; + $results[$ar_buf_b[0]]['tx_errs'] = $ar_buf_n[6]; + $results[$ar_buf_b[0]]['tx_drop'] = $ar_buf_n[8]; + + $results[$ar_buf_b[0]]['errs'] = $ar_buf_n[4] + $ar_buf_n[6]; + $results[$ar_buf_b[0]]['drop'] = $ar_buf_n[8]; + } + } + return $results; + } + + // get the ide device information out of dmesg + function ide () { + $results = array(); + + $s = 0; + for ($i = 0, $max = count($this->read_dmesg()); $i < $max; $i++) { + $buf = $this->dmesg[$i]; + if (preg_match('/^(.*) at (pciide|wdc|atabus|atapibus)[0-9] (.*): <(.*)>/', $buf, $ar_buf)) { + $s = $ar_buf[1]; + $results[$s]['model'] = $ar_buf[4]; + $results[$s]['media'] = 'Hard Disk'; + // now loop again and find the capacity + for ($j = 0, $max1 = count($this->read_dmesg()); $j < $max1; $j++) { + $buf_n = $this->dmesg[$j]; + if (preg_match("/^($s): (.*), (.*), (.*)MB, .*$/", $buf_n, $ar_buf_n)) { + $results[$s]['capacity'] = $ar_buf_n[4] * 2048 * 1.049; + } elseif (preg_match("/^($s): (.*) MB, (.*), (.*), .*$/", $buf_n, $ar_buf_n)) { + $results[$s]['capacity'] = $ar_buf_n[2] * 2048; + } + } + } + } + asort($results); + return $results; + } + + function distroicon () { + $result = 'NetBSD.png'; + return($result); + } + +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.WINNT.inc.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.WINNT.inc.php (revision 7633) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.WINNT.inc.php (revision 7633) @@ -0,0 +1,317 @@ +wmi = $objLocator->ConnectServer(); + } else{ + $this->wmi = $objLocator->ConnectServer($strHostname, "rootcimv2", "$strHostname\$strUser", $strPassword); + } + } + + // private function for getting a list of values in the specified context, optionally filter this list, based on the list from second parameter + function _GetWMI($strClass, $strValue = array() ) { + $objWEBM = $this->wmi->Get($strClass); + + if( PHP_VERSION < 5 ) { + $objProp = $objWEBM->Properties_; + $arrProp = $objProp->Next($objProp->Count); + $objWEBMCol = $objWEBM->Instances_(); + $arrWEBMCol = $objWEBMCol->Next($objWEBMCol->Count); + } else { + $arrProp = $objWEBM->Properties_; + $arrWEBMCol = $objWEBM->Instances_(); + } + + foreach($arrWEBMCol as $objItem) + { + @reset($arrProp); + $arrInstance = array(); + foreach($arrProp as $propItem) + { + eval("\$value = \$objItem->" .$propItem->Name .";"); + if( empty( $strValue ) ) { + $arrInstance[$propItem->Name] = trim($value); + } else { + if( in_array( $propItem->Name, $strValue ) ) { + $arrInstance[$propItem->Name] = trim($value); + } + } + } + $arrData[] = $arrInstance; + } + return $arrData; + } + + // private function for getting different device types from the system + function _devicelist ( $strType ) { + if( empty( $this->wmidevices ) ) { + $this->wmidevices = $this->_GetWMI( "Win32_PnPEntity", array( "Name", "PNPDeviceID" ) ); + } + + $list = array(); + foreach ( $this->wmidevices as $device ) { + if ( substr( $device["PNPDeviceID"], 0, strpos( $device["PNPDeviceID"], "\\" ) + 1 ) == ( $strType . "\\" ) ) { + $list[] = $device["Name"]; + } + } + + return $list; + } + + // get our canonical hostname + function chostname () + { + $buffer = $this->_GetWMI( "Win32_ComputerSystem", array( "Name" ) ); + $result = $buffer[0]["Name"]; + return gethostbyaddr(gethostbyname($result)); + } + + // get the IP address of our canonical hostname + function ip_addr () + { + $buffer = $this->_GetWMI( "Win32_ComputerSystem", array( "Name" ) ); + $result = $buffer[0]["Name"]; + return gethostbyname($result); + } + + function kernel () + { + $buffer = $this->_GetWMI( "Win32_OperatingSystem", array( "Version", "ServicePackMajorVersion" ) ); + $result = $buffer[0]["Version"]; + if( $buffer[0]["ServicePackMajorVersion"] > 0 ) { + $result .= " SP" . $buffer[0]["ServicePackMajorVersion"]; + } + return $result; + } + + // get the time the system is running + function uptime () + { + $result = 0; + $buffer = $this->_GetWMI( "Win32_OperatingSystem", array( "LastBootUpTime" ) ); + + $year = intval(substr($buffer[0]["LastBootUpTime"], 0, 4)); + $month = intval(substr($buffer[0]["LastBootUpTime"], 4, 2)); + $day = intval(substr($buffer[0]["LastBootUpTime"], 6, 2)); + $hour = intval(substr($buffer[0]["LastBootUpTime"], 8, 2)); + $minute = intval(substr($buffer[0]["LastBootUpTime"], 10, 2)); + $seconds = intval(substr($buffer[0]["LastBootUpTime"], 12, 2)); + + $hour -= date("Z") / 60 / 60; // GMT-Offset + + $boottime = mktime($hour, $minute, $seconds, $month, $day, $year); + + $result = mktime() - $boottime; + + return $result; + } + + // count the users, which are logged in + function users () + { + if( !stristr( $this->kernel(), "2000 P" ) ) return "N.A."; + $buffer = $this->_GetWMI( "Win32_PerfRawData_TermService_TerminalServices", array( "TotalSessions" ) ); + return $buffer[0]["TotalSessions"]; + } + + // get the load of the processors + function loadavg ($bar = false) + { + $buffer = $this->_GetWMI( "Win32_Processor", array( "LoadPercentage" ) ); + $cpuload = array(); + for( $i = 0; $i < count( $buffer ); $i++ ) { + $cpuload['avg'][] = $buffer[$i]["LoadPercentage"]; + } + if ($bar) { + $cpuload['cpupercent'] = array_sum( $cpuload['avg'] ) / count( $buffer ); + } + return $cpuload; + } + + // get some informations about the cpu's + function cpu_info () + { + $buffer = $this->_GetWMI( "Win32_Processor", array( "Name", "L2CacheSize", "CurrentClockSpeed", "ExtClock" ) ); + $results["cpus"] = 0; + foreach ($buffer as $cpu) { + $results["cpus"]++; + $results["model"] = $cpu["Name"]; + $results["cache"] = $cpu["L2CacheSize"]; + $results["cpuspeed"] = $cpu["CurrentClockSpeed"]; + $results["busspeed"] = $cpu["ExtClock"]; + } + return $results; + } + + // get the pci devices from the system + function pci () + { + $pci = $this->_devicelist( "PCI" ); + return $pci; + } + + // get the ide devices from the system + function ide () + { + $buffer = $this->_devicelist( "IDE" ); + $ide = array(); + foreach ( $buffer as $device ) { + $ide[]['model'] = $device; + } + return $ide; + } + + // get the scsi devices from the system + function scsi () + { + $scsi = $this->_devicelist( "SCSI" ); + return $scsi; + } + + // get the usb devices from the system + function usb () + { + $usb = $this->_devicelist( "USB" ); + return $usb; + } + + // get the sbus devices from the system - currently not called + function sbus () + { + $sbus = $this->_devicelist( "SBUS" ); + return $sbus; + } + + // get the netowrk devices and rx/tx bytes + function network () + { + $buffer = $this->_GetWMI( "Win32_PerfRawData_Tcpip_NetworkInterface" ); + $results = array(); + foreach ( $buffer as $device ) { + $dev_name = $device["Name"]; + // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_perfrawdata_tcpip_networkinterface.asp + $results[$dev_name]['rx_bytes'] = $device["BytesReceivedPersec"]; + $results[$dev_name]['rx_packets'] = $device["PacketsReceivedPersec"]; + $results[$dev_name]['rx_errs'] = $device["PacketsReceivedErrors"]; + $results[$dev_name]['rx_drop'] = $device["PacketsReceivedDiscarded"]; + + $results[$dev_name]['tx_bytes'] = $device["BytesSentPersec"]; + $results[$dev_name]['tx_packets'] = $device["PacketsSentPersec"]; + + $results[$dev_name]['errs'] = $device["PacketsReceivedErrors"]; + $results[$dev_name]['drop'] = $device["PacketsReceivedDiscarded"]; + } + return $results; + } + + function memory () + { + $buffer = $this->_GetWMI( "Win32_LogicalMemoryConfiguration", array( "TotalPhysicalMemory" ) ); + $results['ram']['total'] = $buffer[0]["TotalPhysicalMemory"]; + + $buffer = $this->_GetWMI( "Win32_PerfRawData_PerfOS_Memory", array( "AvailableKBytes" ) ); + $results['ram']['free'] = $buffer[0]["AvailableKBytes"]; + + $results['ram']['used'] = $results['ram']['total'] - $results['ram']['free']; + $results['ram']['t_used'] = $results['ram']['used']; + $results['ram']['t_free'] = $results['ram']['total'] - $results['ram']['t_used']; + $results['ram']['percent'] = ceil( ( $results['ram']['t_used'] * 100 ) / $results['ram']['total'] ); + $results['swap']['total'] = 0; + $results['swap']['used'] = 0; + $results['swap']['free'] = 0; + + $buffer = $this->_GetWMI( "Win32_PageFileUsage" ); // no need to filter, using nearly everything from output + $k = 0; + foreach ($buffer as $swapdevice) { + $results['devswap'][$k]['dev'] = $swapdevice["Name"]; + $results['devswap'][$k]['total'] = $swapdevice["AllocatedBaseSize"] * 1024; + $results['devswap'][$k]['used'] = $swapdevice["CurrentUsage"] * 1024; + $results['devswap'][$k]['free'] = ( $swapdevice["AllocatedBaseSize"] - $swapdevice["CurrentUsage"] ) * 1024; + $results['devswap'][$k]['percent'] = ceil( $swapdevice["CurrentUsage"] / $swapdevice["AllocatedBaseSize"] ); + + $results['swap']['total'] += $results['devswap'][$k]['total']; + $results['swap']['used'] += $results['devswap'][$k]['used']; + $results['swap']['free'] += $results['devswap'][$k]['free']; + $k += 1; + } + $results['swap']['percent'] = ceil( $results['swap']['used'] / $results['swap']['total'] * 100 ); + return $results; + } + + // get the filesystem informations + function filesystems () + { + $typearray = array("Unknown", "No Root Directory", "Removeable Disk", + "Local Disk", "Network Drive", "Compact Disc", "RAM Disk"); + $floppyarray = array("Unknown", "5 1/4 in.", "3 1/2 in.", "3 1/2 in.", + "3 1/2 in.", "3 1/2 in.", "5 1/4 in.", "5 1/4 in.", "5 1/4 in.", + "5 1/4 in.", "5 1/4 in.", "Other", "HD", "3 1/2 in.", "3 1/2 in.", + "5 1/4 in.", "5 1/4 in.", "3 1/2 in.", "3 1/2 in.", "5 1/4 in.", + "3 1/2 in.", "3 1/2 in.", "8 in."); + + $buffer = $this->_GetWMI( "Win32_LogicalDisk" , array( "Name", "Size", "FreeSpace", "FileSystem", "DriveType", "MediaType" ) ); + + $k = 0; + foreach ( $buffer as $filesystem ) { + if ( hide_mount( $filesystem["Name"] ) ) { + continue; + } + $results[$k]['mount'] = $filesystem["Name"]; + $results[$k]['size'] = $filesystem["Size"] / 1024; + $results[$k]['used'] = ( $filesystem["Size"] - $filesystem["FreeSpace"] ) / 1024; + $results[$k]['free'] = $filesystem["FreeSpace"] / 1024; + @$results[$k]['percent'] = ceil( $results[$k]['used'] / $results[$k]['size'] * 100 ); // silence this line, nobody is having a floppy in the drive everytime + $results[$k]['fstype'] = $filesystem["FileSystem"]; + $results[$k]['disk'] = $typearray[$filesystem["DriveType"]]; + if ( $filesystem["DriveType"] == 2 ) $results[$k]['disk'] .= " (" . $floppyarray[$filesystem["MediaType"]] . ")"; + $k += 1; + } + return $results; + } + + function distro () + { + $buffer = $this->_GetWMI( "Win32_OperatingSystem", array( "Caption" ) ); + return $buffer[0]["Caption"]; + } + + function distroicon () + { + return 'xp.gif'; + } +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.HP-UX.inc.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.HP-UX.inc.php (revision 7633) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.HP-UX.inc.php (revision 7633) @@ -0,0 +1,423 @@ +chostname()); + } + return $result; + } + + function kernel () { + return execute_program('uname', '-srvm'); + } + + function uptime () { + $result = 0; + $ar_buf = array(); + + $buf = execute_program('uptime'); + if (preg_match("/up (\d+) days,\s*(\d+):(\d+),/", $buf, $ar_buf)) { + $min = $ar_buf[3]; + $hours = $ar_buf[2]; + $days = $ar_buf[1]; + $result = $days * 86400 + $hours * 3600 + $min * 60; + } + + return $result; + } + + function users () { + $who = split('=', execute_program('who', '-q')); + $result = $who[1]; + return $result; + } + + function loadavg ($bar = false) { + $ar_buf = array(); + + $buf = execute_program('uptime'); + + if (preg_match("/average: (.*), (.*), (.*)$/", $buf, $ar_buf)) { + $results['avg'] = array($ar_buf[1], $ar_buf[2], $ar_buf[3]); + } else { + $results['avg'] = array('N.A.', 'N.A.', 'N.A.'); + } + return $results; + } + + function cpu_info () { + $results = array(); + $ar_buf = array(); + + $bufr = rfts( '/proc/cpuinfo' ); + if( $bufr != "ERROR" ) { + $bufe = explode( "\n", $bufr ); + foreach( $bufe as $buf ) { + list($key, $value) = preg_split('/\s+:\s+/', trim($buf), 2); + // All of the tags here are highly architecture dependant. + // the only way I could reconstruct them for machines I don't + // have is to browse the kernel source. So if your arch isn't + // supported, tell me you want it written in. + switch ($key) { + case 'model name': + $results['model'] = $value; + break; + case 'cpu MHz': + $results['cpuspeed'] = sprintf('%.2f', $value); + break; + case 'cycle frequency [Hz]': // For Alpha arch - 2.2.x + $results['cpuspeed'] = sprintf('%.2f', $value / 1000000); + break; + case 'clock': // For PPC arch (damn borked POS) + $results['cpuspeed'] = sprintf('%.2f', $value); + break; + case 'cpu': // For PPC arch (damn borked POS) + $results['model'] = $value; + break; + case 'revision': // For PPC arch (damn borked POS) + $results['model'] .= ' ( rev: ' . $value . ')'; + break; + case 'cpu model': // For Alpha arch - 2.2.x + $results['model'] .= ' (' . $value . ')'; + break; + case 'cache size': + $results['cache'] = $value; + break; + case 'bogomips': + $results['bogomips'] += $value; + break; + case 'BogoMIPS': // For alpha arch - 2.2.x + $results['bogomips'] += $value; + break; + case 'BogoMips': // For sparc arch + $results['bogomips'] += $value; + break; + case 'cpus detected': // For Alpha arch - 2.2.x + $results['cpus'] += $value; + break; + case 'system type': // Alpha arch - 2.2.x + $results['model'] .= ', ' . $value . ' '; + break; + case 'platform string': // Alpha arch - 2.2.x + $results['model'] .= ' (' . $value . ')'; + break; + case 'processor': + $results['cpus'] += 1; + break; + } + } + fclose($fd); + } + + $keys = array_keys($results); + $keys2be = array('model', 'cpuspeed', 'cache', 'bogomips', 'cpus'); + + while ($ar_buf = each($keys2be)) { + if (! in_array($ar_buf[1], $keys)) { + $results[$ar_buf[1]] = 'N.A.'; + } + } + return $results; + } + + function pci () { + $results = array(); + + $bufr = rfts( '/proc/pci' ); + if( $bufr != "ERROR" ) { + $bufe = explode( "\n", $bufr ); + foreach( $bufe as $buf ) { + if (preg_match('/Bus/', $buf)) { + $device = true; + continue; + } + + if ($device) { + list($key, $value) = split(': ', $buf, 2); + + if (!preg_match('/bridge/i', $key) && !preg_match('/USB/i', $key)) { + $results[] = preg_replace('/\([^\)]+\)\.$/', '', trim($value)); + } + $device = false; + } + } + } + asort($results); + return $results; + } + + function ide () { + $results = array(); + + $bufd = gdc( '/proc/ide' ); + + foreach( $bufd as $file ) { + if (preg_match('/^hd/', $file)) { + $results[$file] = array(); + // Check if device is CD-ROM (CD-ROM capacity shows as 1024 GB) + $buf = rfts( "/proc/ide/" . $file . "/media", 1 ); + if( $buf != "ERROR" ) { + $results[$file]['media'] = trim( $buf ); + if ($results[$file]['media'] == 'disk') { + $results[$file]['media'] = 'Hard Disk'; + } + if ($results[$file]['media'] == 'cdrom') { + $results[$file]['media'] = 'CD-ROM'; + } + } + + $buf = rfts( "/proc/ide/" . $file . "/model", 1 ); + if( $buf != "ERROR" ) { + $results[$file]['model'] = trim( $buf ); + if (preg_match('/WDC/', $results[$file]['model'])) { + $results[$file]['manufacture'] = 'Western Digital'; + } elseif (preg_match('/IBM/', $results[$file]['model'])) { + $results[$file]['manufacture'] = 'IBM'; + } elseif (preg_match('/FUJITSU/', $results[$file]['model'])) { + $results[$file]['manufacture'] = 'Fujitsu'; + } else { + $results[$file]['manufacture'] = 'Unknown'; + } + } + + $buf = rfts( "/proc/ide/" . $file . "/capacity", 1 ); + if( $buf != "ERROR" ) { + $results[$file]['capacity'] = trim( $buf ); + if ($results[$file]['media'] == 'CD-ROM') { + unset($results[$file]['capacity']); + } + } + } + } + asort($results); + return $results; + } + + function scsi () { + $results = array(); + $dev_vendor = ''; + $dev_model = ''; + $dev_rev = ''; + $dev_type = ''; + $s = 1; + + $bufr = rfts( '/proc/scsi/scsi' ); + if( $bufr != "ERROR" ) { + $bufe = explode( "\n", $bufr ); + foreach( $bufe as $buf ) { + if (preg_match('/Vendor/', $buf)) { + preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i', $buf, $dev); + list($key, $value) = split(': ', $buf, 2); + $dev_str = $value; + $get_type = 1; + continue; + } + + if ($get_type) { + preg_match('/Type:\s+(\S+)/i', $buf, $dev_type); + $results[$s]['model'] = "$dev[1] $dev[2] ($dev_type[1])"; + $results[$s]['media'] = "Hard Disk"; + $s++; + $get_type = 0; + } + } + } + asort($results); + return $results; + } + + function usb () { + $results = array(); + $devstring = 0; + $devnum = -1; + + $bufr = rfts( '/proc/bus/usb/devices' ); + if( $bufr != "ERROR" ) { + $bufe = explode( "\n", $bufr ); + foreach( $bufe as $buf ) { + if (preg_match('/^T/', $buf)) { + $devnum += 1; + } + if (preg_match('/^S/', $buf)) { + $devstring = 1; + } + + if ($devstring) { + list($key, $value) = split(': ', $buf, 2); + list($key, $value2) = split('=', $value, 2); + $results[$devnum] .= " " . trim($value2); + $devstring = 0; + } + } + } + return $results; + } + + function sbus () { + $results = array(); + $_results[0] = ""; + // TODO. Nothing here yet. Move along. + $results = $_results; + return $results; + } + + function network () { + $netstat = execute_program('netstat', '-ni | tail -n +2'); + $lines = split("\n", $netstat); + $results = array(); + for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { + $ar_buf = preg_split("/\s+/", $lines[$i]); + if (!empty($ar_buf[0]) && !empty($ar_buf[3])) { + $results[$ar_buf[0]] = array(); + + $results[$ar_buf[0]]['rx_bytes'] = $ar_buf[4]; + $results[$ar_buf[0]]['rx_packets'] = $ar_buf[4]; + $results[$ar_buf[0]]['rx_errs'] = $ar_buf[5]; + $results[$ar_buf[0]]['rx_drop'] = $ar_buf[8]; + + $results[$ar_buf[0]]['tx_bytes'] = $ar_buf[6]; + $results[$ar_buf[0]]['tx_packets'] = $ar_buf[6]; + $results[$ar_buf[0]]['tx_errs'] = $ar_buf[7]; + $results[$ar_buf[0]]['tx_drop'] = $ar_buf[8]; + + $results[$ar_buf[0]]['errs'] = $ar_buf[5] + $ar_buf[7]; + $results[$ar_buf[0]]['drop'] = $ar_buf[8]; + } + } + return $results; + } + function memory () { + $results['ram'] = array(); + $results['swap'] = array(); + $results['devswap'] = array(); + + $bufr = rfts( '/proc/meminfo' ); + if( $bufr != "ERROR" ) { + $bufe = explode( "\n", $bufr ); + foreach( $bufe as $buf ) { + if (preg_match('/Mem:\s+(.*)$/', $buf, $ar_buf)) { + $ar_buf = preg_split('/\s+/', $ar_buf[1], 6); + + $results['ram']['total'] = $ar_buf[0] / 1024; + $results['ram']['used'] = $ar_buf[1] / 1024; + $results['ram']['free'] = $ar_buf[2] / 1024; + $results['ram']['shared'] = $ar_buf[3] / 1024; + $results['ram']['buffers'] = $ar_buf[4] / 1024; + $results['ram']['cached'] = $ar_buf[5] / 1024; + // I don't like this since buffers and cache really aren't + // 'used' per say, but I get too many emails about it. + $results['ram']['t_used'] = $results['ram']['used']; + $results['ram']['t_free'] = $results['ram']['total'] - $results['ram']['t_used']; + $results['ram']['percent'] = round(($results['ram']['t_used'] * 100) / $results['ram']['total']); + } + + if (preg_match('/Swap:\s+(.*)$/', $buf, $ar_buf)) { + $ar_buf = preg_split('/\s+/', $ar_buf[1], 3); + + $results['swap']['total'] = $ar_buf[0] / 1024; + $results['swap']['used'] = $ar_buf[1] / 1024; + $results['swap']['free'] = $ar_buf[2] / 1024; + $results['swap']['percent'] = round(($ar_buf[1] * 100) / $ar_buf[0]); + // Get info on individual swap files + $swaps = rfts( '/proc/swaps' ); + if( $swaps != "ERROR" ) { + $swapdevs = split("\n", $swaps); + + for ($i = 1, $max = (sizeof($swapdevs) - 1); $i < $max; $i++) { + $ar_buf = preg_split('/\s+/', $swapdevs[$i], 6); + $results['devswap'][$i - 1] = array(); + $results['devswap'][$i - 1]['dev'] = $ar_buf[0]; + $results['devswap'][$i - 1]['total'] = $ar_buf[2]; + $results['devswap'][$i - 1]['used'] = $ar_buf[3]; + $results['devswap'][$i - 1]['free'] = ($results['devswap'][$i - 1]['total'] - $results['devswap'][$i - 1]['used']); + $results['devswap'][$i - 1]['percent'] = round(($ar_buf[3] * 100) / $ar_buf[2]); + } + break; + } + } + } + } + return $results; + } + + function filesystems () { + $df = execute_program('df', '-kP'); + $mounts = split("\n", $df); + $fstype = array(); + + $s = execute_program('mount', '-v'); + $lines = explode("\n", $s); + + $i = 0; + while (list(, $line) = each($lines)) { + $a = split(' ', $line); + $fsdev[$a[0]] = $a[4]; + } + + for ($i = 1, $j = 0, $max = sizeof($mounts); $i < $max; $i++) { + $ar_buf = preg_split("/\s+/", $mounts[$i], 6); + + if (hide_mount($ar_buf[5])) { + continue; + } + + $results[$j] = array(); + + $results[$j]['disk'] = $ar_buf[0]; + $results[$j]['size'] = $ar_buf[1]; + $results[$j]['used'] = $ar_buf[2]; + $results[$j]['free'] = $ar_buf[3]; + $results[$j]['percent'] = $ar_buf[4]; + $results[$j]['mount'] = $ar_buf[5]; + ($fstype[$ar_buf[5]]) ? $results[$j]['fstype'] = $fstype[$ar_buf[5]] : $results[$j]['fstype'] = $fsdev[$ar_buf[0]]; + $j++; + } + return $results; + } + + function distro () { + $result = 'HP-UX'; + return($result); + } + + function distroicon () { + $result = 'unknown.png'; + return($result); + } +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/distros.ini =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/distros.ini (revision 7633) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/distros.ini (revision 7633) @@ -0,0 +1,78 @@ +; linux-distros.ini - Defines known linux distros for phpSysInfo. +; http://phpsysinfo.sourceforge.net/ +; $Id: distros.ini,v 1.9 2007/06/17 12:07:34 bigmichi1 Exp $ +; Copyright 2006 phpSysInfo +; + +[Debian] +Name = "Debian" +Image = "Debian.png" +Files = "/etc/debian_release;/etc/debian_version" + +[SUSE LINUX] +Image = "Suse.png" +Files = "/etc/SuSE-release;/etc/UnitedLinux-release" + +[Mandrage] +Image = "Mandrake.png" +Files = "/etc/mandrake-release" + +[Gentoo] +Image = "Gentoo.png" +Files = "/etc/gentoo-release" + +[RedHat] +Image = "Redhat.png" +Files = "/etc/redhat-release;/etc/redhat_version" + +[Fedora] +Image = "Fedora.png" +Files = "/etc/fedora-release" + +[FedoraCore] +Image = "Fedora.png" +Files = "/etc/fedora-release" + +[Slackware] +Image = "Slackware.png" +Files = "/etc/slackware-release;/etc/slackware-version" + +[Trustix] +Image = "Trustix.gif" +Files = "/etc/trustix-release;/etc/trustix-version" + +[FreeEOS] +Image = "free-eos.png" +Files = "/etc/eos-version" + +[Arch] +Image = "Arch.gif" +Files = "/etc/arch-release" + +[Cobalt] +Image = "Cobalt.png" +Files = "/etc/cobalt-release" + +[LinuxFromScratch] +Image = "lfs.png" +Files = "/etc/lfs-release" + +[Rubix] +Image = "Rubix.png" +Files = "/etc/rubix-version" + +[Ubuntu] +Image = "Ubuntu.gif" +Files = "/etc/lsb-release" + +[PLD] +Image = "PLD.gif" +Files = "/etc/pld-release" + +[CentOS] +Image = "CentOS.png" +Files = "/etc/redhat-release;/etc/redhat_version" + +[RedHatEnterpriseES] +Image = "Redhat.png" +Files = "/etc/redhat-release;/etc/redhat_version" Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.Darwin.inc.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.Darwin.inc.php (revision 7633) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.Darwin.inc.php (revision 7633) @@ -0,0 +1,240 @@ +addError("WARN", "The Darwin version of phpSysInfo is work in progress, some things currently don't work"); + +class sysinfo extends bsd_common { + var $cpu_regexp; + var $scsi_regexp; + // Our contstructor + // this function is run on the initialization of this class + function sysinfo () { + // $this->cpu_regexp = "CPU: (.*) \((.*)-MHz (.*)\)"; + // $this->scsi_regexp1 = "^(.*): <(.*)> .*SCSI.*device"; + $this->cpu_regexp2 = "/(.*) ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)/"; + } + + function grab_key ($key) { + $s = execute_program('sysctl', $key); + $s = ereg_replace($key . ': ', '', $s); + $s = ereg_replace($key . ' = ', '', $s); // fix Apple set keys + + return $s; + } + + function grab_ioreg ($key) { + $s = execute_program('ioreg', '-cls "' . $key . '" | grep "' . $key . '"'); //ioreg -cls "$key" | grep "$key" + $s = ereg_replace('\|', '', $s); + $s = ereg_replace('\+\-\o', '', $s); + $s = ereg_replace('[ ]+', '', $s); + $s = ereg_replace('<[^>]+>', '', $s); // remove possible XML conflicts + + return $s; + } + + function get_sys_ticks () { + $a = execute_program('sysctl', '-n kern.boottime'); // get boottime (value in seconds) + $sys_ticks = time() - $a; + + return $sys_ticks; + } + + function cpu_info () { + $results = array(); + // $results['model'] = $this->grab_key('hw.model'); // need to expand this somehow... + // $results['model'] = $this->grab_key('hw.machine'); + $results['model'] = ereg_replace('Processor type: ', '', execute_program('hostinfo', '| grep "Processor type"')); // get processor type + $results['cpus'] = $this->grab_key('hw.ncpu'); + $results['cpuspeed'] = round($this->grab_key('hw.cpufrequency') / 1000000); // return cpu speed - Mhz + $results['busspeed'] = round($this->grab_key('hw.busfrequency') / 1000000); // return bus speed - Mhz + $results['cache'] = round($this->grab_key('hw.l2cachesize') / 1024); // return l2 cache + + if (($this->grab_key('hw.model') == "PowerMac3,6") && ($results['cpus'] == "2")) { $results['model'] = 'Dual G4 - (PowerPC 7450)';} // is Dual G4 + if (($this->grab_key('hw.model') == "PowerMac7,2") && ($results['cpus'] == "2")) { $results['model'] = 'Dual G5 - (PowerPC 970)';} // is Dual G5 + + return $results; + } + // get the pci device information out of ioreg + function pci () { + $results = array(); + $s = $this->grab_ioreg('IOPCIDevice'); + + $lines = split("\n", $s); + for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { + $ar_buf = preg_split("/\s+/", $lines[$i], 19); + $results[$i] = $ar_buf[0]; + } + asort($results); + return array_values(array_unique($results)); + } + // get the ide device information out of ioreg + function ide () { + $results = array(); + // ioreg | grep "Media " + $s = $this->grab_ioreg('IOATABlockStorageDevice'); + + $lines = split("\n", $s); + $j = 0; + for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { + $ar_buf = preg_split("/\/\//", $lines[$i], 19); + + if ($ar_buf[1] == 'class IOMedia' && preg_match('/Media/', $ar_buf[0])) { + $results[$j++]['model'] = $ar_buf[0]; + } + } + asort($results); + return array_values(array_unique($results)); + } + + function memory () { + $s = $this->grab_key('hw.memsize'); + + $results['ram'] = array(); + + $pstat = execute_program('vm_stat'); // use darwin's vm_stat + $lines = split("\n", $pstat); + for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { + $ar_buf = preg_split("/\s+/", $lines[$i], 19); + + if ($i == 1) { + $results['ram']['free'] = $ar_buf[2] * 4; // calculate free memory from page sizes (each page = 4MB) + } + } + + $results['ram']['total'] = $s / 1024; + $results['ram']['shared'] = 0; + $results['ram']['buffers'] = 0; + $results['ram']['used'] = $results['ram']['total'] - $results['ram']['free']; + $results['ram']['cached'] = 0; + $results['ram']['t_used'] = $results['ram']['used']; + $results['ram']['t_free'] = $results['ram']['free']; + + $results['ram']['percent'] = round(($results['ram']['used'] * 100) / $results['ram']['total']); + // need to fix the swap info... + $pstat = execute_program('swapinfo', '-k'); + $lines = split("\n", $pstat); + + for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { + $ar_buf = preg_split("/\s+/", $lines[$i], 6); + + if ($i == 0) { + $results['swap']['total'] = 0; + $results['swap']['used'] = 0; + $results['swap']['free'] = 0; + } else { + $results['swap']['total'] = $results['swap']['total'] + $ar_buf[1]; + $results['swap']['used'] = $results['swap']['used'] + $ar_buf[2]; + $results['swap']['free'] = $results['swap']['free'] + $ar_buf[3]; + } + } + $results['swap']['percent'] = round(($results['swap']['used'] * 100) / $results['swap']['total']); + + return $results; + } + + function network () { + $netstat = execute_program('netstat', '-nbdi | cut -c1-24,42- | grep Link'); + $lines = split("\n", $netstat); + $results = array(); + for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { + $ar_buf = preg_split("/\s+/", $lines[$i]); + if (!empty($ar_buf[0])) { + $results[$ar_buf[0]] = array(); + + $results[$ar_buf[0]]['rx_bytes'] = $ar_buf[5]; + $results[$ar_buf[0]]['rx_packets'] = $ar_buf[3]; + $results[$ar_buf[0]]['rx_errs'] = $ar_buf[4]; + $results[$ar_buf[0]]['rx_drop'] = $ar_buf[10]; + + $results[$ar_buf[0]]['tx_bytes'] = $ar_buf[8]; + $results[$ar_buf[0]]['tx_packets'] = $ar_buf[6]; + $results[$ar_buf[0]]['tx_errs'] = $ar_buf[7]; + $results[$ar_buf[0]]['tx_drop'] = $ar_buf[10]; + + $results[$ar_buf[0]]['errs'] = $ar_buf[4] + $ar_buf[7]; + $results[$ar_buf[0]]['drop'] = $ar_buf[10]; + } + } + return $results; + } + + function filesystems () { + $df = execute_program('df', '-k'); + $mounts = split("\n", $df); + $fstype = array(); + + $s = execute_program('mount'); + $lines = explode("\n", $s); + + $i = 0; + while (list(, $line) = each($lines)) { + ereg('(.*) \((.*)\)', $line, $a); + + $m = explode(' ', $a[0]); + $fsdev[$m[0]] = $a[2]; + } + + for ($i = 1, $j = 0, $max = sizeof($mounts); $i < $max; $i++) { + $ar_buf = preg_split("/\s+/", $mounts[$i], 6); + + switch ($ar_buf[0]) { + case 'automount': // skip the automount entries + case 'devfs': // skip the dev filesystem + case 'fdesc': // skip the fdesc + case 'procfs': // skip the proc filesystem + case '': // skip the vol filesystem + continue 2; + break; + } + if (hide_mount($ar_buf[5])) { + continue; + } + + $results[$j] = array(); + + $results[$j]['disk'] = $ar_buf[0]; + $results[$j]['size'] = $ar_buf[1]; + $results[$j]['used'] = $ar_buf[2]; + $results[$j]['free'] = $ar_buf[3]; + $results[$j]['percent'] = $ar_buf[4]; + $results[$j]['mount'] = $ar_buf[5]; + ($fstype[$ar_buf[5]]) ? $results[$j]['fstype'] = $fstype[$ar_buf[5]] : $results[$j]['fstype'] = $fsdev[$ar_buf[0]]; + $j++; + } + return $results; + } + + function distroicon () { + $result = 'Darwin.png'; + return($result); + } + +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/common_functions.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/common_functions.php (revision 9635) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/common_functions.php (revision 9635) @@ -0,0 +1,352 @@ +\n\n"; +} +// usefull during development +error_reporting(E_ALL | E_NOTICE); + +// print out the bar graph +// $value as full percentages +// $maximim as current maximum +// $b as scale factor +// $type as filesystem type +function create_bargraph ($value, $maximum, $b, $type = "", $red_limit=90, $yellow_limit=75) +{ + global $webpath; + + $textdir = direction(); + + $imgpath = $webpath . 'templates/' . TEMPLATE_SET . '/images/'; + //$imgpath = 'modules/sysinfo/tinfo/templates/' . TEMPLATE_SET . '/images/'; + $maximum == 0 ? $barwidth = 0 : $barwidth = round((100 / $maximum) * $value) * $b; + //$red = 90 * $b; + $red = $red_limit * $b; + //$yellow = 75 * $b; + $yellow = $yellow_limit * $b; + + if (!file_exists(APP_ROOT . "/templates/" . TEMPLATE_SET . "/images/nobar_left.gif")) { + if ($barwidth == 0) { + return '' + . '' + . ''; + } elseif (file_exists(APP_ROOT . "/templates/" . TEMPLATE_SET . "/images/yellowbar_left.gif") && $barwidth > $yellow && $barwidth < $red) { + return '' + . '' + . ''; + } elseif (($barwidth < $red) || ($type == "iso9660") || ($type == "CDFS")) { + return '' + . '' + . ''; + } else { + return '' + . '' + . ''; + } + } else { + if ($barwidth == 0) { + return '' + . '' + . ''; + } elseif (file_exists(APP_ROOT . "/templates/" . TEMPLATE_SET . "/images/yellowbar_left.gif") && $barwidth > $yellow && $barwidth < $red) { + return '' + . '' + . '' + . ''; + } elseif (($barwidth < $red) || $type == "iso9660" || ($type == "CDFS")) { + return '' + . '' + . '' + . ''; + } elseif ($barwidth == (100 * $b)) { + return '' + . '' + . ''; + } else { + return '' + . '' + . '' + . ''; + } + } +} + +function create_bargraph_grad( $value, $maximum, $b, $type = "" ) { + global $webpath; + + $maximum == 0 ? $barwidth = 0 : $barwidth = round((100 / $maximum) * $value); + $startColor = '0ef424'; // green + $endColor = 'ee200a'; // red + if ($barwidth > 100) { + $barwidth = 0; + } + + return ''; +} + +function direction() { + global $text_dir; + + if(!isset($text_dir) || $text_dir == "ltr") { + $result['direction'] = "ltr"; + $result['left'] = "left"; + $result['right'] = "right"; + } else { + $result['direction'] = "rtl"; + $result['left'] = "right"; + $result['right'] = "left"; + } + + return $result; +} + +// Find a system program. Do path checking +function find_program ($program) +{ + global $addpaths; + + $path = array('/bin', '/sbin', '/usr/bin', '/usr/sbin', '/usr/local/bin', '/usr/local/sbin'); + + if( isset($addpaths) && is_array($addpaths) ) { + $path = array_merge( $path, $addpaths ); + } + + if (function_exists("is_executable")) { + while ($this_path = current($path)) { + if (is_executable("$this_path/$program")) { + return "$this_path/$program"; + } + next($path); + } + } else { + return strpos($program, '.exe'); + } ; + + return; +} +// Execute a system program. return a trim()'d result. +// does very crude pipe checking. you need ' | ' for it to work +// ie $program = execute_program('netstat', '-anp | grep LIST'); +// NOT $program = execute_program('netstat', '-anp|grep LIST'); +function execute_program ($programname, $args = '', $booErrorRep = true ) +{ + global $error; + $buffer = ''; + $program = find_program($programname); + + if (!$program) { + if( $booErrorRep ) { + $error->addError( 'find_program(' . $programname . ')', 'program not found on the machine', __LINE__, __FILE__); + } + return; + } + + // see if we've gotten a |, if we have we need to do patch checking on the cmd + if ($args) { + $args_list = preg_split('/\s/', $args); + for ($i = 0; $i < count($args_list); $i++) { + if ($args_list[$i] == '|') { + $cmd = $args_list[$i + 1]; + $new_cmd = find_program($cmd); + $args = preg_replace("/\| $cmd/", "| $new_cmd", $args); + } + } + } + // we've finally got a good cmd line.. execute it + if ($fp = popen("($program $args > /dev/null) 3>&1 1>&2 2>&3", 'r')) { + while (!feof($fp)) { + $buffer .= fgets($fp, 4096); + } + pclose($fp); + $buffer = trim($buffer); + if (!empty($buffer)) { + if( $booErrorRep ) { + $error->addError( $program, $buffer, __LINE__, __FILE__); + } + } + } + if ($fp = popen("$program $args", 'r')) { + $buffer = ""; + while (!feof($fp)) { + $buffer .= fgets($fp, 4096); + } + pclose($fp); + } + $buffer = trim($buffer); + return $buffer; +} + +// A helper function, when passed a number representing KB, +// and optionally the number of decimal places required, +// it returns a formated number string, with unit identifier. +function format_bytesize ($kbytes, $dec_places = 2) +{ + global $text; + $spacer = ' '; + if ($kbytes > 1048576) { + $result = sprintf('%.' . $dec_places . 'f', $kbytes / 1048576); + $result .= $spacer . $text['gb']; + } elseif ($kbytes > 1024) { + $result = sprintf('%.' . $dec_places . 'f', $kbytes / 1024); + $result .= $spacer . $text['mb']; + } else { + $result = sprintf('%.' . $dec_places . 'f', $kbytes); + $result .= $spacer . $text['kb']; + } + return $result; +} + +function get_gif_image_height($image) +{ + // gives the height of the given GIF image, by reading it's LSD (Logical Screen Discriptor) + // by Edwin Meester aka MillenniumV3 + // Header: 3bytes Discription + // 3bytes Version + // LSD: 2bytes Logical Screen Width + // 2bytes Logical Screen Height + // 1bit Global Color Table Flag + // 3bits Color Resolution + // 1bit Sort Flag + // 3bits Size of Global Color Table + // 1byte Background Color Index + // 1byte Pixel Aspect Ratio + // Open Image + $fp = fopen($image, 'rb'); + // read Header + LSD + $header_and_lsd = fread($fp, 13); + fclose($fp); + // calc Height from Logical Screen Height bytes + $result = ord($header_and_lsd{8}) + ord($header_and_lsd{9}) * 255; + return $result; +} + +// Check if a string exist in the global $hide_mounts. +// Return true if this is the case. +function hide_mount($mount) { + global $hide_mounts; + if (isset($hide_mounts) && is_array($hide_mounts) && in_array($mount, $hide_mounts)) { + return true; + } + else { + return false; + } +} + +function uptime($timestamp) { + global $text; + $uptime = ''; + + $min = $timestamp / 60; + $hours = $min / 60; + $days = floor($hours / 24); + $hours = floor($hours - ($days * 24)); + $min = floor($min - ($days * 60 * 24) - ($hours * 60)); + + if ($days != 0) { + $uptime .= $days. " " . $text['days'] . " "; + } + + if ($hours != 0) { + $uptime .= $hours . " " . $text['hours'] . " "; + } + + $uptime .= $min . " " . $text['minutes']; + return $uptime; +} + +//Replace some chars which are not valid in xml with iso-8859-1 encoding +function replace_specialchars(&$xmlstring) { + $xmlstring = str_replace( chr(174), "(R)", $xmlstring ); + $xmlstring = str_replace( chr(169), "(C)", $xmlstring ); +} + +// find duplicate entrys and count them, show this value befor the duplicated name +function finddups( $arrInput ) { + $result = array(); + $buffer = array_count_values($arrInput); + foreach ($buffer as $key => $value) { + if( $value > 1 ) { + $result[] = "(" . $value . "x) " . $key; + } else { + $result[] = $key; + } + } + return $result; +} + +function rfts( $strFileName, $intLines = 0, $intBytes = 4096, $booErrorRep = true ) { + global $error; + $strFile = ""; + $intCurLine = 1; + + if( file_exists( $strFileName ) ) { + if( $fd = fopen( $strFileName, 'r' ) ) { + while( !feof( $fd ) ) { + $strFile .= fgets( $fd, $intBytes ); + if( $intLines <= $intCurLine && $intLines != 0 ) { + break; + } else { + $intCurLine++; + } + } + fclose( $fd ); + } else { + if( $booErrorRep ) { + $error->addError( 'fopen(' . $strFileName . ')', 'file can not read by phpsysinfo', __LINE__, __FILE__ ); + } + return "ERROR"; + } + } else { + if( $booErrorRep ) { + $error->addError( 'file_exists(' . $strFileName . ')', 'the file does not exist on your machine', __LINE__, __FILE__ ); + } + return "ERROR"; + } + return $strFile; +} + +function gdc( $strPath, $booErrorRep = true ) { + global $error; + $arrDirectoryContent = array(); + + if( is_dir( $strPath ) ) { + if( $handle = opendir( $strPath ) ) { + while( ( $strFile = readdir( $handle ) ) !== false ) { + if( $strFile != "." && $strFile != ".." && $strFile != "CVS" ) { + $arrDirectoryContent[] = $strFile; + } + } + closedir( $handle ); + } else { + if( $booErrorRep ) { + $error->addError( 'opendir(' . $strPath . ')', 'directory can not be read by phpsysinfo', __LINE__, __FILE__ ); + } + } + } else { + if( $booErrorRep ) { + $error->addError( 'is_dir(' . $strPath . ')', 'directory does not exist on your machine', __LINE__, __FILE__ ); + } + } + + return $arrDirectoryContent; +} +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.parseProgs.inc.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.parseProgs.inc.php (revision 4360) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.parseProgs.inc.php (revision 4360) @@ -0,0 +1,133 @@ +debug)) { + $lines = split("\n", $_results); + for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { + list($addr, $name) = explode(' ', trim($lines[$i]), 2); + //if (!preg_match('/bridge/i', $name) && !preg_match('/USB/i', $name)) { + // remove all the version strings + $name = preg_replace('/\(.*\)/', '', $name); + // is addr really usefull for this??? i think it's not + // $results[] = $addr . ' ' . $name; + $results[] = $name; + //} + } + } + + if( empty( $results ) ) { + return false; + } else { + asort( $results ); + return $results; + } + } + + function parse_pciconf() { + + $results = array(); + + if($buf = execute_program("pciconf", "-lv", $this->debug)) { + $buf = explode("\n", $buf); $s = 0; + foreach($buf as $line) { + if (preg_match("/(.*) = '(.*)'/", $line, $strings)) { + if (trim($strings[1]) == "vendor") { + $results[$s] = trim($strings[2]); + } elseif (trim($strings[1]) == "device") { + $results[$s] .= " - " . trim($strings[2]); + $s++; + } + } + } + } + + if( empty( $results ) ) { + return false; + } else { + asort( $results ); + return $results; + } + } + + function parse_filesystems() { + + global $show_bind, $show_inodes; + + $j = 0; + + $df = execute_program('df', '-k' . $this->df_param ); + $df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY); + + if( $show_inodes ) { + $df2 = execute_program('df', '-i' . $this->df_param ); + $df2 = preg_split("/\n/", $df2, -1, PREG_SPLIT_NO_EMPTY); + } + + $mount = execute_program('mount'); + $mount = preg_split("/\n/", $mount, -1, PREG_SPLIT_NO_EMPTY); + + foreach( $df as $df_line) { + $df_buf1 = preg_split("/(\%\s)/", $df_line, 2); + if( count($df_buf1) != 2) { + continue; + } + + preg_match("/(.*)(\s+)(([0-9]+)(\s+)([0-9]+)(\s+)([0-9]+)(\s+)([0-9]+)$)/", $df_buf1[0], $df_buf2); + $df_buf = array($df_buf2[1], $df_buf2[4], $df_buf2[6], $df_buf2[8], $df_buf2[10], $df_buf1[1]); + + if( $show_inodes ) { + preg_match_all("/([0-9]+)%/", $df2[$j + 1], $inode_buf, PREG_SET_ORDER); + } + + if( count($df_buf) == 6 ) { + if( hide_mount( $df_buf[5] ) ) { + continue; + } + + $df_buf[0] = trim( str_replace("\$", "\\$", $df_buf[0] ) ); + $df_buf[5] = trim( $df_buf[5] ); + + $current = 0; + foreach( $mount as $mount_line ) { + $current++; + + if ( preg_match("#" . $df_buf[0] . " on " . $df_buf[5] . " type (.*) \((.*)\)#", $mount_line, $mount_buf) ) { + $mount_buf[1] .= "," . $mount_buf[2]; + } elseif ( !preg_match("#" . $df_buf[0] . "(.*) on " . $df_buf[5] . " \((.*)\)#", $mount_line, $mount_buf) ) { + continue; + } + + if ( $show_bind || !stristr($mount_buf[2], "bind")) { + $results[$j] = array(); + $results[$j]['disk'] = str_replace( "\\$", "\$", $df_buf[0] ); + $results[$j]['size'] = $df_buf[1]; + $results[$j]['used'] = $df_buf[2]; + $results[$j]['free'] = $df_buf[3]; + $results[$j]['percent'] = round(($results[$j]['used'] * 100) / $results[$j]['size']); + $results[$j]['mount'] = $df_buf[5]; + $results[$j]['fstype'] = substr( $mount_buf[1], 0, strpos( $mount_buf[1], "," ) ); + $results[$j]['options'] = substr( $mount_buf[1], strpos( $mount_buf[1], "," ) + 1, strlen( $mount_buf[1] ) ); + if( $show_inodes && isset($inode_buf[ count( $inode_buf ) - 1][1]) ) { + $results[$j]['inodes'] = $inode_buf[ count( $inode_buf ) - 1][1]; + } + $j++; + unset( $mount[$current - 1] ); + sort( $mount ); + break; + } + } + } + } + return $results; + } + +} +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.SunOS.inc.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.SunOS.inc.php (revision 7633) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.SunOS.inc.php (revision 7633) @@ -0,0 +1,240 @@ +addError("WARN", "The SunOS version of phpSysInfo is work in progress, some things currently don't work"); + +class sysinfo { + // Extract kernel values via kstat() interface + function kstat ($key) { + $m = execute_program('kstat', "-p d $key"); + list($key, $value) = split("\t", trim($m), 2); + return $value; + } + + function vhostname () { + if (! ($result = getenv('SERVER_NAME'))) { + $result = 'N.A.'; + } + return $result; + } + // get our canonical hostname + function chostname () { + if ($result = execute_program('uname', '-n')) { + $result = gethostbyaddr(gethostbyname($result)); + } else { + $result = 'N.A.'; + } + return $result; + } + // get the IP address of our canonical hostname + function ip_addr () { + if (!($result = getenv('SERVER_ADDR'))) { + $result = gethostbyname($this->chostname()); + } + return $result; + } + + function kernel () { + $os = execute_program('uname', '-s'); + $version = execute_program('uname', '-r'); + return $os . ' ' . $version; + } + + function uptime () { + $result = time() - $this->kstat('unix:0:system_misc:boot_time'); + + return $result; + } + + function users () { + $who = split('=', execute_program('who', '-q')); + $result = $who[1]; + return $result; + } + + function loadavg ($bar = false) { + $load1 = $this->kstat('unix:0:system_misc:avenrun_1min'); + $load5 = $this->kstat('unix:0:system_misc:avenrun_5min'); + $load15 = $this->kstat('unix:0:system_misc:avenrun_15min'); + $results['avg'] = array( round($load1/256, 2), round($load5/256, 2), round($load15/256, 2) ); + return $results; + } + + function cpu_info () { + $results = array(); + $ar_buf = array(); + + $results['model'] = execute_program('uname', '-i'); + $results['cpuspeed'] = $this->kstat('cpu_info:0:cpu_info0:clock_MHz'); + $results['cache'] = $this->kstat('cpu_info:0:cpu_info0:cpu_type'); + $results['cpus'] = $this->kstat('unix:0:system_misc:ncpus'); + + return $results; + } + + function pci () { + // FIXME + $results = array(); + return $results; + } + + function ide () { + // FIXME + $results = array(); + return $results; + } + + function scsi () { + // FIXME + $results = array(); + return $results; + } + + function usb () { + // FIXME + $results = array(); + return $results; + } + + function sbus () { + $results = array(); + $_results[0] = ""; + // TODO. Nothing here yet. Move along. + $results = $_results; + return $results; + } + + function network () { + $results = array(); + + $netstat = execute_program('netstat', '-ni | awk \'(NF ==10){print;}\''); + $lines = split("\n", $netstat); + $results = array(); + for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { + $ar_buf = preg_split("/\s+/", $lines[$i]); + if ((!empty($ar_buf[0])) && ($ar_buf[0] != 'Name')) { + $results[$ar_buf[0]] = array(); + + $results[$ar_buf[0]]['rx_bytes'] = 0; + $results[$ar_buf[0]]['rx_packets'] = $ar_buf[4]; + $results[$ar_buf[0]]['rx_errs'] = $ar_buf[5]; + $results[$ar_buf[0]]['rx_drop'] = 0; + + $results[$ar_buf[0]]['tx_bytes'] = 0; + $results[$ar_buf[0]]['tx_packets'] = $ar_buf[6]; + $results[$ar_buf[0]]['tx_errs'] = $ar_buf[7]; + $results[$ar_buf[0]]['tx_drop'] = 0; + + $results[$ar_buf[0]]['errs'] = $ar_buf[5] + $ar_buf[ + 7]; + $results[$ar_buf[0]]['drop'] = 0; + + preg_match('/^(\D+)(\d+)$/', $ar_buf[0], $intf); + $prefix = $intf[1] . ':' . $intf[2] . ':' . $intf[1] . $intf[2] . ':'; + $cnt = $this->kstat($prefix . 'drop'); + + if ($cnt > 0) { + $results[$ar_buf[0]]['rx_drop'] = $cnt; + } + $cnt = $this->kstat($prefix . 'obytes64'); + + if ($cnt > 0) { + $results[$ar_buf[0]]['tx_bytes'] = $cnt; + } + $cnt = $this->kstat($prefix . 'rbytes64'); + + if ($cnt > 0) { + $results[$ar_buf[0]]['rx_bytes'] = $cnt; + } + } + } + return $results; + } + + function memory () { + $results['devswap'] = array(); + + $results['ram'] = array(); + + $pagesize = $this->kstat('unix:0:seg_cache:slab_size'); + $results['ram']['total'] = $this->kstat('unix:0:system_pages:pagestotal') * $pagesize / 1024; + $results['ram']['used'] = $this->kstat('unix:0:system_pages:pageslocked') * $pagesize / 1024; + $results['ram']['free'] = $this->kstat('unix:0:system_pages:pagesfree') * $pagesize / 1024; + $results['ram']['shared'] = 0; + $results['ram']['buffers'] = 0; + $results['ram']['cached'] = 0; + + $results['ram']['t_used'] = $results['ram']['used'] - $results['ram']['cached'] - $results['ram']['buffers']; + $results['ram']['t_free'] = $results['ram']['total'] - $results['ram']['t_used']; + $results['ram']['percent'] = round(($results['ram']['used'] * 100) / $results['ram']['total']); + + $results['swap'] = array(); + $results['swap']['total'] = $this->kstat('unix:0:vminfo:swap_avail') / 1024 / 1024; + $results['swap']['used'] = $this->kstat('unix:0:vminfo:swap_alloc') / 1024 / 1024; + $results['swap']['free'] = $this->kstat('unix:0:vminfo:swap_free') / 1024 / 1024; + $results['swap']['percent'] = round(($ar_buf[1] * 100) / $ar_buf[0]); + $results['swap']['percent'] = round(($results['swap']['used'] * 100) / $results['swap']['total']); + return $results; + } + + function filesystems () { + $df = execute_program('df', '-k'); + $mounts = split("\n", $df); + + $dftypes = execute_program('df', '-n'); + $mounttypes = split("\n", $dftypes); + + for ($i = 1, $j = 0, $max = sizeof($mounts); $i < $max; $i++) { + $ar_buf = preg_split('/\s+/', $mounts[$i], 6); + $ty_buf = split(':', $mounttypes[$i-1], 2); + + if (hide_mount($ar_buf[5])) { + continue; + } + + $results[$j] = array(); + + $results[$j]['disk'] = $ar_buf[0]; + $results[$j]['size'] = $ar_buf[1]; + $results[$j]['used'] = $ar_buf[2]; + $results[$j]['free'] = $ar_buf[3]; + $results[$j]['percent'] = round(($results[$j]['used'] * 100) / $results[$j]['size']); + $results[$j]['mount'] = $ar_buf[5]; + $results[$j]['fstype'] = $ty_buf[1]; + $j++; + } + return $results; + } + + function distro () { + $result = 'SunOS'; + return($result); + } + + function distroicon () { + $result = 'SunOS.png'; + return($result); + } +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.FreeBSD.inc.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.FreeBSD.inc.php (revision 9635) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.FreeBSD.inc.php (revision 9635) @@ -0,0 +1,111 @@ +bsd_common(); + $this->cpu_regexp = "CPU: (.*) \((.*)-MHz (.*)\)"; + $this->scsi_regexp1 = "^(.*): <(.*)> .*SCSI.*device"; + $this->scsi_regexp2 = "^(da[0-9]): (.*)MB "; + $this->cpu_regexp2 = "/(.*) ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)/"; + } + + function get_sys_ticks () { + $s = explode(' ', $this->grab_key('kern.boottime')); + $a = preg_replace('/{\s/', '', $s[3]); + $sys_ticks = time() - $a; + return $sys_ticks; + } + + function network () { + $netstat = execute_program('netstat', '-nibd | grep Link'); + $lines = preg_split("/\n/", $netstat); + $results = array(); + for ($i = 0, $max = sizeof($lines); $i < $max; $i++) { + $ar_buf = preg_split("/\s+/", $lines[$i]); + if (!empty($ar_buf[0])) { + $results[$ar_buf[0]] = array(); + + if (strlen($ar_buf[3]) < 15) { + $results[$ar_buf[0]]['rx_bytes'] = $ar_buf[5]; + $results[$ar_buf[0]]['rx_packets'] = $ar_buf[3]; + $results[$ar_buf[0]]['rx_errs'] = $ar_buf[4]; + $results[$ar_buf[0]]['rx_drop'] = $ar_buf[10]; + + $results[$ar_buf[0]]['tx_bytes'] = $ar_buf[8]; + $results[$ar_buf[0]]['tx_packets'] = $ar_buf[6]; + $results[$ar_buf[0]]['tx_errs'] = $ar_buf[7]; + $results[$ar_buf[0]]['tx_drop'] = $ar_buf[10]; + + $results[$ar_buf[0]]['errs'] = $ar_buf[4] + $ar_buf[7]; + $results[$ar_buf[0]]['drop'] = $ar_buf[10]; + } else { + $results[$ar_buf[0]]['rx_bytes'] = $ar_buf[6]; + $results[$ar_buf[0]]['rx_packets'] = $ar_buf[4]; + $results[$ar_buf[0]]['rx_errs'] = $ar_buf[5]; + $results[$ar_buf[0]]['rx_drop'] = $ar_buf[11]; + + $results[$ar_buf[0]]['tx_bytes'] = $ar_buf[9]; + $results[$ar_buf[0]]['tx_packets'] = $ar_buf[7]; + $results[$ar_buf[0]]['tx_errs'] = $ar_buf[8]; + $results[$ar_buf[0]]['tx_drop'] = $ar_buf[11]; + + $results[$ar_buf[0]]['errs'] = $ar_buf[5] + $ar_buf[8]; + $results[$ar_buf[0]]['drop'] = $ar_buf[11]; + } + } + } + return $results; + } + + function distroicon () { + $result = 'FreeBSD.png'; + return($result); + } + + function memory_additional($results) { + $pagesize = $this->grab_key("hw.pagesize"); + $results['ram']['cached'] = $this->grab_key("vm.stats.vm.v_cache_count") * $pagesize / 1024; + $results['ram']['cached_percent'] = round( $results['ram']['cached'] * 100 / $results['ram']['total']); + $results['ram']['app'] = $this->grab_key("vm.stats.vm.v_active_count") * $pagesize / 1024; + $results['ram']['app_percent'] = round( $results['ram']['app'] * 100 / $results['ram']['total']); + $results['ram']['buffers'] = $results['ram']['used'] - $results['ram']['app'] - $results['ram']['cached']; + $results['ram']['buffers_percent'] = round( $results['ram']['buffers'] * 100 / $results['ram']['total']); + return $results; + } +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.OpenBSD.inc.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.OpenBSD.inc.php (revision 7633) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/phpsysinfo/class.OpenBSD.inc.php (revision 7633) @@ -0,0 +1,113 @@ +bsd_common(); + $this->cpu_regexp = "^cpu(.*) (.*) MHz"; + $this->scsi_regexp1 = "^(.*) at scsibus.*: <(.*)> .*"; + $this->scsi_regexp2 = "^(da[0-9]): (.*)MB "; + $this->cpu_regexp2 = "/(.*),(.*),(.*),(.*),(.*)/"; + $this->pci_regexp1 = '/(.*) at pci[0-9] .* "(.*)"/'; + $this->pci_regexp2 = '/"(.*)" (.*).* at [.0-9]+ irq/'; + } + + function get_sys_ticks () { + $a = $this->grab_key('kern.boottime'); + $sys_ticks = time() - $a; + return $sys_ticks; + } + + function network () { + $netstat_b = execute_program('netstat', '-nbdi | cut -c1-25,44- | grep Link | grep -v \'* \''); + $netstat_n = execute_program('netstat', '-ndi | cut -c1-25,44- | grep Link | grep -v \'* \''); + $lines_b = split("\n", $netstat_b); + $lines_n = split("\n", $netstat_n); + $results = array(); + for ($i = 0, $max = sizeof($lines_b); $i < $max; $i++) { + $ar_buf_b = preg_split("/\s+/", $lines_b[$i]); + $ar_buf_n = preg_split("/\s+/", $lines_n[$i]); + if (!empty($ar_buf_b[0]) && !empty($ar_buf_n[3])) { + $results[$ar_buf_b[0]] = array(); + + $results[$ar_buf_b[0]]['rx_bytes'] = $ar_buf_b[3]; + $results[$ar_buf_b[0]]['rx_packets'] = $ar_buf_n[3]; + $results[$ar_buf_b[0]]['rx_errs'] = $ar_buf_n[4]; + $results[$ar_buf_b[0]]['rx_drop'] = $ar_buf_n[8]; + + $results[$ar_buf_b[0]]['tx_bytes'] = $ar_buf_b[4]; + $results[$ar_buf_b[0]]['tx_packets'] = $ar_buf_n[5]; + $results[$ar_buf_b[0]]['tx_errs'] = $ar_buf_n[6]; + $results[$ar_buf_b[0]]['tx_drop'] = $ar_buf_n[8]; + + $results[$ar_buf_b[0]]['errs'] = $ar_buf_n[4] + $ar_buf_n[6]; + $results[$ar_buf_b[0]]['drop'] = $ar_buf_n[8]; + } + } + return $results; + } + // get the ide device information out of dmesg + function ide () { + $results = array(); + + $s = 0; + for ($i = 0, $max = count($this->read_dmesg()); $i < $max; $i++) { + $buf = $this->dmesg[$i]; + if (preg_match('/^(.*) at pciide[0-9] (.*): <(.*)>/', $buf, $ar_buf)) { + $s = $ar_buf[1]; + $results[$s]['model'] = $ar_buf[3]; + $results[$s]['media'] = 'Hard Disk'; + // now loop again and find the capacity + for ($j = 0, $max1 = count($this->read_dmesg()); $j < $max1; $j++) { + $buf_n = $this->dmesg[$j]; + if (preg_match("/^($s): (.*), (.*), (.*)MB, .*$/", $buf_n, $ar_buf_n)) { + $results[$s]['capacity'] = $ar_buf_n[4] * 2048 * 1.049;; + } + } + } + } + asort($results); + return $results; + } + + function distroicon () { + $result = 'OpenBSD.png'; + return($result); + } + +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/module.xml =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/module.xml (revision 10205) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/module.xml (revision 10205) @@ -0,0 +1,65 @@ + + dashboard + System Dashboard + 2.8.0.3 + FreePBX + GPLv2+ + no + no + tool + Basic + + Provides a system information dashboard, showing information about Calls, CPU, Memory, Disks, Network, and processes. + + + FreePBX System Status + FreePBX System Status + + + 2.3.0beta2 + + + *2.8.0.3* #4474 + *2.8.0.2* #4175 (better fix) + *2.8.0.1* #4175 + *2.8.0.0* #4268, #4276, #4283 + *2.7.0.1* #4082, localizations + *2.7.0.0* #3547 + *2.6.0.2* localizations + *2.6.0.1* #3226, #3353 + *2.6.0.0* localizations, misc + *2.5.0.7* #3652, localization updates + *2.5.0.6* #3409, localization fixes, updates + *2.5.0.5* #3404 correction + *2.5.0.4* #3401, #3404 + *2.5.0.3* #3348, localizations + *2.5.0.2* localization string enclosures + *2.5.0.1* #3170, Swedish Translation + *2.5.0* #3134 add amportal DASHBOARD_STATS_UPDATE_TIME, DASHBOARD_INFO_UPDATE_TIME + *2.4.0.3* #2871 do not show Sangoma wanpipe interfaces in the Network Stats + *2.4.0.2* #2701, #2843 add proper JSON header to fix some proxy servers, Russian Translation + *2.4.0.1* #2620 adjust to new format of core_trunks_list(true) + *2.4.0* #2415 1.6 support, #2301, it translation + *0.3.3.3* #2365 don't make readonly disk devices red when 100% + *0.3.3.2* #2469 fix division my zero in cpu usage + *0.3.3.1* Cosmetic fix (#2278 - long mount point paths) + *0.3.3* Improved detection of webserver failing, More MySQL detection fixes + *0.3.2.1* #2246 make FreePBX Connections visible, #2250 check for SSHPORT + *0.3.2* Allow mysql server to be on another host/port (#2229), fix image path problem + *0.3.1* Fix issue with miscounting total registrations, minor styling details + *0.3* Show IP phones and trunks separately (#2209) + *0.2.5.4* make always accessible even in database mode, fix minor javascript bug + *0.2.5.3* remove deprecated javascript call + *0.2.5.2* #2194 don't fail when Asterisk is not running + *0.2.5.1* disable debug logging, make uninstallable + *0.2.5* #2142 fix online phones for Asterisk 1.4 format, #2140 divide by 0 again + *0.2.4* #2133 again, #2140 divide by 0, #2141 with temp log to determine real issue + *0.2.3* #2133 fixed number format error resulting in bogus percentage displays + *0.2.2* #2131 fix Undefined Index warnings + *0.2.1* make module permanent, should not be able to disable + *0.2.0* Add real-time updates + *0.1.0* Initial release + + release/2.8/dashboard-2.8.0.3.tgz + 4c54ae88df6b93bc319e9cfd7de96bea + Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/images/LICENCE =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/images/LICENCE (revision 7633) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/images/LICENCE (revision 7633) @@ -0,0 +1,17 @@ +// This is the license for all files in this dashboard/images directory +// These files are part of FreePBX. +// +// FreePBX is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// FreePBX is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with FreePBX. If not, see . +// +// Copyright 2007 Greg MacLellan Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/functions.inc.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/functions.inc.php (revision 4360) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/functions.inc.php (revision 4360) @@ -0,0 +1,3 @@ + Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/class.average_rate_calculator.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/class.average_rate_calculator.php (revision 7633) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/class.average_rate_calculator.php (revision 7633) @@ -0,0 +1,80 @@ +. +// +// Copyright 2007 Greg MacLellan +// +class average_rate_calculator { + var $_max_age; + var $_values; + + /** Constructor + * @param array A reference to an array to use for storage. This will be populated with key/value pairs that store the time/value, respectively. + * Because it is passed by reference, it can be stored externally in a session or database, allowing persistant use of this object + * across page loads. + * @param int The maximum age of values to store, in seconds + */ + function average_rate_calculator(&$storage_array, $max_age) { + $this->_max_age = $max_age; + if (!is_array($storage_array)) { + $storage_array = array(); + } + $this->_values =& $storage_array; + } + /** Adds a value to the array + * @param float The value to add + * @param int The timestamp to use for this value, defaults to now + */ + function add($value, $timestamp=null) { + if (!$timestamp) $timestamp = time(); + $this->_values[$timestamp] = $value; + } + /** Calculate the average per second value + * @return The average value, as a rate per second + */ + function average() { + $this->_clean(); + + $avgs = array(); + $last_time = false; + $last_val = false; + foreach ($this->_values as $time=>$val) { + if ($last_time) { + $avgs[] = ($val - $last_val) / ($time - $last_time); + } + $last_time = $time; + $last_val = $val; + } + // return the average of all our averages + if ($count = count($avgs)) { + return array_sum($avgs) / $count; + } else { + return 'unknown'; + } + } + /** Clean old values out of the array + */ + function _clean() { + $too_old = time() - $this->_max_age; + + foreach (array_keys($this->_values) as $key) { + if ($key < $too_old) { + unset($this->_values[$key]); + } + } + } +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/page.index.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/page.index.php (revision 10147) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/page.index.php (revision 10147) @@ -0,0 +1,745 @@ +. +// +// Copyright (C) 2006 Astrogen LLC +// + +$dashboard_debug = false; + +$dispnum = 'sysinfo'; //used for switch on config.php +$action = isset($_REQUEST['action'])?$_REQUEST['action']:''; + +$quietmode = isset($_REQUEST['quietmode'])?$_REQUEST['quietmode']:''; +$info = isset($_REQUEST['info'])?$_REQUEST['info']:false; + +$title="FreePBX: Sysinfo Info"; +$message="System Info"; + +if (isset($_REQUEST['showall'])) { + $_SESSION['syslog_showall'] = (bool)$_REQUEST['showall']; +} + +//require_once('functions.inc.php'); + +define('BAR_WIDTH_LEFT', 400); +define('BAR_WIDTH_RIGHT', 200); + +// AJAX update intervals (in seconds) +if (isset($amp_conf['DASHBOARD_STATS_UPDATE_TIME']) && $amp_conf['DASHBOARD_STATS_UPDATE_TIME'] && ctype_digit($amp_conf['DASHBOARD_STATS_UPDATE_TIME'])) { + define('STATS_UPDATE_TIME', $amp_conf['DASHBOARD_STATS_UPDATE_TIME']); +} else { + define('STATS_UPDATE_TIME', 6); // update interval for system information +} +if (isset($amp_conf['DASHBOARD_INFO_UPDATE_TIME']) && $amp_conf['DASHBOARD_INFO_UPDATE_TIME'] && ctype_digit($amp_conf['DASHBOARD_INFO_UPDATE_TIME'])) { + define('INFO_UPDATE_TIME', $amp_conf['DASHBOARD_INFO_UPDATE_TIME']); +} else { + define('INFO_UPDATE_TIME', 30); // update interval for system uptime information +} + +/** draw_graph + * draw a bar graph + * + * $text Title of text + * $real_units Units to display + * $val Value to graph + * $total Total of graph + * $classes CSS classes to use based on value percent + * $show_percent If results should be shown as percent + * $total_width Width of graph + */ + +function draw_graph($text, $real_units, $val, $total = 100, $classes = null, $show_percent = true, $total_width = 200) { + if ($classes == null) { + $classes = array( + 0=>'graphok', + 70=>'graphwarn', + 90=>'grapherror', + ); + } + + $chars_per_pixel = 7; + if (strlen($text) * $chars_per_pixel > $total_width - 35) { + $text_trimmed = substr($text,0, floor(($total_width - 35) / $chars_per_pixel)).'..'; + } else { + $text_trimmed = $text; + } + + $clean_val = preg_replace("/[^0-9\.]*/","",$val); + + if ($total == 0) { + $percent = ($clean_val == 0) ? 0 : 100; + } else { + $percent = round($clean_val/$total*100); + } + + $graph_class = false; + foreach ($classes as $limit=>$class) { + if (!$graph_class) { + $graph_class = $class; + } + if ($limit <= $percent) { + $graph_class = $class; + } else { + break; + } + } + $width = $total_width * ($percent/100); + if ($width > $total_width) { + $width = $total_width; + } + + $tooltip = $text.": ".$val.$real_units." / ".$total.$real_units." (".$percent."%)"; + $display_value = ($show_percent ? $percent."%" : $val.$real_units); + + $out = "
\n"; + $out .= "
\n"; + $out .= "
".$text_trimmed."
\n"; + $out .= "
".$display_value."
\n"; + $out .= "
\n"; + + return $out; +} + +function draw_status_box($text, $status, $tooltip = false, $total_width = 200) { + switch ($status) { + case "ok": + $status_text = _("OK"); + $class = "graphok"; + break; + case "warn": + $status_text = _("Warn"); + $class = "graphwarn"; + break; + case "error": + $status_text = _("ERROR"); + $class = "grapherror"; + break; + case "disabled": + $status_text = _("Disabled"); + $class = ""; + break; + } + if ($tooltip !== false) { + $status_text = ''.$status_text.''; + } + + $out = "
\n"; + $out .= "
".$text."
\n"; + $out .= "
".$status_text."
\n"; + $out .= "
\n"; + + return $out; +} + +function draw_box($text, $value, $total_width = 200) { + $tooltip = $text.": ".$value; + + $out = "
\n"; + $out .= "
".$text."
\n"; + $out .= " \n"; + $out .= "
\n"; + + return $out; +} + +function time_string($seconds) { + if ($seconds == 0) { + return "0 "._("minutes"); + } elseif ($seconds < 60) { + return "$seconds "._("seconds"); + } + + $minutes = floor($seconds / 60); + $seconds = $seconds % 60; + + $hours = floor($minutes / 60); + $minutes = $minutes % 60; + + $days = floor($hours / 24); + $hours = $hours % 24; + + $weeks = floor($days / 7); + $days = $days % 7; + + $output = array(); + if ($weeks) { + $output[] = $weeks." ".($weeks == 1 ? _("week") : _("weeks")); + } + if ($days) { + $output[] = $days." ".($days == 1 ? _("days") : _("days")); + } + if ($hours) { + $output[] = $hours." ".($hours == 1 ? _("hour") : _("hours")); + } + if ($minutes) { + $output[] = $minutes." ".($minutes == 1 ? _("minute") : _("minutes")); + } + + return implode(", ",$output); +} + +function show_sysstats() { + global $sysinfo; + $out = ''; + + $out .= "

"._("System Statistics")."

"; + $out .= "

"._("Processor")."

"; + $loadavg = $sysinfo->loadavg(true); + $out .= draw_box(_("Load Average"), $loadavg['avg'][0]); + $out .= draw_graph(_("CPU"), "", number_format($loadavg['cpupercent'],2), 100); + + $out .= "

"._("Memory")."

"; + $memory = $sysinfo->memory(); + $app_memory = isset($memory["ram"]["app"]) ? $memory["ram"]["app"] : $memory["ram"]["total"] - $memory["ram"]["t_free"]; + $out .= draw_graph(_("App Memory"), "MB", number_format($app_memory/1024,2), $memory["ram"]["total"]/1024); + $out .= draw_graph(_("Swap"), "MB", number_format(($memory["swap"]["total"]-$memory["swap"]["free"])/1024,2), $memory["swap"]["total"]/1024); + + $out .= "

"._("Disks")."

"; + foreach ($sysinfo->filesystems() as $fs) { + $out .= draw_graph($fs["mount"], "GB", number_format($fs["used"]/1024/1024, 2,".",""), number_format($fs["size"]/1024/1024,2,".",""), strpos( $fs["options"],"ro" )!==false ? array(0=>"graphok"):null); + } + + $out .= "

"._("Networks")."

"; + foreach ($sysinfo->network() as $net_name=>$net) { + $net_name = trim($net_name); + if ($net_name == 'lo' || $net_name == 'sit0' || preg_match('/w.g./',$net_name)) continue; + + $tx = new average_rate_calculator($_SESSION["netstats"][$net_name]["tx"], 10); // 30s max age + $rx = new average_rate_calculator($_SESSION["netstats"][$net_name]["rx"], 10); // 30s max age + + $rx->add( $net["rx_bytes"] ); + $tx->add( $net["tx_bytes"] ); + + $out .= draw_box($net_name." "._("receive"), number_format($rx->average()/1000,2)." KB/s"); + $out .= draw_box($net_name." "._("transmit"), number_format($tx->average()/1000,2)." KB/s"); + } + return $out; +} + +function show_aststats() { + global $amp_conf; + global $astinfo; + global $db; + $out = ''; + + $channels = $astinfo->get_channel_totals(); + // figure out max_calls + + // guess at the max calls: number of users + if (!isset($_SESSION["calculated_max_calls"])) { + // set max calls to either MAXCALLS in amportal.conf, or the number of users in the system + if (isset($amp_conf['MAXCALLS'])) { + $_SESSION["calculated_max_calls"] = $amp_conf["MAXCALLS"]; + } else if (function_exists('core_users_list')) { + $_SESSION["calculated_max_calls"] = count(core_users_list()); + } else { + $_SESSION["calculated_max_calls"] = 1; + } + } + // we currently see more calls than we guessed, increase it + if ($channels['total_calls'] > $_SESSION["calculated_max_calls"]) { + $_SESSION["calculated_max_calls"] = $channels['total_calls']; + } + $max_calls = $_SESSION["calculated_max_calls"]; + + $classes = array(0=>'graphok'); + $max_chans = $max_calls * 2; + + $out .= "

"._("FreePBX Statistics")."

"; + $out .= draw_graph(_('Total active calls'), '', $channels['total_calls'], $max_calls, $classes , false, BAR_WIDTH_LEFT); + $out .= draw_graph(_('Internal calls'), '', $channels['internal_calls'], $max_calls, $classes , false, BAR_WIDTH_LEFT); + $out .= draw_graph(_('External calls'), '', $channels['external_calls'], $max_calls, $classes , false, BAR_WIDTH_LEFT); + $out .= draw_graph(_('Total active channels'), '', $channels['total_channels'], $max_chans, $classes , false, BAR_WIDTH_LEFT); + + $out .= "

"._("FreePBX Connections")."

"; + + /* This is generally very bad style, and we should look at adding this to core_devices_list or another core + * function. However, since this is in Ajax lite weight code, it is currently the cleanest way to get the sip and iax2 + * devices in a hash format that we would like to pass to the class + */ + $sql = "SELECT `id` FROM `devices` WHERE `tech` IN ('sip', 'iax2')"; + $devices = $db->getCol($sql); + if(DB::IsError($devices)) { + $devices = false; + } else { + $devices = array_flip($devices); + } + + $conns = $astinfo->get_connections( $devices ); + + if ($conns['users_total'] > 0) { + $out .= draw_graph(_('IP Phones Online'), '', $conns['users_online'], $conns['users_total'], $classes, false, BAR_WIDTH_LEFT); + } + if ($conns['trunks_total'] > 0) { + $out .= draw_graph(_('IP Trunks Online'), '', $conns['trunks_online'], $conns['trunks_total'], $classes, false, BAR_WIDTH_LEFT); + } + if ($conns['registrations_total'] > 0) { + $out .= draw_graph(_('IP Trunk Registrations'), '', $conns['registrations_online'], $conns['registrations_total'], $classes, false, BAR_WIDTH_LEFT); + } + + return $out; +} + +function show_sysinfo() { + global $sysinfo; + global $astinfo; + $out = "

"._("Uptime")."


"; + $out .= ''; + /* + $out .= ''; + $out .= ''; + $cpu = $sysinfo->cpu_info(); + $out .= ''; + */ + + $out .= ''; + $ast_uptime = $astinfo->get_uptime(); + if (empty($ast_uptime['system'])) { + $ast_uptime['system'] = time_string(0); + } + if (empty($ast_uptime['reload'])) { + $ast_uptime['reload'] = time_string(0); + } + $out .= ''; + $out .= ''; + + $out .= '
Distro:'.$sysinfo->distro().'
Kernel:'.$sysinfo->kernel().'
CPU:'.$cpu['model'].' '.$cpu['cpuspeed'].'
'._('System Uptime').':'.time_string($sysinfo->uptime()).'
'._('Asterisk Uptime').':'.$ast_uptime['system'].'
'._('Last Reload').':'.$ast_uptime['reload'].'
'; + return $out; +} + +function show_procinfo() { + global $procinfo; + global $astinfo; + global $amp_conf; + $out = ''; + + $out .= "

"._("Server Status")."

"; + // asterisk + if ($astver = $astinfo->check_asterisk()) { + $out .= draw_status_box(_("Asterisk"), "ok", sprintf(_('Asterisk is running: %s'),$astver)); + } else { + $out .= draw_status_box(_("Asterisk"), "error", _('Asterisk is not running, this is a critical service!')); + } + + // asterisk proxy (optionally) + if (isset($amp_conf['ASTMANAGERPROXYPORT'])) { + if ($procinfo->check_port($amp_conf['ASTMANAGERPROXYPORT'])) { + $out .= draw_status_box(_("Manager Proxy"), "ok", _('Asterisk Manager Proxy is running')); + } else { + $out .= draw_status_box(_("Manager Proxy"), "warn", _('Asterisk Manager Proxy is not running, FreePBX will fall back to using Asterisk directly, which may result in poor performance')); + } + } + + // fop + if(!$amp_conf['FOPDISABLE']) { + if ($procinfo->check_fop_server()) { + $out .= draw_status_box(_("Op Panel"), "ok", _('FOP Operator Panel Server is running')); + } else { + if ($amp_conf['FOPRUN']) { + // it should be running + $out .= draw_status_box(_("Op Panel"), "warn", _('FOP Operator Panel Server is not running, you will not be able to use the operator panel, but the system will run fine without it.')); + } else { + $out .= draw_status_box(_("Op Panel"), "disabled", _('FOP Operator Panel is disabled in amportal.conf')); + } + } + } + + // mysql + if ($amp_conf['AMPDBENGINE'] == "mysql") { + /* this is silly- it's always running, if the web interface loads + if ($procinfo->check_mysql($amp_conf['AMPDBHOST'])) { + $out .= draw_status_box(_("MySQL"), "ok", _('MySQL Server is running')); + } else { + $out .= draw_status_box(_("MySQL"), "error", _('MySQL Server is not running, this is a critical service for the web interface and call logs!')); + } + */ + $out .= draw_status_box(_("MySQL"), "ok", _('MySQL Server is running')); + } + + // web always runs .. HOWEVER, we can turn it off with dhtml + $out .= draw_status_box(_("Web Server"), "ok", _('Web Server is running')); + + // ssh + $ssh_port = (isset($amp_conf['SSHPORT']) && ctype_digit($amp_conf['SSHPORT']) && ($amp_conf['SSHPORT'] > 0) && ($amp_conf['SSHPORT'] < 65536))?$amp_conf['SSHPORT']:22; + if ($procinfo->check_port($ssh_port)) { + $out .= draw_status_box(_("SSH Server"), "ok", _('SSH Server is running')); + } else { + $out .= draw_status_box(_("SSH Server"), "warn", _('SSH Server is not running, you will not be able to connect to the system console remotely')); + } + return $out; +} + +function show_syslog(&$md5_checksum) { + global $db; + $out = ''; + $checksum = ''; + + // notify_classes are also used as the image names + $notify_classes = array( + NOTIFICATION_TYPE_CRITICAL => 'notify_critical', + NOTIFICATION_TYPE_SECURITY => 'notify_security', + NOTIFICATION_TYPE_UPDATE => 'notify_update', + NOTIFICATION_TYPE_ERROR => 'notify_error', + NOTIFICATION_TYPE_WARNING => 'notify_warning', + NOTIFICATION_TYPE_NOTICE => 'notify_notice', + ); + $notify_descriptions = array( + NOTIFICATION_TYPE_CRITICAL => _('Critical Error'), + NOTIFICATION_TYPE_SECURITY => _('Security Update'), + NOTIFICATION_TYPE_UPDATE => _('Update'), + NOTIFICATION_TYPE_ERROR => _('Error'), + NOTIFICATION_TYPE_WARNING => _('Warning'), + NOTIFICATION_TYPE_NOTICE => _('Notice'), + ); + + $notify =& notifications::create($db); + + $showall = (isset($_SESSION['syslog_showall']) ? $_SESSION['syslog_showall'] : false); + + $items = $notify->list_all($showall); + + $out .= "

"._("FreePBX Notices")."

"; + + if (count($items)) { + $out .= '
    '; + foreach ($items as $item) { + $checksum .= $item['module'].$item['id']; // checksum, so it is only updated on the page if this has changed + + $domid = "notify_item_".str_replace(' ','_',$item['module']).'_'.str_replace(' ','_',$item['id']); + + $out .= "\n"; + $out .= '
  •  '; + $out .= $item['display_text'].''; + $out .= ''; + $out .= "\n"; + $out .= '
    '; + if (isset($item['candelete']) && $item['candelete']) { + $out .= ''. + ''._('Delete this').''; + } + if (!$item['reset']) { + $out .= ''. + ''._('Ignore this').''; + } + $out .= '
    '; + $out .= ''; + $out .= "\n"; + $out .= '
    '; + $out .= nl2br($item['extended_text']); + $out .= '
    '.sprintf(_('Added %s ago'), time_string(time() - $item['timestamp'])).'
    '. + '('.$item['module'].'.'.$item['id'].')
    '; + $out .= '
    '; + + $out .= '
  • '; + } + $out .= '
'; + } else { + if ($showall) { + $out .= _('No notifications'); + } else { + $out .= _('No new notifications'); + } + } + + $md5_checksum = md5($checksum); + + $out .= '
'; + + if ($showall) { + $out .= ''._('show new').''; + } else { + $out .= ''._('show all').''; + } + $out .= '
'; + return $out; +} + +function do_syslog_ack() { + global $db; + $notify =& notifications::create($db); + + if (isset($_REQUEST['module']) && $_REQUEST['id']) { + $notify->reset($_REQUEST['module'], $_REQUEST['id']); + } +} +function do_syslog_delete() { + global $db; + $notify =& notifications::create($db); + + if (isset($_REQUEST['module']) && $_REQUEST['id']) { + var_dump($_REQUEST); + $notify->safe_delete($_REQUEST['module'], $_REQUEST['id']); + } +} + +/********************************************************************************************/ + + +define("IN_PHPSYSINFO", "1"); +define("APP_ROOT", dirname(__FILE__).'/phpsysinfo'); +include APP_ROOT."/common_functions.php"; +include APP_ROOT."/class.".PHP_OS.".inc.php"; +include_once "common/json.inc.php"; +include dirname(__FILE__)."/class.astinfo.php"; +include dirname(__FILE__)."/class.average_rate_calculator.php"; +include dirname(__FILE__)."/class.procinfo.php"; +include dirname(__FILE__)."/class.error.inc.php"; + +$error = new Error; + + +$sysinfo = new sysinfo; +$astinfo = new astinfo($astman); +$procinfo = new procinfo; + + +if (!$quietmode) { + ?> + + + +

+ +
+
+ '; + + // regular page + echo '
'; + echo show_syslog($syslog_md5); + // syslog_md5 is used by javascript updateInfo() to determine if the syslog div contents have changed + echo ''; + //echo "log goes here


"; + echo '
'; + + echo '
'; + echo show_aststats(); + echo '
'; + + echo '
'; + echo show_sysinfo(); + echo '
'; + + + echo '
'; + + echo '
'; + echo show_sysstats(); + echo '
'; + + echo '
'; + echo show_procinfo(); + echo '
'; + + echo '
'; + echo '
'; // #sysinfo-right, #dashboard + echo '
 
'; + + if($dashboard_debug && $error->ErrorsExist()) { + $fh = fopen($amp_conf['ASTLOGDIR']."/dashboard-error.log","a"); + fwrite($fh, $error->ErrorsAsText()); + fclose($fh); + } + +} else { + // Handle AJAX updates + + switch ($info) { + case "sysstats": + echo show_sysstats(); + break; + case "aststats": + echo show_aststats(); + break; + case "procinfo": + echo show_procinfo(); + break; + case 'sysinfo': + echo show_sysinfo(); + break; + case 'syslog': + echo show_syslog($syslog_md5); + // syslog_md5 is used by javascript updateInfo() to determine if the syslog div contents have changed + echo ''; + break; + case 'syslog_ack': + do_syslog_ack(); + break; + case 'syslog_delete': + do_syslog_delete(); + break; + + case 'info': + $json = new Services_JSON(); + header("Content-type: application/json"); + echo $json->encode( + array( + 'procinfo'=>show_procinfo(), + 'sysinfo'=>show_sysinfo(), + 'syslog'=>show_syslog($syslog_md5), + 'syslog_md5'=>$syslog_md5, + ) + ); + break; + case 'stats': + $json = new Services_JSON(); + header("Content-type: application/json"); + echo $json->encode( + array( + 'sysstats'=>show_sysstats(), + 'aststats'=>show_aststats(), + ) + ); + break; + case 'all': + $json = new Services_JSON(); + header("Content-type: application/json"); + echo $json->encode( + array( + 'sysstats'=>show_sysstats(), + 'aststats'=>show_aststats(), + 'procinfo'=>show_procinfo(), + 'sysinfo'=>show_sysinfo(), + 'syslog'=>show_syslog(), + ) + ); + break; + } +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/class.procinfo.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/class.procinfo.php (revision 8935) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/class.procinfo.php (revision 8935) @@ -0,0 +1,45 @@ +distro = $distro; + } + + function check_port($port, $server = "localhost") { + $timeout = 5; + if ($sock = @fsockopen($server, $port, $errno, $errstr, $timeout)) { + fclose($sock); + return true; + } + return false; + } + + function check_fop_server() { + global $amp_conf; + $fop_settings = parse_ini_file($amp_conf['FOPWEBROOT'].'/op_server.cfg'); + if (is_array($fop_settings)) { + $listen_port = isset($fop_settings['listen_port']) && trim($fop_settings['listen_port']) != ''?$fop_settings['listen_port']:4445; + } else { + $listen_port = 4445; + } + + return $this->check_port($listen_port); + } + + function check_mysql($hoststr) { + $host = 'localhost'; + $port = '3306'; + if (preg_match('/^([^:]+)(:(\d+))?$/',$hoststr,$matches)) { + // matches[1] = host, [3] = port + $host = $matches[1]; + if (!empty($matches[3])) { + $port = $matches[3]; + } + } + return $this->check_port($port, $host); + } +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/class.error.inc.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/class.error.inc.php (revision 7633) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/class.error.inc.php (revision 7633) @@ -0,0 +1,143 @@ +arrErrorList[$this->errors]['command'] = $strCommand; + $this->arrErrorList[$this->errors]['message'] = $strMessage; + $this->arrErrorList[$this->errors]['line'] = $intLine; + $this->arrErrorList[$this->errors]['file'] = basename( $strFile ); + $this->errors++; + } + + /** + * + * ErrorsAsHTML() + * + * @param - + * + * @return string string which contains a HTML table which can be used to echo out the errors + * + **/ + function ErrorsAsHTML() { + $strHTMLString = ""; + $strWARNString = ""; + $strHTMLhead = "\n" + . " \n" + . " \n" + . " \n" + . " \n" + . " \n" + . " \n"; + $strHTMLfoot = "
FileLineCommandMessage
"; + + if( $this->errors > 0 ) { + foreach( $this->arrErrorList as $arrLine ) { + if( $arrLine['command'] == "WARN" ) { + $strWARNString .= "WARNING: " . htmlspecialchars( $arrLine['message'] ) . "
\n"; + } else { + $strHTMLString .= " \n" + . " " . htmlspecialchars( $arrLine['file'] ) . "\n" + . " " . $arrLine['line'] . "\n" + . " " . htmlspecialchars( $arrLine['command'] ) . "\n" + . " " . htmlspecialchars( $arrLine['message'] ) . "\n" + . " \n"; + } + } + } + + if( !empty( $strHTMLString ) ) { + $strHTMLString = $strWARNString . $strHTMLhead . $strHTMLString . $strHTMLfoot; + } else { + $strHTMLString = $strWARNString; + } + + return $strHTMLString; + } + + /** + * + * ErrorsAsText() + * + * @param - + * + * @return string string which contains a table which can be used to echo out the errors + * + **/ + function ErrorsAsText() { + $strHTMLString = ""; + $strWARNString = ""; + $strHTMLhead = sprintf("%24s %6s %40s %s\n","File", "Line", "Command", "Message"); + $strHTMLfoot = "\n"; + + if( $this->errors > 0 ) { + foreach( $this->arrErrorList as $arrLine ) { + if( $arrLine['command'] == "WARN" ) { + $strWARNString .= "WARNING: " . $arrLine['message'] . "\n"; + } else { + $strHTMLString .= sprintf("%24s %6s %40s %s\n",$arrLine['file'], $arrLine['line'], $arrLine['command'], $arrLine['message'] ); + } + } + } + + if( !empty( $strHTMLString ) ) { + $strHTMLString = $strWARNString . $strHTMLhead . $strHTMLString . $strHTMLfoot; + } else { + $strHTMLString = $strWARNString; + } + + return $strHTMLString; + } + + /** + * + * ErrorsExist() + * + * @param - + * + * @return true there are errors logged + * false no errors logged + * + **/ + function ErrorsExist() { + if( $this->errors > 0 ) { + return true; + } else { + return false; + } + } +} +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/class.astinfo.php =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/class.astinfo.php (revision 8096) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/class.astinfo.php (revision 8096) @@ -0,0 +1,278 @@ +astman =& $astman; + $arr = engine_getinfo(); + $this->version = $arr['version']; + } + + function get_channel_totals() { + if (!$this->astman) { + return array( + 'external_calls'=>0, + 'internal_calls'=>0, + 'total_calls'=>0, + 'total_channels'=>0, + ); + } + if (version_compare($this->version, "1.6", "ge")) { + $response = $this->astman->send_request('Command',array('Command'=>"core show channels")); + } else { + $response = $this->astman->send_request('Command',array('Command'=>"show channels")); + } + $astout = explode("\n",$response['data']); + + $external_calls = 0; + $internal_calls = 0; + $total_calls = 0; + $total_channels = 0; + + foreach ($astout as $line) { + if (preg_match('/s@macro-dialout/', $line)) { + $external_calls++; + } else if (preg_match('/s@macro-dial:/', $line)) { + $internal_calls++; + } else if (preg_match('/^(\d+) active channel/i', $line, $matches)) { + $total_channels = $matches[1]; + } else if (preg_match('/^(\d+) active call/i', $line, $matches)) { + $total_calls = $matches[1]; + } + } + return array( + 'external_calls'=>$external_calls, + 'internal_calls'=>$internal_calls, + 'total_calls'=>$total_calls, + 'total_channels'=>$total_channels, + ); + } + + function get_connections($devices = false) { + if (!$devices) { + $devices = array(); + } + + $return = array( + 'sip_users_online' => 0, + 'sip_users_offline' => 0, + 'sip_users_total' => 0, + 'sip_trunks_online' => 0, + 'sip_trunks_offline' => 0, + 'sip_trunks_total' => 0, + 'sip_registrations_online' => 0, + 'sip_registrations_offline' => 0, + 'sip_registrations_total' => 0, + + + 'iax2_users_online' => 0, + 'iax2_users_offline' => 0, + 'iax2_users_total' => 0, + 'iax2_trunks_online' => 0, + 'iax2_trunks_offline' => 0, + 'iax2_trunks_total' => 0, + 'iax2_registrations_online' => 0, + 'iax2_registrations_offline' => 0, + 'iax2_registrations_total' => 0, + + //totals + 'users_online' => 0, + 'users_offline' => 0, + 'users_total' => 0, + 'trunks_online' => 0, + 'trunks_offline' => 0, + 'trunks_total' => 0, + 'registrations_online' => 0, + 'registrations_offline' => 0, + 'registrations_total' => 0, + ); + + if (!$this->astman) { + return $return; + } + + $response = $this->astman->send_request('Command',array('Command'=>"sip show peers")); + $astout = explode("\n",$response['data']); + foreach ($astout as $line) { + if (preg_match('/^(([a-z0-9\-_]+)(\/([a-z0-9\-_]+))?)\s+(\([a-z]+\)|\d{1,3}(\.\d{1,3}){3})/i', $line, $matches)) { + //matches: [2] = name, [4] = username, [5] = host, [6] = part of ip (if IP) + + // have an IP address listed, so its online + $online = !empty($matches[6]); + + if (!isset($devices[$matches[2]])) { + // this is a trunk + //TODO match trunk tech as well? + $return['sip_trunks_'.($online?'online':'offline')]++; + } else { + $return['sip_users_'.($online?'online':'offline')]++; + } + } + } + + + $response = $this->astman->send_request('Command',array('Command'=>"sip show registry")); + $astout = explode("\n",$response['data']); + $pos = false; + foreach ($astout as $line) { + if (trim($line) != '') { + if ($pos===false) { + // find the position of "State" in the first line + $pos = strpos($line,"State"); + } else { + // subsequent lines, check if it says "Registered" at that position + if (substr($line,$pos,10) == "Registered") { + $return['sip_registrations_online']++; + } elseif (strlen($line) > $pos) { + $return['sip_registrations_offline']++; + } + } + } + } + + $response = $this->astman->send_request('Command',array('Command'=>"iax2 show peers")); + $astout = explode("\n",$response['data']); + foreach ($astout as $line) { + if (preg_match('/^(([a-z0-9\-_]+)(\/([a-z0-9\-_]+))?)\s+(\([a-z]+\)|\d{1,3}(\.\d{1,3}){3})/i', $line, $matches)) { + //matches: [2] = name, [4] = username, [5] = host, [6] = part of ip (if IP) + + // have an IP address listed, so its online + $online = !empty($matches[6]); + + if (!isset($devices[$matches[2]])) { + // this is a trunk + //TODO match trunk tech as well? + $return['iax2_trunks_'.($online?'online':'offline')]++; + } else { + $return['iax2_users_'.($online?'online':'offline')]++; + } + } + } + + + $response = $this->astman->send_request('Command',array('Command'=>"iax2 show registry")); + $astout = explode("\n",$response['data']); + $pos = false; + foreach ($astout as $line) { + if (trim($line) != '') { + if ($pos===false) { + // find the position of "State" in the first line + $pos = strpos($line,"State"); + } else { + // subsequent lines, check if it syas "Registered" at that position + if (substr($line,$pos,10) == "Registered") { + $return['iax2_registrations_online']++; + } elseif (strlen($line) > $pos) { + $return['iax2_registrations_offline']++; + } + } + } + } + + $return['sip_users_total'] = $return['sip_users_online'] + $return['sip_users_offline']; + $return['sip_trunks_total'] = $return['sip_trunks_online'] + $return['sip_trunks_offline']; + $return['sip_registrations_total'] = $return['sip_registrations_online'] + $return['sip_registrations_offline']; + + $return['iax2_users_total'] = $return['iax2_users_online'] + $return['iax2_users_offline']; + $return['iax2_trunks_total'] = $return['iax2_trunks_online'] + $return['iax2_trunks_offline']; + $return['iax2_registrations_total'] = $return['iax2_registrations_online'] + $return['iax2_registrations_offline']; + + $return['users_online'] = $return['sip_users_online'] + $return['iax2_users_online']; + $return['users_offline'] = $return['sip_users_offline'] + $return['iax2_users_offline']; + $return['users_total'] = $return['users_online'] + $return['users_offline']; + + $return['trunks_online'] = $return['sip_trunks_online'] + $return['iax2_trunks_online']; + $return['trunks_offline'] = $return['sip_trunks_offline'] + $return['iax2_trunks_offline']; + $return['trunks_total'] = $return['trunks_online'] + $return['trunks_offline']; + + $return['registrations_online'] = $return['sip_registrations_online'] + $return['iax2_registrations_online']; + $return['registrations_offline'] = $return['sip_registrations_offline'] + $return['iax2_registrations_offline']; + $return['registrations_total'] = $return['registrations_online'] + $return['registrations_offline']; + + return $return; + } + + function get_uptime() { + /* + System uptime: 1 week, 4 days, 22 hours, 29 minutes, 21 seconds + Last reload: 1 week, 1 day, 6 hours, 14 minutes, 49 seconds + */ + $output = array( + 'system' => '', + 'reload' => '', + ); + + if (!$this->astman) { + return $output; + } + + if (version_compare($this->version, "1.6", "ge")) { + $response = $this->astman->send_request('Command',array('Command'=>"core show uptime")); + } else { + $response = $this->astman->send_request('Command',array('Command'=>"show uptime")); + } + $astout = explode("\n",$response['data']); + + + // Only translate and do the preg_replace if in another language, since it is a somewhat expensive operation + // + if (!isset($_COOKIE['lang']) || $_COOKIE['lang'] == "en_US") { + $translate = false; + } else { + $translate = true; + $units = array( + '/\bseconds\b/', '/\bsecond\b/', + '/\bminutes\b/', '/\bminute\b/', + '/\bhours\b/', '/\bhour\b/', + '/\bdays\b/', '/\bday\b/', + '/\bweeks\b/', '/\bweek\b/', + '/\byears\b/', '/\byear\b/', + ); + $tunits = array( + _('seconds'), _('second'), + _('minutes'), _('minute'), + _('hours'), _('hour'), + _('days'), _('day'), + _('weeks'), _('week'), + _('years'), _('year'), + ); + } + foreach ($astout as $line) { + if (preg_match('/^System uptime: (.*)$/i',$line,$matches)) { + $output["system"] = preg_replace('/,\s+(\d+ seconds?)?\s*$/', '', $matches[1]); + if ($translate) { + $output["system"] = preg_replace($units,$tunits,$output["system"]); + } + } else if (preg_match('/^Last reload: (.*)$/i',$line,$matches)) { + $output["reload"] = preg_replace('/,\s+(\d+ seconds?)?\s*$/', '', $matches[1]); + if ($translate) { + $output["reload"] = preg_replace($units,$tunits,$output["reload"]); + } + } + } + + return $output; + } + + function check_asterisk() { + if (!$this->astman) { + return false; + } + if (version_compare($this->version, "1.6", "ge")) { + $response = $this->astman->send_request('Command',array('Command'=>"core show version")); + } else { + $response = $this->astman->send_request('Command',array('Command'=>"show version")); + } + $astout = explode("\n",$response['data']); + + if (!preg_match('/^Asterisk /i', $astout[1])) { + return false; + } else { + return $astout[1]; + } + } +} + +?> Index: freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/dashboard.css =================================================================== --- freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/dashboard.css (revision 10204) +++ freepbx/tags/2.9.0alpha1/amp_conf/htdocs/admin/modules/dashboard/dashboard.css (revision 10204) @@ -0,0 +1,152 @@ +#dashboard { + position:relative; +} + +/* two columns, sizes of each category box */ +#sysinfo-left, #sysinfo-left .infobox { + width:400px; + float: left; +} + +#sysinfo-right { + float: left; + width:200px; + padding-left: 30px; +} +#sysinfo-right .infobox { + width:200px; +} +#sysinfo-bot{ + clear:both; +} +/* main container for each category of items */ +.infobox { + border:1px solid black; + padding:0 5px 5px 5px; + margin-bottom:1em; + background:white; + background-image:url(images/dashboard-sysinfo.png); + background-repeat:repeat-x; + color: #333; +} + +#procinfo.infobox { + margin-bottom: 0px; +} + +/* headings */ +.infobox h4 , .infobox h3 { + margin-bottom:8px; + margin-top:5px; +} +.infobox h3 { + color: white; +} + +/* main container for each item */ +.databox { + position:relative; + border:1px solid #ccc; + font-size:9pt; + margin-top:4px; +} +/* height of main container and actual bar graph */ +.databox , .graphbox .bargraph { + height:12pt; +} +/* positioning of data title */ +.databox .dataname { + position:absolute; + top:1pt; + left:2px; +} +/* positioning of the value shown in boxes */ +.databox .datavalue { + position:absolute; + top:1pt; + right:2px; +} + +/* graph colors */ +.databox .graphok { + background:#0d0; +} +.databox .graphwarn { + background:yellow; +} +.databox .grapherror { + background:red; +} + +/* modifier for graph* classes, when inside a "status box" */ +.statusbox .datavalue { + width:60px; + text-align:center; + font-weight:Bold; +} + +#sysinfo table th { + text-align:right; +} + + +#syslog ul { + list-style-type:none; + padding-left:0; + margin:0; +} +#syslog ul li { + position:relative; + margin-bottom:0.2em; + border-bottom:1px dashed #ccc; + margin-top:1px; + color:#333; +} +#syslog ul li>div { + padding-left:2px; +} +#syslog ul li .notification_buttons { + position:absolute; + right:0; + top:0; +} +#syslog ul li .notification_buttons a { + cursor:pointer; +} +#syslog ul li.notify_critical>div, #syslog ul li.notify_security>div { + /*background:#F7181C;*/ + background:#f6921d; +} +#syslog ul li.notify_critical h4, #syslog ul li.notify_security h4 { + color:white; +} +/* + +/* +#syslog .notify_ignore_btn { + background-image:url(images/notify_delete.png); + background-repeat:no-repeat; + width:16px; + height:16px; + display:inline; +} +*/ + +#syslog h4 { + margin:0; + font-weight:normal; +} +#syslog h4 span { + cursor:pointer; +} +/* hide details by default */ +#syslog div.syslog_detail { + display:none; + font-size:75%; + height:7em; + overflow:auto; +} +#syslog div.syslog_detail span { + font-style:italic; +} +