File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
modules/app/src/main/resources Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
const widgetLib = require ( '/lib/export/widget' ) ;
4
4
const adminLib = require ( '/lib/xp/admin' ) ;
5
- const contextLib = require ( '/lib/xp/context' ) ;
6
5
7
6
const SHORTCUT_TYPE = 'base:shortcut' ;
8
7
@@ -53,7 +52,7 @@ exports.canRender = function (req) {
53
52
54
53
function createUrl ( req , params ) {
55
54
const project = params . repository . substring ( 'com.enonic.cms.' . length ) ;
56
- const baseUri = adminLib . getBaseUri ( ) ;
55
+ const baseUri = adminLib . getHomeToolUrl ( ) ;
57
56
const normalizedBaseUri = baseUri === '/' ? '' : baseUri ;
58
57
return `${ normalizedBaseUri } /site/${ params . mode } /${ project } /${ params . branch } ${ params . path } ` ;
59
58
}
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ function localise(locale, key) {
15
15
} ) ;
16
16
}
17
17
18
- function handleGet ( ) {
18
+ function handleGet ( req ) {
19
19
const view = resolve ( './stats.html' ) ;
20
20
const projects = helper . getProjects ( ) ;
21
21
const contentItemsCount = '' + countItemsInRepos ( projects ) ;
22
22
const languagesCount = '' + countLanguagesInRepos ( projects ) ;
23
23
const openIssuesCount = '' + countIssuesInRepos ( projects ) ;
24
- const locales = adminLib . getLocales ( ) ;
24
+ const locales = req . locales
25
25
26
26
const params = {
27
27
projectsCount : projects . length ,
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ function getConfig(locales) {
41
41
allowContentUpdate,
42
42
excludeDependencies,
43
43
allowPathTransliteration,
44
- adminUrl : admin . getBaseUri ( ) ,
44
+ adminUrl : admin . getHomeToolUrl ( ) ,
45
45
assetsUri : portal . assetUrl ( {
46
46
path : ''
47
47
} ) ,
You can’t perform that action at this time.
0 commit comments