Skip to content
Snippets Groups Projects
Commit 7d1f18bc authored by digrazia2038's avatar digrazia2038
Browse files

Merge branch 'master' of https://gitlab.com/2038-eng/urbanite-ui

parent 6232ceb6
No related branches found
No related tags found
No related merge requests found
export enum MenuType { export enum MenuType {
SHARED = 'SHARED', SHARED = 'SHARED',
PERSONAL = 'PERSONAL', PERSONAL = 'PERSONAL',
PUBLIC = 'PUBLIC'
} }
export namespace MenuType { export namespace MenuType {
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
<h4>{{'general.manage'|translate}} {{'general.dashboard'|translate}}</h4> <h4>{{'general.manage'|translate}} {{'general.dashboard'|translate}}</h4>
</nb-card-header> </nb-card-header>
<nb-stepper orientation="horizontal">
<nb-step>
<nb-card-body [formGroup]="page" > <nb-card-body [formGroup]="page" >
<div class="row"> <div class="row">
<nb-form-field class="col-6 mb-1 mt-1"> <nb-form-field class="col-6 mb-1 mt-1">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
</div> </div>
</nb-form-field> </nb-form-field>
<nb-form-field class="col-6 mb-1 mt-1"> <!-- <nb-form-field class="col-6 mb-1 mt-1">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<label for="shared" class="label mr-2"> <label for="shared" class="label mr-2">
<nb-icon icon="info-outline" nbTooltip="{{'dashboardPage.shared_info'|translate}}" ></nb-icon> <nb-icon icon="info-outline" nbTooltip="{{'dashboardPage.shared_info'|translate}}" ></nb-icon>
...@@ -30,16 +31,8 @@ ...@@ -30,16 +31,8 @@
{{item}} {{item}}
</nb-option> </nb-option>
</nb-select> </nb-select>
<!-- toggle -->
<!--
<nb-card-body class="example-items-col">
<nb-toggle [nbTooltip]="getMessageDisabledTarget()" formControlName="shared">{{'dashboardPage.shared'|translate}}</nb-toggle>
</nb-card-body>
-->
</div> </div>
</nb-form-field> </nb-form-field> -->
<nb-form-field class="col-12 mb-1 mt-1"> <nb-form-field class="col-12 mb-1 mt-1">
...@@ -65,6 +58,16 @@ ...@@ -65,6 +58,16 @@
</nb-form-field> </nb-form-field>
</div> </div>
</nb-card-body> </nb-card-body>
</nb-step>
<nb-step>
<ngx-menu-filter [pageId]="pageId" [pageName]="pageName" (sendFilter)="updateSharedPersonalTypology($event)" ></ngx-menu-filter>
</nb-step>
<nb-step>
<ngx-target-filter [pageId]="pageId" [disabledTarget]="disabledTarget"></ngx-target-filter>
</nb-step>
</nb-stepper>
<nb-card-footer class="d-flex justify-content-between"> <nb-card-footer class="d-flex justify-content-between">
<button nbButton status="primary" (click)="backClicked()" size="small"> <button nbButton status="primary" (click)="backClicked()" size="small">
...@@ -78,6 +81,4 @@ ...@@ -78,6 +81,4 @@
</nb-card> </nb-card>
<ngx-menu-filter [pageId]="pageId" [pageName]="pageName" (sendFilter)="updateSharedPersonalTypology($event)" ></ngx-menu-filter>
<ngx-target-filter [pageId]="pageId" [disabledTarget]="disabledTarget"></ngx-target-filter>
...@@ -19,7 +19,7 @@ export class FormManagerService { ...@@ -19,7 +19,7 @@ export class FormManagerService {
name: new FormControl(page.name || null, Validators.required), name: new FormControl(page.name || null, Validators.required),
description: new FormControl(page.description || null), description: new FormControl(page.description || null),
note: new FormControl(page.note || null), note: new FormControl(page.note || null),
shared: new FormControl(page.shared || null, Validators.required), shared: new FormControl(page.shared || false, Validators.required),
content: new FormControl(page.content || null), content: new FormControl(page.content || null),
}; };
......
...@@ -52,13 +52,16 @@ export class MenuMapperService { ...@@ -52,13 +52,16 @@ export class MenuMapperService {
nbMenuItem.title = menuBlock.label; nbMenuItem.title = menuBlock.label;
} }
if (menuBlock.type !== undefined && menuBlock.type !== null) { if (menuBlock.type !== undefined && menuBlock.type !== null) {
nbMenuItem.icon = menuBlock.type == MenuType.SHARED ? 'globe-outline' : 'lock-outline'; nbMenuItem.icon == 'globe-outline'
if(menuBlock.type != MenuType.PUBLIC){
nbMenuItem.icon = menuBlock.type == MenuType.SHARED ? 'share-outline' : 'lock-outline';
}
} }
//console.log('Check not undef: ', menuBlock.linkedItems !== undefined, 'Check not null: ', menuBlock.linkedItems !== null); //console.log('Check not undef: ', menuBlock.linkedItems !== undefined, 'Check not null: ', menuBlock.linkedItems !== null);
//console.log('Menu items: ', menuBlock.linkedItems); //console.log('Menu items: ', menuBlock.linkedItems);
if (menuBlock.linkedItems !== undefined || menuBlock.linkedItems !== null) { if (menuBlock.linkedItems !== undefined || menuBlock.linkedItems !== null) {
// console.log('### menuBlock.linkedItems ===> ', menuBlock.linkedItems); console.log('### menuBlock.linkedItems ===> ', menuBlock.linkedItems);
nbMenuItem.children = menuBlock.linkedItems.map(item => this.mapItemToNbMenuItem(item)); // TODO: finish nbMenuItem.children = menuBlock.linkedItems.map(item => this.mapItemToNbMenuItem(item)); // TODO: finish
} }
return nbMenuItem; return nbMenuItem;
......
...@@ -36,32 +36,6 @@ export const MENU_ITEMS: NbMenuItem[] = [ ...@@ -36,32 +36,6 @@ export const MENU_ITEMS: NbMenuItem[] = [
name: 'idm-administration' name: 'idm-administration'
} }
}, },
{
title: 'Manage Dashboard Pages',
link: '/pages/dashboard-management/manage-dashboard-pages',
data: {
name: 'dashboard-manage'
}
},
{
title: 'Manage Menu Blocks',
link: '/pages/dashboard-management/manage-menu-blocks',
data: {
name: 'dashboard-menu-blocks'
}
},
{
title: 'Clone Dashboard',
link: '/pages/dashboard-management/dashboard-clone-wizard',
data: {
name: 'dashboard-clone'
}
}
/*,
{
title: 'Manage Dashboard Target',
link: '/pages/dashboard-management/manage-dashboard-target',
}*/
], ],
data: { data: {
name: 'administration' name: 'administration'
...@@ -169,6 +143,41 @@ export const MENU_ITEMS: NbMenuItem[] = [ ...@@ -169,6 +143,41 @@ export const MENU_ITEMS: NbMenuItem[] = [
} }
], ],
}, },
{
title: 'Dashboard Section',
icon: 'settings-2-outline',
children: [
{
title: 'Manage Dashboard Pages',
link: '/pages/dashboard-management/manage-dashboard-pages',
data: {
name: 'dashboard-manage'
}
},
// {
// title: 'Manage Menu Blocks',
// link: '/pages/dashboard-management/manage-menu-blocks',
// data: {
// name: 'dashboard-menu-blocks'
// }
// },
{
title: 'Clone Dashboard',
link: '/pages/dashboard-management/dashboard-clone-wizard',
data: {
name: 'dashboard-clone'
}
}
/*,
{
title: 'Manage Dashboard Target',
link: '/pages/dashboard-management/manage-dashboard-target',
}*/
],
data: {
name: 'dashboard-management'
}
},
{ {
title: 'Data Catalogue', title: 'Data Catalogue',
icon: 'search-outline', icon: 'search-outline',
...@@ -219,73 +228,6 @@ export const MENU_ITEMS: NbMenuItem[] = [ ...@@ -219,73 +228,6 @@ export const MENU_ITEMS: NbMenuItem[] = [
}, },
], ],
}, },
// {
// title: 'Maps',
// icon: 'map-outline',
// data:{
// name:"maps",
// isDemo:true,
// pilot:"URBANITE"
// },
// children: [
// {
// title: 'Amsterdam Tram Maps',
// link: '/pages/maps/leaflet',
// },
// {
// title: 'Amsterdam Tram Compare',
// link: '/pages/maps/single-map',
// }
// ],
// },
// {
// title: 'Charts',
// icon: 'pie-chart-outline',
// data:{
// name:"charts",
// isDemo:true,
// pilot:"URBANITE"
// },
// children: [
// {
// title: 'Echarts',
// link: '/pages/charts/echarts',
// },
// {
// title: 'Charts.js',
// link: '/pages/charts/chartjs',
// },
// {
// title: 'D3',
// link: '/pages/charts/d3',
// },
// ],
// },
// {
// title: 'UI Features',
// icon: 'keypad-outline',
// link: '/pages/ui-features',
// data:{
// name:"ui-features",
// isDemo:true,
// pilot:"URBANITE"
// },
// children: [
// {
// title: 'Grid',
// link: '/pages/ui-features/grid',
// },
// {
// title: 'Icons',
// link: '/pages/ui-features/icons',
// },
// {
// title: 'Typography',
// link: '/pages/ui-features/typography',
// }
// ],
// },
{ {
title: 'Urbanite Project', title: 'Urbanite Project',
icon: 'info-outline', icon: 'info-outline',
...@@ -299,5 +241,28 @@ export const MENU_ITEMS: NbMenuItem[] = [ ...@@ -299,5 +241,28 @@ export const MENU_ITEMS: NbMenuItem[] = [
// } // }
// ], // ],
}, },
// {
// title: 'Private Dashboards',
// icon: 'lock-outline',
// link: '/pages/about/info',
// data: {
// name: "about"
// },
// },
// {
// title: 'Shared Dashboards',
// icon: 'share-outline',
// link: '/pages/about/info',
// data: {
// name: "about"
// },
// },
// {
// title: 'Public Dashboards',
// icon: 'globe-outline',
// link: '/pages/about/info',
// data: {
// name: "about"
// },
// },
]; ];
{ {
"defaultLanguage":"en", "defaultLanguage":"en",
"dashboardBaseURL":"http://localhost:4200", "dashboardBaseURL":"http://localhost:4200",
"enableAuthentication":false, "enableAuthentication":true,
"authProfile": "oidc", "authProfile": "oidc",
"idmBaseURL":"http://localhost:8080", "idmBaseURL":"https://messina.urbanite.esilab.org",
"idmRealmName":"urbanite", "idmRealmName":"urbanite",
"client_id":"urbanite", "client_id":"urbanite",
"client_secret": "", "client_secret": "",
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
], ],
"enable_demo_pages":true, "enable_demo_pages":true,
"pilots":["URBANITE","AMSTERDAM","BILBAO","HELSINKI","MESSINA"], "pilots":["URBANITE","AMSTERDAM","BILBAO","HELSINKI","MESSINA"],
"default_pilot":"AMSTERDAM", "default_pilot":"MESSINA",
"amsterdam":{ "amsterdam":{
"api_base_url":"https://urbanite-node1.comune.messina.it", "api_base_url":"https://urbanite-node1.comune.messina.it",
"token":"mcOUnnIyupQJzbitPX7Q2MnyqrVQUkmo" "token":"mcOUnnIyupQJzbitPX7Q2MnyqrVQUkmo"
......
...@@ -153,6 +153,7 @@ ...@@ -153,6 +153,7 @@
"menuBlock": { "menuBlock": {
"list": "Menu Blocks", "list": "Menu Blocks",
"title": "Menu Block", "title": "Menu Block",
"search" : "Search",
"created": "Menu Block has been succesfully created", "created": "Menu Block has been succesfully created",
"updated": "Menu Block has been succesfully updated", "updated": "Menu Block has been succesfully updated",
"deleted": "Menu Block has been succesfully deleted", "deleted": "Menu Block has been succesfully deleted",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment