fix(instances): prompt to mutate instance on summary
This commit is contained in:
parent
81c119a066
commit
4cf50a45c5
@ -44,7 +44,7 @@ const TrimedLabel = styled(Label)`
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
`
|
`;
|
||||||
|
|
||||||
const Flex = styled.div`
|
const Flex = styled.div`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -25,6 +25,7 @@ import RebootInstance from '@graphql/reboot-instance.gql';
|
|||||||
import RemoveInstance from '@graphql/remove-instance.gql';
|
import RemoveInstance from '@graphql/remove-instance.gql';
|
||||||
import SummaryScreen from '@components/instances/summary';
|
import SummaryScreen from '@components/instances/summary';
|
||||||
import parseError from '@state/parse-error';
|
import parseError from '@state/parse-error';
|
||||||
|
import Confirm from '@state/confirm';
|
||||||
|
|
||||||
export const Summary = ({
|
export const Summary = ({
|
||||||
instance,
|
instance,
|
||||||
@ -196,6 +197,10 @@ export default compose(
|
|||||||
const { instance } = ownProps;
|
const { instance } = ownProps;
|
||||||
const { id } = instance;
|
const { id } = instance;
|
||||||
|
|
||||||
|
if (!await Confirm(`Do you want to ${action} "${instance.name}"?`)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const gerund = `${action}ing`;
|
const gerund = `${action}ing`;
|
||||||
const name = `${id}-summary-${gerund}`;
|
const name = `${id}-summary-${gerund}`;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user