<che-popup title="Remove machine" on-close="deleteDevMachineDialogController.cancel()">
  <div layout="column" flex
       class="delete-dev-machine-dialog">

    <p>Dev-machine is mandatory in your workspace environment.</p>
    <p>{{deleteDevMachineDialogController.message}}</p>

    <ng-form flex layout="column" name="deleteDevMachineForm">

      <md-radio-group ng-model="deleteDevMachineDialogController.newDevMachine">
        <md-radio-button ng-repeat="machine in deleteDevMachineDialogController.getMachinesList()"
                         value="{{machine.name}}">{{machine.name | uppercase}}</md-radio-button>
      </md-radio-group>

    </ng-form>

    <div layout="row" layout-align="end center">
      <che-button-primary che-button-title="Delete"
                          ng-if="deleteDevMachineDialogController.machinesList.length > 1"
                          ng-disabled="deleteDevMachineForm.$invalid
                          || !deleteDevMachineDialogController.newDevMachine
                          || deleteDevMachineDialogController.isProcessing"
                          ng-click="deleteDevMachineDialogController.deleteDevMachine()"></che-button-primary>
      <che-button-cancel-flat che-button-title="Cancel"
                              ng-click="deleteDevMachineDialogController.cancel()"></che-button-cancel-flat>
    </div>
  </div>
</che-popup>
