public TDAPIOLELib.DashboardPage CreatePage(TDAPIOLELib.DashboardFolder parentFolder, String PageName) { TDAPIOLELib.DashboardPageFactory dashboardPageFactory = parentFolder.DashboardPageFactory; TDAPIOLELib.DashboardPage dashboardPage = dashboardPageFactory.AddItem(System.DBNull.Value); dashboardPage.Name = PageName; dashboardPage.Post(); return(dashboardPage); }
public TDAPIOLELib.DashboardPageItem AddAnalysisItemToDashboard(TDAPIOLELib.DashboardPage dashboardPage, TDAPIOLELib.AnalysisItem analysisItem, int Row, int Column) { TDAPIOLELib.DashboardPageItemFactory dashboardPageItemFactory = dashboardPage.DashboardPageItemFactory; TDAPIOLELib.DashboardPageItem dashboardPageItem = dashboardPageItemFactory.AddItem(System.DBNull.Value); dashboardPageItem.AnalysisItemId = analysisItem.ID; dashboardPageItem.Column = Column; dashboardPageItem.Row = Row; dashboardPageItem.Post(); return(dashboardPageItem); }
public void Test_AnalysisAndDashboardScripts() { ////Analysis Scripts TDAPIOLELib.AnalysisItemFolder analysisItemFolder = aLM_CORE.Analysis.FindPrivateFolder(); Console.WriteLine("ID of private folder : " + analysisItemFolder.ID); analysisItemFolder = aLM_CORE.Analysis.FindPublicFolder(); Console.WriteLine("ID of Public folder : " + analysisItemFolder.ID); analysisItemFolder = aLM_CORE.Analysis.CreateFolder("Private", "TestFolder1"); analysisItemFolder = aLM_CORE.Analysis.CreateFolderPath("Private\\TestFolder1\\Dummy2\\Dummy3"); TDAPIOLELib.AnalysisItem analysisItem = aLM_CORE.Analysis.CreateExcelReport(analysisItemFolder, "FindAllBugs", "Select * from Bug"); analysisItem = aLM_CORE.Analysis.CreateDefectSummaryGraph(analysisItemFolder, "DefectFirstGraph", "BG_STATUS", ALM_Wrapper.Analysis.DefectSummaryGraphSumOF.ActualFixTime, "BG_DETECTED_IN_REL", ""); Console.WriteLine(analysisItem.LayoutData.ToString()); TDAPIOLELib.AnalysisItemFileFactory analysisItemFileFactory = analysisItem.AnalysisItemFileFactory; foreach (TDAPIOLELib.AnalysisItemFile aif in analysisItemFileFactory.NewList("")) { aif.SetFilePath("C:\\Temp"); aif.Download(); } //TDAPIOLELib.Gra TDAPIOLELib.AnalysisItem analysisItem1 = aLM_CORE.Analysis.CreateDefectAgeGraph(analysisItemFolder, "Defect First Age Graph", "BG_RESPONSIBLE", ALM_Wrapper.Analysis.DefectSummaryGraphSumOF.None, ALM_Wrapper.Analysis.DefectAgeGrouping.NoGrouping, ""); aLM_CORE.Analysis.RenameFolder(analysisItemFolder, "TestFolder2"); Console.WriteLine("New Folder Name : " + analysisItemFolder.Name); ///Dashboard Scripts TDAPIOLELib.DashboardFolder dashboardFolderParent = aLM_CORE.Dashboard.CreateFolder(aLM_CORE.Dashboard.FindPrivateFolder(), "TestFolder1"); TDAPIOLELib.DashboardFolder dashboardFolder = aLM_CORE.Dashboard.CreateFolderPath("Private\\TestFolder1\\Dummy1\\Dummy2"); TDAPIOLELib.DashboardPage dashboardPage = aLM_CORE.Dashboard.CreatePage(dashboardFolder, "TESTPAGE1"); TDAPIOLELib.DashboardPageItem dashboardPage1 = aLM_CORE.Dashboard.AddAnalysisItemToDashboard(dashboardPage, analysisItem, 0, 0); TDAPIOLELib.DashboardPageItem dashboardPage2 = aLM_CORE.Dashboard.AddAnalysisItemToDashboard(dashboardPage, analysisItem1, 0, 1); foreach (TDAPIOLELib.DashboardFolder dashboardFolder1 in aLM_CORE.Dashboard.FindChildFolders(aLM_CORE.Dashboard.GetFolderObject("Private\\TestFolder1"))) { Console.WriteLine("Folder found under Private\\TestFolder1 : " + dashboardFolder1.Name); } foreach (TDAPIOLELib.DashboardPage dp in aLM_CORE.Dashboard.FindChildPages(dashboardFolder)) { Console.WriteLine("Dashboard page found under " + dashboardFolder.Name + " - " + dp.Name); } aLM_CORE.Dashboard.RenameFolder(dashboardFolder, "TestFolder2"); Console.WriteLine("New Dashboard Folder name is : " + dashboardFolder.Name); aLM_CORE.Dashboard.RenamePage(dashboardPage, "PageName1"); Console.WriteLine("New Dashboard page name is : " + dashboardPage.Name); aLM_CORE.Dashboard.DeletePageItem(dashboardPage1); aLM_CORE.Dashboard.DeletePageItem(dashboardPage2); aLM_CORE.Dashboard.DeletePage(dashboardPage); aLM_CORE.Dashboard.DeleteFolder(dashboardFolder); aLM_CORE.Dashboard.DeleteFolder(dashboardFolderParent); aLM_CORE.Analysis.DeleteFolder(analysisItemFolder); aLM_CORE.Analysis.DeleteFolder(aLM_CORE.Analysis.GetFolderObject("Private\\TestFolder1")); Console.WriteLine("Done"); }
public Boolean RenamePage(TDAPIOLELib.DashboardPage dashboardPage, String newName) { dashboardPage.Name = newName; dashboardPage.Post(); return(true); }
public Boolean DeletePage(TDAPIOLELib.DashboardPage dashboardPage) { TDAPIOLELib.DashboardPageFactory dashboardPageFactory = tDConnection.DashboardPageFactory; dashboardPageFactory.RemoveItem(dashboardPage.ID); return(true); }