[Navigation] navigationService provides checking

Remove policy checking in navigation action and depend on navigation
service to provide those checks.

* Register checkFunctions with navigationService.checkBeforeNavigation
  which returns a function for unregistering them.
* navigationService.setNavigation will run checks before allowing
  navigation, unless a `force` argument is supplied.

https://github.com/nasa/openmct/issues/1360
This commit is contained in:
Pete Richards
2016-12-20 15:07:05 -08:00
parent f0b9292458
commit f2d61604f7
3 changed files with 108 additions and 41 deletions

View File

@ -198,7 +198,10 @@ define([
"services": [
{
"key": "navigationService",
"implementation": NavigationService
"implementation": NavigationService,
"depends": [
"$window"
]
}
],
"actions": [
@ -206,10 +209,7 @@ define([
"key": "navigate",
"implementation": NavigateAction,
"depends": [
"navigationService",
"$q",
"policyService",
"$window"
"navigationService"
]
},
{