Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel2
minLevel2

Introduction

The Web Template is a base template that allows you to easily create deployable web applications such as platform Web projects simply by configuring a set of endpoints in the JS configuration files.

...

  • HTML templates.

  • Javascript and CSS libraries of the application (assets). 

HTML Templates

When cloning the project, you will see 2 templates: index and login. Both are configurable templates to fit the needs of the project.

...

Each of these screens or visualizations are encapsulated in dashboards (as explained más adelante). These dashboards are dynamic display elements made up of gadgets/widgets that interact with each other and load data optimally.

JavaScript and CSS style libraries

In the project, in addition to the basic style libraries and the basic JavaScript libraries that are used in the dashboards for their generic gadgets, a series of additional open-source libraries is mandatory for some of the functionalities. All of the functionalities are described below.

...

We see below the structure and content of the folders.

1st Level

2nd Level

Folder Description

Image Modified
It contains the basic files for the front-end part and its configuration.

Image Modified

The css folder has the style files.

The js folder has the basic JavaScript files for the front-end, which initializes basic, boostrap, and configuration and operation functionalities for the index and login templates.

The media folder has images, logos and backgrounds for the front-end application.

Image Modified
Contains the third-party library and plugin files used for the front-end part and the dashboard configuration

Image Modified

The base folder has the used icon font files, in addition to grouped files of several styles and several JavaScript plugins that are used for fields of type: date, datepicker, datetimepickers, select2, boostrap-select, input mask, jquery-validation, range, sliders, colorpickers, etc.

datatables is the folder that contains styles and JavaScript used by the data tables used in different dashboards.

x-editable contains an open source plugin for online data editing.

Configuration system

The template configuration system has two main objectives, the first one being to configure access and the navigation menu of the front-end application, and the second one, to configure the visual aspect of the index and login template.

...

Simple menu (without submenus):

{title:{EN:"…",ES:"…"},icon:"",url:"",submenu:[], dashboard:{}}

The main condition for making a simple menu is to place the submenu property in an empty array. The following fields allow:

  • title: specifies the title or label that will be displayed. It can be indicated in several languages: ​​EN, ES,…

  • icon: specifies the icon that will be used for this menu. You can use any icon available in the following libraries and with this format:

...

Let's see below two examples, one for page and one for dashboard:

Simple Menu to page::

{title:{EN:"Page",ES:"Página"},icon:"fa fa-file",url:"http://www.google.es",submenu:[], dashboard:{}}

Simple Menu to Dashboard:

{title:{EN:"Dashboard",ES:"Dashboard"},icon:"la la-dashboard",url:"",submenu:[], dashboard:{title: "myDashboard", src: "https://development.onesaitplatform.com/controlpanel/dashboards/view/MASTER-Dashboard-2/", background: "#FFCC00", height: "1000px", mode: "INSERT"}}


The other option that allows a simple menu is a separation element, which only acts as a separator between groups of menus. To create a separator, add a simple menu without url and without dashboard:

Simple separator menu:

{title:{EN:"Separator",ES:"…"},icon:"fa fa-line",url:"",submenu:[], dashboard:{}}

The other option of the Navigation System is the complex menus or menus with submenus. They work exactly like the simple ones, only they are located within the submenu[ ] field of the main menu. Let's see an example below:

{title:{EN:"menu1",ES:"menu1"},icon:"flaticon-cart",url:"",
submenu:[
{title:{EN:"submenu1",ES:"submenu1"},icon:"flaticon-laptop",url:"index.html", dashboard:{}},
{title:{EN:"submenu2",ES:"submenu2"},icon:"flaticon-comment",url:"index.html", dashboard:{}},
{title:{EN:"Dashboard 1",ES:"Dashboard"},icon:"flaticon-calendar-1",url:"",
dashboard:{
src:"https://development.onesaitplatform.com/controlpanel/dashboards/view/MASTER-Dashboard-2/",
title: "Dashboard Example",
background: '',
height: '850px',
mode: 'INSERT'
}
}
]
}

With all these options the navigation of the application is built as we can see below:

Image Modified

In this image, you can see all the types of elements that you can build in the navigation of the application:

The home menu, by default not shown; several menus with submenus; the menu of Complaints with two submenus: Dashboard and Report; and another menu with submenus called Objectives.

The next configuration object is mainJson. This JSON object configures the behavior and visual style of the login and index templates. To do this, the configuration is divided into blocks that describe each of the areas of the pages or general elements thereof.

...

We will now an example of this template configuration object below:

// FRONTEND MAIN CONFIGURATION
var mainJson = {
title: "onesait Platform | BI Datalake Dashboards",
description: "onesait Platform PoC",
currentSkin: 'skin-light',
access:{
urlBasePath: "",
imgBasePath: "assets/app/media/img/",
entry: "PRIVATE",
urlBase:"https://dev-datalake.onesaitplatform.com/",
urlApi: "https://dev-datalake.onesaitplatform.com/api-manager/server/api"
},
app: {
appLogo: '',
appLogoCss: 'width: auto; max-height: 60px;',
appLogoBackground: 'background-color: rgb(14, 102, 139) !important',
appHome: 'onesait BI Datalake',
appLoading: '',
appFooter: true,
appStickymenu: false,
appWelcome: false,
},
login:{
loginLogo: './assets/app/media/img/logos/Minsait-logo-invert.png',
loginLogoStyle: 'width: auto; height: 230px;',
loginBackground: './assets/app/media/img/bg/bg-4.jpg',
loginDescription:'wellcome to onesait BI Datalake',
signInTitle: 'onesait BI Datalake, please sign In:',
signInBtnColor: '', // NEW-ELEMENT.
signUp: false,
forgotPassword: false,
rememberMe: false
},
user:{
showAvatar: true,
avatar: 'assets/app/media/img/logos/database.png',
profile: {link:"profile.html",text:"ROL",visible: false},
support: {link:"support.html",text:"Support",visible: false},
activity: {link:"activity.html",text:"Activity",visible: false},
messages: {link:"messages.html",text:"Messages",visible: false},
faq:{link:"faq.html",text:"FAQ",visible: false},
logout: {link:"login.html",text:"Exit",visible: true}
},
header: {
headerDashboads: false,
headerReports: false,
headerSearch: false,
headerNotifications: false,
headerQuickactions: false,
headerUser: true,
headerSidebarToggle: false,
headerSessionConfiguration: false // NEW-ELEMENT.
},
content: {
contentHead: true,
contentTools: true,
contentTitle: 'BI DataLake Complaints',
contentHeadCss: '',
contentTitleCss: '',
contentDashboard: {
enabled: true,
dashboardName: 'BI DataLake Complaints',
changeTitle: true,
notification: false,
src: "https://dev-datalake.onesaitplatform.com/controlpanel/dashboards/viewiframe/632334ea-fea9-4f91-b146-dd2a3ddb1598",
background: '#FFF',
height: '850px',
mode: 'INSERT'
}
},
footer: {
footerCopyright: "2019 © IndraCompany BI Datalake by Minsait",
footerLinks: true,
footerLinkAbout: {link:"about.html",text:"About",visible: true},
footerLinkPrivacy:{link:"privacy.html",text:"Privacy",visible: true},
footerLinkTerms: {link:"terms.html",text:"Terms",visible: true},
footerLinkCompany:{link:"company.html",text:"Mindsait",visible: true},
footerLinkSupport:{link:"support.html",text:"onesait Support Center",visible: true}
},
themes:{
availableSkin: ['skin-light','skin-dark'],
changeSkin: 'skin-light',
contentBackground : 'ghostwhite',
contentPadding: '0px 0px', // 30px 30px;
menu: ''
}
};

Deployment

Once you have configured my template, you can open the login.html file from your computer and check that everything works.

...