Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gitlab-External-Templates
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adri
Gitlab-External-Templates
Commits
d231b36a
Commit
d231b36a
authored
8 years ago
by
Stan Hu
Browse files
Options
Downloads
Patches
Plain Diff
Spin globe icon when retrieving Geo node status
Closes #1977
parent
69fd23f8
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/assets/javascripts/geo_nodes.js
+4
-0
4 additions, 0 deletions
app/assets/javascripts/geo_nodes.js
app/assets/stylesheets/pages/geo_nodes.scss
+4
-0
4 additions, 0 deletions
app/assets/stylesheets/pages/geo_nodes.scss
app/helpers/ee/geo_helper.rb
+2
-2
2 additions, 2 deletions
app/helpers/ee/geo_helper.rb
with
10 additions
and
2 deletions
app/assets/javascripts/geo_nodes.js
+
4
−
0
View file @
d231b36a
...
...
@@ -3,6 +3,7 @@ import './smart_interval';
const
healthyClass
=
'
geo-node-icon-healthy
'
;
const
unhealthyClass
=
'
geo-node-icon-unhealthy
'
;
const
unknownClass
=
'
geo-node-icon-unknown
'
;
class
GeoNodeStatus
{
constructor
(
el
)
{
...
...
@@ -40,6 +41,9 @@ class GeoNodeStatus {
}
setStatusIcon
(
healthy
)
{
this
.
$icon
.
removeClass
(
'
fa-spin
'
);
this
.
$icon
.
removeClass
(
unknownClass
);
if
(
healthy
)
{
this
.
$icon
.
removeClass
(
unhealthyClass
)
.
addClass
(
healthyClass
)
...
...
This diff is collapsed.
Click to expand it.
app/assets/stylesheets/pages/geo_nodes.scss
+
4
−
0
View file @
d231b36a
...
...
@@ -6,6 +6,10 @@
color
:
$gl-danger
;
}
.geo-node-icon-unknown
{
color
:
$gl-warning
;
}
.geo-node-icon-disabled
{
color
:
$gray-darkest
;
}
This diff is collapsed.
Click to expand it.
app/helpers/ee/geo_helper.rb
+
2
−
2
View file @
d231b36a
...
...
@@ -4,10 +4,10 @@ def node_status_icon(node)
if
node
.
primary?
icon
'star fw'
,
class:
'has-tooltip'
,
title:
'Primary node'
else
status
=
node
.
enabled?
?
'
healthy
'
:
'disabled'
status
=
node
.
enabled?
?
'
unknown
'
:
'disabled'
icon
'globe fw'
,
class:
"js-geo-node-icon geo-node-icon-
#{
status
}
has-tooltip"
,
class:
"js-geo-node-icon
fa-spin
geo-node-icon-
#{
status
}
has-tooltip"
,
title:
status
.
capitalize
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment