Пример #1
0
from mole import redirect
from mole.sessions import get_current_session, authenticator

from config import media_prefix
import config
import i18n

import nginx
import json
import os
import glob

import commands
import os.path, time

auth_required = authenticator(login_url='/auth/login')


@route('/%s/:file#.*#' % media_prefix)
def media(file):
    return static_file(file, root='./media')


@route('/nginx_tree')
@auth_required()
def nginx_tree():
    jsonlist = []
    # jsondict = {"id": 1, "pId": 0, "name": "nginx_conf"}
    # jsonlist.append(jsondict)
    f_id=1
    for file in os.listdir(config.nginx_conf_path):
Пример #2
0
# coding=utf-8

from mole import route, run, static_file, error, get, post, put, delete, Mole  # 均来自Mole类
from mole.template import template, Jinja2Template
from mole import request
from mole import response
from mole.mole import json_dumps
from mole import redirect
from mole.sessions import get_current_session, authenticator

from config import media_prefix
import config
import i18n

auth_required = authenticator(login_url='/auth/login')


@route('/%s/:file#.*#' % media_prefix)
def media(file):
    return static_file(file, root='./media')


@route('/db_tree')
@auth_required()
def db_tree():
    from over_view import get_all_trees
    import config
    try:
        cur_server_index = int(request.GET.get('s', '0'))
        cur_db_index = int(request.GET.get('db', '0'))
        cur_scan_cursor = int(request.GET.get('cursor', '0'))
Пример #3
0
# coding=utf-8

from mole import route, run, static_file, error, get, post, put, delete, Mole  # 均来自Mole类
from mole.template import template, Jinja2Template
from mole import request
from mole import response
from mole.mole import json_dumps
from mole import redirect
from mole.sessions import get_current_session, authenticator

from config import media_prefix
import config
import i18n


auth_required = authenticator(login_url="/auth/login")


@route("/%s/:file#.*#" % media_prefix)
def media(file):
    return static_file(file, root="./media")


@route("/db_tree")
@auth_required()
def db_tree():
    from over_view import get_all_trees
    import config

    try:
        cur_server_index = int(request.GET.get("s", "0"))