BB-1137 Add terminate button to app server UI
Created by: viadanna
Description
This change will allow for manual termination of app servers. This will be allowed for app servers that are not active and instances created from pull requests will be able to deactivate/terminate all app servers.
Testing
- Checkout this branch.
- Create a test instance with an associated pull request and another one without it.
- Manually add appservers in states such as
new
,failed
,running
andconfiguring
to evaluate the UI behavior. - Check that only appservers in
running
state can be made active. - Make sure that only inactive appservers in
configuring
,running
andfailed
can be terminated.
If it fails to mark an appserver active/inactive, make sure there's an associated server in the correct state:
In [25]: for apps in OpenEdXAppServer.objects.filter(_is_active=True):
...: apps.server = OpenStackServer.objects.create(name_prefix='test', _status='ready', _public_ip='0.0.0.0')
...: apps.save()