Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public render() {
const { error, data } = this.props.queryResult;
if (error) {
console.error(error);
return (
);
}
if (!data || Object.keys(data).length === 0) {
return (
);
}
return this.props.children(data as TData);
{({ pipelineOrError }) => {
switch (pipelineOrError.__typename) {
case "PipelineNotFoundError":
return (
);
case "InvalidSubsetError":
case "PythonError":
return ;
default:
const pipeline = pipelineOrError;
const displayedHandles = pipeline.solidHandles;
const parentSolidHandle = pipelineOrError.solidHandle;
return (
h.solid.name === selectedName
)}
getInvocations={definitionName =>
displayedHandles
static shownNotifications() {
AppToaster.show({
icon: IconNames.ERROR,
intent: Intent.DANGER,
timeout: 120000,
message: (
<>
It appears that the the service serving this console is not responding. The console will
not function at the moment
),
});
}
{supervisorSpecDialogOpen && (
)}
{taskSpecDialogOpen && (
)}
this.setState({ alertErrorMsg: undefined })}
>
<p>{alertErrorMsg}</p>
{supervisorTableActionDialogId && (
this.setState({ supervisorTableActionDialogId: undefined })}
/>
)}
{taskTableActionDialogId && taskTableActionDialogStatus && (
? pipelineOrError.message
: "No data returned from GraphQL";
return (
);
}
if (pipelineOrError.__typename === "PythonError") {
return (
);
}
return (
);
{({ pipelineRunsOrError }) => {
if (pipelineRunsOrError.__typename !== "PipelineRuns") {
return (
);
}
const runs = pipelineRunsOrError.results;
const displayed = runs.slice(0, PAGE_SIZE);
const hasPrevPage = !!cursor;
const hasNextPage = runs.length === PAGE_SIZE + 1;
return (
<>
<div style="{{">
</div>
<span>this action is irreversible.</span>
<p></p>
) : (
<>
<p>You are about to finalise your submission.</p>
<p>
Early submissions grant you additional XP, but{' '}
<span>this action is irreversible.</span>
</p>
);
const betchaDialog = (
<dialog title="Betcha: Early Submission">
<div>
</div>
<div>
{controlButton('Cancel', null, this.setBetchaAssessmentNull, { minimal: false })}
{controlButton('Finalise Submission', null, this.submitAssessment, {
minimal: false,
intent: Intent.DANGER
})}
</div></dialog>
);
} else if (this.props.log.__typename === "PipelineSuccessEvent") {
return (
{this.props.log.message}
);
} else if (this.props.log.__typename === "PipelineFailureEvent") {
return (
{this.props.log.message}
);
} else {
return {this.props.log.message};
}
}
}
render() {
let {
loadError
} = this.props;
if (!loadError) {
loadError = new Error("Well, this is weird... The Error page loaded, but there is no error.");
loadError.stack = "I really don't know what to do about this..."
}
return (
<div>
<code>{loadError.stack}</code>
</div>
);
}
}
private saveConfig = async (comment: string) => {
const { onClose } = this.props;
const newState: any = this.state.dynamicConfig;
try {
await axios.post('/druid/indexer/v1/worker', newState, {
headers: {
'X-Druid-Author': 'console',
'X-Druid-Comment': comment,
},
});
} catch (e) {
AppToaster.show({
icon: IconNames.ERROR,
intent: Intent.DANGER,
message: `Could not save overlord dynamic config: ${getDruidErrorMessage(e)}`,
});
}
AppToaster.show({
message: 'Saved overlord dynamic config',
intent: Intent.SUCCESS,
});
onClose();
};