Even more runtime debugger and docs fixes

This commit is contained in:
Frikky
2023-12-03 01:42:03 +01:00
parent dee1ee48f8
commit ec726fe073
6 changed files with 115 additions and 38 deletions
+10 -5
View File
@@ -1043,16 +1043,16 @@ const AngularWorkflow = (defaultprops) => {
execution_id: tmpView,
//authorization: data.authorization,
}
setExecutionRunning(true);
setExecutionModalView(1);
setExecutionRequest(cur_execution);
start();
//const newitem = removeParam("execution_id", cursearch);
//navigate(curpath + newitem)
setTimeout(() => {
stop()
}, 5000);
//setTimeout(() => {
// stop()
//}, 5000);
}
}
} else {
@@ -15114,7 +15114,10 @@ const AngularWorkflow = (defaultprops) => {
marginTop: "auto",
marginBottom: "auto",
}}
onClick={() => { }}
onClick={() => {
setExecutionRunning(false);
stop()
}}
>
<ArrowBackIcon style={{ color: "rgba(255,255,255,0.5)" }} />
</IconButton>
@@ -15124,6 +15127,8 @@ const AngularWorkflow = (defaultprops) => {
const cursearch = typeof window === "undefined" || window.location === undefined ? "" : window.location.search;
const newitem = removeParam("execution_id", cursearch);
navigate(curpath + newitem)
setExecutionRunning(false);
stop()
}}
>
See more runs
+9 -5
View File
@@ -1,5 +1,6 @@
import React, { useEffect, useState } from "react";
import { toast } from 'react-toastify';
import Markdown from 'react-markdown'
import { BrowserView, MobileView } from "react-device-detect";
@@ -135,7 +136,7 @@ const Docs = (defaultprops) => {
};
const fetchDocList = () => {
fetch(globalUrl + "/api/v1/docs", {
fetch(`${globalUrl}/api/v1/docs`, {
method: "GET",
headers: {
"Content-Type": "application/json",
@@ -147,9 +148,8 @@ const Docs = (defaultprops) => {
if (responseJson.success) {
setList(responseJson.list);
} else {
setList([
"# Error loading documentation. Please contact us if this persists.",
]);
setList(["# Error loading documentation. Please contact us if this persists.",]);
toast("Failed loading documentation. Please reload the window")
}
setListLoaded(true);
})
@@ -157,7 +157,7 @@ const Docs = (defaultprops) => {
};
const fetchDocs = (docId) => {
fetch(globalUrl + "/api/v1/docs/" + docId, {
fetch(`${globalUrl}/api/v1/docs/${docId}`, {
method: "GET",
headers: {
"Content-Type": "application/json",
@@ -166,6 +166,10 @@ const Docs = (defaultprops) => {
})
.then((response) => response.json())
.then((responseJson) => {
if (responseJson.success === false) {
//toast("Failed loading documentation. Please reload the UI")
}
if (responseJson.success && responseJson.reason !== undefined) {
// Find <img> tags and translate them into ![]() format
const imgRegex = /<img.*?src="(.*?)"/g;