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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
afc1a67d
Commit
afc1a67d
authored
Jun 01, 2017
by
kushalpandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle response failure case for loadActiveMetrics
parent
4826ae07
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
app/assets/javascripts/prometheus_metrics/prometheus_metrics.js
...sets/javascripts/prometheus_metrics/prometheus_metrics.js
+5
-2
No files found.
app/assets/javascripts/prometheus_metrics/prometheus_metrics.js
View file @
afc1a67d
/* eslint-disable class-methods-use-this, promise/catch-or-return */
export
default
class
PrometheusMetrics
{
constructor
(
wrapperSelector
)
{
this
.
backOffRequestCounter
=
0
;
...
...
@@ -24,6 +22,7 @@ export default class PrometheusMetrics {
this
.
$panelToggle
.
on
(
'
click
'
,
e
=>
this
.
handlePanelToggle
(
e
));
}
/* eslint-disable class-methods-use-this */
handlePanelToggle
(
e
)
{
const
$toggleBtn
=
$
(
e
.
currentTarget
);
const
$currentPanelBody
=
$toggleBtn
.
parents
(
'
.panel
'
).
find
(
'
.panel-body
'
);
...
...
@@ -84,6 +83,10 @@ export default class PrometheusMetrics {
this
.
$monitoredMetricsLoading
.
addClass
(
'
hidden
'
);
this
.
$monitoredMetricsEmpty
.
removeClass
(
'
hidden
'
);
}
})
.
catch
(()
=>
{
this
.
$monitoredMetricsLoading
.
addClass
(
'
hidden
'
);
this
.
$monitoredMetricsEmpty
.
removeClass
(
'
hidden
'
);
});
}
}
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