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
b03199ce
Commit
b03199ce
authored
Aug 21, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
00f3d64a
a1c1ca12
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
711 additions
and
10 deletions
+711
-10
app/assets/javascripts/monitoring/components/charts/area.vue
app/assets/javascripts/monitoring/components/charts/area.vue
+3
-0
app/assets/javascripts/monitoring/components/charts/time_series.vue
.../javascripts/monitoring/components/charts/time_series.vue
+334
-0
app/assets/javascripts/monitoring/components/dashboard.vue
app/assets/javascripts/monitoring/components/dashboard.vue
+5
-5
app/assets/javascripts/monitoring/constants.js
app/assets/javascripts/monitoring/constants.js
+9
-0
changelogs/unreleased/65412-add-support-for-line-charts.yml
changelogs/unreleased/65412-add-support-for-line-charts.yml
+5
-0
config/prometheus/common_metrics.yml
config/prometheus/common_metrics.yml
+4
-4
db/migrate/20190814205640_import_common_metrics_line_charts.rb
...grate/20190814205640_import_common_metrics_line_charts.rb
+13
-0
spec/javascripts/monitoring/charts/time_series_spec.js
spec/javascripts/monitoring/charts/time_series_spec.js
+335
-0
spec/javascripts/monitoring/mock_data.js
spec/javascripts/monitoring/mock_data.js
+3
-1
No files found.
app/assets/javascripts/monitoring/components/charts/area.vue
View file @
b03199ce
...
...
@@ -12,6 +12,9 @@ import { graphDataValidatorForValues } from '../../utils';
let
debouncedResize
;
// TODO: Remove this component in favor of the more general time_series.vue
// Please port all changes here to time_series.vue as well.
export
default
{
components
:
{
GlAreaChart
,
...
...
app/assets/javascripts/monitoring/components/charts/time_series.vue
0 → 100644
View file @
b03199ce
This diff is collapsed.
Click to expand it.
app/assets/javascripts/monitoring/components/dashboard.vue
View file @
b03199ce
...
...
@@ -15,7 +15,7 @@ import Icon from '~/vue_shared/components/icon.vue';
import
{
getParameterValues
,
mergeUrlParams
}
from
'
~/lib/utils/url_utility
'
;
import
invalidUrl
from
'
~/lib/utils/invalid_url
'
;
import
PanelType
from
'
ee_else_ce/monitoring/components/panel_type.vue
'
;
import
Monitor
AreaChart
from
'
./charts/area
.vue
'
;
import
Monitor
TimeSeriesChart
from
'
./charts/time_series
.vue
'
;
import
MonitorSingleStatChart
from
'
./charts/single_stat.vue
'
;
import
GraphGroup
from
'
./graph_group.vue
'
;
import
EmptyState
from
'
./empty_state.vue
'
;
...
...
@@ -26,7 +26,7 @@ let sidebarMutationObserver;
export
default
{
components
:
{
Monitor
Area
Chart
,
Monitor
TimeSeries
Chart
,
MonitorSingleStatChart
,
PanelType
,
GraphGroup
,
...
...
@@ -465,7 +465,7 @@ export default {
/>
</
template
>
<
template
v-else
>
<monitor-
area
-chart
<monitor-
time-series
-chart
v-for=
"(graphData, graphIndex) in chartsWithData(groupData.metrics)"
:key=
"graphIndex"
:graph-data=
"graphData"
...
...
@@ -473,7 +473,7 @@ export default {
:thresholds=
"getGraphAlertValues(graphData.queries)"
:container-width=
"elWidth"
:project-path=
"projectPath"
group-id=
"monitor-
area
-chart"
group-id=
"monitor-
time-series
-chart"
>
<div
class=
"d-flex align-items-center"
>
<alert-widget
...
...
@@ -515,7 +515,7 @@ export default {
</gl-dropdown-item>
</gl-dropdown>
</div>
</monitor-
area
-chart>
</monitor-
time-series
-chart>
</template>
</graph-group>
</div>
...
...
app/assets/javascripts/monitoring/constants.js
View file @
b03199ce
...
...
@@ -8,6 +8,10 @@ export const graphTypes = {
deploymentData
:
'
scatter
'
,
};
export
const
symbolSizes
=
{
default
:
14
,
};
export
const
lineTypes
=
{
default
:
'
solid
'
,
};
...
...
@@ -21,6 +25,11 @@ export const timeWindows = {
oneWeek
:
__
(
'
1 week
'
),
};
export
const
dateFormats
=
{
timeOfDay
:
'
h:MM TT
'
,
default
:
'
dd mmm yyyy, h:MMTT
'
,
};
export
const
secondsIn
=
{
thirtyMinutes
:
60
*
30
,
threeHours
:
60
*
60
*
3
,
...
...
changelogs/unreleased/65412-add-support-for-line-charts.yml
0 → 100644
View file @
b03199ce
---
title
:
Create component to display area and line charts in monitor dashboards
merge_request
:
31639
author
:
type
:
added
config/prometheus/common_metrics.yml
View file @
b03199ce
...
...
@@ -166,7 +166,7 @@ panel_groups:
label
:
Total (cores)
unit
:
"
cores"
-
title
:
"
Memory
Usage
(Pod
average)"
type
:
"
area
-chart"
type
:
"
line
-chart"
y_label
:
"
Memory
Used
per
Pod
(MB)"
weight
:
2
metrics
:
...
...
@@ -175,7 +175,7 @@ panel_groups:
label
:
Pod average (MB)
unit
:
MB
-
title
:
"
Canary:
Memory
Usage
(Pod
Average)"
type
:
"
area
-chart"
type
:
"
line
-chart"
y_label
:
"
Memory
Used
per
Pod
(MB)"
weight
:
2
metrics
:
...
...
@@ -185,7 +185,7 @@ panel_groups:
unit
:
MB
track
:
canary
-
title
:
"
Core
Usage
(Pod
Average)"
type
:
"
area
-chart"
type
:
"
line
-chart"
y_label
:
"
Cores
per
Pod"
weight
:
1
metrics
:
...
...
@@ -194,7 +194,7 @@ panel_groups:
label
:
Pod average (cores)
unit
:
"
cores"
-
title
:
"
Canary:
Core
Usage
(Pod
Average)"
type
:
"
area
-chart"
type
:
"
line
-chart"
y_label
:
"
Cores
per
Pod"
weight
:
1
metrics
:
...
...
db/migrate/20190814205640_import_common_metrics_line_charts.rb
0 → 100644
View file @
b03199ce
# frozen_string_literal: true
class
ImportCommonMetricsLineCharts
<
ActiveRecord
::
Migration
[
5.2
]
DOWNTIME
=
false
def
up
::
Gitlab
::
DatabaseImporters
::
CommonMetrics
::
Importer
.
new
.
execute
end
def
down
# no-op
end
end
spec/javascripts/monitoring/charts/time_series_spec.js
0 → 100644
View file @
b03199ce
This diff is collapsed.
Click to expand it.
spec/javascripts/monitoring/mock_data.js
View file @
b03199ce
export
const
mockApiEndpoint
=
`
${
gl
.
TEST_HOST
}
/monitoring/mock`
;
export
const
mockProjectPath
=
'
/frontend-fixtures/environments-project
'
;
export
const
metricsGroupsAPIResponse
=
{
success
:
true
,
data
:
[
...
...
@@ -902,7 +904,7 @@ export const metricsDashboardResponse = {
},
{
title
:
'
Memory Usage (Pod average)
'
,
type
:
'
area
-chart
'
,
type
:
'
line
-chart
'
,
y_label
:
'
Memory Used per Pod
'
,
weight
:
2
,
metrics
:
[
...
...
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