-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #549 from psarando/CORE-1952-instant-launch-errors
CORE-1952 Display limit check errors from instant launch actions
- Loading branch information
Showing
18 changed files
with
603 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* A dialog component to display the App launch run error code. | ||
* | ||
* @author sriram, psarando | ||
*/ | ||
import React from "react"; | ||
|
||
import { useTranslation } from "i18n"; | ||
import { ERROR_CODES } from "components/error/errorCode"; | ||
import DEDialog from "components/utils/DEDialog"; | ||
import RunError from "./RunError"; | ||
|
||
import { Button, Typography } from "@material-ui/core"; | ||
|
||
const RunErrorDialog = (props) => { | ||
const { baseId, code, open, viceQuota, runningJobs, onClose } = props; | ||
|
||
const { t } = useTranslation(["launch", "common"]); | ||
|
||
let title; | ||
if (code === ERROR_CODES.ERR_LIMIT_REACHED) { | ||
title = t("jobLimitReached"); | ||
} else if (code === ERROR_CODES.ERR_FORBIDDEN) { | ||
title = t("accessDenied"); | ||
} | ||
|
||
return ( | ||
<DEDialog | ||
baseId={baseId} | ||
title={title} | ||
open={open} | ||
actions={ | ||
<Button color="primary" onClick={onClose}> | ||
{t("common:ok")} | ||
</Button> | ||
} | ||
onClose={onClose} | ||
> | ||
<Typography> | ||
<RunError | ||
code={code} | ||
viceQuota={viceQuota} | ||
runningJobs={runningJobs} | ||
/> | ||
</Typography> | ||
</DEDialog> | ||
); | ||
}; | ||
|
||
export default RunErrorDialog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.