Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Expand
Table of Contents

Create A Portal

...

Create a portal

1. Log in to the ClearBlade Platform and select the system

...

you wish to link to a portal.

2. Navigate to the

...

Portals button on the sidebar or menu of the developers console.

3. Create a new portal by clicking + Add.

4. Enter

...

your portal’s description.

...

Assign roles

Click the  next the gear icon next to your new portal and select Edit Roles in order to give permission for our Roles to permit users to access and edit the portal.

...

If you have no users, add them in Users. Giving the authenticated role access to read will allow these users to log in and operate a portal. By giving administrator roles CRUD access, they will be able to can modify the portal that will to reflect in the public view.

...

Access a portal

Now that we have access to open a portal, click Click the portal’s link and log in with an administrator’s credentials.

...

Welcome to your portal!

...

Delete a portal

...

Click the  next to your new portal and select Settings

...

1. Select Settings.

...

2. Click Delete Portal. Confirm the deletion when prompted.

...

Datasources

1. Click

...

Add Datasource+

...

in the side editor.

2. Complete the datasource information

...

in the

...

popup window. In this case

...

, use a ClearBlade collection

...

you created previously.

3. Click

...

Apply, and the datasource and

...

its last update will appear in the side editor. It can also be used in a widget under

...

Dynamic.

...

Panes

Create a pane

1. Click

...

the

...

+

...

button on the side editor’s top toolbar

...

. A dropdown will appear.

...

Choose ‘New Pane’

...

2. Choose New Pane.

...

A pane should will appear in the portal.

Edit pane

1. Click the wrench icon of the pane you wish to edit.

...

Pane fields

Title

Optional title for the paneThe pane’s optional title

Hide Header

Removes Headerheader

Hide Borders

Removes Bordersborders

Tabbed Pane

Whether or not the pane will contain tabs

Theme

The pane’s theme type of theme for the pane (Primary primary or Secondarysecondary)

Pane ID

A The pane’s unique ID for the pane. Useful when switching tabs programmatically.

Resize pane

Click the resize handle on the pane’s bottom right corner or the pane and drag it to the desired shape.

...

Delete pane

1. Click the trashcan button on the pane you wish to delete.

2. Confirm deletion when prompted.

...

Widget

For tutorial on each widget, click here

...

1. Add a pane before adding a widget.

2. Click the

...

+

...

button on the pane header toolbar.

3. Choose a widget type

...

and edit it in this window.

4. Click

...

Apply to save the changes.

...

Edit/

...

delete widget

Hover over the widget and click on the wrench icon to edit. To delete, click on Click the trash can icon to delete.

...

Import widget

There is also an option to You can import widget configurations. Create and save a widget first.

...

Flyout pane

Open the flyout menu

Click on the hamburger icon on the header’s left-hand side of the header.

...

Customize the menu title

Hover over the menu title and click the wrench icon.

...

The menu title defaults to the portal’s name of the portal but can be configured like any widget.

Add menu widgets

Click the plus icon on the header bar’s left-hand side of the header bar

...

.

...

Edit menu widgets

Widgets can be edited in the same way that like they are edited inside of a normal pane.

Header

...

pane

Add a widget to the header

Click on the + button on the side editor’s top toolbar of the side editor. A dropdown will appear.

...

Choose ‘New New Header Widget’Widget.

A pane should appear in the portal.

Edit header widget

Hover over the widget you wish to edit and click the wrench icon.

...

Reset header to default

Click the ‘…’ ellipsis in the side editor toolbar and select ‘Reset Reset Header to Default’Default.

...

Pages

Create a page

Hover over ‘Pages’ Pages on the side editor and click the +.

...

Fill in the page’s name of the page and click ‘Apply’Apply.

...

Edit/

...

delete page

Click on the pencil icon of the page you wish to edit.

Click on the trash can icon of the page you wish to delete.

...

Adding children to the page

1. Click

...

the plus button of the page you wish to add a child page.

...

2. Add name and parameters.

...

3. Save the child page by clicking Apply.

The parameter’s default value for the parameter will be used when navigating to the page.

...

Programmatic interaction

The portal provides an interface via the CB_PORTAL object for interacting with pages from within a parser, widget, or datasource.

Selecting a page programmatically

CB_PORTAL.selectPage("/states/TX/city/Austin")

Example use case:

User The user selects a state from a list of states so the portal should navigate navigates to a new page.

Retrieving the current path parameters

CB_PORTAL.getPathParams() // will return {"state": "TX", "city": "Austin"} if the current path is "/states/TX/city/Austin"

Example use case:

1. The current page changes, so the portal should display data

...

relevant to the URL parameters.

2. The portal

...

must load the correct state on initial startup when the URL is /states/TX/city/Austin.

Edit/

...

delete page

Click on the pencil icon of the page you wish to edit.

Click on the trash icon of the page you wish to delete. Confirm deletion when prompted.

...

Modals

1. Hover over

...

Modals on the side editor and click the

...

+

...

.

2. Give it a name

...

and size, and choose to make it draggable

...

and close on click outside

...

.

...

 Draggable:

...

allows the

...

modal to drag

...

around the portal.

...

Close on click outside: allows modals to close when the user clicks away from them.

...

 You cannot select close on click if you make the modal

...

draggable. There will be tips in the modal as a default. You can hover over these and edit the widget by clicking the wrench.

3. You can

...

add more widgets by clicking

...

+ Add

...

Widget next to the modal.

4. To edit or delete

...

the modal, hover over the name in the side editor and click

...

the pencil or trash can, respectively.

...

Internal

...

resources

Internal resources can be added in the toolbar on the right in of the portal.

...

There are two ways to add an internal resource:

  • In the internal resource parser

  • Importing a file

Parser

Click ‘Add Add Internal Resource’ Resource, and a ‘New File’ New File modal will appear. Give your file a unique name, choose whether it is a JS or CSS file, and type in the code. There is an option to test before saving the changes.

Type

Parser

Appearance

JS

Image ModifiedImage Modified

CSS

Image ModifiedImage Modified

Import

...

file

Click ‘Import Files’ Import Files and choose the file(s) from your computerdevice.

After being created, they should be listed in the ‘Internal Resources’ Internal Resources section. From there, the file(s) can be exported and searched.

...

Add

...

more files

To add more files, hover over ‘Internal Resources’ Internal Resources and click on ‘ +.

...

Export

...

files

Mark the checkbox of the file(s) you want to export and click ‘Export Files’Export Files.

Delete

...

files

To delete files, hover over the file you want to remove and click on the trashcan icon.

...

External

...

resources

External resources can be added in the toolbar on the right in of the portal.

...

In the example we will be using a CSS URI example A CSS URL from Font Awesome Icons will be used in the example. The icons can be found here.

Make sure to add Add the HTML widget to the portal before continuing with the example.

Copy the URL (https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.css) and add it to the box that appears after clicking ‘Add Add Resource +.

Hit the enter key to add the resource.

...

There is a checkbox option to do ‘Block Widget Render’ block widget render if there is an import error.

Go to the HTML widget edit and copy/paste the code below in into the HTML parser:

Code Block
<div class="text-center underline">
  <h2>Address</h2>
  <i class="fas fa-address-book fa-7x"></i>
</div>

HTML

...

This should appear in the widget:

...

To delete, hover over the resource and the click on the trash can icon that appears.

...

Parser

The parser can be found in on the widget edit page to configure widget.

1. Open the widget edit window.

2. Click on ‘Edit static data’ 3Edit static data.

3. The parser will open a window where you can customize your widget data. On the right side of the parser, the changes you make will appear when you click ‘Test’  4. Click ‘Apply’ When you click Test, your changes will appear on the parser’s right side.

4. Click Apply to save the changes.

...

Screen

...

size editor

This guide assumes that panes and widgets have already been added to your portal.

1. Select the screen size you’d like to change the layout for by clicking the toolbar’s section

...

at the top of the screen.

2. Adjust the layout by resizing your panes and

...

widgets.

...

Theme

...

editor

Macro

  • Choose between a standard or night base -based theme.

  • Choose different color themes using a palette.

  • Change the colors of the graph elementsgraph element colors.

...

Micro

Change the color palette by portal element.

...

Plugins

Create a plugin

Plugins can be created in on the portals page. Click + Add.

...

Enter the your plugin name and URL for your plugin.

...

The plugin should appear under the ‘Plugins’ Plugins tab.

...

Clicking on the plugin will take you to the URL.

Settings

Go to the gear next to the Plugin plugin and click ‘Settings’Settings.

...

The name cannot be edited, but the URL can be as well as copied.

The plugin can also be deleted from this window.

To save changes, click , ‘Update’Update.

Export

Plugins can be exported all at once or one at a time or all at once.

All at once:

...

One at a time:

Go to the gear next to the plugin and click ‘Export’Export:

...

Click ‘Export Export as JSON’JSON.

...

Click Download {Plugin Name}, and a zip ZIP file will be downloaded onto the computeryour device.

...

Click ‘Done’ Done when finished.