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