Search in sources :

Example 1 with HomeShortcutLink

use of org.kie.workbench.common.screens.home.model.HomeShortcutLink in project kie-wb-common by kiegroup.

the class HomeProducer method get.

public HomeModel get() {
    final HomeModel model = new HomeModel("Welcome to KIE Workbench", "KIE Workbench offers a set of flexible tools, that support the way you need to work. Select a tool below to get started.", "images/home_bg.jpg");
    final HomeShortcut design = ModelUtils.makeShortcut("pficon pficon-blueprint", "Design", "Create and modify {0} and {1}.", () -> placeManager.goTo(LIBRARY), LIBRARY, PERSPECTIVE);
    design.addLink(new HomeShortcutLink("projects", LIBRARY));
    design.addLink(new HomeShortcutLink("pages", CONTENT_MANAGEMENT));
    final HomeShortcut devOps = ModelUtils.makeShortcut("fa fa-gears", "DevOps", "Administer {0} and {1}.", () -> placeManager.goTo(SERVER_MANAGEMENT), SERVER_MANAGEMENT, PERSPECTIVE);
    devOps.addLink(new HomeShortcutLink("deployments", DEPLOYMENTS));
    devOps.addLink(new HomeShortcutLink("servers", SERVER_MANAGEMENT));
    model.addShortcut(design);
    model.addShortcut(devOps);
    return model;
}
Also used : HomeShortcut(org.kie.workbench.common.screens.home.model.HomeShortcut) HomeShortcutLink(org.kie.workbench.common.screens.home.model.HomeShortcutLink) HomeModel(org.kie.workbench.common.screens.home.model.HomeModel)

Example 2 with HomeShortcutLink

use of org.kie.workbench.common.screens.home.model.HomeShortcutLink in project drools-wb by kiegroup.

the class HomeProducer method get.

public HomeModel get(ProfilePreferences profilePreferences) {
    final HomeModel model = new HomeModel("Welcome to KIE Workbench", "KIE Workbench offers a set of flexible tools, that support the way you need to work. Select a tool below to get started.", "images/home_bg.jpg");
    final HomeShortcut design = ModelUtils.makeShortcut("pficon pficon-blueprint", "Design", "Create and modify {0} and {1}.", () -> placeManager.goTo(LIBRARY), LIBRARY, PERSPECTIVE);
    design.addLink(new HomeShortcutLink("projects", LIBRARY));
    design.addLink(new HomeShortcutLink("pages", CONTENT_MANAGEMENT));
    final HomeShortcut devOps = ModelUtils.makeShortcut("fa fa-gears", "DevOps", "Administer {0} and {1}.", () -> placeManager.goTo(SERVER_MANAGEMENT), SERVER_MANAGEMENT, PERSPECTIVE);
    devOps.addLink(new HomeShortcutLink("provisioning", PROVISIONING));
    devOps.addLink(new HomeShortcutLink("servers", SERVER_MANAGEMENT));
    model.addShortcut(design);
    model.addShortcut(devOps);
    return model;
}
Also used : HomeShortcut(org.kie.workbench.common.screens.home.model.HomeShortcut) HomeShortcutLink(org.kie.workbench.common.screens.home.model.HomeShortcutLink) HomeModel(org.kie.workbench.common.screens.home.model.HomeModel)

Example 3 with HomeShortcutLink

use of org.kie.workbench.common.screens.home.model.HomeShortcutLink in project kie-wb-common by kiegroup.

the class HomeProducer method get.

public HomeModel get(ProfilePreferences preferences) {
    final HomeModel model = new HomeModel("Welcome to KIE Workbench", "KIE Workbench offers a set of flexible tools, that support the way you need to work. Select a tool below to get started.", "images/home_bg.jpg");
    final HomeShortcut design = ModelUtils.makeShortcut("pficon pficon-blueprint", "Design", "Create and modify {0} and {1}.", () -> placeManager.goTo(LIBRARY), LIBRARY, PERSPECTIVE);
    design.addLink(new HomeShortcutLink("projects", LIBRARY));
    design.addLink(new HomeShortcutLink("pages", CONTENT_MANAGEMENT));
    final HomeShortcut devOps = ModelUtils.makeShortcut("fa fa-gears", "DevOps", "Administer {0} and {1}.", () -> placeManager.goTo(SERVER_MANAGEMENT), SERVER_MANAGEMENT, PERSPECTIVE);
    devOps.addLink(new HomeShortcutLink("provisioning", PROVISIONING));
    devOps.addLink(new HomeShortcutLink("servers", SERVER_MANAGEMENT));
    model.addShortcut(design);
    model.addShortcut(devOps);
    return model;
}
Also used : HomeShortcut(org.kie.workbench.common.screens.home.model.HomeShortcut) HomeShortcutLink(org.kie.workbench.common.screens.home.model.HomeShortcutLink) HomeModel(org.kie.workbench.common.screens.home.model.HomeModel)

Example 4 with HomeShortcutLink

use of org.kie.workbench.common.screens.home.model.HomeShortcutLink in project kie-wb-common by kiegroup.

the class ShortcutSubHeadingLinkPresenterTest method goToPerspectiveTest.

@Test
public void goToPerspectiveTest() {
    presenter.setup(new HomeShortcutLink("label", "perspectiveIdentifier"));
    presenter.goToPerspective();
    verify(shortcutHelper).goTo("perspectiveIdentifier");
}
Also used : HomeShortcutLink(org.kie.workbench.common.screens.home.model.HomeShortcutLink) Test(org.junit.Test)

Example 5 with HomeShortcutLink

use of org.kie.workbench.common.screens.home.model.HomeShortcutLink in project kie-wb-common by kiegroup.

the class ShortcutSubHeadingLinkPresenterTest method setupWithoutPermissionTest.

@Test
public void setupWithoutPermissionTest() {
    doReturn(false).when(shortcutHelper).authorize("perspectiveIdentifier");
    presenter.setup(new HomeShortcutLink("label", "perspectiveIdentifier"));
    verify(view).setLabel("label");
    verify(view).disable();
}
Also used : HomeShortcutLink(org.kie.workbench.common.screens.home.model.HomeShortcutLink) Test(org.junit.Test)

Aggregations

HomeShortcutLink (org.kie.workbench.common.screens.home.model.HomeShortcutLink)9 HomeShortcut (org.kie.workbench.common.screens.home.model.HomeShortcut)5 Test (org.junit.Test)4 HomeModel (org.kie.workbench.common.screens.home.model.HomeModel)4 Command (org.uberfire.mvp.Command)1