Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private makeOverviewCardButton = (overview: IAssessmentOverview) => {
let icon: IconName;
let label: string;
switch (overview.status) {
case AssessmentStatuses.not_attempted:
icon = IconNames.PLAY;
label = 'Attempt';
break;
case AssessmentStatuses.attempting:
icon = IconNames.PLAY;
label = 'Continue Attempt';
break;
case AssessmentStatuses.attempted:
icon = IconNames.EDIT;
label = 'Review Attempt';
break;
case AssessmentStatuses.submitted:
icon = IconNames.EYE_OPEN;
label = 'Review Submission';
break;
default:
// If we reach this case, backend data did not fit IAssessmentOverview
icon = IconNames.PLAY;
label = 'Review';
break;
}
return (handleRecordInit={this.handleRecordInit}
handleSaveSourcecastData={this.props.handleSaveSourcecastData}
handleSetEditorReadonly={this.props.handleSetEditorReadonly}
handleTimerPause={this.props.handleTimerPause}
handleTimerReset={this.props.handleTimerReset}
handleTimerResume={this.props.handleTimerResume}
handleTimerStart={this.props.handleTimerStart}
handleTimerStop={this.props.handleTimerStop}
recordingStatus={this.props.recordingStatus}
/>
)
},
{
label: 'Management',
iconName: IconNames.EDIT,
body: (
<div>
</div>
),
id: SideContentType.introduction
},
listVisualizerTab,
inspectorTab,
envVisualizerTab
]
}text = 'None';
}
return (
<span>
this.setState({
compactionDialogOpenOn: {
datasource: row.original.datasource,
compactionConfig: compaction,
},
})
}
>
{text}
</span>
);
},
show: capabilities.hasCoordinatorAccess() && hiddenColumns.exists('Compaction'),const editorSelect = (
currentEditor: QuestionEditor,
handleSelect: (i: QuestionEditor) => void
) => (
<button>
);
</button>Druid can perform per-row{' '}
transforms
{' '}
of column values allowing you to create new derived columns or alter existing column.
<p></p>
{Boolean(transformQueryState.error && transforms.length) && (
<button> {
this.setState({
selectedTransformIndex: transforms.length - 1,
selectedTransform: transforms[transforms.length - 1],
});
}}
/>
)}
{this.renderTransformControls()}
{this.renderNextBar({
disabled: !transformQueryState.data,
onNextStep: () => {</button>{selected
? <div>
<textarea value="{subtitlesText}" style="{{width:" rows="{7}"> <div className='buttons-bar'>
<Files onChange={this._fileChanged} accepts={this._fileAccepts} style={{display: 'inline-block'}}><Button icon={IconNames.UPLOAD}>{"Load"}</Button></Files>
<Button onClick={this._saveSelected} icon={IconNames.DOWNLOAD} text={"Save"}/>
<Button onClick={this._reloadSelected} icon={IconNames.CLOUD_DOWNLOAD} disabled={!selected.url} text={"Revert"}/>
<Button onClick={this._removeSelected} icon={IconNames.CROSS} text={'Remove'}/>
</div>
</div>
: <NonIdealState visual='arrow-left' title={"No language selected"} description={"Load existing subtitles or add a new language, and click the Edit button."} />}
</div>
</div>
<div className='hbox mb' style={{textAlign: 'center', backgroundColor: '#efefef', padding: '10px'}}>
<div className='fill center'>
<Button onClick={this._beginEdit} disabled={!selected} icon={IconNames.EDIT} text={"Edit"} style={{marginRight: '10px'}}/>
<Button onClick={this._save} icon={IconNames.CLOUD_UPLOAD} text={"Save"} disabled={!canSave} intent={unsaved ? Intent.PRIMARY : Intent.NONE}/>
</div>
</div>
{!canSave &&
<Callout intent={Intent.WARNING} title={"Insufficient access rights"}>
{"The current user is not allowed to modify this Codecast."}
</Callout>}
<div>
{notify.key === 'pending' && <Callout icon={<Spinner small/>}>{"Saving, please wait."}</Callout>}
{notify.key === 'success' && <Callout icon='saved' intent={Intent.SUCCESS}>{"Saved."}</Callout>}
{notify.key === 'failure' && <Callout icon='warning-sign' intent={Intent.DANGER}>{"Failed to save: "}{notify.message}</Callout>}
</div>
</div>
);
}
_refLoad = (el) => {</textarea></div>savingView = (
<div style="{{marginTop:">
<h2>{"Saving"}</h2>
<div>
{stepRows}
</div>
{saving.done &&
<div style="{{textAlign:">
</div>}
</div>
);
}
return (
<div>
<button>
</button><button>
{savingView}
</button></div>
);
}
static getDerivedStateFromProps (props, state) {private getLookupActions(lookupTier: string, lookupId: string): BasicAction[] {
return [
{
icon: IconNames.EDIT,
title: 'Edit',
onAction: () => this.openLookupEditDialog(lookupTier, lookupId),
},
{
icon: IconNames.CROSS,
title: 'Delete',
intent: Intent.DANGER,
onAction: () => this.setState({ deleteLookupTier: lookupTier, deleteLookupName: lookupId }),
},
];
}const makeOverviewCardButton = (overview: IAssessmentOverview, listingPath: string | undefined) => {
const label: string = 'Edit mission';
listingPath = listingPath || '/academy/' + assessmentCategoryLink(overview.category);
return (
{controlButton(label, IconNames.EDIT)}
);
};