Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ejercicio2-framework-front
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Josue
ejercicio2-framework-front
Commits
4db650a5
Commit
4db650a5
authored
Aug 26, 2021
by
Aaron Gutierrez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Se agregó la seguridad del xdf nuevamente al proyecto
parent
affaa81b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
19 deletions
+69
-19
app-routing.module.ts
projects/bytebot-html/src/app/app-routing.module.ts
+18
-9
app.module.ts
projects/bytebot-html/src/app/app.module.ts
+9
-9
navigation.json
projects/bytebot-html/src/assets/data/navigation.json
+42
-1
No files found.
projects/bytebot-html/src/app/app-routing.module.ts
View file @
4db650a5
import
{
NgModule
}
from
'@angular/core'
;
import
{
Routes
,
RouterModule
}
from
'@angular/router'
;
import
{
BaseLayoutComponent
,
CustomLayoutComponent
,
NotFoundComponent
}
from
'@xdf/layouts'
;
import
{
CustomLayoutComponent
,
NotFoundComponent
}
from
'@xdf/layouts'
;
import
{
AuthGuard
,
LoginComponent
}
from
'@xdf/security'
;
import
{
BytebotLayoutComponent
}
from
'./modules/bytebot-layout/bytebot-layout/bytebot-layout.component'
;
import
{
HomeComponent
}
from
'./views/home/home.component'
;
...
...
@@ -9,20 +9,29 @@ const routes: Routes = [
// Remover para SSO
{
path
:
'login'
,
component
:
LoginComponent
},
// Main redirect
{
path
:
''
,
redirectTo
:
'home'
,
pathMatch
:
'full'
},
{
path
:
''
,
redirectTo
:
'home'
,
pathMatch
:
'full'
,
canActivate
:
[
AuthGuard
]
},
{
path
:
''
,
component
:
CustomLayoutComponent
,
children
:
[
{
path
:
'home'
,
component
:
HomeComponent
,
data
:
{
breadcrumb
:
'Home'
}
}
]
},
{
path
:
''
,
component
:
BaseLayoutComponent
,
children
:
[
{
path
:
'home'
,
component
:
HomeComponent
,
data
:
{
breadcrumb
:
'Home'
}
},
{
path
:
'security'
,
data
:
{
breadcrumb
:
'Seguridad'
},
canLoad
:
[
AuthGuard
],
loadChildren
:
()
=>
import
(
'./modules/security/security.module'
).
then
(
m
=>
m
.
SecurityModule
)
},
{
path
:
'settings'
,
data
:
{
breadcrumb
:
'Ajustes Generales'
},
canLoad
:
[
AuthGuard
],
loadChildren
:
()
=>
import
(
'./modules/settings/settings.module'
).
then
(
m
=>
m
.
SettingsModule
)
},
{
path
:
'configuration'
,
data
:
{
breadcrumb
:
'Agentes'
},
canLoad
:
[
AuthGuard
],
loadChildren
:
()
=>
import
(
'./modules/agent/agent.module'
).
then
(
m
=>
m
.
AgentModule
)
},
{
path
:
'dashboards'
,
data
:
{
breadcrumb
:
'Dashboards'
},
path
:
'dashboards'
,
data
:
{
breadcrumb
:
'Dashboards'
},
canLoad
:
[
AuthGuard
],
loadChildren
:
()
=>
import
(
'./modules/dashboards/dashboards.module'
).
then
(
m
=>
m
.
DashboardsModule
)
},
]
],
canActivate
:
[
AuthGuard
]
},
{
path
:
'notpermitted'
,
component
:
NotFoundComponent
},
...
...
projects/bytebot-html/src/app/app.module.ts
View file @
4db650a5
...
...
@@ -117,19 +117,19 @@ export function createTranslateLoader(http: HttpClient) {
{
provide
:
ResourceAuthGuard
,
useClass
:
ResourceAuthGuard
},
// descomentar estas lineas para OAUTH
//
{ provide: AuthGuard, useClass: OAuthGuard },
//
{ provide: AuthenticationService, useClass: OAuthAuthenticationService },
//
{ provide: APP_INITIALIZER, useFactory: loginLoaderFactory, deps: [AuthenticationService], multi: true },
{
provide
:
AuthGuard
,
useClass
:
OAuthGuard
},
{
provide
:
AuthenticationService
,
useClass
:
OAuthAuthenticationService
},
{
provide
:
APP_INITIALIZER
,
useFactory
:
loginLoaderFactory
,
deps
:
[
AuthenticationService
],
multi
:
true
},
// Para probar mantenimientos
// comentar estas lineas para OAUTH
{
provide
:
AuthGuard
,
useClass
:
AuthGuard
},
{
provide
:
AuthenticationService
,
useClass
:
ByteAuthenticationService
},
{
provide
:
HTTP_INTERCEPTORS
,
useClass
:
AuthenticationFakeBackendInterceptor
,
multi
:
true
},
{
provide
:
HTTP_INTERCEPTORS
,
useClass
:
SettingsFakeBackendInterceptor
,
multi
:
true
},
{
provide
:
HTTP_INTERCEPTORS
,
useClass
:
CustomProgramsFakeBackendInterceptor
,
multi
:
true
},
{
provide
:
HTTP_INTERCEPTORS
,
useClass
:
AgentFakeBackendInterceptor
,
multi
:
true
},
//
{ provide: AuthGuard, useClass: AuthGuard},
//
{ provide: AuthenticationService, useClass: ByteAuthenticationService },
//
{ provide: HTTP_INTERCEPTORS, useClass: AuthenticationFakeBackendInterceptor, multi: true},
//
{ provide: HTTP_INTERCEPTORS, useClass: SettingsFakeBackendInterceptor, multi: true },
//
{ provide: HTTP_INTERCEPTORS, useClass: CustomProgramsFakeBackendInterceptor, multi: true },
//
{ provide: HTTP_INTERCEPTORS, useClass: AgentFakeBackendInterceptor, multi: true },
// { provide: HTTP_INTERCEPTORS, useClass: OperativeDashboardFakeBackendInterceptor, multi: true },
...
...
projects/bytebot-html/src/assets/data/navigation.json
View file @
4db650a5
[
{
"id"
:
30
,
"name"
:
"security"
,
"label"
:
"menu.security"
,
"icon"
:
"<i class=
\"
fa fa-address-book
\"
></i>"
,
"fullPath"
:
"/security"
,
"singlePath"
:
"security"
,
"isProgram"
:
false
,
"children"
:
[
{
"id"
:
32
,
"name"
:
"user"
,
"label"
:
"menu.security.user"
,
"icon"
:
null
,
"fullPath"
:
"/security/user"
,
"singlePath"
:
"user"
,
"isProgram"
:
true
,
"children"
:
[]
},
{
"id"
:
32
,
"name"
:
"user_role"
,
"label"
:
"menu.security.user.role"
,
"icon"
:
null
,
"fullPath"
:
"/security/user-role"
,
"singlePath"
:
"user-role"
,
"isProgram"
:
true
,
"children"
:
[]
}
]
},
{
"id"
:
37
,
"name"
:
"CONVERSATIONAL_AGENT"
,
"label"
:
"menu.parent.agent"
,
"icon"
:
"<i class=
\"
fa fa-cog
\"
></i>"
,
"fullPath"
:
"/configuration/agent"
,
"singlePath"
:
"configuration"
,
"isProgram"
:
true
,
"children"
:
[]
},
{
"id"
:
38
,
"name"
:
"BBOT_DASHBOARD"
,
...
...
@@ -30,4 +71,4 @@
}
]
}
]
\ No newline at end of file
]
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