replace
This commit is contained in:
parent
70ff6022ca
commit
e93bf16bf7
29
main.py
29
main.py
@ -15,19 +15,6 @@ def index():
|
||||
return str(listVDS())
|
||||
|
||||
|
||||
@get('/action') # or @route('/login')
|
||||
def login():
|
||||
return '''
|
||||
<form action="/action" method="post">
|
||||
VDS Name: <input name="name" type="text" /> <br>
|
||||
Action (start/stop): <br>
|
||||
<input type="radio" name="act" value="start"> Start<Br>
|
||||
<input type="radio" name="act" value="stop"> Stop<Br>
|
||||
<input type="radio" name="act" value="destroy"> destroy<Br>
|
||||
<input value="Exec" type="submit" />
|
||||
</form>
|
||||
'''
|
||||
|
||||
|
||||
@post('/action') # or @route('/login', method='POST')
|
||||
def do_action():
|
||||
@ -46,5 +33,21 @@ def do_action():
|
||||
else:
|
||||
return dict(state="error")
|
||||
|
||||
|
||||
@get('/action') # or @route('/login')
|
||||
def login():
|
||||
return '''
|
||||
<form action="/action" method="post">
|
||||
VDS Name: <input name="name" type="text" /> <br>
|
||||
Action (start/stop): <br>
|
||||
<input type="radio" name="act" value="start"> Start<Br>
|
||||
<input type="radio" name="act" value="stop"> Stop<Br>
|
||||
<input type="radio" name="act" value="destroy"> destroy<Br>
|
||||
<input value="Exec" type="submit" />
|
||||
</form>
|
||||
'''
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
run(host='0.0.0.0', port=5000, debug=True)
|
Loading…
Reference in New Issue
Block a user