mirror of
https://github.com/SigNoz/signoz.git
synced 2026-10-07 10:40:42 +01:00
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
cacheci / tests (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
#### Description
- `queryBuilderFields` on a panel definition had no effect.
`QueryBuilderV2` discarded the prop for list panels (the only kind that
declared anything), nothing downstream read `isHidden`/`isDisabled`, and
the `filters` / `whereClauseConfig` entry had no consumer anywhere in
the repo. The behaviour it appeared to configure came entirely from
`isListViewPanel`.
- Replaces it with a config in the builder's own vocabulary — a
per-field `hidden` / `disabled` / `pinned` rule over
`QueryBuilderField`, covering per-query controls plus `Formula` and
`AdditionalQueries`. A config can only narrow what the builder already
supports for the current data source and panel type, so definitions
never restate the builder's rules. `reason` is required on `disabled` so
an inert control always explains itself.
- `isListViewPanel` becomes `isRawQuery`: it was named for a dashboard
panel type but lives in a component three explorers use. It supplies the
defaults for `fieldsConfig` and the new `allowedDataSources`, which
callers override per field. On the dashboards side it is read from the
`requestType` a kind already declares, replacing a hardcoded
`signoz/ListPanel` check.
- Deletes the dead plumbing this uncovered:
`FilterConfigs`/`WhereClauseConfig`, the
`queryComponents`/`renderOrderBy` prop, Formula's
`isAdditionalFilterEnable` block and the four modules only it reached.
Net -900 lines. No behaviour change intended.
#### Additional Information
- Reviewing by commit is easier than by file; the four are split by
concern.
- **Formula-level HAVING is gone for real.** It only rendered behind
`isAdditionalFilterEnable`, whose sole call site passed `false`, and
QBv2 never reimplemented it — so this removes the only implementation
rather than one of two. Shout if that was on someone's roadmap.
- **`renderOrderBy` was already dead**, which means Logs and Traces
Explorer silently lost their `ExplorerOrderBy` control when QBv2 landed.
I removed the prop but left the component on disk, since that looks like
an unintended regression rather than intended cleanup.
- **Known gap:** the metrics aggregation section is outside the config.
`MetricsAggregateSection` renders its own group-by, space aggregation
and step interval, so `{ groupBy: { state: 'hidden' } }` looks like it
works on a metrics query and does not. Worth closing separately.
- `disabled` is implemented, not just declared — greyed control,
`reason` in the tooltip, refuses activation — but nothing declares it
yet; ListPanel still hides. Switching any field over is a one-key edit.
351 lines
7.6 KiB
SCSS
351 lines
7.6 KiB
SCSS
.query-add-ons {
|
|
width: 100%;
|
|
|
|
--toggle-group-secondary-bg: var(
|
|
--query-builder-v2-toggle-group-background-color,
|
|
var(--l1-background-hover)
|
|
);
|
|
--toggle-group-secondary-border: var(
|
|
--query-builder-v2-toggle-group-border-color,
|
|
var(--l2-border)
|
|
);
|
|
--toggle-group-secondary-active-bg: var(
|
|
--query-builder-v2-toggle-group-active-background-color,
|
|
var(--l1-background)
|
|
);
|
|
--toggle-group-secondary-bg-hover: var(
|
|
--query-builder-v2-toggle-group-background-color-hover,
|
|
var(--l2-background)
|
|
);
|
|
|
|
.add-on-tab-title {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--margin-2);
|
|
|
|
&--disabled {
|
|
opacity: 0.45;
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
}
|
|
|
|
.add-ons-list {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
|
|
.add-ons-tabs {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
|
|
.add-on-tab-title {
|
|
display: flex;
|
|
gap: var(--margin-2);
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: var(--font-size-xs);
|
|
font-style: normal;
|
|
font-weight: var(--font-weight-normal);
|
|
|
|
color: var(--query-builder-v2-color, var(--l2-foreground));
|
|
}
|
|
|
|
> button {
|
|
border: 1px solid var(--query-builder-v2-border-color, var(--l2-border));
|
|
border-left: none;
|
|
min-width: 120px;
|
|
height: 36px;
|
|
line-height: 36px;
|
|
|
|
&:first-child {
|
|
border-left: 1px solid
|
|
var(--query-builder-v2-border-color, var(--l2-border));
|
|
}
|
|
|
|
&::before {
|
|
background: var(--query-builder-v2-border-color, var(--l2-border));
|
|
}
|
|
|
|
&[data-state='on'] {
|
|
color: var(--text-robin-500);
|
|
border: 1px solid var(--query-builder-v2-border-color, var(--l2-border));
|
|
|
|
display: none;
|
|
|
|
&::before {
|
|
background: var(--query-builder-v2-border-color, var(--l2-border));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.compass-button {
|
|
width: 30px;
|
|
height: 30px;
|
|
|
|
border-radius: 2px;
|
|
border: 1px solid var(--query-builder-v2-border-color, var(--l2-border));
|
|
background: var(--l3-background);
|
|
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
|
|
}
|
|
}
|
|
|
|
.having-filter-container {
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
|
|
.having-filter-select-container {
|
|
position: relative;
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: flex-start;
|
|
background: var(--query-builder-v2-background-color, var(--l2-background));
|
|
padding-right: 38px;
|
|
|
|
.having-filter-select-editor {
|
|
border-radius: 2px;
|
|
flex: 1;
|
|
width: calc(100% - 40px);
|
|
|
|
.cm-content {
|
|
padding: 0;
|
|
}
|
|
|
|
.cm-editor {
|
|
border-radius: 2px;
|
|
background-color: transparent !important;
|
|
position: relative !important;
|
|
|
|
&:focus-within {
|
|
border-color: var(--primary-background);
|
|
}
|
|
|
|
&.cm-focused {
|
|
outline: none !important;
|
|
}
|
|
|
|
.cm-content {
|
|
border: 1px solid var(--query-builder-v2-border-color, var(--l2-border));
|
|
border-left-width: 0px;
|
|
border-right-width: 0px;
|
|
padding: 0px !important;
|
|
background-color: var(
|
|
--query-builder-v2-background-color,
|
|
var(--l2-background)
|
|
) !important;
|
|
|
|
&:focus-within {
|
|
border-color: var(--query-builder-v2-border-color, var(--l2-border));
|
|
}
|
|
}
|
|
|
|
.cm-tooltip-autocomplete {
|
|
background: var(--l3-background) !important;
|
|
color: var(--l1-background) !important;
|
|
border-radius: 2px !important;
|
|
font-size: 12px !important;
|
|
font-weight: 500 !important;
|
|
position: absolute !important;
|
|
top: calc(100% + 6px) !important;
|
|
left: 0px !important;
|
|
right: 0px !important;
|
|
|
|
border-radius: 4px;
|
|
border: 1px solid var(--l1-border);
|
|
background: linear-gradient(
|
|
139deg,
|
|
color-mix(in srgb, var(--card) 80%, transparent) 0%,
|
|
color-mix(in srgb, var(--card) 90%, transparent) 98.68%
|
|
) !important;
|
|
backdrop-filter: blur(20px);
|
|
box-sizing: border-box;
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
|
|
font-family: 'Space Mono', monospace !important;
|
|
color: var(--l1-foreground) !important;
|
|
|
|
ul {
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
font-family: 'Space Mono', monospace !important;
|
|
min-height: 200px !important;
|
|
|
|
&::-webkit-scrollbar {
|
|
width: 0.3rem;
|
|
}
|
|
&::-webkit-scrollbar-corner {
|
|
background: transparent;
|
|
}
|
|
&::-webkit-scrollbar-thumb {
|
|
background: rgb(136, 136, 136);
|
|
border-radius: 0.625rem;
|
|
}
|
|
&::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
li {
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
line-height: 36px !important;
|
|
height: 36px !important;
|
|
padding: 4px 8px !important;
|
|
|
|
display: flex !important;
|
|
align-items: center !important;
|
|
gap: 8px !important;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
|
|
font-family: 'Space Mono', monospace !important;
|
|
|
|
.cm-completionIcon {
|
|
display: none !important;
|
|
}
|
|
|
|
&[aria-selected='true'] {
|
|
// background-color: rgba(78, 116, 248, 0.7) !important;
|
|
background: color-mix(
|
|
in srgb,
|
|
var(--bg-robin-200) 4%,
|
|
transparent
|
|
) !important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.cm-gutters {
|
|
display: none !important;
|
|
}
|
|
|
|
.cm-scroller {
|
|
scrollbar-width: none;
|
|
|
|
&::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
&::-webkit-scrollbar-thumb {
|
|
display: none;
|
|
}
|
|
|
|
&::-webkit-scrollbar-track {
|
|
display: none;
|
|
}
|
|
|
|
&::-webkit-scrollbar-corner {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.cm-line {
|
|
min-height: 34px;
|
|
line-height: 32px !important;
|
|
font-family: 'Space Mono', monospace !important;
|
|
background-color: var(
|
|
--query-builder-v2-background-color,
|
|
var(--l2-background)
|
|
) !important;
|
|
|
|
::-moz-selection {
|
|
background: var(
|
|
--query-builder-v2-selection-background-color,
|
|
var(--l3-background)
|
|
) !important;
|
|
opacity: 0.5 !important;
|
|
}
|
|
|
|
::selection {
|
|
background: var(
|
|
--query-builder-v2-selection-background-color,
|
|
var(--l3-background)
|
|
) !important;
|
|
opacity: 0.5 !important;
|
|
}
|
|
|
|
.cm-function {
|
|
color: var(--primary-background) !important;
|
|
}
|
|
|
|
.chip-decorator {
|
|
background: var(
|
|
--query-builder-v2-chip-decorator-background-color,
|
|
var(--l3-background)
|
|
) !important;
|
|
color: var(--query-builder-v2-color, var(--l2-foreground)) !important;
|
|
border-radius: 4px;
|
|
padding: 2px 4px;
|
|
margin-right: 4px;
|
|
}
|
|
}
|
|
|
|
.cm-selectionBackground {
|
|
background: var(
|
|
--query-builder-v2-selection-background-color,
|
|
var(--l3-background)
|
|
) !important;
|
|
opacity: 0.5 !important;
|
|
}
|
|
|
|
.cm-activeLine > span {
|
|
font-size: 12px !important;
|
|
}
|
|
|
|
.cm-placeholder {
|
|
color: var(
|
|
--query-builder-v2-placeholder-color,
|
|
var(--l3-foreground)
|
|
) !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
.close-btn {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
border-radius: 0px 2px 2px 0px;
|
|
border: 1px solid var(--query-builder-v2-border-color, var(--l2-border));
|
|
background: var(--query-builder-v2-background-color, var(--l2-background));
|
|
height: 100%;
|
|
width: 38px;
|
|
|
|
border-top-left-radius: 0px;
|
|
border-bottom-left-radius: 0px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.selected-add-ons-content {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
|
|
gap: 8px;
|
|
padding-bottom: 8px;
|
|
position: relative;
|
|
|
|
.add-on-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
|
|
max-width: 100%;
|
|
min-width: 100%;
|
|
min-width: 420px;
|
|
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
.cm-placeholder {
|
|
font-size: 12px !important;
|
|
}
|
|
|
|
input {
|
|
min-height: 36px;
|
|
}
|
|
}
|
|
}
|