aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2023-10-26 14:18:21 +0200
committerTaras Madan <tarasmadan@google.com>2023-10-26 13:05:49 +0000
commit72c2392eb8cf0b8eba97cdd94331a2ad5bebacdb (patch)
treedb2938d2de6a64092e672b916287ccbfbdcc3d17
parent23afc60f9d53873eed6f06fcb586bfb7bb4726a0 (diff)
dashboard/app: export ReportLink as a json
-rw-r--r--dashboard/app/getjson_test.go12
-rw-r--r--dashboard/app/public_json_api.go2
2 files changed, 10 insertions, 4 deletions
diff --git a/dashboard/app/getjson_test.go b/dashboard/app/getjson_test.go
index 113053e26..03ad24682 100644
--- a/dashboard/app/getjson_test.go
+++ b/dashboard/app/getjson_test.go
@@ -21,7 +21,8 @@ func TestJSONAPIIntegration(t *testing.T) {
"kernel-config": "/text?tag=KernelConfig\u0026x=a989f27ebc47e2dc",
"kernel-source-commit": "1111111111111111111111111111111111111111",
"syzkaller-git": "https://github.com/google/syzkaller/commits/syzkaller_commit1",
- "syzkaller-commit": "syzkaller_commit1"
+ "syzkaller-commit": "syzkaller_commit1",
+ "crash-report-link": "/text?tag=CrashReport\u0026x=12000000000000"
}
]
}`,
@@ -39,7 +40,8 @@ func TestJSONAPIIntegration(t *testing.T) {
"kernel-config": "/text?tag=KernelConfig\u0026x=a989f27ebc47e2dc",
"kernel-source-commit": "1111111111111111111111111111111111111111",
"syzkaller-git": "https://github.com/google/syzkaller/commits/syzkaller_commit1",
- "syzkaller-commit": "syzkaller_commit1"
+ "syzkaller-commit": "syzkaller_commit1",
+ "crash-report-link": "/text?tag=CrashReport\u0026x=15000000000000"
}
]
}`,
@@ -151,7 +153,8 @@ func TestJSONAPIFixCommits(t *testing.T) {
"kernel-config": "/text?tag=KernelConfig\u0026x=a989f27ebc47e2dc",
"kernel-source-commit": "1111111111111111111111111111111111111111",
"syzkaller-git": "https://github.com/google/syzkaller/commits/syzkaller_commit1",
- "syzkaller-commit": "syzkaller_commit1"
+ "syzkaller-commit": "syzkaller_commit1",
+ "crash-report-link": "/text?tag=CrashReport\u0026x=12000000000000"
}
]
}`)
@@ -189,7 +192,8 @@ func TestJSONAPICauseBisection(t *testing.T) {
"kernel-config": "/text?tag=KernelConfig\u0026x=4d11162a90e18f28",
"kernel-source-commit": "1111111111111111111111111111111111111111",
"syzkaller-git": "https://github.com/google/syzkaller/commits/syzkaller_commit1",
- "syzkaller-commit": "syzkaller_commit1"
+ "syzkaller-commit": "syzkaller_commit1",
+ "crash-report-link": "/text?tag=CrashReport\u0026x=12000000000000"
}
]
}`)
diff --git a/dashboard/app/public_json_api.go b/dashboard/app/public_json_api.go
index 87ee5663a..159586132 100644
--- a/dashboard/app/public_json_api.go
+++ b/dashboard/app/public_json_api.go
@@ -39,6 +39,7 @@ type publicAPICrashDescription struct {
SyzkallerCommit string `json:"syzkaller-commit,omitempty"`
CompilerDescription string `json:"compiler-description,omitempty"`
Architecture string `json:"architecture,omitempty"`
+ CrashReport string `json:"crash-report-link,omitempty"`
}
func getExtAPIDescrForBugPage(bugPage *uiBugPage) *publicAPIBugDescription {
@@ -94,6 +95,7 @@ func getExtAPIDescrForBugPage(bugPage *uiBugPage) *publicAPIBugDescription {
SyzkallerCommit: crash.SyzkallerCommit,
// TODO: add the CompilerDescription
// TODO: add the Architecture
+ CrashReport: crash.ReportLink,
})
}
return res