Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ginkgo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vjrj
ginkgo
Commits
e17f9d49
Commit
e17f9d49
authored
1 year ago
by
vjrj
Browse files
Options
Downloads
Patches
Plain Diff
Select more updated Cesium Plus node
parent
cf4f60c1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/g1/api.dart
+17
-2
17 additions, 2 deletions
lib/g1/api.dart
lib/ui/widgets/debug_nodes/debug_node_list.dart
+1
-1
1 addition, 1 deletion
lib/ui/widgets/debug_nodes/debug_node_list.dart
pubspec.yaml
+1
-1
1 addition, 1 deletion
pubspec.yaml
with
19 additions
and
4 deletions
lib/g1/api.dart
+
17
−
2
View file @
e17f9d49
...
@@ -427,10 +427,25 @@ Future<NodeCheck> _pingNode(String node, NodeType type) async {
...
@@ -427,10 +427,25 @@ Future<NodeCheck> _pingNode(String node, NodeType type) async {
}
}
} else if (type == NodeType.cesiumPlus) {
} else if (type == NodeType.cesiumPlus) {
// see: http://g1.data.e-is.pro/network/peering
// see: http://g1.data.e-is.pro/network/peering
await http
final Response response =
await http
.get(Uri.parse('
$node
/
n
etwork
/
peering
'))
.get(Uri.parse('
$node
/
n
ode
/
stats
'))
// Decrease http timeout during ping
// Decrease http timeout during ping
.timeout(timeout);
.timeout(timeout);
if (response.statusCode == 200) {
try {
final Map<String, dynamic> json =
jsonDecode(response.body.replaceAll('"cluster"
{
', '"cluster"
:
{
'))
as Map<String, dynamic>;
currentBlock = ((((json['
stats
'] as Map<String, dynamic>)['
cluster
']
as Map<String, dynamic>)['
indices
']
as Map<String, dynamic>)['
docs
']
as Map<String, dynamic>)['
count
'] as int;
} catch (e) {
loggerDev('
Cannot
parse
node
/
stats
$e
');
}
} else {
latency = wrongNodeDuration;
}
stopwatch.stop();
stopwatch.stop();
latency = stopwatch.elapsed;
latency = stopwatch.elapsed;
} else {
} else {
...
...
This diff is collapsed.
Click to expand it.
lib/ui/widgets/debug_nodes/debug_node_list.dart
+
1
−
1
View file @
e17f9d49
...
@@ -38,7 +38,7 @@ class DebugNodeList extends StatelessWidget {
...
@@ -38,7 +38,7 @@ class DebugNodeList extends StatelessWidget {
title:
Text
(
node
.
url
),
title:
Text
(
node
.
url
),
subtitle:
node
.
latency
<
wrongNode
subtitle:
node
.
latency
<
wrongNode
?
Text
(
?
Text
(
'
${type != NodeType.cesiumPlus ? 'Current block: ${node.currentBlock}
, '
:
''
}
errors:
$
{
node
.
errors
},
latency
(
ms
)
:
$
{
node
.
latency
}
')
'
${type != NodeType.cesiumPlus ? 'Current block: ${node.currentBlock}
, '
:
'
Current docs:
${node.currentBlock}
,
'
}
errors:
$
{
node
.
errors
},
latency
(
ms
)
:
$
{
node
.
latency
}
')
: null,
: null,
leading: node.currentBlock == currentBlock &&
leading: node.currentBlock == currentBlock &&
node.latency < wrongNode
node.latency < wrongNode
...
...
This diff is collapsed.
Click to expand it.
pubspec.yaml
+
1
−
1
View file @
e17f9d49
...
@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
...
@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version
:
0.2.
3
version
:
0.2.
4-SNAPSHOT
environment
:
environment
:
sdk
:
"
>=2.17.1
<3.0.0"
sdk
:
"
>=2.17.1
<3.0.0"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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