class %DeepSee.UserPortal.DashboardViewer
extends %DeepSee.UserPortal.standardPage, %CSP.Portal.SourceControl.Base
The DeepSee DashBoard viewer page.
This page displays a saved DeepSee dashboard.
Invoke this page using the URL:
_DeepSee.UserPortal.DashboardViewer.zen?DASHBOARD=dashboardname
Where dashboardname is the full name of the dashboard: e.g.,
"folder/name.dashboard"
This class should be considered as *internal*; subclassing is not supported.
parameter JSINCLUDES = "zenCSLM.js,zenESVG.js,DeepSee.js,dsparser.js";
Pick up formula code.
parameter PAGENAME = "Dashboard Viewer";
Name of this page.
parameter WORKLIST1MODE = "group";
Starting mode for worklist 1: html or group.
property %dashboard
as %DeepSee.Dashboard.Definition(XMLPROJECTION="none");
Instance of dashboard definition.
property autosave
as %ZEN.Datatype.string(ZENURL="AUTOSAVE");
Token to load unsaved pivot state
property autosaveOverride
as %ZEN.Datatype.string;
Token to ignore autosave behavior (used with "Clear My Settings")
property dashboardBookCover
as %ZEN.Datatype.string;
Book cover spec of the currently displayed dashboard.
property dashboardCategory
as %ZEN.Datatype.string;
Category for the currently displayed dashboard.
property dashboardDescription
as %ZEN.Datatype.string;
Description of the currently displayed dashboard.
property dashboardGridCols
as %ZEN.Datatype.integer [ InitialExpression = 2 ];
Is dashboard uses snap grid, then this is then number of grid columns.
property dashboardGridRows
as %ZEN.Datatype.integer [ InitialExpression = 2 ];
Is dashboard uses snap grid, then this is then number of grid rows.
property dashboardKeywords
as %ZEN.Datatype.string;
Keywords for the currently displayed dashboard.
property dashboardLocked
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Locked state of the currently displayed dashboard.
property dashboardModify
as %ZEN.Datatype.boolean(ZENURL="MODIFY") [ InitialExpression = 1 ];
Does this dashboard allow the user to modify widgets.
property dashboardName
as %ZEN.Datatype.string(ZENURL="DASHBOARD");
Name of the currently displayed dashboard.
Use XDASHBOARD to use a session encrypted value for this.
property dashboardOwner
as %ZEN.Datatype.string;
Owner of the currently displayed dashboard.
property dashboardPublic
as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
Public state of the currently displayed dashboard.
property dashboardResize
as %ZEN.Datatype.boolean(ZENURL="RESIZE") [ InitialExpression = 1 ];
Does this dashboard allow the user to move and resize widgets.
property dashboardResource
as %ZEN.Datatype.string;
Resource for the currently displayed dashboard.
property dashboardSnapGrid
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, the dashboard uses the new snapGrid desktop and ignores the
the dashboardSnapTo property.
property dashboardSnapTo
as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
Is dashboard in "snap to" mode.
property dashboardTitle
as %ZEN.Datatype.string;
Title of the currently displayed dashboard.
property dashboardTitleLocal
as %ZEN.Datatype.string;
Localized title of the currently displayed dashboard.
property nonce
as %ZEN.Datatype.string(ZENURL="NONCE");
This is used when launching a dashboard from an email alert.
property pdfPreserveTempFiles
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Debugging property. Setting this to true will prevent the pdf viewer from deleting
temporary files used for printing when launched.
property printMarginBottom
as %ZEN.Datatype.string [ InitialExpression = "0.5in" ];
Container for the page's bottom margin when printing widgets in multi-print mode.
property printMarginLeft
as %ZEN.Datatype.string [ InitialExpression = "0.5in" ];
Container for the page's left margin when printing widgets in multi-print mode.
property printMarginRight
as %ZEN.Datatype.string [ InitialExpression = "0.5in" ];
Container for the page's right margin when printing widgets in multi-print mode.
property printMarginTop
as %ZEN.Datatype.string [ InitialExpression = "0.5in" ];
Container for the page's top margin when printing widgets in multi-print mode.
property printMasterWidgetId
as %ZEN.Datatype.string;
If the dashboard is in multi-print mode, there is master widget which defines the
page margins and other overall settings in the pdf report. This property is the container
for the reference to that widget.
property printPageOrientation
as %ZEN.Datatype.string [ InitialExpression = "portrait" ];
Container for the page orientation when printing widgets in multi-print mode.
property printPageSize
as %ZEN.Datatype.string [ InitialExpression = "8.5x11 in" ];
Container for the page size when printing widgets in multi-print mode.
property readOnly
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
If true, user cannot modify the current dashboard.
property saveAction
as %ZEN.Datatype.string;
Container for the current save mode for source control.
property selectedTitleBarColor
as %ZEN.Datatype.color(XMLPROJECTION="attribute");
Specify color of title bar for selected widgets.
property selectedTitleBarOpacity
as %ZEN.Datatype.float(XMLPROJECTION="attribute");
Specify opacity of title bars for selected widgets.
property selectedTitleBarTextColor
as %ZEN.Datatype.color(XMLPROJECTION="attribute");
Specify color of title bar text for selected widgets.
property showTitleBar
as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
If true, widgets display a title bar.
property tempFileToken
as %ZEN.Datatype.string;
When creating multiple temp files, a token is generated that is unique to the
CSP session. Temporary files incoporate this token to avoid concurrency problems.
property tempStorageRoot
as %ZEN.Datatype.string [ InitialExpression = "$Temp/Dashboard/" ];
Folder for autosave items
property titleBarColor
as %ZEN.Datatype.color(XMLPROJECTION="attribute");
Specify color of title bars.
property titleBarFont
as %ZEN.Datatype.string(XMLPROJECTION="attribute");
Specify font of title bar text
property titleBarOpacity
as %ZEN.Datatype.float(XMLPROJECTION="attribute");
Specify opacity of title bars.
property titleBarTextColor
as %ZEN.Datatype.color(XMLPROJECTION="attribute");
Specify color of title bar text.
property trace
as %ZEN.Datatype.boolean(ZENURL="TRACE") [ InitialExpression = 0 ];
If true, show alert message to trace filter events.
property userName
as %ZEN.Datatype.string(MAXLEN=160) [ InitialExpression = $UserName ];
Current user name.
property widgetBorders
as %ZEN.Datatype.string [ InitialExpression = "1px solid #F0F0F0" ];
border of widgets in dashboard
property widgetBordersColor
as %ZEN.Datatype.string [ InitialExpression = "#F0F0F0" ];
color of widgets border
property widgetBordersStyle
as %ZEN.Datatype.string [ InitialExpression = "solid" ];
style of widgets border, e.g. solid, dashed, dotted
property widgetBordersSwitch
as %ZEN.Datatype.string [ InitialExpression = "edit" ];
Whether border is none, inherit or "width style color"
property widgetBordersToggle
as %ZEN.Datatype.boolean [ InitialExpression = 1 ];
Whether borders of widgets are on or off
property widgetBordersWidth
as %ZEN.Datatype.string [ InitialExpression = "1" ];
width of widgets border
property widgetDescription
as %ZEN.Datatype.string;
Description of the widget (if any). Used for save to catalog.
property widgetKeywords
as %ZEN.Datatype.string;
Keywords of the saved widget (if any). Used for save to catalog.
property widgetNamesAdded
as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Indicates whether or not the page had to generate widget names on load.
property widgetOwner
as %ZEN.Datatype.string(MAXLEN=255);
Widget owner. Used for save to catalog.
property widgetResource
as %ZEN.Datatype.string(MAXLEN=255);
Widget resource. Used for save to catalog.
property widgetTemplateName
as %ZEN.Datatype.string;
Name used to save a widget to the catalog!
method %CreateWidgets(pDashboard As %DeepSee.Dashboard.Definition, pDesktop As %ZEN.Component.desktop, ByRef pURLSettings As %String, ByRef pDBSettings As %String, ByRef pAddedWidget As %String)
as %Status
Create the dashboard widgets and add them to the desktop.
pURLSettings is an array of settings values pulled out of the URL.
pDBSettings is an array of saved dashboard settings values.
method %GetDashboardSettings(ByRef pDBSettings As %String)
as %Status
Get array of "dashboard" settings for this dashboard.
method %LoadDashboard(Output pDashboard As %DeepSee.Dashboard.Definition, pDashboardName As %String)
as %Status
Open (or create) an instance of dashboard definition that defines the contents
of this dashboard.
method %OnAfterCreatePage()
as %Status
Decorate the page.
method %OnCreateControls(pDashboard As %DeepSee.Dashboard.Definition, pGroup As %ZEN.Component.group)
as %Status
Nofication that CreateControls was called.
method %OnCreateWidgets(pDashboard As %DeepSee.Dashboard.Definition, pDesktop As %ZEN.Component.desktop)
as %Status
Nofication that %CreateWidgets was called.
method %OnDrawHTMLHead()
as %Status
Add include files to support color schemes.
method %OnGetPageName()
as %String
Get the (localized) name of the page.
This should be implemented in a subclass.
method %OnGetSmallMenu(Output pMenu)
Get the contents of the small menu in the title area.
method %OnGetTitle()
as %String
Get the (localized) title string for the page.
This should be implemented in a subclass.
method %OnGetWorklistOptions1(Output pOptions, Output pDefaultMode)
as %Status
Return list of options for work list 1.
method %OnGetWorklistOptions2(Output pOptions, Output pDefaultMode)
as %Status
Return list of options for work list 2.
classmethod %OnPreHTTP()
as %Boolean
Translate encrypted URL parameters
classmethod %ParseFilterSpec(pSpec As %String, Output pFSpec As %String, Output pFKey As %String, Output pFValue As %String, ByRef pIndex As %Integer = 0)
as %Status
Utility method.
Pull apart a filter spec, as we may get from a URL, into a spec and key or value:
[Outlet].[Country].[France] ==> "[Outlet].[Country]","[France]"
{[HOMED].[H1].[ZIP].[32006],[HOMED].[H1].[ZIP].[32007]} ==> "[HOMED].[H1].[ZIP]","{&[32006],&[32007]}"
Note that an array of results is returned. If the spec contains a tuple, each piece is
put into its own array node (pIndex is used to track how many pieces there are).
method ClearDashboardAutosaveState(pAutosaveItems As %ZEN.proxyObject, pDashboardName As %String, pAutosave As %String)
as %Status
[ ZenMethod ]
method ClearDashboardSettings()
as %String
[ ZenMethod ]
Clear settings for the current dashboard.
method GetDbDefinition(ByRef pParms, Output pObject As %RegisteredObject)
as %Status
Get the definition of this dashboard for the JSON provider.
classmethod GetDimensionInfo(pRoot As %String, Output pTree, ByRef pParms)
as %Status
Provide contents of the dimension tree.
Used by pivot widget.
method GetInternalName()
as %String
Return the internal name of the current document, including the three letter
extension in upper-case. For example, MyPackage.MyClass.CLS would be the internal name
for the class MyPackage.MyClass.
Subclasses MUST override this method.
method GetOptionList(ByRef pParameters, Output pMetaData, Output pData)
as %Status
Return JSON array of options.
method GetWidgetTypeList(ByRef pParameters, Output pMetaData, Output pData)
as %Status
Return JSON array of widget types.
method SaveDashboardSettings(pUser As %String = "")
as %String
[ ZenMethod ]
Save settings for the current dashboard.
classmethod SavePivotTable(pPivot As %DeepSee.Component.pivotTable, autoSavePivotName As %String)
as %String
[ ZenMethod ]
Save the pivot table so we have an autosaved version
method SaveWidget(pWidgetKey As %String, pLocalDataSource As %String)
as %String
[ ZenMethod ]
Change the local datasource for one widget and save it to local settings.
method SubmitDashboardDef(pCommand As %String, pProvider As %ZEN.Auxiliary.jsonProvider, pSubmitObject As %DeepSee.Dashboard.Definition, ByRef pResponseObject As %RegisteredObject)
as %Status
Submit handler for the dashboard definition.
This is called when the dashboard is saved.
method actionHandler(widget, dataSource, action)
[ Language = javascript ]
This handles any actions that were not handled by the widgets on the dashboard.
This is done by sending the event to the server-side dataSource.
method addControlDef()
[ Language = javascript ]
Launch the new control wizard.
method addDataPropertyDef()
[ Language = javascript ]
Launch the new data property wizard.
method addThisToFavorites()
[ Language = javascript ]
Add this dashboard to the favorites list.
method addWidgetFromCatalog()
[ Language = javascript ]
Invoke widget catalog dialog.
method chooseSCMenu(menuName, commandName, saveFlags)
[ Language = javascript ]
Handle a source control menu selection.
method clearAutosaveState()
[ Language = javascript ]
Remove any autosave state associated with this dashboard -- the dashboard
should load fresh
method clearSettings()
[ Language = javascript ]
Clear saved dashboard settings.
method dashboardEventHandler(sourceWidget, which, control, action, target, targetProperty, varType)
[ Language = javascript ]
Central handler for control events on this dashboard.
This is called whenever a control is modified (or otherwise activated).
This is also called when a widget raises an event.
sourceWidget is the widget that raised the event.
which is either 'control' for controls or 'click' for click on widget element.
Return true if the event was handled.
method deleteDashboard()
[ Language = javascript ]
Delete this dashboard.
method deleteWidget(pIndex)
as %String
[ ZenMethod ]
method drillDown(widget, dataSource)
[ Language = javascript ]
Execute a drill down for the given widget.
method fetchOptionList(which, spec, properties)
[ Language = javascript ]
Fetch the given list of options from the server.
method filterDropDown(ctrl, widgetKey, dataSource)
[ Language = javascript ]
Drop down is about to appear for searchBox control.
method getClientModel()
[ Language = javascript ]
Get the jsonProvider object on the client.
Subclasses MUST override this method to return the jsonProvider.
method getCurrWidget()
[ Language = javascript ]
If there is a selected widget, return it.
method getCurrentExtension()
[ Language = javascript ]
Return the extension used by Studio for the class/object.
This is ".CLS" by default, but subclasses should override this method
if a different extension is in use.
method getCurrentName()
[ Language = javascript ]
Return the current name of the class/object being modified.
Subclasses MUST override this method to return the correct name.
method getGridColumns()
[ Language = javascript ]
Number of grid columns in the desktop.
method getGridRows()
[ Language = javascript ]
Number of grid rows in the desktop.
method getPreviewImage()
[ Language = javascript ]
method getSaveAction(force)
[ Language = javascript ]
Return the string used as the command when sending JSON content to the server.
The OnSubmitContent handler for the jsonProvider MUST support two action types.
method getToolbarData()
[ Language = javascript ]
Return json data to drive the toolbar. !!!
method getWidgetLayout()
[ Language = javascript ]
Get the current size and position of each widget and place it within the widget.
Also make sure that the subtype class is current.
method gotoAnalyzer()
[ Language = javascript ]
Show the analyzer page.
method isReadOnly()
[ Language = javascript ]
Test if this page is in read only mode.
method launchColorChooser()
[ Language = javascript ]
Launch the color chooser.
method mailDashboard()
[ Language = javascript ]
email this dashboard.
method navCloseButtonClick(key)
[ Language = javascript ]
Click on close button in navigator.
method navDataArrange(key, swap, final)
[ Language = javascript ]
Arrange of data list in navigator.
method navDataChange(key, value, final)
[ Language = javascript ]
Change of data value in navigator.
method navExpand()
[ Language = javascript ]
Expand or contract of navigator.
method navGetContentForLevel(level, key, value)
[ Language = javascript ]
Return an object describing what to display for this level within the navigator.
method navHeaderButtonClick(key)
[ Language = javascript ]
Click on header button in navigator.
method navPopupAction(key, value)
[ Language = javascript ]
Popup action in navigator.
method navSelectItem(key, value, which)
[ Language = javascript ]
Select of item within the navigator.
method newDashboard()
[ Language = javascript ]
Create a new dashboard.
method newWidget()
[ Language = javascript ]
Invoke the widget wizard dialog to add a new widget to the dashboard.
method onAdjustSizes(load, contentWidth, contentHeight)
[ Language = javascript ]
Adjust sizes of content area.
method onPopupAction(popupName, action, value)
[ Language = javascript ]
This client event is fired when the a popup page launched from this page fires an action.
method onloadHandler()
[ Language = javascript ]
Add check to ensure that we correctly load documents on the client when source control hooks are in use.
method onlogoutHandler()
[ Language = javascript ]
Ensure that auto-logout is not blocked by onunloadHandler checking for unsaved changes
method onunloadHandler()
[ Language = javascript ]
This client event, if present, is fired when the page is unloaded.
If this method returns a string value, then that is used as the
return value of the HTML page's onbeforeunload handler (if more than
one component returns a string, the first one encountered is used).
method openDashboard()
[ Language = javascript ]
Launch the dashboard finder.
method recreateHandler(widgetKey)
[ Language = javascript ]
Called after a widget is recreated.
method reloadDashboard()
[ Language = javascript ]
Reload the dashboard (show current saved state)
method removeMenuOption(option As %String)
Helper method to remove a menu option.
Used to remove edit/save options in read-only mode.
method runAutosave()
[ Language = javascript ]
Perform an autosave of the current dashboard, filed under the current user
method saveCopyOfDashboard()
[ Language = javascript ]
Launch the save as dialog.
method saveDashboard(show, autosaveDashboard)
[ Language = javascript ]
Launch the save dialog.
If show is true, show the dialog.
method saveSettings(user)
[ Language = javascript ]
Save the dashboard settings for the current user (save my settings).
method saveWidgetToCatalog()
[ Language = javascript ]
Save the selected widget to the widget catalog.
method saveWidgetToTheme()
[ Language = javascript ]
Save the selected widget styles to the theme catalog.
method setBackground(attr, value)
[ Language = javascript ]
method setBorder(value)
[ Language = javascript ]
method setConnectivityStatusMsg(msg)
[ Language = javascript ]
method setFromBorderValues()
[ Language = javascript ]
method setGridColumns(cols)
[ Language = javascript ]
Set number of grid columns in the desktop.
method setGridRows(rows)
[ Language = javascript ]
Set number of grid rows in the desktop.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.
method setReadOnly(readOnly)
[ Language = javascript ]
Set readOnly to the value of readOnly.
Subclasses MUST implement this method to update the controls on the page
so that the page's behaviour actually matches the value of the readOnly flag.
method setTitleBarColorAndOpacity()
[ Language = javascript ]
Apply color and opacity to all available widgets
method showPDFOptions()
[ Language = javascript ]
Launch the pdf options dialog.
method updateWorklistTitle()
[ Language = javascript ]
Update the title for the dashboard.
method widgetSelected(evt, key)
[ Language = javascript ]
User has selected a widget on the dashboard.