Fix bug in login functionality
This commit is contained in:
parent
eb32a9f5d6
commit
191afcb940
1 changed files with 100 additions and 101 deletions
|
|
@ -173,9 +173,8 @@ export default function GenericNode({
|
||||||
const iconColor = nodeColors[types[data.type]];
|
const iconColor = nodeColors[types[data.type]];
|
||||||
const iconName =
|
const iconName =
|
||||||
iconElement || (data.node?.flow ? "group_components" : name);
|
iconElement || (data.node?.flow ? "group_components" : name);
|
||||||
const iconClassName = `generic-node-icon ${
|
const iconClassName = `generic-node-icon ${!showNode ? " absolute inset-x-6 h-12 w-12 " : ""
|
||||||
!showNode ? " absolute inset-x-6 h-12 w-12 " : ""
|
}`;
|
||||||
}`;
|
|
||||||
if (iconElement && isEmoji) {
|
if (iconElement && isEmoji) {
|
||||||
return nodeIconFragment(iconElement);
|
return nodeIconFragment(iconElement);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -304,7 +303,7 @@ export default function GenericNode({
|
||||||
numberOfHandles={handles}
|
numberOfHandles={handles}
|
||||||
showNode={showNode}
|
showNode={showNode}
|
||||||
openAdvancedModal={false}
|
openAdvancedModal={false}
|
||||||
onCloseAdvancedModal={() => {}}
|
onCloseAdvancedModal={() => { }}
|
||||||
selected={selected}
|
selected={selected}
|
||||||
></NodeToolbarComponent>
|
></NodeToolbarComponent>
|
||||||
</NodeToolbar>
|
</NodeToolbar>
|
||||||
|
|
@ -427,33 +426,33 @@ export default function GenericNode({
|
||||||
data={data}
|
data={data}
|
||||||
color={
|
color={
|
||||||
data.node?.template[templateField].input_types &&
|
data.node?.template[templateField].input_types &&
|
||||||
data.node?.template[templateField].input_types!
|
data.node?.template[templateField].input_types!
|
||||||
.length > 0
|
.length > 0
|
||||||
? nodeColors[
|
? nodeColors[
|
||||||
data.node?.template[templateField]
|
data.node?.template[templateField]
|
||||||
.input_types![
|
.input_types![
|
||||||
data.node?.template[templateField]
|
data.node?.template[templateField]
|
||||||
.input_types!.length - 1
|
.input_types!.length - 1
|
||||||
]
|
]
|
||||||
] ??
|
] ??
|
||||||
nodeColors[
|
nodeColors[
|
||||||
types[
|
types[
|
||||||
data.node?.template[templateField]
|
data.node?.template[templateField]
|
||||||
.input_types![
|
.input_types![
|
||||||
data.node?.template[templateField]
|
data.node?.template[templateField]
|
||||||
.input_types!.length - 1
|
.input_types!.length - 1
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
: nodeColors[
|
: nodeColors[
|
||||||
data.node?.template[templateField].type!
|
data.node?.template[templateField].type!
|
||||||
] ??
|
] ??
|
||||||
nodeColors[
|
nodeColors[
|
||||||
types[
|
types[
|
||||||
data.node?.template[templateField].type!
|
data.node?.template[templateField].type!
|
||||||
]
|
]
|
||||||
] ??
|
] ??
|
||||||
nodeColors.unknown
|
nodeColors.unknown
|
||||||
}
|
}
|
||||||
title={getFieldTitle(
|
title={getFieldTitle(
|
||||||
data.node?.template!,
|
data.node?.template!,
|
||||||
|
|
@ -497,7 +496,7 @@ export default function GenericNode({
|
||||||
color={nodeColors[types[data.type]] ?? nodeColors.unknown}
|
color={nodeColors[types[data.type]] ?? nodeColors.unknown}
|
||||||
title={
|
title={
|
||||||
data.node?.output_types &&
|
data.node?.output_types &&
|
||||||
data.node.output_types.length > 0
|
data.node.output_types.length > 0
|
||||||
? data.node.output_types.join(" | ")
|
? data.node.output_types.join(" | ")
|
||||||
: data.type
|
: data.type
|
||||||
}
|
}
|
||||||
|
|
@ -515,60 +514,60 @@ export default function GenericNode({
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{showNode && (
|
{showNode && (
|
||||||
<Button variant="secondary" className={"group h-9 px-1.5"}>
|
<ShadTooltip
|
||||||
<div>
|
content={
|
||||||
<ShadTooltip
|
buildStatus === BuildStatus.BUILDING ? (
|
||||||
content={
|
<span> {STATUS_BUILDING} </span>
|
||||||
buildStatus === BuildStatus.BUILDING ? (
|
) : !validationStatus ? (
|
||||||
<span> {STATUS_BUILDING} </span>
|
<span className="flex">{STATUS_BUILD}</span>
|
||||||
) : !validationStatus ? (
|
) : (
|
||||||
<span className="flex">{STATUS_BUILD}</span>
|
<div className="max-h-100 p-2">
|
||||||
) : (
|
<div>
|
||||||
<div className="max-h-100 p-2">
|
{lastRunTime && (
|
||||||
<div>
|
<div className="justify-left flex text-muted-foreground font-normal">
|
||||||
{lastRunTime && (
|
<div>{RUN_TIMESTAMP_PREFIX}</div>
|
||||||
<div className="justify-left flex text-muted-foreground font-normal">
|
<div className="ml-1 text-status-blue">
|
||||||
<div>{RUN_TIMESTAMP_PREFIX}</div>
|
{lastRunTime}
|
||||||
<div className="ml-1 text-status-blue">
|
|
||||||
{lastRunTime}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div className="justify-left flex text-muted-foreground font-normal">
|
|
||||||
<div>Duration:</div>
|
|
||||||
<div className="ml-1 text-status-blue mb-3">
|
|
||||||
{validationStatus?.data.duration}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
<span className="flex justify-center text-muted-foreground mt-2 mb-2 font-semibold">
|
|
||||||
Output
|
|
||||||
</span>
|
|
||||||
<div className="max-h-96 overflow-auto custom-scroll font-normal">
|
|
||||||
{validationString.split("\n").map((line, index) => (
|
|
||||||
<div className="font-normal" key={index}>{line}</div>
|
|
||||||
))}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)}
|
||||||
}
|
</div>
|
||||||
side="bottom"
|
<div className="justify-left flex text-muted-foreground font-normal">
|
||||||
>
|
<div>Duration:</div>
|
||||||
|
<div className="ml-1 text-status-blue mb-3">
|
||||||
|
{validationStatus?.data.duration}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<span className="flex justify-center text-muted-foreground mt-2 mb-2 font-semibold">
|
||||||
|
Output
|
||||||
|
</span>
|
||||||
|
<div className="max-h-96 overflow-auto custom-scroll font-normal">
|
||||||
|
{validationString.split("\n").map((line, index) => (
|
||||||
|
<div className="font-normal" key={index}>{line}</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
side="bottom"
|
||||||
|
>
|
||||||
|
<Button onClick={() => {
|
||||||
|
if (buildStatus === BuildStatus.BUILDING || isBuilding)
|
||||||
|
return;
|
||||||
|
setValidationStatus(null);
|
||||||
|
buildFlow({ stopNodeId: data.id });
|
||||||
|
}} variant="secondary" className={"group h-9 px-1.5"}>
|
||||||
|
<div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
|
||||||
if (buildStatus === BuildStatus.BUILDING || isBuilding)
|
|
||||||
return;
|
|
||||||
setValidationStatus(null);
|
|
||||||
buildFlow({ stopNodeId: data.id });
|
|
||||||
}}
|
|
||||||
className="generic-node-status-position flex items-center justify-center"
|
className="generic-node-status-position flex items-center justify-center"
|
||||||
>
|
>
|
||||||
{renderIconStatus(buildStatus, validationStatus)}
|
{renderIconStatus(buildStatus, validationStatus)}
|
||||||
</div>
|
</div>
|
||||||
</ShadTooltip>
|
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</Button>
|
||||||
|
</ShadTooltip>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -643,7 +642,7 @@ export default function GenericNode({
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{(data.node?.description === "" || !data.node?.description) &&
|
{(data.node?.description === "" || !data.node?.description) &&
|
||||||
nameEditable
|
nameEditable
|
||||||
? "Double Click to Edit Description"
|
? "Double Click to Edit Description"
|
||||||
: data.node?.description}
|
: data.node?.description}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -656,7 +655,7 @@ export default function GenericNode({
|
||||||
.map((templateField: string, idx) => (
|
.map((templateField: string, idx) => (
|
||||||
<div key={idx}>
|
<div key={idx}>
|
||||||
{data.node!.template[templateField].show &&
|
{data.node!.template[templateField].show &&
|
||||||
!data.node!.template[templateField].advanced ? (
|
!data.node!.template[templateField].advanced ? (
|
||||||
<ParameterComponent
|
<ParameterComponent
|
||||||
index={idx.toString()}
|
index={idx.toString()}
|
||||||
key={scapedJSONStringfy({
|
key={scapedJSONStringfy({
|
||||||
|
|
@ -670,30 +669,30 @@ export default function GenericNode({
|
||||||
data={data}
|
data={data}
|
||||||
color={
|
color={
|
||||||
data.node?.template[templateField].input_types &&
|
data.node?.template[templateField].input_types &&
|
||||||
data.node?.template[templateField].input_types!
|
data.node?.template[templateField].input_types!
|
||||||
.length > 0
|
.length > 0
|
||||||
? nodeColors[
|
? nodeColors[
|
||||||
data.node?.template[templateField].input_types![
|
data.node?.template[templateField].input_types![
|
||||||
data.node?.template[templateField]
|
data.node?.template[templateField]
|
||||||
.input_types!.length - 1
|
.input_types!.length - 1
|
||||||
]
|
]
|
||||||
] ??
|
] ??
|
||||||
nodeColors[
|
nodeColors[
|
||||||
types[
|
types[
|
||||||
data.node?.template[templateField]
|
data.node?.template[templateField]
|
||||||
.input_types![
|
.input_types![
|
||||||
data.node?.template[templateField]
|
data.node?.template[templateField]
|
||||||
.input_types!.length - 1
|
.input_types!.length - 1
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
: nodeColors[
|
: nodeColors[
|
||||||
data.node?.template[templateField].type!
|
data.node?.template[templateField].type!
|
||||||
] ??
|
] ??
|
||||||
nodeColors[
|
nodeColors[
|
||||||
types[data.node?.template[templateField].type!]
|
types[data.node?.template[templateField].type!]
|
||||||
] ??
|
] ??
|
||||||
nodeColors.unknown
|
nodeColors.unknown
|
||||||
}
|
}
|
||||||
title={getFieldTitle(
|
title={getFieldTitle(
|
||||||
data.node?.template!,
|
data.node?.template!,
|
||||||
|
|
@ -745,9 +744,9 @@ export default function GenericNode({
|
||||||
data={data}
|
data={data}
|
||||||
color={
|
color={
|
||||||
(data.node?.output_types &&
|
(data.node?.output_types &&
|
||||||
data.node.output_types.length > 0
|
data.node.output_types.length > 0
|
||||||
? nodeColors[data.node.output_types[0]] ??
|
? nodeColors[data.node.output_types[0]] ??
|
||||||
nodeColors[types[data.node.output_types[0]]]
|
nodeColors[types[data.node.output_types[0]]]
|
||||||
: nodeColors[types[data.type]]) ?? nodeColors.unknown
|
: nodeColors[types[data.type]]) ?? nodeColors.unknown
|
||||||
}
|
}
|
||||||
title={
|
title={
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue