serverwatcher 6.dev19__py3-none-any.whl → 6.dev20__py3-none-any.whl
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.
- serverwatcher/watchercli.py +14 -27
- {serverwatcher-6.dev19.dist-info → serverwatcher-6.dev20.dist-info}/METADATA +1 -1
- {serverwatcher-6.dev19.dist-info → serverwatcher-6.dev20.dist-info}/RECORD +6 -6
- {serverwatcher-6.dev19.dist-info → serverwatcher-6.dev20.dist-info}/WHEEL +0 -0
- {serverwatcher-6.dev19.dist-info → serverwatcher-6.dev20.dist-info}/licenses/LICENSE +0 -0
- {serverwatcher-6.dev19.dist-info → serverwatcher-6.dev20.dist-info}/top_level.txt +0 -0
serverwatcher/watchercli.py
CHANGED
|
@@ -20,23 +20,17 @@ class WatcherCLI(LiveCLI):
|
|
|
20
20
|
self.safePrint(res('<yellow>-------- <aqua>ServerWatcher CLI <yellow>--------'))
|
|
21
21
|
self.safePrint(res('<yellow>-----------------------------------'))
|
|
22
22
|
self.safePrint('')
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
|
|
25
25
|
@command('stats', requires_children=True)
|
|
26
26
|
def stats():
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
stats.__description__ = 'Retrieve and print server statistics'
|
|
27
|
+
stats.__description__ = 'Retrieve and print server statistics'
|
|
30
28
|
|
|
31
29
|
|
|
32
30
|
@stats.child('get', requires_arguments=False)
|
|
33
31
|
def stats_get(self, arg=None):
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
stats_get.__description__ = 'Retrieve and print all or specific server statistics'
|
|
37
|
-
|
|
32
|
+
stats_get.__description__ = 'Retrieve and print all or specific server statistics'
|
|
38
33
|
|
|
39
|
-
def stats_get(self, arg=None):
|
|
40
34
|
self.watcher.server.refresh()
|
|
41
35
|
|
|
42
36
|
if arg is not None:
|
|
@@ -77,36 +71,30 @@ def stats_get(self, arg=None):
|
|
|
77
71
|
return
|
|
78
72
|
|
|
79
73
|
|
|
80
|
-
@
|
|
74
|
+
@stats_get.param('rounding', type=int, default=2)
|
|
81
75
|
def rounding(value):
|
|
82
76
|
return value
|
|
83
77
|
|
|
84
78
|
|
|
85
|
-
@
|
|
79
|
+
@stats_get.param('mode', type=str, default='current')
|
|
86
80
|
def mode(value):
|
|
87
81
|
return value
|
|
88
82
|
|
|
89
83
|
|
|
90
|
-
@
|
|
84
|
+
@stats_get.flag('raw')
|
|
91
85
|
def raw():
|
|
92
86
|
return True
|
|
93
87
|
|
|
94
88
|
|
|
95
89
|
@command('view', requires_children=True)
|
|
96
90
|
def view():
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
view.__description__ = 'Switch terminal view'
|
|
91
|
+
view.__description__ = 'Switch terminal view'
|
|
100
92
|
|
|
101
93
|
|
|
102
94
|
@view.child('cli')
|
|
103
95
|
def view_cli(self):
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
view_cli.__description__ = 'Switch to CLI view'
|
|
96
|
+
view_cli.__description__ = 'Switch to CLI view'
|
|
107
97
|
|
|
108
|
-
|
|
109
|
-
def view_cli(self):
|
|
110
98
|
self.watcher.router.disableOriginOutput()
|
|
111
99
|
self.outputMode = 'cli'
|
|
112
100
|
self.buffer.enabled = True
|
|
@@ -118,12 +106,8 @@ def view_cli(self):
|
|
|
118
106
|
|
|
119
107
|
@view.child('watcher')
|
|
120
108
|
def view_watcher(self):
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
view_watcher.__description__ = 'Switch to Watcher view'
|
|
109
|
+
view_watcher.__description__ = 'Switch to Watcher view'
|
|
124
110
|
|
|
125
|
-
|
|
126
|
-
def view_watcher(self):
|
|
127
111
|
self.watcher.router.enableOriginOutput()
|
|
128
112
|
self.outputMode = 'both'
|
|
129
113
|
utils.clearTerminal()
|
|
@@ -134,9 +118,12 @@ def view_watcher(self):
|
|
|
134
118
|
|
|
135
119
|
@command('clear')
|
|
136
120
|
def clear():
|
|
137
|
-
|
|
121
|
+
clear.__description__ = 'Clear the CLI terminal'
|
|
138
122
|
|
|
139
|
-
|
|
123
|
+
no_buf = no_buffer()
|
|
124
|
+
if not no_buf:
|
|
125
|
+
self = None # placeholder if you later want instance-bound clear
|
|
126
|
+
utils.clearTerminal()
|
|
140
127
|
|
|
141
128
|
|
|
142
129
|
@clear.flag('no-buffer')
|
|
@@ -4,7 +4,7 @@ serverwatcher/cli.py,sha256=b77rWfjQuqHiRGaVQj-O5EygJGdufMasRBUUqKcasAM,9887
|
|
|
4
4
|
serverwatcher/livecli.py,sha256=GC-OBSL-EkGRFyuHLx8wjgsDh6d7y2OEr_SIQxGX-WU,8815
|
|
5
5
|
serverwatcher/validator.py,sha256=aD6GHOz1S5VFC93Mj89WO9vZG1bTjhg7QZbdlvQf4wo,1778
|
|
6
6
|
serverwatcher/watcher.py,sha256=ZiocJpeyhKTGOwYYak36MXNEFpLnpdl9v6BnMPGrBmM,13593
|
|
7
|
-
serverwatcher/watchercli.py,sha256=
|
|
7
|
+
serverwatcher/watchercli.py,sha256=tzAtpKNrKqRqx5VB5Edta702_PrQnJGC3_O_SzeUB58,3545
|
|
8
8
|
serverwatcher/configclasses/__init__.py,sha256=YS0KhxtAJGdMcaiFstqTRNxIPLnR7s9v3Tkt5h2uKE4,182
|
|
9
9
|
serverwatcher/configclasses/config.py,sha256=1Upor55QFE4UIOqL9ZYa4U5kbda48GG9HWdRXg8mb_Y,2418
|
|
10
10
|
serverwatcher/configclasses/messages.py,sha256=iOkCvwagngW4aeWD5I6hi6cqqDkzEsFJsLHSuqK-P1s,3467
|
|
@@ -14,8 +14,8 @@ serverwatcher/defaultconfigs/messages.yaml,sha256=jSVEl-RYqPHhe5U5KLl8zfJtUBymvy
|
|
|
14
14
|
serverwatcher/defaultconfigs/watcher.yaml,sha256=GlAEKCuzFUSF6wWOqQLFL1CeuPltb1ltfYxFe_FUClw,723
|
|
15
15
|
serverwatcher/tests/test.py,sha256=EPJXmIJ4lLfuT-xFuAqrh52O_yYTQdQl17Djzr72v18,3711
|
|
16
16
|
serverwatcher/tests/test2.py,sha256=pDFB3LTZZXdrkofCF9tDGlkUzNXq3AzK225Ww6H2EAw,1702
|
|
17
|
-
serverwatcher-6.
|
|
18
|
-
serverwatcher-6.
|
|
19
|
-
serverwatcher-6.
|
|
20
|
-
serverwatcher-6.
|
|
21
|
-
serverwatcher-6.
|
|
17
|
+
serverwatcher-6.dev20.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
18
|
+
serverwatcher-6.dev20.dist-info/METADATA,sha256=3pwi8D_Zk9KNTppZVrTfBn1UBQRHR-s8OsAxSnC2cUg,2647
|
|
19
|
+
serverwatcher-6.dev20.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
20
|
+
serverwatcher-6.dev20.dist-info/top_level.txt,sha256=8DJAf8WmmglgtZHkp8aoTriRJ2YPcS4F3DfOIkytASo,14
|
|
21
|
+
serverwatcher-6.dev20.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|