def get_project_choose(request): column = ("id", "business", "name", "owner", "qa", "gitpath", "domainname", "domainname_exp", "mgt_port", "listen_port", "code_type", "deploy_type", "level", "type", "status", "config_name", "config_token") sql = """select {param} from project""".format(param=','.join(column)) return HttpResponse(deal_with_param(request, column, sql, choose))
def get_project_var_choose(request): column = ("id", "project_id", "dict_key", "value") sql = """select {param} from project_var""".format(param=','.join(column)) return HttpResponse(deal_with_param(request, column, sql, choose))
def get_businessProject_choose(request): column = ("id", "business_id", "project_id") sql = """select {param} from business_project""".format( param=','.join(column)) return HttpResponse(deal_with_param(request, column, sql, choose))
def get_opType_choose(request, choose): column = ("id", "query", "config", "created", "deleted", "build", "rebuild", "cancel", "sync", "login", "role") sql = """select {param} from op_type""".format(param=','.join(column)) return HttpResponse(deal_with_param(request, column, sql, choose))
def get_business_choose(request): column = ("id", "name", "en_name", "qa_leader", "deploy_lock", "sync_lock") sql = """select {param} from business""".format(param=','.join(column)) return HttpResponse(deal_with_param(request, column, sql, choose))
def get_group_choose(request, choose): column = ("id", "group_name", "business", "leader", "roles") sql = """select {param} from group""".format(param=','.join(column)) return HttpResponse(deal_with_param(request, column, sql, choose))
def get_user_choose(request, choose): column = ("id", "login_name", "real_name", "email", "roles", "groupname", "type", "overlap_business", "overlap_env") sql = """select {param} from user""".format(param=','.join(column)) return HttpResponse(deal_with_param(request, column, sql, choose))
def get_drone_by_choose(request, choose): column = ("id", "env", "business", "short_name", "hostname", "ipv4", "type") sql = """select {param} from drone""".format(param=','.join(column)) return HttpResponse(deal_with_param(request, column, sql, choose))
def get_dbInstance_by_choose(request, choose): column = ("id", "host", "port", "db_url", "username", "groupname", "owner", "type", "monitor", "locked") sql = """select {param} from db_instance""".format(param=','.join(column)) return HttpResponse(deal_with_param(request, column, sql, choose))
def get_hosts_by_choose(request, choose): column = ("id", "hostname", "host", "status", "type", "set_nginx", "nginx_parent") sql = """select {param} from hosts""".format(param=','.join(column)) return HttpResponse(deal_with_param(request, column, sql, choose))
def get_env_by_choose(request, choose): column = ("id", "UUID", "name", "lock_deploy", "lock_sync", "in_use", "set_nginx", "owner", "monitor", "dingding_token") sql = """select {param} from env""".format(param=','.join(column)) return HttpResponse(deal_with_param(request, column, sql, choose))
def get_envBusinessHost_choose(request, choose): column = ("id", "env", "business", "host", "status") sql = """select {param} from env_business_host""".format( param=','.join(column)) return HttpResponse(deal_with_param(request, column, sql, choose))