Console
The Console is the DreamFactory Enterprise management system, which can be used to setup servers, clusters, instances, users etc.
The Console UI is build with Blades, which is Laravel’s templating engine. The UI consists of five blades:
- Main (main.blade.php)
- Top Navbar (navbar.blade.php)
- Top Menu (topmenu.blade.php)
- Content Blade
- Sidebar Menu (sidebar-menu.blade.php)
The main blade (main.blade.php) is the main page file with HTML headers, includes and placeholders for the top navigation and content. The top navigation has a dropdown menu for easy user account access and for Console logout.
The content section is the blade specific to the selected page (e.g. Home, home.blade.php), and it has placeholders for the main (top) menu blade (topmenu.blade.php), the side menu blade (sidebar-menu.blade.php) and the page’s HTML.
The top menu and side menu are static, but have awareness of selected top/side menu, and highlights the selected menus.
Contents
File Structure
The layout files, like the main blade and menu blades, are located in /resources/views/layouts. The main blade is in the root of the folder and the menu blades etc. are in the partials folder.
The content blades are located in /resources/views/app. The default blade (e.g. servers.blade.php) is in the root of the folder, and the create/edit blades are in subfolders (e.g. servers/create.blade.php). Javascript functions are located in /public/js/blade-scripts, each content blade has a Javascript file in a subfolder (e.g. servers/servers.js).
Page load flow
The router handles loading of the pages, by routing the request to the appropriate resource controller, and the controller will then render the page. This is an example of how the Home page is loaded and rendered.
Home
The Home page contains a welcome message with an introduction video, and resource, support and license information. The welcome content is loaded from another domain, and injected with an iframe.
Route | HTTP Verb | Controller/Function |
---|---|---|
/v1/home | GET | HomeController@index() |
The Home page is different from the other pages. The sidebar menu is not loading other pages, but replacing the URL in the page’s iframe. The sidebar menu is build from the console link array in config/links.php.
Servers
DFE requires Web-, Database- and Application servers to host DreamFactory instances. The DFE Console doesn’t configure or install servers, but create the relationship between DFE and the servers.
The Console UI stores the configuration (URL, port, type, credentials etc.) of physical/virtual servers in the database table server_t. The server types are defined in the table server_type_t, and are by default Database, Web and Application.
eee