-
Notifications
You must be signed in to change notification settings - Fork 29
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
23 changed files
with
306 additions
and
140 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { createContext, useContext, useEffect } from 'react'; | ||
|
||
interface IFooterContext { | ||
show: boolean; | ||
setShow(val?: boolean): void; | ||
} | ||
|
||
export const FooterContext = createContext<IFooterContext>({ | ||
show: true, | ||
setShow() { | ||
return; | ||
}, | ||
}); | ||
|
||
export function useHideFooterInPage() { | ||
const { setShow } = useContext(FooterContext); | ||
|
||
useEffect(() => { | ||
setShow(false); | ||
|
||
return () => setShow(true); | ||
}, []); | ||
|
||
return setShow; | ||
} |
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
31 changes: 31 additions & 0 deletions
31
app/cdap/components/SourceControlManagement/OperationsHistoryView/index.tsx
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,31 @@ | ||
import React, { useEffect } from 'react'; | ||
import { useSelector } from 'react-redux'; | ||
import styled from 'styled-components'; | ||
import { OperationAlert } from '../OperationAlert'; | ||
import { fetchLatestOperation } from '../store/ActionCreator'; | ||
import { getCurrentNamespace } from 'services/NamespaceStore'; | ||
|
||
const OperationsHistoryContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: stretch; | ||
padding: 16px; | ||
gap: 8px; | ||
`; | ||
|
||
export function OperationsHistoryView() { | ||
const { allOperations } = useSelector(({ operationRun }) => operationRun); | ||
|
||
useEffect(() => { | ||
fetchLatestOperation(getCurrentNamespace()); | ||
}, []); | ||
|
||
return ( | ||
<OperationsHistoryContainer> | ||
{allOperations.map((op) => ( | ||
<OperationAlert operation={op} /> | ||
))} | ||
</OperationsHistoryContainer> | ||
); | ||
} |
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.