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
ec2086ca
Commit
ec2086ca
authored
Apr 06, 2020
by
rpereira2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct references to ee prometheus_metrics js
parent
d88f6a0f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
app/assets/javascripts/pages/projects/services/edit/index.js
app/assets/javascripts/pages/projects/services/edit/index.js
+1
-1
app/assets/javascripts/prometheus_metrics/custom_metrics.js
app/assets/javascripts/prometheus_metrics/custom_metrics.js
+3
-3
spec/frontend/prometheus_metrics/custom_metrics_spec.js
spec/frontend/prometheus_metrics/custom_metrics_spec.js
+3
-3
No files found.
app/assets/javascripts/pages/projects/services/edit/index.js
View file @
ec2086ca
import
IntegrationSettingsForm
from
'
~/integrations/integration_settings_form
'
;
import
PrometheusMetrics
from
'
ee_else_ce/prometheus_metrics/prometheus
_metrics
'
;
import
PrometheusMetrics
from
'
~/prometheus_metrics/custom
_metrics
'
;
import
PrometheusAlerts
from
'
~/prometheus_alerts
'
;
import
initAlertsSettings
from
'
~/alerts_service_settings
'
;
...
...
app/assets/javascripts/prometheus_metrics/custom_metrics.js
View file @
ec2086ca
import
$
from
'
jquery
'
;
import
{
escape
,
sortBy
}
from
'
lodash
'
;
import
PrometheusMetrics
from
'
~/prometheus_metrics
/prometheus_metrics
'
;
import
PrometheusMetrics
from
'
.
/prometheus_metrics
'
;
import
PANEL_STATE
from
'
./constants
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
capitalizeFirstCharacter
}
from
'
~/lib/utils/text_utility
'
;
export
default
class
EEPrometheus
Metrics
extends
PrometheusMetrics
{
export
default
class
Custom
Metrics
extends
PrometheusMetrics
{
constructor
(
wrapperSelector
)
{
super
(
wrapperSelector
);
this
.
customMetrics
=
[];
...
...
@@ -106,7 +106,7 @@ export default class EEPrometheusMetrics extends PrometheusMetrics {
const
sortedMetrics
=
sortBy
(
this
.
customMetrics
.
map
(
capitalizeGroup
),
[
'
group
'
,
'
title
'
]);
sortedMetrics
.
forEach
(
metric
=>
{
this
.
$monitoredCustomMetricsList
.
append
(
EEPrometheus
Metrics
.
customMetricTemplate
(
metric
));
this
.
$monitoredCustomMetricsList
.
append
(
Custom
Metrics
.
customMetricTemplate
(
metric
));
});
this
.
$monitoredCustomMetricsCount
.
text
(
this
.
customMetrics
.
length
);
...
...
spec/frontend/prometheus_metrics/custom_metrics_spec.js
View file @
ec2086ca
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
PrometheusMetrics
from
'
ee/prometheus_metrics/prometheus
_metrics
'
;
import
PrometheusMetrics
from
'
~/prometheus_metrics/custom
_metrics
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
PANEL_STATE
from
'
~/prometheus_metrics/constants
'
;
import
metrics
from
'
./mock_data
'
;
describe
(
'
PrometheusMetrics
EE
'
,
()
=>
{
describe
(
'
PrometheusMetrics
'
,
()
=>
{
const
FIXTURE
=
'
services/prometheus/prometheus_service.html
'
;
const
customMetricsEndpoint
=
'
http://test.host/frontend-fixtures/services-project/prometheus/metrics
'
;
...
...
@@ -23,7 +23,7 @@ describe('PrometheusMetrics EE', () => {
mock
.
restore
();
});
describe
(
'
Custom Metrics
EE
'
,
()
=>
{
describe
(
'
Custom Metrics
'
,
()
=>
{
let
prometheusMetrics
;
beforeEach
(()
=>
{
...
...
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