From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id B12281FF15E for <inbox@lore.proxmox.com>; Tue, 6 May 2025 10:25:08 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BBE3B3920; Tue, 6 May 2025 10:25:24 +0200 (CEST) From: Shan Shaji <s.shaji@proxmox.com> To: pve-devel@lists.proxmox.com Date: Tue, 6 May 2025 10:25:01 +0200 Message-Id: <20250506082501.28185-1-s.shaji@proxmox.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.463 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 KAM_SHORT 0.001 Use of a URL Shortener for very short URL RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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. [pub.dev, dart.dev] Subject: [pve-devel] [PATCH pve_flutter_frontend] refactor: remove unused files and address deprecated import X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> This patch removes the `utils_web.dart` file, which contained a deprecated `dart:html` import. Flutter suggest using `package:web` [0]. However this package is an external package [1] and are not included by default with flutter or dart. The `registerConsoleIframe` function had one usage inside the `PveConsoleWidget` , but since the widget is no longer being used, this patch deletes both the `utils_web.dart` and `pve_console_widget.dart` files. - [0] https://dart.dev/interop/js-interop/package-web - [1] https://pub.dev/packages/web Signed-off-by: Shan Shaji <s.shaji@proxmox.com> --- lib/utils/utils.dart | 2 -- lib/utils/utils_web.dart | 15 --------------- lib/widgets/pve_console_widget.dart | 24 ------------------------ 3 files changed, 41 deletions(-) delete mode 100644 lib/utils/utils_web.dart delete mode 100644 lib/widgets/pve_console_widget.dart diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 0507d90..026fad6 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -8,8 +8,6 @@ import 'package:pve_flutter_frontend/states/pve_task_log_viewer_state.dart'; import 'package:pve_flutter_frontend/widgets/pve_console_menu_widget.dart'; import 'package:pve_flutter_frontend/widgets/pve_task_log_widget.dart'; -void registerConsoleIframe(String nodeid) => throw UnimplementedError(); - Future<T?> showTaskLogBottomSheet<T>(BuildContext context, ProxmoxApiClient apiClient, String targetNode, String upid, {Widget icon = const Icon(Icons.work), diff --git a/lib/utils/utils_web.dart b/lib/utils/utils_web.dart deleted file mode 100644 index d09ff67..0000000 --- a/lib/utils/utils_web.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'dart:html'; -import 'dart:ui' as ui; - -void registerConsoleIframe(String nodeid) { - // analyzer - // ignore: undefined_prefixed_name - ui.platformViewRegistry.registerViewFactory( - 'console-html', - (int viewId) => IFrameElement() - ..width = '640' - ..height = '360' - ..src = - 'http://localhost/?console=shell&node=$nodeid&resize=scale&xtermjs=1' - ..style.border = 'none'); -} diff --git a/lib/widgets/pve_console_widget.dart b/lib/widgets/pve_console_widget.dart deleted file mode 100644 index f71c5f0..0000000 --- a/lib/widgets/pve_console_widget.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:pve_flutter_frontend/utils/utils.dart' - if (dart.library.html) 'package:pve_flutter_frontend/utils/utils_web.dart'; - -class PveConsoleWidget extends StatelessWidget { - static const routeName = '/console'; - final String? vmid; - final String nodeid; - const PveConsoleWidget({super.key, this.vmid, required this.nodeid}); - - @override - Widget build(BuildContext context) { - //TODO change this when there's a more official way to determine web e.g. Platform.isWeb or similar - if (kIsWeb) { - registerConsoleIframe(nodeid); - return const HtmlElementView( - viewType: 'console-html', - ); - } else { - return Container(); - } - } -} -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel