summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/project/stacks/sro.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstack_dashboard/dashboards/project/stacks/sro.py')
-rw-r--r--openstack_dashboard/dashboards/project/stacks/sro.py44
1 files changed, 0 insertions, 44 deletions
diff --git a/openstack_dashboard/dashboards/project/stacks/sro.py b/openstack_dashboard/dashboards/project/stacks/sro.py
deleted file mode 100644
index 4250e7e..0000000
--- a/openstack_dashboard/dashboards/project/stacks/sro.py
+++ /dev/null
@@ -1,44 +0,0 @@
1# Licensed under the Apache License, Version 2.0 (the "License"); you may
2# not use this file except in compliance with the License. You may obtain
3# a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10# License for the specific language governing permissions and limitations
11# under the License.
12
13from django.template.defaultfilters import title
14from django.template.loader import render_to_string
15
16from horizon.utils import filters
17
18
19def stack_info(stack, stack_image):
20 stack.stack_status_desc = title(
21 filters.replace_underscores(stack.stack_status))
22 if stack.stack_status_reason:
23 stack.stack_status_reason = title(
24 filters.replace_underscores(stack.stack_status_reason)
25 )
26 context = {}
27 context['stack'] = stack
28 context['stack_image'] = stack_image
29 return render_to_string('project/stacks/_stack_info.html',
30 context)
31
32
33def resource_info(resource):
34 resource.resource_status_desc = title(
35 filters.replace_underscores(resource.resource_status)
36 )
37 if resource.resource_status_reason:
38 resource.resource_status_reason = title(
39 filters.replace_underscores(resource.resource_status_reason)
40 )
41 context = {}
42 context['resource'] = resource
43 return render_to_string('project/stacks/_resource_info.html',
44 context)