-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
93 additions
and
155 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,22 @@ | ||
import React from "react"; | ||
import { Helmet } from "react-helmet"; | ||
import qs from "query-string"; | ||
import { useQuery } from "Hooks"; | ||
import { DataTableSkeleton, SearchSkeleton } from "@carbon/react"; | ||
import { DelayedRender } from "@boomerang-io/carbon-addons-boomerang-react"; | ||
import ErrorDragon from "Components/ErrorDragon"; | ||
import ChangeLogTable from "./ChangeLogTable"; | ||
import { serviceUrl } from "Config/servicesConfig"; | ||
import { WorkflowSummary } from "Types"; | ||
import { ChangeLog as ChangeLogType } from "Types"; | ||
import styles from "./changeLog.module.scss"; | ||
|
||
interface ChangeLogProps { | ||
summaryData: WorkflowSummary; | ||
changeLogData: ChangeLogType; | ||
} | ||
|
||
const ChangeLog: React.FC<ChangeLogProps> = ({ summaryData }) => { | ||
const getWorkflowChangelogUrl = serviceUrl.getWorkflowChangelog({ | ||
workflowId: summaryData.id, | ||
query: qs.stringify({ sort: "version", order: "DESC" }), | ||
}); | ||
const { data, error, isLoading } = useQuery(getWorkflowChangelogUrl); | ||
if (isLoading) | ||
return ( | ||
<DelayedRender> | ||
<div className={styles.container}> | ||
<div className={styles.searchSkeleton}> | ||
<SearchSkeleton small /> | ||
</div> | ||
<DataTableSkeleton /> | ||
</div> | ||
</DelayedRender> | ||
); | ||
|
||
if (error) return <ErrorDragon />; | ||
|
||
function ChangeLog({ changeLogData }: ChangeLogProps) { | ||
return ( | ||
<div className={styles.container}> | ||
<Helmet> | ||
<title>{`Change Log - ${summaryData.name}`}</title> | ||
<title>Change Log</title> | ||
</Helmet> | ||
<ChangeLogTable changeLog={data} /> | ||
<ChangeLogTable changeLog={changeLogData} /> | ||
</div> | ||
); | ||
}; | ||
} | ||
|
||
export default ChangeLog; |
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
Oops, something went wrong.