termainer 0.5.2a0__tar.gz → 0.5.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. {termainer-0.5.2a0/src/termainer.egg-info → termainer-0.5.3}/PKG-INFO +1 -1
  2. {termainer-0.5.2a0 → termainer-0.5.3}/pyproject.toml +1 -1
  3. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/app.py +3 -3
  4. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/ui/dashboard.py +2 -2
  5. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/ui/environment.py +36 -16
  6. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/ui/home.py +2 -2
  7. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/ui/splash.py +2 -2
  8. termainer-0.5.3/src/termainer/version.py +12 -0
  9. {termainer-0.5.2a0 → termainer-0.5.3/src/termainer.egg-info}/PKG-INFO +1 -1
  10. termainer-0.5.2a0/src/termainer/version.py +0 -1
  11. {termainer-0.5.2a0 → termainer-0.5.3}/MANIFEST.in +0 -0
  12. {termainer-0.5.2a0 → termainer-0.5.3}/README.md +0 -0
  13. {termainer-0.5.2a0 → termainer-0.5.3}/setup.cfg +0 -0
  14. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/__init__.py +0 -0
  15. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/config.py +0 -0
  16. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/config_manager.py +0 -0
  17. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/locale.py +0 -0
  18. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/providers/__init__.py +0 -0
  19. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/providers/base.py +0 -0
  20. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/providers/docker.py +0 -0
  21. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/providers/kubernetes.py +0 -0
  22. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/providers/openshift.py +0 -0
  23. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/providers/podman.py +0 -0
  24. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/providers/swarm.py +0 -0
  25. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/remote/__init__.py +0 -0
  26. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/remote/ssh.py +0 -0
  27. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/server_manager.py +0 -0
  28. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/ssh_config.py +0 -0
  29. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/storage.py +0 -0
  30. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/ui/__init__.py +0 -0
  31. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/ui/logo.png +0 -0
  32. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/ui/styles.tcss +0 -0
  33. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/ui/widgets.py +0 -0
  34. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/utils/__init__.py +0 -0
  35. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer/utils/helpers.py +0 -0
  36. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer.egg-info/SOURCES.txt +0 -0
  37. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer.egg-info/dependency_links.txt +0 -0
  38. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer.egg-info/entry_points.txt +0 -0
  39. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer.egg-info/requires.txt +0 -0
  40. {termainer-0.5.2a0 → termainer-0.5.3}/src/termainer.egg-info/top_level.txt +0 -0
  41. {termainer-0.5.2a0 → termainer-0.5.3}/tests/test_app.py +0 -0
  42. {termainer-0.5.2a0 → termainer-0.5.3}/tests/test_config.py +0 -0
  43. {termainer-0.5.2a0 → termainer-0.5.3}/tests/test_config_manager.py +0 -0
  44. {termainer-0.5.2a0 → termainer-0.5.3}/tests/test_providers.py +0 -0
  45. {termainer-0.5.2a0 → termainer-0.5.3}/tests/test_server_manager.py +0 -0
  46. {termainer-0.5.2a0 → termainer-0.5.3}/tests/test_ssh_config.py +0 -0
  47. {termainer-0.5.2a0 → termainer-0.5.3}/tests/test_ui.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: termainer
3
- Version: 0.5.2a0
3
+ Version: 0.5.3
4
4
  Summary: Container observability and operations directly from your terminal
5
5
  Author: Alan Stefanov
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "termainer"
7
- version = "0.5.2-alpha"
7
+ version = "0.5.3"
8
8
  description = "Container observability and operations directly from your terminal"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -24,7 +24,7 @@ from .providers.swarm import SwarmProvider
24
24
  from .remote.ssh import SSHConnection
25
25
  from .server_manager import ServerConnection, ServerManager, provider_class_for
26
26
  from .ui.splash import BootScreen
27
- from .version import VERSION
27
+ from .version import VERSION_DISPLAY
28
28
 
29
29
 
30
30
  def _check_command(command: list[str]) -> bool:
@@ -99,7 +99,7 @@ def run_doctor() -> int:
99
99
 
100
100
  checks.append(True)
101
101
  core_checks.append(True)
102
- _print_doctor_line(True, "Version", VERSION)
102
+ _print_doctor_line(True, "Version", VERSION_DISPLAY)
103
103
 
104
104
  print()
105
105
  if all(checks):
@@ -275,7 +275,7 @@ def parse_args() -> argparse.Namespace:
275
275
  parser.add_argument(
276
276
  "--version",
277
277
  action="version",
278
- version=f"%(prog)s {VERSION}",
278
+ version=f"%(prog)s {VERSION_DISPLAY}",
279
279
  help="Show version and exit",
280
280
  )
281
281
  parser.add_argument(
@@ -27,7 +27,7 @@ from ..remote.ssh import SSHConnection
27
27
  from ..server_manager import ServerConnection, ServerManager, provider_class_for
28
28
  from ..storage import save_provider_servers_cache, get_cached_aliases
29
29
  from ..utils.helpers import build_report_header, format_timestamp
30
- from ..version import VERSION
30
+ from ..version import VERSION_DISPLAY
31
31
  from .widgets import ContainerItem, DetailsWidget, LogWidget, StatsWidget
32
32
 
33
33
 
@@ -155,7 +155,7 @@ class Dashboard(Screen):
155
155
  )
156
156
 
157
157
  brand_row = Horizontal(
158
- Static(f"[bold #22d3ee][ ][/] [bold #22d3ee]TERMAINER[/] [#5c5c5c]v{VERSION}[/]", id="top-brand"),
158
+ Static(f"[bold #22d3ee][ ][/] [bold #22d3ee]TERMAINER[/] [#5c5c5c]v{VERSION_DISPLAY}[/]", id="top-brand"),
159
159
  Static(_("dashboard.tagline"), id="top-tagline"),
160
160
  Static(connection_status, id="top-status"),
161
161
  id="top-bar-row",
@@ -25,7 +25,7 @@ from ..storage import (
25
25
  save_provider_servers_cache,
26
26
  save_user_server,
27
27
  )
28
- from ..version import VERSION
28
+ from ..version import VERSION_DISPLAY
29
29
  from .dashboard import Dashboard
30
30
 
31
31
 
@@ -212,7 +212,7 @@ class ServerSelectionModal(ModalScreen[Optional[List[str]]]):
212
212
  Static(_("environment.modal.info_app_config"), id="info-app-config"),
213
213
  Static("[bold]➕ " + _("environment.modal.info_howto_title") + "[/]", id="info-howto-title"),
214
214
  Static(_("environment.modal.info_howto"), id="info-howto"),
215
- Static(_("environment.modal.info_thanks", version=VERSION), id="info-thanks"),
215
+ Static(_("environment.modal.info_thanks", version=VERSION_DISPLAY), id="info-thanks"),
216
216
  Static("[dim]" + _("environment.modal.info_feedback") + "[/]", id="info-feedback"),
217
217
  id="sel-body-right",
218
218
  ),
@@ -497,7 +497,7 @@ class EnvironmentScreen(Screen):
497
497
  rows.append(Horizontal(*row_cards, id=f"env-row-{len(rows)}"))
498
498
 
499
499
  yield Vertical(
500
- Static(f"[bold #22d3ee]TERMAINER[/] [#808080]v{VERSION}[/]", id="env-brand"),
500
+ Static(f"[bold #22d3ee]TERMAINER[/] [#808080]v{VERSION_DISPLAY}[/]", id="env-brand"),
501
501
  Static(_("environment.title"), id="env-title"),
502
502
  Static(
503
503
  f"[dim]{_('environment.copy')}[/]",
@@ -608,14 +608,16 @@ class EnvironmentScreen(Screen):
608
608
  provider_name = action_name.replace("open_provider_", "")
609
609
 
610
610
  matches = self._servers_for_provider(provider_name)
611
+ servers = get_all_ssh_servers()
612
+
613
+ if servers:
614
+ self.app.push_screen(
615
+ ServerSelectionModal(provider_name, servers),
616
+ lambda aliases: self._on_server_selected(aliases, provider_name, matches)
617
+ )
618
+ return
619
+
611
620
  if not matches:
612
- servers = get_all_ssh_servers()
613
- if servers:
614
- self.app.push_screen(
615
- ServerSelectionModal(provider_name, servers),
616
- lambda aliases: self._on_server_selected(aliases, provider_name)
617
- )
618
- return
619
621
  if self._provider_cli_available(provider_name):
620
622
  if provider_name in {"kubernetes", "openshift"}:
621
623
  if self._has_remote_servers:
@@ -649,16 +651,34 @@ class EnvironmentScreen(Screen):
649
651
  )
650
652
  )
651
653
 
652
- def _on_server_selected(self, aliases: Optional[List[str]], provider_name: str) -> None:
654
+ def _on_server_selected(
655
+ self,
656
+ aliases: Optional[List[str]],
657
+ provider_name: str,
658
+ existing_matches: Optional[List[ServerConnection]] = None,
659
+ ) -> None:
653
660
  if not aliases:
661
+ if existing_matches:
662
+ self.app.switch_screen(
663
+ Dashboard(
664
+ ServerManager(existing_matches),
665
+ server_label=None,
666
+ root_server_manager=self._server_manager,
667
+ )
668
+ )
654
669
  return
655
670
  self.app.push_screen(ConnectingModal(provider_name))
656
- self.run_worker(self._probe_servers(aliases, provider_name))
657
-
658
- async def _probe_servers(self, aliases: List[str], provider_name: str) -> None:
671
+ self.run_worker(self._probe_servers(aliases, provider_name, existing_matches or []))
672
+
673
+ async def _probe_servers(
674
+ self,
675
+ aliases: List[str],
676
+ provider_name: str,
677
+ existing_matches: Optional[List[ServerConnection]] = None,
678
+ ) -> None:
659
679
  health_check = HEALTH_CHECKS.get(provider_name, [provider_name])
660
680
  servers = get_all_ssh_servers()
661
- successful: List[ServerConnection] = []
681
+ successful: List[ServerConnection] = list(existing_matches or [])
662
682
 
663
683
  async def probe_one(alias: str) -> Optional[ServerConnection]:
664
684
  srv = servers.get(alias)
@@ -691,7 +711,7 @@ class EnvironmentScreen(Screen):
691
711
 
692
712
  save_provider_servers_cache(provider_name, [c.label for c in successful])
693
713
 
694
- if not successful:
714
+ if len(successful) == len(existing_matches or []):
695
715
  self.notify(
696
716
  _("environment.notify.ssh_probe_not_found", provider=provider_name.capitalize()),
697
717
  severity="warning",
@@ -9,7 +9,7 @@ from textual.widgets import Static
9
9
 
10
10
  from ..locale import _
11
11
  from ..server_manager import ServerManager
12
- from ..version import VERSION
12
+ from ..version import VERSION_DISPLAY
13
13
 
14
14
 
15
15
  # ── ASCII art ─────────────────────────────────────────────────────────────────
@@ -38,7 +38,7 @@ class HeaderWidget(Horizontal):
38
38
 
39
39
  def compose(self) -> ComposeResult:
40
40
  yield Static(
41
- f"[bold #66FF33][ >_ ][/] [bold #66FF33]TERMAINER[/] [dim #66FF33]v{VERSION}[/]",
41
+ f"[bold #66FF33][ >_ ][/] [bold #66FF33]TERMAINER[/] [dim #66FF33]v{VERSION_DISPLAY}[/]",
42
42
  id="home-logo",
43
43
  )
44
44
  yield Static(f"─── {_('home.welcome')} ───", id="home-welcome")
@@ -9,10 +9,10 @@ from textual.widgets import Static
9
9
 
10
10
  from ..locale import _
11
11
  from ..server_manager import ServerManager
12
- from ..version import VERSION
12
+ from ..version import VERSION_DISPLAY
13
13
 
14
14
 
15
- _BRAND = f"[bold #66FF33] [ >_ ] T · E · R · M · A · I · N · E · R v{VERSION} [/]"
15
+ _BRAND = f"[bold #66FF33] [ >_ ] T · E · R · M · A · I · N · E · R v{VERSION_DISPLAY} [/]"
16
16
 
17
17
  _BOOT_STEP_KEYS: list[tuple[str, str]] = [
18
18
  ("splash.boot.init", "#66FF33"),
@@ -0,0 +1,12 @@
1
+ import re
2
+
3
+ VERSION = "0.5.3"
4
+
5
+
6
+ def _to_display(v: str) -> str:
7
+ for tag, label in [("a", "alpha"), ("b", "beta"), ("rc", "rc")]:
8
+ v = re.sub(rf"{tag}(\d+)$", rf"-{label}\1", v)
9
+ return v
10
+
11
+
12
+ VERSION_DISPLAY = _to_display(VERSION)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: termainer
3
- Version: 0.5.2a0
3
+ Version: 0.5.3
4
4
  Summary: Container observability and operations directly from your terminal
5
5
  Author: Alan Stefanov
6
6
  License: MIT
@@ -1 +0,0 @@
1
- VERSION = "0.5.2-alpha"
File without changes
File without changes
File without changes
File without changes
File without changes