sysview-py 0.3.0__tar.gz → 0.3.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sysview-py
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Add your description here
5
5
  Author: Michael Wilson
6
6
  Author-email: Michael Wilson <mw@1wilson.org>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sysview-py"
3
- version = "0.3.0"
3
+ version = "0.3.2"
4
4
  description = "Add your description here"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -53,26 +53,26 @@ class Sysview:
53
53
  loader=PackageLoader("sysview_py"),
54
54
  autoescape=select_autoescape()
55
55
  )
56
- html = env.get_template("card_view.html").render(items=self.hosts, title="Hosts", active="Hosts", path="")
56
+ html = env.get_template("card_view.html").render(items=self.hosts, title="Hosts", active="Hosts", path="", auto_refresh=True)
57
57
  html_path = self.html_root / "index.html"
58
58
  with open(html_path, 'w') as f:
59
59
  f.write(html)
60
60
  for host in self.hosts:
61
- html = env.get_template("card_view.html").render(items=host.all_items, title=host.name, active="Hosts", path="../../")
61
+ html = env.get_template("card_view.html").render(items=host.all_items, title=host.name, active="Hosts", path="../../", auto_refresh=True)
62
62
  host_dir = self.html_hosts / host.name
63
63
  host_dir.mkdir()
64
64
  html_path = host_dir / "host.html"
65
65
  with open(html_path, 'w') as f:
66
66
  f.write(html)
67
67
  for item in host.all_items:
68
- html = env.get_template("service.html").render(item=item, title=host.name, active="Services", path="../../")
68
+ html = env.get_template("service.html").render(item=item, title=host.name, active="Services", path="../../", auto_refresh=False)
69
69
  html_path = host_dir / f"{item.report_type}_{item.id}.html"
70
70
  raw_path = host_dir / f"{item.report_type}_{item.id}.txt"
71
71
  with open(html_path, 'w') as f:
72
72
  f.write(html)
73
73
  with open(raw_path, 'w') as f:
74
74
  f.write(item.raw_item)
75
- html = env.get_template("card_view.html").render(items=self.all_services, title="Services", active="Services", path="")
75
+ html = env.get_template("card_view.html").render(items=self.all_services, title="Services", active="Services", path="", auto_refresh=True)
76
76
  html_path = self.html_root / f"services.html"
77
77
  with open(html_path, 'w') as f:
78
78
  f.write(html)
@@ -6,6 +6,9 @@
6
6
  <title>sysview::{{ title }}</title>
7
7
  <link rel="stylesheet" href="{{ path }}static/simple.css">
8
8
  <link rel="stylesheet" href="{{ path }}static/sysview.css">
9
+ {% if auto_refresh == True %}
10
+ <meta http-equiv="refresh" content="60">
11
+ {% endif %}
9
12
  </head>
10
13
  <body><header>
11
14
  <nav>
File without changes