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
ccb79913
Commit
ccb79913
authored
9 years ago
by
Tom Robinson
Browse files
Options
Downloads
Patches
Plain Diff
Don't update URL when QB tutorial is open
parent
dc46bca9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/card/card.controllers.js
+12
-7
12 additions, 7 deletions
frontend/src/card/card.controllers.js
with
12 additions
and
7 deletions
frontend/src/card/card.controllers.js
+
12
−
7
View file @
ccb79913
...
...
@@ -88,8 +88,7 @@ CardControllers.controller('CardDetail', [
visualization_settings
:
{},
dataset_query
:
{},
},
savedCardSerialized
=
null
,
isShowingTutorial
=
!!
$routeParams
.
tutorial
;
savedCardSerialized
=
null
;
resetDirty
();
...
...
@@ -333,7 +332,7 @@ CardControllers.controller('CardDetail', [
// ensure rendering model is up to date
editorModel
.
isRunning
=
isRunning
;
editorModel
.
isShowingDataReference
=
$scope
.
isShowingDataReference
;
editorModel
.
isShowingTutorial
=
isShowingT
utorial
;
editorModel
.
isShowingTutorial
=
!!
$routeParams
.
t
utorial
;
editorModel
.
databases
=
databases
;
editorModel
.
tableMetadata
=
tableMetadata
;
editorModel
.
tableForeignKeys
=
tableForeignKeys
;
...
...
@@ -374,15 +373,16 @@ CardControllers.controller('CardDetail', [
let
tutorialModel
=
{
onClose
:
()
=>
{
isShowingTutorial
=
false
;
$routeParams
.
tutorial
=
false
;
updateUrl
();
renderAll
();
}
}
function
renderTutorial
()
{
tutorialModel
.
isShowingTutorial
=
isShowingT
utorial
;
tutorialModel
.
isShowingTutorial
=
!!
$routeParams
.
t
utorial
;
React
.
render
(
<
span
>
{
isShowingTutorial
&&
<
QueryBuilderTutorial
{...
tutorialModel
}
/> }</
span
>
<
span
>
{
tutorialModel
.
isShowingTutorial
&&
<
QueryBuilderTutorial
{...
tutorialModel
}
/> }</
span
>
,
document
.
getElementById
(
'
react_qb_tutorial
'
));
}
...
...
@@ -812,6 +812,11 @@ CardControllers.controller('CardDetail', [
// needs to be performed asynchronously otherwise we get weird infinite recursion
var
updateUrl
=
(
replaceState
)
=>
setTimeout
(
function
()
{
// don't update the URL if we're currently showing the tutorial
if
(
!!
$routeParams
.
tutorial
)
{
return
;
}
var
copy
=
cleanCopyCard
(
card
);
var
newState
=
{
card
:
copy
,
...
...
@@ -908,7 +913,7 @@ CardControllers.controller('CardDetail', [
// finish initializing our page and render
await
loadAndSetCard
();
if
(
isShowingT
utorial
)
{
if
(
!!
$routeParams
.
t
utorial
)
{
setSampleDataset
();
}
}
catch
(
error
)
{
...
...
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