Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6ff8146d
Commit
6ff8146d
authored
Sep 25, 2018
by
Jose Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change forceRedraw key format
parent
efedd968
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/assets/javascripts/monitoring/components/dashboard.vue
app/assets/javascripts/monitoring/components/dashboard.vue
+3
-3
spec/javascripts/monitoring/dashboard_spec.js
spec/javascripts/monitoring/dashboard_spec.js
+2
-2
No files found.
app/assets/javascripts/monitoring/components/dashboard.vue
View file @
6ff8146d
...
@@ -98,12 +98,12 @@ export default {
...
@@ -98,12 +98,12 @@ export default {
state
:
'
gettingStarted
'
,
state
:
'
gettingStarted
'
,
showEmptyState
:
true
,
showEmptyState
:
true
,
hoverData
:
{},
hoverData
:
{},
updateDashboardKeyNumber
:
0
,
elWidth
:
0
,
};
};
},
},
computed
:
{
computed
:
{
forceRedraw
()
{
forceRedraw
()
{
return
`dashboard-key-
${
this
.
updateDashboardKeyNumber
}
`
;
return
this
.
elWidth
;
},
},
},
},
created
()
{
created
()
{
...
@@ -165,7 +165,7 @@ export default {
...
@@ -165,7 +165,7 @@ export default {
});
});
},
},
resize
()
{
resize
()
{
this
.
updateDashboardKeyNumber
+=
1
;
this
.
elWidth
=
this
.
$el
.
clientWidth
;
},
},
hoverChanged
(
data
)
{
hoverChanged
(
data
)
{
this
.
hoverData
=
data
;
this
.
hoverData
=
data
;
...
...
spec/javascripts/monitoring/dashboard_spec.js
View file @
6ff8146d
...
@@ -150,7 +150,7 @@ describe('Dashboard', () => {
...
@@ -150,7 +150,7 @@ describe('Dashboard', () => {
propsData
:
{
...
propsData
,
hasMetrics
:
true
,
showPanels
:
false
},
propsData
:
{
...
propsData
,
hasMetrics
:
true
,
showPanels
:
false
},
});
});
expect
(
component
.
forceRedraw
).
toEqual
(
'
dashboard-key-0
'
);
expect
(
component
.
forceRedraw
).
toEqual
(
0
);
const
navSidebarEl
=
document
.
querySelector
(
'
.nav-sidebar
'
);
const
navSidebarEl
=
document
.
querySelector
(
'
.nav-sidebar
'
);
navSidebarEl
.
classList
.
add
(
'
nav-sidebar-collapsed
'
);
navSidebarEl
.
classList
.
add
(
'
nav-sidebar-collapsed
'
);
...
@@ -161,7 +161,7 @@ describe('Dashboard', () => {
...
@@ -161,7 +161,7 @@ describe('Dashboard', () => {
return
Vue
.
nextTick
();
return
Vue
.
nextTick
();
})
})
.
then
(()
=>
{
.
then
(()
=>
{
expect
(
component
.
forceRedraw
).
toEqual
(
'
dashboard-key-1
'
);
expect
(
component
.
forceRedraw
).
toEqual
(
component
.
elWidth
);
done
();
done
();
})
})
.
catch
(
done
.
fail
);
.
catch
(
done
.
fail
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment