Skip to content

Commit

Permalink
Merge pull request #222 from phillip-kruger/update
Browse files Browse the repository at this point in the history
Fix Dev UI Urls
  • Loading branch information
phillip-kruger authored Aug 11, 2023
2 parents 03c75c9 + a025884 commit e03c0dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void includeUiAndWebsocket(
Files.createFile(indexHtml);
}
String indexHtmlContent = getIndexHtmlContents(nonApplicationRootPathBuildItem.getNonApplicationRootPath(),
"/dev/logstream");
"/dev-v1/logstream");

Files.write(indexHtml, indexHtmlContent.getBytes());

Expand All @@ -187,7 +187,7 @@ void includeUiAndWebsocket(
String indexHtmlContent = getIndexHtmlContents(nonApplicationRootPathBuildItem.getNonApplicationRootPath(),
"/" + loggingManagerConfig.basePath + "/logstream");
// Update the resource Url to be relative
String pathToBeReplaced = nonApplicationRootPathBuildItem.resolvePath("dev/resources");
String pathToBeReplaced = nonApplicationRootPathBuildItem.resolvePath("dev-v1/resources");
indexHtmlContent = indexHtmlContent.replaceAll(pathToBeReplaced + "/", "");
String indexHtmlFileName = UI_FINAL_DESTINATION + "/" + INDEX_HTML;
generatedResourceProducer.produce(new GeneratedResourceBuildItem(indexHtmlFileName, indexHtmlContent.getBytes()));
Expand Down Expand Up @@ -247,7 +247,7 @@ void registerLoggingManagerUiHandler(
.handler(handler)
.build());

// Add the log stream (In dev mode, the stream is already available at /dev/logstream)
// Add the log stream (In dev mode, the stream is already available at /dev-v1/logstream)
if (!launchMode.getLaunchMode().isDevOrTest() && loggingManagerConfig.ui.alwaysInclude) {

reflectiveClassProducer.produce(new ReflectiveClassBuildItem(true, true,
Expand Down Expand Up @@ -305,7 +305,7 @@ private String getIndexHtmlContents(String nonApplicationRootPath, String stream
cleanFrameworkRootPath(nonApplicationRootPath));

indexHtmlContent = indexHtmlContent.replaceAll("\\{devRootAppend}",
cleanFrameworkRootPath(nonApplicationRootPath) + "/dev");
cleanFrameworkRootPath(nonApplicationRootPath) + "/dev-v1");

indexHtmlContent = indexHtmlContent.replaceAll("\\{streamingPath}",
streamingPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="{frameworkRootPath}/dev/resources/css/bootstrap.min.css">
<link rel="stylesheet" href="{frameworkRootPath}/dev/resources/fontawesome/css/all.min.css">
<link rel="stylesheet" href="{frameworkRootPath}/dev/resources/css/logstream.css">
<link rel="stylesheet" href="{frameworkRootPath}/dev-v1/resources/css/bootstrap.min.css">
<link rel="stylesheet" href="{frameworkRootPath}/dev-v1/resources/fontawesome/css/all.min.css">
<link rel="stylesheet" href="{frameworkRootPath}/dev-v1/resources/css/logstream.css">

<link rel="shortcut icon" type="image/png" href="{frameworkRootPath}/dev/resources/images/favicon.ico" >
<link rel="shortcut icon" type="image/png" href="{frameworkRootPath}/dev-v1/resources/images/favicon.ico" >

<title>Logging manager | {applicationName} {applicationVersion}</title>

Expand Down Expand Up @@ -52,9 +52,9 @@
{logContent}
{modalsContent}

<script src="{frameworkRootPath}/dev/resources/js/jquery.min.js"></script>
<script src="{frameworkRootPath}/dev/resources/js/bootstrap.bundle.min.js"></script>
<script src="{frameworkRootPath}/dev/resources/js/logstream.js"
<script src="{frameworkRootPath}/dev-v1/resources/js/jquery.min.js"></script>
<script src="{frameworkRootPath}/dev-v1/resources/js/bootstrap.bundle.min.js"></script>
<script src="{frameworkRootPath}/dev-v1/resources/js/logstream.js"
data-frameworkRootPath="{frameworkRootPath}"
data-showOnStart="true"
data-streamingPath="{streamingPath}">
Expand Down

0 comments on commit e03c0dd

Please sign in to comment.