fix(instances): prompt to mutate instance on summary

This commit is contained in:
Sérgio Ramos 2018-03-02 14:18:11 +00:00
parent 81c119a066
commit 4cf50a45c5
2 changed files with 9 additions and 4 deletions

View File

@ -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;

View File

@ -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}`;