Skip to content

Commit

Permalink
update ui
Browse files Browse the repository at this point in the history
  • Loading branch information
shalom938 committed Dec 11, 2024
1 parent 950a161 commit d5f62e4
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 44 deletions.
1 change: 0 additions & 1 deletion ide-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ plugins {
val platformType: IntelliJPlatformType by extra(dynamicPlatformType(project))



dependencies {

api(libs.threeten)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.digma.intellij.plugin.paths

import com.intellij.openapi.application.ApplicationInfo
import com.intellij.openapi.application.ApplicationNamesInfo
import com.intellij.openapi.application.PathManager
import com.intellij.openapi.util.SystemInfo
Expand Down Expand Up @@ -66,9 +65,6 @@ class DigmaPathManager {
digmaDir.mkdirs()
digmaDir
}

}
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,4 @@ class UIVersioningService(val cs: CoroutineScope) : DisposableAdaptor {
tempFile.deleteIfExists()
}
}


}
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
package org.digma.intellij.plugin.dashboard;

import com.intellij.openapi.project.Project;
import org.cef.browser.CefBrowser;
import org.cef.browser.CefFrame;
import org.cef.browser.*;
import org.cef.callback.CefSchemeHandlerFactory;
import org.cef.handler.CefResourceHandler;
import org.cef.network.CefRequest;
import org.digma.intellij.plugin.troubleshooting.*;
import org.digma.intellij.plugin.updates.ui.UIResourcesService;
import org.jetbrains.annotations.Nullable;

import java.net.MalformedURLException;
import java.net.URL;
import java.net.*;


public class DashboardSchemeHandlerFactory implements CefSchemeHandlerFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import java.net.URLConnection
const val INDEX_TEMPLATE_FILE_NAME: String = "indextemplate.ftl"
const val BASE_PACKAGE_PATH: String = "webview/"
const val IS_JAEGER_ENABLED: String = "isJaegerEnabled"
const val COMMON_FILES_FOLDER_NAME: String = "common"

class CustomResourceHandler(
private var domainNameName: String,
Expand Down Expand Up @@ -55,32 +54,6 @@ class CustomResourceHandler(
state = OpenedConnection(inputStream, resourceName)
}
}


// when {
// processedUrl.equals("$resourceUrlPrefix/index.html", true) -> {
// val html = loadFreemarkerTemplate(templateFolderName, indexTemplateData)
// state = StringData(html)
// }
//
// processedUrl.contains("fonts") || processedUrl.contains("images") -> {
// val pathToResource =
// processedUrl.replace(resourceUrlPrefix, "${BASE_PACKAGE_PATH}${COMMON_FILES_FOLDER_NAME}")
// val newUrl = javaClass.classLoader.getResource(pathToResource)
// if (newUrl != null) {
// state = OpenedConnection(newUrl.openConnection())
// }
// }
//
// else -> {
// val pathToResource =
// processedUrl.replace(resourceUrlPrefix, "${BASE_PACKAGE_PATH}${resourceFolderName}")
// val newUrl = javaClass.classLoader.getResource(pathToResource)
// if (newUrl != null) {
// state = OpenedConnection(newUrl.openConnection())
// }
// }
// }
cefCallback.Continue()
true
} else {
Expand Down Expand Up @@ -135,9 +108,7 @@ fun readResponse(
return CustomResourceHandlerUtil.readResponse(inputStream, dataOut, designedBytesToRead, bytesRead, callback)
}

//data class OpenedConnection(val connection: URLConnection) : ResourceHandlerState {
data class OpenedConnection(private val inputStream: InputStream, private val resourceName: String) : ResourceHandlerState {
// private val inputStream: InputStream = connection.getInputStream()
override fun getResponseHeaders(cefResponse: CefResponse, responseLength: IntRef, redirectUrl: StringRef) {
try {
cefResponse.mimeType = URLConnection.guessContentTypeFromName(resourceName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ import java.net.MalformedURLException
import java.net.URL


private const val COMMON_FILES_FOLDER: String = "assets"


abstract class BaseSchemeHandlerFactory : CefSchemeHandlerFactory {

private val logger: Logger = Logger.getInstance(this::class.java)
Expand Down

0 comments on commit d5f62e4

Please sign in to comment.