Make a dashboard its widgets: drop the pages and sections nobody drew
This commit is contained in:
@@ -124,7 +124,9 @@ async function captureRuns(page, dir) {
|
||||
// watched on, showing finished ones. This is the seam the feature exists for.
|
||||
const picked = await page
|
||||
.getByTestId("run-link")
|
||||
.evaluateAll((links) => links.slice(0, 2).map((a) => a.getAttribute("href")))
|
||||
.evaluateAll((links) =>
|
||||
links.slice(0, 2).map((a) => a.getAttribute("href")),
|
||||
)
|
||||
const ids = picked
|
||||
.map((href) => (href || "").split("/").pop())
|
||||
.filter(Boolean)
|
||||
@@ -132,7 +134,9 @@ async function captureRuns(page, dir) {
|
||||
const apiUrl = APP_URL.replace("//app.", "//api.")
|
||||
const results = await page.evaluate(async (base) => {
|
||||
const answer = await fetch(`${base}/api/v1/dashboards/`, {
|
||||
headers: { Authorization: `Bearer ${localStorage.getItem("access_token")}` },
|
||||
headers: {
|
||||
Authorization: `Bearer ${localStorage.getItem("access_token")}`,
|
||||
},
|
||||
})
|
||||
if (!answer.ok) return null
|
||||
const body = await answer.json()
|
||||
|
||||
Reference in New Issue
Block a user