Skip to content

Commit 2fc0bd3

Browse files
authored
feat: update url for dashboard (#168)
1 parent 7c6cebe commit 2fc0bd3

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

src/main/java/ai/reveng/toolkit/ghidra/core/services/api/GhidraRevengService.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -925,10 +925,9 @@ public BoxPlot getNameScoreForMatch(GhidraFunctionMatch functionMatch) {
925925

926926
}
927927

928-
public static final String PORTAL_FUNCTIONS = "function/";
929-
930928
public void openFunctionInPortal(TypedApiInterface.FunctionID functionID) {
931-
openPortal(PORTAL_FUNCTIONS, String.valueOf(functionID.value()));
929+
var details = api.getFunctionDetails(functionID);
930+
openPortal("analyses", String.format("%s?fn=%s", details.analysisId().id(), functionID.value()));
932931
}
933932

934933
public void openCollectionInPortal(Collection collection) {
@@ -951,13 +950,7 @@ public void openPortalFor(ProgramWithID programWithID) {
951950
}
952951

953952
public void openPortalFor(TypedApiInterface.AnalysisID analysisID) {
954-
var binaryID = getBinaryIDFromAnalysisID(analysisID);
955-
// The URL expects the old binary ID in the path, and then the analysis ID in the query
956-
// if the binary ID is valid, it takes precedence,
957-
// and we have to provide _something_ for the overall URL to be valid, but we can just pass a placeholder value
958-
openPortal("analyses", String.format("%s?analysis-id=%s",
959-
binaryID.map(BinaryID::value).orElse(-1),
960-
analysisID.id()));
953+
openPortal("analyses", String.valueOf(analysisID.id()));
961954
}
962955

963956
public void openPortal(String... subPath) {

0 commit comments

Comments
 (0)