Junos Space SDK > Developer Guides > Junos Space Application Developer Guide > Programming with the Junos Space SDK > Using the Junos Space SDK Plug-in

Creating Application Menus with the Module.xml Editor

The Junos Space SDK includes a module.xml editor for configuring the attributes in the XML files for the application module. The editor provides a GUI interface to the module.xml file through two tabbed pages: a Tree View and an XML View. You makes changes on the Tree View page and confirm how your changes appear in the file itself on the XML View page.

The Tree View page has two panes: A Tree View pane where you select a category for the attributes you want to configure, and a Details pane where you configure the attributes for the selected category. A Tree View page is shown below.

Nomenclature

The following terms and acronyms are used in the module.xml editor and in the descriptions of the editor in this page. They are listed in conceptual order.

Tree View

The Tree View pane is displayed below.

The Tree View nodes are described in the following table:



Tree View Nodes
all-apps Lists all the application modules appearing in the Application Chooser screen. An EAR file for the Junos Space application can expose multiple Application Chooser modules.
all-workspaces Lists all the workspaces in the application. A workspace is a set of functionalities (or tasks) that will be deployed. The workspace icon is located left of the Junos Space UI ribbon.
all-tasks Lists all the tasks defined in the application. Tasks can be assigned to a given workspace or to another task.
all-roles Lists all the roles defined in the application. A role is a set of capabilities that is assigned to a user or a group of users. For example, Administrator is a role, and a user assigned to this role typically is granted User Management, Device Management, and similar administrative capabilities.
all-capabilities Lists all the capabilities in the application. Capabilities are assigned to the user roles and tasks in the Module.xml editor. A capability is the ability to perform actions and is associated with roles. For example, User Management is the capability to perform user-related actions such as Add User, Remove User, and Edit User access rights.
all-mostates Lists all the managed object states associated with a given MOtype. MOstates are the various icon overlays that can appear on the Managed Object icon to indicate the state of the managed object. For example, a device icon can have different overlay images when the device is in the "Up," "Down," or "Synchronized" states.
all-motypes Lists all the managed object types defined in the application. Motypes are Managed Objects (such as devices or users) which appear as icons (images) in the Inventory Landing page. The MOtypes have different icons associated with them, depending on their Managed Object state (MOstate).
all-gadgets Lists the gadgets (visual elements, or widgets) that can be placed into a workspace.
all-guides Lists the help-based guides that allow a user to follow a sequence of tasks (guide-steps). The guides appear in the help panel to the right of the main Junos Space pane.
all-guide-steps A list of guide-steps. A guide is composed of a sequence of guide-steps to follow.

The attribute fields shown in the Apps Details pane change according to the type of node selected in the Tree view pane. The fields for each node type are described in the sections below:

all-apps

The Apps Details pane for the all-apps node is shown below:

The fields and controls of the Apps Details pane are described in the following table

Apps Details fields
Application The name of the application module. Note that a given Junos Space Application can have only one application module.
Application Setting URL The path to the UI component of the Modify Application's Setting dialog in the Manage Applications workspace of the module. Note that this is a shortcut or an alias for the above task within the application.
Application Choose Title The module's title as it appears in the Application Chooser and the Application Switcher.
Application Name The name of the application.
Application Tooltip Description The text that appears in a tooltip when the cursor pauses on the application icon in the Application Chooser carousel.
Home Task The task to go to when the user selects the application in the Application Chooser carousel.
Home Workspace The workspace of the Home Task.
Application Ribbon Title The title that appears to the right of the Junos Space logo in the application's top ribbon.
Application Icon The main Application Chooser icon you see in the Application Chooser screen and Application Chooser carousel.
Application Icon (Hover) The image used when the cursor pauses on the Application icon.
Application Tooltip Icon The icon that appears as a tooltip for the Application icon when the cursor pauses on it.
Home Icon The icon that appears as a Home button for the application on the right-hand side of the Junos Space UI ribbon.
Application Manager Icon The icon that appears in the applications card which is displayed in the Manage Applications screen.

In the module.xml editor, the app entries have attributes for "home workspace" and "home task". However, the entries that make use of these attributes are "not" apps but shortcuts (links) that allow a jump into part of an existing app.

For example, the platform app allows two such shortcuts: one for users and the other for devices. These appear to be two extra apps, however when clicking on them, the user jumps to specific ILPs in the platform. The combination of home workspace and home task determines the unique jump location. The Home Task and Home Workspace fields are optional. If these fields are not specified the top-level dashboard is shown when you click on the application. This is the same as what you see when clicking on the Home button, which is a programmatically-generated SLP consisting of all the Gadgets specified in the module.xml file).

all-workspaces

The Workspace Details pane is shown below:

The fields and controls of the Workspace Details pane are described in the following table:

Workspace Details fields
Workspace The name of the workspace, which is the workspace identifier.
Note: You cannot add workspace with the name "Dashboard" as it is not supported by Junos Space platform. If the application already has a workspace with the name "Dashboard" then you need to either delete or rename the workspace.
Description The reference-only workspace description field. This description does not appear in the Junos Space UI.
Help URL The URL to a specific HTML-based external help file to be uploaded. Browse to the appropriate location and click the Upload button. For more information refer to the "Adding Online Help to Junos Space Applications".
Workspace Landing Page Specifies the JavaScript file that renders the workspace landing screen in the Space UI. The fields are:
  • The Script Name field contains the name of the JavaScript file in the application that contains the code that renders the workspace landing page in the Space UI. Use the Upload button to load this JavaScript file.
  • The URL field displays path of the workspace landing page.
Workspace Title The title that appears under the Workspace icon in the Junos Space UI ribbon.
Workspace Tasks The list of tasks that is displayed in the Junos Space UI Workspace ribbon.
Workspace Icon The main workspace icon that appears on the left of the Junos Space UI Workspace ribbon.
Hover Icon The icon that appears when the cursor pauses on the workspace icon.
Select Icon The icon that appears when a user selects the workspace and moves the cursor away from the workspace icon in the Junos Space UI ribbon.
Small Icon The small icon that appears left of the Junos Space UI Workspace ribbon that represents this workspace in the list of icons for the other workspaces in the application module.

all-tasks

The all-tasks node lists all the tasks in the application. Tasks can be assigned to a given workspace or to another task. The Task Details pane is shown below.

The fields and controls of the Task Details pane are described in the following table:

Task Details fields
Task The task name, which is the task identifier.
Task Title The title that appears under the Task icon in the Junos Space UI ribbon.
Application Module The application module where the task is defined.
Workspace The parent workspace of the task.
Capability The capability required to see this task. If the user's role does not contain this required capability, the task will not appear in the ribbon or the Action Drawer.
Add To Ribbon When selected, the task is visible in the Space UI ribbon. If the task is not in the ribbon, it can still be seen in the Action Drawer on the Landing Page.
Is Enabled By Default When this checkbox is cleared, the task is hidden in the Space UI ribbon. It can be selected at a later time.
Step Task This task is part of a sequence of steps, or a wizard task. All tasks marked as step tasks are combined into the wizard. The sequence variable defines the order of the task in the wizard.
Parent Task Name Defines the parent task of the current task. The current task is placed in a hierarchy of tasks as the last child of the parent task. When a parent task is selected on the Space UI ribbon, all of its child tasks appear next to it.
Tool Tip A tooltip that appears when the cursor pauses on the Task icon in the ribbon. This feature is not currently functional.
UI Configuration Specifies the configuration that renders the Task screen in the Space UI. To configure the Task screen, use one of the following options:
  • JS Config - Specify the JS List, Parameters, CSS List, and other details that are used by the task implementation.
  • HTML Config - Specify the base HTML file that contains the task implementation.
Task Icon The main icon for the task.
Hover Icon The icon shown when the cursor pauses on this task's icon.
Select Icon The icon shown when a user selects the task and moves the cursor away from the task icon in the Space UI ribbon.

all-roles

User roles are assigned to a user in the User Management workspace in Junos Space. A role has a list of associated capabilities. The capabilities are then assigned to the tasks.

The Roles Details pane is shown below.

The fields and controls of the Role Details pane are described in the following table:

Role Details fields
Role The role name, which is the role identifier.
Role Title The title of the role as it appears in the User Management workspace in the Junos Space platform. In the User Management workspace you can view the roles assigned to the users, and can modify and create role assignments.
Application Module The application module where the role is defined.
Capabilities The list of capabilities that are available to be assigned to the role. To assign capabilities to this role, select one or more capabilities from this list and click Add Capabilities.
Selected Roles Capabilities The list of capabilities that are assigned to the role. To remove capabilities from this role, select one or more capabilities from this list and click Remove Capabilities.

all-capabilities

Capabilities are assigned to user roles and tasks in the module.xml editor. A user has view rights to a particular task only if he is assigned a role that includes a capability that is also one of the capabilities of that task.

The Capability Details pane is shown below.

The fields and controls of the Capability Details pane are described in the following table:

Capability Details fields
Capability The name of the capability, which is the capability identifier.
Capability Title The title of the capability as it appears in User Management in the Junos Space platform, where you can view which capabilities are assigned to roles. Capabilities can be assigned to roles only through the module.xml file or its editor.
Application Module The application module where the capability is defined.

all-motypes

MOtypes are Managed Objects (for example, devices or users) which appear as icons (images) in the Inventory landing page. The MOtypes have different icons associated with them, depending on their Managed Object state (MOstate).

The Manage Object Type Details pane is shown below.

The fields and controls of the Manage Object Type Details pane are described in the following table:

Manage Object Type Details fields
MOtype The path to the Java class of this managed object.
MOtype title A reference-only MOtype title which does not appear anywhere on the Space UI.
Application Module The application module where the MOtype is defined.
Description A reference-only MOtype description which does not appear anywhere on the Space UI.
MOStateMgrName The callback that the framework can invoke on the Junos Space application to discover the MO state, so that the framework can construct the composite icon on the fly.
Action Drawer Tasks The tasks that are listed in the Action Drawer when the user selects the managed object and pauses the cursor on the Action Drawer on the ILP.

all-mostates

The Managed Object states (MOstates) are states associated with a given MOtype. MOstates are icon overlays that appear on the managed object icon, with different icon images shown depending on the state of the managed object. For example, a device image might have different overlay images when the device is in the "Up," "Down," or "Synchronized" states.

The Manage Object States Details pane is shown below.

The fields and controls of the Manage Object State Details pane are described in the following table:

Manage Object State Details fields
MOType The MOtype associated with this MOstate.
State Variable The name of the variable in the MOtype class which represents the state of the MOtype.
State Value The value of the state variable associated with the given MOstate.
Image The overlay image (icon) associated with this MOstate. Icons can be either mutually exclusive or specified in the Image Overlay Order field.
Mutually Exclusive When selected, only one image is selected for the MOtype, even though other states might be associated with the MOtype. The MOstate that is selected is the one that appears first in the MOstates list.
Image Overlay Order Specifies the order in which multiple MOstate images are overlaid, one on top of the other. Only images that are not marked as "mutually exclusive" will be overlaid, when all their variables have the corresponding values.

all-gadgets

Gadgets are visual elements (widgets) that can be placed into a workspace.

The Gadgets Details pane is shown below.

The fields and controls of the Gadget Details pane are described in the following table:

Gadgets Details fields
Gadget The name of gadget, which is the gadget identifier.
Gadget Title For reference. Does not appear on the UI.
Application Module The name of the application module containing the gadget.
Workspace The workspace containing the gadget.
Width The width of the gadget panel.
Height The height of the gadget panel.
X The x-coordinate of the gadget panel relative to the main application panel.
Y The y-coordinate of the gadget panel relative to the main application panel.
Show in Dashboard The Boolean field that is set to 0 or 1 in the module.xml editor. This flag specifies whether the gadget shows up in the dashboard in addition to the SLP workspace.
Tool Tip The tooltip that is displayed when the cursor pauses on the gadget.
URL The URL pointing to the UIBuilder of the gadget.

all-guides

This is a help-based list of guides that allow a user to follow a sequence of tasks (or guide-steps). The guides appear in the help panel to the right of the main Junos Space pane.

The Guide Details pane is shown below.

The fields and controls of the Guide Details pane are described in the following table:

Gadgets fields
Guide Details The name of guide, which is the guide identifier.
Guide Title A reference-only title for the guide. This title does not appear in the UI.
Application Module The name of the application module containing the guide.
Guide Step A list of all the guide steps attached to the guide.

all-guide-steps

A guide defines the steps to be taken and the sequence of steps.

The Guide Step Details pane is shown below.

The fields and controls of the Guide Step Details pane are described in the following table:

Guide Step Details Fields
Guide Step The name of guide step, which is the read-only guide step identifier.
Guide Step Title A reference-only title for the guide step, which does not appear in the UI.
Help URL The URL to a specific page in an HTML-based external user guide, for example, which might be bundled in an application's RPM and be installed on an Apache web server.
Required When selected, indicates that the corresponding step is required.

The Image Upload Fields

The Apps Details, Workspace Details, and Tasks Details panes contain the following fields and controls for uploading and viewing icon images:

Each listed image type shows a text box, an Upload button, a Clear button, and one or more informational icons.

Specify an image file to upload for the icon in the text box. The Clear button clears the contents of the text box. The Upload button uploads the image specified in the text box.

Information Icons and their Meaning

The icons that can appear next to the controls are:

The Validation Error icon indicates that the image size is invalid. Pause on the icon to view an error message containing the required size for the image.
The Required Image icon indicates that image is a required field.
The Image Preview icon, when the cursor hovers over it, either displays the uploaded image or displays a message telling you to click the Upload button to preview the image.