Abiquo tutorials for onboarding users
- 1 Enable or disable tutorials
- 2 IntroJs library
- 3 Architecture
- 3.1 Changes to Tutorial Architecture in 3.2.2
- 3.2 'tutorials' content folder in Abiquo 3.2.2 and above
- 3.3 'tutorials' content folder in Abiquo 3.2 to Abiquo 3.2.1
- 3.4 '{role_name}' folders
- 3.5 'tutorials.json' file
- 3.5.1 General attributes
- 3.5.2 Tutorials list array
- 3.5.3 Sample and screenshot
- 3.5.3.1 tutorials.json
- 4 Tutorial details
- 4.1 {tutorial_name}.json file
- 4.1.1 General attributes
- 4.1.2 Step attributes
- 4.2 Unique line
- 4.2.1 Sample
- 4.2.1.1 Tutorial sample file
- 4.2.2 List of clientUi events
- 4.2.1 Sample
- 4.1 {tutorial_name}.json file
- 5 How to find the element id/name
- 6 Troubleshooting tips
This documentation is deprecated
The Tutorials feature enables a system administrator to create custom tutorials for specific user roles.
The tutorial system enables you to provide information, focus on a specific Abiquo UI element, and require the user to perform an action in order to continue. Thus you can streamline the process of onboarding users with your own platform walkthroughs.
Events and tracers to monitor users working with tutorials will be added in a future version.
You can easily customize the sample tutorials or design your own following the instructions below.
Enable or disable tutorials
By default in new installations, tutorials are enabled and in upgraded environments, tutorials are disabled. Sample content is available in all environments.
Abiquo displays a tutorial on login when:
The Enable tutorials checkbox is marked in Configuration view
There is tutorial content in the folder for the user’s role on the UI server
The user has not marked the "Don't show me again checkbox" in their browser, which sets a cookie to not show the tutorials
Users can manually open the tutorials at any time by clicking the tutorials link at the bottom of the screen.
IntroJs library
This feature is based on the IntroJs library, which has been customized to fit our requirements.
Architecture
Changes to Tutorial Architecture in 3.2.2
In Abiquo 3.2.2 and above, the installation of the default Abiquo tutorials will backup the /var/www/html/ui/config/tutorials directory and replace it with a symbolic link to the /opt/abiquo/tutorials directory. However, Abiquo will read the tutorials from /var/www/html/ui/config/tutorials. You can change the symbolic link to point to your own tutorials directory, for example, /opt/abiquo/mytutorials.
The manual tutorial installation that you perform as part of the Abiquo 3.2.2 upgrade process will create a backup of the existing directory, a new default tutorials directory and a symbolic link to the default tutorials directory. You can then change this symbolic link to point to your own tutorials directory.
'tutorials' content folder in Abiquo 3.2.2 and above
Abiquo will read the tutorials from /var/www/html/ui/config/tutorials. This will be a symbolic link to the default Abiquo tutorials content folder or to your own custom content folder.
New tutorials content folder and symbolic link
From Abiquo 3.2.2, the default tutorials content folder has been moved to /opt/abiquo/tutorials and a symbolic link will be created from /var/www/html/ui/config/tutorials to /opt/abiquo/tutorials
Abiquo will create tutorials.backup with existing content as part of the tutorials install or upgrade process. To create your own tutorials content, create a new tutorials folder, for example, /opt/abiquo/mytutorials and create a new symbolic link from /var/www/html/ui/config/tutorials to your directory
The tutorials content folder is found under the default Abiquo install folder:
By default this will be: /opt/abiquo/tutorials/
This folder will contain a folder for each user role with a sample tutorial.
[root@mjspac /]# tree -d /opt/abiquo
/opt/abiquo
|...
|--- tutorials
|-- CLOUD_ADMIN
|-- ENTERPRISE_ADMIN
|-- USER
To create your own tutorials content, create a new tutorials folder, for example, /opt/abiquo/mytutorials and create a new symbolic link from /var/www/html/ui/config/tutorials to your directory. For example:
mkdir /opt/abiquo/mytutorials
ln -s /opt/abiquo/mytutorials /var/www/html/ui/config/tutorials
Apache configuration
Check the Apache configuration, which by default is at /etc/httpd/conf/httpd.conf. Within the directive /var/www/html/ui , in the Options line, you should enable FollowSymLinks by adding this as an option.
<Directory "/var/www/html/ui">
? ? ? ? Options MultiViews FollowSymLinks
'tutorials' content folder in Abiquo 3.2 to Abiquo 3.2.1
The tutorials content folder is found under the UI folder:
By default this will be: /var/www/html/ui/config/tutorials/
This folder will contain a folder for each user role with a sample tutorial.
'{role_name}' folders
For example, for the USER role, the tutorials folder contains a USER folder. This folder contains a file named tutorials.json and then a file for each tutorial you want the user to work through. You can see the user role at the bottom of the following filesystem diagram.
To create a new tutorial, for example for a role in your environment called CLOUD_USER, create a folder in the tutorials folder called CLOUD_USER.
See Manage Roles for more information about user roles.
'tutorials.json' file
This file will contain some information about the tutorials and the list of available tutorials. The file must be named tutorials.json, otherwise it will not work.
General attributes
Name | Type | Required | Description | Example |
---|---|---|---|---|
popupTitle | String | yes | This attribute specifies the tutorial popup title | "Abiquo tutorials" |
welcomeImgUrl | String | no | This attribute specifies if you want to display pictures in the header of the main tutorials page. The path can be absolute or relative | absolute: "http://blog.interdominios.com/wp-content/2008/abiquo.png" relative: "./config/tutorials/{image_name.extension}" |
welcomeText | String | yes | This attribute is for the main tutorial page description, to describe the tutorials, the company, and so on. You can use HTML tags | "Welcome to <strong>Abiquo</strong> Here is the list of all available tutorials" |
width | Number | yes | This atrribute specifies the tutorial popup width | 500 |
moreInfoUrl | String | no | If you specify a URL, then a help icon will appear in the tutorial popup, pointing to this attribute value | "http:// http://wiki.abiquo.com" |
tutorials | Array | yes | This is the tutorial list array (see below for more details) | [{"name": "Deploy my first application", "file": "deploy_first_vm"}] |
translationCodes | Object | no | For a multi-language tutorial popup, add this object with the label you want to translate | {} |
translationCodes. | String | no | Add this attribute if you want the title to be translated in multi-language environments. The value must match a translation code in related multi-language files (in lang/lang_en_US_custom.json for example) | "tutorials.popupTitle" |
translationCodes. | String | no | Add this attribute if you want the tutorial page description to be translated in multi-language environments. The value must match with a translation code in related multi-language files (in lang/lang_en_US_custom.json for example) | "tutorials.welcomeText" |
Tutorials list array
Name | Type | Required | Description | Example |
---|---|---|---|---|
name | String | yes | This is the name of the tutorial you want to display | "Deploy my first virtual machine" |
file | String | yes | This is the name of the file containing all tutorial information. This value must match with the tutorial file name | "deploy_first_vm" |
translationCode | String | no | This is for multi-language support. By default, the text displayed for each tutorial will be the name value. You can use this attribute to specify a translation code, but be sure to add the translation code (and its translation) in all required language files, otherwise it will not work correctly. | "tutorial.deploy_first_vm" |
Sample and screenshot
This is a sample of a tutorials.json file
tutorials.json
And a screenshot of the sample tutorials popup in Abiquo
Tutorial details
We saw how to create tutorials for a group of users (by adding content for their Role). Now let's see how to create new tutorials and how to configure them.
Previously, we saw that, in the tutorials.json file, you have to specify the list of available tutorials, by specifying each tutorial name and file. So now you have to create a JSON file for each tutorial, in the same folder where the tutorials.json is located.
{tutorial_name}.json file
This file must be located in /config/tutorials/{ROLE_NAME}/
General attributes
Name | Type | Required | Description | Example |
---|---|---|---|---|
steps | Array | true | This is the list of tutorial steps, step attributes are listed below | [{"intro":"Welcome to Abiquo's first tutorial"}] |
- | - | - | - | - |
As you can see, for now the only attribute should be the steps one, in future releases we will probably add more attributes to improve this feature
Step attributes
Name | Type | Required | Dependency* | Description | Example | Screenshot |
---|---|---|---|---|---|---|
intro | String | true | - | This is the only required element and it can be used alone. This is the text displayed to explain the current step. | "Welcome to <strong>Abiquo</strong><br>The objective of this tutorial is to help you deploy your first <strong>virtual machine</strong><br>You will see that it's very easy and quick :)<br><strong>Let's start!</strong>" | |
translationCode | String | no | - | This is for multi-language support. By default, the text displayed for each description will be the intro value. You can use this attribute to specify a translation code, but be sure to add the translation code (and its translation) in all required language files, otherwise it will not work correctly. | "tutorial.step.1" | |
element | String | no | - | The javascript library is designed to highlight a specific UI element, and add a description of this element. This attribute is used to select an HTML element to highlight. Be careful of the following format restrictions:
See #How to find the element id/name ------------------------------------------------------------------------------------------------------- IMPORTANT: element by name To identify an element by its name, use the following identifyElementBy attribute. Then specify the element attribute with its exact name (you don't need to use # or \\) ------------------------------------------------------------------------------------------------------- HTML element example: <a id="element.id" name="element_name">I'm a simple link</a> Search by id element: "#element\\.id" Search by name element: "element_name", | "#virtualdatacenters\\.tab" | |
identifyElementBy | String | no | - | This attribute is used to specify that the element should be identified by something other than the id. At the moment, name is the only option. If you don't use this attribute (default behavior), the element will be identified by id. | name | |
subElement | Object | no | - | This attribute is used to specify another view element, different from the element to receive the user interaction (see actionType). The format should be as in the element format. Example
| ||
subElement. | String | required if | subElement |
| "#vdc\\.vapp\\.enter\\-0" | |
subElement. | String | required if | subElement | This attribute is used to specify that the sub-element should be identified by something other than the id. At the moment, name is the only option. If you don't use this attribute (default behavior), the sub-element will be identified by id. | name | |
actionType | String | required if | element | This attribute can control the user action before going to the next step. If you don't specify it, the Next button will always be active and the interaction with the user will be poor. The actionType can have three values:
| "onclick" | |
position | String | required if | element | This attribute is for positioning the description element related to the element. Values can be:
| "bottom" (In the previous element screenshot, you can see that the description is placed at the bottom of selected element) | |
blockPrevious | Boolean | no | - | By default, in the description zone, you have three buttons: Exit, Previous and Next. All buttons are available for each step (except Previous in the first step and Next in the last step). With this attribute, you can block the Previous button in specific steps, which can be useful in some cases, for example, when you ask the user to click a button to change the a main view, and you don't want the user to go back to the previous view. You can also block the Next button, for details, please see the actionType attribute | ||
delayBeforeNextItem | Number | no | - | This attribute can be used to add a timeout before going to the next step. When the library goes to the next step, the next element should exist in the view, otherwise the tutorial will fail. This attribute is very helpful when you are changing the current view and it's necessary to wait until the next element is retrieved from the database and loaded. The value is in milliseconds | 1000 | |
skipStep | Object | no | - | Some steps can be skipped, for example, if the user already did the tutorial, or if a step needs an element to be created, but the element already exists. | "skipStep":{ | |
skipStep. | String | required if | skipStep | This attribute is to check if an element exists. You can specify the element name or id (check the identifyElementBy attribute) | "vapp" | |
skipStep. | String | required if | skipStep | Use this attribute to specify if the existingElement should be located by name or by id | "name" | |
skipStep. | Number | required if | skipStep | Specify the number of steps to skip if the existingElement is located (the minimum is 1, means to skip this step and go to the next one) | 2 | |
- | - | - | - | - | - |
Sample
Here you can find a sample of a tutorial file
Tutorial sample file
List of clientUi events
Here you can find some most useful clientUI events
allocationRule.created
allocationRule.edited
allocationRule.deleted
volume.created
volume.edited
volume.deleted
category.created
category.edited
category.deleted
templateDefinitions.created
templateDefinitions.deleted
virtualDatacenter.created
virtualDatacenter.edited
virtualDatacenter.deleted
virtualAppliance.created
virtualAppliance.edited
virtualAppliance.deleted
user.created
user.edited
user.deleted
storagePools.created
storagePools.edited
storagePools.deleted
storageDevices.created
storageDevices.edited
storageDevices.deleted
physicalMachine.created
physicalMachine.discovered
physicalMachine.edited
physicalMachine.deleted
racks.created
racks.edited
racks.deleted
virtualmachine.created
virtualMachine.edited
virtualMachine.deleted
scope.created
scope.edited
scope.deleted
role.created
role.edited
role.deleted
remoteServices.created
remoteServices.edited
remoteServices.deleted
networkServiceType.created
networkServiceType.edited
networkServiceType.deleted
networks.created
networks.edited
networks.deleted
publicip.created
publicip.edited
publicip.deleted
enterprise.created
enterprise.edited
enterprise.deleted
datacenter.created
datacenter.edited
datacenter.deleted
license.created
license.requested
How to find the element id/name
You can find an element's id or name using your browser. The following sections explain how to do this on Chrome and Firefox, but you can use another browser, inline UI analyzer or whatever software you want.
Chrome
First, open the clientUI in your browser and then press CTRL + ALT + i to open the Developer tools.
Then click Elements tab, then the inspector icon and select the element that you want to find out the id/name of.
In this example, you can see that the element has the id = vapp.vm-0 so you can use it as the element attribute.
Firefox
First, open the clienUI in your browser and then press F12 to open the Developer tools.
Then click Inspector tab, then the inspector icon and select the element you want to know its id/name
In this example, you can see that the element has the id = vapp.vm-0 so you can use it as the element attribute.
Troubleshooting tips
'Next' button is not enabled when current step is done
When creating a new tutorial or even with the bundled ones, in some cases you may experience that 'Next' button is not enabled when current step is done. The Tutorials API expects to find elements like the ones described above to show appropriate dialog boxes but if tutorial dialog box is loaded before all the page content has been loaded, you may experience this issue.
To determine if this issue affects your system, you can open the browser JavaScript console and look for the following error message:
Uncaught TypeError: Cannot read property 'offsetWidth' of null
If you see this error, you can easily work around it by adding a delay attribute to the tutorial element step.
For example, in the following step, the tutorial is expecting to find the virtualdatacenters tab:
Virtualdatacenter's element
If the 'Next' button is not enabled and the error described above is shown, simply add delayBeforeNextItem attribute to the element, specifying a delay in milliseconds. For example:
Virtualdatacenter's element
This will be enough to resolve the issue.
It is up to you specify a suitable delay value depending on the screen and tutorial step, but it would be better to set higher delays than lower ones in order to avoid problems.
Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved