Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import DragResizeHandle from "../Main/DragResizeHandle/DragResizeHandle";
import { useFilterSidebarWidth } from "./hooks/useFilterSidebarWidth";
import { CSSProperties } from "preact";
import FilterSidebarActions from "./FilterSidebarActions/FilterSidebarActions";
import { useFilterSidebarVisible } from "./hooks/useFilterSidebarVisible";
import classNames from "classnames";
import useBoolean from "../../hooks/useBoolean";
import { ExtraFilter } from "../ExtraFilters/types";
Expand All @@ -27,6 +26,7 @@ type Props = {
onAddFilter: (filter: ExtraFilter) => void;
onRemoveByValue: (field: string, value: string) => void;
onRemoveByField: (field: string) => void;
onClose: () => void;
}

const FilterSidebar: FC<Props> = ({
Expand All @@ -36,6 +36,7 @@ const FilterSidebar: FC<Props> = ({
onAddFilter,
onRemoveByValue,
onRemoveByField,
onClose,
}) => {
const { isMobile } = useDeviceDetect();
const { getCurrentPeriod } = useTimePeriod();
Expand All @@ -46,7 +47,6 @@ const FilterSidebar: FC<Props> = ({
const sidebarRef = useRef<HTMLElement>(null);
const { height, top } = useFilterSidebarSticky(sidebarRef);
const { size: parentSize, width, setWidth, clearWidth } = useFilterSidebarWidth(sidebarRef);
const { isVisible, setHidden } = useFilterSidebarVisible();

const { value: isDescOrder, toggle: toggleSortOrder } = useBoolean(true);
const orderDir = isDescOrder ? "desc" : "asc";
Expand Down Expand Up @@ -99,7 +99,6 @@ const FilterSidebar: FC<Props> = ({
<section
className={classNames({
"vm-filter-sidebar": true,
"vm-filter-sidebar_hidden": !isVisible,
"vm-filter-sidebar_mobile": isMobile,
})}
style={sidebarStyles}
Expand All @@ -112,7 +111,7 @@ const FilterSidebar: FC<Props> = ({
<FilterSidebarActions
onToggleSort={toggleSortOrder}
onResetWidth={clearWidth}
onClose={setHidden}
onClose={onClose}
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
font-size: $font-size-small;
z-index: 99;

&_hidden {
position: absolute;
left: -100vw;
opacity: 0;
z-index: -1;
pointer-events: none;
}

&_mobile {
position: fixed;
left: 0;
Expand Down
3 changes: 2 additions & 1 deletion app/vmui/packages/vmui/src/pages/QueryPage/QueryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const QueryPage: FC = () => {
const [queryError, setQueryError] = useState<ErrorTypes | string>("");

const { extraFilters, extraParams, addNewFilter, removeFilterByValue, removeFilterByField } = useExtraFilters();
const { isVisible: isVisibleFilterSidebar } = useFilterSidebarVisible();
const { isVisible: isVisibleFilterSidebar, setHidden: onCloseFilterSidebar } = useFilterSidebarVisible();

const handleUpdateQuery = () => {
if (!inputQueryRef.current) {
Expand Down Expand Up @@ -88,6 +88,7 @@ const QueryPage: FC = () => {
onAddFilter={addNewFilter}
onRemoveByValue={removeFilterByValue}
onRemoveByField={removeFilterByField}
onClose={onCloseFilterSidebar}
/>
)}

Expand Down
1 change: 1 addition & 0 deletions docs/victorialogs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ according to the following docs:
* BUGFIX: [cluster version](https://docs.victoriametrics.com/victorialogs/cluster/): avoid `cannot connect to storage node at ...: EOF` errors after `vlselect` or `vlinsert` was idle for more than 60 seconds. See [#1440](https://github.com/VictoriaMetrics/VictoriaLogs/issues/1440).
* BUGFIX: [vlselect](https://docs.victoriametrics.com/victorialogs/cluster/): return `502 Bad Gateway` HTTP response code for incoming queries when one of the `vlstorage` nodes runs a VictoriaLogs version with an incompatible internal API instead of `400 Bad Request`. This is consistent with the `502 Bad Gateway` response returned when a `vlstorage` node is unavailable, and it allows building a proper failover scheme in high-availability setups. See [these docs](https://docs.victoriametrics.com/victorialogs/cluster/#high-availability).
* BUGFIX: [multi-level cluster setup](https://docs.victoriametrics.com/victorialogs/cluster/#multi-level-cluster-setup): properly return `502 Bad Gateway` HTTP response code when a `vlselect` node queries other `vlselect` nodes and the underlying `vlstorage` is unavailable, as described at [high availability](https://docs.victoriametrics.com/victorialogs/cluster/#high-availability) docs. This allows configuring proper failover schemes to a healthy cluster.
* BUGFIX: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): fix filters sidebar opening on mobile. See [#1537](https://github.com/VictoriaMetrics/VictoriaLogs/issues/1537).

## [v1.51.0](https://github.com/VictoriaMetrics/VictoriaLogs/releases/tag/v1.51.0)

Expand Down
Loading