lockbot 2.5.3__tar.gz → 2.5.4__tar.gz
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.
- {lockbot-2.5.3/python/lockbot.egg-info → lockbot-2.5.4}/PKG-INFO +1 -1
- {lockbot-2.5.3 → lockbot-2.5.4}/pyproject.toml +1 -1
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/bots/router.py +16 -6
- {lockbot-2.5.3 → lockbot-2.5.4/python/lockbot.egg-info}/PKG-INFO +1 -1
- {lockbot-2.5.3 → lockbot-2.5.4}/LICENSE +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/MANIFEST.in +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/README.md +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/__init__.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/__init__.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/__init__.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/admin/__init__.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/admin/router.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/audit/__init__.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/audit/models.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/audit/router.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/audit/service.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/auth/__init__.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/auth/dependencies.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/auth/models.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/auth/router.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/auth/schemas.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/bots/__init__.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/bots/encryption.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/bots/manager.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/bots/models.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/bots/schemas.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/bots/webhook_handler.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/config.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/database.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/logs/__init__.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/main.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/rate_limit.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/settings/__init__.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/settings/models.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/backend/app/settings/router.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/__init__.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/base_bot.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/bot_instance.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/config.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/device_bot.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/device_usage_alert.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/device_usage_utils.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/entry.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/env.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/handler.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/i18n/__init__.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/i18n/en.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/i18n/zh.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/io.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/message_adapter.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/msg_utils.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/node_bot.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/platforms/__init__.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/platforms/infoflow.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/queue_bot.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/request.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/scheduler.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot/core/utils.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot.egg-info/SOURCES.txt +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot.egg-info/dependency_links.txt +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot.egg-info/requires.txt +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/python/lockbot.egg-info/top_level.txt +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/setup.cfg +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/tools/create_super_admin.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/tools/gen_keys.py +0 -0
- {lockbot-2.5.3 → lockbot-2.5.4}/tools/reset_super_admin_password.py +0 -0
|
@@ -327,24 +327,34 @@ def update_bot(
|
|
|
327
327
|
)
|
|
328
328
|
if dup:
|
|
329
329
|
raise HTTPException(status_code=409, detail="Bot name already exists")
|
|
330
|
-
changes["name"] =
|
|
330
|
+
changes["name"] = {"from": bot.name, "to": body.name}
|
|
331
331
|
bot.name = body.name
|
|
332
332
|
if body.group_id is not None:
|
|
333
333
|
bot.group_id = body.group_id
|
|
334
334
|
if body.webhook_url is not None:
|
|
335
|
-
changes["webhook_url"] =
|
|
335
|
+
changes["webhook_url"] = "updated"
|
|
336
336
|
bot.webhook_url = encryption.encrypt(body.webhook_url)
|
|
337
337
|
if body.aes_key is not None:
|
|
338
|
-
changes["aes_key"] =
|
|
338
|
+
changes["aes_key"] = "updated"
|
|
339
339
|
bot.aes_key = encryption.encrypt(body.aes_key)
|
|
340
340
|
if body.token is not None:
|
|
341
|
-
changes["token"] =
|
|
341
|
+
changes["token"] = "updated"
|
|
342
342
|
bot.token = encryption.encrypt(body.token)
|
|
343
343
|
if body.cluster_configs is not None:
|
|
344
|
-
|
|
344
|
+
if isinstance(body.cluster_configs, dict):
|
|
345
|
+
node_summary = {k: len(v) if isinstance(v, list) else v for k, v in body.cluster_configs.items()}
|
|
346
|
+
changes["cluster_configs"] = node_summary
|
|
347
|
+
else:
|
|
348
|
+
changes["cluster_configs"] = f"{len(body.cluster_configs)} nodes"
|
|
345
349
|
bot.cluster_configs = json.dumps(body.cluster_configs, ensure_ascii=False)
|
|
346
350
|
if body.config_overrides is not None:
|
|
347
|
-
|
|
351
|
+
old_overrides = json.loads(bot.config_overrides) if bot.config_overrides else {}
|
|
352
|
+
diff = {}
|
|
353
|
+
for k, v in body.config_overrides.items():
|
|
354
|
+
old_v = old_overrides.get(k)
|
|
355
|
+
if old_v != v:
|
|
356
|
+
diff[k] = {"from": old_v, "to": v}
|
|
357
|
+
changes["config_overrides"] = diff if diff else "no change"
|
|
348
358
|
bot.config_overrides = json.dumps(body.config_overrides, ensure_ascii=False)
|
|
349
359
|
|
|
350
360
|
write_audit_log(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|