@flask_login.login_required def hangup_call(): channel = request.form['channel'] r = backend.hangup(channel) return jsonify(result=r) @app.route('/stats/<from_date>/<to_date>/<name>.json') def stats_json(name, from_date, to_date): real_name = cfg.realname_queue(name) queue_values = queuelog_data_queue(from_date, to_date, None, real_name) data = get_data_queues(name) return jsonify(name=name, data=data, values=queue_values) @app.route('/stats', defaults={'name': None, 'from_date': uqpanel.init_day(), 'to_date': uqpanel.end_day()}) @app.route('/stats/<name>/<from_date>/<to_date>') def stats(name, from_date, to_date): queues = get_data_queues() if name is None: name = uqpanel.first_data_dict(queues) try: data = queues[name] except: data = {} return render_template('stats.html', data=data, queues=queues, name=name, from_date=from_date, to_date=to_date) @app.route('/remove_from_queue', methods=['POST'])
r = backend.hangup(channel) return jsonify(result=r) @app.route('/stats/<from_date>/<to_date>/<name>.json') def stats_json(name, from_date, to_date): real_name = uqpanel.realname_queue_rename(name) queue_values = queuelog_data_queue(from_date, to_date, None, real_name) data = get_data_queues(name) return jsonify(name=name, data=data, values=queue_values) @app.route('/stats', defaults={ 'name': None, 'from_date': uqpanel.init_day(), 'to_date': uqpanel.end_day() }) @app.route('/stats/<name>/<from_date>/<to_date>') def stats(name, from_date, to_date): queues = get_data_queues() if name is None: name = uqpanel.first_data_dict(queues) try: data = queues[name] except: data = {} return render_template('stats.html', data=data, queues=queues, name=name,
@flask_login.login_required def hangup_call(): channel = request.form['channel'] r = backend.hangup(channel) return jsonify(result=r) @app.route('/stats/<from_date>/<to_date>/<name>.json') def stats_json(name, from_date, to_date): real_name = uqpanel.realname_queue_rename(name) queue_values = queuelog_data_queue(from_date, to_date, None, real_name) data = get_data_queues(name) return jsonify(name=name, data=data, values=queue_values) @app.route('/stats', defaults={'name': None, 'from_date': uqpanel.init_day(), 'to_date': uqpanel.end_day()}) @app.route('/stats/<name>/<from_date>/<to_date>') def stats(name, from_date, to_date): queues = get_data_queues() if name is None: name = uqpanel.first_data_dict(queues) try: data = queues[name] except: data = {} return render_template('stats.html', data=data, queues=queues, name=name, from_date=from_date, to_date=to_date) @app.route('/remove_from_queue', methods=['POST'])