Kim Alvefur
6a7ef48669
mod_admin_shell: Add help section with (top level) MUC commands
...
These were previously only documented on the site.
5 years ago
Kim Alvefur
8825267f5c
mod_admin_shell: Pretty-print HTTP endpoints in a human table
...
Attempted readability improvement
5 years ago
Kim Alvefur
fdf14d1c06
mod_admin_shell: Remove previous print() call
...
Accident involving Mercurial interactive commit
5 years ago
Kim Alvefur
8aebef35ae
mod_admin_shell: List modules providing each HTTP endpoint
5 years ago
Kim Alvefur
6b1da26463
mod_admin_shell: List global HTTP endpoints by default
...
Trick copied from the module commands
5 years ago
Kim Alvefur
b6e1f9feb9
mod_admin_shell: Report CSI queue length from mod_csi_simple
5 years ago
Kim Alvefur
fcfc09d01b
mod_admin_shell: Report CSI state in c2s:show()
5 years ago
Kim Alvefur
f05d6e2222
mod_admin_shell: Handle server_epoll using monotonic time internally
6 years ago
Kim Alvefur
5bafaaa5d7
mod_admin_shell: Fix debug:timers to handle net.server native timers
6 years ago
Kim Alvefur
2861bb873a
mod_admin_shell: Update for async.wait_for rename
6 years ago
Kim Alvefur
3405f0dfe7
mod_admin_shell: Fix display of units for some statistics
6 years ago
Kim Alvefur
f86aaa431f
mod_admin_shell: Skip multiplier adjustment for rates
6 years ago
Kim Alvefur
7c630e9183
mod_admin_shell: Format stats with util.human.units
6 years ago
Kim Alvefur
5a58b068e1
mod_admin_shell: Fix error due to float passed to os.date in Lua 5.3
...
Thanks Martin
6 years ago
Matthew Wild
3a00266c14
mod_admin_shell: Remove old variable declaration [luacheck]
6 years ago
Matthew Wild
4027f63812
mod_admin_shell: Remove extra newline at end of help text
6 years ago
Matthew Wild
cdeaa58821
mod_admin_shell, mod_admin_telnet, util.prosodyctl.shell: Separate output from final result
...
Fixes the client pausing for input after output from commands.
6 years ago
Matthew Wild
319ba8b1e0
mod_admin_shell: New module that implements the console interface over an admin socket
6 years ago
Kim Alvefur
9c0f2a5d5a
mod_admin_telnet: Update existing sessions on reload
...
This removes the need to disconnect and reconnect to the telnet console
for changes to take effect.
6 years ago
Kim Alvefur
9e60a1be7c
mod_admin_telnet: Use tostring as fallback in pretty printing
...
This has some nice effects such as functions, VirtualHosts and other
things being printed using their `__tostring` metamethod.
6 years ago
Kim Alvefur
4500aabbae
mod_admin_telnet: Don't pretty-print the normal console stuff
...
Typing e.g. `c2s` would dump out a bunch of stuff that would probably
just confuse users.
Now you only get pretty-printing when poking around in the internals
with `>`.
6 years ago
Kim Alvefur
5d387ccb3a
mod_admin_telnet: Reuse existing pretty printing setup
...
Didn't do the configurable defaults thing here because I was going to do
this, so that there's only one spot where it's done.
6 years ago
Kim Alvefur
b044b8b0a1
mod_admin_telnet: Allow configuring pretty printing defaults
...
Mostly just to have the defaults merged so you can e.g.
output:configure({maxdepth=1})
6 years ago
Kim Alvefur
7612c47031
mod_admin_telnet: Silence luacheck
6 years ago
Kim Alvefur
5efc9d8b9c
mod_admin_telnet: Add a command to configure pretty-printing settings
...
Sometimes you wanna adjust the maxdepth or something.
6 years ago
Kim Alvefur
ed209d1f70
mod_admin_telnet: Add a TODO for someone to find in the future
6 years ago
Kim Alvefur
3ac134a9e3
mod_admin_telnet: Document HTTP command in internal help
6 years ago
Kim Alvefur
66f554d5aa
mod_admin_telnet: Document (in the internal help) debug commands
6 years ago
Kim Alvefur
edbf00f460
mod_admin_telnet: Pretty-print values returned from commands
...
This makes it much nicer to inspect Prosody internals.
Existing textual status messages from commands are not serialized to
preserve existing behavior. Explicit serialization of configuration is
kept in order to make it clear that returned strings are serialized
strings that would look like what's actually in the config file.
The default maxdepth of 2 seems ought to be an okay default, balanced
between showing enough structure to continue exploring and DoS-ing your
terminal.
Thanks to Ge0rG for the motivation to finally do this.
6 years ago
Kim Alvefur
cd774239f7
mod_admin_telnet: Allow passing list of hosts to http:list()
...
Lets you select what hosts to list http services on. In particular, this
enables listing global http services, which was not possible before.
6 years ago
Kim Alvefur
5fe826e317
mod_admin_telnet: Fix host selection filter, fixes loading on components
...
get_hosts_with_module(a component, mod) would still filter out
components since they don't have type="component" instead of "local"
Introduced in 4d3549e64489
6 years ago
Kim Alvefur
62e66fe940
mod_admin_telnet: Reflow hosts filter for readability
6 years ago
Kim Alvefur
6e9828ec03
mod_admin_telnet: Avoid indexing missing socket (thanks tmolitor)
...
if `sock` was nil it would still proceed with SNI and ALPN checks
6 years ago
Kim Alvefur
f507f3bb8b
mod_admin_telnet: Use promise based DNS resolving
...
Mostly done for testing this new API
6 years ago
Kim Alvefur
7ee9d3b7af
mod_admin_telnet: Silence luacheck warnings
6 years ago
Kim Alvefur
842657970f
mod_admin_telnet: Include config:get() in help text
6 years ago
Kim Alvefur
9d389440a3
mod_admin_telnet: Use common sort function in s2s:show
6 years ago
Kim Alvefur
b3ff5eec9c
mod_admin_telnet: Use existing host comparison when comparing JIDs
6 years ago
Kim Alvefur
9eea55bee8
mod_admin_telnet: Sort hosts in module:list
6 years ago
Kim Alvefur
5f7845641e
mod_admin_telnet: Refactor internal function for listing hosts
...
Splits out a function that doesn't deal with modules for reuse elsewhere
6 years ago
Kim Alvefur
65c7619a6d
mod_admin_telnet: Merge hostname comparison functions
...
Missed that there existed one already when writing the one for host:list
6 years ago
Kim Alvefur
a34238b2a2
mod_admin_telnet: Sort by complete labels
...
Might as well.
6 years ago
Kim Alvefur
821603db8a
mod_admin_telnet: Fix host sorting
...
Reversing each %P is a noop
6 years ago
Kim Alvefur
ab7c35c8e5
mod_admin_telnet: Avoid using LuaSocket for timestamps
...
Using util.time will make it easier to move away from LuaSocket if we
ever wanted to do that.
6 years ago
Kim Alvefur
07645554cc
mod_admin_telnet: Sort hosts
...
Groups by domain in DNS hierarchy order or something.
Why not split on '.' you ask? Well becasue that's not what I typed here. Also "[^.]" is longer than "%P".
6 years ago
Kim Alvefur
2d7eada577
mod_admin_telnet: Display ALPN in show_tls() if supported and available
6 years ago
Kim Alvefur
b1d048f117
mod_admin_telnet: Show SNI name in show_tls() if available
6 years ago
Kim Alvefur
2a10ceae09
mod_admin_telnet: Show s2s authentication method (probably) used
6 years ago
Kim Alvefur
7590aa04d6
mod_admin_telnet: xmpp:ping: Log ping time
6 years ago
Kim Alvefur
469bfe7d6b
mod_admin_telnet: Use new compact function for waiting on promises
6 years ago