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