Groovy API reference

Widget

4 minute readReference

createWidget

Creates a new widget.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

dashboardName

String

(Required) Unique name of the dashboard within the project.

widgetName

String

(Required) The name of the dashboard widget.

actualParameters

Map

Actual parameter values for the parameters defined on the widget’s report.

afterWidget

String

The name of the widget after which this widget should be placed.

attributeDataTypes

Map

Widget parameters used by UI to control data types of attributes.

attributePaths

Map

Widget parameters used by UI to control paths of attributes.

beforeWidget

String

The name of the widget before which this widget should be placed.

colorRanges

String

The JSON with color ranges definition for the widget.

colors

Map

Color map used when rendering the widget. The usage of the color map depends on the widget’s visualization type.

column

String

The column in a COMMAND_CENTER dashboard that the widget belongs to. Required for a COMMAND_CENTER dashboard widget unless the widget section is SUMMARY in which case it is not applicable.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

iconUrl

String

The icon to display for the widget.

linkParameters

Map

Widget parameters used by UI to construct the drill-down link for the widget.

linkTarget

String

Determines the page to navigate to when the user drills down through the dashboard widget.

orderIndex

Integer

Specifies the relative display order for the widget.

reportName

String

Name of an existing report backing the widget.

reportProjectName

String

Set if the report is in a different project than the dashboard.

section

WidgetSection

The section of a COMMAND_CENTER dashboard to display the widget in. Applicable for a COMMAND_CENTER dashboard widget.

title

String

The title to display for the widget. If not set, use the report title.

visualization

WidgetVisualization

Type of visualization data in the widget.

visualizationProperties

Map

Properties or settings used by the widget’s visualization type.

Positional arguments

projectName, dashboardName, widgetName

Usage

ec-perl

$cmdr->createWidget(<projectName>, <dashboardName>, <widgetName>, {<optionals>});

ectool

ectool createWidget projectName dashboardName widgetName [optionals]

deleteWidget

Deletes a widget.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

dashboardName

String

(Required) Unique name of the dashboard within the project.

widgetName

String

(Required) The name of the dashboard widget.

Positional arguments

projectName, dashboardName, widgetName

Usage

ec-perl

$cmdr->deleteWidget(<projectName>, <dashboardName>, <widgetName>);

ectool

ectool deleteWidget projectName dashboardName widgetName

getWidget

Retrieves a dashboard widget by name.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

dashboardName

String

(Required) Unique name of the dashboard within the project.

widgetName

String

(Required) The name of the dashboard widget.

Positional arguments

projectName, dashboardName, widgetName

Usage

ec-perl

$cmdr->getWidget(<projectName>, <dashboardName>, <widgetName>);

ectool

ectool getWidget projectName dashboardName widgetName

getWidgets

Retrieves all dashboard widgets for dashboard.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

dashboardName

String

(Required) Unique name of the dashboard within the project.

Positional arguments

projectName, dashboardName

Usage

ec-perl

$cmdr->getWidgets(<projectName>, <dashboardName>);

ectool

ectool getWidgets projectName dashboardName

modifyWidget

Modifies a widget.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

dashboardName

String

(Required) Unique name of the dashboard within the project.

widgetName

String

(Required) The name of the dashboard widget.

actualParameters

Map

Actual parameter values for the parameters defined on the widget’s report.

afterWidget

String

The name of the widget after which this widget should be placed.

attributeDataTypes

Map

Widget parameters used by UI to control data types of attributes.

attributePaths

Map

Widget parameters used by UI to control paths of attributes.

beforeWidget

String

The name of the widget before which this widget should be placed.

clearAttributeDataTypes

Boolean

Whether or not to clear attribute data types for the widget.

clearAttributePaths

Boolean

Whether or not to clear attribute paths for the widget.

clearColors

Boolean

Whether or not to clear color for the widget.

clearLinkParameters

Boolean

Whether or not to clear link parameters for the widget.

clearVisualizationProperties

Boolean

Whether or not to clear visualization properties for the widget.

colorRanges

String

The JSON with color ranges definition for the widget.

colors

Map

Color map used when rendering the widget. The usage of the color map depends on the widget’s visualization type.

column

String

The column in a COMMAND_CENTER dashboard that the widget belongs to. Required for a COMMAND_CENTER dashboard widget unless the widget section is SUMMARY in which case it is not applicable.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

iconUrl

String

The icon to display for the widget.

linkParameters

Map

Widget parameters used by UI to construct the drill-down link for the widget.

linkTarget

String

Determines the page to navigate to when the user drills down through the dashboard widget.

newName

String

The new name for an existing object that is being renamed.

orderIndex

Integer

Specifies the relative display order for the widget.

reportName

String

Name of an existing report backing the widget.

reportProjectName

String

Set if the report is in a different project than the dashboard.

section

WidgetSection

The section of a COMMAND_CENTER dashboard to display the widget in. Applicable for a COMMAND_CENTER dashboard widget.

title

String

The title to display for the widget. If not set, use the report title.

visualization

WidgetVisualization

Type of visualization data in the widget.

visualizationProperties

Map

Properties or settings used by the widget’s visualization type.

Positional arguments

projectName, dashboardName, widgetName

Usage

ec-perl

$cmdr->modifyWidget(<projectName>, <dashboardName>, <widgetName>, {<optionals>});

ectool

ectool modifyWidget projectName dashboardName widgetName [optionals]

moveWidget

Moves a widget within a dashboard.

Arguments

Argument Name Type Description

projectName

String

(Required) The name for the project that must be unique among all projects.

dashboardName

String

(Required) Unique name of the dashboard within the project.

widgetName

String

(Required) The name of the dashboard widget.

beforeWidget

String

The name of the widget before which the widget should be placed. Blank to move the widget to the last position in the specified section or phase.

column

String

The column in a COMMAND_CENTER dashboard to display the widget in. Applicable only for COMMAND_CENTER type of dashboard.

section

WidgetSection

The section of a dashboard to display the widget in. Applicable only for COMMAND_CENTER type of dashboard. Required if column is not set.

Positional arguments

projectName, dashboardName, widgetName

Usage

ec-perl

$cmdr->moveWidget(<projectName>, <dashboardName>, <widgetName>, {<optionals>});

ectool

ectool moveWidget projectName dashboardName widgetName [optionals]