display URL to open PR
*** Need to figure out how to turn this into a link ***
This commit is contained in:
parent
3530a628ec
commit
1ccdd7887b
|
@ -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 />
|
||||||
</>
|
</>
|
||||||
|
|
Loading…
Reference in New Issue