MCPcopy Create free account
hub / github.com/SpectacularAI/sdk / status

Function status

python/cli/diagnose/html.py:132–143  ·  view source on GitHub ↗
(sensor)

Source from the content-addressed store, hash-verified

130 return '<%s class="%s">%s</%s>' % (tag, classes, text, tag)
131
132def status(sensor):
133 diagnosis = sensor["diagnosis"]
134
135 if diagnosis == "ok":
136 s = '<span class="passed">Passed</span>\n'
137 elif diagnosis == "warning":
138 s = '<span class="warning">Warning</span>\n'
139 elif diagnosis == "error":
140 s = '<span class="error">Error</span>\n'
141 else:
142 raise ValueError(f"Unknown diagnosis: {diagnosis}")
143 return s
144
145def generateSensor(sensor, name, id):
146 s = ""

Callers 1

generateSensorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected