Exemplo n.º 1
0
def asset_performs():
    params = request.args if request.method == 'GET' else request.form
    sn = params.get('sn')
    import assets
    ip = assets.get_by_id(sn)['iner_ip']
    from assets_class import Performs
    _times, _cpus, _rams = Performs.get_performs_view(ip)
    return render_template('asset_performs.html',
                           times=_times,
                           cpus=_cpus,
                           rams=_rams)
Exemplo n.º 2
0
def update_asset():
    params = request.args if request.method == 'GET' else request.form
    se_sn = params.get('sn')
    import assets
    asset_info_dict = assets.get_by_id(se_sn)
    return render_template('asset_update.html', params=asset_info_dict)
Exemplo n.º 3
0
def assets_modify():
    sn = request.args.get('sn')
    _cnt, _assets = assets.get_by_id(sn)
    idcs = [('1', '北京-亦庄'), ('2', '北京-酒仙桥'), ('3', '北京-西单'), ('4', '北京-东单')]
    return render_template('assets_modify.html', assets=_assets, idcs=idcs)
Exemplo n.º 4
0
def assets_modify():
    _sn = request.args.get('sn')
    _cnt, _assets = assets.get_by_id('sn',_sn)
    idcs = [('1', '北京-亦庄'), ('2', '北京-酒仙桥'), ('3', '北京-西单'), ('4', '北京-东单')]
    print _assets
    return render_template('assets_modify.html', assets=_assets, idcs=idcs)
Exemplo n.º 5
0
def assets_modify():
    sn = request.args.get('sn')
    _cnt, _assets = assets.get_by_id(sn)
    idcs = [(1, '北京-亦庄'), (2, '北京-酒仙桥'), (3, '北京-西单'), (4, '北京-东单')]
    return render_template('assets_modify.html', assets=_assets, idcs=idcs)