diff --git a/src/actions/loadLogs.js b/src/actions/loadLogs.js
index da20d9d4..dda20106 100644
--- a/src/actions/loadLogs.js
+++ b/src/actions/loadLogs.js
@@ -6,8 +6,7 @@ import setMatrixData from "./setMatrixData";
import { nanoid } from "nanoid";
import { setStartTime, setStopTime } from "./";
import { findRangeByLabel } from "../components/StatusBar/components/daterangepicker/utils";
-import { createAlert } from "./createAlert";
-import { errorHandler } from "./errorHandler";
+
export default function loadLogs() {
const localStore = store.getState();
@@ -128,7 +127,7 @@ export default function loadLogs() {
dispatch(setMatrixData([]));
dispatch(setLoading(false));
- const handler = errorHandler(url, error, type)
+
});
};
diff --git a/src/components/LabelBrowser/QueryBar.js b/src/components/LabelBrowser/QueryBar.js
index 7975ec59..51242be7 100644
--- a/src/components/LabelBrowser/QueryBar.js
+++ b/src/components/LabelBrowser/QueryBar.js
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from "react";
import { useSelector, useDispatch } from "react-redux";
-import { setIsSubmit, setQuery } from "../../actions";
+import { setQuery } from "../../actions";
import loadLogs from "../../actions/loadLogs";
import setLoading from "../../actions/setLoading";
import { setLabelsBrowserOpen } from "../../actions/setLabelsBrowserOpen";
@@ -33,7 +33,6 @@ export const QueryBar = () => {
const apiUrl = useSelector((store) => store.apiUrl);
const historyOpen = useSelector((store) => store.historyOpen);
const isEmbed = useSelector((store) => store.isEmbed)
- const apiWarning = useSelector((store) => store.apiWarning)
const [queryInput, setQueryInput] = useState(query);
const [queryValid, setQueryValid] = useState(false);
const [queryValue, setQueryValue] = useState(queryInit(query));
diff --git a/src/components/LabelBrowser/ValuesList.js b/src/components/LabelBrowser/ValuesList.js
index bbd80359..9b6f9bbf 100644
--- a/src/components/LabelBrowser/ValuesList.js
+++ b/src/components/LabelBrowser/ValuesList.js
@@ -8,7 +8,6 @@ import { setQuery } from "../../actions";
import loadLabelValues from "../../actions/loadLabelValues";
import Tooltip from "@mui/material/Tooltip";
-import store from "../../store/store";
import styled from "@emotion/styled";
import loadLabels from "../../actions/loadLabels";
diff --git a/src/components/LabelBrowser/helpers/querybuilder.js b/src/components/LabelBrowser/helpers/querybuilder.js
index 6116f211..9e2a4e98 100644
--- a/src/components/LabelBrowser/helpers/querybuilder.js
+++ b/src/components/LabelBrowser/helpers/querybuilder.js
@@ -2,9 +2,7 @@ import { setQuery } from "../../../actions";
import store from "../../../store/store";
export function queryBuilder(labels) {
- const actualLabels = store.getState().labels
const actualQuery = store.getState().query
- // console.log(actualLabels)
const preTags = actualQuery.split("{")[0]
const postTags = actualQuery.split("}")[1]
const selectedLabels = [];
diff --git a/src/components/StatusBar/components/daterangepicker/defaults.js b/src/components/StatusBar/components/daterangepicker/defaults.js
index 9138cefb..c7a965a3 100644
--- a/src/components/StatusBar/components/daterangepicker/defaults.js
+++ b/src/components/StatusBar/components/daterangepicker/defaults.js
@@ -1,55 +1,51 @@
-import {
- addDays,
- startOfWeek,
- endOfWeek,
- addWeeks,
- startOfMonth,
- endOfMonth,
- addMonths,
- addMinutes,
- addHours,
- addSeconds,
- startOfDay,
- endOfDay,
- getHours
-} from "date-fns";
-
-const getDefaultRanges = (date) => [
- {
- label: "Today",
- dateStart: startOfDay,
- dateEnd: endOfDay
- },
- {
- label: "Yesterday",
- dateStart: addDays(date, -1),
- dateEnd: addDays(date, -1)
- },
- {
- label: "This Week",
- dateStart: startOfWeek(date),
- dateEnd: endOfWeek(date)
- },
- {
- label: "Last Week",
- dateStart: startOfWeek(addWeeks(date, -1)),
- dateEnd: endOfWeek(addWeeks(date, -1))
- },
- {
- label: "Last 7 Days",
- dateStart: addWeeks(date, -1),
- dateEnd: date
- },
- {
- label: "This Month",
- dateStart: startOfMonth(date),
- dateEnd: endOfMonth(date)
- },
- {
- label: "Last Month",
- dateStart: startOfMonth(addMonths(date, -1)),
- dateEnd: endOfMonth(addMonths(date, -1))
- }
-];
-
+import {
+ addDays,
+ startOfWeek,
+ endOfWeek,
+ addWeeks,
+ startOfMonth,
+ endOfMonth,
+ addMonths,
+ startOfDay,
+ endOfDay,
+} from "date-fns";
+
+const getDefaultRanges = (date) => [
+ {
+ label: "Today",
+ dateStart: startOfDay,
+ dateEnd: endOfDay
+ },
+ {
+ label: "Yesterday",
+ dateStart: addDays(date, -1),
+ dateEnd: addDays(date, -1)
+ },
+ {
+ label: "This Week",
+ dateStart: startOfWeek(date),
+ dateEnd: endOfWeek(date)
+ },
+ {
+ label: "Last Week",
+ dateStart: startOfWeek(addWeeks(date, -1)),
+ dateEnd: endOfWeek(addWeeks(date, -1))
+ },
+ {
+ label: "Last 7 Days",
+ dateStart: addWeeks(date, -1),
+ dateEnd: date
+ },
+ {
+ label: "This Month",
+ dateStart: startOfMonth(date),
+ dateEnd: endOfMonth(date)
+ },
+ {
+ label: "Last Month",
+ dateStart: startOfMonth(addMonths(date, -1)),
+ dateEnd: endOfMonth(addMonths(date, -1))
+ }
+];
+
export const defaultRanges = getDefaultRanges(new Date());
\ No newline at end of file
diff --git a/src/components/StatusBar/components/daterangepicker/index.js b/src/components/StatusBar/components/daterangepicker/index.js
index c1e97947..b684b014 100644
--- a/src/components/StatusBar/components/daterangepicker/index.js
+++ b/src/components/StatusBar/components/daterangepicker/index.js
@@ -178,10 +178,7 @@ export function DateRangePickerMain(props) {
dispatch(setRangeOpen(false));
isOpen(e);
};
- const onQueryValid = (query) => {
- return query !== "{" && query !== "}" && query !== "{}" && query !== ""; // TODO: make a proper query validation
- };
- // helpers
+
const inHoverRange = (day) => {
return (
dateStart &&
diff --git a/src/components/StatusBar/components/timepickerbutton/TimePickerButton.js b/src/components/StatusBar/components/timepickerbutton/TimePickerButton.js
index 665fb03f..2ffe6f52 100644
--- a/src/components/StatusBar/components/timepickerbutton/TimePickerButton.js
+++ b/src/components/StatusBar/components/timepickerbutton/TimePickerButton.js
@@ -1,21 +1,20 @@
-import { TimePickerButtonStyled } from "./styled";
-import { useDispatch, useSelector } from "react-redux";
-import setTimePickerOpen from "./actions/setTimePickerOpen";
-import AccessTimeIcon from "@mui/icons-material/AccessTime";
-import { setRangeOpen } from "../../../../actions";
-
-export default function TimePickerButton() {
- const dispatch = useDispatch();
- const timePickerOpen = useSelector((store) => store.rangeOpen);
-
- function openTimePicker() {
- const shouldOpen = timePickerOpen ? false : true;
-
- dispatch(setRangeOpen(shouldOpen));
- }
- return (
-
${moment(item.datapoint[0]).format( - "YYYY-MM-DDTHH:mm:ss.SSSZ" - )}
- -- Value: ${itemValue}
-${moment(item.datapoint[0]).format( + "YYYY-MM-DDTHH:mm:ss.SSSZ" + )}
+ ++ Value: ${itemValue}
+