Fix NTP table 'Displaying 1 item' when being empty
Table in System Configuration page shows the message "Displaying 1 item" when there is no item to display. This change fixes the issue by appending items to the list only when NTP servers are found. Test plan: PASS: * Deploy a system and not configure NTP services. * Explore GUI to System Configuration, tab NTP, and check the message 'No items to display.' is presented. PASS: * Deploy a system and configure NTP services. * Explore GUI to System Configuration, tab NTP, and check the message 'Displaying 1 item.' is presented below and above the NTP servers URLs. Closes-bug: 2027731 Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com> Change-Id: Ib318f5e9bd559f26a6a73e6189a6e6bd9f8a17df
This commit is contained in:
parent
d9ec96acc7
commit
e4c24875c0
|
@ -117,7 +117,7 @@ class cNTPTab(tabs.TableTab):
|
|||
for index, server in enumerate(servers):
|
||||
ntp_data['ntpserver_%s' % (index + 1)] = server
|
||||
|
||||
data.append(type('NTP', (object,), ntp_data)())
|
||||
data.append(type('NTP', (object,), ntp_data)())
|
||||
|
||||
except Exception:
|
||||
exceptions.handle(request,
|
||||
|
|
Loading…
Reference in New Issue