display URL to open PR

*** Need to figure out how to turn this into a link ***
This commit is contained in:
mike cullerton 2022-12-08 09:28:41 -05:00
parent 3530a628ec
commit 1ccdd7887b
1 changed files with 7 additions and 4 deletions

View File

@ -61,7 +61,7 @@ export default function ProcessModelShow() {
const [filesToUpload, setFilesToUpload] = useState<any>(null); const [filesToUpload, setFilesToUpload] = useState<any>(null);
const [showFileUploadModal, setShowFileUploadModal] = const [showFileUploadModal, setShowFileUploadModal] =
useState<boolean>(false); useState<boolean>(false);
const [processModelPublished, setProcessModelPublished] = useState<string | null>(null); const [processModelPublished, setProcessModelPublished] = useState<any>(null);
const navigate = useNavigate(); const navigate = useNavigate();
const { targetUris } = useUriListForPermissions(); const { targetUris } = useUriListForPermissions();
@ -210,6 +210,7 @@ export default function ProcessModelShow() {
}; };
const publishProcessModel = () => { const publishProcessModel = () => {
setProcessModelPublished(null);
HttpService.makeCallToBackend({ HttpService.makeCallToBackend({
path: `/process-models/${modifiedProcessModelId}/publish`, path: `/process-models/${modifiedProcessModelId}/publish`,
successCallback: postPublish, successCallback: postPublish,
@ -525,14 +526,16 @@ export default function ProcessModelShow() {
}; };
const processModelPublishMessage = () => { const processModelPublishMessage = () => {
console.log(`processModelPublishMessage: `);
if (processModelPublished) { if (processModelPublished) {
const prUrl: string = processModelPublished.pr_url;
return ( return (
<> <>
<InlineNotification <InlineNotification
title={`Model Published:`} title="Model Published:"
subtitle={`Your model was published`} subtitle={`You can view the changes and create a Pull Request at ${prUrl}`}
kind="success" kind="success"
type="banner"
links={prUrl}
/> />
<br /> <br />
</> </>