diff --git a/cfme/automate/explorer/method.py b/cfme/automate/explorer/method.py index ccc7658520..5e06ca0a3c 100644 --- a/cfme/automate/explorer/method.py +++ b/cfme/automate/explorer/method.py @@ -3,7 +3,7 @@ from cached_property import cached_property from navmazing import NavigateToAttribute, NavigateToSibling -from widgetastic.utils import ParametrizedLocator, VersionPick +from widgetastic.utils import ParametrizedLocator from widgetastic.widget import Table, Text, View from widgetastic_manageiq import SummaryFormItem, ScriptBox, Input from widgetastic_patternfly import BootstrapSelect, BootstrapSwitch, Button, CandidateNotFound @@ -209,10 +209,6 @@ def is_displayed(self): class Method(BaseEntity, Copiable): - ICON_NAME = VersionPick({ - Version.lowest(): 'product-method', - '5.9': 'fa-ruby', - }) def __init__(self, collection, name=None, display_name=None, location='inline', script=None, data=None, repository=None, playbook=None, machine_credential=None, hosts=None, @@ -274,11 +270,15 @@ def domain(self): @property def tree_path(self): + if self.appliance.version < '5.9': + icon_name_map = {'inline': 'product-method'} + else: + icon_name_map = {'inline': 'fa-ruby', 'playbook': 'vendor-ansible'} if self.display_name: return self.parent_obj.tree_path + [ - (self.ICON_NAME, '{} ({})'.format(self.display_name, self.name))] + (icon_name_map[self.location], '{} ({})'.format(self.display_name, self.name))] else: - return self.parent_obj.tree_path + [(self.ICON_NAME, self.name)] + return self.parent_obj.tree_path + [(icon_name_map[self.location], self.name)] @property def tree_path_name_only(self): diff --git a/requirements/frozen.txt b/requirements/frozen.txt index a5d65fae78..3b1e3d120c 100644 --- a/requirements/frozen.txt +++ b/requirements/frozen.txt @@ -195,7 +195,7 @@ webencodings==0.5.1 websocket-client==0.40.0 Werkzeug==0.12.2 widgetastic.core==0.13.0 -widgetastic.patternfly==0.0.23 +widgetastic.patternfly==0.0.24 widgetsnbextension==2.0.0 wrapanapi==2.4.6 wrapt==1.10.10