java/code/src/com/redhat/rhn/frontend/action/systems/SystemListHelper.java | 11
++++------
spacecmd/src/lib/activationkey.py | 4 +--
spacecmd/src/lib/system.py | 4 +--
spacecmd/src/lib/utils.py | 4 +--
4 files changed, 11 insertions(+), 12 deletions(-)
New commits:
commit 4b1e2ad3e1fc44bfc89a259d1f84b61b06f1ece6
Author: Matej Kollar <mkollar(a)redhat.com>
Date: Wed Nov 27 13:45:08 2013 +0100
bootstrap tuning - use bootstrap style for "locked" icon
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/SystemListHelper.java
b/java/code/src/com/redhat/rhn/frontend/action/systems/SystemListHelper.java
index 815ed84..c26a84a 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/SystemListHelper.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/SystemListHelper.java
@@ -157,24 +157,23 @@ public class SystemListHelper {
if (next.getLocked().intValue() == 1) {
HtmlTag lockedUrl = new HtmlTag("a");
- HtmlTag lockedImg = new HtmlTag("img");
+ HtmlTag lockedIcon = new HtmlTag("i");
//status = "locked";
lockedUrl.setAttribute("href",
"/rhn/help/reference/en-US/s1-sm-systems.jsp");
message = ls.getMessage("systemlist.jsp.locked");
- lockedImg.setAttribute("src", "/img/icon_locked.gif");
- lockedImg.setAttribute("alt", message);
- lockedImg.setAttribute("title", message);
+ lockedIcon.setAttribute("class", "fa
spacewalk-icon-locked-system");
+ lockedIcon.setAttribute("title", message);
if (makeLinks) {
makeLinks = ConfigDefaults.get().isDocAvailable();
}
if (makeLinks) {
- lockedUrl.addBody(lockedImg);
+ lockedUrl.addBody(lockedIcon);
statusDisplay = statusDisplay + lockedUrl.render();
}
else {
- statusDisplay = statusDisplay + lockedImg.render();
+ statusDisplay = statusDisplay + lockedIcon.render();
}
}
commit d81890cbd310877afbea42b56e73c6761c846dd8
Author: Matej Kollar <mkollar(a)redhat.com>
Date: Wed Nov 27 13:39:52 2013 +0100
Making code more "pythonic"
by small steps
diff --git a/spacecmd/src/lib/activationkey.py b/spacecmd/src/lib/activationkey.py
index 2096b1c..d1ca8cd 100644
--- a/spacecmd/src/lib/activationkey.py
+++ b/spacecmd/src/lib/activationkey.py
@@ -559,8 +559,8 @@ def do_activationkey_setconfigchannelorder(self, args):
print
print 'New Configuration Channels:'
- for i in range(len(new_channels)):
- print '[%i] %s' % (i + 1, new_channels[i])
+ for i, new_channel in enumerate(new_channels, 1):
+ print '[%i] %s' % (i, new_channel)
self.client.activationkey.setConfigChannels(self.session,
[key],
diff --git a/spacecmd/src/lib/system.py b/spacecmd/src/lib/system.py
index c4fcfdc..31fde5c 100644
--- a/spacecmd/src/lib/system.py
+++ b/spacecmd/src/lib/system.py
@@ -1396,8 +1396,8 @@ def do_system_setconfigchannelorder(self, args):
print
print 'New Configuration Channels'
print '--------------------------'
- for i in range(len(new_channels)):
- print '[%i] %s' % (i + 1, new_channels[i])
+ for i, new_channel in new_channels(new_channels, 1):
+ print '[%i] %s' % (i, new_channel)
if not self.user_confirm(): return
diff --git a/spacecmd/src/lib/utils.py b/spacecmd/src/lib/utils.py
index 453bdb1..923f7f2 100644
--- a/spacecmd/src/lib/utils.py
+++ b/spacecmd/src/lib/utils.py
@@ -415,8 +415,8 @@ def config_channel_order(all_channels=[], new_channels=[]):
while True:
print 'Current Selections'
print '------------------'
- for i in range(len(new_channels)):
- print '%i. %s' % (i + 1, new_channels[i])
+ for i, new_channel in enumerate(new_channels, 1):
+ print '%i. %s' % (i, new_channel)
print
action = prompt_user('a[dd], r[emove], c[lear], d[one]:')
Show replies by date