Java Code Examples for de.otto.edison.navigation.NavBar#register()

The following examples show how to use de.otto.edison.navigation.NavBar#register() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JobsController.java    From edison-microservice with Apache License 2.0 5 votes vote down vote up
@Autowired
JobsController(final JobService jobService,
               final JobMetaService jobMetaService,
               final NavBar rightNavBar,
               final EdisonApplicationProperties applicationProperties) {
    this.jobService = jobService;
    this.jobMetaService = jobMetaService;
    this.applicationProperties = applicationProperties;
    rightNavBar.register(navBarItem(10, "Job Overview", applicationProperties.getManagement().getBasePath() + "/jobs"));
}
 
Example 2
Source File: JobDefinitionsController.java    From edison-microservice with Apache License 2.0 5 votes vote down vote up
@Autowired
public JobDefinitionsController(final JobDefinitionService definitionService,
                                final JobMetaService jobMetaService,
                                final NavBar rightNavBar,
                                final EdisonApplicationProperties applicationProperties) {
    this.jobDefinitionService = definitionService;
    this.jobMetaService = jobMetaService;
    this.applicationProperties = applicationProperties;
    jobDefinitionsUri = String.format("%s/jobdefinitions", applicationProperties.getManagement().getBasePath());
    rightNavBar.register(navBarItem(10, "Job Definitions", jobDefinitionsUri));
}
 
Example 3
Source File: NavigationConfiguration.java    From edison-microservice with Apache License 2.0 5 votes vote down vote up
@Autowired
public NavigationConfiguration(final NavBar mainNavBar,
                               final EdisonApplicationProperties  properties) {
    mainNavBar.register(navBarItem(0, "Home", "/"));
    mainNavBar.register(navBarItem(1, "Status", String.format("%s/status", properties.getManagement().getBasePath())));
    mainNavBar.register(navBarItem(2, "Job Overview", String.format("%s/jobs", properties.getManagement().getBasePath())));
    mainNavBar.register(navBarItem(3, "Job Definitions", String.format("%s/jobdefinitions", properties.getManagement().getBasePath())));
}
 
Example 4
Source File: NavigationConfiguration.java    From edison-microservice with Apache License 2.0 5 votes vote down vote up
@Autowired
public NavigationConfiguration(final NavBar mainNavBar,
                               final TogglzProperties togglzProperties,
                               final EdisonApplicationProperties properties) {
    mainNavBar.register(navBarItem(0, "Home", "/"));
    if (togglzProperties.getConsole().isEnabled()) {
        mainNavBar.register(navBarItem(1, "Feature Toggles", String.format("%s/toggles/console/index", properties.getManagement().getBasePath())));
    }
}
 
Example 5
Source File: TogglzConsoleConfiguration.java    From edison-microservice with Apache License 2.0 5 votes vote down vote up
@Bean
public ServletRegistrationBean<?> togglzServlet(final @Value("${edison.application.management.base-path:/internal}") String prefix,
                                                final NavBar rightNavBar) {

    // Register Togglz Console in the right "Admin" navigation bar:
    rightNavBar.register(navBarItem(bottom(), "Feature Toggles", prefix + "/toggles/console"));
    // Register TogglzConsoleServlet:
    return new ServletRegistrationBean<>(new TogglzConsoleServlet(), prefix + TOGGLES_URL_PATTERN);
}
 
Example 6
Source File: LoggersHtmlEndpoint.java    From edison-microservice with Apache License 2.0 5 votes vote down vote up
public LoggersHtmlEndpoint(final LoggersEndpoint loggersEndpoint,
                           final NavBar rightNavBar,
                           final EdisonApplicationProperties applicationProperties) {
    this.loggersEndpoint = loggersEndpoint;
    this.applicationProperties = applicationProperties;
    rightNavBar.register(navBarItem(1, "Loggers", String.format("%s/loggers", applicationProperties.getManagement().getBasePath())));
}
 
Example 7
Source File: NavigationConfiguration.java    From jlineup with Apache License 2.0 4 votes vote down vote up
@Autowired
public NavigationConfiguration(final NavBar mainNavBar,
                               final EdisonApplicationProperties  properties) {
    mainNavBar.register(navBarItem(0, "Status", String.format("%s/status", properties.getManagement().getBasePath())));
    mainNavBar.register(navBarItem(1, "Reports", String.format("%s/reports", properties.getManagement().getBasePath())));
}
 
Example 8
Source File: NavigationConfiguration.java    From edison-microservice with Apache License 2.0 4 votes vote down vote up
@Autowired
public NavigationConfiguration(final NavBar mainNavBar,
                               final EdisonApplicationProperties properties) {
    mainNavBar.register(navBarItem(0, "Home", "/"));
    mainNavBar.register(navBarItem(1, "Feature Toggles", format("%s/toggles/console/index", properties.getManagement().getBasePath())));
}
 
Example 9
Source File: NavigationConfiguration.java    From edison-microservice with Apache License 2.0 4 votes vote down vote up
@Autowired
public NavigationConfiguration(final NavBar mainNavBar,
                               final EdisonApplicationProperties properties) {
    mainNavBar.register(navBarItem(top(), "Status", String.format("%s/status", properties.getManagement().getBasePath())));
}