spec.json description
The spec.json file in an extension defines the additions and deletions the extension makes to the default IBM® Cognos® Analytics user interface. The structure and contents of this file are explained here.
The structure and contents that are described here are provisional. They can change in future releases of Cognos Analytics. These changes may not be backward compatible.
name
- Specifies the name of the extension. The name can contain alphanumeric characters, underscores
(
_
), and spaces ( schemaVersion
- Specifies a numeric value for the schema version. Can be
1.0
or2.0
. The default value is1.0
. extensions
- Contains an array of
perspective
objects.perspective
- Specifies the view that is being extended. The options are the following.
common
- Applies to all views.
<view_name>
- Applies to the
<view_name>
view, which can be a built-in view (home
,authoring
,dashboard
, ormodeller
) or an uploaded view.
type
- If the extension is a view, specifies the type. The possible values are
login
for a sign-in view andhome
for a home view. This element is only used in schema version 2.0. If it is omitted and schema version 2.0 is specified, then the view is not included in the list of possible default home or sign-in views. excludeCommon
- Specifies whether view contributions are received from the /common folder.
The possible values are
false
to receive all contributions ortrue
to receive no contributions. Any missing contributions can be added to the extension. lensable
- If
false
, this view is not included in the list of views for which features can be omitted. For more information, see Customizing roles.The default value is
true
. comment
- An optional comment.
features
- Contains an array of feature groupings.
id
- Specifies the unique identifier of the feature.
toolItems
- Contains an array of user interface elements that are being added.
id
- The unique identifier for the new user interface element.
containerId
- Specifies the placement of the user interface element.
-
If the user interface element is a menu or a button, the element is located in the application or navigation bars as shown in the following graphic.
The values of
containerId
corresponding to the button or menu placement are shown in the following list.com.ibm.bi.glass.navbarLeadingGroup
com.ibm.bi.glass.navbarTrailingGroup
com.ibm.bi.glass.appbarLeadingGroup
com.ibm.bi.glass.appbarCenterGroup
com.ibm.bi.glass.appbarTrailingGroup
-
If the user interface element is a menu item, the value of
containerId
is theid
of the menu that contains the menu item.
-
label
- Specifies the text label for the user interface element. This text cannot be localized.
type
- Specifies the user interface element type. The possible values are shown here.
Button
Menu
MenuItem
icon
- Specifies the user interface element image to be displayed. The path is relative to the image file in the extension zip archive.
weight
- Specifies a numeric value that determines the placement of the user interface element in the container. A higher value moves up the element in the container.
push
- Specifies whether when the button is pressed a second time, the action of the first press is
undone. For example, opening and then closing a folder. The value can be
true
orfalse
. The value must betrue
for a button that opens a folder. coachMark
- Specifies a coach mark.
- title
- Specifies the title of the coach mark.
contents
- Specifies the contents of the coach mark.
actionController
- Specifies the action to be taken when the user interface element is clicked. The available
actions are listed here.
bi/glass/api/IFrameOpener
- Opens a web page.
bi/glass/api/ReportOpener
- Opens a particular report.
bi/glass/api/DashboardOpener
- Opens a particular dashboard.
bi/glass/api/FolderOpener
- Opens a particular folder.
v1/ext/<name>/js/controllers/controller_name
- Runs the custom controller that is packaged in the extension. The controller is the file js/controllers/controller_name.js.
options
- Contains an array of options to pass to the action controller. The options vary depending on which action controller is used. For the options used by the built-in action controllers, see Using built-in action controllers.
collectionItems
- Contains an array of user interface elements that are being added.
containerId
- Specifies where the user interface element is located.
id
- Specifies the unique identifier of the user interface element.
content
- Contains definitions for a view.
type
- Contains a link to the JavaScript file to run when this view is invoked.
options
- Contains parameters to be passed to the JavaScript file.
cssStyles
- Contains an array of links to .css files to be used for this view.
excludeFeatures
- Contains an array of ids of user interface features to exclude. This feature cannot be applied
to the
common
view. excludeItems
- Contains an array of ids of user interface items to exclude. This feature cannot be applied to
the
common
view.