Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Commit

Permalink
Made information about node's label source easy to interpret.
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlecat committed Sep 27, 2013
1 parent 8d2d273 commit 4d01e37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ public void updateContent(Cursor cursor) {
TextView labelSourceView =
(TextView) getActivity().findViewById(R.id.node_label_source);
if (labelSource != null) {
labelSourceView.setText(labelSource);
if (labelSource.equals("U")) labelSourceView.setText(R.string.node_label_source_userdefined);
else if (labelSource.equals("H")) labelSourceView.setText(R.string.node_label_source_hostname);
else if (labelSource.equals("S")) labelSourceView.setText(R.string.node_label_source_sysname);
else if (labelSource.equals("A")) labelSourceView.setText(R.string.node_label_source_address);
else labelSourceView.setText(labelSource);
} else {
detailsLayout.removeView(labelSourceView);
TextView title =
Expand Down
4 changes: 4 additions & 0 deletions src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
<string name="node_details_contact">Contact</string>
<string name="node_details_creation_time">Creation time</string>
<string name="node_details_label_source">Label source</string>
<string name="node_label_source_address">IP address</string>
<string name="node_label_source_hostname">Hostname</string>
<string name="node_label_source_sysname">SNMP name</string>
<string name="node_label_source_userdefined">User defined</string>
<string name="node_details_description">Description</string>
<string name="node_details_location">Location</string>
<string name="node_sys_object_id">sysObjectId</string>
Expand Down

0 comments on commit 4d01e37

Please sign in to comment.