Kim Alvefur
f3b1b57a70
mod_admin_shell: Allow matching on host or bare JID in c2s:show
...
Only supporting exact match on full JID isn't helpful if you want to
list sessions per host or user.
Backport of 430333198e4c
Fixes #1857
3 years ago
Kim Alvefur
506ee45da2
mod_admin_shell: Fix display of remote cert status when expired etc
...
Looks like autocomplete unhelpfully capitalized this word, but it's
lowercase where it is set in mod_s2s_auth_certs
3 years ago
Kim Alvefur
67ea0ee50e
mod_admin_socket: Return error on unhandled input to prevent apparent freeze
...
When mod_admin_socket is loaded without mod_admin_shell, attempt to use
`prosodyctl shell` will appear to freeze after any input, since no
response is returned.
3 years ago
Kim Alvefur
20532df525
mod_admin_shell: Ensure available connection for column 'secure'
...
Similar to #1777
3 years ago
Kim Alvefur
c51152432a
mod_admin_shell: Ensure connection exists to get port from ( fixes #1777 )
3 years ago
Kim Alvefur
ee21d9480a
mod_admin_shell: Switch names for user role management commands
...
user:roles() does not convey that this is the mutating command, it
should have been called setroles from the start but wasn't due to lack
of foresight. This has to accidentally removing roles when wanting to
show them.
3 years ago
Kim Alvefur
dc79c92cbc
mod_admin_shell: Tighten up type checks to fix #1754 (thanks clouded)
...
Due to the dummy statistics provider (see core.statsmanager line 250)
having a metatable that allows infinite indexing where everything is
always the same table, which end up in suf() in the concatenation line.
4 years ago
Kim Alvefur
0e6391e736
mod_admin_shell: Use a table to show help sections
...
Because tables make everything better and more readable!
4 years ago
Kim Alvefur
f9478ab242
mod_admin_shell: Squeeze some characters out of the Certificate column
...
The more compact these are, the better
4 years ago
Kim Alvefur
89c2a5ac30
mod_admin_shell: Fix description of muc:room() (thanks Link Mauve)
...
But then this is the internal API which is weird and unfriendly to
expose externally. Lots of methods to wrap tho ... one day.
4 years ago
Kim Alvefur
fd5a0f6a06
mod_admin_shell: Track connected events instead of created
...
The connection events are more appropriate here, where the s2s-created
events happens a bit later or earlier in a sessions lifetime depending
on its direction and for outgoing connections isn't actually the
creation time (which happens immediately after pressing enter, so not
very interesting), but rather closer to the connection time.
4 years ago
Kim Alvefur
0bff4f57cc
mod_admin_shell: Fix typo in comment [codespell]
4 years ago
Kim Alvefur
8fbf286e64
mod_admin_shell: Add descriptions of each column to 'help columns'
...
Since some of the titles are quite dense
4 years ago
Kim Alvefur
b5a87898ee
mod_admin_shell: Use exact match instead of Lua patterns in c2s,s2s:show
...
It is unexpected that 'example.com' matches 'exampleicom.org' and this
use of Lua patterns is undocumented and unlikely to be widely known or
used.
4 years ago
Kim Alvefur
46ad556ca0
mod_admin_shell: Fix traceback on rendering graph of stats without extra labels
...
Stops an error when extra_labels is nil since it attempts to index it
Unsure about correctness
4 years ago
Kim Alvefur
d9f7b26328
mod_admin_shell: Add help section about stats
4 years ago
Kim Alvefur
09d7e131d0
mod_admin_shell: Add help section about customizing table columns
4 years ago
Kim Alvefur
7a706aecec
mod_admin_shell: Add command to show current user roles
4 years ago
Kim Alvefur
1809c0460f
mod_admin_shell: Add help section about roles
...
As in the argument to user:create() and user:roles()
Tricky to come up with something sensible to write when Prosody core
only knows of the 'prosody:admin' role so far.
4 years ago
Kim Alvefur
28bd099515
mod_admin_shell: Log creation of incoming s2s connections during ping
...
The 's2s-created' fires just after accepting the TCP connection, before
the addresses are known, so this can have some false positives.
4 years ago
Kim Alvefur
257f52d826
mod_admin_shell: Print s2s related events while waiting for ping
...
Gives a better idea of what's taking time.
4 years ago
Kim Alvefur
6e0bbc2af5
mod_smacks: Limit queue memory consumption using new util
...
This brings back the queue size limit that was once added, then removed
because destroying the session when reaching the limit was not great.
Instead, the queue wraps and overwrites the oldest unacked stanza on the
assumption that it will probably be acked anyway and thus does not need
to be delivered. If those discarded stanzas turn out to be needed on
resumption then the resumption fails.
4 years ago
Kim Alvefur
1ffb6f0b3d
mod_admin_shell: Add port as a c2s/s2s:show column definition
...
Allows inferring whether Direct TLS was used, or perhaps which SRV
record was chosen. Not shown by default.
4 years ago
Kim Alvefur
9f2249b3db
mod_admin_shell: Handle global roles (pass host=*)
...
Is it not odd that um.set_roles() takes `nil` to mean global?
4 years ago
Kim Alvefur
a45484c131
mod_admin_shell: Only check that local users exist locally
4 years ago
Kim Alvefur
cf137f9902
mod_admin_shell: Support setting roles on hosts other than the users'
...
Needed to e.g. grant admin rights on a component, or grant non-local
users local privileges.
Leave the same host syntax for convenience, since this might be the
common case.
4 years ago
Kim Alvefur
efa1f442ae
mod_admin_shell: Add command for updating roles user:roles(jid, roles)
...
This would allow e.g. granting admin status without changing the config
and without a restart.
4 years ago
Kim Alvefur
95fae62ac5
mod_admin_shell: Allow setting roles when creating user
4 years ago
Kim Alvefur
2f274d8026
mod_admin_shell: List periodic tasks in module:info
4 years ago
Kim Alvefur
3f4a73c66b
mod_admin_shell: Remove now redundant promise awaiting in dns:lookup()
4 years ago
Kim Alvefur
769a3ed263
mod_admin_shell: Remove now redundant promise awaiting in xmpp:ping()
4 years ago
Kim Alvefur
bdc838bf11
mod_admin_shell: Fix indentation
...
It was all of for some reason
4 years ago
Kim Alvefur
aac203f0d9
mod_admin_shell: Wait for promises
...
I've typed `>require"util.async".wait_for(...)` for the last time!
4 years ago
Kim Alvefur
51c1c97fe2
mod_admin_shell: Reduce width of 'Status' column
...
'unavailable' was the longest possibility, dropping it probably
differentiates available from unavailable more, in less space.
4 years ago
Kim Alvefur
2ec4d4a83d
mod_admin_shell: Reduce width of 'Security' column (thanks Link Mauve)
...
Tricky to represent "secure, but no details" in short enough space.
4 years ago
Kim Alvefur
fe93f28b16
mod_admin_shell: Fix showing default HTTP path in module:info
...
Thanks mod_http_openmetrics
4 years ago
Kim Alvefur
6e91f0ad43
mod_admin_shell: Factor out simple function in module:info for reuse
...
Marginal improvement in readability
4 years ago
Kim Alvefur
1ac4aed7cd
mod_admin_shell: List collected metrics in module:info
...
Lets you know what to look for with stats:show()
4 years ago
Kim Alvefur
2388b800b2
mod_admin_shell: List net providers in module:info
4 years ago
Kim Alvefur
ce8107379d
mod_admin_shell: Return counts of shown vs total from new table views
...
Not exactly the way it was before, but close enough and useful.
4 years ago
Kim Alvefur
38c7c944ca
mod_admin_shell: Handle absence of connection in security column (thanks arcseconds)
...
I surmise this can happen in a disconnected/smacks hibernation state.
4 years ago
Kim Alvefur
c9479cbb69
util.human.io: Pass nil to cell mapper to signal missing value
...
Seems more like conventional Lua than passing an empty string to signal
lack of value.
4 years ago
Kim Alvefur
35589d345e
mod_admin_shell: Respect metatables in output serialization
...
Makes it so that returning e.g. util.cache :table() produces useful
output, which otherwise would look like empty tables.
4 years ago
Kim Alvefur
fd09aa9659
mod_admin_shell: Specify a width for cert column
...
Avoids ellipsis
4 years ago
Kim Alvefur
7f68cacb79
mod_admin_shell: Indicate bi-directional s2s connections
4 years ago
Kim Alvefur
5f93ef8119
mod_admin_shell: Allow passing columns as a string for convenience
4 years ago
Kim Alvefur
aef0454598
mod_admin_shell: Optionally group session listings by host when not included as column
...
Similar to the earlier view
4 years ago
Kim Alvefur
29535c322a
mod_admin_shell: New table based implementation of c2s and s2s:show()
...
Nicer and more readable.
Thanks jonas’ and prosody@ for JID length stats to inform column widths.
4 years ago
Kim Alvefur
e1d1be0068
mod_admin_shell: Show HTTP base-URLs in module:info()
...
Because it's nice, not having to find it in http:list(), which could
have a lot of items.
4 years ago
Kim Alvefur
3d4ee088ae
mod_admin_shell: Allow passing an exit code to server:shutdown()
...
Mirroring the internal API
4 years ago