Search in sources :

Example 1 with DisplayerCoordinator

use of org.dashbuilder.displayer.client.DisplayerCoordinator in project kie-wb-common by kiegroup.

the class ProjectMetricsScreenTest method init.

@Before
public void init() throws Exception {
    super.init();
    when(project.getRepository()).thenReturn(repository);
    when(repository.getAlias()).thenReturn("repo");
    when(project.getName()).thenReturn("project1");
    contributorsDataSet = ContributorsData.INSTANCE.toDataSet();
    contributorsDataSet.setUUID(ContributorsDataSets.GIT_CONTRIB);
    clientDataSetManager.registerDataSet(contributorsDataSet);
    displayerCoordinator = new DisplayerCoordinator(rendererManager);
    displayerCoordinator.addListener(displayerListener);
    metricsFactory = new ProjectMetricsFactory(i18n, displayerLocator);
    presenter = new ProjectMetricsScreen(view, i18n, metricsFactory, displayerCoordinator);
    presenter.onStartup(new WorkbenchProjectMetricsEvent(project));
}
Also used : DisplayerCoordinator(org.dashbuilder.displayer.client.DisplayerCoordinator) WorkbenchProjectMetricsEvent(org.kie.workbench.common.screens.library.client.events.WorkbenchProjectMetricsEvent) ProjectMetricsFactory(org.kie.workbench.common.screens.library.client.util.ProjectMetricsFactory) Before(org.junit.Before)

Example 2 with DisplayerCoordinator

use of org.dashbuilder.displayer.client.DisplayerCoordinator in project kie-wb-common by kiegroup.

the class ContributorsDashboardTest method init.

@Before
public void init() throws Exception {
    super.init();
    contributorsDataSet = ContributorsData.INSTANCE.toDataSet();
    contributorsDataSet.setUUID(ContributorsDataSets.GIT_CONTRIB);
    clientDataSetManager.registerDataSet(contributorsDataSet);
    commitsPerOrganization = createNewDisplayer(ContributorsKPIs.getCommitsPerOrganization(i18n));
    commitsEvolutionDisplayer = createNewDisplayer(ContributorsKPIs.getCommitsEvolution(i18n));
    organizationSelectorDisplayer = createSelectorDisplayer(ContributorsKPIs.getOrgUnitSelector(i18n));
    repositorySelectorDisplayer = createSelectorDisplayer(ContributorsKPIs.getRepoSelector(i18n));
    authorSelectorDisplayer = createSelectorDisplayer(ContributorsKPIs.getAuthorSelector(i18n));
    topAuthorSelectorDisplayer = createSelectorDisplayer(ContributorsKPIs.getTopAuthorSelector(i18n));
    yearsSelectorDisplayer = createNewDisplayer(ContributorsKPIs.getYears(i18n));
    quarterSelectorDisplayer = createNewDisplayer(ContributorsKPIs.getQuarters(i18n));
    dayOfWeekSelectorDisplayer = createNewDisplayer(ContributorsKPIs.getDaysOfWeek(i18n));
    allCommitsDisplayer = createNewDisplayer(ContributorsKPIs.getAllCommits(i18n));
    displayerCoordinator = new DisplayerCoordinator(rendererManager);
    displayerCoordinator.addListener(displayerListener);
    when(view.getI18nService()).thenReturn(i18n);
    presenter = new ContributorsScreen(view, commitsPerOrganization, commitsEvolutionDisplayer, organizationSelectorDisplayer, repositorySelectorDisplayer, authorSelectorDisplayer, topAuthorSelectorDisplayer, yearsSelectorDisplayer, quarterSelectorDisplayer, dayOfWeekSelectorDisplayer, allCommitsDisplayer, displayerCoordinator, workbenchNotification);
}
Also used : DisplayerCoordinator(org.dashbuilder.displayer.client.DisplayerCoordinator) ContributorsScreen(org.kie.workbench.common.screens.contributors.client.screens.ContributorsScreen) Before(org.junit.Before)

Aggregations

DisplayerCoordinator (org.dashbuilder.displayer.client.DisplayerCoordinator)2 Before (org.junit.Before)2 ContributorsScreen (org.kie.workbench.common.screens.contributors.client.screens.ContributorsScreen)1 WorkbenchProjectMetricsEvent (org.kie.workbench.common.screens.library.client.events.WorkbenchProjectMetricsEvent)1 ProjectMetricsFactory (org.kie.workbench.common.screens.library.client.util.ProjectMetricsFactory)1