From: Shan Shaji <s.shaji@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve_flutter_frontend v2 1/3] cleanup: run `dart format` on both qemu and lxc options page
Date: Tue, 23 Sep 2025 14:23:32 +0200 [thread overview]
Message-ID: <20250923122334.301053-2-s.shaji@proxmox.com> (raw)
In-Reply-To: <20250923122334.301053-1-s.shaji@proxmox.com>
Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
lib/widgets/pve_lxc_options_widget.dart | 138 ++++++------
lib/widgets/pve_qemu_options_widget.dart | 256 +++++++++++------------
2 files changed, 197 insertions(+), 197 deletions(-)
diff --git a/lib/widgets/pve_lxc_options_widget.dart b/lib/widgets/pve_lxc_options_widget.dart
index 7ad0224..5b6e009 100644
--- a/lib/widgets/pve_lxc_options_widget.dart
+++ b/lib/widgets/pve_lxc_options_widget.dart
@@ -16,76 +16,76 @@ class PveLxcOptions extends StatelessWidget {
final config = state.config;
if (config != null) {
return Scaffold(
- appBar: AppBar(),
- body: SingleChildScrollView(
- child: Column(
- children: <Widget>[
- ListTile(
- title: const Text("Name"),
- subtitle: Text(config.hostname ?? 'undefined'),
- ),
- PveConfigSwitchListTile(
- title: const Text("Start on boot"),
- value: config.onboot,
- defaultValue: false,
- pending: config.getPending('onboot'),
- onChanged: (v) => lxcBloc!.events
- .add(UpdateLxcConfigBool('onboot', v)),
- onDeleted: () => lxcBloc!.events
- .add(RevertPendingLxcConfig('onboot')),
- ),
- ListTile(
- title: const Text("Start/Shutdown order"),
- subtitle: Text(config.startup ?? "Default (any)"),
- ),
- ListTile(
- title: const Text("OS Type"),
- subtitle: Text("${config.ostype}"),
- ),
- ListTile(
- title: const Text("Architecture"),
- subtitle: Text("${config.arch}"),
- ),
- PveConfigSwitchListTile(
- title: const Text("/dev/console"),
- value: config.console,
- defaultValue: true,
- pending: config.getPending('console'),
- onChanged: (v) => lxcBloc!.events
- .add(UpdateLxcConfigBool('console', v)),
- onDeleted: () => lxcBloc!.events
- .add(RevertPendingLxcConfig('console')),
- ),
- ListTile(
- title: const Text("TTY Count"),
- subtitle: Text("${config.tty ?? 2}"),
- ),
- ListTile(
- title: const Text("Console Mode"),
- subtitle: Text(config.cmode?.name ?? 'tty'),
- ),
- PveConfigSwitchListTile(
- title: const Text("Protection"),
- value: config.protection,
- defaultValue: false,
- pending: config.getPending('protection'),
- onChanged: (v) => lxcBloc!.events
- .add(UpdateLxcConfigBool('protection', v)),
- onDeleted: () => lxcBloc!.events
- .add(RevertPendingLxcConfig('protection')),
- ),
- ListTile(
- title: const Text("Unprivileged"),
- subtitle:
- Text(config.unprivileged ?? false ? 'Yes' : 'No'),
- ),
- ListTile(
- title: const Text("Features"),
- subtitle: Text(config.features?.toString() ?? 'none'),
- ),
- ],
- ),
+ appBar: AppBar(),
+ body: SingleChildScrollView(
+ child: Column(
+ children: <Widget>[
+ ListTile(
+ title: const Text("Name"),
+ subtitle: Text(config.hostname ?? 'undefined'),
+ ),
+ PveConfigSwitchListTile(
+ title: const Text("Start on boot"),
+ value: config.onboot,
+ defaultValue: false,
+ pending: config.getPending('onboot'),
+ onChanged: (v) =>
+ lxcBloc!.events.add(UpdateLxcConfigBool('onboot', v)),
+ onDeleted: () =>
+ lxcBloc!.events.add(RevertPendingLxcConfig('onboot')),
+ ),
+ ListTile(
+ title: const Text("Start/Shutdown order"),
+ subtitle: Text(config.startup ?? "Default (any)"),
+ ),
+ ListTile(
+ title: const Text("OS Type"),
+ subtitle: Text("${config.ostype}"),
+ ),
+ ListTile(
+ title: const Text("Architecture"),
+ subtitle: Text("${config.arch}"),
+ ),
+ PveConfigSwitchListTile(
+ title: const Text("/dev/console"),
+ value: config.console,
+ defaultValue: true,
+ pending: config.getPending('console'),
+ onChanged: (v) => lxcBloc!.events
+ .add(UpdateLxcConfigBool('console', v)),
+ onDeleted: () => lxcBloc!.events
+ .add(RevertPendingLxcConfig('console')),
+ ),
+ ListTile(
+ title: const Text("TTY Count"),
+ subtitle: Text("${config.tty ?? 2}"),
+ ),
+ ListTile(
+ title: const Text("Console Mode"),
+ subtitle: Text(config.cmode?.name ?? 'tty'),
+ ),
+ PveConfigSwitchListTile(
+ title: const Text("Protection"),
+ value: config.protection,
+ defaultValue: false,
+ pending: config.getPending('protection'),
+ onChanged: (v) => lxcBloc!.events
+ .add(UpdateLxcConfigBool('protection', v)),
+ onDeleted: () => lxcBloc!.events
+ .add(RevertPendingLxcConfig('protection')),
+ ),
+ ListTile(
+ title: const Text("Unprivileged"),
+ subtitle:
+ Text(config.unprivileged ?? false ? 'Yes' : 'No'),
+ ),
+ ListTile(
+ title: const Text("Features"),
+ subtitle: Text(config.features?.toString() ?? 'none'),
+ ),
+ ],
),
+ ),
);
}
return const Center(
diff --git a/lib/widgets/pve_qemu_options_widget.dart b/lib/widgets/pve_qemu_options_widget.dart
index 7ed0a3e..992a382 100644
--- a/lib/widgets/pve_qemu_options_widget.dart
+++ b/lib/widgets/pve_qemu_options_widget.dart
@@ -19,137 +19,137 @@ class PveQemuOptions extends StatelessWidget {
if (state.config != null) {
final config = state.config!;
return Scaffold(
- appBar: AppBar(
- leading: IconButton(
- icon: const Icon(Icons.close),
- onPressed: () => Navigator.of(context).pop(),
- ),
+ appBar: AppBar(
+ leading: IconButton(
+ icon: const Icon(Icons.close),
+ onPressed: () => Navigator.of(context).pop(),
),
- body: SingleChildScrollView(
- child: Form(
- key: _formKey,
- onChanged: () {},
- child: Column(
- children: <Widget>[
- ListTile(
- title: const Text("Name"),
- subtitle: Text(config.name ?? 'VM$guestID'),
- ),
- PveConfigSwitchListTile(
- title: const Text("Start on boot"),
- value: config.onboot,
- defaultValue: false,
- pending: config.getPending('onboot'),
- onChanged: (v) => bloc.events
- .add(UpdateQemuConfigBool('onboot', v)),
- onDeleted: () => bloc.events
- .add(RevertPendingQemuConfig('onboot')),
- ),
- ListTile(
- title: const Text("Start/Shutdown order"),
- subtitle: Text(config.startup ?? "Default (any)"),
- ),
- ListTile(
- title: const Text("OS Type"),
- subtitle: Text(config.ostype != null
- ? "${config.ostype!.type} ${config.ostype!.description}"
- : "Other"),
- ),
- //TODO add better ui component e.g. collapseable
- ListTile(
- title: const Text("Boot Device"),
- subtitle: Text(config.boot ?? 'Disk, Network, USB'),
- ),
- PveConfigSwitchListTile(
- title: const Text("Use tablet for pointer"),
- value: config.tablet,
- defaultValue: true,
- pending: config.getPending('tablet'),
- onChanged: (v) => bloc.events
- .add(UpdateQemuConfigBool('tablet', v)),
- onDeleted: () => bloc.events
- .add(RevertPendingQemuConfig('tablet')),
- ),
- ListTile(
- title: const Text("Hotplug"),
- subtitle: Text(config.hotplug ?? 'disk,network,usb'),
- ),
- PveConfigSwitchListTile(
- title: const Text("ACPI support"),
- value: config.acpi,
- defaultValue: true,
- pending: config.getPending('acpi'),
- onChanged: (v) =>
- bloc.events.add(UpdateQemuConfigBool('acpi', v)),
- onDeleted: () =>
- bloc.events.add(RevertPendingQemuConfig('acpi')),
- ),
- PveConfigSwitchListTile(
- title: const Text("KVM hardware virtualization"),
- value: config.kvm,
- defaultValue: true,
- pending: config.getPending('kvm'),
- onChanged: (v) =>
- bloc.events.add(UpdateQemuConfigBool('kvm', v)),
- onDeleted: () =>
- bloc.events.add(RevertPendingQemuConfig('kvm')),
- ),
- PveConfigSwitchListTile(
- title: const Text("Freeze CPU on startup"),
- value: config.freeze,
- defaultValue: false,
- pending: config.getPending('freeze'),
- onChanged: (v) => bloc.events
- .add(UpdateQemuConfigBool('freeze', v)),
- onDeleted: () => bloc.events
- .add(RevertPendingQemuConfig('freeze')),
- ),
- PveConfigSwitchListTile(
- title: const Text("Use local time for RTC"),
- value: config.localtime,
- defaultValue: false,
- pending: config.getPending('localtime'),
- onChanged: (v) => bloc.events
- .add(UpdateQemuConfigBool('localtime', v)),
- onDeleted: () => bloc.events
- .add(RevertPendingQemuConfig('localtime')),
- ),
- ListTile(
- title: const Text("RTC start date"),
- subtitle: Text(config.startdate ?? 'now'),
- ),
- ListTile(
- title: const Text("SMBIOS settings (type1)"),
- subtitle: Text(config.smbios1 ?? ''),
- ),
- //Todo enhance UI
- ListTile(
- title: const Text("QEMU Guest Agent"),
- subtitle: Text(config.agent ?? 'Default (disabled)'),
- ),
- PveConfigSwitchListTile(
- title: const Text("Protection"),
- value: config.protection,
- defaultValue: false,
- pending: config.getPending('protection'),
- onChanged: (v) => bloc.events
- .add(UpdateQemuConfigBool('protection', v)),
- onDeleted: () => bloc.events
- .add(RevertPendingQemuConfig('protection')),
- ),
- ListTile(
- title: const Text("Spice Enhancements"),
- subtitle: Text(
- config.spiceEnhancements ?? 'No enhancements'),
- ),
- ListTile(
- title: const Text("VM State Storage"),
- subtitle: Text(config.vmstatestorage ?? 'Automatic'),
- ),
- ],
- ),
+ ),
+ body: SingleChildScrollView(
+ child: Form(
+ key: _formKey,
+ onChanged: () {},
+ child: Column(
+ children: <Widget>[
+ ListTile(
+ title: const Text("Name"),
+ subtitle: Text(config.name ?? 'VM$guestID'),
+ ),
+ PveConfigSwitchListTile(
+ title: const Text("Start on boot"),
+ value: config.onboot,
+ defaultValue: false,
+ pending: config.getPending('onboot'),
+ onChanged: (v) =>
+ bloc.events.add(UpdateQemuConfigBool('onboot', v)),
+ onDeleted: () =>
+ bloc.events.add(RevertPendingQemuConfig('onboot')),
+ ),
+ ListTile(
+ title: const Text("Start/Shutdown order"),
+ subtitle: Text(config.startup ?? "Default (any)"),
+ ),
+ ListTile(
+ title: const Text("OS Type"),
+ subtitle: Text(config.ostype != null
+ ? "${config.ostype!.type} ${config.ostype!.description}"
+ : "Other"),
+ ),
+ //TODO add better ui component e.g. collapseable
+ ListTile(
+ title: const Text("Boot Device"),
+ subtitle: Text(config.boot ?? 'Disk, Network, USB'),
+ ),
+ PveConfigSwitchListTile(
+ title: const Text("Use tablet for pointer"),
+ value: config.tablet,
+ defaultValue: true,
+ pending: config.getPending('tablet'),
+ onChanged: (v) =>
+ bloc.events.add(UpdateQemuConfigBool('tablet', v)),
+ onDeleted: () =>
+ bloc.events.add(RevertPendingQemuConfig('tablet')),
+ ),
+ ListTile(
+ title: const Text("Hotplug"),
+ subtitle: Text(config.hotplug ?? 'disk,network,usb'),
+ ),
+ PveConfigSwitchListTile(
+ title: const Text("ACPI support"),
+ value: config.acpi,
+ defaultValue: true,
+ pending: config.getPending('acpi'),
+ onChanged: (v) =>
+ bloc.events.add(UpdateQemuConfigBool('acpi', v)),
+ onDeleted: () =>
+ bloc.events.add(RevertPendingQemuConfig('acpi')),
+ ),
+ PveConfigSwitchListTile(
+ title: const Text("KVM hardware virtualization"),
+ value: config.kvm,
+ defaultValue: true,
+ pending: config.getPending('kvm'),
+ onChanged: (v) =>
+ bloc.events.add(UpdateQemuConfigBool('kvm', v)),
+ onDeleted: () =>
+ bloc.events.add(RevertPendingQemuConfig('kvm')),
+ ),
+ PveConfigSwitchListTile(
+ title: const Text("Freeze CPU on startup"),
+ value: config.freeze,
+ defaultValue: false,
+ pending: config.getPending('freeze'),
+ onChanged: (v) =>
+ bloc.events.add(UpdateQemuConfigBool('freeze', v)),
+ onDeleted: () =>
+ bloc.events.add(RevertPendingQemuConfig('freeze')),
+ ),
+ PveConfigSwitchListTile(
+ title: const Text("Use local time for RTC"),
+ value: config.localtime,
+ defaultValue: false,
+ pending: config.getPending('localtime'),
+ onChanged: (v) => bloc.events
+ .add(UpdateQemuConfigBool('localtime', v)),
+ onDeleted: () => bloc.events
+ .add(RevertPendingQemuConfig('localtime')),
+ ),
+ ListTile(
+ title: const Text("RTC start date"),
+ subtitle: Text(config.startdate ?? 'now'),
+ ),
+ ListTile(
+ title: const Text("SMBIOS settings (type1)"),
+ subtitle: Text(config.smbios1 ?? ''),
+ ),
+ //Todo enhance UI
+ ListTile(
+ title: const Text("QEMU Guest Agent"),
+ subtitle: Text(config.agent ?? 'Default (disabled)'),
+ ),
+ PveConfigSwitchListTile(
+ title: const Text("Protection"),
+ value: config.protection,
+ defaultValue: false,
+ pending: config.getPending('protection'),
+ onChanged: (v) => bloc.events
+ .add(UpdateQemuConfigBool('protection', v)),
+ onDeleted: () => bloc.events
+ .add(RevertPendingQemuConfig('protection')),
+ ),
+ ListTile(
+ title: const Text("Spice Enhancements"),
+ subtitle:
+ Text(config.spiceEnhancements ?? 'No enhancements'),
+ ),
+ ListTile(
+ title: const Text("VM State Storage"),
+ subtitle: Text(config.vmstatestorage ?? 'Automatic'),
+ ),
+ ],
),
),
+ ),
);
}
return const Center(
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-09-23 12:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 12:23 [pve-devel] [PATCH pve_flutter_frontend v2 0/3] feat: ui: add bottom sheet to show editable options of VMs/CTs Shan Shaji
2025-09-23 12:23 ` Shan Shaji [this message]
2025-09-23 12:23 ` [pve-devel] [PATCH pve_flutter_frontend v2 2/3] feat: ui: add bottom sheet to change VMs/CTs options Shan Shaji
2025-09-23 12:23 ` [pve-devel] [PATCH pve_flutter_frontend v2 3/3] cleanup: remove `PveConfigSwitchListTile` in favor of PveConfigListTile Shan Shaji
2025-09-23 12:57 ` [pve-devel] [PATCH pve_flutter_frontend v2 0/3] feat: ui: add bottom sheet to show editable options of VMs/CTs Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250923122334.301053-2-s.shaji@proxmox.com \
--to=s.shaji@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox