Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
477f1a1d
Unverified
Commit
477f1a1d
authored
8 years ago
by
Tom Robinson
Browse files
Options
Downloads
Patches
Plain Diff
Updated qb bar styling
parent
9fa944ef
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/metabase/css/query_builder.css
+4
-1
4 additions, 1 deletion
frontend/src/metabase/css/query_builder.css
frontend/src/metabase/query_builder/components/GuiQueryEditor.jsx
+20
-8
20 additions, 8 deletions
.../src/metabase/query_builder/components/GuiQueryEditor.jsx
with
24 additions
and
9 deletions
frontend/src/metabase/css/query_builder.css
+
4
−
1
View file @
477f1a1d
...
...
@@ -357,6 +357,9 @@
.GuiBuilder-filtered-by
{
border-right
:
1px
solid
transparent
;
}
.GuiBuilder-view
{
border-right
:
1px
solid
#e0e0e0
;
}
.GuiBuilder-sort-limit
{
border-left
:
1px
solid
#e0e0e0
;
}
...
...
@@ -377,7 +380,7 @@
.GuiBuilder-section
{
position
:
relative
;
min-height
:
55px
;
min-width
:
1
2
0px
;
min-width
:
1
0
0px
;
}
.GuiBuilder-section-label
{
...
...
This diff is collapsed.
Click to expand it.
frontend/src/metabase/query_builder/components/GuiQueryEditor.jsx
+
20
−
8
View file @
477f1a1d
...
...
@@ -229,7 +229,7 @@ export default class GuiQueryEditor extends Component {
customFields
=
{
Query
.
getExpressions
(
this
.
props
.
query
.
query
)
}
updateAggregation
=
{
(
aggregation
)
=>
this
.
updateAggregation
(
index
,
aggregation
)
}
removeAggregation
=
{
canRemoveAggregation
?
this
.
removeAggregation
.
bind
(
null
,
index
)
:
null
}
addButton
=
{
this
.
renderAdd
(
index
===
0
?
"
Add a grouping
"
:
null
)
}
addButton
=
{
this
.
renderAdd
(
null
)
}
/>
);
if
(
aggregations
[
index
+
1
]
!=
null
&&
aggregations
[
index
+
1
].
length
>
0
)
{
...
...
@@ -275,10 +275,8 @@ export default class GuiQueryEditor extends Component {
for
(
let
i
=
0
;
i
<
breakouts
.
length
;
i
++
)
{
const
breakout
=
breakouts
[
i
];
if
(
i
===
0
&&
breakout
!=
null
)
{
breakoutList
.
push
(
<
span
key
=
{
"
by
"
+
i
}
className
=
"text-bold"
>
by
</
span
>
);
if
(
breakout
==
null
)
{
breakoutList
.
push
(<
span
className
=
"ml1"
/>);
}
breakoutList
.
push
(
...
...
@@ -303,7 +301,7 @@ export default class GuiQueryEditor extends Component {
}
return
(
<
div
className
=
{
cx
(
"
Query-section Query-section-breakout
ml1
"
,
{
disabled
:
!
enabled
})
}
>
<
div
className
=
{
cx
(
"
Query-section Query-section-breakout
"
,
{
disabled
:
!
enabled
})
}
>
{
breakoutList
}
</
div
>
);
...
...
@@ -353,9 +351,22 @@ export default class GuiQueryEditor extends Component {
}
return
(
<
div
className
=
"GuiBuilder-section GuiBuilder-view flex align-center px1"
ref
=
"viewSection"
>
<
div
className
=
"GuiBuilder-section GuiBuilder-view flex align-center px1
pr2
"
ref
=
"viewSection"
>
<
span
className
=
"GuiBuilder-section-label Query-label"
>
View
</
span
>
{
this
.
renderAggregation
()
}
</
div
>
);
}
renderGroupedBySection
()
{
const
{
features
}
=
this
.
props
;
if
(
!
features
.
aggregation
&&
!
features
.
breakout
)
{
return
;
}
return
(
<
div
className
=
"GuiBuilder-section GuiBuilder-groupedBy flex align-center px1"
ref
=
"viewSection"
>
<
span
className
=
"GuiBuilder-section-label Query-label"
>
Grouped By
</
span
>
{
this
.
renderBreakouts
()
}
</
div
>
);
...
...
@@ -363,7 +374,7 @@ export default class GuiQueryEditor extends Component {
componentDidUpdate
()
{
// HACK: magic number "5" accounts for the borders between the sections?
let
contentWidth
=
[
"
data
"
,
"
filter
"
,
"
view
"
,
"
sortLimit
"
].
reduce
((
acc
,
ref
)
=>
{
let
contentWidth
=
[
"
data
"
,
"
filter
"
,
"
view
"
,
"
groupedBy
"
,
"
sortLimit
"
].
reduce
((
acc
,
ref
)
=>
{
let
node
=
ReactDOM
.
findDOMNode
(
this
.
refs
[
`
${
ref
}
Section`
]);
return
acc
+
(
node
?
node
.
offsetWidth
:
0
);
},
0
)
+
5
;
...
...
@@ -384,6 +395,7 @@ export default class GuiQueryEditor extends Component {
</
div
>
<
div
className
=
"GuiBuilder-row flex flex-full"
>
{
this
.
renderViewSection
()
}
{
this
.
renderGroupedBySection
()
}
<
div
className
=
"flex-full"
></
div
>
{
this
.
props
.
children
}
<
ExtendedOptions
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment