How to Export DeepSee Pivots And Dashboards Into Files With Every Save

Hi, Community!

I'm using Git with DeepSee and when I need to do a commit to the git repo I'm exporting ALL the pivots and dashboards from the namespace. But I can forget to do that) And it can take time for a large system.

What is the way to manage automatical export of DeepSee artefacts which we are editing in UI (Cubes, Pivots, Dashboards, Pivot Variables, Term lists, Shared Measures) into files every time when I push Save button?

  • 0
  • 0
  • 157
  • 2
  • 2

Answers

Hi Evgeny,

class %DeepSee.UserPortal.DashboardViewer  has a property saveAction as %ZEN.Datatype.string;

Container for the current save mode for source control.

http://localhost:57774/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=samples&CLASSNAME=%25DeepSee.UserPortal.DashboardViewer#PROPERTY_saveAction

if you combine this with standard $system.OBJ.Export()  this may do it.

SAMPLES>s sc=$system.OBJ.Export("B*.DFI","DeepSee.xml")
 
Exporting to XML started on 03/07/2018 09:36:32
Exporting type : Basic Dashboard Demo.dashboard.DFI
Export finished successfully.

Thank you, Robert! 

if you combine this with standard $system.OBJ.Export()  this may do it.

But could you advise please how can I manage DashboardViewer to init that property to make exports in /git/myproject/dfi/foldername/dashboardname.xml file with every save? 

sorry!

examining the source it turns out that this parameter didn't make it to call parameters (ZENURL) nor to settings.
though I found a bunch of comments // +DTB103 - source control
with no hint how to use it.
It might be necessary to build a private copy.
Attention on line +7 says:
/// This class should be considered as *internal*; subclassing is not supported. 

Customizing DashboardViewer may take a lot of time for testing with questionable success.

Alternate approach: Trigger your source control manually.

- create a method to export your changes. example:

#; find actual changes
   &SQL(select List(documentname) into :list 
          from  %DeepSee_Dashboard.Definition 
         where timemodified-now()+1>0 )
   set  sc=$system.OBJ.Export(list,"DeepSee.xml")

- next define an Action (in a KPI) that calls you method
http://localhost:57774/csp/docbook/DocBook.UI.Page.cls?KEY=D2IMP_ch_action

- next define a Control "button" to your main Widget and add this Action to activate your source management.

I admit. It's no an automatic & generic solution as directly inside DashboardViewer  (engineering may have a hint howto use it)  
but you get the advantage to decide which dashboard you want to manage and when
since not every change in dashboards may need to go immediately to source control
And it's definitely simpler than to do it our of Studio.