Compare commits

...

2 Commits

5 changed files with 14 additions and 10 deletions

View File

@ -4,12 +4,16 @@ import appConfig from './config';
const { object, node } = PropTypes;
appConfig.loadConfig();
// Connect to the SSE Gateway and allocate a
// dispatcher for blueocean.
// TODO: We might want to move this code to a local SSE util module.
sse.connect('jenkins_blueocean');
appConfig.loadConfig();
sse.connect({
clientId: 'jenkins_blueocean',
onConnect: undefined,
jenkinsUrl: `${appConfig.getJenkinsRootURL()}/`, // FIXME sse should not require this to end with a /
});
class Dashboard extends Component {

View File

@ -38,7 +38,7 @@ export default class Pipelines extends Component {
];
const baseUrl = config.getRootURL();
const newJobUrl = `${baseUrl}view/All/newJob`;
const newJobUrl = `${baseUrl}/view/All/newJob`;
return (
<Page>

View File

@ -6,10 +6,10 @@
export default class Config {
constructor(options) {
this._appURLBase = options.appURLBase || "/";
this._rootURL = options.rootURL || "/";
this._resourceURL = options.resourceURL || "/";
this._adjunctURL = options.adjunctURL || "/";
this._appURLBase = options.appURLBase || '';
this._rootURL = options.rootURL || '';
this._resourceURL = options.resourceURL || '';
this._adjunctURL = options.adjunctURL || '';
}
getAppURLBase() {

View File

@ -84,7 +84,7 @@ function startApp(routes, stores) {
let appURLBase = headElement.getAttribute("data-appurl");
if (typeof appURLBase !== "string") {
appURLBase = "/";
appURLBase = '';
}
// Look up some other URLs we may need

View File

@ -9,7 +9,7 @@
<j:invokeStatic var="j" className="jenkins.model.Jenkins" method="getActiveInstance"/>
${h.initPageVariables(context)}
<head data-rooturl="${rootURL}/"
<head data-rooturl="${rootURL}"
data-resurl="${resURL}"
data-appurl="${rootURL}/${it.urlBase}"
data-adjuncturl="${rootURL}/${j.getAdjuncts('').rootURL}"