Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. $('#create-volume-group').on('click', function () {
  2. dialog_open({ Title: _("Create Volume Group"),
  3. Fields: [
  4. { TextInput: "name",
  5. Title: _("Name"),
  6. validate: validate_lvm2_name
  7. },
  8. { SelectMany: "disks",
  9. Title: _("Disks"),
  10. Options: model.free_blockdevs.map(function (b) {
  11. return { value: b.path, Title: b.Name + " " + b.Description };
  12. }),
  13. validate: function (disks) {
  14. if (disks.length === 0)
  15. return _("At least one disk is needed.");
  16. }
  17. }
  18. ],
  19. Action: {
  20. Title: _("Create"),
  21. action: function (vals, dialog) {
  22. return manager_lvm2.VolumeGroupCreate(vals.name, vals.disks, { });
  23. }
  24. }
  25. });
  26. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement