├── .gitignore ├── image ├── stop.png ├── user_thief.png ├── 84x35-doar-azul.gif └── project-support.jpg ├── template ├── index.html ├── template_custom.html └── monast.html ├── lib ├── yui-2.9.0 │ └── build │ │ ├── assets │ │ └── skins │ │ │ └── sam │ │ │ └── sprite.png │ │ ├── menu │ │ └── assets │ │ │ └── skins │ │ │ └── sam │ │ │ ├── menuitem_submenuindicator.png │ │ │ └── menu.css │ │ ├── fonts │ │ └── fonts-min.css │ │ ├── button │ │ └── assets │ │ │ └── skins │ │ │ └── sam │ │ │ └── button.css │ │ ├── cookie │ │ └── cookie-min.js │ │ ├── container │ │ └── assets │ │ │ └── skins │ │ │ └── sam │ │ │ └── container.css │ │ ├── tabview │ │ ├── assets │ │ │ └── skins │ │ │ │ └── sam │ │ │ │ └── tabview.css │ │ └── tabview-min.js │ │ ├── yahoo │ │ └── yahoo-min.js │ │ ├── element │ │ └── element-min.js │ │ ├── animation │ │ └── animation-min.js │ │ └── event │ │ └── event-min.js ├── include.php ├── config.php └── util.php ├── contrib ├── freebsd │ └── monast ├── init.d │ ├── rc.gentoo.monast │ ├── rc.redhat.monast │ ├── rc.debian.monast │ └── rc.suse.monast ├── slackware │ └── rc.monast └── copy_yui.py ├── pymon ├── simplejson │ ├── tool.py │ ├── scanner.py │ ├── __init__.py │ └── decoder.py └── monast.conf.sample ├── README ├── INSTALL ├── LICENSE ├── action.php ├── install.sh ├── login.php ├── index.php ├── status.php ├── css └── styles.css ├── js ├── md5.js ├── lang.en.js ├── lang.ru_RU.js └── lang.pt_BR.js └── monast.php /.gitignore: -------------------------------------------------------------------------------- 1 | .buildpath 2 | .project 3 | .pydevproject 4 | .settings 5 | *.pyc 6 | -------------------------------------------------------------------------------- /image/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dagmoller/monast/HEAD/image/stop.png -------------------------------------------------------------------------------- /image/user_thief.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dagmoller/monast/HEAD/image/user_thief.png -------------------------------------------------------------------------------- /template/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dagmoller/monast/HEAD/template/index.html -------------------------------------------------------------------------------- /image/84x35-doar-azul.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dagmoller/monast/HEAD/image/84x35-doar-azul.gif -------------------------------------------------------------------------------- /image/project-support.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dagmoller/monast/HEAD/image/project-support.jpg -------------------------------------------------------------------------------- /lib/yui-2.9.0/build/assets/skins/sam/sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dagmoller/monast/HEAD/lib/yui-2.9.0/build/assets/skins/sam/sprite.png -------------------------------------------------------------------------------- /lib/yui-2.9.0/build/menu/assets/skins/sam/menuitem_submenuindicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dagmoller/monast/HEAD/lib/yui-2.9.0/build/menu/assets/skins/sam/menuitem_submenuindicator.png -------------------------------------------------------------------------------- /lib/yui-2.9.0/build/fonts/fonts-min.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 2.9.0 6 | */ 7 | body{font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small}select,input,textarea,button{font:99% arial,helvetica,clean,sans-serif}table{font-size:inherit;font:100%}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%} -------------------------------------------------------------------------------- /contrib/freebsd/monast: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # PROVIDE: monast 4 | # REQUIRE: DAEMON 5 | # BEFORE: LOGIN 6 | # KEYWORD: shutdown 7 | # 8 | # Add the following line to /etc/rc.conf to enable the monast daemon: 9 | # 10 | # monast_enable="YES" 11 | # 12 | 13 | . /etc/rc.subr 14 | 15 | monast_enable=${monast_enable:-"NO"} 16 | 17 | name=monast 18 | rcvar=`set_rcvar` 19 | 20 | command="/usr/local/monast/monast.py" 21 | pidfile="/var/run/${name}.pid" 22 | 23 | load_rc_config ${name} 24 | 25 | start_cmd=start_func 26 | stop_cmd=stop_func 27 | 28 | start_func() 29 | { 30 | $command --daemon 31 | } 32 | 33 | stop_func() 34 | { 35 | kill -9 `cat ${pidfile}` 36 | } 37 | 38 | run_rc_command "$1" 39 | -------------------------------------------------------------------------------- /contrib/init.d/rc.gentoo.monast: -------------------------------------------------------------------------------- 1 | #!/sbin/runscript 2 | # Copyright 1999-2007 Gentoo Foundation 3 | # Distributed under the terms of the GNU General Public License v2 4 | # $Id: rc.gentoo.monast 239270 2011-09-01 02:50:36Z anest $ 5 | 6 | MONARGS=--daemon 7 | MONLOG=/var/log/monast.log 8 | pidfile=/var/run/monast.pid 9 | MONAST=/opt/monast/monast.py 10 | 11 | 12 | depend() { 13 | after apache2 14 | } 15 | 16 | start() { 17 | ebegin "Starting MonAst daemon" 18 | start-stop-daemon --start --oknodo --exec $MONAST -- $MONARGS > /dev/null 2> /dev/null 19 | eend $? "Failed to start MonAst" 20 | } 21 | 22 | stop() { 23 | ebegin "Stopping MonAst daemon" 24 | start-stop-daemon --stop --pidfile "$pidfile" --quiet $MONAST 25 | sleep 1 26 | rm -f $pidfile 27 | eend $? "Failed to stop MonAst" 28 | } 29 | 30 | -------------------------------------------------------------------------------- /contrib/slackware/rc.monast: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # /etc/rc.d/rc.httpd 4 | # 5 | # Start/stop/restart/graceful[ly restart]/graceful[ly]-stop 6 | # the Apache (httpd) web server. 7 | # 8 | # To make Apache start automatically at boot, make this 9 | # file executable: chmod 755 /etc/rc.d/rc.httpd 10 | # 11 | # For information on these options, "man apachectl". 12 | 13 | if [ -f /usr/bin/monast ]; then 14 | MONAST=/usr/bin/monast 15 | elif [ -f /opt/monast/pymon/monast.py ]; then 16 | MONAST=/opt/monast/pymon/monast.py 17 | fi 18 | 19 | case "$1" in 20 | 'start') 21 | $MONAST --daemon 22 | ;; 23 | 'stop') 24 | kill -TERM $(cat /var/run/monast.pid) 25 | ;; 26 | 'restart') 27 | kill -TERM $(cat /var/run/monast.pid) 28 | $MONAST --daemon 29 | ;; 30 | 'reload') 31 | kill -HUP $(cat /var/run/monast.pid) 32 | ;; 33 | *) 34 | echo "Usage: $0 {start|stop|restart|reload}" 35 | ;; 36 | esac 37 | 38 | -------------------------------------------------------------------------------- /pymon/simplejson/tool.py: -------------------------------------------------------------------------------- 1 | r"""Command-line tool to validate and pretty-print JSON 2 | 3 | Usage:: 4 | 5 | $ echo '{"json":"obj"}' | python -m simplejson.tool 6 | { 7 | "json": "obj" 8 | } 9 | $ echo '{ 1.2:3.4}' | python -m simplejson.tool 10 | Expecting property name: line 1 column 2 (char 2) 11 | 12 | """ 13 | import sys 14 | import simplejson 15 | 16 | def main(): 17 | if len(sys.argv) == 1: 18 | infile = sys.stdin 19 | outfile = sys.stdout 20 | elif len(sys.argv) == 2: 21 | infile = open(sys.argv[1], 'rb') 22 | outfile = sys.stdout 23 | elif len(sys.argv) == 3: 24 | infile = open(sys.argv[1], 'rb') 25 | outfile = open(sys.argv[2], 'wb') 26 | else: 27 | raise SystemExit(sys.argv[0] + " [infile [outfile]]") 28 | try: 29 | obj = simplejson.load(infile) 30 | except ValueError, e: 31 | raise SystemExit(e) 32 | simplejson.dump(obj, outfile, sort_keys=True, indent=4) 33 | outfile.write('\n') 34 | 35 | 36 | if __name__ == '__main__': 37 | main() 38 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Before playing with Monast you must install a couple of things in 2 | your system (with administrator privileges). Make sure to have both 3 | PHP5 and Python2.4+ installed. 4 | 5 | Copy the sample file named monast.conf.sample from the pymon/ 6 | directory to /etc/monast.conf and edit it properly as documented 7 | inside of this file. Do some tests with your Asterisk Manager 8 | Interface user before trying it out, maybe it's your fault and not 9 | Monast's. You can then execute the monast.py script located in the 10 | pymon/ directory as well. You should see a bunch of log messages 11 | confirming the AMI login and start receiving events. 12 | 13 | Monast has been successfully tested under many Linux distributions 14 | (like Slackware, CentOS and Mandriva) and also on MacOS X. 15 | * Requires Twisted Python (http://twistedmatrix.com) 16 | Starpy (http://www.vrplumber.com/programming/starpy/) 17 | See INSTALL file. 18 | 19 | Monast webpage is located at and it's licenced 20 | under BSD. It has been created by Diego Aguirre (DagMoller). 21 | -------------------------------------------------------------------------------- /contrib/init.d/rc.redhat.monast: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # chkconfig: - 91 60 4 | # description: Monast Asterisk Monitor 5 | # 6 | # processname: monast 7 | # config: /etc/monast.conf 8 | 9 | # source function library 10 | . /etc/rc.d/init.d/functions 11 | 12 | RETVAL=0 13 | 14 | prog="monast" 15 | 16 | if [ -f /usr/bin/monast ]; then 17 | MONAST=/usr/bin/monast 18 | elif [ -f /opt/monast/monast.py ]; then 19 | MONAST=/opt/monast/monast.py 20 | fi 21 | 22 | case "$1" in 23 | start) 24 | # The process must be configured first. 25 | [ -f /etc/monast.conf ] || exit 6 26 | 27 | echo -n $"Starting $prog: " 28 | 29 | daemon $MONAST --daemon 30 | RETVAL=$? 31 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/monast 32 | echo 33 | ;; 34 | stop) 35 | echo -n $"Shutting down $prog: " 36 | killproc monast 37 | RETVAL=$? 38 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/monast 39 | echo 40 | ;; 41 | restart) 42 | $0 stop 43 | $0 start 44 | RETVAL=$? 45 | ;; 46 | reload) 47 | echo -n $"Reloading $prog config: " 48 | killproc monast -HUP 49 | RETVAL=$? 50 | echo 51 | ;; 52 | status) 53 | status monast 54 | RETVAL=$? 55 | ;; 56 | *) 57 | echo $"Usage: $0 {start|stop|restart|reload|status}" 58 | exit 2 59 | esac 60 | 61 | exit $RETVAL 62 | 63 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | 2 | 1 - Configure the asterisk manager to create an user to use with monast. 3 | - Sample manager.conf user: 4 | [monast_user] 5 | secret=monast_secret 6 | writetimeout=100 7 | read=system,call,log,verbose,command,agent,user,config,originate,reporting 8 | write=system,call,log,verbose,command,agent,user,config,originate,reporting 9 | 10 | 2 - Configure apache to point to location where you extracted monast. 11 | - Sample: 12 | Alias /monast /path/to/monast 13 | 14 | Order allow,deny 15 | Allow from all 16 | 17 | 18 | 3 - Copy pymon/monast.conf.sampe to /etc/monast.conf and edit it 19 | properly as documented inside of this file. 20 | 21 | 4 - Install dependencies: 22 | Twisted Python 10.1+ (http://twistedmatrix.com) 23 | zope.interface 3.6+ (http://pypi.python.org/pypi/zope.interface#download) 24 | Starpy SVN-Trunk (http://sourceforge.net/projects/starpy/) Trunk tarball: http://starpy.svn.sourceforge.net/viewvc/starpy/trunk/?view=tar 25 | PHP PEAR Packages: (HTTP_Client) 26 | 27 | 5 - Run monast.py: 28 | # cd pymon 29 | 30 | - Verify if is everything OK. 31 | # ./monast.py 32 | 33 | - If no ERRORS, stop monast.py pressing ctrl+c and run it as daemon. 34 | # ./monast.py --daemon 35 | 36 | 6 - Edit lib/config.php as documented inside this file. 37 | 38 | 7 - Point your browser to location that was configured in apache. 39 | http://server_addr/monast/index.php 40 | 41 | -------------------------------------------------------------------------------- /contrib/copy_yui.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python -u 2 | 3 | import os 4 | 5 | srcpath = '/home/aguirre/Downloads/yui-2.9.0' 6 | dstpath = '/home/aguirre/public_html/monast/lib/yui-2.9.0' 7 | 8 | files = [ 9 | ## CSS 10 | 'build/fonts/fonts-min.css', 11 | 'build/container/assets/skins/sam/container.css', 12 | 'build/menu/assets/skins/sam/menu.css', 13 | 'build/button/assets/skins/sam/button.css', 14 | 'build/tabview/assets/skins/sam/tabview.css', 15 | 16 | ## JS 17 | 'build/yahoo/yahoo-min.js', 18 | 'build/dom/dom-min.js', 19 | 'build/event/event-min.js', 20 | 'build/animation/animation-min.js', 21 | 'build/dragdrop/dragdrop-min.js', 22 | 'build/container/container-min.js', 23 | 'build/menu/menu-min.js', 24 | 'build/element/element-min.js', 25 | 'build/button/button-min.js', 26 | 'build/cookie/cookie-min.js', 27 | 'build/tabview/tabview-min.js', 28 | 29 | ## Extras 30 | 'build/assets/skins/sam/sprite.png', 31 | 'build/menu/assets/skins/sam/menuitem_submenuindicator.png', 32 | ] 33 | 34 | for file in files: 35 | destdir = '%s/%s' % (dstpath, file[:file.rfind('/')]) 36 | destfile = file[file.rfind('/'):] 37 | 38 | if not os.path.exists(destdir): 39 | os.makedirs(destdir) 40 | 41 | # copy files 42 | cmd = 'cp "%s/%s" "%s/%s"' % (srcpath, file, dstpath, file) 43 | print cmd 44 | os.popen(cmd).read() 45 | 46 | # copy images 47 | #origem = '%s/%s' % (srcpath, file[:file.find('/')]) 48 | #for root, dirs, files in os.walk(origem): 49 | #for f in files: 50 | #if f.find('.png') != -1 or f.find('.gif') != -1: 51 | #print f 52 | 53 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2008-2011, Diego Aguirre 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, 6 | are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | * Neither the name of the DagMoller nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 21 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 22 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 26 | OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /lib/include.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /action.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /contrib/init.d/rc.debian.monast: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # chkconfig: - 91 60 4 | # description: Monast Asterisk Monitor 5 | # 6 | # processname: monast 7 | # config: /etc/monast.conf 8 | 9 | # source function library 10 | . /lib/lsb/init-functions 11 | 12 | RETVAL=0 13 | 14 | MONARGS=--daemon 15 | MONLOG=/var/log/monast.log 16 | pidfile=/var/run/monast.pid 17 | 18 | 19 | if [ -f /usr/bin/monast ]; then 20 | MONAST=/usr/bin/monast 21 | elif [ -f /opt/monast/monast.py ]; then 22 | #elif [ -f /var/www/monast/pymon/monast.py ]; then 23 | MONAST=/opt/monast/monast.py 24 | # MONAST=/var/www/monast/pymon/monast.py 25 | fi 26 | 27 | starting(){ 28 | if [ -f $pidfile ]; then 29 | 30 | status_of_proc monast monast 31 | 32 | else 33 | 34 | echo -n "Starting" "MonAst..." 35 | log_daemon_msg "Starting" "MonAst..." >> $MONLOG 36 | if [ -f $MONAST ];then 37 | start-stop-daemon --start --oknodo --exec $MONAST -- $MONARGS > /dev/null 2> /dev/null 38 | sleep 1 39 | echo -e "\t\t\t\t\t\t\t\t"'\E[32m'"\033[1m[OK]\033[0m" 40 | else 41 | echo -e "\t\t\t\t\t\t\t\t"'\E[31m'"\033[1m[Fail]\033[0m" 42 | echo "$MONAST - nao existe" >> $MONLOG 43 | fi 44 | fi 45 | } 46 | 47 | stopping() 48 | { 49 | if [ -f $pidfile ]; then 50 | echo -n "Stopping MonAst..." 51 | log_action_msg "Stopping MonAst..." >> $MONLOG 52 | 53 | start-stop-daemon --stop --pidfile "$pidfile" --quiet $MONAST 54 | echo -e "\t\t\t\t\t\t\t\t"'\E[32m'"\033[1m[OK]\033[0m" 55 | 56 | sleep 2 57 | rm -f $pidfile 58 | else 59 | status_of_proc monast monast 60 | fi 61 | } 62 | 63 | 64 | case "$1" in 65 | start) 66 | 67 | # The process must be configured first. 68 | [ -f /etc/monast.conf ] || exit 6 69 | 70 | starting 71 | ;; 72 | stop) 73 | stopping 74 | ;; 75 | restart|reload) 76 | log_warning_msg "restarting" 77 | $0 stop 78 | sleep 1 79 | starting 80 | ;; 81 | status) 82 | status_of_proc monast monast 83 | ;; 84 | *) 85 | echo $"Usage: $0 {start|stop|restart|reload|status}" 86 | exit 2 87 | esac 88 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## default paths 4 | MONASTPATH=/opt/monast 5 | HTMLPATH=/var/www/html/monast 6 | BINPATH=/usr/bin 7 | CONFIGPATH=/etc 8 | INITD=/etc/init.d 9 | 10 | if [ "$(whoami)" != "root" ]; then 11 | echo -e "\nYou must be root to run this instalation script...\n" 12 | exit 1 13 | fi 14 | 15 | echo 16 | echo -n "MonAst base path [${MONASTPATH}]: " 17 | read tmp 18 | if [ "${tmp}" != "" ]; then 19 | MONASTPATH=$tmp 20 | fi 21 | 22 | echo -n "MonAst HTML path [${HTMLPATH}]: " 23 | read tmp 24 | if [ "${tmp}" != "" ]; then 25 | HTMLPATH=$tmp 26 | fi 27 | 28 | inst=1 29 | echo 30 | if [ -d $MONASTPATH ]; then 31 | echo -n "MonAst already instaled on this system. Overrite? [y/n]: " 32 | read tmp 33 | if [ "${tmp}" != "y" ]; then 34 | inst=0 35 | fi 36 | fi 37 | if [ $inst -eq 1 ]; then 38 | mkdir -p $MONASTPATH 39 | cp -rf pymon/. $MONASTPATH/ 40 | echo "MonAst instaled at ${MONASTPATH}" 41 | 42 | mkdir -p $HTMLPATH 43 | cp -rf *.php css image template lib js $HTMLPATH/ 44 | echo "HTML files instaled at ${HTMLPATH}" 45 | 46 | if [ ! -L $BINPATH/monast ]; then 47 | ln -s $MONASTPATH/monast.py $BINPATH/monast 48 | echo "Symbolic link to monast.py created at ${BINPATH}/monast" 49 | fi 50 | 51 | if [ ! -f /etc/monast.conf ]; then 52 | cp pymon/monast.conf.sample /etc/monast.conf 53 | echo "Sample monast.conf created at ${CONFIGPATH}/monast.conf" 54 | fi 55 | 56 | if [ -f /etc/slackware-version ]; then 57 | cp contrib/slackware/rc.monast /etc/rc.d/rc.monast 58 | echo "Instaling rc.d scripts" 59 | fi 60 | 61 | if [ -f /etc/redhat-release ]; then 62 | cp contrib/init.d/rc.redhat.monast $INITD/monast 63 | echo "Instaling init.d scripts" 64 | fi 65 | 66 | if [ -f /etc/debian-release ]; then 67 | cp contrib/init.d/rc.debian.monast $INITD/monast 68 | echo "Instaling init.d scripts" 69 | fi 70 | 71 | if [ -f /etc/SuSE-release ]; then 72 | cp contrib/init.d/rc.suse.monast $INITD/monast 73 | echo "Instaling init.d scripts" 74 | fi 75 | fi 76 | 77 | echo 78 | 79 | -------------------------------------------------------------------------------- /template/template_custom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | 33 | 34 | 35 | 46 | 47 | 48 | 52 | -------------------------------------------------------------------------------- /pymon/simplejson/scanner.py: -------------------------------------------------------------------------------- 1 | """JSON token scanner 2 | """ 3 | import re 4 | try: 5 | from simplejson._speedups import make_scanner as c_make_scanner 6 | except ImportError: 7 | c_make_scanner = None 8 | 9 | __all__ = ['make_scanner'] 10 | 11 | NUMBER_RE = re.compile( 12 | r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', 13 | (re.VERBOSE | re.MULTILINE | re.DOTALL)) 14 | 15 | def py_make_scanner(context): 16 | parse_object = context.parse_object 17 | parse_array = context.parse_array 18 | parse_string = context.parse_string 19 | match_number = NUMBER_RE.match 20 | encoding = context.encoding 21 | strict = context.strict 22 | parse_float = context.parse_float 23 | parse_int = context.parse_int 24 | parse_constant = context.parse_constant 25 | object_hook = context.object_hook 26 | 27 | def _scan_once(string, idx): 28 | try: 29 | nextchar = string[idx] 30 | except IndexError: 31 | raise StopIteration 32 | 33 | if nextchar == '"': 34 | return parse_string(string, idx + 1, encoding, strict) 35 | elif nextchar == '{': 36 | return parse_object((string, idx + 1), encoding, strict, _scan_once, object_hook) 37 | elif nextchar == '[': 38 | return parse_array((string, idx + 1), _scan_once) 39 | elif nextchar == 'n' and string[idx:idx + 4] == 'null': 40 | return None, idx + 4 41 | elif nextchar == 't' and string[idx:idx + 4] == 'true': 42 | return True, idx + 4 43 | elif nextchar == 'f' and string[idx:idx + 5] == 'false': 44 | return False, idx + 5 45 | 46 | m = match_number(string, idx) 47 | if m is not None: 48 | integer, frac, exp = m.groups() 49 | if frac or exp: 50 | res = parse_float(integer + (frac or '') + (exp or '')) 51 | else: 52 | res = parse_int(integer) 53 | return res, m.end() 54 | elif nextchar == 'N' and string[idx:idx + 3] == 'NaN': 55 | return parse_constant('NaN'), idx + 3 56 | elif nextchar == 'I' and string[idx:idx + 8] == 'Infinity': 57 | return parse_constant('Infinity'), idx + 8 58 | elif nextchar == '-' and string[idx:idx + 9] == '-Infinity': 59 | return parse_constant('-Infinity'), idx + 9 60 | else: 61 | raise StopIteration 62 | 63 | return _scan_once 64 | 65 | make_scanner = c_make_scanner or py_make_scanner 66 | -------------------------------------------------------------------------------- /lib/config.php: -------------------------------------------------------------------------------- 1 | 57 | -------------------------------------------------------------------------------- /lib/yui-2.9.0/build/button/assets/skins/sam/button.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 2.9.0 6 | */ 7 | .yui-button{display:-moz-inline-box;display:inline-block;vertical-align:text-bottom;}.yui-button .first-child{display:block;*display:inline-block;}.yui-button button,.yui-button a{display:block;*display:inline-block;border:none;margin:0;}.yui-button button{background-color:transparent;*overflow:visible;cursor:pointer;}.yui-button a{text-decoration:none;}.yui-skin-sam .yui-button{border-width:1px 0;border-style:solid;border-color:#808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;margin:auto .25em;}.yui-skin-sam .yui-button .first-child{border-width:0 1px;border-style:solid;border-color:#808080;margin:0 -1px;_margin:0;}.yui-skin-sam .yui-button button,.yui-skin-sam .yui-button a,.yui-skin-sam .yui-button a:visited{padding:0 10px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000;}.yui-skin-sam .yui-button a{*line-height:1.875;*padding-bottom:1px;}.yui-skin-sam .yui-split-button button,.yui-skin-sam .yui-menu-button button{padding-right:20px;background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-button button{background-image:url(menu-button-arrow.png);}.yui-skin-sam .yui-split-button button{background-image:url(split-button-arrow.png);}.yui-skin-sam .yui-button-focus{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-focus .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-focus button{background-image:url(split-button-arrow-focus.png);}.yui-skin-sam .yui-button-hover{border-color:#7D98B8;background-position:0 -1300px;}.yui-skin-sam .yui-button-hover .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-hover button{background-image:url(split-button-arrow-hover.png);}.yui-skin-sam .yui-button-active{border-color:#7D98B8;background-position:0 -1700px;}.yui-skin-sam .yui-button-active .first-child{border-color:#7D98B8;}.yui-skin-sam .yui-split-button-activeoption{border-color:#808080;background-position:0 0;}.yui-skin-sam .yui-split-button-activeoption .first-child{border-color:#808080;}.yui-skin-sam .yui-split-button-activeoption button{background-image:url(split-button-arrow-active.png);}.yui-skin-sam .yui-radio-button-checked,.yui-skin-sam .yui-checkbox-button-checked{border-color:#304369;background-position:0 -1400px;}.yui-skin-sam .yui-radio-button-checked .first-child,.yui-skin-sam .yui-checkbox-button-checked .first-child{border-color:#304369;}.yui-skin-sam .yui-radio-button-checked button,.yui-skin-sam .yui-checkbox-button-checked button{color:#fff;}.yui-skin-sam .yui-button-disabled{border-color:#ccc;background-position:0 -1500px;}.yui-skin-sam .yui-button-disabled .first-child{border-color:#ccc;}.yui-skin-sam .yui-button-disabled button,.yui-skin-sam .yui-button-disabled a,.yui-skin-sam .yui-button-disabled a:visited{color:#A6A6A6;cursor:default;}.yui-skin-sam .yui-menu-button-disabled button{background-image:url(menu-button-arrow-disabled.png);}.yui-skin-sam .yui-split-button-disabled button{background-image:url(split-button-arrow-disabled.png);} 8 | -------------------------------------------------------------------------------- /login.php: -------------------------------------------------------------------------------- 1 | $username, 'secret' => $secret)); 38 | switch ($response) 39 | { 40 | case "ERROR :: Connection Refused": 41 | //$saida['error'] = "Could not connect to " . HOSTNAME . ":" . HOSTPORT . " ($response).
"; 42 | //$saida['error'] .= "Make sure monast.py is running so the panel can connect to its port properly."; 43 | $saida['errorTemplate'] = "connectionError"; 44 | $saida['errorVars'] = array("HOSTNAME" => HOSTNAME, "HOSTPORT" => HOSTPORT, "RESPONSE" => $response); 45 | break; 46 | 47 | case "ERROR :: Request Not Found": 48 | //$saida['error'] = "The request to http://" . HOSTNAME . ":" . HOSTPORT . "/doAuthentication was not found.
"; 49 | //$saida['error'] .= "Make sure monast.py is running so the panel can connect to its port properly."; 50 | $saida['errorTemplate'] = "requestError"; 51 | $saida['errorVars'] = array("HOSTNAME" => HOSTNAME, "HOSTPORT" => HOSTPORT); 52 | break; 53 | 54 | case "ERROR :: Internal Server Error": 55 | //$saida['error'] = "We got an \"Internal Server Error\" connecting to http://" . HOSTNAME . ":" . HOSTPORT . "/doAuthentication.
"; 56 | //$saida['error'] .= "Please lookup log file and report errors at http://monast.sf.net"; 57 | $saida['errorTemplate'] = "internalServerError"; 58 | $saida['errorVars'] = array("HOSTNAME" => HOSTNAME, "HOSTPORT" => HOSTPORT); 59 | break; 60 | 61 | case "ERROR :: Invalid Username/Secret": 62 | //$saida['error'] = "Invalid Username/Secret"; 63 | $saida['errorTemplate'] = "invalidUsernameSecret"; 64 | $saida['errorVars'] = array(); 65 | break; 66 | 67 | case "OK :: Authentication Success": 68 | session_start(); 69 | setValor('login', true); 70 | setValor('username', $username); 71 | session_write_close(); 72 | $saida['success'] = true; 73 | break; 74 | } 75 | 76 | echo monast_json_encode($saida, true); 77 | 78 | ?> 79 | -------------------------------------------------------------------------------- /lib/util.php: -------------------------------------------------------------------------------- 1 | "; 56 | print_r($obj); 57 | echo ""; 58 | } 59 | 60 | define("MONAST_PYTHON_COOKIE_KEY", "MonAst::Cookie"); 61 | function doGet($path, $data = array()) 62 | { 63 | session_start(); 64 | $cookieManager = getValor(MONAST_PYTHON_COOKIE_KEY, 'session'); 65 | $cookieManager = $cookieManager ? unserialize($cookieManager) : null; 66 | session_write_close(); 67 | 68 | $conn = new HTTP_Client(null, null, $cookieManager); 69 | $code = $conn->get("http://" . HOSTNAME . ':' . HOSTPORT . '/' . $path, $data); 70 | 71 | switch ($code) 72 | { 73 | case Pear::isError($code): 74 | if ($code->getCode() == 111 || strtolower($code->getMessage()) == "connection refused") 75 | return "ERROR :: Connection Refused"; 76 | break; 77 | 78 | case 500: 79 | return "ERROR :: Internal Server Error"; 80 | break; 81 | } 82 | 83 | $cookieManager = $conn->getCookieManager(); 84 | $cookieManager->serializeSessionCookies(true); 85 | session_start(); 86 | setValor(MONAST_PYTHON_COOKIE_KEY, serialize($cookieManager), 'session'); 87 | session_write_close(); 88 | 89 | $response = $conn->currentResponse(); 90 | $body = trim($response['body']); 91 | 92 | return $body; 93 | } 94 | 95 | $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE); 96 | function monast_json_encode($object, $setJsonResponseHeader = false) 97 | { 98 | global $json; 99 | if (function_exists('json_encode')) 100 | { 101 | if ($setJsonResponseHeader) 102 | header('Content-type: application/json'); 103 | return json_encode($object); 104 | } 105 | 106 | if ($setJsonResponseHeader) 107 | return $json->encode($object); 108 | return $json->encodeUnsafe($object); 109 | } 110 | 111 | function monast_json_decode($string) 112 | { 113 | global $json; 114 | if (function_exists('json_decode')) 115 | return json_decode($string, true); 116 | 117 | return $json->decode($string); 118 | } 119 | 120 | ?> -------------------------------------------------------------------------------- /lib/yui-2.9.0/build/cookie/cookie-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 2.9.0 6 | */ 7 | YAHOO.namespace("util");YAHOO.util.Cookie={_createCookieString:function(B,D,C,A){var F=YAHOO.lang,E=encodeURIComponent(B)+"="+(C?encodeURIComponent(D):D);if(F.isObject(A)){if(A.expires instanceof Date){E+="; expires="+A.expires.toUTCString();}if(F.isString(A.path)&&A.path!==""){E+="; path="+A.path;}if(F.isString(A.domain)&&A.domain!==""){E+="; domain="+A.domain;}if(A.secure===true){E+="; secure";}}return E;},_createCookieHashString:function(B){var D=YAHOO.lang;if(!D.isObject(B)){throw new TypeError("Cookie._createCookieHashString(): Argument must be an object.");}var C=[];for(var A in B){if(D.hasOwnProperty(B,A)&&!D.isFunction(B[A])&&!D.isUndefined(B[A])){C.push(encodeURIComponent(A)+"="+encodeURIComponent(String(B[A])));}}return C.join("&");},_parseCookieHash:function(E){var D=E.split("&"),F=null,C={};if(E.length>0){for(var B=0,A=D.length;B0){var B=(A===false?function(L){return L;}:decodeURIComponent);var H=J.split(/;\s/g),I=null,C=null,E=null;for(var D=0,F=H.length;D set local and overall rc status to 30 | # rc_reset clear local rc status (overall remains) 31 | # rc_exit exit appropriate to overall rc status 32 | . /etc/rc.status 33 | 34 | # First reset status of this service 35 | rc_reset 36 | 37 | # Return values acc. to LSB for all commands but status: 38 | # 0 - success 39 | # 1 - generic or unspecified error 40 | # 2 - invalid or excess argument(s) 41 | # 3 - unimplemented feature (e.g. "reload") 42 | # 4 - insufficient privilege 43 | # 5 - program is not installed 44 | # 6 - program is not configured 45 | # 7 - program is not running 46 | # 47 | # Note that starting an already running service, stopping 48 | # or restarting a not-running service as well as the restart 49 | # with force-reload (in case signalling is not supported) are 50 | # considered a success. 51 | 52 | 53 | # Full path to monast binary and config 54 | #MONAST_DAEMON="/var/lib/asterisk/pymon/monast.py" 55 | #MONAST_CONF="/etc/asterisk/monast.conf" 56 | 57 | 58 | #Checking to monast binary 59 | if [ -f /usr/bin/monast ]; then 60 | MONAST_DAEMON="/usr/bin/monast" 61 | elif [ -f /opt/monast/monast.py ]; then 62 | MONAST_DAEMON="/opt/monast/monast.py" 63 | elif [ -f /var/lib/asterisk/pymon/monast.py ]; then 64 | MONAST_DAEMON="/var/lib/asterisk/pymon/monast.py" 65 | else 66 | echo "ERROR: monast binary not found" 67 | rc_status -s 68 | exit 5 69 | fi 70 | 71 | #Checking to monast conf 72 | if [ -f /etc/monast.conf ]; then 73 | MONAST_CONF=/etc/monast.conf 74 | elif [ -f /opt/monast/monast.conf ]; then 75 | MONAST_CONF=/opt/monast/monast.conf 76 | elif [ -f /etc/asterisk/monast.conf ]; then 77 | MONAST_CONF=/etc/asterisk/monast.conf 78 | else 79 | echo "ERROR: monast config not found" 80 | rc_status -s 81 | exit 6 82 | fi 83 | 84 | 85 | #Defines 86 | LOGFILE="/var/log/monast.log" 87 | PIDFILE="/var/run/monast.pid" 88 | MONASTARGS=" --config=${MONAST_CONF} --logfile=${LOGFILE} --daemon" 89 | 90 | case "$1" in 91 | start) 92 | echo -n "Starting service monast " 93 | ## 94 | if checkproc -p ${PIDFILE} ${MONAST_DAEMON}; then 95 | echo -e -n "\nMonast is already running." 96 | rc_status -s 97 | exit 98 | ## Start daemon with startproc(8). If this fails 99 | ## the echo return value is set appropriate. 100 | else 101 | startproc -q -p ${PIDFILE} ${MONAST_DAEMON} ${MONASTARGS} 102 | fi 103 | 104 | rc_status -v 105 | ;; 106 | stop) 107 | echo -n "Shutting down service monast " 108 | ## Stop daemon with killproc(8) and if this fails 109 | ## set echo the echo return value. 110 | 111 | killproc -p ${PIDFILE} -TERM -q ${MONAST_DAEMON} 112 | sleep 1 113 | 114 | rc_status -v 115 | ;; 116 | restart) 117 | $0 stop 118 | sleep 5 119 | $0 start 120 | rc_status 121 | ;; 122 | reload) 123 | echo -n "Reloading service monast " 124 | if checkproc -p ${PIDFILE} ${MONAST_DAEMON}; then 125 | killproc -p ${PIDFILE} -HUP ${MONAST_DAEMON} 126 | rc_status -v 127 | exit 128 | else 129 | echo -e -n "\nMonast is not running." 130 | rc_status -s 131 | exit 132 | fi 133 | ;; 134 | 135 | status) 136 | echo -n "Checking for service monast: " 137 | ## Check status with checkproc(8), if process is running 138 | ## checkproc will return with exit status 0. 139 | 140 | checkproc -p ${PIDFILE} ${MONAST_DAEMON} 141 | rc_status -v 142 | ;; 143 | *) 144 | echo "Usage: $0 {start|stop|restart|reload|status}" 145 | exit 1 146 | ;; 147 | esac 148 | rc_exit 149 | -------------------------------------------------------------------------------- /lib/yui-2.9.0/build/menu/assets/skins/sam/menu.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 2.9.0 6 | */ 7 | .yuimenu{top:-999em;left:-999em;}.yuimenubar{position:static;}.yuimenu .yuimenu,.yuimenubar .yuimenu{position:absolute;}.yuimenubar li,.yuimenu li{list-style-type:none;}.yuimenubar ul,.yuimenu ul,.yuimenubar li,.yuimenu li,.yuimenu h6,.yuimenubar h6{margin:0;padding:0;}.yuimenuitemlabel,.yuimenubaritemlabel{text-align:left;white-space:nowrap;}.yuimenubar ul{*zoom:1;}.yuimenubar .yuimenu ul{*zoom:normal;}.yuimenubar>.bd>ul:after{content:".";display:block;clear:both;visibility:hidden;height:0;line-height:0;}.yuimenubaritem{float:left;}.yuimenubaritemlabel,.yuimenuitemlabel{display:block;}.yuimenuitemlabel .helptext{font-style:normal;display:block;margin:-1em 0 0 10em;}.yui-menu-shadow{position:absolute;visibility:hidden;z-index:-1;}.yui-menu-shadow-visible{top:2px;right:-3px;left:-3px;bottom:-3px;visibility:visible;}.hide-scrollbars *{overflow:hidden;}.hide-scrollbars select{display:none;}.yuimenu.show-scrollbars,.yuimenubar.show-scrollbars{overflow:visible;}.yuimenu.hide-scrollbars .yui-menu-shadow,.yuimenubar.hide-scrollbars .yui-menu-shadow{overflow:hidden;}.yuimenu.show-scrollbars .yui-menu-shadow,.yuimenubar.show-scrollbars .yui-menu-shadow{overflow:auto;}.yui-overlay.yui-force-redraw{margin-bottom:1px;}.yui-skin-sam .yuimenubar{font-size:93%;line-height:2;*line-height:1.9;border:solid 1px #808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;}.yui-skin-sam .yuimenubarnav .yuimenubaritem{border-right:solid 1px #ccc;}.yui-skin-sam .yuimenubaritemlabel{padding:0 10px;color:#000;text-decoration:none;cursor:default;border-style:solid;border-color:#808080;border-width:1px 0;*position:relative;margin:-1px 0;}.yui-skin-sam .yuimenubaritemlabel:visited{color:#000;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel{padding-right:20px;*display:inline-block;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu{background:url(menubaritem_submenuindicator.png) right center no-repeat;}.yui-skin-sam .yuimenubaritem-selected{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1700px;}.yui-skin-sam .yuimenubaritemlabel-selected{border-color:#7D98B8;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-selected{border-left-width:1px;margin-left:-1px;*left:-1px;}.yui-skin-sam .yuimenubaritemlabel-disabled,.yui-skin-sam .yuimenubaritemlabel-disabled:visited{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenubarnav .yuimenubaritemlabel-hassubmenu-disabled{background-image:url(menubaritem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenu{font-size:93%;line-height:1.5;*line-height:1.45;}.yui-skin-sam .yuimenubar .yuimenu,.yui-skin-sam .yuimenu .yuimenu{font-size:100%;}.yui-skin-sam .yuimenu .bd{*zoom:1;_zoom:normal;border:solid 1px #808080;background-color:#fff;}.yui-skin-sam .yuimenu .yuimenu .bd{*zoom:normal;}.yui-skin-sam .yuimenu ul{padding:3px 0;border-width:1px 0 0 0;border-color:#ccc;border-style:solid;}.yui-skin-sam .yuimenu ul.first-of-type{border-width:0;}.yui-skin-sam .yuimenu h6{font-weight:bold;border-style:solid;border-color:#ccc;border-width:1px 0 0 0;color:#a4a4a4;padding:3px 10px 0 10px;}.yui-skin-sam .yuimenu ul.hastitle,.yui-skin-sam .yuimenu h6.first-of-type{border-width:0;}.yui-skin-sam .yuimenu .yui-menu-body-scrolled{border-color:#ccc #808080;overflow:hidden;}.yui-skin-sam .yuimenu .topscrollbar,.yui-skin-sam .yuimenu .bottomscrollbar{height:16px;border:solid 1px #808080;background:#fff url(../../../../assets/skins/sam/sprite.png) no-repeat 0 0;}.yui-skin-sam .yuimenu .topscrollbar{border-bottom-width:0;background-position:center -950px;}.yui-skin-sam .yuimenu .topscrollbar_disabled{background-position:center -975px;}.yui-skin-sam .yuimenu .bottomscrollbar{border-top-width:0;background-position:center -850px;}.yui-skin-sam .yuimenu .bottomscrollbar_disabled{background-position:center -875px;}.yui-skin-sam .yuimenuitem{_border-bottom:solid 1px #fff;}.yui-skin-sam .yuimenuitemlabel{padding:0 20px;color:#000;text-decoration:none;cursor:default;}.yui-skin-sam .yuimenuitemlabel:visited{color:#000;}.yui-skin-sam .yuimenuitemlabel .helptext{margin-top:-1.5em;*margin-top:-1.45em;}.yui-skin-sam .yuimenuitem-hassubmenu{background-image:url(menuitem_submenuindicator.png);background-position:right center;background-repeat:no-repeat;}.yui-skin-sam .yuimenuitem-checked{background-image:url(menuitem_checkbox.png);background-position:left center;background-repeat:no-repeat;}.yui-skin-sam .yui-menu-shadow-visible{background-color:#000;opacity:.12;filter:alpha(opacity=12);}.yui-skin-sam .yuimenuitem-selected{background-color:#B3D4FF;}.yui-skin-sam .yuimenuitemlabel-disabled,.yui-skin-sam .yuimenuitemlabel-disabled:visited{cursor:default;color:#A6A6A6;}.yui-skin-sam .yuimenuitem-hassubmenu-disabled{background-image:url(menuitem_submenuindicator_disabled.png);}.yui-skin-sam .yuimenuitem-checked-disabled{background-image:url(menuitem_checkbox_disabled.png);} 8 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | HOSTNAME, "HOSTPORT" => HOSTPORT, "RESPONSE" => $response); 56 | break; 57 | 58 | case "ERROR :: Request Not Found": 59 | $errorTemplate = "Language.requestError"; 60 | $errorVars = array("HOSTNAME" => HOSTNAME, "HOSTPORT" => HOSTPORT); 61 | break; 62 | 63 | case "ERROR :: Internal Server Error": 64 | $errorTemplate = "Language.internalServerError"; 65 | $errorVars = array("HOSTNAME" => HOSTNAME, "HOSTPORT" => HOSTPORT); 66 | break; 67 | 68 | case "ERROR: Authentication Required": 69 | session_start(); 70 | setValor('login', false); 71 | setValor('username', ''); 72 | session_write_close(); 73 | break; 74 | 75 | case "OK": 76 | $login = true; 77 | session_start(); 78 | setValor('login', true); 79 | session_write_close(); 80 | break; 81 | } 82 | } 83 | 84 | if (!$errorTemplate) 85 | { 86 | session_start(); 87 | $errorTemplate = getValor('errorTemplate', 'session'); 88 | $errorVars = getValor('errorVars', 'session'); 89 | setValor('errorTemplate', ""); 90 | setValor('errorVars', ""); 91 | session_write_close(); 92 | } 93 | 94 | if ($errorTemplate) 95 | { 96 | $template->prepare(); 97 | $template->newBlock('error'); 98 | $template->assign('errorTemplate', $errorTemplate); 99 | $template->assign('errorVars', monast_json_encode($errorVars, false)); 100 | } 101 | else 102 | { 103 | if (!$login) 104 | { 105 | $template->prepare(); 106 | $template->newBlock('login'); 107 | } 108 | else 109 | { 110 | $template->assignInclude('main', 'monast.php'); 111 | $template->prepare(); 112 | 113 | session_start(); 114 | $servers = getValor('Servers', 'session'); 115 | $server = getValor('Server', 'session'); 116 | session_write_close(); 117 | if (count($servers) == 1) 118 | { 119 | $template->newBlock('singleServer'); 120 | $template->assign('server', $server); 121 | } 122 | else 123 | { 124 | $template->newBlock('serverList'); 125 | foreach ($servers as $serv) 126 | { 127 | $template->newBlock('optionServer'); 128 | $template->assign('server', $serv); 129 | if ($serv == $server) 130 | $template->assign('selected', 'selected'); 131 | } 132 | } 133 | 134 | if ($username) 135 | $template->newBlock('buttonLogout'); 136 | } 137 | } 138 | 139 | if (defined("MONAST_LANGUAGE")) 140 | $template->assign("_ROOT.MONAST_LANGUAGE", MONAST_LANGUAGE); 141 | else 142 | $template->assign("_ROOT.MONAST_LANGUAGE", "en"); 143 | 144 | $template->printToScreen(); 145 | 146 | ?> 147 | -------------------------------------------------------------------------------- /pymon/monast.conf.sample: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (c) 2008-2011, Diego Aguirre 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright notice, 9 | # this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # * Neither the name of the DagMoller nor the names of its contributors 14 | # may be used to endorse or promote products derived from this software 15 | # without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | # IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 21 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 22 | # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 26 | # OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | ## 29 | ## Global Section 30 | ## 31 | [global] 32 | 33 | # Bind client connetions on host:port 34 | bind_host = 127.0.0.1 35 | bind_port = 5039 36 | 37 | # Use client autentication on browser 38 | auth_required = false 39 | 40 | 41 | ## 42 | ## Servers Definitions 43 | ## 44 | [server: Server_1] # Server name can not contains space 45 | hostname = 192.168.0.1 46 | hostport = 5038 47 | username = ami_username 48 | password = ami_password 49 | 50 | # Default user context 51 | default_context = default 52 | 53 | # Context to use in transfer calls 54 | transfer_context = default 55 | 56 | # Context and prefix for meetme 57 | meetme_context = default 58 | meetme_prefix = 59 | 60 | [server: Server_2] # Server name can not contains space 61 | hostname = 192.168.0.2 62 | hostport = 5038 63 | username = ami_username 64 | password = ami_password 65 | 66 | # Default user context 67 | default_context = default 68 | 69 | # Context to use in transfer calls 70 | transfer_context = default 71 | 72 | # Context and prefix for meetme 73 | meetme_context = default 74 | meetme_prefix = 75 | 76 | 77 | ## 78 | ## Peers Definitions 79 | ## 80 | [peers] 81 | # sort peers (options: channel, callerid) 82 | sortby = callerid 83 | 84 | # default show/hide 85 | default = show 86 | 87 | # hide peer when default = show 88 | ;/SIP/user-1 = hide 89 | 90 | # show peer when default = hide 91 | ;/SIP/user-2 = show 92 | 93 | # always show peer. 94 | ;/SIP/user-3 = force 95 | 96 | # force CallerID (only in forced mode) 97 | ;/SIP/user-4 = force,Diego Aguirre <5555> 98 | 99 | # Create peer groups 100 | ;/@group/Group 1 = SIP/user-1,SIP/user-2 101 | ;/@group/Group 2 = SIP/user-3,SIP/user-4 102 | 103 | ## 104 | ## Meetmes / Conferences Definitions 105 | ## 106 | [meetmes] 107 | # default show/hide 108 | default = show 109 | 110 | # hide meetme when default = show 111 | ;/1234 = hide 112 | 113 | # show meetme when default = hide 114 | ;/1234 = show 115 | 116 | # always show meetme 117 | ;/1234 = force 118 | 119 | 120 | ## 121 | ## Queues Definitions 122 | ## 123 | [queues] 124 | # defualt show/hide 125 | default = show 126 | 127 | # show queue queue01 128 | ;/queue01 = show 129 | 130 | # show queue queue02 with display name Support 131 | ;/queue02 = show,Support 132 | 133 | # hide queue queue03 134 | ;/queue03 = hide 135 | 136 | # Map Member name 137 | ;/@member/SIP/user-1 = Diego Aguirre <5555> 138 | 139 | 140 | ## Define users and roles to use on auth_required is set to true 141 | ## roles must be: 142 | ## originate : user can originate, transfer, park and drop calls 143 | ## agent : user cans add, remove, pause and unpause members on queues 144 | ## command : user can execute asterisk cli commands 145 | ## spy : user can start a spy 146 | 147 | [user: admin] 148 | secret = 12345 149 | roles = originate,queue,command,spy 150 | servers = ALL 151 | 152 | [user: aguirre] 153 | secret = 12345 154 | roles = originate 155 | servers = Server_1, Server_2 156 | 157 | ## per server roles for user aguirre 158 | Server_2 = originate,queue,command 159 | 160 | [user: demo] 161 | secret = 162 | roles = 163 | servers = Server_1 164 | 165 | -------------------------------------------------------------------------------- /status.php: -------------------------------------------------------------------------------- 1 | $server)); 52 | switch ($response) 53 | { 54 | case "ERROR :: Connection Refused": 55 | $error = "Monast Error\n

Could not connect to " . HOSTNAME . ":" . HOSTPORT . " ($response).
\n"; 56 | $error .= "Make sure monast.py is running so the panel can connect to its port properly.

"; 57 | break; 58 | 59 | case "ERROR :: Request Not Found": 60 | $error = "The request to http://" . HOSTNAME . ":" . HOSTPORT . "/getUpdates was not found.
"; 61 | $error .= "Make sure monast.py is running so the panel can connect to its port properly."; 62 | break; 63 | 64 | case "ERROR :: Internal Server Error": 65 | $error = "We got an \"Internal Server Error\" connecting to http://" . HOSTNAME . ":" . HOSTPORT . "/getUpdates.
"; 66 | $error .= "Please lookup log file and report errors at http://monast.sf.net"; 67 | break; 68 | 69 | case "ERROR: Authentication Required": 70 | session_start(); 71 | setValor('login', false); 72 | setValor('username', ''); 73 | session_write_close(); 74 | $lastEvents[] = array('action' => 'Reload', 'time' => 100); 75 | break; 76 | 77 | case "NO UPDATES": 78 | session_start(); 79 | $actions = getValor('Actions', 'session'); 80 | $lastReload = getValor('LastReload', 'session'); 81 | session_write_close(); 82 | if (count($actions) > 0) 83 | { 84 | foreach ($actions as $action) 85 | { 86 | $action = monast_json_decode($action); 87 | if ($action['action'] == "ChangeServer") 88 | { 89 | session_start(); 90 | setValor('Server', $action['server']); 91 | session_write_close(); 92 | $lastEvents[] = array('action' => 'Reload', 'time' => 100); 93 | $complete = true; 94 | break; 95 | } 96 | elseif ($action['action'] == "Logout") 97 | { 98 | $tmp = doGet('doLogout'); 99 | $lastEvents[] = array('action' => 'Reload', 'time' => 100); 100 | $complete = true; 101 | break; 102 | } 103 | elseif ($action['action'] == "Reload") 104 | { 105 | $lastEvents[] = array('action' => 'Reload', 'time' => 100); 106 | $complete = true; 107 | break; 108 | } 109 | else 110 | { 111 | $action['server'] = $server; 112 | $tmp = doGet('doAction', $action); 113 | $complete = true; 114 | //break; 115 | } 116 | } 117 | session_start(); 118 | setValor('Actions', array()); 119 | session_write_close(); 120 | } 121 | 122 | if (time() - $lastReload >= MONAST_BROWSER_REFRESH) 123 | { 124 | $lastEvents[] = array('action' => 'Reload', 'time' => 100); 125 | $complete = true; 126 | break; 127 | } 128 | 129 | sleep(1); 130 | $current = time(); 131 | if ($current - $start > MONAST_SOCKET_DURATION) 132 | $complete = true; 133 | break; 134 | 135 | default: 136 | $updates = monast_json_decode($response); 137 | $complete = true; 138 | break; 139 | } 140 | 141 | if ($error) 142 | { 143 | echo monast_json_encode(array(array('action' => 'Error', 'message' => $error)), true); 144 | die; 145 | } 146 | 147 | if ($complete) 148 | break; 149 | } 150 | 151 | $events = array_merge($updates, $lastEvents); 152 | 153 | echo monast_json_encode($events, true); 154 | 155 | ?> 156 | -------------------------------------------------------------------------------- /lib/yui-2.9.0/build/tabview/assets/skins/sam/tabview.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 2.9.0 6 | */ 7 | .yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{margin:0 .5em 0 0}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{margin:0 0 .5em}.yui-navset .yui-content .yui-hidden{border:0;height:0;width:0;padding:0;position:absolute;left:-999999px;overflow:hidden;visibility:hidden}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{width:6em}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{width:auto}.yui-navset .yui-navset-left,.yui-navset-left{padding:0 0 0 6em}.yui-navset-right{padding:0 6em 0 0}.yui-navset-top,.yui-navset-bottom{padding:auto}.yui-nav,.yui-nav li{margin:0;padding:0;list-style:none}.yui-navset li em{font-style:normal}.yui-navset{position:relative;zoom:1}.yui-navset .yui-content,.yui-navset .yui-content div{zoom:1}.yui-navset .yui-content:after{content:'';display:block;clear:both}.yui-navset .yui-nav li,.yui-navset .yui-navset-top .yui-nav li,.yui-navset .yui-navset-bottom .yui-nav li{display:inline-block;display:-moz-inline-stack;*display:inline;vertical-align:bottom;cursor:pointer;zoom:1}.yui-navset-left .yui-nav li,.yui-navset-right .yui-nav li{display:block}.yui-navset .yui-nav a{position:relative}.yui-navset .yui-nav li a,.yui-navset-top .yui-nav li a,.yui-navset-bottom .yui-nav li a{display:block;display:inline-block;vertical-align:bottom;zoom:1}.yui-navset-left .yui-nav li a,.yui-navset-right .yui-nav li a{display:block}.yui-navset-bottom .yui-nav li a{vertical-align:text-top}.yui-navset .yui-nav li a em,.yui-navset-top .yui-nav li a em,.yui-navset-bottom .yui-nav li a em{display:block}.yui-navset .yui-navset-left .yui-nav,.yui-navset .yui-navset-right .yui-nav,.yui-navset-left .yui-nav,.yui-navset-right .yui-nav{position:absolute;z-index:1}.yui-navset-top .yui-nav,.yui-navset-bottom .yui-nav{position:static}.yui-navset .yui-navset-left .yui-nav,.yui-navset-left .yui-nav{left:0;right:auto}.yui-navset .yui-navset-right .yui-nav,.yui-navset-right .yui-nav{right:0;left:auto}.yui-skin-sam .yui-navset .yui-nav,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav{border:solid #2647a0;border-width:0 0 5px;zoom:1}.yui-skin-sam .yui-navset .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav li{margin:0 .16em 0 0;padding:1px 0 0;zoom:1}.yui-skin-sam .yui-navset .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav .selected{margin:0 .16em -1px 0}.yui-skin-sam .yui-navset .yui-nav a,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a{background:#d8d8d8 url(../../../../assets/skins/sam/sprite.png) repeat-x;border:solid #a3a3a3;border-width:0 1px;color:#000;position:relative;text-decoration:none}.yui-skin-sam .yui-navset .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-top .yui-nav a em{border:solid #a3a3a3;border-width:1px 0 0;padding:.25em .75em;left:0;right:0;bottom:0;top:-1px;position:relative}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a:focus,.yui-skin-sam .yui-navset .yui-nav .selected a:hover{background:#2647a0 url(../../../../assets/skins/sam/sprite.png) repeat-x left -1400px;color:#fff}.yui-skin-sam .yui-navset .yui-nav a:hover,.yui-skin-sam .yui-navset .yui-nav a:focus{background:#bfdaff url(../../../../assets/skins/sam/sprite.png) repeat-x left -1300px;outline:0}.yui-skin-sam .yui-navset .yui-nav .selected a em{padding:.35em .75em}.yui-skin-sam .yui-navset .yui-nav .selected a,.yui-skin-sam .yui-navset .yui-nav .selected a em{border-color:#243356}.yui-skin-sam .yui-navset .yui-content{background:#edf5ff}.yui-skin-sam .yui-navset .yui-content,.yui-skin-sam .yui-navset .yui-navset-top .yui-content{border:1px solid #808080;border-top-color:#243356;padding:.25em .5em}.yui-skin-sam .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav,.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 5px 0 0;Xposition:absolute;top:0;bottom:0}.yui-skin-sam .yui-navset .yui-navset-right .yui-nav,.yui-skin-sam .yui-navset-right .yui-nav{border-width:0 0 0 5px}.yui-skin-sam .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav li,.yui-skin-sam .yui-navset-right .yui-nav li{margin:0 0 .16em;padding:0 0 0 1px}.yui-skin-sam .yui-navset-right .yui-nav li{padding:0 1px 0 0}.yui-skin-sam .yui-navset-left .yui-nav .selected,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav .selected{margin:0 -1px .16em 0}.yui-skin-sam .yui-navset-right .yui-nav .selected{margin:0 0 .16em -1px}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav a{border-width:1px 0}.yui-skin-sam .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset .yui-navset-left .yui-nav a em,.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 0 0 1px;padding:.2em .75em;top:auto;left:-1px}.yui-skin-sam .yui-navset-right .yui-nav a em{border-width:0 1px 0 0;left:auto;right:-1px}.yui-skin-sam .yui-navset-left .yui-nav a,.yui-skin-sam .yui-navset-left .yui-nav .selected a,.yui-skin-sam .yui-navset-left .yui-nav a:hover,.yui-skin-sam .yui-navset-right .yui-nav a,.yui-skin-sam .yui-navset-right .yui-nav .selected a,.yui-skin-sam .yui-navset-right .yui-nav a:hover,.yui-skin-sam .yui-navset-bottom .yui-nav a,.yui-skin-sam .yui-navset-bottom .yui-nav .selected a,.yui-skin-sam .yui-navset-bottom .yui-nav a:hover{background-image:none}.yui-skin-sam .yui-navset-left .yui-content{border:1px solid #808080;border-left-color:#243356}.yui-skin-sam .yui-navset-bottom .yui-nav,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav{border-width:5px 0 0}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav .selected,.yui-skin-sam .yui-navset-bottom .yui-nav .selected{margin:-1px .16em 0 0}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav li,.yui-skin-sam .yui-navset-bottom .yui-nav li{padding:0 0 1px 0;vertical-align:top}.yui-skin-sam .yui-navset .yui-navset-bottom .yui-nav a em,.yui-skin-sam .yui-navset-bottom .yui-nav a em{border-width:0 0 1px;top:auto;bottom:-1px} 8 | .yui-skin-sam .yui-navset-bottom .yui-content,.yui-skin-sam .yui-navset .yui-navset-bottom .yui-content{border:1px solid #808080;border-bottom-color:#243356} 9 | -------------------------------------------------------------------------------- /css/styles.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Copyright (c) 2008-2011, Diego Aguirre 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without modification, 7 | * are permitted provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * * Neither the name of the DagMoller nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21 | * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 22 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 23 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 27 | * OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | BODY { 31 | margin-top: 5px; 32 | font-family: verdana,arial,helvetica,sans-serif; 33 | } 34 | 35 | .hidden { 36 | display: none; 37 | } 38 | 39 | .requestInfo pre { 40 | font-family: 'courier new'; 41 | font-size: 0.8em; 42 | } 43 | 44 | .monast-logo { 45 | height: 45px; 46 | } 47 | .monast-logo .monast-name { 48 | font-family: sans-serif; 49 | font-size: 2.3em; 50 | font-weight: bold; 51 | border-bottom: 2px solid #000000; 52 | } 53 | .monast-logo .monast-text { 54 | font-family: sans-serif; 55 | font-size: 1.0em; 56 | border-top: 2px solid #000000; 57 | } 58 | .monast-logo .monast-serverlist { 59 | margin-left: 25px; 60 | padding-left: 5px; 61 | border-left: 2px solid #000000; 62 | display: inline-block; 63 | } 64 | .monast-logo .monast-status { 65 | margin-left: 25px; 66 | padding-left: 5px; 67 | border-left: 2px solid #000000; 68 | display: inline-block; 69 | width: 300px; 70 | } 71 | 72 | #actionsDiv { 73 | position: absolute; 74 | top: 10px; 75 | right: 25px; 76 | border: 1px solid #000000; 77 | background-color: #ffffff; 78 | z-index: 5; 79 | } 80 | 81 | #mixed { 82 | margin: 5px; 83 | } 84 | #peersDiv { 85 | padding: 5px; 86 | } 87 | #peersDivWraper { 88 | margin-left: 5px; 89 | } 90 | .peerTable { 91 | float: left; 92 | /*margin: 5px;*/ 93 | margin-right: 6px; 94 | margin-bottom: 3px; 95 | margin-top: 3px; 96 | background-color: #ffffff; 97 | z-index: 1; 98 | } 99 | #meetmesDiv { 100 | padding: 5px; 101 | } 102 | .meetmeDivWrap { 103 | float: left; 104 | margin: 5px; 105 | } 106 | .meetmeDiv, .meetmeUser { 107 | width: 250px; 108 | border: 1px solid #aaaaaa; 109 | margin-bottom: 2px; 110 | background-color: #ffffff; 111 | z-index: 1; 112 | } 113 | #chanCallDiv { 114 | padding: 5px; 115 | } 116 | #channelsDiv { 117 | width: 330px; 118 | float: left; 119 | margin: 5px; 120 | } 121 | .channelDiv { 122 | width: 330px; 123 | border: 1px solid #aaaaaa; 124 | margin-bottom: 2px; 125 | background-color: #ffffff; 126 | z-index: 1; 127 | } 128 | #callsDiv { 129 | width: 570px; 130 | float: left; 131 | margin: 5px; 132 | margin-left: 20px; 133 | } 134 | .callDiv { 135 | width: 570px; 136 | border: 1px solid #aaaaaa; 137 | margin-bottom: 2px; 138 | background-color: #ffffff; 139 | z-index: 1; 140 | } 141 | #parkedCallsDiv { 142 | padding: 5px; 143 | } 144 | #parkedsDiv { 145 | margin: 5px; 146 | } 147 | .parkedDiv { 148 | width: 640px; 149 | border: 1px solid #aaaaaa; 150 | margin-bottom: 2px; 151 | background-color: #ffffff; 152 | z-index: 1; 153 | } 154 | 155 | #queuesDiv { 156 | padding: 5px; 157 | } 158 | .queueDualDiv { 159 | float: left; 160 | } 161 | .queueDiv { 162 | float: left; 163 | margin-right: 10px; 164 | margin-bottom: 10px; 165 | } 166 | .queueStatisticsDiv { 167 | border: 1px solid #aaaaaa; 168 | background-color: #ffffff; 169 | margin-bottom: 5px; 170 | } 171 | .queueMembersDivWrap { 172 | float: left; 173 | margin-right: 10px; 174 | } 175 | .queueMembersDiv { 176 | border: 1px solid #aaaaaa; 177 | background-color: #ffffff; 178 | margin-bottom: 2px; 179 | z-index: 1; 180 | } 181 | .queueClientsDivWrap { 182 | float: left; 183 | } 184 | .queueClientsDiv { 185 | border: 1px solid #aaaaaa; 186 | background-color: #ffffff; 187 | margin-bottom: 2px; 188 | } 189 | 190 | #debugDiv { 191 | border: black 1px solid; 192 | width: 100%; 193 | height: 500px; 194 | overflow: auto; 195 | font-family: 'courier new'; 196 | font-size: 0.8em; 197 | color: #ffffff; 198 | background-color: #000000; 199 | margin: 0 auto; 200 | } 201 | .tableTitle { 202 | font-size: 0.7em; 203 | font-weight: bold; 204 | background-color: #bbbbbb; 205 | } 206 | .statusHeader { 207 | font-size: 0.7em; 208 | font-weight: bold; 209 | background-color: #dddddd; 210 | } 211 | .status { 212 | font-size: 0.7em; 213 | text-align: center; 214 | border: 1px solid #aaaaaa; 215 | } 216 | .status a { 217 | color: black; 218 | text-decoration: none; 219 | } 220 | .campo { 221 | border: 1px solid #dddddd; 222 | font-size: 0.9em; 223 | } 224 | 225 | .a { 226 | color: black; 227 | text-decoration: none; 228 | } 229 | 230 | #cliDiv textarea { 231 | font-family: 'courier new'; 232 | font-size: 0.8em; 233 | color: #ffffff; 234 | background-color: #000000; 235 | } 236 | #cliDiv input { 237 | color: #ffffff; 238 | background-color: #000000; 239 | } 240 | 241 | fieldset legend { 242 | font-size: 0.8em; 243 | } 244 | 245 | .tableInfo { 246 | font-size: 0.7em; 247 | } 248 | .tableInfo .key { 249 | font-weight: bold; 250 | text-align: right; 251 | } 252 | 253 | /* YUI */ 254 | .yui-skin-sam .yui-button button, .yui-skin-sam .yui-button a { 255 | font-size: 0.8em; 256 | line-height:2; 257 | min-height:2em; 258 | padding:0 10px; 259 | } 260 | 261 | .yui-navset li em { 262 | font-style:normal; 263 | font-size: 0.9em; 264 | } 265 | -------------------------------------------------------------------------------- /lib/yui-2.9.0/build/yahoo/yahoo-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 2.9.0 6 | */ 7 | if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e":">",'"':""","'":"'","/":"/","`":"`"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j; 8 | }},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m>>(32-iShiftBits)); 17 | }; 18 | 19 | var addUnsigned = function (lX,lY) { 20 | var lX4,lY4,lX8,lY8,lResult; 21 | lX8 = (lX & 0x80000000); 22 | lY8 = (lY & 0x80000000); 23 | lX4 = (lX & 0x40000000); 24 | lY4 = (lY & 0x40000000); 25 | lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF); 26 | if (lX4 & lY4) { 27 | return (lResult ^ 0x80000000 ^ lX8 ^ lY8); 28 | } 29 | if (lX4 | lY4) { 30 | if (lResult & 0x40000000) { 31 | return (lResult ^ 0xC0000000 ^ lX8 ^ lY8); 32 | } else { 33 | return (lResult ^ 0x40000000 ^ lX8 ^ lY8); 34 | } 35 | } else { 36 | return (lResult ^ lX8 ^ lY8); 37 | } 38 | }; 39 | 40 | var _F = function (x,y,z) { return (x & y) | ((~x) & z); }; 41 | var _G = function (x,y,z) { return (x & z) | (y & (~z)); }; 42 | var _H = function (x,y,z) { return (x ^ y ^ z); }; 43 | var _I = function (x,y,z) { return (y ^ (x | (~z))); }; 44 | 45 | var _FF = function (a,b,c,d,x,s,ac) { 46 | a = addUnsigned(a, addUnsigned(addUnsigned(_F(b, c, d), x), ac)); 47 | return addUnsigned(rotateLeft(a, s), b); 48 | }; 49 | 50 | var _GG = function (a,b,c,d,x,s,ac) { 51 | a = addUnsigned(a, addUnsigned(addUnsigned(_G(b, c, d), x), ac)); 52 | return addUnsigned(rotateLeft(a, s), b); 53 | }; 54 | 55 | var _HH = function (a,b,c,d,x,s,ac) { 56 | a = addUnsigned(a, addUnsigned(addUnsigned(_H(b, c, d), x), ac)); 57 | return addUnsigned(rotateLeft(a, s), b); 58 | }; 59 | 60 | var _II = function (a,b,c,d,x,s,ac) { 61 | a = addUnsigned(a, addUnsigned(addUnsigned(_I(b, c, d), x), ac)); 62 | return addUnsigned(rotateLeft(a, s), b); 63 | }; 64 | 65 | var convertToWordArray = function (str) { 66 | var lWordCount; 67 | var lMessageLength = str.length; 68 | var lNumberOfWords_temp1=lMessageLength + 8; 69 | var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1 % 64))/64; 70 | var lNumberOfWords = (lNumberOfWords_temp2+1)*16; 71 | var lWordArray=new Array(lNumberOfWords-1); 72 | var lBytePosition = 0; 73 | var lByteCount = 0; 74 | while ( lByteCount < lMessageLength ) { 75 | lWordCount = (lByteCount-(lByteCount % 4))/4; 76 | lBytePosition = (lByteCount % 4)*8; 77 | lWordArray[lWordCount] = (lWordArray[lWordCount] | (str.charCodeAt(lByteCount)<>>29; 85 | return lWordArray; 86 | }; 87 | 88 | var wordToHex = function (lValue) { 89 | var wordToHexValue="",wordToHexValue_temp="",lByte,lCount; 90 | for (lCount = 0;lCount<=3;lCount++) { 91 | lByte = (lValue>>>(lCount*8)) & 255; 92 | wordToHexValue_temp = "0" + lByte.toString(16); 93 | wordToHexValue = wordToHexValue + wordToHexValue_temp.substr(wordToHexValue_temp.length-2,2); 94 | } 95 | return wordToHexValue; 96 | }; 97 | 98 | var x=[], 99 | k,AA,BB,CC,DD,a,b,c,d, 100 | S11=7, S12=12, S13=17, S14=22, 101 | S21=5, S22=9 , S23=14, S24=20, 102 | S31=4, S32=11, S33=16, S34=23, 103 | S41=6, S42=10, S43=15, S44=21; 104 | 105 | //str = this.utf8_encode(str); 106 | x = convertToWordArray(str); 107 | a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476; 108 | 109 | xl = x.length; 110 | for (k=0;k 3 | Monast.USERNAME = "{MONAST_USERNAME}"; 4 | 5 | 6 |
7 | 21 | 22 |
23 |
24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 | 39 | 40 |
41 | {technology} ({count}) 42 |
43 | 44 |
45 | {group} ({count}) 46 |
47 |
48 |
49 | 50 |
51 |
52 | 53 | 54 |
55 |
56 |
57 |
58 | 59 |
60 |
61 | 62 | 63 | 67 |
68 |
69 |
70 |
71 | 72 |
73 |
74 | 75 |
76 |
77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 |
(0)
86 |
87 |
88 |
89 |
90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
(0)
100 |
101 |
102 |
103 |
104 |
105 | 106 |
107 |
108 | 109 |
110 |
111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 |
(0)
121 |
122 |
123 |
124 |
125 | 126 |
127 |
128 | 129 | 130 | 131 |
132 |
133 | 134 | 135 |
136 |
137 | 138 |    139 |
140 | 141 | 142 | 143 |
144 |
145 | 146 | 147 |
148 |
149 | 150 | {templates} 151 | 152 | 168 | -------------------------------------------------------------------------------- /lib/yui-2.9.0/build/element/element-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 2.9.0 6 | */ 7 | YAHOO.util.Attribute=function(b,a){if(a){this.owner=a;this.configure(b,true);}};YAHOO.util.Attribute.INVALID_VALUE={};YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,setter:null,getter:null,validator:null,getValue:function(){var a=this.value;if(this.getter){a=this.getter.call(this.owner,this.name,a);}return a;},setValue:function(f,b){var e,a=this.owner,c=this.name,g=YAHOO.util.Attribute.INVALID_VALUE,d={type:c,prevValue:this.getValue(),newValue:f};if(this.readOnly||(this.writeOnce&&this._written)){return false;}if(this.validator&&!this.validator.call(a,f)){return false;}if(!b){e=a.fireBeforeChangeEvent(d);if(e===false){return false;}}if(this.setter){f=this.setter.call(a,f,this.name);if(f===undefined){}if(f===g){return false;}}if(this.method){if(this.method.call(a,f,this.name)===g){return false;}}this.value=f;this._written=true;d.type=c;if(!b){this.owner.fireChangeEvent(d);}return true;},configure:function(b,c){b=b||{};if(c){this._written=false;}this._initialConfig=this._initialConfig||{};for(var a in b){if(b.hasOwnProperty(a)){this[a]=b[a];if(c){this._initialConfig[a]=b[a];}}}},resetValue:function(){return this.setValue(this._initialConfig.value);},resetConfig:function(){this.configure(this._initialConfig,true);},refresh:function(a){this.setValue(this.value,a);}};(function(){var a=YAHOO.util.Lang;YAHOO.util.AttributeProvider=function(){};YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(c){this._configs=this._configs||{};var b=this._configs[c];if(!b||!this._configs.hasOwnProperty(c)){return null;}return b.getValue();},set:function(d,e,b){this._configs=this._configs||{};var c=this._configs[d];if(!c){return false;}return c.setValue(e,b);},getAttributeKeys:function(){this._configs=this._configs;var c=[],b;for(b in this._configs){if(a.hasOwnProperty(this._configs,b)&&!a.isUndefined(this._configs[b])){c[c.length]=b;}}return c;},setAttributes:function(d,b){for(var c in d){if(a.hasOwnProperty(d,c)){this.set(c,d[c],b);}}},resetValue:function(c,b){this._configs=this._configs||{};if(this._configs[c]){this.set(c,this._configs[c]._initialConfig.value,b);return true;}return false;},refresh:function(e,c){this._configs=this._configs||{};var f=this._configs;e=((a.isString(e))?[e]:e)||this.getAttributeKeys();for(var d=0,b=e.length;dMake sure monast.py is running so the panel can connect to its port properly.", 31 | requestError: "The request to http://#{HOSTNAME}:#{HOSTPORT}/isAuthenticated was not found.
Make sure monast.py is running so the panel can connect to its port properly.", 32 | internalServerError: "We got an \"Internal Server Error\" connecting to http://#{HOSTNAME}:#{HOSTPORT}/isAuthenticated.
Please lookup log file and report errors at http://monast.sf.net", 33 | requestStatusError: "An error ocurred while requesting status!
Please press F5 to reload MonAst.", 34 | invalidUsernameSecret: "Invalid Username/Secret", 35 | youMustDefineAnUser: "You must define an user", 36 | userNotDefined: "User not defined!", 37 | authenticatingPleaseWait: "Authenticating, please wait...", 38 | authenticatedReloading: "Authenticated, reloading...", 39 | loggingOutPleaseWait: "Logging out, please wait...", 40 | reloadNeeded: "Reload needed, Press F5.", 41 | reloadingPleaseWait: "Reloading, please wait...", 42 | reloadRequestedPleaseWait: "Reload requested, please wait...", 43 | changingServer: "Changing Server...", 44 | cannotChangeServerOfflineReload: "Can not change server, Monast is offline...
Please reload...", 45 | 46 | mixedPannels: "Mixed Panels", 47 | peersUsers: "Peers/Users", 48 | peerUser: "Peer/User", 49 | meetmeRooms: "Conference Rooms", 50 | parkedCallAt: "Parked Call at", 51 | parkedCalls: "Parked Calls", 52 | parkedCalls2: "Parked Calls", 53 | queues: "Queues", 54 | asteriskCli: "Asterisk CLI", 55 | debug: "Debug", 56 | pannelsToShow: "Panels to Show", 57 | 58 | from: "From", 59 | to: "To", 60 | 61 | noGroup: "No Group", 62 | originateCall: "Originate Call", 63 | viewPeerCalls: "View User/Peer Channels/Calls", 64 | viewPeerInfo: "View User/Peer Info", 65 | execute: "Execute", 66 | sendResetToModem: "Send Reset Command to Modem", 67 | reallyResetModem: "Do you really need to reset this channel?", 68 | turnMemberOf: "Turn Member of", 69 | turnMemberOfQueue: "Turn this User Member of Queue \"#{QUEUENAME}\"?", 70 | removeMemberFrom: "Remove Member from", 71 | meetmeInvite: "Conference Invite", 72 | inviteTo: "Invite to", 73 | inviteToMeetme: "Invite this User/Peer to Conference \"#{MEETME}\"", 74 | inviteNumbers: "Invite Numbers", 75 | inviteNumbersToMeetme: "Invite Numbers to Conference", 76 | inviteCallToMeetme: "Invite this Call to Conference \"#{MEETME}\"?", 77 | numbers: "Numbers", 78 | onePerLine: "one per line", 79 | ifNotExistsCreateDynamic: "if this conference does not exists,
a dynamic one will be created", 80 | meetmeUser: "Conference User", 81 | kickUser: "Kick User", 82 | viewMeetmeUserInfo: "View User Info", 83 | requestMeetmeKickFrom: "Request Kick to this User from Conference \"#{MEETME}\"?", 84 | userNumber: "User Number", 85 | 86 | uniqueid: "Uniqueid", 87 | sourceUniqueid: "Source Uniqueid", 88 | destinationUniqueid: "Destination Uniqueid", 89 | 90 | noActivePeerCalls: "No Active Channels/Calls for this User/Peer", 91 | notValidCalleridNumber: "This User/Peer does not have a valid callerid number to transfer to", 92 | 93 | selectActionForChannel: "Select Action for Channel #{UNIQUEID} (#{CHANNEL})", 94 | selectActionForCall: "Select Action for Call #{UNIQUEID} -> #{BRIDGEDUNIQUEID}", 95 | selectChannelToTransfer: "Select Channel to Transfer", 96 | selectChannelToPark: "Select Channel to Park", 97 | 98 | hangup: "Hangup", 99 | requestHangupChannel: "Request Hangup to this Channel?", 100 | requestHangupCall: "Request Hangup to this Call?", 101 | requestHangupParkedCall: "Request Hangup to this Parked Call?", 102 | 103 | channel: "Channel", 104 | channels: "Channels", 105 | channelType: "Channel Type", 106 | channelName: "Channel Name", 107 | channelVariables: "Channel Variables", 108 | channelsCalls: "Channels/Calls", 109 | channelMonitored: "Channel Monitored", 110 | channelSpyed: "Channel Spyed", 111 | sourceChannel: "Source Channel", 112 | destinationChannel: "Destination Channel", 113 | 114 | viewChannelInfo: "View Channel Info", 115 | viewCallInfo: "View Call Info", 116 | viewParkedCallInfo: "View Parked Call Info", 117 | 118 | transfer: "Transfer", 119 | transferCall: "Transfer Call", 120 | transferDestination: "Transfer Destination", 121 | transferParkedCall: "Transfer Parked Call", 122 | requestTransferParkedCallTo: "Request Transfer this Parked Call to User/Peer \"#{CALLERID}\"?", 123 | 124 | reallyTransferChannelTo: "Do you really want to transfer channel \"#{CHANNEL}\" to \"#{CALLERID}\"?", 125 | 126 | noSpyerNumber: "No Spyer Number Specified!", 127 | 128 | spy: "Spy", 129 | spyed: "Spyed", 130 | spyer: "Spyer", 131 | spyerNumber: "Spyer Number", 132 | requestSpyChannel: "Request Spy to this Channel?", 133 | requestSpyCall: "Request Spy to this Call?", 134 | 135 | park: "Park", 136 | 137 | monitored: "Monitored", 138 | monitorStart: "Start Monitor", 139 | monitorStop: "Stop Monitor", 140 | monitorToThisChannel: "Monitor to this Channel?", 141 | 142 | peerName: "Peer Name", 143 | peerContext: "Peer Context", 144 | 145 | callerid: "Callerid", 146 | calleridName: "Callerid Name", 147 | calleridNumber: "Callerid Number", 148 | sourceCallerid: "Source Callerid", 149 | destinationCallerid: "Destination Callerid", 150 | 151 | status: "Status", 152 | state: "State", 153 | 154 | activeCalls: "Active Calls", 155 | 156 | call: "Call", 157 | calls: "call(s)", 158 | calls2: "Calls", 159 | callsAbreviated: "call(s)", 160 | callStatus: "Call Status", 161 | callDuration: "Call Duration", 162 | 163 | exten: "Exten", 164 | 165 | parkedFrom: "Parked From", 166 | parkedChannel: "Parked Channel", 167 | parkedCalleridName: "Parked Callerid Name", 168 | parkedCalleridNumber: "Parked Callerid Number", 169 | parkedFromCalleridName: "Parked From, Callerid Name", 170 | parkedFromCalleridNumber: "Parked From, Callerid Number", 171 | 172 | timeout: "Timeout", 173 | 174 | latency: "Latency", 175 | 176 | queue: "Queue", 177 | queueMember: "Queue Member", 178 | queueClient: "Queue Client", 179 | statistics: "Statistics", 180 | max: "Max", 181 | maxCalls: "Max Calls", 182 | holdtime: "Holdtime", 183 | talktime: "Talktime", 184 | completed: "Completed", 185 | completedCalls: "Completed Calls", 186 | abandoned: "Abandoned", 187 | abandonedCalls: "Abandoned Calls", 188 | serviceLevel: "Service Level", 189 | serviceLevelPerf: "Service Level Perf.", 190 | weight: "Weight", 191 | members: "Members", 192 | clients: "Clients", 193 | nameLocation: "Location/Name", 194 | callsTaken: "Calls Taken", 195 | callsTaken2: "Calls Taken", 196 | lastCall: "Last Call", 197 | penalty: "Penalty", 198 | addExternalMember: "Add External Member", 199 | viewQueueInfo: "View Queue Info", 200 | memberName: "Member Name", 201 | memberLocation: "Member Location", 202 | membership: "Membership", 203 | locationFormat: "Format: Local/<external_number>@<context>", 204 | stateInterface: "State Interface", 205 | answered: "Answered", 206 | paused: "Paused", 207 | pauseMember: "Pause Member", 208 | unpauseMember: "Unpause Member", 209 | pauseThisMember: "Pause this Queue Member?", 210 | unpauseThisMember: "Unpause this Queue Member?", 211 | removeMember: "Remove Member", 212 | removeMemberFromQueue: "Remove this Member from Queue \"#{QUEUENAME}\"?", 213 | viewMemberInfo: "View Member Info", 214 | viewClientInfo: "View Client Info", 215 | dropClient: "Drop Client (Hangup)", 216 | dropThisQueueClient: "Drop this Queue Client?", 217 | position: "Position", 218 | waitingSince: "Waiting Since", 219 | 220 | createDynamicMeetme: "Create Dynamic Conference", 221 | meetme: "Conference", 222 | 223 | // Only used on other languages 224 | _statusMap: { 225 | "down": "down", 226 | "unregistered": "unregistered", 227 | "unreachable": "unreachable", 228 | "unknown": "unknown", 229 | "unavailable": "unavailable", 230 | "invalid": "invalid", 231 | "busy": "busy", 232 | "logged out": "logged out", 233 | "red alarm": "red alarm", 234 | "ring": "ring", 235 | "ringing": "ringing", 236 | "ring, in use": "ring, in use", 237 | "in use": "in use", 238 | "dial": "dial", 239 | "dialing": "dialing", 240 | "lagged": "lagged", 241 | "on hold": "on hold", 242 | "off hook": "off hook", 243 | "yellow alarm": "yellow alarm", 244 | "dnd enabled": "dnd enabled", 245 | "blue alarm": "blue alarm", 246 | "up": "up", 247 | "link": "link", 248 | "unlink": "unlink", 249 | "registered": "registered", 250 | "reachable": "reachable", 251 | "unmonitored": "unmonitored", 252 | "not in use": "not in use", 253 | "logged in": "logged in", 254 | "no alarm": "no alarm", 255 | "on hook": "on hook", 256 | "signal": "signal" 257 | } 258 | }; 259 | -------------------------------------------------------------------------------- /lib/yui-2.9.0/build/tabview/tabview-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 2.9.0 6 | */ 7 | (function(){var b=YAHOO.util,c=b.Dom,i=b.Event,g=window.document,k="active",d="activeIndex",f="activeTab",e="disabled",a="contentEl",h="element",j=function(m,l){l=l||{};if(arguments.length==1&&!YAHOO.lang.isString(m)&&!m.nodeName){l=m;m=l.element||null;}if(!m&&!l.element){m=this._createTabViewElement(l);}j.superclass.constructor.call(this,m,l);};YAHOO.extend(j,b.Element,{CLASSNAME:"yui-navset",TAB_PARENT_CLASSNAME:"yui-nav",CONTENT_PARENT_CLASSNAME:"yui-content",_tabParent:null,_contentParent:null,addTab:function(n,o){var p=this.get("tabs"),s=this._tabParent,q=this._contentParent,l=n.get(h),m=n.get(a),t=this.get(d),r;if(!p){this._queue[this._queue.length]=["addTab",arguments];return false;}r=this.getTab(o);o=(o===undefined)?p.length:o;p.splice(o,0,n);if(r){s.insertBefore(l,r.get(h));if(m){q.appendChild(m);}}else{s.appendChild(l);if(m){q.appendChild(m);}}if(!n.get(k)){n.set("contentVisible",false,true);if(o<=t){this.set(d,t+1,true);}}else{this.set(f,n,true);this.set("activeIndex",o,true);}this._initTabEvents(n);},_initTabEvents:function(l){l.addListener(l.get("activationEvent"),l._onActivate,this,l);l.addListener("activationEventChange",l._onActivationEventChange,this,l);},_removeTabEvents:function(l){l.removeListener(l.get("activationEvent"),l._onActivate,this,l);l.removeListener("activationEventChange",l._onActivationEventChange,this,l);},DOMEventHandler:function(q){var r=i.getTarget(q),t=this._tabParent,s=this.get("tabs"),n,m,l;if(c.isAncestor(t,r)){for(var o=0,p=s.length;o1){if(m+1===n){this.set(d,m-1);}else{this.set(d,m+1);}}else{this.set(f,null);}}else{if(m"; 58 | $error .= "Make sure monast.py is running so the panel can connect to its port properly."; 59 | session_start(); 60 | setValor('error', $error); 61 | session_write_close(); 62 | header("Location: index.php"); 63 | die; 64 | break; 65 | 66 | case "ERROR :: Internal Server Error": 67 | $error = "We got \"Internal Server Error\" connecting to http://" . HOSTNAME . ":" . HOSTPORT . "/getUpdates.
"; 68 | $error .= "Please lookup log file and report errors at http://monast.sf.net"; 69 | session_start(); 70 | setValor('error', $error); 71 | session_write_close(); 72 | header("Location: index.php"); 73 | die; 74 | break; 75 | 76 | default: 77 | $servers = monast_json_decode($response); 78 | sort($servers); 79 | session_start(); 80 | setValor('Servers', $servers); 81 | if (!$server || array_search($server, $servers) === false) 82 | { 83 | $server = $servers[0]; 84 | setValor('Server', $server); 85 | } 86 | session_write_close(); 87 | break; 88 | } 89 | 90 | $status = null; 91 | $response = doGet("getStatus", array("servername" => $server)); 92 | switch ($response) 93 | { 94 | case "ERROR :: Connection Refused": 95 | case "ERROR :: Authentication Required": 96 | session_start(); 97 | setValor('login', false); 98 | session_write_close(); 99 | header("Location: index.php"); 100 | die; 101 | break; 102 | 103 | case "ERROR :: Request Not Found": 104 | $error = "The request to http://" . HOSTNAME . ":" . HOSTPORT . "/getUpdates was not found.
"; 105 | $error .= "Make sure monast.py is running so the panel can connect to its port properly."; 106 | session_start(); 107 | setValor('error', $error); 108 | session_write_close(); 109 | header("Location: index.php"); 110 | die; 111 | break; 112 | 113 | case "ERROR :: Internal Server Error": 114 | $error = "We got an Internal Server Error connecting to http://" . HOSTNAME . ":" . HOSTPORT . "/getUpdates.
"; 115 | $error .= "Please lookup log file and report errors at http://monast.sf.net"; 116 | session_start(); 117 | setValor('error', $error); 118 | session_write_close(); 119 | header("Location: index.php"); 120 | die; 121 | break; 122 | 123 | default: 124 | $status = monast_json_decode($response); 125 | break; 126 | } 127 | 128 | $templateContent = ""; 129 | $dir = opendir("template"); 130 | while (($file = readdir($dir))) 131 | { 132 | if (preg_match("/^template_.*\.html$/", $file) && $file != "template_default.html") 133 | $templateContent .= file_get_contents("template/$file"); 134 | 135 | if ($file == "user_template_$username.html") 136 | { 137 | $templateContent = file_get_contents("template/user_template_$username.html"); 138 | break; 139 | } 140 | } 141 | closedir($dir); 142 | 143 | $template->prepare(); 144 | $template->assign("templates", $templateContent . file_get_contents("template/template_default.html")); 145 | $template->assign('MONAST_CALL_TIME', MONAST_CALL_TIME ? 'true' : 'false'); 146 | $template->assign('MONAST_BLINK_ONCHANGE', MONAST_BLINK_ONCHANGE ? 'true' : 'false'); 147 | $template->assign('MONAST_BLINK_COUNT', MONAST_BLINK_COUNT); 148 | $template->assign('MONAST_BLINK_INTERVAL', MONAST_BLINK_INTERVAL); 149 | $template->assign('MONAST_KEEP_CALLS_SORTED', MONAST_KEEP_CALLS_SORTED ? 'true' : 'false'); 150 | $template->assign('MONAST_KEEP_PARKEDCALLS_SORTED', MONAST_KEEP_PARKEDCALLS_SORTED ? 'true' : 'false'); 151 | $template->assign('MONAST_GROUP_BY_TECH', MONAST_GROUP_BY_TECH ? 'true' : 'false'); 152 | $template->assign('MONAST_USERNAME', $username); 153 | 154 | if (MONAST_CLI_TAB) 155 | { 156 | $template->newBlock('cli_tab'); 157 | $template->newBlock('cli_tab_div'); 158 | } 159 | 160 | if (MONAST_DEBUG_TAB || getValor('debug')) 161 | { 162 | $template->newBlock('debug_tab'); 163 | $template->newBlock('debug_tab_div'); 164 | } 165 | 166 | // Users/Peers 167 | $serverPeers = array("MonAst" => $status[$server]['peers']); 168 | if (MONAST_GROUP_BY_TECH) 169 | { 170 | $serverPeers = array(); 171 | foreach ($status[$server]['peers'] as $peer) 172 | { 173 | if (!array_key_exists($peer['channeltype'], $serverPeers)) 174 | $serverPeers[$peer['channeltype']] = array(); 175 | 176 | $serverPeers[$peer['channeltype']][] = $peer; 177 | } 178 | } 179 | 180 | $techs = array_keys($serverPeers); 181 | sort($techs); 182 | foreach ($techs as $tech) 183 | { 184 | $peers = $serverPeers[$tech]; 185 | 186 | if (count($peers) > 0) 187 | { 188 | $template->newBlock('technology'); 189 | $template->assign('technology', $tech); 190 | $template->assign('count', count($peers)); 191 | 192 | $groups = array(); 193 | 194 | foreach ($peers as $idx => $peer) 195 | { 196 | $template->newBlock('process'); 197 | $template->assign('json', str_replace("'", "\'", monast_json_encode(($peer)))); 198 | 199 | if (array_key_exists("peergroup", $peer)) 200 | { 201 | if (array_key_exists($peer["peergroup"], $groups)) 202 | $groups[$peer["peergroup"]] += 1; 203 | else 204 | $groups[$peer["peergroup"]] = 1; 205 | } 206 | } 207 | 208 | foreach ($groups as $group => $count) 209 | { 210 | if ($group != "No Group") 211 | { 212 | $template->newBlock('peergroup'); 213 | $template->assign('technology', $tech); 214 | $template->assign('group', $group); 215 | $template->assign('count', $count); 216 | } 217 | } 218 | if (array_key_exists("No Group", $groups)) 219 | { 220 | $template->newBlock('peergroup'); 221 | $template->assign('technology', $tech); 222 | $template->assign('group', "No Group"); 223 | $template->assign('count', $groups["No Group"]); 224 | } 225 | } 226 | } 227 | 228 | // Channels and Bridges 229 | foreach ($status[$server]['channels'] as $channel) 230 | { 231 | $channel['channel'] = htmlentities($channel['channel']); 232 | 233 | $template->newBlock('process'); 234 | $template->assign('json', str_replace("'", "\'", monast_json_encode(($channel)))); 235 | } 236 | foreach ($status[$server]['bridges'] as $bridge) 237 | { 238 | $bridge['channel'] = htmlentities($bridge['channel']); 239 | $bridge['bridgedchannel'] = htmlentities($bridge['bridgedchannel']); 240 | 241 | $template->newBlock('process'); 242 | $template->assign('json', str_replace("'", "\'", monast_json_encode(($bridge)))); 243 | } 244 | 245 | // Meetmes 246 | foreach ($status[$server]['meetmes'] as $meetme) 247 | { 248 | $template->newBlock('process'); 249 | $template->assign('json', str_replace("'", "\'", monast_json_encode(($meetme)))); 250 | } 251 | 252 | // Parked Calls 253 | foreach ($status[$server]['parkedCalls'] as $parked) 254 | { 255 | $template->newBlock('process'); 256 | $template->assign('json', str_replace("'", "\'", monast_json_encode(($parked)))); 257 | } 258 | 259 | // Queues 260 | foreach ($status[$server]['queues'] as $queue) 261 | { 262 | $template->newBlock('process'); 263 | $template->assign('json', str_replace("'", "\'", monast_json_encode(($queue)))); 264 | } 265 | foreach ($status[$server]['queueMembers'] as $queueMember) 266 | { 267 | $template->newBlock('process'); 268 | $template->assign('json', str_replace("'", "\'", monast_json_encode(($queueMember)))); 269 | } 270 | foreach ($status[$server]['queueClients'] as $queueClient) 271 | { 272 | $template->newBlock('process'); 273 | $template->assign('json', str_replace("'", "\'", monast_json_encode(($queueClient)))); 274 | } 275 | foreach ($status[$server]['queueCalls'] as $queueCall) 276 | { 277 | $template->newBlock('process'); 278 | $template->assign('json', str_replace("'", "\'", monast_json_encode(($queueCall)))); 279 | } 280 | 281 | $template->printToScreen(); 282 | 283 | ?> 284 | -------------------------------------------------------------------------------- /js/lang.ru_RU.js: -------------------------------------------------------------------------------- 1 | 2 | var Language = { 3 | information: "Информация", 4 | error: "Ошибка", 5 | warning: "Предупреждение", 6 | confirmation: "Подтверждение", 7 | yes: "Да", 8 | no: "Нет", 9 | start: "Запустить", 10 | stop: "Остановить", 11 | server: "Сервер", 12 | reload: "Перезагрузить", 13 | initializing: "Инициирование", 14 | create: "Создание", 15 | uninitialized: "Неинициализирован", 16 | online: "Онлайн", 17 | loaded: "Загружено", 18 | interactive: "Интерактивный", 19 | complete: "Завершить", 20 | authenticationRequired: "Требуется аутентификация", 21 | authentication: "Аутентификация", 22 | user: "Пользователь", 23 | secret: "Пароль", 24 | login: "Вход", 25 | logout: "Выход", 26 | send: "Отправить", 27 | clear: "Очистить", 28 | monastError: "MonAst Ошибка", 29 | errorMessage: "Сообщение об ошибке", 30 | connectionError: "Не удалось подключиться к http://#{HOSTNAME}:#{HOSTPORT} (#{RESPONSE}).
Убедитесь, что monast.py запущен, чтобы панель могла правильно подключиться к порту.", 31 | requestError: "При запросе к http://#{HOSTNAME}:#{HOSTPORT}/isAuthenticated получен ответ \"не был найден\".
Убедитесь, что monast.py запущен, чтобы панель могла правильно подключиться к порту.", 32 | internalServerError: "Получено \"Internal Server Error\" при запросе к http://#{HOSTNAME}:#{HOSTPORT}/isAuthenticated.
Пожалуйста, просмотрите файл журнала и сообщите об ошибках по адресу http://monast.sf.net", 33 | requestStatusError: "При запросе статуса произошла ошибка!
Нажмите F5, чтобы перезагрузить MonAst.", 34 | invalidUsernameSecret: "Недействительное имя пользователя или пароль", 35 | youMustDefineAnUser: "Вы должны определить пользователя", 36 | userNotDefined: "Пользователь не определен!", 37 | authenticatingPleaseWait: "Аутентификация, пожалуйста, подождите...", 38 | authenticatedReloading: "Аутентификация, перезагрузка...", 39 | loggingOutPleaseWait: "Выход из системы, пожалуйста, подождите...", 40 | reloadNeeded: "Необходимо перезагрузить, нажмите F5.", 41 | reloadingPleaseWait: "Перезагрузка, подождите...", 42 | reloadRequestedPleaseWait: "Перезагрузка запрошена, подождите...", 43 | changingServer: "Смена сервера...", 44 | cannotChangeServerOfflineReload: "Не возможно сменить сервер, Monast не в сети...
Обновите страницу...", 45 | 46 | mixedPannels: "Смешанные панели", 47 | peersUsers: "Пиры/Пользователи", 48 | peerUser: "Пир/Пользователь", 49 | meetmeRooms: "Конференции", 50 | parkedCallAt: "Припаркованный вызов на", 51 | parkedCalls: "Парковка", 52 | parkedCalls2: "Припаркованные вызовы", 53 | queues: "Очереди", 54 | asteriskCli: "Asterisk CLI", 55 | debug: "Отладка", 56 | pannelsToShow: "Панели для показа", 57 | 58 | from: "От", 59 | to: "К", 60 | 61 | noGroup: "Нет группы", 62 | originateCall: "Создать вызов", 63 | viewPeerCalls: "Просмотр пользователей/пиров каналов/звонков", 64 | viewPeerInfo: "Просмотр информации о пользователе/пире", 65 | execute: "Выполнить", 66 | sendResetToModem: "Послать команду сброса модему", 67 | reallyResetModem: "Вам действительно нужно сбросить этот канал?", 68 | turnMemberOf: "Включить участника", 69 | turnMemberOfQueue: "Вернуть этого пользователя в очередь \"#{QUEUENAME}\"?", 70 | removeMemberFrom: "Удалить участника из", 71 | meetmeInvite: "Приглашение в конференцию", 72 | inviteTo: "Пригласить в", 73 | inviteToMeetme: "Пригласите этого пользователя/пир в конференцию \"#{MEETME}\"", 74 | inviteNumbers: "Пригласить по номеру", 75 | inviteNumbersToMeetme: "Приглашение в конференцию по номерам", 76 | inviteCallToMeetme: "Пригласить этот вызов в конференцию \"#{MEETME}\"?", 77 | numbers: "Номера", 78 | onePerLine: "по одному в каждой строке", 79 | ifNotExistsCreateDynamic: "если конференция не существует,
она будет создана динамически", 80 | meetmeUser: "Участник конференции", 81 | kickUser: "Отключить участника", 82 | viewMeetmeUserInfo: "Просмотри информации об участнике", 83 | requestMeetmeKickFrom: "Отправить приглашение этому пользователю с конференции \"#{MEETME}\"?", 84 | userNumber: "Номер пользователя", 85 | 86 | uniqueid: "Уникальный", 87 | sourceUniqueid: "Уникальный источник", 88 | destinationUniqueid: "Уникальное направление", 89 | 90 | noActivePeerCalls: "Нет активных каналов/вызовов для этого пользователя/пира", 91 | notValidCalleridNumber: "У этого пользователя/пира нет допустимого номера CallerID для передачи в", 92 | 93 | selectActionForChannel: "Выберите действие для канала #{UNIQUEID} (#{CHANNEL})", 94 | selectActionForCall: "Выберите действие для вызова #{UNIQUEID} -> #{BRIDGEDUNIQUEID}", 95 | selectChannelToTransfer: "Выберите канал для перевода", 96 | selectChannelToPark: "Выберите канал для парковки", 97 | 98 | hangup: "Завершить вызов", 99 | requestHangupChannel: "Разорвать этот канал?", 100 | requestHangupCall: "Завершить этот вызов?", 101 | requestHangupParkedCall: "Завершить этот припаркованный вызов?", 102 | 103 | channel: "Канал", 104 | channels: "Каналы", 105 | channelType: "Тип канала", 106 | channelName: "Имя канала", 107 | channelVariables: "Переменные канала", 108 | channelsCalls: "Каналы/Вызовы", 109 | channelMonitored: "Мониторинг канала", 110 | channelSpyed: "Канал прослушивается", 111 | sourceChannel: "Канал источник", 112 | destinationChannel: "Канал назначения", 113 | 114 | viewChannelInfo: "Просмотр информации о канале", 115 | viewCallInfo: "Просмотр информации о вызове", 116 | viewParkedCallInfo: "Просмотр информации о запаркованом вызове", 117 | 118 | transfer: "Перевод", 119 | transferCall: "Перевод вызова", 120 | transferDestination: "Назначение для перевода", 121 | transferParkedCall: "Перевод припаркованного вызова", 122 | requestTransferParkedCallTo: "Перевести припаркованный авыхов на пользователя/пир \"#{CALLERID}\"?", 123 | 124 | reallyTransferChannelTo: "Вы действительно хотите перевести канал \"#{CHANNEL}\" на \"#{CALLERID}\"?", 125 | 126 | noSpyerNumber: "Не указан номер прослушивающего!", 127 | 128 | spy: "Прослушивание", 129 | spyed: "Прослушивается", 130 | spyer: "Слушающий", 131 | spyerNumber: "Номер слушающего", 132 | requestSpyChannel: "Запросить прослушивание канала?", 133 | requestSpyCall: "Запросить прослушивание вызова?", 134 | 135 | park: "Парковка", 136 | 137 | monitored: "Записывается", 138 | monitorStart: "Начать запись", 139 | monitorStop: "Остановить запись", 140 | monitorToThisChannel: "Записывать этот канал?", 141 | 142 | peerName: "Имя пира", 143 | peerContext: "Контекст пира", 144 | 145 | callerid: "CallerID", 146 | calleridName: "CallerID Имя", 147 | calleridNumber: "CallerID Номер", 148 | sourceCallerid: "CallerID истояника", 149 | destinationCallerid: "CallerID назначения", 150 | 151 | status: "Статус", 152 | state: "Состояние", 153 | 154 | activeCalls: "Активные вызовы", 155 | 156 | call: "Вызов", 157 | calls: "вызов(ы)", 158 | calls2: "Вызовы", 159 | callsAbreviated: "вызов.", 160 | callStatus: "Статус вызова", 161 | callDuration: "Продолж. вызова", 162 | 163 | exten: "Добавочный", 164 | 165 | parkedFrom: "Припаркован От", 166 | parkedChannel: "Припаркован канал", 167 | parkedCalleridName: "Припаркован CallerID Имя", 168 | parkedCalleridNumber: "Припаркован CallerID Номер", 169 | parkedFromCalleridName: "Припаркован От, CallerID Имя", 170 | parkedFromCalleridNumber: "Припаркован От, CallerID Номер", 171 | 172 | timeout: "Перерыв", 173 | 174 | latency: "Задержка", 175 | 176 | queue: "Очередь", 177 | queueMember: "Участник очереди", 178 | queueClient: "Пользователь очереди", 179 | statistics: "Статистика", 180 | max: "Макс.", 181 | maxCalls: "Макс. вызовов", 182 | holdtime: "Время ожид.", 183 | talktime: "Время соедин.", 184 | completed: "Завершенных", 185 | completedCalls: "Завершенных вызовов", 186 | abandoned: "Потеряных", 187 | abandonedCalls: "Потеряных вызовов", 188 | serviceLevel: "Уров. обслуж.", 189 | serviceLevelPerf: "Уров. обслуж. %", 190 | weight: "Weight", 191 | members: "Участники", 192 | clients: "Ожидающие", 193 | nameLocation: "Тех./Имя", 194 | callsTaken: "Принятые вызовы", 195 | callsTaken2: "Принятые вызовы", 196 | lastCall: "Последний вызов", 197 | penalty: "Уров. компетенции", 198 | addExternalMember: "ДОбавить внешнего пользователя", 199 | viewQueueInfo: "Просмотр информации об очереди", 200 | memberName: "Имя участника", 201 | memberLocation: "Местоположение участника", 202 | membership: "Членство", 203 | locationFormat: "Формат: Local/<внешний_номер>@<контекст>", 204 | stateInterface: "Состояние интерфейса", 205 | answered: "Отвечен", 206 | paused: "Перерыв", 207 | pauseMember: "Приостановить", 208 | unpauseMember: "Снять с перерыва", 209 | pauseThisMember: "Приостановить участника очереди?", 210 | unpauseThisMember: "Снять с перерыва участника очереди?", 211 | removeMember: "Удалить участника", 212 | removeMemberFromQueue: "Удалить участника очереди \"#{QUEUENAME}\"?", 213 | viewMemberInfo: "Просмотр информации об участнике", 214 | viewClientInfo: "Просмотр информации о пользователе", 215 | dropClient: "Сбросить пользователя (Завершить)", 216 | dropThisQueueClient: "Сбросить пользователя пользователя очереди?", 217 | position: "Позиция", 218 | waitingSince: "Ожидание с", 219 | 220 | createDynamicMeetme: "Создать динамическую конференцию", 221 | meetme: "Конференция", 222 | 223 | // Only used on other languages 224 | _statusMap: { 225 | "down": "не отвечен", 226 | "unregistered": "не зарегестр.", 227 | "unreachable": "не отвечает", 228 | "unknown": "неизвестно", 229 | "unavailable": "недоступен", 230 | "invalid": "не сущест.", 231 | "busy": "занят", 232 | "logged out": "вышел", 233 | "red alarm": "красный авар.", 234 | "ring": "звонок", 235 | "ringing": "звонит", 236 | "ring, in use": "звонит, исп.", 237 | "in use": "в разгов.", 238 | "dial": "вызов", 239 | "dialing": "вызывается", 240 | "lagged": "запаздывает", 241 | "on hold": "на удержании", 242 | "off hook": "трубка поднята", 243 | "yellow alarm": "желтый авар.", 244 | "dnd enabled": "dnd включен", 245 | "blue alarm": "синий авар.", 246 | "up": "отвечен", 247 | "link": "соединен", 248 | "unlink": "разъединен", 249 | "registered": "зарегистр.", 250 | "reachable": "доступен", 251 | "unmonitored": "не монитор.", 252 | "not in use": "свободен", 253 | "logged in": "вошел в сист.", 254 | "no alarm": "нет аварий", 255 | "on hook": "трубка положена", 256 | "signal": "сигнал" 257 | } 258 | }; 259 | -------------------------------------------------------------------------------- /js/lang.pt_BR.js: -------------------------------------------------------------------------------- 1 | 2 | var Language = { 3 | information: "Informação", 4 | error: "Erro", 5 | warning: "Atenção", 6 | confirmation: "Confirmação", 7 | yes: "Sim", 8 | no: "Não", 9 | start: "Iniciar", 10 | stop: "Parar", 11 | server: "Servidor", 12 | reload: "Recarregar", 13 | initializing: "Inicializando", 14 | create: "Criado", 15 | uninitialized: "Não Inicializando", 16 | online: "On Line", 17 | loaded: "Carregado", 18 | interactive: "Interativo", 19 | complete: "Completo", 20 | authenticationRequired: "Autenticação Requerida", 21 | authentication: "Autenticação", 22 | user: "Usuário", 23 | secret: "Senha", 24 | login: "Entrar", 25 | logout: "Sair", 26 | send: "Enviar", 27 | clear: "Limpar", 28 | monastError: "Erro do MonAst", 29 | errorMessage: "Mensagem de Erro", 30 | connectionError: "Não foi possível conectar &acrase; http://#{HOSTNAME}:#{HOSTPORT} (#{RESPONSE}).
Verifique se o monast.py está rodando, para que o painel funcione corretamente.", 31 | requestError: "A requisição http://#{HOSTNAME}:#{HOSTPORT}/isAuthenticated não foi encontrada.
Verifique se o monast.py está rodando, para que o painel funcione corretamente.", 32 | internalServerError: "Recebido um \"Internal Server Error\" ao conectar &acrase; http://#{HOSTNAME}:#{HOSTPORT}/isAuthenticated.
Verifique os arquivos de log e reporte os erros em http://monast.sf.net", 33 | requestStatusError: "Ocorreu um erro ao buscar o status!
Por favor recarregue o Monast pressionando F5.", 34 | invalidUsernameSecret: "Usuário e/ou senha inválidos", 35 | youMustDefineAnUser: "Você deve informar um nome de usuário", 36 | userNotDefined: "Usuário não informado!", 37 | authenticatingPleaseWait: "Autenticando, por favor aguarde...", 38 | authenticatedReloading: "Autenticado, recarregando...", 39 | loggingOutPleaseWait: "Encerrando, por favor aguarde...", 40 | reloadNeeded: "Favor Recarregar, Pressione F5.", 41 | reloadingPleaseWait: "Recarregando, por favor aguarde...", 42 | reloadRequestedPleaseWait: "Recarregando, por favor aguarde...", 43 | changingServer: "Alternando Servidor...", 44 | cannotChangeServerOfflineReload: "Impossível mudar o servidor, Monast desconectado...
Favor reinicar...", 45 | 46 | mixedPannels: "Paineis", 47 | peersUsers: "Usuários/Ramais", 48 | peerUser: "Usuário/Ramal", 49 | meetmeRooms: "Conferências", 50 | parkedCallAt: "Estacionamento", 51 | parkedCalls: "Estacionamento", 52 | parkedCalls2: "Chamadas Estacionadas", 53 | queues: "Filas", 54 | asteriskCli: "Asterisk CLI", 55 | debug: "Debug", 56 | pannelsToShow: "Exibir Paineis", 57 | 58 | from: "De", 59 | to: "Para", 60 | 61 | noGroup: "Sem Grupo", 62 | originateCall: "Originar Chamada", 63 | viewPeerCalls: "Exibir Canais/Chamadas deste Usuário/Ramal", 64 | viewPeerInfo: "Exibir Informações deste Usuário/Ramal", 65 | execute: "Executar", 66 | sendResetToModem: "Enviar Reset para o Modem", 67 | reallyResetModem: "Você realmente precisa resetar este Canal?", 68 | turnMemberOf: "Adicionar Membro a Fila", 69 | turnMemberOfQueue: "Adicionar este Usuário como membro da Fila \"#{QUEUENAME}\"?", 70 | removeMemberFrom: "Remover Membro da Fila", 71 | meetmeInvite: "Convite para Conferência", 72 | inviteTo: "Convidar para", 73 | inviteToMeetme: "Convidar este Usuário para a Conferência \"#{MEETME}\"?", 74 | inviteNumbers: "Convidar Números", 75 | inviteNumbersToMeetme: "Convidar Números para Conferência", 76 | inviteCallToMeetme: "Convidar esta Chamada para a Conferência \"#{MEETME}\"?", 77 | numbers: "Números", 78 | onePerLine: "um por linha", 79 | ifNotExistsCreateDynamic: "caso esta conferência não exista,
uma nova conferência dinâmica será criada", 80 | meetmeUser: "Usuário", 81 | kickUser: "Excluir Usuário", 82 | viewMeetmeUserInfo: "Exibir Informações deste Usuário", 83 | requestMeetmeKickFrom: "Solicitar Exclusão deste Usuário da Conferência \"#{MEETME}\"?", 84 | userNumber: "Usuário Número", 85 | 86 | uniqueid: "Uniqueid", 87 | sourceUniqueid: "Uniqueid (origem)", 88 | destinationUniqueid: "Uniqueid (destino)", 89 | 90 | noActivePeerCalls: "Nenhum Canal ou Chamada ativo para este Usuário/Ramal", 91 | notValidCalleridNumber: "Este Usuário/Ramal não possui um Callerid (número) válido para ser transferido", 92 | 93 | selectActionForChannel: "Selecione uma ação para o canal #{UNIQUEID} (#{CHANNEL})", 94 | selectActionForCall: "Selecione uma ação para a chamada #{UNIQUEID} -> #{BRIDGEDUNIQUEID}", 95 | selectChannelToTransfer: "Selecione o Canal a ser Transferido", 96 | selectChannelToPark: "Selecione o Canal a ser Estacionado", 97 | 98 | hangup: "Desligar", 99 | requestHangupChannel: "Requisitar Desligamento deste Canal?", 100 | requestHangupCall: "Requisitar Desligamento desta Chamada?", 101 | requestHangupParkedCall: "Requisitar Desligamento desta Chamada Estacionada?", 102 | 103 | channel: "Canal", 104 | channels: "Canais", 105 | channelType: "Tipo de Canal", 106 | channelName: "Nome do Canal", 107 | channelVariables: "Variáveis de Canal", 108 | channelsCalls: "Canais/Chamadas", 109 | channelMonitored: "Canal sendo Monitorado", 110 | channelSpyed: "Canal sendo Espionado", 111 | sourceChannel: "Canal de Origem", 112 | destinationChannel: "Canal de Destino", 113 | 114 | viewChannelInfo: "Exibir Informações do Canal", 115 | viewCallInfo: "Exibir Informações da Chamada", 116 | viewParkedCallInfo: "Exibir Informações da Chamada Estacionada", 117 | 118 | transfer: "Transferir", 119 | transferCall: "Transferir Chamada", 120 | transferDestination: "Destino da Transferência", 121 | transferParkedCall: "Transferir Chamada Estacionada", 122 | requestTransferParkedCallTo: "Requisitar Transferência desta Chamada Estacionada para o Usuário/Ramal \"#{CALLERID}\"?", 123 | 124 | reallyTransferChannelTo: "Você realmente deseja transferir o canal \"#{CHANNEL}\" para \"#{CALLERID}\"?", 125 | 126 | noSpyerNumber: "Número do Espião não informado!", 127 | 128 | spy: "Espionar", 129 | spyed: "Espionado", 130 | spyer: "Espião", 131 | spyerNumber: "Número do Espião", 132 | requestSpyChannel: "Requisitar espionagem para este canal?", 133 | requestSpyCall: "Requisitar espionagem para esta Chamada?", 134 | 135 | park: "Estacionar", 136 | 137 | monitored: "Monitorado", 138 | monitorStart: "Iniciar Monitoração", 139 | monitorStop: "Parar Monitoração", 140 | monitorToThisChannel: "Monitoração neste Canal?", 141 | 142 | peerName: "Nome do Usuário", 143 | peerContext: "Contexto do Usuário", 144 | 145 | callerid: "Callerid", 146 | calleridName: "Callerid (nome)", 147 | calleridNumber: "Callerid (número)", 148 | sourceCallerid: "Callerid (origem)", 149 | destinationCallerid: "Callerid (destino)", 150 | 151 | status: "Estado", 152 | state: "Estado", 153 | 154 | activeCalls: "Chamadas Ativas", 155 | 156 | call: "Chamada", 157 | calls: "chamada(s)", 158 | calls2: "Chamadas", 159 | callsAbreviated: "chmd(s)", 160 | callStatus: "Estado da Chamada", 161 | callDuration: "Duração da Chamada", 162 | 163 | exten: "Posição", 164 | 165 | parkedFrom: "Estacionado Por", 166 | parkedChannel: "Canal Estacionado", 167 | parkedCalleridName: "Canal Estacionado, Callerid (nome)", 168 | parkedCalleridNumber: "Canal Estacionado, Callerid (número)", 169 | parkedFromCalleridName: "Estacionado Por, Callerid (nome)", 170 | parkedFromCalleridNumber: "Estacionado Por, Callerid (número)", 171 | 172 | timeout: "Timeout", 173 | 174 | latency: "Latência", 175 | 176 | queue: "Fila", 177 | queueMember: "Membro", 178 | queueClient: "Cliente", 179 | statistics: "Estatísticas", 180 | max: "Max", 181 | maxCalls: "Qtd. Max. de Chamadas", 182 | holdtime: "Tempo de Espera", 183 | talktime: "Tempo de Atendimento", 184 | completed: "Completadas", 185 | completedCalls: "Chamadas Completadas", 186 | abandoned: "Abandonadas", 187 | abandonedCalls: "Chamadas Abandonadas", 188 | serviceLevel: "Nível de Serviço", 189 | serviceLevelPerf: "Performance", 190 | weight: "Peso", 191 | members: "Membros", 192 | clients: "Clientes", 193 | nameLocation: "Nome/Local", 194 | callsTaken: "Cham. At.", 195 | callsTaken2: "Chamadas Atendidas", 196 | lastCall: "última Chamada", 197 | penalty: "Penalty", 198 | addExternalMember: "Adicionar Membro Externo", 199 | viewQueueInfo: "Exibir Informações da Fila", 200 | memberName: "Nome do Membro", 201 | memberLocation: "Local do Membro", 202 | membership: "Tipo de Membro", 203 | locationFormat: "Formato: Local/<numero_externo>@<contexto>", 204 | stateInterface: "Interface de Estado (BLF)", 205 | answered: "Em Atendimento", 206 | paused: "Em Pausa", 207 | pauseMember: "Colocar em Pausa", 208 | unpauseMember: "Remover da Pausa", 209 | pauseThisMember: "Colocar este Membro em Pausa?", 210 | unpauseThisMember: "Retirar este membro da Pausa?", 211 | removeMember: "Remover Membro", 212 | removeMemberFromQueue: "Remover este Membro da Fila \"#{QUEUENAME}\"?", 213 | viewMemberInfo: "Exibir Informações do Membro", 214 | viewClientInfo: "Exibir Informações do Cliente", 215 | dropClient: "Remover Cliente (Desligar Chamada)", 216 | dropThisQueueClient: "Remover este Cliente (Desligar Chamada)?", 217 | position: "Posição", 218 | waitingSince: "Aguardando Desde", 219 | 220 | createDynamicMeetme: "Criar Conferência", 221 | meetme: "Conferência", 222 | 223 | _statusMap: { 224 | "down": "Inativo", 225 | "unregistered": "Não Registrado", 226 | "unreachable": "Inalcançável", 227 | "unknown": "Desconhecido", 228 | "unavailable": "Indisponível", 229 | "invalid": "Inválido", 230 | "busy": "Ocupado", 231 | "logged out": "Deslogado", 232 | "red alarm": "Al. Vermelho", 233 | "ring": "Chamando", 234 | "ringing": "Tocando", 235 | "ring, in use": "Chamando, em uso", 236 | "in use": "Em Uso", 237 | "dial": "Discando", 238 | "dialing": "Discagem", 239 | "lagged": "Defasado", 240 | "on hold": "Em Espera", 241 | "off hook": "Fora do Gancho", 242 | "yellow alarm": "Al. Amarelo", 243 | "dnd enabled": "Não Perturbe", 244 | "blue alarm": "Al. Azul", 245 | "up": "Ativo", 246 | "link": "Ativa", 247 | "unlink": "Inativa", 248 | "registered": "Registrado", 249 | "reachable": "Alcançável", 250 | "unmonitored": "Não Monitorado", 251 | "not in use": "Disponível", 252 | "logged in": "Logado", 253 | "no alarm": "Sem Alarmes", 254 | "on hook": "No Gancho", 255 | "signal": "Sinal" 256 | } 257 | }; 258 | -------------------------------------------------------------------------------- /lib/yui-2.9.0/build/animation/animation-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 2.9.0 6 | */ 7 | (function(){var b=YAHOO.util;var a=function(d,c,e,f){if(!d){}this.init(d,c,e,f);};a.NAME="Anim";a.prototype={toString:function(){var c=this.getEl()||{};var d=c.id||c.tagName;return(this.constructor.NAME+": "+d);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(c,e,d){return this.method(this.currentFrame,e,d-e,this.totalFrames);},setAttribute:function(c,f,e){var d=this.getEl();if(this.patterns.noNegatives.test(c)){f=(f>0)?f:0;}if(c in d&&!("style" in d&&c in d.style)){d[c]=f;}else{b.Dom.setStyle(d,c,f+e);}},getAttribute:function(c){var e=this.getEl();var g=b.Dom.getStyle(e,c);if(g!=="auto"&&!this.patterns.offsetUnit.test(g)){return parseFloat(g);}var d=this.patterns.offsetAttribute.exec(c)||[];var h=!!(d[3]);var f=!!(d[2]);if("style" in e){if(f||(b.Dom.getStyle(e,"position")=="absolute"&&h)){g=e["offset"+d[0].charAt(0).toUpperCase()+d[0].substr(1)];}else{g=0;}}else{if(c in e){g=e[c];}}return g;},getDefaultUnit:function(c){if(this.patterns.defaultUnit.test(c)){return"px";}return"";},setRuntimeAttribute:function(d){var j;var e;var f=this.attributes;this.runtimeAttributes[d]={};var h=function(i){return(typeof i!=="undefined");};if(!h(f[d]["to"])&&!h(f[d]["by"])){return false;}j=(h(f[d]["from"]))?f[d]["from"]:this.getAttribute(d);if(h(f[d]["to"])){e=f[d]["to"];}else{if(h(f[d]["by"])){if(j.constructor==Array){e=[];for(var g=0,c=j.length;g0&&isFinite(o)){if(k.currentFrame+o>=n){o=n-(m+1);}k.currentFrame+=o;}};this._queue=c;this._getIndex=a;};YAHOO.util.Bezier=new function(){this.getPosition=function(e,d){var f=e.length;var c=[];for(var b=0;b0&&!(m[0] instanceof Array)){m=[m];}else{var l=[];for(n=0,p=m.length;n0){this.runtimeAttributes[q]=this.runtimeAttributes[q].concat(m);}this.runtimeAttributes[q][this.runtimeAttributes[q].length]=j;}else{f.setRuntimeAttribute.call(this,q);}};var b=function(g,i){var h=e.Dom.getXY(this.getEl());g=[g[0]-h[0]+i[0],g[1]-h[1]+i[1]];return g;};var d=function(g){return(typeof g!=="undefined");};e.Motion=a;})();(function(){var d=function(f,e,g,h){if(f){d.superclass.constructor.call(this,f,e,g,h);}};d.NAME="Scroll";var b=YAHOO.util;YAHOO.extend(d,b.ColorAnim);var c=d.superclass;var a=d.prototype;a.doMethod=function(e,h,f){var g=null;if(e=="scroll"){g=[this.method(this.currentFrame,h[0],f[0]-h[0],this.totalFrames),this.method(this.currentFrame,h[1],f[1]-h[1],this.totalFrames)];}else{g=c.doMethod.call(this,e,h,f);}return g;};a.getAttribute=function(e){var g=null;var f=this.getEl();if(e=="scroll"){g=[f.scrollLeft,f.scrollTop];}else{g=c.getAttribute.call(this,e);}return g;};a.setAttribute=function(e,h,g){var f=this.getEl();if(e=="scroll"){f.scrollLeft=h[0];f.scrollTop=h[1];}else{c.setAttribute.call(this,e,h,g);}};b.Scroll=d;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.9.0",build:"2800"}); -------------------------------------------------------------------------------- /pymon/simplejson/__init__.py: -------------------------------------------------------------------------------- 1 | r"""JSON (JavaScript Object Notation) is a subset of 2 | JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data 3 | interchange format. 4 | 5 | :mod:`simplejson` exposes an API familiar to users of the standard library 6 | :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained 7 | version of the :mod:`json` library contained in Python 2.6, but maintains 8 | compatibility with Python 2.4 and Python 2.5 and (currently) has 9 | significant performance advantages, even without using the optional C 10 | extension for speedups. 11 | 12 | Encoding basic Python object hierarchies:: 13 | 14 | >>> import simplejson as json 15 | >>> json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}]) 16 | '["foo", {"bar": ["baz", null, 1.0, 2]}]' 17 | >>> print json.dumps("\"foo\bar") 18 | "\"foo\bar" 19 | >>> print json.dumps(u'\u1234') 20 | "\u1234" 21 | >>> print json.dumps('\\') 22 | "\\" 23 | >>> print json.dumps({"c": 0, "b": 0, "a": 0}, sort_keys=True) 24 | {"a": 0, "b": 0, "c": 0} 25 | >>> from StringIO import StringIO 26 | >>> io = StringIO() 27 | >>> json.dump(['streaming API'], io) 28 | >>> io.getvalue() 29 | '["streaming API"]' 30 | 31 | Compact encoding:: 32 | 33 | >>> import simplejson as json 34 | >>> json.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',',':')) 35 | '[1,2,3,{"4":5,"6":7}]' 36 | 37 | Pretty printing:: 38 | 39 | >>> import simplejson as json 40 | >>> s = json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4) 41 | >>> print '\n'.join([l.rstrip() for l in s.splitlines()]) 42 | { 43 | "4": 5, 44 | "6": 7 45 | } 46 | 47 | Decoding JSON:: 48 | 49 | >>> import simplejson as json 50 | >>> obj = [u'foo', {u'bar': [u'baz', None, 1.0, 2]}] 51 | >>> json.loads('["foo", {"bar":["baz", null, 1.0, 2]}]') == obj 52 | True 53 | >>> json.loads('"\\"foo\\bar"') == u'"foo\x08ar' 54 | True 55 | >>> from StringIO import StringIO 56 | >>> io = StringIO('["streaming API"]') 57 | >>> json.load(io)[0] == 'streaming API' 58 | True 59 | 60 | Specializing JSON object decoding:: 61 | 62 | >>> import simplejson as json 63 | >>> def as_complex(dct): 64 | ... if '__complex__' in dct: 65 | ... return complex(dct['real'], dct['imag']) 66 | ... return dct 67 | ... 68 | >>> json.loads('{"__complex__": true, "real": 1, "imag": 2}', 69 | ... object_hook=as_complex) 70 | (1+2j) 71 | >>> import decimal 72 | >>> json.loads('1.1', parse_float=decimal.Decimal) == decimal.Decimal('1.1') 73 | True 74 | 75 | Specializing JSON object encoding:: 76 | 77 | >>> import simplejson as json 78 | >>> def encode_complex(obj): 79 | ... if isinstance(obj, complex): 80 | ... return [obj.real, obj.imag] 81 | ... raise TypeError(repr(o) + " is not JSON serializable") 82 | ... 83 | >>> json.dumps(2 + 1j, default=encode_complex) 84 | '[2.0, 1.0]' 85 | >>> json.JSONEncoder(default=encode_complex).encode(2 + 1j) 86 | '[2.0, 1.0]' 87 | >>> ''.join(json.JSONEncoder(default=encode_complex).iterencode(2 + 1j)) 88 | '[2.0, 1.0]' 89 | 90 | 91 | Using simplejson.tool from the shell to validate and pretty-print:: 92 | 93 | $ echo '{"json":"obj"}' | python -m simplejson.tool 94 | { 95 | "json": "obj" 96 | } 97 | $ echo '{ 1.2:3.4}' | python -m simplejson.tool 98 | Expecting property name: line 1 column 2 (char 2) 99 | """ 100 | __version__ = '2.0.9' 101 | __all__ = [ 102 | 'dump', 'dumps', 'load', 'loads', 103 | 'JSONDecoder', 'JSONEncoder', 104 | ] 105 | 106 | __author__ = 'Bob Ippolito ' 107 | 108 | from decoder import JSONDecoder 109 | from encoder import JSONEncoder 110 | 111 | _default_encoder = JSONEncoder( 112 | skipkeys=False, 113 | ensure_ascii=True, 114 | check_circular=True, 115 | allow_nan=True, 116 | indent=None, 117 | separators=None, 118 | encoding='utf-8', 119 | default=None, 120 | ) 121 | 122 | def dump(obj, fp, skipkeys=False, ensure_ascii=True, check_circular=True, 123 | allow_nan=True, cls=None, indent=None, separators=None, 124 | encoding='utf-8', default=None, **kw): 125 | """Serialize ``obj`` as a JSON formatted stream to ``fp`` (a 126 | ``.write()``-supporting file-like object). 127 | 128 | If ``skipkeys`` is true then ``dict`` keys that are not basic types 129 | (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``) 130 | will be skipped instead of raising a ``TypeError``. 131 | 132 | If ``ensure_ascii`` is false, then the some chunks written to ``fp`` 133 | may be ``unicode`` instances, subject to normal Python ``str`` to 134 | ``unicode`` coercion rules. Unless ``fp.write()`` explicitly 135 | understands ``unicode`` (as in ``codecs.getwriter()``) this is likely 136 | to cause an error. 137 | 138 | If ``check_circular`` is false, then the circular reference check 139 | for container types will be skipped and a circular reference will 140 | result in an ``OverflowError`` (or worse). 141 | 142 | If ``allow_nan`` is false, then it will be a ``ValueError`` to 143 | serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) 144 | in strict compliance of the JSON specification, instead of using the 145 | JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``). 146 | 147 | If ``indent`` is a non-negative integer, then JSON array elements and object 148 | members will be pretty-printed with that indent level. An indent level 149 | of 0 will only insert newlines. ``None`` is the most compact representation. 150 | 151 | If ``separators`` is an ``(item_separator, dict_separator)`` tuple 152 | then it will be used instead of the default ``(', ', ': ')`` separators. 153 | ``(',', ':')`` is the most compact JSON representation. 154 | 155 | ``encoding`` is the character encoding for str instances, default is UTF-8. 156 | 157 | ``default(obj)`` is a function that should return a serializable version 158 | of obj or raise TypeError. The default simply raises TypeError. 159 | 160 | To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the 161 | ``.default()`` method to serialize additional types), specify it with 162 | the ``cls`` kwarg. 163 | 164 | """ 165 | # cached encoder 166 | if (not skipkeys and ensure_ascii and 167 | check_circular and allow_nan and 168 | cls is None and indent is None and separators is None and 169 | encoding == 'utf-8' and default is None and not kw): 170 | iterable = _default_encoder.iterencode(obj) 171 | else: 172 | if cls is None: 173 | cls = JSONEncoder 174 | iterable = cls(skipkeys=skipkeys, ensure_ascii=ensure_ascii, 175 | check_circular=check_circular, allow_nan=allow_nan, indent=indent, 176 | separators=separators, encoding=encoding, 177 | default=default, **kw).iterencode(obj) 178 | # could accelerate with writelines in some versions of Python, at 179 | # a debuggability cost 180 | for chunk in iterable: 181 | fp.write(chunk) 182 | 183 | 184 | def dumps(obj, skipkeys=False, ensure_ascii=True, check_circular=True, 185 | allow_nan=True, cls=None, indent=None, separators=None, 186 | encoding='utf-8', default=None, **kw): 187 | """Serialize ``obj`` to a JSON formatted ``str``. 188 | 189 | If ``skipkeys`` is false then ``dict`` keys that are not basic types 190 | (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``) 191 | will be skipped instead of raising a ``TypeError``. 192 | 193 | If ``ensure_ascii`` is false, then the return value will be a 194 | ``unicode`` instance subject to normal Python ``str`` to ``unicode`` 195 | coercion rules instead of being escaped to an ASCII ``str``. 196 | 197 | If ``check_circular`` is false, then the circular reference check 198 | for container types will be skipped and a circular reference will 199 | result in an ``OverflowError`` (or worse). 200 | 201 | If ``allow_nan`` is false, then it will be a ``ValueError`` to 202 | serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) in 203 | strict compliance of the JSON specification, instead of using the 204 | JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``). 205 | 206 | If ``indent`` is a non-negative integer, then JSON array elements and 207 | object members will be pretty-printed with that indent level. An indent 208 | level of 0 will only insert newlines. ``None`` is the most compact 209 | representation. 210 | 211 | If ``separators`` is an ``(item_separator, dict_separator)`` tuple 212 | then it will be used instead of the default ``(', ', ': ')`` separators. 213 | ``(',', ':')`` is the most compact JSON representation. 214 | 215 | ``encoding`` is the character encoding for str instances, default is UTF-8. 216 | 217 | ``default(obj)`` is a function that should return a serializable version 218 | of obj or raise TypeError. The default simply raises TypeError. 219 | 220 | To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the 221 | ``.default()`` method to serialize additional types), specify it with 222 | the ``cls`` kwarg. 223 | 224 | """ 225 | # cached encoder 226 | if (not skipkeys and ensure_ascii and 227 | check_circular and allow_nan and 228 | cls is None and indent is None and separators is None and 229 | encoding == 'utf-8' and default is None and not kw): 230 | return _default_encoder.encode(obj) 231 | if cls is None: 232 | cls = JSONEncoder 233 | return cls( 234 | skipkeys=skipkeys, ensure_ascii=ensure_ascii, 235 | check_circular=check_circular, allow_nan=allow_nan, indent=indent, 236 | separators=separators, encoding=encoding, default=default, 237 | **kw).encode(obj) 238 | 239 | 240 | _default_decoder = JSONDecoder(encoding=None, object_hook=None) 241 | 242 | 243 | def load(fp, encoding=None, cls=None, object_hook=None, parse_float=None, 244 | parse_int=None, parse_constant=None, **kw): 245 | """Deserialize ``fp`` (a ``.read()``-supporting file-like object containing 246 | a JSON document) to a Python object. 247 | 248 | If the contents of ``fp`` is encoded with an ASCII based encoding other 249 | than utf-8 (e.g. latin-1), then an appropriate ``encoding`` name must 250 | be specified. Encodings that are not ASCII based (such as UCS-2) are 251 | not allowed, and should be wrapped with 252 | ``codecs.getreader(fp)(encoding)``, or simply decoded to a ``unicode`` 253 | object and passed to ``loads()`` 254 | 255 | ``object_hook`` is an optional function that will be called with the 256 | result of any object literal decode (a ``dict``). The return value of 257 | ``object_hook`` will be used instead of the ``dict``. This feature 258 | can be used to implement custom decoders (e.g. JSON-RPC class hinting). 259 | 260 | To use a custom ``JSONDecoder`` subclass, specify it with the ``cls`` 261 | kwarg. 262 | 263 | """ 264 | return loads(fp.read(), 265 | encoding=encoding, cls=cls, object_hook=object_hook, 266 | parse_float=parse_float, parse_int=parse_int, 267 | parse_constant=parse_constant, **kw) 268 | 269 | 270 | def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, 271 | parse_int=None, parse_constant=None, **kw): 272 | """Deserialize ``s`` (a ``str`` or ``unicode`` instance containing a JSON 273 | document) to a Python object. 274 | 275 | If ``s`` is a ``str`` instance and is encoded with an ASCII based encoding 276 | other than utf-8 (e.g. latin-1) then an appropriate ``encoding`` name 277 | must be specified. Encodings that are not ASCII based (such as UCS-2) 278 | are not allowed and should be decoded to ``unicode`` first. 279 | 280 | ``object_hook`` is an optional function that will be called with the 281 | result of any object literal decode (a ``dict``). The return value of 282 | ``object_hook`` will be used instead of the ``dict``. This feature 283 | can be used to implement custom decoders (e.g. JSON-RPC class hinting). 284 | 285 | ``parse_float``, if specified, will be called with the string 286 | of every JSON float to be decoded. By default this is equivalent to 287 | float(num_str). This can be used to use another datatype or parser 288 | for JSON floats (e.g. decimal.Decimal). 289 | 290 | ``parse_int``, if specified, will be called with the string 291 | of every JSON int to be decoded. By default this is equivalent to 292 | int(num_str). This can be used to use another datatype or parser 293 | for JSON integers (e.g. float). 294 | 295 | ``parse_constant``, if specified, will be called with one of the 296 | following strings: -Infinity, Infinity, NaN, null, true, false. 297 | This can be used to raise an exception if invalid JSON numbers 298 | are encountered. 299 | 300 | To use a custom ``JSONDecoder`` subclass, specify it with the ``cls`` 301 | kwarg. 302 | 303 | """ 304 | if (cls is None and encoding is None and object_hook is None and 305 | parse_int is None and parse_float is None and 306 | parse_constant is None and not kw): 307 | return _default_decoder.decode(s) 308 | if cls is None: 309 | cls = JSONDecoder 310 | if object_hook is not None: 311 | kw['object_hook'] = object_hook 312 | if parse_float is not None: 313 | kw['parse_float'] = parse_float 314 | if parse_int is not None: 315 | kw['parse_int'] = parse_int 316 | if parse_constant is not None: 317 | kw['parse_constant'] = parse_constant 318 | return cls(encoding=encoding, **kw).decode(s) 319 | -------------------------------------------------------------------------------- /pymon/simplejson/decoder.py: -------------------------------------------------------------------------------- 1 | """Implementation of JSONDecoder 2 | """ 3 | import re 4 | import sys 5 | import struct 6 | 7 | from simplejson.scanner import make_scanner 8 | try: 9 | from simplejson._speedups import scanstring as c_scanstring 10 | except ImportError: 11 | c_scanstring = None 12 | 13 | __all__ = ['JSONDecoder'] 14 | 15 | FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL 16 | 17 | def _floatconstants(): 18 | _BYTES = '7FF80000000000007FF0000000000000'.decode('hex') 19 | if sys.byteorder != 'big': 20 | _BYTES = _BYTES[:8][::-1] + _BYTES[8:][::-1] 21 | nan, inf = struct.unpack('dd', _BYTES) 22 | return nan, inf, -inf 23 | 24 | NaN, PosInf, NegInf = _floatconstants() 25 | 26 | 27 | def linecol(doc, pos): 28 | lineno = doc.count('\n', 0, pos) + 1 29 | if lineno == 1: 30 | colno = pos 31 | else: 32 | colno = pos - doc.rindex('\n', 0, pos) 33 | return lineno, colno 34 | 35 | 36 | def errmsg(msg, doc, pos, end=None): 37 | # Note that this function is called from _speedups 38 | lineno, colno = linecol(doc, pos) 39 | if end is None: 40 | #fmt = '{0}: line {1} column {2} (char {3})' 41 | #return fmt.format(msg, lineno, colno, pos) 42 | fmt = '%s: line %d column %d (char %d)' 43 | return fmt % (msg, lineno, colno, pos) 44 | endlineno, endcolno = linecol(doc, end) 45 | #fmt = '{0}: line {1} column {2} - line {3} column {4} (char {5} - {6})' 46 | #return fmt.format(msg, lineno, colno, endlineno, endcolno, pos, end) 47 | fmt = '%s: line %d column %d - line %d column %d (char %d - %d)' 48 | return fmt % (msg, lineno, colno, endlineno, endcolno, pos, end) 49 | 50 | 51 | _CONSTANTS = { 52 | '-Infinity': NegInf, 53 | 'Infinity': PosInf, 54 | 'NaN': NaN, 55 | } 56 | 57 | STRINGCHUNK = re.compile(r'(.*?)(["\\\x00-\x1f])', FLAGS) 58 | BACKSLASH = { 59 | '"': u'"', '\\': u'\\', '/': u'/', 60 | 'b': u'\b', 'f': u'\f', 'n': u'\n', 'r': u'\r', 't': u'\t', 61 | } 62 | 63 | DEFAULT_ENCODING = "utf-8" 64 | 65 | def py_scanstring(s, end, encoding=None, strict=True, _b=BACKSLASH, _m=STRINGCHUNK.match): 66 | """Scan the string s for a JSON string. End is the index of the 67 | character in s after the quote that started the JSON string. 68 | Unescapes all valid JSON string escape sequences and raises ValueError 69 | on attempt to decode an invalid string. If strict is False then literal 70 | control characters are allowed in the string. 71 | 72 | Returns a tuple of the decoded string and the index of the character in s 73 | after the end quote.""" 74 | if encoding is None: 75 | encoding = DEFAULT_ENCODING 76 | chunks = [] 77 | _append = chunks.append 78 | begin = end - 1 79 | while 1: 80 | chunk = _m(s, end) 81 | if chunk is None: 82 | raise ValueError( 83 | errmsg("Unterminated string starting at", s, begin)) 84 | end = chunk.end() 85 | content, terminator = chunk.groups() 86 | # Content is contains zero or more unescaped string characters 87 | if content: 88 | if not isinstance(content, unicode): 89 | content = unicode(content, encoding) 90 | _append(content) 91 | # Terminator is the end of string, a literal control character, 92 | # or a backslash denoting that an escape sequence follows 93 | if terminator == '"': 94 | break 95 | elif terminator != '\\': 96 | if strict: 97 | msg = "Invalid control character %r at" % (terminator,) 98 | #msg = "Invalid control character {0!r} at".format(terminator) 99 | raise ValueError(errmsg(msg, s, end)) 100 | else: 101 | _append(terminator) 102 | continue 103 | try: 104 | esc = s[end] 105 | except IndexError: 106 | raise ValueError( 107 | errmsg("Unterminated string starting at", s, begin)) 108 | # If not a unicode escape sequence, must be in the lookup table 109 | if esc != 'u': 110 | try: 111 | char = _b[esc] 112 | except KeyError: 113 | msg = "Invalid \\escape: " + repr(esc) 114 | raise ValueError(errmsg(msg, s, end)) 115 | end += 1 116 | else: 117 | # Unicode escape sequence 118 | esc = s[end + 1:end + 5] 119 | next_end = end + 5 120 | if len(esc) != 4: 121 | msg = "Invalid \\uXXXX escape" 122 | raise ValueError(errmsg(msg, s, end)) 123 | uni = int(esc, 16) 124 | # Check for surrogate pair on UCS-4 systems 125 | if 0xd800 <= uni <= 0xdbff and sys.maxunicode > 65535: 126 | msg = "Invalid \\uXXXX\\uXXXX surrogate pair" 127 | if not s[end + 5:end + 7] == '\\u': 128 | raise ValueError(errmsg(msg, s, end)) 129 | esc2 = s[end + 7:end + 11] 130 | if len(esc2) != 4: 131 | raise ValueError(errmsg(msg, s, end)) 132 | uni2 = int(esc2, 16) 133 | uni = 0x10000 + (((uni - 0xd800) << 10) | (uni2 - 0xdc00)) 134 | next_end += 6 135 | char = unichr(uni) 136 | end = next_end 137 | # Append the unescaped character 138 | _append(char) 139 | return u''.join(chunks), end 140 | 141 | 142 | # Use speedup if available 143 | scanstring = c_scanstring or py_scanstring 144 | 145 | WHITESPACE = re.compile(r'[ \t\n\r]*', FLAGS) 146 | WHITESPACE_STR = ' \t\n\r' 147 | 148 | def JSONObject((s, end), encoding, strict, scan_once, object_hook, _w=WHITESPACE.match, _ws=WHITESPACE_STR): 149 | pairs = {} 150 | # Use a slice to prevent IndexError from being raised, the following 151 | # check will raise a more specific ValueError if the string is empty 152 | nextchar = s[end:end + 1] 153 | # Normally we expect nextchar == '"' 154 | if nextchar != '"': 155 | if nextchar in _ws: 156 | end = _w(s, end).end() 157 | nextchar = s[end:end + 1] 158 | # Trivial empty object 159 | if nextchar == '}': 160 | return pairs, end + 1 161 | elif nextchar != '"': 162 | raise ValueError(errmsg("Expecting property name", s, end)) 163 | end += 1 164 | while True: 165 | key, end = scanstring(s, end, encoding, strict) 166 | 167 | # To skip some function call overhead we optimize the fast paths where 168 | # the JSON key separator is ": " or just ":". 169 | if s[end:end + 1] != ':': 170 | end = _w(s, end).end() 171 | if s[end:end + 1] != ':': 172 | raise ValueError(errmsg("Expecting : delimiter", s, end)) 173 | 174 | end += 1 175 | 176 | try: 177 | if s[end] in _ws: 178 | end += 1 179 | if s[end] in _ws: 180 | end = _w(s, end + 1).end() 181 | except IndexError: 182 | pass 183 | 184 | try: 185 | value, end = scan_once(s, end) 186 | except StopIteration: 187 | raise ValueError(errmsg("Expecting object", s, end)) 188 | pairs[key] = value 189 | 190 | try: 191 | nextchar = s[end] 192 | if nextchar in _ws: 193 | end = _w(s, end + 1).end() 194 | nextchar = s[end] 195 | except IndexError: 196 | nextchar = '' 197 | end += 1 198 | 199 | if nextchar == '}': 200 | break 201 | elif nextchar != ',': 202 | raise ValueError(errmsg("Expecting , delimiter", s, end - 1)) 203 | 204 | try: 205 | nextchar = s[end] 206 | if nextchar in _ws: 207 | end += 1 208 | nextchar = s[end] 209 | if nextchar in _ws: 210 | end = _w(s, end + 1).end() 211 | nextchar = s[end] 212 | except IndexError: 213 | nextchar = '' 214 | 215 | end += 1 216 | if nextchar != '"': 217 | raise ValueError(errmsg("Expecting property name", s, end - 1)) 218 | 219 | if object_hook is not None: 220 | pairs = object_hook(pairs) 221 | return pairs, end 222 | 223 | def JSONArray((s, end), scan_once, _w=WHITESPACE.match, _ws=WHITESPACE_STR): 224 | values = [] 225 | nextchar = s[end:end + 1] 226 | if nextchar in _ws: 227 | end = _w(s, end + 1).end() 228 | nextchar = s[end:end + 1] 229 | # Look-ahead for trivial empty array 230 | if nextchar == ']': 231 | return values, end + 1 232 | _append = values.append 233 | while True: 234 | try: 235 | value, end = scan_once(s, end) 236 | except StopIteration: 237 | raise ValueError(errmsg("Expecting object", s, end)) 238 | _append(value) 239 | nextchar = s[end:end + 1] 240 | if nextchar in _ws: 241 | end = _w(s, end + 1).end() 242 | nextchar = s[end:end + 1] 243 | end += 1 244 | if nextchar == ']': 245 | break 246 | elif nextchar != ',': 247 | raise ValueError(errmsg("Expecting , delimiter", s, end)) 248 | 249 | try: 250 | if s[end] in _ws: 251 | end += 1 252 | if s[end] in _ws: 253 | end = _w(s, end + 1).end() 254 | except IndexError: 255 | pass 256 | 257 | return values, end 258 | 259 | class JSONDecoder(object): 260 | """Simple JSON decoder 261 | 262 | Performs the following translations in decoding by default: 263 | 264 | +---------------+-------------------+ 265 | | JSON | Python | 266 | +===============+===================+ 267 | | object | dict | 268 | +---------------+-------------------+ 269 | | array | list | 270 | +---------------+-------------------+ 271 | | string | unicode | 272 | +---------------+-------------------+ 273 | | number (int) | int, long | 274 | +---------------+-------------------+ 275 | | number (real) | float | 276 | +---------------+-------------------+ 277 | | true | True | 278 | +---------------+-------------------+ 279 | | false | False | 280 | +---------------+-------------------+ 281 | | null | None | 282 | +---------------+-------------------+ 283 | 284 | It also understands ``NaN``, ``Infinity``, and ``-Infinity`` as 285 | their corresponding ``float`` values, which is outside the JSON spec. 286 | 287 | """ 288 | 289 | def __init__(self, encoding=None, object_hook=None, parse_float=None, 290 | parse_int=None, parse_constant=None, strict=True): 291 | """``encoding`` determines the encoding used to interpret any ``str`` 292 | objects decoded by this instance (utf-8 by default). It has no 293 | effect when decoding ``unicode`` objects. 294 | 295 | Note that currently only encodings that are a superset of ASCII work, 296 | strings of other encodings should be passed in as ``unicode``. 297 | 298 | ``object_hook``, if specified, will be called with the result 299 | of every JSON object decoded and its return value will be used in 300 | place of the given ``dict``. This can be used to provide custom 301 | deserializations (e.g. to support JSON-RPC class hinting). 302 | 303 | ``parse_float``, if specified, will be called with the string 304 | of every JSON float to be decoded. By default this is equivalent to 305 | float(num_str). This can be used to use another datatype or parser 306 | for JSON floats (e.g. decimal.Decimal). 307 | 308 | ``parse_int``, if specified, will be called with the string 309 | of every JSON int to be decoded. By default this is equivalent to 310 | int(num_str). This can be used to use another datatype or parser 311 | for JSON integers (e.g. float). 312 | 313 | ``parse_constant``, if specified, will be called with one of the 314 | following strings: -Infinity, Infinity, NaN. 315 | This can be used to raise an exception if invalid JSON numbers 316 | are encountered. 317 | 318 | """ 319 | self.encoding = encoding 320 | self.object_hook = object_hook 321 | self.parse_float = parse_float or float 322 | self.parse_int = parse_int or int 323 | self.parse_constant = parse_constant or _CONSTANTS.__getitem__ 324 | self.strict = strict 325 | self.parse_object = JSONObject 326 | self.parse_array = JSONArray 327 | self.parse_string = scanstring 328 | self.scan_once = make_scanner(self) 329 | 330 | def decode(self, s, _w=WHITESPACE.match): 331 | """Return the Python representation of ``s`` (a ``str`` or ``unicode`` 332 | instance containing a JSON document) 333 | 334 | """ 335 | obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 336 | end = _w(s, end).end() 337 | if end != len(s): 338 | raise ValueError(errmsg("Extra data", s, end, len(s))) 339 | return obj 340 | 341 | def raw_decode(self, s, idx=0): 342 | """Decode a JSON document from ``s`` (a ``str`` or ``unicode`` beginning 343 | with a JSON document) and return a 2-tuple of the Python 344 | representation and the index in ``s`` where the document ended. 345 | 346 | This can be used to decode a JSON document from a string that may 347 | have extraneous data at the end. 348 | 349 | """ 350 | try: 351 | obj, end = self.scan_once(s, idx) 352 | except StopIteration: 353 | raise ValueError("No JSON object could be decoded") 354 | return obj, end 355 | -------------------------------------------------------------------------------- /lib/yui-2.9.0/build/event/event-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 2.9.0 6 | */ 7 | YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget; 8 | if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener; 9 | /*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */ 10 | if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g); 11 | }}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c