Add field validation for some widgets

pull/502/head
Michael Shamoon 2 years ago
parent 21017e4716
commit 1695fd5bee

@ -7,6 +7,11 @@ const widget = {
mappings: {
"request/count": {
endpoint: "request/count",
validate: [
"pending",
"approved",
"available"
]
},
},
};

@ -7,6 +7,11 @@ const widget = {
mappings: {
"request/count": {
endpoint: "request/count",
validate: [
"pending",
"approved",
"available",
],
},
},
};

@ -7,6 +7,11 @@ const widget = {
mappings: {
"api.php": {
endpoint: "api.php",
validate: [
"dns_queries_today",
"ads_blocked_today",
"domains_being_blocked"
]
},
},
};

@ -16,6 +16,9 @@ const widget = {
},
"queue/status": {
endpoint: "queue/status",
validate: [
"totalCount"
]
},
},
};

@ -7,6 +7,9 @@ const widget = {
mappings: {
queue: {
endpoint: "queue",
validate: [
"queue"
]
},
},
};

@ -11,12 +11,21 @@ const widget = {
map: (data) => ({
total: asJson(data).length,
}),
validate: [
"total"
]
},
queue: {
endpoint: "queue",
validate: [
"totalRecords"
]
},
"wanted/missing": {
endpoint: "wanted/missing",
validate: [
"totalRecords"
]
},
},
};

@ -7,6 +7,9 @@ const widget = {
mappings: {
"speedtest/latest": {
endpoint: "speedtest/latest",
validate: [
"data"
]
},
},
};

@ -7,6 +7,11 @@ const widget = {
mappings: {
status: {
endpoint: "status",
validate: [
"numActiveSessions",
"numConnections",
"bytesProxied"
]
},
},
};

@ -7,6 +7,9 @@ const widget = {
mappings: {
overview: {
endpoint: "overview",
validate: [
"http"
]
},
},
};

Loading…
Cancel
Save