public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pmg-devel@lists.proxmox.com
Cc: Wolfgang Bumiller <w.bumiller@proxmox.com>
Subject: [pmg-devel] applied: [PATCH] panel/acme-domains: fix cyclic dependency in view model
Date: Tue, 23 Mar 2021 17:29:16 +0100	[thread overview]
Message-ID: <20210323162916.23803-1-t.lamprecht@proxmox.com> (raw)

A view model forumla cannot depend on itself, as that is a dependency
cycle.

In this specific case we can just drop the `hasUsage` forumla entry
completely, it is bogus as it was just returning its value, and that
is actually taken care of by the `hasUsage` data binding.

The debug build of ExtJS throws an exception on such cycles, the
release build does not cares to much and seems to do the right thing
already here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---

@Wolfgang, or was there an actual reason this formula got added in the first
place?

 src/panel/ACMEDomains.js | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/panel/ACMEDomains.js b/src/panel/ACMEDomains.js
index f66975f..2b6c204 100644
--- a/src/panel/ACMEDomains.js
+++ b/src/panel/ACMEDomains.js
@@ -47,7 +47,6 @@ Ext.define('Proxmox.panel.ACMEDomains', {
 	    editBtnIcon: (get) => 'fa black fa-' + (get('accountEditable') ? 'check' : 'pencil'),
 	    accountTextHidden: (get) => get('accountEditable') || !get('accountsAvailable'),
 	    accountValueHidden: (get) => !get('accountEditable') || !get('accountsAvailable'),
-	    hasUsage: (get) => get('hasUsage'),
 	},
     },
 
-- 
2.20.1





             reply	other threads:[~2021-03-23 16:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 16:29 Thomas Lamprecht [this message]
2021-03-23 17:27 ` Thomas Lamprecht
2021-03-23 18:22 Dietmar Maurer
2021-03-24  7:21 ` Thomas Lamprecht
2021-03-24  7:31   ` Dominik Csapak
2021-03-24  7:34     ` 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=20210323162916.23803-1-t.lamprecht@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    --cc=w.bumiller@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal