[LogicMonitor.Dashboard:]UPDATED
Inserts a LogicMonitor Dashboard into the output document.
Purpose
Inserts a LogicMonitor Dashboard into the output document, which works by creating and running a Report in LogicMonitor.
Macro Compatibility
The macro can be used in all input document types and in Report Studio.
Usage
In PowerPoint output documents, you can insert into a shape by ID, or omit the ID and the Dashboard will be inserted into the shape that contains the macro. In Word output documents, you can insert into a shape by ID (and in this case optionally use insertHyperlink), or omit the ID and the Dashboard will be inserted directly into the document. For more information on using macros in PowerPoint, see: PowerPoint help.
What's New
(2025-05-23)Added the 'ViewportHeightPx' parameter.
Parameter | Type | Deprecation Message | Preferred Parameter | Presence | Purpose | Options | Default |
---|---|---|---|---|---|---|---|
String | Conditional | The Dashboard full path, e.g. Group 1/Subgroup/My Dashboard. Use either this or the 'dashboardId' parameter, but not both. | N/A | N/A | |||
Int32 | Conditional | The Dashboard ID to insert. Use either this or the 'dashboardFullPath' parameter, but not both. | N/A | N/A | |||
DateTimeOffset | Conditional | The end date to use - the equivalent of setting the end date on the report in LogicMonitor. When set, 'startDate' must also be set. Note: using the [DateRange:] macro currently has no effect on this macro. | N/A | N/A | |||
Double | Conditional | In Word / HTML output, the image height in centimetres. When set, 'imageWidthCm' must also be set. | N/A | N/A | |||
Double | Conditional | In Word / HTML output, the image width in centimetres. When set, 'imageHeightCm' must also be set. | N/A | N/A | |||
DateTimeOffset | Conditional | The start date to use - the equivalent of setting the start date on the report in LogicMonitor. When set, 'endDate' must also be set. Note: using the [DateRange:] macro currently has no effect on this macro. | N/A | N/A | |||
Color | Optional | Optionally use to specify the background Colour of the Dashboard. Use known colours (such as 'red') or # formatted (e.g. #RRGGBB or #AARRGGBB). |
|
Color [Transparent] | |||
Double | Optional | In Word / HTML output, the number of pixels to clip from the bottom. | N/A | N/A | |||
Double | Optional | In Word / HTML output, the number of pixels to clip from the left. | N/A | N/A | |||
Double | Optional | In Word / HTML output, the number of pixels to clip from the right. | N/A | N/A | |||
Double | Optional | In Word / HTML output, the number of pixels to clip from the top. | N/A | N/A | |||
String | Optional | Add a comment to make your document template more readable. The comment is discarded in the output document. | N/A | N/A | |||
String | Optional | The name of the Connection. | N/A | N/A | |||
String | Optional | In Word / HTML output, the description for visually-impaired users. This text also displays when the user hovers the mouse over the image in Word or a PDF viewer. | N/A | N/A | |||
Boolean | Optional | Should NCalc expression evaluation throw error on Overflow |
|
true | |||
Boolean | Optional | Whether to expand the legends of graph Widgets on the Dashboard output image. |
|
false | |||
String | Optional | The text to display should the macro fail to execute. Note that a poorly-specified macro (e.g. omitting mandatory parameters) will still result in an error message. | N/A | N/A | |||
PowerPointImageHorizontalAlign | Optional | For PowerPoint output only, the ability to horizontally align images produced by macros, with vertical lines. No other image parameters apply (clipping, etc.). |
|
N/A | |||
HorizontalPositionAlignment | Optional | In Word / HTML output, the horizontal position alignment. |
|
Left | |||
HorizontalPositionRelativeTo | Optional | In Word / HTML output, that the horizontal position is relative to. |
|
Inline | |||
String | Optional | The condition that must be true in order for the macro to be executed/evaluated. Must either evaluate to true or false, for example: "3+5=8" or "contains('abcd', 'z'). | N/A | true | |||
Boolean | Optional | When set, a hyperlink to the Dashboard will be added to the output image or shape in PowerPoint. In Word, the hyperlink is ONLY inserted when a shape is used (and the shapeId parameter is set. CTRL-click navigates to the URL. |
|
false | |||
Int32 | Optional | The maximum number of attempts when requesting data via the LogicMonitor API. |
|
N/A | |||
Int32 | Optional | The delay (in milliseconds) to wait before taking the 'screenshot' of the Dashboard. This gives them additional time to fetch data / render. | N/A | 2000 | |||
MacroMode | Optional | The mode in which variables are stored. In the legacy mode (default for Schedules), the variable created is a string and formatted. In the normal mode (default for Report Studio), the output variable is stored as a strongly-typed object, e.g. an Int32 or a List |
|
Legacy | |||
ObfuscationType | Optional | Obfuscation type. Use obfuscation to write reports where sensitive data is hidden. When used, ReportMagic guarantees that the same input string will map to the same output string for the whole of the report (but the next time the report runs, it will most likely map to a different value). If you use obfuscation, the property in your macro will not show up and instead, you will see a fake item of the obfuscation type chosen. |
|
None | |||
Double | Optional | In Word / HTML output, the image opacity (0 is transparent, 100 is solid). |
|
100 | |||
Double | Optional | In Word / HTML output, the page height percentage. To ignore this, you must set both the 'imageWidthCm' and 'imageHeightCm' parameters. |
|
N/A | |||
Double | Optional | In Word / HTML output, the page width percentage. To ignore this, you must set both the 'imageWidthCm' and 'imageHeightCm' parameters. |
|
100 | |||
ShapePictureFitType | Use instead of:
| Optional | When inserting into shapes (Word and PowerPoint), how the picture will fit to the shape: either cropped to fit (bottom of the Dashboard may be cropped), or stretched to fit. |
|
CropToFit | ||
ShapePictureFitType | Deprecated | pictureFitType | When inserting into shapes (Word and PowerPoint), how the picture will fit to the shape: either cropped to fit (bottom of the Dashboard may be cropped), or stretched to fit. |
|
CropToFit | ||
Int32 | Optional | The timeout (milliseconds) to wait for LogicMonitor when generating Reports. Some Reports may take a long time, in which case you can adjust the timeout value. The default is 10 minutes. | N/A | 600000 | |||
String | Optional | The shape to insert the image into. In PowerPoint, when no shape ID is specified and the macro is contained inside a shape, that shape will be used. To set a shape's ID (it can be any text) in its Alt Text field, right-click on the shape then choose View Alt Text to open the edit panel and enter the ID there. | N/A | N/A | |||
String | Optional | In Word / HTML output, the image title for visually-impaired users. | N/A | N/A | |||
Int32 | Optional | In Word / HTML output, the title heading level. Don't specify if no heading is required. | N/A | N/A | |||
Boolean | Optional | Whether to use the cache (where supported). |
|
false | |||
PowerPointImageVerticalAlign | Optional | For PowerPoint output only, the ability to vertically align images produced by macros, with horizontal lines. No other image parameters apply (clipping, etc.). |
|
N/A | |||
VerticalPositionAlignment | Optional | In Word / HTML output, the Vertical position alignment. |
|
Top | |||
VerticalPositionRelativeTo | Optional | In Word / HTML output, what the vertical position is relative to. |
|
Inline | |||
Int32 | Optional | Sets the viewport height in pixels. This represents the browser height that would be used to view the Dashboard, and should be set to a value that would show the full Dashboard without scrollbars. This is necessary because the Dashboard is actually captured by a 'virtual browser'. When the number is too small, the output image may show scrollbars, and if too large there may be unnecessary whitespace at the bottom. It is advisable to experiment to find the correct value. This parameter may be removed in future if the Dashboard rendering method changes. | N/A | 2500 | |||
Boolean | Optional | Whether to wait during LogicMonitor upgrades (i.e. execution essentially pauses). |
|
N/A | |||
String | Optional | If specified, adds a warning message for this macro. This is processed as an NCalc, and the warning message will ALWAYS be present and will be the value of the evaluated NCalc expression. | N/A | N/A | |||
Wrapping | Optional | In Word / HTML output, the image wrapping. |
|
Inline |
Examples (4)
Example 1:
This example inserts 3 Dashboards into the output document:
[LogicMonitor.DashboardGroupList: dashboardGroupFullPath=/, property=FullPath, recurse=true, =>FullPaths] [ForEach: values=`{FullPaths}`, storeAs=FullPath, take=3] [LogicMonitor.DashboardList: dashboardGroupFullPath=`{FullPath}`, property=Id, =>dashboardList] [ForEach: values={dashboardList}, storeAs=dashboards] [LogicMonitor.Dashboard: dashboardId={dashboards}] [EndForEach:][EndForEach:]
Example 2:
Insert a Dashboard (by ID) into a PowerPoint shape called 'MY SHAPE' (which is set in the shape's Alt Text):
[LogicMonitor.Dashboard: shapeId=MY SHAPE, dashboardId=205]
Example 3:
Insert a Dashboard (by ID) into a PowerPoint shape called 'MY SHAPE' (which is set in the shape's Alt Text) and crop the image:
[LogicMonitor.Dashboard: shapeId=MY SHAPE, dashboardId=205, pptxPictureFitType=CropToFit]
Example 4:
Insert a Dashboard (by full path) into Word:
[LogicMonitor.Dashboard: dashboardFullPath=/Folder 1/My Dashboard]