示例#1
0
文件: views.py 项目: qtwrk/cyberpanel
def getCurrentRecordsForDomain(request):
    try:
        userID = request.session['userID']
        dm = DNSManager()
        return dm.getCurrentRecordsForDomain(userID, json.loads(request.body))
    except KeyError:
        return redirect(loadLoginPage)
示例#2
0
文件: views.py 项目: qtwrk/cyberpanel
def addDeleteDNSRecords(request):
    try:
        userID = request.session['userID']
        dm = DNSManager()
        return dm.addDeleteDNSRecords(request, userID)
    except KeyError:
        return redirect(loadLoginPage)
示例#3
0
文件: views.py 项目: qtwrk/cyberpanel
def createDNSZone(request):
    try:
        userID = request.session['userID']
        dm = DNSManager()
        return dm.createDNSZone(request, userID)
    except KeyError:
        return redirect(loadLoginPage)
示例#4
0
文件: views.py 项目: qtwrk/cyberpanel
def saveNSConfigurations(request):
    try:
        userID = request.session['userID']
        dm = DNSManager()
        return dm.saveNSConfigurations(userID, json.loads(request.body))
    except KeyError:
        return redirect(loadLoginPage)
示例#5
0
文件: views.py 项目: qtwrk/cyberpanel
def configureDefaultNameServers(request):
    try:
        userID = request.session['userID']
        dm = DNSManager()
        return dm.configureDefaultNameServers(request, userID)
    except KeyError:
        return redirect(loadLoginPage)
示例#6
0
文件: views.py 项目: qtwrk/cyberpanel
def submitZoneDeletion(request):
    try:
        userID = request.session['userID']
        result = pluginManager.preSubmitZoneDeletion(request)
        if result != 200:
            return result

        dm = DNSManager()
        coreResult = dm.submitZoneDeletion(userID, json.loads(request.body))

        result = pluginManager.postSubmitZoneDeletion(request, coreResult)
        if result != 200:
            return result

        return coreResult
    except KeyError:
        return redirect(loadLoginPage)
示例#7
0
文件: views.py 项目: qtwrk/cyberpanel
def addDNSRecord(request):
    try:
        userID = request.session['userID']

        result = pluginManager.preAddDNSRecord(request)
        if result != 200:
            return result

        dm = DNSManager()
        coreResult = dm.addDNSRecord(userID, json.loads(request.body))

        result = pluginManager.postAddDNSRecord(request, coreResult)
        if result != 200:
            return result

        return coreResult

    except KeyError:
        return redirect(loadLoginPage)