Add debug logging to BrowseScreens service
Showing
1 changed file
with
5 additions
and
3 deletions
| ... | @@ -1275,12 +1275,13 @@ def wikiInstructions = getWikiInstructions(inputScreenPath) | ... | @@ -1275,12 +1275,13 @@ def wikiInstructions = getWikiInstructions(inputScreenPath) |
| 1275 | <actions> | 1275 | <actions> |
| 1276 | <script><![CDATA[ | 1276 | <script><![CDATA[ |
| 1277 | import org.moqui.context.ExecutionContext | 1277 | import org.moqui.context.ExecutionContext |
| 1278 | 1278 | ||
| 1279 | ExecutionContext ec = context.ec | 1279 | ExecutionContext ec = context.ec |
| 1280 | ec.logger.info("BrowseScreens: SERVICE STARTED") | ||
| 1280 | def subscreens = [] | 1281 | def subscreens = [] |
| 1281 | def currentPath = path ?: "root" | 1282 | def currentPath = path ?: "root" |
| 1282 | def userGroups = ec.user.getUserGroupIdSet().collect { it } | 1283 | def userGroups = ec.user.getUserGroupIdSet().collect { it } |
| 1283 | 1284 | ||
| 1284 | // Strip query parameters from path for screen resolution | 1285 | // Strip query parameters from path for screen resolution |
| 1285 | if (currentPath.contains("?")) { | 1286 | if (currentPath.contains("?")) { |
| 1286 | currentPath = currentPath.split("\\?")[0] | 1287 | currentPath = currentPath.split("\\?")[0] |
| ... | @@ -1367,7 +1368,8 @@ def wikiInstructions = getWikiInstructions(inputScreenPath) | ... | @@ -1367,7 +1368,8 @@ def wikiInstructions = getWikiInstructions(inputScreenPath) |
| 1367 | // Helper to extract short description from wiki content | 1368 | // Helper to extract short description from wiki content |
| 1368 | def getShortDescription = { wikiText -> | 1369 | def getShortDescription = { wikiText -> |
| 1369 | if (!wikiText) return null | 1370 | if (!wikiText) return null |
| 1370 | def lines = wikiText.split('\n') | 1371 | def textString = wikiText instanceof String ? wikiText : new String(wikiText, "UTF-8") |
| 1372 | def lines = textString.split('\n') | ||
| 1371 | for (def line : lines) { | 1373 | for (def line : lines) { |
| 1372 | if (line.trim() && !line.trim().startsWith('#')) { | 1374 | if (line.trim() && !line.trim().startsWith('#')) { |
| 1373 | return line.trim().take(200) | 1375 | return line.trim().take(200) | ... | ... |
-
Please register or sign in to post a comment