Пример #1
0
def vm_on_sale():
    user = authController.getUserWithSessionCookie().toJson()
    res = providerController.getMyGPUs()
    gpu_list = res.get("output")
    message = res.get("message")
    status = res.get("status")

    if status_is_error(status):
        abort(status, message)
    return render_template('provider/myGPUPage.html',
                           user=user,
                           gpu_list=gpu_list)
Пример #2
0
def myVMList():
    user = authController.getUserWithSessionCookie().toJson()
    res = mainController.getFavoriteVMs()
    favorite_vms = res.get("output")
    message = res.get("message")
    status = res.get("status")

    if status_is_error(status):
        abort(status, message)
    return render_template('buyer/myFavoriteVMListPage.html',
                           user=user,
                           vm_list=favorite_vms)
Пример #3
0
def myContainers():
    user = authController.getUserWithSessionCookie().toJson()
    res = buyerController.getMyContainers()
    container_list = res.get("output")
    message = res.get("message")
    status = res.get("status")

    if status_is_error(status):
        abort(status, message)
    return render_template('buyer/myContainerPage.html',
                           container_list=container_list,
                           user=user)
Пример #4
0
def vmMarketplaceSell2():
    user = authController.getUserWithSessionCookie().toJson()
    res = providerController.getPreregisterVM()
    vm = res.get("output")
    message = res.get("message")
    status = res.get("status")

    if status_is_error(status):
        abort(status, message)

    return render_template('provider/vmMarketplaceSellPage2.html',
                           user=user,
                           vm=vm), status
Пример #5
0
def vmMarketplace():
    user = authController.getUserWithSessionCookie().toJson()
    res = mainController.getVMs()
    vm_list = res.get("output")
    message = res.get("message")
    status = res.get("status")

    if status_is_error(status):
        abort(status, message)

    return render_template('provider/vmMarketplaceSearchPage.html',
                           user=user,
                           vm_list=vm_list)
Пример #6
0
def dashboard():
    user = authController.getUserWithSessionCookie().toJson()
    res = providerController.getMyDashboard()
    dashboard_data = res.get("output")
    message = res.get("message")
    status = res.get("status")

    if status_is_error(status):
        abort(status, message)

    return render_template('provider/dashboard.html',
                           user=user,
                           dashboard_data=dashboard_data)