Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#create-volume-group').on('click', function () {
- dialog_open({ Title: _("Create Volume Group"),
- Fields: [
- { TextInput: "name",
- Title: _("Name"),
- validate: validate_lvm2_name
- },
- { SelectMany: "disks",
- Title: _("Disks"),
- Options: model.free_blockdevs.map(function (b) {
- return { value: b.path, Title: b.Name + " " + b.Description };
- }),
- validate: function (disks) {
- if (disks.length === 0)
- return _("At least one disk is needed.");
- }
- }
- ],
- Action: {
- Title: _("Create"),
- action: function (vals, dialog) {
- return manager_lvm2.VolumeGroupCreate(vals.name, vals.disks, { });
- }
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement