destroy
This commit is contained in:
parent
d4347513f1
commit
8ec2b2be1d
10
index.py
10
index.py
@ -10,12 +10,10 @@ def listVDS():
|
||||
VdsListVar.append(i)
|
||||
return VdsListVar
|
||||
|
||||
# Главная страница
|
||||
@route('/')
|
||||
def index():
|
||||
# return template('index.html')
|
||||
# return 'Привет, мир!'
|
||||
return listVDS()
|
||||
return str(listVDS())
|
||||
|
||||
|
||||
@get('/action') # or @route('/login')
|
||||
@ -26,7 +24,8 @@ def login():
|
||||
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="Name" type="submit" />
|
||||
</form>
|
||||
'''
|
||||
|
||||
@ -43,6 +42,9 @@ def do_action():
|
||||
elif (act == "stop"):
|
||||
dom.shutdown()
|
||||
return "<p>Stopped</p> <button href='action'>"
|
||||
elif (act == "destroy"):
|
||||
dom.destroy()
|
||||
return "<p>Stopped</p> <button href='action'>"
|
||||
else:
|
||||
return "Error"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user