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
06e716b6
Commit
06e716b6
authored
Nov 13, 2020
by
Jose Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update font-awesome icons in prometheus config
parent
a5b9c068
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
+19
-9
app/assets/javascripts/prometheus_metrics/prometheus_metrics.js
...sets/javascripts/prometheus_metrics/prometheus_metrics.js
+10
-7
app/views/projects/services/prometheus/_metrics.html.haml
app/views/projects/services/prometheus/_metrics.html.haml
+2
-1
changelogs/unreleased/jivanvl-update-prometheus-metrics-icons.yml
...gs/unreleased/jivanvl-update-prometheus-metrics-icons.yml
+5
-0
spec/frontend/prometheus_metrics/prometheus_metrics_spec.js
spec/frontend/prometheus_metrics/prometheus_metrics_spec.js
+2
-1
No files found.
app/assets/javascripts/prometheus_metrics/prometheus_metrics.js
View file @
06e716b6
...
...
@@ -18,29 +18,32 @@ export default class PrometheusMetrics {
this
.
$monitoredMetricsList
=
this
.
$monitoredMetricsPanel
.
find
(
'
.js-metrics-list
'
);
this
.
$missingEnvVarPanel
=
this
.
$wrapper
.
find
(
'
.js-panel-missing-env-vars
'
);
this
.
$panelToggle
=
this
.
$missingEnvVarPanel
.
find
(
'
.js-panel-toggle
'
);
this
.
$panelToggleRight
=
this
.
$missingEnvVarPanel
.
find
(
'
.js-panel-toggle-right
'
);
this
.
$panelToggleDown
=
this
.
$missingEnvVarPanel
.
find
(
'
.js-panel-toggle-down
'
);
this
.
$missingEnvVarMetricCount
=
this
.
$missingEnvVarPanel
.
find
(
'
.js-env-var-count
'
);
this
.
$missingEnvVarMetricsList
=
this
.
$missingEnvVarPanel
.
find
(
'
.js-missing-var-metrics-list
'
);
this
.
activeMetricsEndpoint
=
this
.
$monitoredMetricsPanel
.
data
(
'
activeMetrics
'
);
this
.
helpMetricsPath
=
this
.
$monitoredMetricsPanel
.
data
(
'
metrics-help-path
'
);
this
.
$panelToggle
.
on
(
'
click
'
,
e
=>
this
.
handlePanelToggle
(
e
));
this
.
$panelToggleRight
.
on
(
'
click
'
,
e
=>
this
.
handlePanelToggle
(
e
));
this
.
$panelToggleDown
.
on
(
'
click
'
,
e
=>
this
.
handlePanelToggle
(
e
));
}
init
()
{
this
.
loadActiveMetrics
();
}
/* eslint-disable class-methods-use-this */
handlePanelToggle
(
e
)
{
const
$toggleBtn
=
$
(
e
.
currentTarget
);
const
$currentPanelBody
=
$toggleBtn
.
closest
(
'
.card
'
).
find
(
'
.card-body
'
);
$currentPanelBody
.
toggleClass
(
'
hidden
'
);
if
(
$toggleBtn
.
hasClass
(
'
fa-caret-down
'
))
{
$toggleBtn
.
removeClass
(
'
fa-caret-down
'
).
addClass
(
'
fa-caret-right
'
);
}
else
{
$toggleBtn
.
removeClass
(
'
fa-caret-right
'
).
addClass
(
'
fa-caret-down
'
);
if
(
$toggleBtn
.
hasClass
(
'
js-panel-toggle-right
'
))
{
$toggleBtn
.
addClass
(
'
hidden
'
);
this
.
$panelToggleDown
.
removeClass
(
'
hidden
'
);
}
else
if
(
$toggleBtn
.
hasClass
(
'
js-panel-toggle-down
'
))
{
$toggleBtn
.
addClass
(
'
hidden
'
);
this
.
$panelToggleRight
.
removeClass
(
'
hidden
'
);
}
}
...
...
app/views/projects/services/prometheus/_metrics.html.haml
View file @
06e716b6
...
...
@@ -25,7 +25,8 @@
.card.hidden.js-panel-missing-env-vars
.card-header
=
icon
(
'caret-right lg fw'
,
class:
'panel-toggle js-panel-toggle'
,
'aria-label'
=>
'Toggle panel'
)
=
sprite_icon
(
'chevron-lg-right'
,
css_class:
'panel-toggle js-panel-toggle-right'
)
=
sprite_icon
(
'chevron-lg-down'
,
css_class:
'panel-toggle js-panel-toggle-down hidden'
)
=
s_
(
'PrometheusService|Missing environment variable'
)
%span
.badge.badge-pill.js-env-var-count
0
.card-body.hidden
...
...
changelogs/unreleased/jivanvl-update-prometheus-metrics-icons.yml
0 → 100644
View file @
06e716b6
---
title
:
Replace font-awesome icons in prometheus config
merge_request
:
47713
author
:
type
:
changed
spec/frontend/prometheus_metrics/prometheus_metrics_spec.js
View file @
06e716b6
...
...
@@ -27,7 +27,8 @@ describe('PrometheusMetrics', () => {
expect
(
prometheusMetrics
.
$monitoredMetricsEmpty
).
toBeDefined
();
expect
(
prometheusMetrics
.
$monitoredMetricsList
).
toBeDefined
();
expect
(
prometheusMetrics
.
$missingEnvVarPanel
).
toBeDefined
();
expect
(
prometheusMetrics
.
$panelToggle
).
toBeDefined
();
expect
(
prometheusMetrics
.
$panelToggleRight
).
toBeDefined
();
expect
(
prometheusMetrics
.
$panelToggleDown
).
toBeDefined
();
expect
(
prometheusMetrics
.
$missingEnvVarMetricCount
).
toBeDefined
();
expect
(
prometheusMetrics
.
$missingEnvVarMetricsList
).
toBeDefined
();
});
...
...
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