modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages.properties | 2 +- modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_cs.properties | 2 +- modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_de.properties | 2 +- modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ja.properties | 2 +- modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ko.properties | 2 +- modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_pt.properties | 2 +- modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ru.properties | 2 +- modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_zh.properties | 2 +- modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerBean.java | 7 ++++--- modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerLocal.java | 7 +++++++ 10 files changed, 19 insertions(+), 11 deletions(-)
New commits: commit c2f37733be994a9237853a7f21733e2459a9f055 Author: Jay Shaughnessy jshaughn@redhat.com Date: Mon Feb 3 16:39:30 2014 -0500
[BZ 1016833] - Alert notification sender, resource operation, relative resource type filter drop-down has not logical or usable ordering - Using the LinkedHashMap that preserves the ordering instead of java.util.HashMap. Also adding the plugin name to the drop-down list.
Cherry pick of d2aac70ae17ea051080a16a92a1ac666d909e520
Signed-off-by: Jay Shaughnessy jshaughn@redhat.com
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages.properties index c5becf5..e3c2c32 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages.properties @@ -1124,7 +1124,7 @@ view_alert_definition_notification_operation_editor_relative_ancestor_tooltip = view_alert_definition_notification_operation_editor_relative_descendant = Then Filter By view_alert_definition_notification_operation_editor_relative_descendant_filter_tooltip = A specific name to uniquely identify a resource when more than one resource of the selected type might exist. This is optional if there will only ever be one resource of the resource type in the selected type hierarchy. view_alert_definition_notification_operation_editor_relative_descendant_loadFailed = Cannot get type descendants -view_alert_definition_notification_operation_editor_relative_descendant_tooltip = The resource type to search for under the root type defined in the Start Search From selection. +view_alert_definition_notification_operation_editor_relative_descendant_tooltip = The resource type to search for under the root type defined in the Start Search From selection. Members of this combobox are in form _plugin_ -> _type_. view_alert_definition_notification_operation_editor_specific_pick_button = Pick view_alert_definition_notification_operation_editor_specific_pick_error_invalid = Please pick a resource view_alert_definition_notification_operation_editor_specific_pick_error_no_operation = Please pick a resource that has one or more operations diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_cs.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_cs.properties index edf6af7..a4e0369 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_cs.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_cs.properties @@ -1143,7 +1143,7 @@ view_alert_definition_notification_operation_editor_relative_ancestor_tooltip = view_alert_definition_notification_operation_editor_relative_descendant = Filtrovat čím ##view_alert_definition_notification_operation_editor_relative_descendant_filter_tooltip = A specific name to uniquely identify a resource when more than one resource of the selected type might exist. This is optional if there will only ever be one resource of the resource type in the selected type hierarchy. view_alert_definition_notification_operation_editor_relative_descendant_loadFailed = Nelze získat typ potomků -view_alert_definition_notification_operation_editor_relative_descendant_tooltip = Typ zdroje v němž hledat pomocí vyhledávacího formuláře +view_alert_definition_notification_operation_editor_relative_descendant_tooltip = Typ zdroje v němž hledat pomocí vyhledávacího formuláře. Prvky tohoto comboboxu jsou ve tvaru _plugin_ -> _type_. view_alert_definition_notification_operation_editor_specific_pick_button = Vybrat view_alert_definition_notification_operation_editor_specific_pick_error_invalid = Prosím vyberte zdroj view_alert_definition_notification_operation_editor_specific_pick_error_no_operation = Prosím vyberte zdroj, který má jednu nebo více operací diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_de.properties index 36fcdcc..ea3bb5c 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_de.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_de.properties @@ -1334,7 +1334,7 @@ view_alert_definition_notification_operation_editor_relative_ancestor_tooltip=W view_alert_definition_notification_operation_editor_relative_descendant=dann filtern nach view_alert_definition_notification_operation_editor_relative_descendant_filter_tooltip=Ein spezifischer Name zur eindeutigen Identifizierung einer Ressource, wenn mehr als eine Ressource des gewählten Typs vorhanden sein kann. Dies ist optional wenn stets nur eine Ressource des Ressourcentyps in der gewählten Typhierarchie existiert. view_alert_definition_notification_operation_editor_relative_descendant_loadFailed=Erhalt von Typ Abkömmlingen nicht möglich -view_alert_definition_notification_operation_editor_relative_descendant_tooltip=Der Ressourcentyp, nach dem unter dem in der Start Search From Auswahl (Suche starten von) definierten Root Typ gesucht werden soll. +view_alert_definition_notification_operation_editor_relative_descendant_tooltip=Der Ressourcentyp, nach dem unter dem in der Start Search From Auswahl (Suche starten von) definierten Root Typ gesucht werden soll. Members of this combobox are in form _plugin_ -> _type_. # #view_alert_definition_notification_operation_editor_relative_descendant_filter_tooltip = A specific name to uniquely identify a resource when more than one resource of the selected type might exist. This is optional if there will only ever be one resource of the resource type in the selected type hierarchy. # #view_alert_definition_notification_operation_editor_relative_descendant_loadFailed = Cannot get type descendants # #view_alert_definition_notification_operation_editor_relative_descendant_tooltip = The resource type to search for under the root type defined in the Start Search From selection. diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ja.properties index 4421ea7..646e4e9 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ja.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ja.properties @@ -1349,7 +1349,7 @@ view_alert_definition_notification_operation_editor_relative_ancestor_tooltip= view_alert_definition_notification_operation_editor_relative_descendant=次によるフィルター: view_alert_definition_notification_operation_editor_relative_descendant_filter_tooltip=選択したタイプのリソースが複数存在するときに、リソースを一意に識別する名前。選択したタイプ階層に、選択したタイプのリソースが 1 つのみ存在する場合は任意の設定です。 view_alert_definition_notification_operation_editor_relative_descendant_loadFailed=タイプの子孫を取得できません -view_alert_definition_notification_operation_editor_relative_descendant_tooltip=「検索を開始」で定義される、ルートタイプの下で検索されるリソースタイプ。 +view_alert_definition_notification_operation_editor_relative_descendant_tooltip=「検索を開始」で定義される、ルートタイプの下で検索されるリソースタイプ。Members of this combobox are in form _plugin_ -> _type_. view_alert_definition_notification_operation_editor_specific_pick_button=選択 view_alert_definition_notification_operation_editor_specific_pick_error_invalid=リソースを選択してください view_alert_definition_notification_operation_editor_specific_pick_error_no_operation=1 つ以上の操作を持つリソースを選択してください diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ko.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ko.properties index 7a4f477..bc15064 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ko.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ko.properties @@ -998,7 +998,7 @@ view_alert_definition_notification_operation_editor_mode_title = 리소스 선 view_alert_definition_notification_operation_editor_relative_ancestor = 검색 시작 view_alert_definition_notification_operation_editor_relative_descendant = 다음의 필터 view_alert_definition_notification_operation_editor_relative_descendant_loadFailed = 유형의 자손을 얻을 수 없습니다 -view_alert_definition_notification_operation_editor_relative_descendant_tooltip = 검색시작 유형에 정의된 경로 유형에서 찾기 리소스 유형 +view_alert_definition_notification_operation_editor_relative_descendant_tooltip = 검색시작 유형에 정의된 경로 유형에서 찾기 리소스 유형 Members of this combobox are in form _plugin_ -> _type_. view_alert_definition_notification_operation_editor_specific_pick_button = 선택 view_alert_definition_notification_operation_editor_specific_pick_error_invalid = 리소스를 선택하십시오 view_alert_definition_notification_operation_editor_specific_pick_text = 리소스를 선택... diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_pt.properties index 68c78a6..c3fd136 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_pt.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_pt.properties @@ -1127,7 +1127,7 @@ view_alert_definition_notification_operation_editor_relative_ancestor_tooltip = view_alert_definition_notification_operation_editor_relative_descendant = Ent\u00E3o procure por view_alert_definition_notification_operation_editor_relative_descendant_filter_tooltip = Um nome especifico para identificar unicamente um recurso quando existir mais de um do mesmo tipo. Isso \u00E9 opcional, se definido, sempre ser\u00E1 um recurso do tipo slecionda na hierarquia. view_alert_definition_notification_operation_editor_relative_descendant_loadFailed = N\u00E3o \u00E9 poss\u00EDvel obter os tipos de descendentes -view_alert_definition_notification_operation_editor_relative_descendant_tooltip = Tipo do recurso a ser procurado a baixo do tipo raiz definido na sele\u00E7\u00E3o 'Inicia a Pesquesa a partir de'. +view_alert_definition_notification_operation_editor_relative_descendant_tooltip = Tipo do recurso a ser procurado a baixo do tipo raiz definido na sele\u00E7\u00E3o 'Inicia a Pesquesa a partir de'. Members of this combobox are in form _plugin_ -> _type_. view_alert_definition_notification_operation_editor_specific_pick_button = Selecionar view_alert_definition_notification_operation_editor_specific_pick_error_invalid = Favor selecionar um recurso view_alert_definition_notification_operation_editor_specific_pick_error_no_operation = Selecione um recurso que possua um ou mais opera\u00E7\u00F5es diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ru.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ru.properties index fdb1244..6c30d0d 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ru.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_ru.properties @@ -1035,7 +1035,7 @@ #view_alert_definition_notification_operation_editor_relative_descendant = Then Filter By #view_alert_definition_notification_operation_editor_relative_descendant_filter_tooltip = A specific name to uniquely identify a resource when more than one resource of the selected type might exist. This is optional if there will only ever be one resource of the resource type in the selected type hierarchy. #view_alert_definition_notification_operation_editor_relative_descendant_loadFailed = Cannot get type descendants -#view_alert_definition_notification_operation_editor_relative_descendant_tooltip = The resource type to search for under the root type defined in the Start Search From selection. +#view_alert_definition_notification_operation_editor_relative_descendant_tooltip = The resource type to search for under the root type defined in the Start Search From selection. Members of this combobox are in form _plugin_ -> _type_. #view_alert_definition_notification_operation_editor_specific_pick_button = Pick #view_alert_definition_notification_operation_editor_specific_pick_error_invalid = Please pick a resource #view_alert_definition_notification_operation_editor_specific_pick_error_no_operation = Please pick a resource that has one or more operations diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_zh.properties index 058c8b7..c25fc2b 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_zh.properties +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/client/Messages_zh.properties @@ -1113,7 +1113,7 @@ view_alert_definition_notification_operation_editor_relative_ancestor_tooltip = view_alert_definition_notification_operation_editor_relative_descendant = Then Filter By view_alert_definition_notification_operation_editor_relative_descendant_filter_tooltip = A specific name to uniquely identify a resource when more than one resource of the selected type might exist. This is optional if there will only ever be one resource of the resource type in the selected type hierarchy. view_alert_definition_notification_operation_editor_relative_descendant_loadFailed = Cannot get type descendants -view_alert_definition_notification_operation_editor_relative_descendant_tooltip = The resource type to search for under the root type defined in the Start Search From selection. +view_alert_definition_notification_operation_editor_relative_descendant_tooltip = The resource type to search for under the root type defined in the Start Search From selection. Members of this combobox are in form _plugin_ -> _type_. view_alert_definition_notification_operation_editor_specific_pick_button = Pick view_alert_definition_notification_operation_editor_specific_pick_error_invalid = \u9009\u62e9\u4e00\u4e2a\u8d44\u6e90 view_alert_definition_notification_operation_editor_specific_pick_error_no_operation = Please pick a resource that has one or more operations diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerBean.java index e9d686a..669790e 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerBean.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerBean.java @@ -24,6 +24,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; @@ -516,12 +517,12 @@ public class ResourceTypeManagerBean implements ResourceTypeManagerLocal, Resour return results; }
- public HashMap<Integer, String> getResourceTypeDescendantsWithOperations(Subject subject, int resourceTypeId) { + public LinkedHashMap<Integer, String> getResourceTypeDescendantsWithOperations(Subject subject, int resourceTypeId) { List<ResourceType> types = getAllResourceTypeDescendants(subject, resourceTypeId); excludeThoseWithoutOperations(types); - HashMap<Integer, String> results = new HashMap<Integer, String>(types.size()); + LinkedHashMap<Integer, String> results = new LinkedHashMap<Integer, String>(types.size()); for (ResourceType type : types) { - results.put(type.getId(), type.getName()); + results.put(type.getId(), type.getPlugin() + " -> " + type.getName()); } return results; } diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerLocal.java index f86e6d4..a732171 100644 --- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerLocal.java +++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceTypeManagerLocal.java @@ -168,5 +168,12 @@ public interface ResourceTypeManagerLocal {
List<ResourceType> getAllResourceTypeAncestors(Subject subject, int resourceTypeId);
+ /** + * + * @param subject subject of the caller + * @param resourceTypeId resource type to begin with + * @return list of all {@link org.rhq.core.domain.resource.ResourceType}s of all descendants + * @deprecated This method is not currently being used at all + */ List<ResourceType> getAllResourceTypeDescendants(Subject subject, int resourceTypeId); } \ No newline at end of file
rhq-commits@lists.fedorahosted.org