From nobody Sat Dec 21 13:52:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) client-ip=66.187.230.42; envelope-from=kimchi-devel-bounces@ovirt.org; helo=lists.ovirt.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of ovirt.org designates 66.187.230.42 as permitted sender) smtp.mailfrom=kimchi-devel-bounces@ovirt.org; Return-Path: Received: from lists.ovirt.org (lists.phx.ovirt.org [66.187.230.42]) by mx.zohomail.com with SMTPS id 1490625729116134.59192754648598; Mon, 27 Mar 2017 07:42:09 -0700 (PDT) Received: from lists.phx.ovirt.org (localhost [127.0.0.1]) by lists.ovirt.org (Postfix) with ESMTP id DF8F5820818; Mon, 27 Mar 2017 14:42:06 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lists.ovirt.org (Postfix) with ESMTPS id BF9AF820728 for ; Mon, 27 Mar 2017 14:42:00 +0000 (UTC) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2REeMjU077470 for ; Mon, 27 Mar 2017 10:42:00 -0400 Received: from e24smtp05.br.ibm.com (e24smtp05.br.ibm.com [32.104.18.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 29f3kabxh6-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 27 Mar 2017 10:41:59 -0400 Received: from localhost by e24smtp05.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 27 Mar 2017 11:41:57 -0300 Received: from d24relay04.br.ibm.com (9.18.232.146) by e24smtp05.br.ibm.com (10.172.0.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 27 Mar 2017 11:41:56 -0300 Received: from d24av03.br.ibm.com (d24av03.br.ibm.com [9.8.31.95]) by d24relay04.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v2REft6S31260898 for ; Mon, 27 Mar 2017 11:41:55 -0300 Received: from d24av03.br.ibm.com (localhost [127.0.0.1]) by d24av03.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v2REfu8O004234 for ; Mon, 27 Mar 2017 11:41:56 -0300 Received: from alinefm-TP440.br.ibm.com (alinefm-TP440.br.ibm.com [9.18.239.40]) by d24av03.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v2REfuTI004231 for ; Mon, 27 Mar 2017 11:41:56 -0300 X-Original-To: kimchi-devel@ovirt.org From: Aline Manera To: Kimchi Devel Date: Mon, 27 Mar 2017 11:41:55 -0300 X-Mailer: git-send-email 2.9.3 X-TM-AS-MML: disable x-cbid: 17032714-0032-0000-0000-0000054E7AEA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17032714-0033-0000-0000-000011D2B9ED Message-Id: <20170327144155.30633-1-alinefm@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-27_13:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703270126 Subject: [Kimchi-devel] [PATCH] [Kimchi] Bug fix: Inform user there is no interface available when creating a network X-BeenThere: kimchi-devel@ovirt.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: kimchi-devel-bounces@ovirt.org Errors-To: kimchi-devel-bounces@ovirt.org X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When there is no interface available, the user will not be able to create some networks so inform that to user using the existing drop down menu instead of a label message fixed in the dialog (which was displayed even though for network not requiring an interface). Signed-off-by: Aline Manera Reviewed-by: Daniel Barboza --- ui/js/src/kimchi.network_add_main.js | 7 +++---- ui/pages/network-add.html.tmpl | 7 ++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ui/js/src/kimchi.network_add_main.js b/ui/js/src/kimchi.networ= k_add_main.js index e1fdf13..c990e89 100644 --- a/ui/js/src/kimchi.network_add_main.js +++ b/ui/js/src/kimchi.network_add_main.js @@ -1,7 +1,7 @@ /* * Project Kimchi * - * Copyright IBM Corp, 2015-2016 + * Copyright IBM Corp, 2015-2017 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -79,9 +79,8 @@ kimchi.setDefaultNetworkType =3D function(isInterfaceAvai= l, bEdit) { if (!bEdit) { kimchi.enableBridgeOptions(false); } - $("#networkBriDisabledLabel").removeClass('hidden'); - } else { - $("#networkBriDisabledLabel").remove(); + $("#destinationList button").addClass("disabled"); + $("#networkDestinationID").attr("title", "No interface available"); } }; =20 diff --git a/ui/pages/network-add.html.tmpl b/ui/pages/network-add.html.tmpl index 14373ff..47be6f3 100644 --- a/ui/pages/network-add.html.tmpl +++ b/ui/pages/network-add.html.tmpl @@ -1,7 +1,7 @@ #* * Project Kimchi * - * Copyright IBM Corp, 2015-2016 + * Copyright IBM Corp, 2015-2017 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,11 +46,8 @@ -
-

$_("(No interfaces found)")

-
-
+