mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-03 12:06:04 -04:00
Feature: remote browser support (#3904)
* [empty commit] pull request for remote browser support * Remote browser: Added UI screens and DB tables. * Remote browser working * Fixing tests * Fix tests * Fix tests * fix tests * Test browser * revert init_db.js * Changed drop down to ActionSelect * Fix translations * added remote browsers toggle * revert changes package-lock * Fix bad english * Set default remote browser * Remote browsers Requested changes * fixed description.
This commit is contained in:
parent
0294118cbf
commit
62780001f7
15 changed files with 579 additions and 7 deletions
|
@ -185,6 +185,30 @@ async function sendDockerHostList(socket) {
|
|||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send list of docker hosts to client
|
||||
* @param {Socket} socket Socket.io socket instance
|
||||
* @returns {Promise<Bean[]>} List of docker hosts
|
||||
*/
|
||||
async function sendRemoteBrowserList(socket) {
|
||||
const timeLogger = new TimeLogger();
|
||||
|
||||
let result = [];
|
||||
let list = await R.find("remote_browser", " user_id = ? ", [
|
||||
socket.userID,
|
||||
]);
|
||||
|
||||
for (let bean of list) {
|
||||
result.push(bean.toJSON());
|
||||
}
|
||||
|
||||
io.to(socket.userID).emit("remoteBrowserList", result);
|
||||
|
||||
timeLogger.print("Send Remote Browser List");
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
sendNotificationList,
|
||||
sendImportantHeartbeatList,
|
||||
|
@ -192,5 +216,6 @@ module.exports = {
|
|||
sendProxyList,
|
||||
sendAPIKeyList,
|
||||
sendInfo,
|
||||
sendDockerHostList
|
||||
sendDockerHostList,
|
||||
sendRemoteBrowserList,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue