new jobs list output with colors... yeah!
This commit is contained in:
parent
fcfd73baf1
commit
902eac89d2
1 changed files with 4 additions and 1 deletions
|
|
@ -169,7 +169,10 @@ class LishCommander(Exit):
|
||||||
def do_jobs(self, text):
|
def do_jobs(self, text):
|
||||||
if text == "list":
|
if text == "list":
|
||||||
for job in self.interface.jobs:
|
for job in self.interface.jobs:
|
||||||
print job.pretty_string()
|
job_dict = self.interface.get_job_info_dict(job)
|
||||||
|
print GREEN + job_dict["Job"] + END + ": Hostgroup: " + job_dict["Hostgroup"] + \
|
||||||
|
": Host: " + job_dict["Host"] + ": Service: " + job_dict["Service"] + \
|
||||||
|
": Next run: " + job_dict["Next run"] + ": Enabled: " + job_dict["Enabled"]
|
||||||
else:
|
else:
|
||||||
self.print_color(RED, "Invalid or missing parameter")
|
self.print_color(RED, "Invalid or missing parameter")
|
||||||
self.help_jobs()
|
self.help_jobs()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue