Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cesium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
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
clients
Cesium-grp
Cesium
Commits
3d8cc369
Commit
3d8cc369
authored
4 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
[enh] Starting to implement startup node selection
parent
0660404d
No related branches found
No related tags found
1 merge request
!647
[enh] If node unreachable, select a random UP fallback peer
Pipeline
#11415
failed
4 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dist/desktop
+1
-1
1 addition, 1 deletion
dist/desktop
www/js/controllers/network-controllers.js
+2
-0
2 additions, 0 deletions
www/js/controllers/network-controllers.js
www/js/platform.js
+38
-3
38 additions, 3 deletions
www/js/platform.js
with
41 additions
and
4 deletions
desktop
@
05c905f9
Compare
366b85e1
...
05c905f9
Subproject commit
366b85e16a589746f53ad260a02abdaa346a1212
Subproject commit
05c905f9f5cc2cc8698a995e87797991e87e9a26
This diff is collapsed.
Click to expand it.
www/js/controllers/network-controllers.js
+
2
−
0
View file @
3d8cc369
...
@@ -403,6 +403,8 @@ function NetworkLookupModalController($scope, $controller, parameters) {
...
@@ -403,6 +403,8 @@ function NetworkLookupModalController($scope, $controller, parameters) {
$scope
.
enableLocationHref
=
false
;
$scope
.
enableLocationHref
=
false
;
$scope
.
helptipPrefix
=
''
;
$scope
.
helptipPrefix
=
''
;
//$scope.compactMode = false; // Always false, because no toggle button in the modal
$scope
.
selectPeer
=
function
(
peer
)
{
$scope
.
selectPeer
=
function
(
peer
)
{
$scope
.
closeModal
(
peer
);
$scope
.
closeModal
(
peer
);
};
};
...
...
This diff is collapsed.
Click to expand it.
www/js/platform.js
+
38
−
3
View file @
3d8cc369
...
@@ -100,8 +100,9 @@ angular.module('cesium.platform', ['ngIdle', 'cesium.config', 'cesium.services']
...
@@ -100,8 +100,9 @@ angular.module('cesium.platform', ['ngIdle', 'cesium.config', 'cesium.services']
})
})
.
factory
(
'
csPlatform
'
,
function
(
ionicReady
,
$rootScope
,
$q
,
$state
,
$translate
,
$timeout
,
$ionicHistory
,
UIUtils
,
.
factory
(
'
csPlatform
'
,
function
(
ionicReady
,
$rootScope
,
$q
,
$state
,
$translate
,
$timeout
,
$ionicHistory
,
$window
,
BMA
,
Device
,
csHttp
,
csConfig
,
csCache
,
csSettings
,
csCurrency
,
csWallet
)
{
UIUtils
,
Modals
,
BMA
,
Device
,
csHttp
,
csConfig
,
csCache
,
csSettings
,
csCurrency
,
csWallet
)
{
'
ngInject
'
;
'
ngInject
'
;
var
var
...
@@ -201,6 +202,38 @@ angular.module('cesium.platform', ['ngIdle', 'cesium.config', 'cesium.services']
...
@@ -201,6 +202,38 @@ angular.module('cesium.platform', ['ngIdle', 'cesium.config', 'cesium.services']
});
});
}
}
// User can select a node
function
selectBmaNode
()
{
var
parameters
=
{
enableFilter
:
false
,
type
:
'
all
'
,
bma
:
true
,
expertMode
:
true
};
if
(
$window
.
location
.
protocol
===
'
https:
'
)
{
parameters
.
ssl
=
true
;
}
return
Modals
.
showNetworkLookup
(
parameters
)
.
then
(
function
(
peer
)
{
if
(
!
peer
)
return
true
;
// User cancelled (= keep the default node)
var
node
=
{
host
:
peer
.
getHost
(),
port
:
peer
.
getPort
(),
useSsl
:
peer
.
isSsl
()
};
console
.
info
(
"
[platform] Selected peer:
"
,
node
);
// Only change BMA node in settings
csSettings
.
data
.
node
=
node
;
// Add a marker, for UI
csSettings
.
data
.
node
.
temporary
=
true
;
return
BMA
.
copy
(
node
);
});
}
function
isStarted
()
{
function
isStarted
()
{
return
started
;
return
started
;
}
}
...
@@ -275,7 +308,9 @@ angular.module('cesium.platform', ['ngIdle', 'cesium.config', 'cesium.services']
...
@@ -275,7 +308,9 @@ angular.module('cesium.platform', ['ngIdle', 'cesium.config', 'cesium.services']
// Load BMA
// Load BMA
.
then
(
function
(){
.
then
(
function
(){
return
BMA
.
ready
().
then
(
checkBmaNodeAlive
);
return
BMA
.
ready
()
.
then
(
checkBmaNodeAlive
)
.
then
(
selectBmaNode
);
})
})
// Load currency
// Load currency
...
...
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