Discovery Summit 프레젠테이션 하나의 다중 탭, 필터링 가능한 대시보드 다중 탭 대시보드를 생성하는 범용 스크립트를 제공합니다.저는 이 스크립트(아래 표시)의 복사본을 사용하여 일련의 대시보드를 하나의 다중 탭 대시보드로 결합하고 있습니다. 그러나 스크립트는 모든 대시보드를 분리한 다음 1x1 또는 2x2 방식으로 다시 결합합니다. 따라서 두 개의 그래프가 겹쳐져 있는 원래 대시보드는 두 개의 그래프가 나란히 있는 대시보드로 변환됩니다.
나에게 필요한 것은 열려 있는 모든 대시보드를 가져와서 대시보드 설정을 변경하지 않고 결합하는 스크립트입니다. 아래 스크립트를 변경하거나 처음부터 시작하는 방법에 대한 제안 사항이 있으십니까?
///////////////////////////////// Create Tabbed Dashboard //////////////////////////////////////////////////
wait( 2 );
dashes = Find All(Reports);
tb = Expr(Tab Box());
For(i = 1, i<= N Items(dashes), i ++,
tabPage = Expr(Tab Page Box());
dfcb = Expr(Data Filter Context Box());
lub = Expr(Line Up Box(N Col(2)));
hlb = Expr(H List Box());
//Get Data table name to use with the data filter
wintitle = dashes[i] << Get Window Title;
wordone = Word(1, wintitle, "-");
wordtwo = Word(2, wintitle, "-");
dtname = Substr(wordone, 1, Length(wordone)-1 );
dt = Eval Expr(Data Table(Expr(dtName)));
//Get dashboard name
dashName = Substr(wordtwo, 2);
failed = 0;
j = 1;
//Loop through the tab page boxes in the dashboard, and extract the scripts
While(failed ==0,
Try(tpb = dashes[i] << Find(TabPageBox(j)),
failed = 1; Continue();
);
//Try to get the script from the display box if it exisits
Try(obj = tpb << Get Scriptable Object;
script = obj << Get Script,
j ++; Continue();
);
//If the script is for the local data filter add the script to the H List Box
If(Char(Head(Name Expr(script))) == "Data Filter",
FilterExprStr = char(NameExpr(dt)) || " << " || char(Name Expr(script));
FilterExpr = Parse(FilterExprStr);
Insert Into(hlb,NameExpr(FilterExpr));
,
//Else add it to the lineup box
If( Char(Name Expr(script)) != "Scriptable[]",
reportExprStr = char(NameExpr(dt)) || " << " || char(Name Expr(script));
reportExpr = Parse(reportExprStr);
scrollbox = Expr(Scroll Box());
Insert Into(scrollbox, Name Expr(reportExpr));
Insert Into(lub,Name Expr(scrollbox));
);
);
j ++;
);
//Build up the display boxes
Insert Into(hlb, Name Expr(lub));
Insert Into(dfcb, Name Expr(hlb));
Insert Into(tabPage, Eval Expr(Title(Expr(dashName))), 1);
Insert Into(tabPage, Name Expr(dfcb), 2);
Insert Into(tb, Name Expr(tabPage));
);
//Create combined dashboard window
New Window("Combined Dashboard", tb);
//Close all the individual dash reports
For( w = 1, w <= N Items(dashes), w ++,
dashes[w] << Close Window;
);