MCPcopy Create free account
hub / github.com/azimjohn/jprq / getStatusColor

Function getStatusColor

cli/debugger/static/script.js:48–54  ·  view source on GitHub ↗
(status)

Source from the content-addressed store, hash-verified

46};
47
48const getStatusColor = (status) => {
49 let first_digit = Math.floor(status / 100);
50 const colors = {
51 1: "gray-500", 2: "green-500", 3: "yellow-500", 4: "red-500", 5: "rose-500", DEFAULT: "gray-500",
52 };
53 return first_digit in colors ? colors[first_digit] : colors["DEFAULT"];
54};
55
56const addRequest = (request) => {
57 let methodColor = getMethodColor(request.method);

Callers 1

update_request_statusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected