-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add delete modal; add empty list msg (#93)
Signed-off-by: Tyler Ohlsen <[email protected]> (cherry picked from commit 454ee82)
- Loading branch information
1 parent
ac1df60
commit 3e1db0d
Showing
5 changed files
with
161 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
import { | ||
EuiButton, | ||
EuiModal, | ||
EuiModalBody, | ||
EuiModalFooter, | ||
EuiModalHeader, | ||
EuiModalHeaderTitle, | ||
EuiText, | ||
} from '@elastic/eui'; | ||
import { Workflow } from '../../common'; | ||
|
||
interface DeleteWorkflowModalProps { | ||
workflow: Workflow; | ||
onClose: () => void; | ||
onConfirm: () => void; | ||
} | ||
|
||
/** | ||
* A general delete workflow modal. | ||
*/ | ||
export function DeleteWorkflowModal(props: DeleteWorkflowModalProps) { | ||
return ( | ||
<EuiModal onClose={props.onClose}> | ||
<EuiModalHeader> | ||
<EuiModalHeaderTitle> | ||
<p>{`Delete ${props.workflow.name}?`}</p> | ||
</EuiModalHeaderTitle> | ||
</EuiModalHeader> | ||
<EuiModalBody> | ||
<EuiText>The workflow will be permanently deleted.</EuiText> | ||
</EuiModalBody> | ||
<EuiModalFooter> | ||
<EuiButton onClick={props.onConfirm} fill={true} color="danger"> | ||
Confirm | ||
</EuiButton> | ||
</EuiModalFooter> | ||
</EuiModal> | ||
); | ||
} |
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,43 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
import { | ||
EuiButton, | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiSpacer, | ||
EuiText, | ||
EuiTitle, | ||
} from '@elastic/eui'; | ||
|
||
interface EmptyListMessageProps { | ||
onClickNewWorkflow: () => void; | ||
} | ||
|
||
export function EmptyListMessage(props: EmptyListMessageProps) { | ||
return ( | ||
<EuiFlexGroup direction="column" alignItems="center" gutterSize="m"> | ||
<EuiFlexItem> | ||
<EuiSpacer size="m" /> | ||
</EuiFlexItem> | ||
<EuiFlexItem> | ||
<EuiTitle size="s"> | ||
<h3>No workflows found</h3> | ||
</EuiTitle> | ||
</EuiFlexItem> | ||
<EuiFlexItem> | ||
<EuiText size="s"> | ||
Create a workflow to start building and testing your application. | ||
</EuiText> | ||
</EuiFlexItem> | ||
<EuiFlexItem> | ||
<EuiButton fill={false} onClick={props.onClickNewWorkflow}> | ||
New workflow | ||
</EuiButton> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
); | ||
} |
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