Posting disk results is working
This commit is contained in:
parent
b3f2a86f46
commit
12ea0fdd53
2 changed files with 5 additions and 4 deletions
|
|
@ -4,9 +4,7 @@ import json
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
||||||
# TODO: Still need functions.data ?
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from functions.data import *
|
|
||||||
from functions.png_graph import *
|
from functions.png_graph import *
|
||||||
from functions.osticket import *
|
from functions.osticket import *
|
||||||
from functions.sensors import *
|
from functions.sensors import *
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,9 @@ class osTicket():
|
||||||
if not source_report:
|
if not source_report:
|
||||||
index = 0
|
index = 0
|
||||||
source_report = test.dev.generate_attribute_report()
|
source_report = test.dev.generate_attribute_report()
|
||||||
|
elif not source_report:
|
||||||
|
index = 0
|
||||||
|
out_report.append('{} ({})'.format(name, status))
|
||||||
else:
|
else:
|
||||||
out_report.append('{} ({})'.format(strip_colors(source_report[0]), status))
|
out_report.append('{} ({})'.format(strip_colors(source_report[0]), status))
|
||||||
|
|
||||||
|
|
@ -345,8 +348,8 @@ class osTicket():
|
||||||
# Build SQL cmd
|
# Build SQL cmd
|
||||||
sql_cmd = "UPDATE `{Name}`.`{Ticket}`".format(
|
sql_cmd = "UPDATE `{Name}`.`{Ticket}`".format(
|
||||||
**OSTICKET['Database'], **OSTICKET['Tables'])
|
**OSTICKET['Database'], **OSTICKET['Tables'])
|
||||||
sql_cmd += " SET `{}` = `{}`".format(flag_name, flag_value)
|
sql_cmd += " SET `{}` = '{}'".format(flag_name, flag_value)
|
||||||
sql_cmd += " WHERE `{Ticket}`.`ticket_id` = `{ticket_id}`".format(
|
sql_cmd += " WHERE `{Ticket}`.`ticket_id` = {ticket_id}".format(
|
||||||
ticket_id=ticket_id, **OSTICKET['Tables'])
|
ticket_id=ticket_id, **OSTICKET['Tables'])
|
||||||
sql_cmd += ";"
|
sql_cmd += ";"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue