54 lines
1.1 KiB
Java
54 lines
1.1 KiB
Java
package io.jenkins.blueocean.service.embedded;
|
|
|
|
import com.google.inject.Binder;
|
|
import com.google.inject.Inject;
|
|
import com.google.inject.Module;
|
|
import hudson.Extension;
|
|
import hudson.model.RootAction;
|
|
import io.jenkins.blueocean.BlueOceanUI;
|
|
import org.kohsuke.stapler.StaplerProxy;
|
|
|
|
/**
|
|
* @author Kohsuke Kawaguchi
|
|
*/
|
|
@Extension
|
|
public class BlueOceanRootAction implements RootAction, StaplerProxy {
|
|
private static final String URL_BASE="blue";
|
|
|
|
@Inject
|
|
private BlueOceanUI app;
|
|
|
|
@Override
|
|
public String getIconFileName() {
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public String getDisplayName() {
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* This would map to /jenkins/blue/
|
|
*/
|
|
@Override
|
|
public String getUrlName() {
|
|
return URL_BASE;
|
|
}
|
|
|
|
@Override
|
|
public Object getTarget() {
|
|
return app;
|
|
}
|
|
|
|
/** Provides implementation of BlueOceanUI */
|
|
@Extension
|
|
public static class ModuleImpl implements Module {
|
|
|
|
@Override
|
|
public void configure(Binder binder) {
|
|
binder.bind(BlueOceanUI.class).toInstance(new BlueOceanUI(URL_BASE));
|
|
}
|
|
}
|
|
}
|