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
0ccbbf16
Commit
0ccbbf16
authored
Oct 25, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
8f8838a1
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
97 additions
and
71 deletions
+97
-71
app/assets/javascripts/monitoring/components/charts/time_series.vue
.../javascripts/monitoring/components/charts/time_series.vue
+6
-17
app/assets/javascripts/monitoring/components/dashboard.vue
app/assets/javascripts/monitoring/components/dashboard.vue
+0
-23
app/assets/javascripts/monitoring/components/graph_group.vue
app/assets/javascripts/monitoring/components/graph_group.vue
+1
-1
app/assets/javascripts/monitoring/components/panel_type.vue
app/assets/javascripts/monitoring/components/panel_type.vue
+0
-5
changelogs/unreleased/33268-updated-operations-metrics-charts-do-not-load-properly.yml
...pdated-operations-metrics-charts-do-not-load-properly.yml
+5
-0
changelogs/unreleased/jlenny-master-patch-21737.yml
changelogs/unreleased/jlenny-master-patch-21737.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-3
spec/javascripts/monitoring/components/dashboard_spec.js
spec/javascripts/monitoring/components/dashboard_spec.js
+47
-22
spec/presenters/ci/bridge_presenter_spec.rb
spec/presenters/ci/bridge_presenter_spec.rb
+2
-0
spec/presenters/ci/build_presenter_spec.rb
spec/presenters/ci/build_presenter_spec.rb
+2
-0
spec/presenters/ci/build_runner_presenter_spec.rb
spec/presenters/ci/build_runner_presenter_spec.rb
+2
-0
spec/presenters/ci/group_variable_presenter_spec.rb
spec/presenters/ci/group_variable_presenter_spec.rb
+2
-0
spec/presenters/ci/pipeline_presenter_spec.rb
spec/presenters/ci/pipeline_presenter_spec.rb
+2
-0
spec/presenters/ci/trigger_presenter_spec.rb
spec/presenters/ci/trigger_presenter_spec.rb
+2
-0
spec/presenters/ci/variable_presenter_spec.rb
spec/presenters/ci/variable_presenter_spec.rb
+2
-0
spec/presenters/clusters/cluster_presenter_spec.rb
spec/presenters/clusters/cluster_presenter_spec.rb
+2
-0
spec/presenters/commit_status_presenter_spec.rb
spec/presenters/commit_status_presenter_spec.rb
+2
-0
spec/presenters/conversational_development_index/metric_presenter_spec.rb
...conversational_development_index/metric_presenter_spec.rb
+2
-0
spec/presenters/group_member_presenter_spec.rb
spec/presenters/group_member_presenter_spec.rb
+2
-0
spec/presenters/merge_request_presenter_spec.rb
spec/presenters/merge_request_presenter_spec.rb
+2
-0
spec/presenters/project_member_presenter_spec.rb
spec/presenters/project_member_presenter_spec.rb
+2
-0
spec/presenters/project_presenter_spec.rb
spec/presenters/project_presenter_spec.rb
+2
-0
spec/presenters/projects/settings/deploy_keys_presenter_spec.rb
...resenters/projects/settings/deploy_keys_presenter_spec.rb
+2
-0
No files found.
app/assets/javascripts/monitoring/components/charts/time_series.vue
View file @
0ccbbf16
<
script
>
import
{
s__
,
__
}
from
'
~/locale
'
;
import
{
GlLink
,
GlButton
,
GlTooltip
}
from
'
@gitlab/ui
'
;
import
{
GlLink
,
GlButton
,
GlTooltip
,
GlResizeObserverDirective
}
from
'
@gitlab/ui
'
;
import
{
GlAreaChart
,
GlLineChart
,
GlChartSeriesLabel
}
from
'
@gitlab/ui/dist/charts
'
;
import
dateFormat
from
'
dateformat
'
;
import
{
debounceByAnimationFrame
,
roundOffFloat
}
from
'
~/lib/utils/common_utils
'
;
import
{
roundOffFloat
}
from
'
~/lib/utils/common_utils
'
;
import
{
getSvgIconPathContent
}
from
'
~/lib/utils/icon_utils
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
{
chartHeight
,
graphTypes
,
lineTypes
,
symbolSizes
,
dateFormats
}
from
'
../../constants
'
;
import
{
makeDataSeries
}
from
'
~/helpers/monitor_helper
'
;
import
{
graphDataValidatorForValues
}
from
'
../../utils
'
;
let
debouncedResize
;
export
default
{
components
:
{
GlAreaChart
,
...
...
@@ -22,6 +20,9 @@ export default {
GlLink
,
Icon
,
},
directives
:
{
GlResizeObserverDirective
,
},
inheritAttrs
:
false
,
props
:
{
graphData
:
{
...
...
@@ -29,10 +30,6 @@ export default {
required
:
true
,
validator
:
graphDataValidatorForValues
.
bind
(
null
,
false
),
},
containerWidth
:
{
type
:
Number
,
required
:
true
,
},
deploymentData
:
{
type
:
Array
,
required
:
false
,
...
...
@@ -206,21 +203,13 @@ export default {
return
`
${
this
.
graphData
.
y_label
}
`
;
},
},
watch
:
{
containerWidth
:
'
onResize
'
,
},
mounted
()
{
const
graphTitleEl
=
this
.
$refs
.
graphTitle
;
if
(
graphTitleEl
&&
graphTitleEl
.
scrollWidth
>
graphTitleEl
.
offsetWidth
)
{
this
.
showTitleTooltip
=
true
;
}
},
beforeDestroy
()
{
window
.
removeEventListener
(
'
resize
'
,
debouncedResize
);
},
created
()
{
debouncedResize
=
debounceByAnimationFrame
(
this
.
onResize
);
window
.
addEventListener
(
'
resize
'
,
debouncedResize
);
this
.
setSvg
(
'
rocket
'
);
this
.
setSvg
(
'
scroll-handle
'
);
},
...
...
@@ -276,7 +265,7 @@ export default {
</
script
>
<
template
>
<div
class=
"prometheus-graph"
>
<div
v-gl-resize-observer-directive=
"onResize"
class=
"prometheus-graph"
>
<div
class=
"prometheus-graph-header"
>
<h5
ref=
"graphTitle"
...
...
app/assets/javascripts/monitoring/components/dashboard.vue
View file @
0ccbbf16
...
...
@@ -22,12 +22,9 @@ import MonitorTimeSeriesChart from './charts/time_series.vue';
import
MonitorSingleStatChart
from
'
./charts/single_stat.vue
'
;
import
GraphGroup
from
'
./graph_group.vue
'
;
import
EmptyState
from
'
./empty_state.vue
'
;
import
{
sidebarAnimationDuration
}
from
'
../constants
'
;
import
TrackEventDirective
from
'
~/vue_shared/directives/track_event
'
;
import
{
getTimeDiff
,
isValidDate
,
downloadCSVOptions
,
generateLinkToChartOptions
}
from
'
../utils
'
;
let
sidebarMutationObserver
;
export
default
{
components
:
{
VueDraggable
,
...
...
@@ -167,7 +164,6 @@ export default {
data
()
{
return
{
state
:
'
gettingStarted
'
,
elWidth
:
0
,
formIsValid
:
null
,
selectedTimeWindow
:
{},
isRearrangingPanels
:
false
,
...
...
@@ -214,11 +210,6 @@ export default {
projectPath
:
this
.
projectPath
,
});
},
beforeDestroy
()
{
if
(
sidebarMutationObserver
)
{
sidebarMutationObserver
.
disconnect
();
}
},
mounted
()
{
if
(
!
this
.
hasMetrics
)
{
this
.
setGettingStartedEmptyState
();
...
...
@@ -239,13 +230,6 @@ export default {
}
else
{
this
.
fetchData
(
range
);
}
sidebarMutationObserver
=
new
MutationObserver
(
this
.
onSidebarMutation
);
sidebarMutationObserver
.
observe
(
document
.
querySelector
(
'
.layout-page
'
),
{
attributes
:
true
,
childList
:
false
,
subtree
:
false
,
});
}
},
methods
:
{
...
...
@@ -306,11 +290,6 @@ export default {
hideAddMetricModal
()
{
this
.
$refs
.
addMetricModal
.
hide
();
},
onSidebarMutation
()
{
setTimeout
(()
=>
{
this
.
elWidth
=
this
.
$el
.
clientWidth
;
},
sidebarAnimationDuration
);
},
toggleRearrangingPanels
()
{
this
.
isRearrangingPanels
=
!
this
.
isRearrangingPanels
;
},
...
...
@@ -503,7 +482,6 @@ export default {
generateLink(groupData.group, graphData.title, graphData.y_label)
"
:graph-data=
"graphData"
:dashboard-width=
"elWidth"
:alerts-endpoint=
"alertsEndpoint"
:prometheus-alerts-available=
"prometheusAlertsAvailable"
:index=
"`$
{index}-${graphIndex}`"
...
...
@@ -520,7 +498,6 @@ export default {
:graph-data=
"graphData"
:deployment-data=
"deploymentData"
:thresholds=
"getGraphAlertValues(graphData.queries)"
:container-width=
"elWidth"
:project-path=
"projectPath"
group-id=
"monitor-time-series-chart"
>
...
...
app/assets/javascripts/monitoring/components/graph_group.vue
View file @
0ccbbf16
...
...
@@ -45,7 +45,7 @@ export default {
<div
v-if=
"showPanels"
class=
"card prometheus-panel"
>
<div
class=
"card-header d-flex align-items-center"
>
<h4
class=
"flex-grow-1"
>
{{
name
}}
</h4>
<a
role=
"button"
@
click=
"collapse"
>
<a
role=
"button"
class=
"js-graph-group-toggle"
@
click=
"collapse"
>
<icon
:size=
"16"
:aria-label=
"__('Toggle collapse')"
:name=
"caretIcon"
/>
</a>
</div>
...
...
app/assets/javascripts/monitoring/components/panel_type.vue
View file @
0ccbbf16
...
...
@@ -40,10 +40,6 @@ export default {
type
:
Object
,
required
:
true
,
},
dashboardWidth
:
{
type
:
Number
,
required
:
true
,
},
index
:
{
type
:
String
,
required
:
false
,
...
...
@@ -103,7 +99,6 @@ export default {
:deployment-data=
"deploymentData"
:project-path=
"projectPath"
:thresholds=
"getGraphAlertValues(graphData.queries)"
:container-width=
"dashboardWidth"
group-id=
"monitor-area-chart"
>
<div
class=
"d-flex align-items-center"
>
...
...
changelogs/unreleased/33268-updated-operations-metrics-charts-do-not-load-properly.yml
0 → 100644
View file @
0ccbbf16
---
title
:
Fix empty chart in collapsed sections
merge_request
:
18699
author
:
type
:
fixed
changelogs/unreleased/jlenny-master-patch-21737.yml
0 → 100644
View file @
0ccbbf16
---
title
:
Improve clarity of text for merge train position
merge_request
:
19031
author
:
type
:
changed
locale/gitlab.pot
View file @
0ccbbf16
...
...
@@ -20040,9 +20040,6 @@ msgstr ""
msgid "mrWidget|%{metricsLinkStart} Memory %{metricsLinkEnd} usage is %{emphasisStart} unchanged %{emphasisEnd} at %{memoryFrom}MB"
msgstr ""
msgid "mrWidget|Added to the merge train at position %{mergeTrainPosition}"
msgstr ""
msgid "mrWidget|Added to the merge train by"
msgstr ""
...
...
@@ -20124,6 +20121,9 @@ msgstr ""
msgid "mrWidget|If the %{missingBranchName} branch exists in your local repository, you can merge this merge request manually using the command line"
msgstr ""
msgid "mrWidget|In the merge train at position %{mergeTrainPosition}"
msgstr ""
msgid "mrWidget|Loading deployment statistics"
msgstr ""
...
...
spec/javascripts/monitoring/components/dashboard_spec.js
View file @
0ccbbf16
...
...
@@ -539,42 +539,67 @@ describe('Dashboard', () => {
});
});
describe
(
'
when the window resizes
'
,
()
=>
{
describe
(
'
responds to window resizes
'
,
()
=>
{
let
promPanel
;
let
promGroup
;
let
panelToggle
;
let
chart
;
beforeEach
(()
=>
{
mock
.
onGet
(
mockApiEndpoint
).
reply
(
200
,
metricsGroupsAPIResponse
);
jasmine
.
clock
().
install
();
});
afterEach
(()
=>
{
jasmine
.
clock
().
uninstall
();
});
it
(
'
sets elWidth to page width when the sidebar is resized
'
,
done
=>
{
component
=
new
DashboardComponent
({
el
:
document
.
querySelector
(
'
.prometheus-graphs
'
),
propsData
:
{
...
propsData
,
hasMetrics
:
true
,
showPanels
:
fals
e
,
showPanels
:
tru
e
,
},
store
,
});
expect
(
component
.
elWidth
).
toEqual
(
0
);
component
.
$store
.
dispatch
(
'
monitoringDashboard/setFeatureFlags
'
,
{
prometheusEndpoint
:
false
,
});
const
pageLayoutEl
=
document
.
querySelector
(
'
.layout-page
'
);
pageLayoutEl
.
classList
.
add
(
'
page-with-icon-sidebar
'
);
component
.
$store
.
commit
(
`monitoringDashboard/
${
types
.
RECEIVE_ENVIRONMENTS_DATA_SUCCESS
}
`
,
environmentData
,
);
Vue
.
nextTick
()
.
then
(()
=>
{
jasmine
.
clock
().
tick
(
1000
);
return
Vue
.
nextTick
();
})
.
then
(()
=>
{
expect
(
component
.
elWidth
).
toEqual
(
pageLayoutEl
.
clientWidth
);
done
();
})
.
catch
(
done
.
fail
);
component
.
$store
.
commit
(
`monitoringDashboard/
${
types
.
RECEIVE_METRICS_DATA_SUCCESS
}
`
,
singleGroupResponse
,
);
component
.
$store
.
commit
(
`monitoringDashboard/
${
types
.
SET_ALL_DASHBOARDS
}
`
,
dashboardGitResponse
,
);
return
Vue
.
nextTick
().
then
(()
=>
{
promPanel
=
component
.
$el
.
querySelector
(
'
.prometheus-panel
'
);
promGroup
=
promPanel
.
querySelector
(
'
.prometheus-graph-group
'
);
panelToggle
=
promPanel
.
querySelector
(
'
.js-graph-group-toggle
'
);
chart
=
promGroup
.
querySelector
(
'
.position-relative svg
'
);
});
});
it
(
'
setting chart size to zero when panel group is hidden
'
,
()
=>
{
expect
(
promGroup
.
style
.
display
).
toBe
(
''
);
expect
(
chart
.
clientWidth
).
toBeGreaterThan
(
0
);
panelToggle
.
click
();
return
Vue
.
nextTick
().
then
(()
=>
{
expect
(
promGroup
.
style
.
display
).
toBe
(
'
none
'
);
expect
(
chart
.
clientWidth
).
toBe
(
0
);
promPanel
.
style
.
width
=
'
500px
'
;
});
});
it
(
'
expanding chart panel group after resize displays chart
'
,
()
=>
{
panelToggle
.
click
();
expect
(
chart
.
clientWidth
).
toBeGreaterThan
(
0
);
});
});
...
...
spec/presenters/ci/bridge_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
Ci
::
BridgePresenter
do
...
...
spec/presenters/ci/build_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
Ci
::
BuildPresenter
do
...
...
spec/presenters/ci/build_runner_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
Ci
::
BuildRunnerPresenter
do
...
...
spec/presenters/ci/group_variable_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
Ci
::
GroupVariablePresenter
do
...
...
spec/presenters/ci/pipeline_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
Ci
::
PipelinePresenter
do
...
...
spec/presenters/ci/trigger_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
Ci
::
TriggerPresenter
do
...
...
spec/presenters/ci/variable_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
Ci
::
VariablePresenter
do
...
...
spec/presenters/clusters/cluster_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
Clusters
::
ClusterPresenter
do
...
...
spec/presenters/commit_status_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
CommitStatusPresenter
do
...
...
spec/presenters/conversational_development_index/metric_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
ConversationalDevelopmentIndex
::
MetricPresenter
do
...
...
spec/presenters/group_member_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
GroupMemberPresenter
do
...
...
spec/presenters/merge_request_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
MergeRequestPresenter
do
...
...
spec/presenters/project_member_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
ProjectMemberPresenter
do
...
...
spec/presenters/project_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
ProjectPresenter
do
...
...
spec/presenters/projects/settings/deploy_keys_presenter_spec.rb
View file @
0ccbbf16
# frozen_string_literal: true
require
'spec_helper'
describe
Projects
::
Settings
::
DeployKeysPresenter
do
...
...
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