Added a new attribute - display_choices

to Column class, for substituting the
display value of the statuses provided
by Nova to some more meaningful ones
in the instance table.

Fixes bug 997374

Change-Id: I18560868435b4cbc42670e3fc9c0bc83ebf9fda4
This commit is contained in:
Tihomir Trifonov
2012-05-15 19:56:02 +03:00
parent b0df3b73f0
commit 0d8273463d
5 changed files with 94 additions and 14 deletions

19
horizon/utils/filters.py Normal file
View File

@@ -0,0 +1,19 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
def replace_underscores(string):
return string.replace("_", " ")