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
e4dd43d2
Commit
e4dd43d2
authored
7 years ago
by
Atte Keinänen
Browse files
Options
Downloads
Patches
Plain Diff
Fix lineage issue
parent
82b65983
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/metabase/query_builder/actions.js
+9
-2
9 additions, 2 deletions
frontend/src/metabase/query_builder/actions.js
frontend/src/metabase/query_builder/components/AlertModals.jsx
+4
-3
4 additions, 3 deletions
...end/src/metabase/query_builder/components/AlertModals.jsx
with
13 additions
and
5 deletions
frontend/src/metabase/query_builder/actions.js
+
9
−
2
View file @
e4dd43d2
...
...
@@ -1051,14 +1051,21 @@ export const persistDefaultVisualizationSettings = () => {
const
series
=
getTransformedSeries
(
getState
())
const
updatedQuestion
=
getQuestionWithDefaultVisualizationSettings
(
question
,
series
)
dispatch
(
updateQuestion
(
updatedQuestion
))
if
(
updatedQuestion
!==
question
)
dispatch
(
updateQuestion
(
updatedQuestion
))
}
}
const
getQuestionWithDefaultVisualizationSettings
=
(
question
,
series
)
=>
{
const
oldVizSettings
=
question
.
visualizationSettings
()
const
newVizSettings
=
{
...
getPersistableDefaultSettings
(
series
),
...
oldVizSettings
}
return
question
.
setVisualizationSettings
(
newVizSettings
)
// Don't update the question unnecessarily
// (even if fields values haven't changed, updating the settings will make the question appear dirty)
if
(
!
_
.
isEqual
(
oldVizSettings
,
newVizSettings
))
{
return
question
.
setVisualizationSettings
(
newVizSettings
)
}
else
{
return
question
}
}
export
const
QUERY_ERRORED
=
"
metabase/qb/QUERY_ERRORED
"
;
...
...
This diff is collapsed.
Click to expand it.
frontend/src/metabase/query_builder/components/AlertModals.jsx
+
4
−
3
View file @
e4dd43d2
...
...
@@ -501,9 +501,10 @@ export class AlertEditChannels extends Component {
class RawDataAlertTip extends Component {
render() {
const display = this.props.question.display()
const vizSettings = this.props.visualizationSettings
const isLineAreaBar = display === "line" || display === "area" || display === "bar"
const isMultiSeries =
this.props.visualizationSettings["graph.metrics"].length > 1
const showMultiSeriesWarning = isLineAreaBar && isMultiSeries
const isMultiSeries =
isLineAreaBar && vizSettings["graph.metrics"] && vizSettings["graph.metrics"].length > 1
return (
<div className="border-row-divider p3 flex align-center">
...
...
@@ -511,7 +512,7 @@ class RawDataAlertTip extends Component {
<Icon name="lightbulb" size="20" />
</div>
<div>
{ s
how
MultiSeries
Warning
{
i
sMultiSeries
? jt`${<strong>Heads up:</strong>} Goal-based alerts aren
'
t
yet
supported
for
charts
with
more
than
one
line
,
so
this
alert
will
be
sent
whenever
the
chart
has
$
{
<
em
>
results
<
/em>}.
`
:
jt
`
${
<
strong
>
Tip
:
<
/strong>} This kind of alert is most useful when your saved question doesn’t ${<em>usually</
em
>
}
return any results, but you want to know when it does.`
}
...
...
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