From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 8CDC31FF191 for ; Tue, 23 Sep 2025 11:36:44 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 280889776; Tue, 23 Sep 2025 11:37:08 +0200 (CEST) From: Shan Shaji To: pve-devel@lists.proxmox.com Date: Tue, 23 Sep 2025 11:36:27 +0200 Message-ID: <20250923093629.119418-2-s.shaji@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250923093629.119418-1-s.shaji@proxmox.com> References: <20250923093629.119418-1-s.shaji@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1758620210131 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.148 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [bloc.events, config.name] Subject: [pve-devel] [PATCH pve_flutter_frontend 1/3] cleanup: run `dart format` on both qemu and lxc options page X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Signed-off-by: Shan Shaji --- 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: [ - 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: [ + 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: [ - 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: [ + 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