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
6b3bfec8
Commit
6b3bfec8
authored
Mar 20, 2018
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide verification UI if feature disabled
parent
58ee6fc1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
9 deletions
+21
-9
ee/app/assets/javascripts/geo_nodes/components/geo_node_details.vue
...ets/javascripts/geo_nodes/components/geo_node_details.vue
+4
-0
ee/app/assets/javascripts/geo_nodes/store/geo_nodes_store.js
ee/app/assets/javascripts/geo_nodes/store/geo_nodes_store.js
+1
-0
ee/app/models/geo_node_status.rb
ee/app/models/geo_node_status.rb
+16
-9
No files found.
ee/app/assets/javascripts/geo_nodes/components/geo_node_details.vue
View file @
6b3bfec8
...
...
@@ -204,6 +204,7 @@
<
template
v-if=
"showAdvanceItems"
>
<template
v-if=
"node.primary"
>
<geo-node-detail-item
v-if=
"nodeDetails.repository_verification_enabled"
:item-title=
"s__('GeoNodes|Repositories checksummed:')"
:success-label=
"s__('GeoNodes|Checksummed')"
:neutral-label=
"s__('GeoNodes|Not checksummed')"
...
...
@@ -212,6 +213,7 @@
:item-value-type=
"valueType.GRAPH"
/>
<geo-node-detail-item
v-if=
"nodeDetails.repository_verification_enabled"
:item-title=
"s__('GeoNodes|Wikis checksummed:')"
:success-label=
"s__('GeoNodes|Checksummed')"
:neutral-label=
"s__('GeoNodes|Not checksummed')"
...
...
@@ -236,6 +238,7 @@
</
template
>
<
template
v-else
>
<geo-node-detail-item
v-if=
"nodeDetails.repository_verification_enabled"
:item-title=
"s__('GeoNodes|Repository checksums verified:')"
:success-label=
"s__('GeoNodes|Verified')"
:neutral-label=
"s__('GeoNodes|Unverified')"
...
...
@@ -244,6 +247,7 @@
:item-value-type=
"valueType.GRAPH"
/>
<geo-node-detail-item
v-if=
"nodeDetails.repository_verification_enabled"
:item-title=
"s__('GeoNodes|Wiki checksums verified:')"
:success-label=
"s__('GeoNodes|Verified')"
:neutral-label=
"s__('GeoNodes|Unverified')"
...
...
ee/app/assets/javascripts/geo_nodes/store/geo_nodes_store.js
View file @
6b3bfec8
...
...
@@ -87,6 +87,7 @@ export default class GeoNodesStore {
successCount
:
rawNodeDetails
.
wikis_synced_count
||
0
,
failureCount
:
rawNodeDetails
.
wikis_failed_count
||
0
,
},
repository_verification_enabled
:
rawNodeDetails
.
repositories_verified_count
!=
null
,
verifiedRepositories
:
{
totalCount
:
rawNodeDetails
.
repositories_count
||
0
,
successCount
:
rawNodeDetails
.
repositories_verified_count
||
0
,
...
...
ee/app/models/geo_node_status.rb
View file @
6b3bfec8
...
...
@@ -5,7 +5,7 @@ class GeoNodeStatus < ActiveRecord::Base
# Whether we were successful in reaching this node
attr_accessor
:success
attr_writer
:health_status
attr_writer
:health_status
attr_accessor
:storage_shards
# Prometheus metrics, no need to store them in the database
...
...
@@ -131,6 +131,7 @@ class GeoNodeStatus < ActiveRecord::Base
load_primary_data
load_secondary_data
load_verification_data
self
end
...
...
@@ -140,10 +141,6 @@ class GeoNodeStatus < ActiveRecord::Base
self
.
replication_slots_count
=
geo_node
.
replication_slots_count
self
.
replication_slots_used_count
=
geo_node
.
replication_slots_used_count
self
.
replication_slots_max_retained_wal_bytes
=
geo_node
.
replication_slots_max_retained_wal_bytes
self
.
repositories_verified_count
=
repository_verification_finder
.
count_verified_repositories
self
.
repositories_verification_failed_count
=
repository_verification_finder
.
count_verification_failed_repositories
self
.
wikis_verified_count
=
repository_verification_finder
.
count_verified_wikis
self
.
wikis_verification_failed_count
=
repository_verification_finder
.
count_verification_failed_wikis
end
end
...
...
@@ -156,10 +153,6 @@ class GeoNodeStatus < ActiveRecord::Base
self
.
repositories_failed_count
=
projects_finder
.
count_failed_repositories
self
.
wikis_synced_count
=
projects_finder
.
count_synced_wikis
self
.
wikis_failed_count
=
projects_finder
.
count_failed_wikis
self
.
repositories_verified_count
=
projects_finder
.
count_verified_repositories
self
.
repositories_verification_failed_count
=
projects_finder
.
count_verification_failed_repositories
self
.
wikis_verified_count
=
projects_finder
.
count_verified_wikis
self
.
wikis_verification_failed_count
=
projects_finder
.
count_verification_failed_wikis
self
.
lfs_objects_synced_count
=
lfs_objects_finder
.
count_synced_lfs_objects
self
.
lfs_objects_failed_count
=
lfs_objects_finder
.
count_failed_lfs_objects
self
.
job_artifacts_synced_count
=
job_artifacts_finder
.
count_synced_job_artifacts
...
...
@@ -169,6 +162,20 @@ class GeoNodeStatus < ActiveRecord::Base
end
end
def
load_verification_data
if
Feature
.
enabled?
(
'geo_repository_verification'
)
finder
=
Gitlab
::
Geo
.
primary?
?
repository_verification_finder
:
projects_finder
self
.
repositories_verified_count
=
finder
.
count_verified_repositories
self
.
repositories_verification_failed_count
=
finder
.
count_verification_failed_repositories
self
.
wikis_verified_count
=
finder
.
count_verified_wikis
self
.
wikis_verification_failed_count
=
finder
.
count_verification_failed_wikis
else
self
.
repositories_verified_count
=
self
.
repositories_verification_failed_count
=
nil
self
.
wikis_verified_count
=
self
.
wikis_verification_failed_count
=
nil
end
end
alias_attribute
:health
,
:status_message
def
healthy?
...
...
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