-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEW] Section to monitor and manage bot accounts on admin interface v2.0 #13609
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ add adminBotInfo template + move new permission to startup of server inside package instead of using the rocketchat-authorization package + change icon used by Bots from code to hubot - remove roles column from list of bot users
rocketchat-lib + add insertOrUpdateBot method + add saveBot function
No i18n strings are defined, style will drastically change, this is just to have a base to work with when we start to retrieve the data. Remove users of type bot from the Users admin view
+ fix Bots server model and publication + add Bots model on client side + load cache of Bots model
Fix botData not being updated because of wrong variable being used
Get ipAddress when the bot calls the updateBotData method
+ add pause/resume buttons on the Bot details page - they send a pause or resumeSubscription command to the publication - they update the paused property of the Bots model + new model ClientCommands with a simple schema having text commands + new methods to send client commands down the publication The clientCommands publication publishes to a logged in user only those commands directed at them
To reply to a command, you call replyClientCommand with the commandId
Reset bot state whenever it subscribes again to clientCommands
Used to display the bot's response time
- Add comments and some refactoring of the code - Split between bot live statistics and server statistics - Add new server stat: mention count
Done to reset data about the client that could be outdated on a new connection
Whenever the reactive var 'bot' was changed it would create a new interval, causing several pings to happen at the same time causing a DOS in the bot.
…to bot-manager-ui
…nto management-bots
Paging @timkinnane and @ggazzo. I can take new screenshots if it is necessary |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a refactor of #10832, including only the management part of the PR and removing any server-side communications to bots. The following text comes from the original PR with some parts removed.
This is part of the GSoC project to improve the integration of Rocket.Chat with bots, the discussion about changes on the User model is found here.
1. customClientData
This is supposed to be a field called by the bot in which it can set additional information about itself.
This field can be used to store any information about the client, such as text commands implemented by the bot.
2. Bot Management Admin Panel
The package
rocketchat-bot-manager
consists of adding a new section on the administration panel to manage bot accounts, that is, accounts with thetype
attribute set as'bot'
, as discussed here.2.1. List view
The list view is a list of all the existing bot accounts. It is accessible from the admin sidenav and shows the following information about an account:
Screenshot
2.2. Creation of a bot account
To create a bot account, the admin must first go to the list view and then click on the plus button on the right sidetab, opening a form similar to the one used to create a normal account, except for all e-mail related fields that have been removed.
Screenshot
2.3. Visualizing general info about an account
In the list view, the admin can click on any listed account and a flextab will be opened on the right side, displaying some information about the clicked account. Currently, it is displayed:
If the admin clicks on the 'More Details' button, it will be taken to the Details page.
Screenshot 1 - Offline account. Screenshot 2 - Online account
2.4. Overview of the newly implemented management features
2.4.1. Getting statistics from a bot
Statistics that can be retrieved from the server, the total number of messages sent by the account for example
2.5. Bot Details view
The main management page of a bot is its details page. It displays:
Screenshot 1 - Offline. Screenshot 2 - Online
The admin can also delete the account and convert the account to the user type. Converting it to the user type will simply edit the
type
attribute and ask for an e-mail if the account does not have one.Regarding the statistics view, it is displayed when the admin clicks on 'Load' and currently shows:
Related:
type
field #10688Closes:
Screenshots are outdated with the old style, but it has been updated
If this PR tracks interest, I'll update the following PR: RocketChat/Rocket.Chat.js.SDK#15
Since there are a lot of images, it is better to use a list
'user'
type