'scans [-x]
List all scans, past and present. -x for extended view.'

def do_scans(self, line):

    d = self.request((self.ownopts['cli.server_baseurl'] + '/scanlist'))
    if (not d):
        return
    j = json.loads(d)
    if (len(j) == 0):
        self.dprint('No    scans    exist.')
        return
    c = self.myparseline(line)
    titles = dict()
    if ('-x' in c[0]):
        titles = {'0': 'ID', '1': 'Name', '2': 'Target', '4': 'Started', '5': 'Finished', '6': 'Status', '7': 'Total    Elements'}
    else:
        titles = {'0': 'ID', '2': 'Target', '6': 'Status', '7': 'Total    Elements'}
    self.send_output(d, line, titles=titles)
