+
+
+ The Data Status component uses quality flags and values from
+ timeseries to return a quick overview of data in the last number of
+ hours that you specify. It is not meant to be a replacement of the
+ DataStatusSummary CWMS application, but certainly can function as a
+ substitute!
+
+
+ {!filePending && fileError ? Failed to load TSID data status file! {fileError?.message}
: }
+
+
+
+ {`import dayjs from "dayjs";
+import { useState } from "react";
+import { useDataStatusFile } from "@usace-watermanagement/groundwork-water";
+
+/* swt.datastatus Contents :
+: This is a comment
+KEYS.Elev.Inst.1Hour.0.Ccp-Rev
+ALTU.Precip-Inc.Total.15Minutes.15Minutes.Ccp-Rev
+CLRK.Precip-Inc.Total.15Minutes.15Minutes.Ccp-Rev
+: KEYS.Precip-Inc.Total.1Hour.1Hour.Ccp-Rev
+*/
+
+default export function Example() {
+ /* This is optional if you want to load tsids from a file */
+ const { data: fileTsids, error: fileError, isPending: filePending } = useDataStatusFile({
+ fileUrl: "/data/summary/swt.datastatus",
+ })
+ if (filePending) {
+ return
+ }
+ if (fileError) {
+ return Failed to load TSID data status file! {fileError?.message}
+ }
+ /* You could use a timeseries group to load tsids as well! */
+ // Or use a static array below :
+ const tsids = ["KEYS.Elev.Inst.1Hour.0.Ccp-Rev"]
+ return
+}
+`}
+
+
+
+ Data Status Parameters
+ {``}
+
+
+
+
+ You must specify either dataStatusUrl or tsids or the table will have no
+ values!
+
+
+ );
+}
+
+export { DataStatusPage };
+export default DataStatusPage;
diff --git a/lib/components/data/hooks/useDataStatusFile.ts b/lib/components/data/hooks/useDataStatusFile.ts
new file mode 100644
index 0000000..7d0424e
--- /dev/null
+++ b/lib/components/data/hooks/useDataStatusFile.ts
@@ -0,0 +1,31 @@
+import { useQuery, UseQueryOptions } from "@tanstack/react-query";
+
+
+interface useDataStatusFileParams {
+ fileUrl: string;
+ queryOptions?: Partial