Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
org.etsi.osl.tmf.web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
OSL
code
org.etsi.osl.tmf.web
Commits
7110881e
Commit
7110881e
authored
11 months ago
by
Labros Papadopoulos
Browse files
Options
Downloads
Patches
Plain Diff
party registration workflow
parent
ebea643a
No related branches found
Branches containing commit
No related tags found
1 merge request
!11
Party registration workflow
Pipeline
#6005
failed
11 months ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/shared/components/redirect/redirect.component.ts
+26
-2
26 additions, 2 deletions
src/app/shared/components/redirect/redirect.component.ts
src/app/shared/services/app.service.ts
+5
-2
5 additions, 2 deletions
src/app/shared/services/app.service.ts
with
31 additions
and
4 deletions
src/app/shared/components/redirect/redirect.component.ts
+
26
−
2
View file @
7110881e
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
AppService
}
from
'
../../services/app.service
'
;
import
{
AuthService
}
from
'
src/app/shared/services/auth.service
'
;
@
Component
({
selector
:
'
app-redirect
'
,
...
...
@@ -11,24 +12,47 @@ export class RedirectComponent implements OnInit {
constructor
(
private
appService
:
AppService
,
private
router
:
Router
private
router
:
Router
,
private
authService
:
AuthService
)
{
}
ngOnInit
()
{
let
isTestbedProvider
=
false
;
for
(
var
val
of
this
.
authService
.
portalUserJWT
.
realm_access
.
roles
){
if
(
val
===
'
TESTBED_PROVIDER
'
)
{
isTestbedProvider
=
true
}
}
//TODO insert redirection logic
const
activePortal
=
localStorage
.
getItem
(
'
active_portal
'
)
if
(
activePortal
===
'
services
'
)
{
if
(
isTestbedProvider
){
this
.
router
.
navigate
([
'
services
'
,
'
individual_update
'
])
}
else
{
this
.
router
.
navigate
([
'
services
'
,
'
services_marketplace
'
])
}
}
else
if
(
activePortal
===
'
resources
'
)
{
this
.
router
.
navigate
([
'
resources
'
,
'
resource_catalogs
'
])
}
else
if
(
activePortal
===
'
testing
'
)
{
if
(
isTestbedProvider
){
this
.
router
.
navigate
([
'
testing
'
,
'
individual_update
'
])
}
else
{
this
.
router
.
navigate
([
'
testing
'
,
'
service_test_specs
'
])
}
}
else
if
(
activePortal
===
'
products
'
)
{
this
.
router
.
navigate
([
'
products
'
,
'
marketplace
'
])
if
(
isTestbedProvider
){
this
.
router
.
navigate
([
'
products
'
,
'
individual_update
'
])
}
else
{
this
.
router
.
navigate
([
'
products
'
,
'
marketplace
'
])
}
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/app/shared/services/app.service.ts
+
5
−
2
View file @
7110881e
...
...
@@ -14,6 +14,7 @@ import { ApiConfiguration as ResourceCatalogAPIconfig} from 'src/app/openApis/re
import
{
ApiConfiguration
as
ResourceInventoryAPIconfig
}
from
'
src/app/openApis/resourceInventoryManagement/api-configuration
'
import
{
ApiConfiguration
as
resourcePoolManagementAPIconfig
}
from
'
src/app/openApis/resourcePoolManagement/api-configuration
'
import
{
ApiConfiguration
as
ProductCatalogAPIconfig
}
from
'
src/app/openApis/productCatalogManagement/api-configuration
'
import
{
ApiConfiguration
as
GeographicSiteManagementAPIconfig
}
from
'
src/app/openApis/geographicSiteManagement/api-configuration
'
import
{
NavigationEnd
,
NavigationStart
,
Router
}
from
'
@angular/router
'
;
import
{
filter
,
first
}
from
'
rxjs/operators
'
;
...
...
@@ -40,8 +41,9 @@ export class AppService {
private
tmfResourceCatalogConfig
:
ResourceCatalogAPIconfig
,
private
tmfResourceInventoryConfig
:
ResourceInventoryAPIconfig
,
private
resourcePoolManagementAPIconfig
:
resourcePoolManagementAPIconfig
,
private
tmfProductCatalogConfig
:
ProductCatalogAPIconfig
)
{
private
tmfProductCatalogConfig
:
ProductCatalogAPIconfig
,
private
tmfGeographicSiteConfig
:
GeographicSiteManagementAPIconfig
)
{
this
.
setAPIurls
()
this
.
recognizePortalDomain
()
}
...
...
@@ -64,6 +66,7 @@ export class AppService {
this
.
serviceTestManagementAPIconfig
.
rootUrl
=
this
.
config
.
APITMFURL
this
.
resourcePoolManagementAPIconfig
.
rootUrl
=
this
.
config
.
APITMFURL
this
.
tmfProductCatalogConfig
.
rootUrl
=
this
.
config
.
APITMFURL
this
.
tmfGeographicSiteConfig
.
rootUrl
=
this
.
config
.
APITMFURL
}
//recognition of which portal is used (services/testing/product)
...
...
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