more eye candy in lish output of job details
This commit is contained in:
parent
c2275e8e63
commit
49bf87f254
2 changed files with 12 additions and 7 deletions
|
|
@ -63,8 +63,8 @@ class Job:
|
|||
self.log = log
|
||||
|
||||
def pretty_string(self):
|
||||
ret = (self.hex_string() + ": (Hostgroup: " + str(self.hostgroup.get_name()) +
|
||||
" Host: " + str(self.host) + " Service: " + str(self.service) + " " + str(self.job) + ") Enabled: " +
|
||||
ret = (self.hex_string() + ": Hostgroup: " + str(self.hostgroup.get_name()) +
|
||||
" Host: " + str(self.host) + " Service: " + str(self.service) + " " + str(self.job) + " Enabled: " +
|
||||
str(self._enabled))
|
||||
return ret
|
||||
|
||||
|
|
@ -74,7 +74,6 @@ class Job:
|
|||
def set_enabled(self, enabled=True):
|
||||
self._enabled = enabled
|
||||
|
||||
|
||||
def handle_threshold(self, jobInfo, serviceThreshold, executionSucessful):
|
||||
if executionSucessful:
|
||||
if self.jobThreshold > 0:
|
||||
|
|
|
|||
|
|
@ -181,10 +181,16 @@ class LishCommander(Exit, ShellCommander, LogCommander):
|
|||
print "executes python using 'exec'."
|
||||
|
||||
def print_jobs_infos(self, job):
|
||||
print "Job: " + job.hex_string() + "\n" + \
|
||||
"Host: " + job.host + "\n" + \
|
||||
"Service: " + job.service.get_type() + "\n" + \
|
||||
"Members: " + str([member.name for member in job.members])
|
||||
#TODO: fix the output for "interval" and "next run"
|
||||
print "Job:\t\t" + job.hex_string() + "\n" + \
|
||||
"Hostgroup:\t" + job.hostgroup.get_name() + "\n" + \
|
||||
"Host:\t\t" + job.host + "\n" + \
|
||||
"Service:\t" + str(job.service) + "\n" + \
|
||||
"Members:\t" + str([member.name for member in job.members]) + "\n" + \
|
||||
"Interval:\t" + str(job.job) + "\n" + \
|
||||
"Next run:\t" + str(job.job) + "\n" + \
|
||||
"Enabled:\t" + str(job._enabled) + "\n" + \
|
||||
"Fails:\t\t" + str(job.jobThreshold)
|
||||
|
||||
def do_job(self, text):
|
||||
text = shsplit(text)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue