Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1942d6ecdf | ||
|
|
b402591cdf |
No files matched your search
@@ -3,7 +3,7 @@
|
||||
|
||||
#define AppName "NetBox Synchronizer"
|
||||
#ifndef AppVersion
|
||||
#define AppVersion "4.10.0"
|
||||
#define AppVersion "4.10.1"
|
||||
#endif
|
||||
#define AppPublisher "Louis-Alexander Kerst"
|
||||
#define AppExeName "NetBoxSynchronizer.exe"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""NetBox Synchronizer – VMs, switches and clients from the field into NetBox."""
|
||||
|
||||
APP_NAME = "NetBox Synchronizer"
|
||||
APP_VERSION = "4.10.0"
|
||||
APP_VERSION = "4.10.1"
|
||||
APP_PUBLISHER = "Louis-Alexander Kerst"
|
||||
APP_USER_MODEL_ID = "Louis-AlexanderKerst.NetBoxSynchronizer"
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ class AccessPointsPage(Page):
|
||||
self.body.addWidget(source)
|
||||
|
||||
result = Card("Abgleich")
|
||||
self.sites_button = result.add_action(button("Standorte & Mandanten …", "globe", on_click=self.map_sites))
|
||||
self.sites_button = result.add_action(button("Standorte && Mandanten …", "globe", on_click=self.map_sites))
|
||||
self.refresh_button = result.add_action(button("Neu abgleichen", "refresh", on_click=self.compare))
|
||||
filters = QHBoxLayout()
|
||||
self.search = SearchField("Name, S/N, MAC, IP, Standort …")
|
||||
@@ -269,7 +269,8 @@ class AccessPointsPage(Page):
|
||||
def done(result):
|
||||
self.tenants, roles = result
|
||||
settings = self._settings()
|
||||
self.tenant.set_items(self.tenants, settings.get("tenant_id"))
|
||||
# The tenant is always chosen deliberately – never preselected.
|
||||
self.tenant.set_items(self.tenants)
|
||||
role_id = settings.get("role_id") or next(
|
||||
(role_id for name, role_id in roles if name.casefold() in ROLE_HINTS
|
||||
or "access point" in name.casefold()), None)
|
||||
|
||||
+16
-10
@@ -257,20 +257,26 @@ class EmptyState(QWidget):
|
||||
layout.addStretch(2)
|
||||
layout.setContentsMargins(24, 16, 24, 16)
|
||||
|
||||
def minimumSizeHint(self):
|
||||
# Word-wrapped labels report almost no minimum height, so a small card
|
||||
# would squeeze icon, title and text on top of each other.
|
||||
width = max(self.width(), 320) - 48
|
||||
height = 32 + 56 + self.title_label.heightForWidth(width) + self.text_label.heightForWidth(min(width, 520))
|
||||
height += 2 * 10
|
||||
def _heights(self, width):
|
||||
width = max(width, 320) - 48
|
||||
core = 32 + self.title_label.heightForWidth(width) + 10
|
||||
if self.action is not None:
|
||||
height += 16 + self.action.sizeHint().height()
|
||||
return QSize(260, height)
|
||||
core += 16 + self.action.sizeHint().height()
|
||||
return core, self.text_label.heightForWidth(min(width, 520)) + 10, 56 + 10
|
||||
|
||||
def minimumSizeHint(self):
|
||||
# Title and button always fit; icon and text are dropped when space is short.
|
||||
core, _text, _icon = self._heights(self.width())
|
||||
return QSize(260, core)
|
||||
|
||||
def resizeEvent(self, event):
|
||||
super().resizeEvent(event)
|
||||
if event.size().width() != event.oldSize().width():
|
||||
self.updateGeometry()
|
||||
# Word-wrapped labels report almost no minimum height, so a small card
|
||||
# would squeeze icon, title, text and button on top of each other.
|
||||
core, text, icon_height = self._heights(event.size().width())
|
||||
available = event.size().height()
|
||||
self.text_label.setVisible(available >= core + text)
|
||||
self.icon_label.setVisible(available >= core + text + icon_height)
|
||||
|
||||
def set_text(self, title=None, text=None):
|
||||
if title is not None:
|
||||
|
||||
Reference in new issue
Block a user