Merge branch 'markdownify' of https://github.com/getmaxun/maxun into markdownify
This commit is contained in:
@@ -761,6 +761,14 @@ async function executeRun(id: string, userId: string, requestedFormats?: string[
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
capture("maxun-oss-run-created-api", {
|
||||||
|
runId: plainRun.runId,
|
||||||
|
user_id: userId,
|
||||||
|
status: "success",
|
||||||
|
robot_type: "scrape",
|
||||||
|
formats
|
||||||
|
});
|
||||||
|
|
||||||
await destroyRemoteBrowser(plainRun.browserId, userId);
|
await destroyRemoteBrowser(plainRun.browserId, userId);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -800,6 +808,14 @@ async function executeRun(id: string, userId: string, requestedFormats?: string[
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
capture("maxun-oss-run-created-api", {
|
||||||
|
runId: plainRun.runId,
|
||||||
|
user_id: userId,
|
||||||
|
status: "failed",
|
||||||
|
robot_type: "scrape",
|
||||||
|
formats
|
||||||
|
});
|
||||||
|
|
||||||
await destroyRemoteBrowser(plainRun.browserId, userId);
|
await destroyRemoteBrowser(plainRun.browserId, userId);
|
||||||
|
|
||||||
throw error;
|
throw error;
|
||||||
|
|||||||
@@ -268,6 +268,14 @@ async function processRunExecution(job: Job<ExecuteRunData>) {
|
|||||||
logger.log('warn', `Failed to send webhooks for markdown robot run ${data.runId}: ${webhookError.message}`);
|
logger.log('warn', `Failed to send webhooks for markdown robot run ${data.runId}: ${webhookError.message}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
capture("maxun-oss-run-created-manual", {
|
||||||
|
runId: data.runId,
|
||||||
|
user_id: data.userId,
|
||||||
|
status: "success",
|
||||||
|
robot_type: "scrape",
|
||||||
|
formats,
|
||||||
|
});
|
||||||
|
|
||||||
await destroyRemoteBrowser(browserId, data.userId);
|
await destroyRemoteBrowser(browserId, data.userId);
|
||||||
|
|
||||||
return { success: true };
|
return { success: true };
|
||||||
@@ -296,6 +304,14 @@ async function processRunExecution(job: Job<ExecuteRunData>) {
|
|||||||
logger.log('warn', `Failed to send run-failed notification for markdown robot run ${data.runId}: ${socketError.message}`);
|
logger.log('warn', `Failed to send run-failed notification for markdown robot run ${data.runId}: ${socketError.message}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
capture("maxun-oss-run-created-manual", {
|
||||||
|
runId: data.runId,
|
||||||
|
user_id: data.userId,
|
||||||
|
status: "failed",
|
||||||
|
robot_type: "scrape",
|
||||||
|
formats,
|
||||||
|
});
|
||||||
|
|
||||||
await destroyRemoteBrowser(browserId, data.userId);
|
await destroyRemoteBrowser(browserId, data.userId);
|
||||||
|
|
||||||
throw error;
|
throw error;
|
||||||
|
|||||||
@@ -500,12 +500,12 @@ router.post('/recordings/scrape', requireSignIn, async (req: AuthenticatedReques
|
|||||||
|
|
||||||
logger.log('info', `Markdown robot created with id: ${newRobot.id}`);
|
logger.log('info', `Markdown robot created with id: ${newRobot.id}`);
|
||||||
capture(
|
capture(
|
||||||
'maxun-oss-markdown-robot-created',
|
'maxun-oss-robot-created',
|
||||||
{
|
{
|
||||||
robot_meta: newRobot.recording_meta,
|
robot_meta: newRobot.recording_meta,
|
||||||
url: url,
|
recording: newRobot.recording,
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
|
|
||||||
return res.status(201).json({
|
return res.status(201).json({
|
||||||
message: 'Markdown robot created successfully.',
|
message: 'Markdown robot created successfully.',
|
||||||
|
|||||||
@@ -321,6 +321,14 @@ async function executeRun(id: string, userId: string) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
capture("maxun-oss-run-created-scheduled", {
|
||||||
|
runId: plainRun.runId,
|
||||||
|
user_id: userId,
|
||||||
|
status: "success",
|
||||||
|
robot_type: "scrape",
|
||||||
|
formats
|
||||||
|
});
|
||||||
|
|
||||||
await destroyRemoteBrowser(plainRun.browserId, userId);
|
await destroyRemoteBrowser(plainRun.browserId, userId);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -352,6 +360,14 @@ async function executeRun(id: string, userId: string) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
capture("maxun-oss-run-created-scheduled", {
|
||||||
|
runId: plainRun.runId,
|
||||||
|
user_id: userId,
|
||||||
|
status: "failed",
|
||||||
|
robot_type: "scrape",
|
||||||
|
formats
|
||||||
|
});
|
||||||
|
|
||||||
await destroyRemoteBrowser(plainRun.browserId, userId);
|
await destroyRemoteBrowser(plainRun.browserId, userId);
|
||||||
|
|
||||||
throw error;
|
throw error;
|
||||||
|
|||||||
@@ -731,54 +731,60 @@ export const RobotIntegrationPage = ({
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Button
|
{!isScrapeRobot && (
|
||||||
variant="outlined"
|
<Button
|
||||||
disabled={isScrapeRobot}
|
variant="outlined"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (isScrapeRobot) return;
|
if (!recordingId) return;
|
||||||
if (!recordingId) return;
|
setSelectedIntegrationType("googleSheets");
|
||||||
setSelectedIntegrationType("googleSheets");
|
setSettings({ ...settings, integrationType: "googleSheets" });
|
||||||
setSettings({ ...settings, integrationType: "googleSheets" });
|
const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots";
|
||||||
const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots";
|
navigate(`${basePath}/${recordingId}/integrate/googleSheets`);
|
||||||
navigate(`${basePath}/${recordingId}/integrate/googleSheets`);
|
}}
|
||||||
}}
|
style={{
|
||||||
style={{
|
display: "flex",
|
||||||
display: "flex",
|
flexDirection: "column",
|
||||||
flexDirection: "column",
|
alignItems: "center",
|
||||||
alignItems: "center",
|
background: "white",
|
||||||
background: 'white',
|
color: "#ff00c3",
|
||||||
color: isScrapeRobot ? "#aaa" : "#ff00c3",
|
}}
|
||||||
opacity: isScrapeRobot ? 0.5 : 1,
|
>
|
||||||
cursor: isScrapeRobot ? "not-allowed" : "pointer",
|
<img
|
||||||
}}
|
src="https://ik.imagekit.io/ys1blv5kv/gsheet.svg"
|
||||||
>
|
alt="Google Sheets"
|
||||||
<img src="https://ik.imagekit.io/ys1blv5kv/gsheet.svg" alt="Google Sheets" style={{ margin: "6px" }} />
|
style={{ margin: "6px" }}
|
||||||
Google Sheets
|
/>
|
||||||
</Button>
|
Google Sheets
|
||||||
<Button
|
</Button>
|
||||||
variant="outlined"
|
)}
|
||||||
disabled={isScrapeRobot}
|
|
||||||
onClick={() => {
|
{!isScrapeRobot && (
|
||||||
if (isScrapeRobot) return;
|
<Button
|
||||||
if (!recordingId) return;
|
variant="outlined"
|
||||||
setSelectedIntegrationType("airtable");
|
onClick={() => {
|
||||||
setSettings({ ...settings, integrationType: "airtable" });
|
if (!recordingId) return;
|
||||||
const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots";
|
setSelectedIntegrationType("airtable");
|
||||||
navigate(`${basePath}/${recordingId}/integrate/airtable`);
|
setSettings({ ...settings, integrationType: "airtable" });
|
||||||
}}
|
const basePath = robotPath === "prebuilt-robots" ? "/prebuilt-robots" : "/robots";
|
||||||
style={{
|
navigate(`${basePath}/${recordingId}/integrate/airtable`);
|
||||||
display: "flex",
|
}}
|
||||||
flexDirection: "column",
|
style={{
|
||||||
alignItems: "center",
|
display: "flex",
|
||||||
background: 'white',
|
flexDirection: "column",
|
||||||
color: isScrapeRobot ? "#aaa" : "#ff00c3",
|
alignItems: "center",
|
||||||
opacity: isScrapeRobot ? 0.5 : 1,
|
background: "white",
|
||||||
cursor: isScrapeRobot ? "not-allowed" : "pointer",
|
color: "#ff00c3",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<img src="https://ik.imagekit.io/ys1blv5kv/airtable.svg" alt="Airtable" style={{ margin: "6px" }} />
|
<img
|
||||||
Airtable
|
src="https://ik.imagekit.io/ys1blv5kv/airtable.svg"
|
||||||
</Button>
|
alt="Airtable"
|
||||||
|
style={{ margin: "6px" }}
|
||||||
|
/>
|
||||||
|
Airtable
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
<Button variant="outlined" onClick={() => {
|
<Button variant="outlined" onClick={() => {
|
||||||
if (!recordingId) return;
|
if (!recordingId) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user