修复前端量级无法显示数据,增加清风审核和大神 CMS 的 Cookie 输入修改为可选
This commit is contained in:
parent
3e1ece2556
commit
d5b93c12e2
17
README.md
17
README.md
@ -1,17 +0,0 @@
|
||||
# 网易大神实时审核数据监控
|
||||
|
||||
## 项目结构
|
||||
- releases/: 发布版本
|
||||
- latest/: 最新稳定版本
|
||||
- v[版本号]/: 历史版本
|
||||
- dev/: 开发版本
|
||||
- latest/: 最新开发版本
|
||||
- v[版本号]-dev/: 历史开发版本
|
||||
- config/: 配置文件目录
|
||||
|
||||
## 版本管理
|
||||
- main分支:稳定发布版本
|
||||
- dev分支:开发版本
|
||||
|
||||
## 自动运行
|
||||
使用 `download_auto_run.py` 脚本拉取并启动最新版本
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
80
dashboard.py
80
dashboard.py
File diff suppressed because one or more lines are too long
@ -1,449 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Python 2.7 Auto Download Script
|
||||
For NetEase Da Shen Review Data Monitoring System
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import shutil
|
||||
import urllib2
|
||||
import getpass
|
||||
import base64
|
||||
import subprocess
|
||||
import traceback
|
||||
import codecs
|
||||
from datetime import datetime
|
||||
|
||||
# 先尝试设置控制台代码页为UTF-8(仅Windows环境)
|
||||
try:
|
||||
if sys.platform.startswith('win'):
|
||||
subprocess.call('chcp 936', shell=True)
|
||||
except:
|
||||
pass
|
||||
|
||||
# 基本配置
|
||||
#COS_URL = "http://cos.ui-beam.com/work_scripts/monitor/dev/latest/"
|
||||
COS_URL = "http://cos.ui-beam.com/work_scripts/monitor/releases/latest/"
|
||||
TEMP_DIR = os.path.join(os.path.expanduser("~"), "Desktop", "monitor_temp")
|
||||
LOG_FILE = os.path.join(TEMP_DIR, "download_log.txt")
|
||||
|
||||
# 要下载的文件列表 - 格式: (URL相对路径, 本地保存路径, 是否必需)
|
||||
FILES_TO_DOWNLOAD = [
|
||||
("start_monitor.cmd", "start_monitor.cmd", True),
|
||||
("dashboard.py", "dashboard.py", True),
|
||||
("breeze_monitor.py", "breeze_monitor.py", True),
|
||||
("breeze_monitor_CHAT.py", "breeze_monitor_CHAT.py", True),
|
||||
("cms_monitor.py", "cms_monitor.py", True),
|
||||
("cms_coefficients.json", "cms_coefficients.json", True),
|
||||
("breeze_coefficients.json", "breeze_coefficients.json", True),
|
||||
("templates/dashboard.html", "templates/dashboard.html", True),
|
||||
("templates/login.html", "templates/login.html", True),
|
||||
("static/ds-favicon.ico", "static/ds-favicon.ico", True),
|
||||
("install_dependencies.bat", "install_dependencies.bat", True),
|
||||
("inspect_monitor.py", "inspect_monitor.py", True)
|
||||
]
|
||||
|
||||
# 记录日志函数
|
||||
def log_message(message):
|
||||
"""记录日志消息"""
|
||||
try:
|
||||
# 确保日志目录存在
|
||||
log_dir = os.path.dirname(LOG_FILE)
|
||||
if not os.path.exists(log_dir):
|
||||
os.makedirs(log_dir)
|
||||
|
||||
# 使用codecs打开文件,指定编码为gbk
|
||||
with codecs.open(LOG_FILE, "a", "gbk") as f:
|
||||
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
log_line = "[%s] %s\n" % (timestamp, message)
|
||||
f.write(log_line)
|
||||
|
||||
# 使用safe_print输出到控制台
|
||||
safe_print(message)
|
||||
except Exception as e:
|
||||
safe_print("[ERROR] Could not write to log file: %s" % str(e))
|
||||
|
||||
# 使用UTF-8安全打印
|
||||
def safe_print(text):
|
||||
"""安全打印函数,处理编码问题"""
|
||||
try:
|
||||
if isinstance(text, unicode):
|
||||
print(text.encode('gbk', 'ignore'))
|
||||
else:
|
||||
print(text)
|
||||
except UnicodeEncodeError:
|
||||
print(text.encode('gbk', 'ignore'))
|
||||
except Exception as e:
|
||||
print("[ERROR] Print error: %s" % str(e))
|
||||
|
||||
# 获取最新版本号
|
||||
def get_latest_version():
|
||||
"""获取最新版本号"""
|
||||
try:
|
||||
#version_url = "http://cos.ui-beam.com/work_scripts/monitor/dev/latest/VERSION.txt" # 测试版本版本号地址
|
||||
version_url = "http://cos.ui-beam.com/work_scripts/monitor/releases/VERSION.txt" # 正式版本版本号地址
|
||||
response = urllib2.urlopen(version_url)
|
||||
version = response.read().strip()
|
||||
return version
|
||||
except Exception as e:
|
||||
error_msg = u"获取版本号失败: %s" % unicode(str(e), 'gbk', 'ignore')
|
||||
safe_print(error_msg)
|
||||
return u"未知版本"
|
||||
|
||||
# 非中文字符界面信息
|
||||
MESSAGES = {
|
||||
'tool_title': u"网易大神审核数据监控系统安装工具",
|
||||
'no_auth_version': u"当前最新版本:{0}".format(get_latest_version()),
|
||||
'downloading': u"正在下载文件,请稍候...",
|
||||
'script_started': u"下载脚本已启动",
|
||||
'temp_dir': u"临时目录",
|
||||
'dir_init_failed': u"初始化目录失败,退出",
|
||||
'created_temp_dir': u"创建临时目录",
|
||||
'dir_exists': u"临时目录已存在,正在清理内容...",
|
||||
'dir_cleared': u"临时目录已清理",
|
||||
'created_templates_dir': u"创建templates目录",
|
||||
'created_static_dir': u"创建static目录",
|
||||
'using_proxy': u"使用代理下载",
|
||||
'retrying_with_proxy': u"尝试使用代理重试...",
|
||||
'downloaded_files': u"已下载文件",
|
||||
'of': u"个,共",
|
||||
'files': u"个文件",
|
||||
'download_required_failed': u"部分必需文件下载失败",
|
||||
'all_files_downloaded': u"所有文件下载成功",
|
||||
'install_deps_not_found': u"依赖安装脚本未找到",
|
||||
'installing_deps': u"正在安装依赖...",
|
||||
'deps_output': u"依赖安装输出",
|
||||
'deps_error': u"依赖安装错误",
|
||||
'deps_installed': u"依赖安装成功",
|
||||
'deps_failed': u"依赖安装失败,返回码",
|
||||
'deps_script_error': u"运行依赖安装脚本出错",
|
||||
'start_script_not_found': u"启动脚本未找到",
|
||||
'starting_system': u"正在启动监控系统...",
|
||||
'system_started': u"监控系统启动成功",
|
||||
'start_system_failed': u"启动监控系统失败",
|
||||
'manual_guide_title': u"手动安装指南",
|
||||
'manual_guide_intro': u"如果自动安装失败,请按照以下步骤手动安装:",
|
||||
'use_ie': u"1. 获取系统文件:使用浏览器下载这些文件:",
|
||||
'save_to_structure': u"2. 文件结构:将文件保存到以下结构:",
|
||||
'run_deps_first': u"3. 安装依赖:运行install_dependencies.bat安装依赖",
|
||||
'then_run_start': u"4. 启动系统:运行start_monitor.cmd启动系统",
|
||||
'created_manual_guide': u"已创建手动安装指南",
|
||||
'create_guide_failed': u"创建手动指南失败",
|
||||
'script_copied': u"已将下载脚本复制到临时目录",
|
||||
'copy_script_failed': u"复制脚本失败",
|
||||
'deps_install_failed_try_start': u"依赖安装失败,尝试直接启动监控系统",
|
||||
'steps_failed': u"某些步骤失败,请检查日志获取详情",
|
||||
'try_manual': u"您可以尝试使用以下指南手动安装",
|
||||
'unhandled_exception': u"未处理的异常",
|
||||
'execution_completed': u"脚本执行完成",
|
||||
'press_enter': u"按回车键退出..."
|
||||
}
|
||||
|
||||
# 初始化目录函数
|
||||
def init_directory():
|
||||
"""初始化临时目录"""
|
||||
try:
|
||||
# 创建主目录
|
||||
if not os.path.exists(TEMP_DIR):
|
||||
os.makedirs(TEMP_DIR)
|
||||
log_message("[INFO] %s: %s" % (MESSAGES['created_temp_dir'], TEMP_DIR))
|
||||
else:
|
||||
log_message("[INFO] %s" % MESSAGES['dir_exists'])
|
||||
|
||||
# 清理现有目录内容,只保留日志文件
|
||||
for item in os.listdir(TEMP_DIR):
|
||||
item_path = os.path.join(TEMP_DIR, item)
|
||||
if item != "download_log.txt": # 现在只保留日志文件
|
||||
if os.path.isdir(item_path):
|
||||
shutil.rmtree(item_path)
|
||||
else:
|
||||
os.remove(item_path)
|
||||
|
||||
log_message("[INFO] %s" % MESSAGES['dir_cleared'])
|
||||
|
||||
# 创建templates子目录
|
||||
templates_dir = os.path.join(TEMP_DIR, "templates")
|
||||
if not os.path.exists(templates_dir):
|
||||
os.makedirs(templates_dir)
|
||||
log_message("[INFO] %s" % MESSAGES['created_templates_dir'])
|
||||
|
||||
# 创建static子目录
|
||||
static_dir = os.path.join(TEMP_DIR, "static")
|
||||
if not os.path.exists(static_dir):
|
||||
os.makedirs(static_dir)
|
||||
log_message("[INFO] %s" % MESSAGES['created_static_dir'])
|
||||
|
||||
return True
|
||||
except Exception as e:
|
||||
log_message("[ERROR] Failed to initialize directory: %s" % str(e))
|
||||
return False
|
||||
|
||||
# 下载函数
|
||||
def download_file(url_path, local_path, use_proxy=False):
|
||||
"""下载单个文件,默认不使用代理"""
|
||||
full_url = "%s/%s" % (COS_URL, url_path)
|
||||
full_local_path = os.path.join(TEMP_DIR, local_path)
|
||||
|
||||
# 确保目标目录存在
|
||||
local_dir = os.path.dirname(full_local_path)
|
||||
if not os.path.exists(local_dir):
|
||||
os.makedirs(local_dir)
|
||||
|
||||
log_message("[INFO] Downloading %s to %s" % (full_url, full_local_path))
|
||||
|
||||
try:
|
||||
# 设置代理信息
|
||||
if use_proxy:
|
||||
log_message("[INFO] %s" % MESSAGES['using_proxy'])
|
||||
proxy_handler = urllib2.ProxyHandler({
|
||||
'http': 'http://CD-WEBPROXY02.yajuenet.internal:8080',
|
||||
'https': 'http://CD-WEBPROXY02.yajuenet.internal:8080'
|
||||
})
|
||||
opener = urllib2.build_opener(proxy_handler)
|
||||
urllib2.install_opener(opener)
|
||||
else:
|
||||
# 禁用代理
|
||||
proxy_handler = urllib2.ProxyHandler({})
|
||||
opener = urllib2.build_opener(proxy_handler)
|
||||
urllib2.install_opener(opener)
|
||||
|
||||
# 下载文件
|
||||
response = urllib2.urlopen(full_url, timeout=30)
|
||||
content = response.read()
|
||||
|
||||
# 写入文件
|
||||
with open(full_local_path, 'wb') as f:
|
||||
f.write(content)
|
||||
|
||||
log_message("[INFO] Successfully downloaded: %s" % local_path)
|
||||
return True
|
||||
|
||||
except urllib2.URLError as e:
|
||||
log_message("[ERROR] Failed to download %s: %s" % (url_path, str(e)))
|
||||
|
||||
# 如果不使用代理失败,尝试使用代理
|
||||
if not use_proxy:
|
||||
log_message("[INFO] %s" % MESSAGES['retrying_with_proxy'])
|
||||
return download_file(url_path, local_path, True)
|
||||
|
||||
return False
|
||||
|
||||
except Exception as e:
|
||||
log_message("[ERROR] Failed to download %s: %s" % (url_path, str(e)))
|
||||
return False
|
||||
|
||||
# 下载所有文件
|
||||
def download_all_files():
|
||||
"""下载所有必要的文件"""
|
||||
success_count = 0
|
||||
failed_required = False
|
||||
|
||||
for url_path, local_path, required in FILES_TO_DOWNLOAD:
|
||||
# 先尝试不使用代理下载
|
||||
if download_file(url_path, local_path, False):
|
||||
success_count += 1
|
||||
elif required:
|
||||
failed_required = True
|
||||
|
||||
log_message("[INFO] %s %d %s %d %s" % (
|
||||
MESSAGES['downloaded_files'],
|
||||
success_count,
|
||||
MESSAGES['of'],
|
||||
len(FILES_TO_DOWNLOAD),
|
||||
MESSAGES['files']
|
||||
))
|
||||
|
||||
if failed_required:
|
||||
log_message("[ERROR] %s" % MESSAGES['download_required_failed'])
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
# 运行依赖安装脚本
|
||||
def run_install_dependencies():
|
||||
"""运行依赖安装脚本"""
|
||||
install_script = os.path.join(TEMP_DIR, "install_dependencies.bat")
|
||||
|
||||
if not os.path.exists(install_script):
|
||||
log_message("[ERROR] %s: %s" % (MESSAGES['install_deps_not_found'], install_script))
|
||||
return False
|
||||
|
||||
try:
|
||||
log_message("[INFO] %s" % MESSAGES['installing_deps'])
|
||||
|
||||
# 记录当前工作目录
|
||||
original_dir = os.getcwd()
|
||||
|
||||
# 切换到临时目录并启动脚本
|
||||
os.chdir(TEMP_DIR)
|
||||
|
||||
# 使用subprocess运行批处理文件并显示在控制台
|
||||
# 移除stdout和stderr的PIPE重定向,让输出直接显示在控制台
|
||||
process = subprocess.Popen(["cmd", "/c", install_script],
|
||||
shell=True)
|
||||
|
||||
# 等待脚本执行完成
|
||||
return_code = process.wait()
|
||||
|
||||
# 返回到原始目录
|
||||
os.chdir(original_dir)
|
||||
|
||||
if return_code == 0:
|
||||
log_message("[INFO] %s" % MESSAGES['deps_installed'])
|
||||
return True
|
||||
else:
|
||||
log_message("[ERROR] %s: %d" % (MESSAGES['deps_failed'], return_code))
|
||||
return False
|
||||
|
||||
except Exception as e:
|
||||
log_message("[ERROR] %s: %s" % (MESSAGES['deps_script_error'], str(e)))
|
||||
return False
|
||||
|
||||
# 启动监控系统
|
||||
def start_monitor_system():
|
||||
"""启动监控系统"""
|
||||
start_script = os.path.join(TEMP_DIR, "start_monitor.cmd")
|
||||
|
||||
if not os.path.exists(start_script):
|
||||
log_message("[ERROR] %s: %s" % (MESSAGES['start_script_not_found'], start_script))
|
||||
return False
|
||||
|
||||
try:
|
||||
log_message("[INFO] %s" % MESSAGES['starting_system'])
|
||||
|
||||
# 记录当前工作目录
|
||||
original_dir = os.getcwd()
|
||||
|
||||
# 切换到临时目录并启动脚本
|
||||
os.chdir(TEMP_DIR)
|
||||
|
||||
# 使用subprocess启动批处理文件,不等待其完成
|
||||
process = subprocess.Popen(["cmd", "/c", "start", "", "start_monitor.cmd"],
|
||||
shell=True)
|
||||
|
||||
# 返回到原始目录
|
||||
os.chdir(original_dir)
|
||||
|
||||
log_message("[INFO] %s" % MESSAGES['system_started'])
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
log_message("[ERROR] %s: %s" % (MESSAGES['start_system_failed'], str(e)))
|
||||
return False
|
||||
|
||||
# 创建手动指南
|
||||
def create_manual_guide():
|
||||
"""创建手动安装指南"""
|
||||
guide_path = os.path.join(TEMP_DIR, "manual_install_guide.txt")
|
||||
|
||||
try:
|
||||
with codecs.open(guide_path, "w", "gbk") as f:
|
||||
f.write("=" * 50 + "\n")
|
||||
f.write("%s\n" % MESSAGES['manual_guide_title'])
|
||||
f.write("=" * 50 + "\n\n")
|
||||
|
||||
f.write("%s\n\n" % MESSAGES['manual_guide_intro'])
|
||||
|
||||
f.write("%s\n\n" % MESSAGES['use_ie'])
|
||||
|
||||
for url_path, local_path, required in FILES_TO_DOWNLOAD:
|
||||
full_url = "%s/%s" % (COS_URL, url_path)
|
||||
f.write(" %s\n" % full_url)
|
||||
|
||||
f.write("\n%s\n\n" % MESSAGES['save_to_structure'])
|
||||
f.write(" %s/\n" % TEMP_DIR)
|
||||
f.write(" |-- start_monitor.cmd\n")
|
||||
f.write(" |-- dashboard.py\n")
|
||||
f.write(" |-- breeze_monitor.py\n")
|
||||
f.write(" |-- breeze_monitor_CHAT.py\n")
|
||||
f.write(" |-- cms_monitor.py\n")
|
||||
f.write(" |-- inspect_monitor.py\n")
|
||||
f.write(" |-- cms_coefficients.json\n")
|
||||
f.write(" |-- breeze_coefficients.json\n")
|
||||
f.write(" |-- install_dependencies.bat\n")
|
||||
f.write(" |-- templates/\n")
|
||||
f.write(" | |-- dashboard.html\n")
|
||||
f.write(" | |-- login.html\n")
|
||||
f.write(" |-- static/\n")
|
||||
f.write(" |-- ds-favicon.ico\n\n")
|
||||
|
||||
f.write("%s\n\n" % MESSAGES['run_deps_first'])
|
||||
f.write("%s\n\n" % MESSAGES['then_run_start'])
|
||||
|
||||
f.write("=" * 50 + "\n")
|
||||
|
||||
log_message("[INFO] %s: %s" % (MESSAGES['created_manual_guide'], guide_path))
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
log_message("[ERROR] %s: %s" % (MESSAGES['create_guide_failed'], str(e)))
|
||||
return False
|
||||
|
||||
# 主函数
|
||||
def main():
|
||||
"""主函数"""
|
||||
try:
|
||||
# 使用print可能会更安全,不使用log_message来输出开头的界面
|
||||
safe_print(u"\n%s" % MESSAGES['tool_title'])
|
||||
print("======================================================\n")
|
||||
safe_print(u"%s" % MESSAGES['no_auth_version'])
|
||||
safe_print(u"%s\n" % MESSAGES['downloading'])
|
||||
|
||||
# 初始化日志
|
||||
if not os.path.exists(os.path.dirname(LOG_FILE)):
|
||||
os.makedirs(os.path.dirname(LOG_FILE))
|
||||
|
||||
log_message("\n" + "=" * 40)
|
||||
log_message("[INFO] %s" % MESSAGES['script_started'])
|
||||
log_message("[INFO] %s: %s" % (MESSAGES['temp_dir'], TEMP_DIR))
|
||||
|
||||
# 初始化目录
|
||||
if not init_directory():
|
||||
log_message("[ERROR] %s" % MESSAGES['dir_init_failed'])
|
||||
return 1
|
||||
|
||||
# 创建手动指南
|
||||
create_manual_guide()
|
||||
|
||||
# 下载文件
|
||||
if download_all_files():
|
||||
log_message("[INFO] %s" % MESSAGES['all_files_downloaded'])
|
||||
|
||||
# 安装依赖
|
||||
if run_install_dependencies():
|
||||
log_message("[INFO] %s" % MESSAGES['deps_installed'])
|
||||
|
||||
# 启动监控系统
|
||||
if start_monitor_system():
|
||||
# 稍等几秒,让监控系统先启动
|
||||
time.sleep(3)
|
||||
return 0
|
||||
else:
|
||||
log_message("[WARNING] %s" % MESSAGES['deps_install_failed_try_start'])
|
||||
if start_monitor_system():
|
||||
# 稍等几秒,让监控系统先启动
|
||||
time.sleep(3)
|
||||
return 0
|
||||
|
||||
log_message("[WARNING] %s" % MESSAGES['steps_failed'])
|
||||
log_message("[INFO] %s: %s" % (
|
||||
MESSAGES['try_manual'],
|
||||
os.path.join(TEMP_DIR, "manual_install_guide.txt")
|
||||
))
|
||||
return 1
|
||||
|
||||
except Exception as e:
|
||||
log_message("[ERROR] %s: %s" % (MESSAGES['unhandled_exception'], str(e)))
|
||||
log_message("[TRACE] %s" % traceback.format_exc())
|
||||
return 1
|
||||
|
||||
finally:
|
||||
log_message("[INFO] %s" % MESSAGES['execution_completed'])
|
||||
|
||||
# 入口点
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
@ -3,10 +3,10 @@ import base64,zlib,sys,os,getpass,json,time,random
|
||||
from urllib import request as _req
|
||||
import threading,importlib,subprocess
|
||||
|
||||
def _u4spFJjOudXQ(d,k):
|
||||
def _xlyZMKLYEdcp(d,k):
|
||||
return bytes(a^b for a,b in zip(d,k*(len(d)//len(k)+1)))
|
||||
|
||||
def _oan24KuHy(t,m,is_error=False):
|
||||
def _o0TWFSjnC(t,m,is_error=False):
|
||||
try:
|
||||
try:
|
||||
from playsound import playsound
|
||||
@ -33,90 +33,90 @@ def _oan24KuHy(t,m,is_error=False):
|
||||
print(f"\n{t}: {m} (提示音播放失败: {str(e)})\n")
|
||||
return False
|
||||
|
||||
def _gGH0GWVKzJJ(t,m,e=0):
|
||||
_oan24KuHy(t,m,e==1)
|
||||
def _qkiHPbi8OWV(t,m,e=0):
|
||||
_o0TWFSjnC(t,m,e==1)
|
||||
|
||||
def _wY4F1hg37():
|
||||
def _ilhqf1n98():
|
||||
_p=[104,116,116,112,58,47,47,99,111,115,46,117,105,45,98,101,97,109,46,99,111,109,47,119,111,114,107,95,115,99,114,105,112,116,115,47,109,111,110,105,116,111,114,47,99,111,110,102,105,103,47,115,116,97,102,102,46,106,115,111,110]
|
||||
return ''.join([chr(int(c)) for c in _p])
|
||||
|
||||
def _Y6RHmpvX():
|
||||
def _jAkip8V1():
|
||||
_e=[38750,25480,26435,29992,25143,65292,26080,26435,35775,38382]
|
||||
return ''.join([chr(int(c)) for c in _e])
|
||||
|
||||
def _UucMHUlT():
|
||||
def _ou86QoBv():
|
||||
_e=[31243,24207,26080,27861,21551,21160,58,32]
|
||||
return ''.join([chr(int(c)) for c in _e])
|
||||
|
||||
def _zJnQO0zF():
|
||||
def _HBjzMjbw():
|
||||
_e=[39564,35777,25104,21151,65292,27426,36814,20351,29992]
|
||||
return ''.join([chr(int(c)) for c in _e])
|
||||
|
||||
def _ai41mwqhbZ():
|
||||
def _zzH0BB5x8J():
|
||||
try:
|
||||
_TPB2AaQC=getpass.getuser().upper()
|
||||
_yWRVqZPV=os.path.basename(os.path.expanduser("~")).upper()
|
||||
_MAMMjVKI=getpass.getuser().upper()
|
||||
_UH9lSkLl=os.path.basename(os.path.expanduser("~")).upper()
|
||||
|
||||
# 转换为小写进行比较
|
||||
_Pw5eFewc=_TPB2AaQC.lower()
|
||||
_sO0nU8VX=_MAMMjVKI.lower()
|
||||
|
||||
_dZjE1je=None
|
||||
_oMo7wyh4=_wY4F1hg37()
|
||||
_C1CgQXU=None
|
||||
_VlaCk4br=_ilhqf1n98()
|
||||
|
||||
_s,_p,_v=random.randint(1,5),random.randint(1,5),int(time.time())
|
||||
try:
|
||||
_h={"User-Agent":"Mozilla/5.0","X-Access-Token":str(_s*_p*_v)}
|
||||
_r=_req.Request(_oMo7wyh4,headers=_h)
|
||||
_r=_req.Request(_VlaCk4br,headers=_h)
|
||||
with _req.urlopen(_r,timeout=5) as _resp:
|
||||
_fwYU7nW=_resp.read().decode()
|
||||
_dZjE1je=json.loads(_fwYU7nW)
|
||||
_owIzrGX=_resp.read().decode()
|
||||
_C1CgQXU=json.loads(_owIzrGX)
|
||||
except:pass
|
||||
|
||||
if not _dZjE1je:
|
||||
if not _C1CgQXU:
|
||||
try:
|
||||
_fwYU7nW=base64.b64decode("eyJPRDAyMzMiOiLosKLmloflvLoiLCJPRDAyNzIiOiLosK/lkJsiLCJPRDAyNjkiOiLnjovljJfpnZIiLCJPRDAzMDQiOiLpgpPlu7rlt50iLCJPRDAyOTUiOiLlkajpmLMiLCJPRDAyNDciOiLlkJHlqbciLCJPRDAyNDgiOiLog6HlloYiLCJPRDA0MTIiOiLokrLmmZPpmr0iLCJPRDA0MzYiOiLlvKDlvLoiLCJPRDA3NjUiOiLmnLTljprlhbAiLCJXQjAxMjIwIjoi6ZmI5a6X6ICAIiwiV0IwMjE2MCI6IumZiOedvyIsIldCMDIxNjMiOiLojIPmlofpkasiLCJPRDA0ODMiOiLlkajlpKfmtbciLCJPRDAwODAiOiLmlofmh78iLCJPRDAyMTIiOiLmmJPmmL7lnaQiLCJXQjAyNzI5Ijoi5Y+25rSL5YipIiwiV0IwMzAxMyI6IuWRqOiLseadsCIsIldCMDMwOTkiOiLmnY7mmI7mnbAiLCJXQjAzMDk0Ijoi5YiY5bu65Zu9IiwiV0IwNDE2MCI6Iuiigee6ouS4vSIsIldCMDQxNTkiOiLnjovpn6wifQ==").decode()
|
||||
_dZjE1je=json.loads(_fwYU7nW)
|
||||
_owIzrGX=base64.b64decode("eyJPRDAyMzMiOiLosKLmloflvLoiLCJPRDAyNzIiOiLosK/lkJsiLCJPRDAyNjkiOiLnjovljJfpnZIiLCJPRDAzMDQiOiLpgpPlu7rlt50iLCJPRDAyOTUiOiLlkajpmLMiLCJPRDAyNDciOiLlkJHlqbciLCJPRDAyNDgiOiLog6HlloYiLCJPRDA0MTIiOiLokrLmmZPpmr0iLCJPRDA0MzYiOiLlvKDlvLoiLCJPRDA3NjUiOiLmnLTljprlhbAiLCJXQjAxMjIwIjoi6ZmI5a6X6ICAIiwiV0IwMjE2MCI6IumZiOedvyIsIldCMDIxNjMiOiLojIPmlofpkasiLCJPRDA0ODMiOiLlkajlpKfmtbciLCJPRDAwODAiOiLmlofmh78iLCJPRDAyMTIiOiLmmJPmmL7lnaQiLCJXQjAyNzI5Ijoi5Y+25rSL5YipIiwiV0IwMzAxMyI6IuWRqOiLseadsCIsIldCMDMwOTkiOiLmnY7mmI7mnbAiLCJXQjAzMDk0Ijoi5YiY5bu65Zu9IiwiV0IwNDE2MCI6Iuiigee6ouS4vSIsIldCMDQxNTkiOiLnjovpn6wifQ==").decode()
|
||||
_C1CgQXU=json.loads(_owIzrGX)
|
||||
except:pass
|
||||
|
||||
_tgvm6I81V=False
|
||||
_BZnDP2266=False
|
||||
|
||||
if _dZjE1je:
|
||||
for _id,_n in _dZjE1je.items():
|
||||
if _C1CgQXU:
|
||||
for _id,_n in _C1CgQXU.items():
|
||||
# 转换ID为小写进行比较
|
||||
_SsFxjqx=_id.lower()
|
||||
_UEydzC1=_id.lower()
|
||||
|
||||
# 不区分大小写的比较
|
||||
if (_Pw5eFewc==_SsFxjqx or
|
||||
_yWRVqZPV.lower()==_SsFxjqx or
|
||||
_Pw5eFewc.startswith(_SsFxjqx) or
|
||||
_yWRVqZPV.lower().startswith(_SsFxjqx) or
|
||||
_SsFxjqx in _Pw5eFewc or
|
||||
_SsFxjqx in _yWRVqZPV.lower()):
|
||||
_tgvm6I81V=True
|
||||
if (_sO0nU8VX==_UEydzC1 or
|
||||
_UH9lSkLl.lower()==_UEydzC1 or
|
||||
_sO0nU8VX.startswith(_UEydzC1) or
|
||||
_UH9lSkLl.lower().startswith(_UEydzC1) or
|
||||
_UEydzC1 in _sO0nU8VX or
|
||||
_UEydzC1 in _UH9lSkLl.lower()):
|
||||
_BZnDP2266=True
|
||||
break
|
||||
|
||||
if not _tgvm6I81V:
|
||||
_UppTddnqJ=_Y6RHmpvX()
|
||||
_gGH0GWVKzJJ("访问被拒绝",_UppTddnqJ,1)
|
||||
if not _BZnDP2266:
|
||||
_WcEecQLmX=_jAkip8V1()
|
||||
_qkiHPbi8OWV("访问被拒绝",_WcEecQLmX,1)
|
||||
return False
|
||||
|
||||
return True
|
||||
except:
|
||||
return False
|
||||
|
||||
if _ai41mwqhbZ():
|
||||
if _zzH0BB5x8J():
|
||||
# 显示验证成功消息
|
||||
_gGH0GWVKzJJ("用户验证",_zJnQO0zF(),0)
|
||||
_qkiHPbi8OWV("用户验证",_HBjzMjbw(),0)
|
||||
|
||||
_k=b'\xd0\xd6}\x0b\x95\x0f\xde\xf3\x14\x02U\xec\xe0w\xf3O'
|
||||
_e=b's7k<7=wJ=C4E<_z0u$$&mVfTQA!oa4LU*`CU;(Mbz<gK0v6vVzr9ZB&f#2aYvDbUQPLJG>KaN*7)U82oH~>tw+2Z(&`6;<o+f0HjcRR;o_?iX;sNSX!e&C4ViVsg_7eo0{<)vEiGk<Nyh7i2C7%*~^lQylGlM%Iiw!}ElxvX5dBxe)S(GR?S#naIkpq>VF{uTOxT`dAx&u`KkhOyiVfapCH!KB+I<FtRu8i5g$DHX-5Cowe~ylWNF@R~YFhM>O)NhvxG4gOR)>rAsxgR{0o(}yLBHJsO4MZPl^vf6$(A|TD}IWA2s9#TXSOgb8PQXZR&WV0RN2VKu<9bh(D{6D(G?n~{X>ft1bsW`eqJgN_(qO=KTcd|cHU1z0Hv62h4mxpr#uubxmG@k>(t+^Dcys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oWi*yIgWWo-$<<o8?y#X0_{oq)N{<VhH!jeVT0{()X#r3__jbwL%5=Wd=3o*r${19vi7!_cgpcQVV}U<$v8b<A1<muZh4;u;!ppb>cp$)UutI_tizjnNyf;S#jwpziLXPH_VBH~IZVU`wZ|CJdT<S_=+4@spCKE#1Bl=tcW!KQxWxLveQXov5G?k0!#@Khc1qs#PwT({0d@SBr96bG_<rck>dZ@F(}D8O+C%2g7g`5lsRfFG^@mr)OWet@H4kozgKV((2EkL-v6j@A5iouvfZ>S-?#7uoZ3K2cs63k%9o4hPl%XzW8)+aM3L>1G67P=bK^I14gZ{Oq~oV|I8qM<fzHmDmv;1T5&I9f@ZF^T-QNCaGAV7-(F9YBO1X9sR+x^h|=QQH?R'
|
||||
try:
|
||||
_d=base64.b85decode(_e)
|
||||
_x=_u4spFJjOudXQ(_d,_k)
|
||||
_x=_xlyZMKLYEdcp(_d,_k)
|
||||
_c=zlib.decompress(_x)
|
||||
exec(compile(_c.decode('utf-8'),'<string>','exec'))
|
||||
except Exception as e:
|
||||
_gGH0GWVKzJJ("错误",_UucMHUlT()+str(e)[:50],1)
|
||||
_qkiHPbi8OWV("错误",_ou86QoBv()+str(e)[:50],1)
|
||||
sys.exit(1)
|
||||
else:
|
||||
time.sleep(1)
|
||||
|
@ -827,7 +827,8 @@
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="panel">
|
||||
<!-- Breeze工单系统 -->
|
||||
<div class="panel" id="breeze-panel">
|
||||
<div class="panel-header">
|
||||
<h2>清风审核</h2>
|
||||
<div class="last-update" id="breeze-last-update">最后更新: 暂无</div>
|
||||
@ -864,7 +865,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<!-- CMS工单系统 -->
|
||||
<div class="panel" id="cms-panel">
|
||||
<div class="panel-header">
|
||||
<h2>大神CMS</h2>
|
||||
<div class="last-update" id="cms-last-update">最后更新: 暂无</div>
|
||||
@ -924,7 +926,6 @@
|
||||
<div class="data-total">
|
||||
<div class="label">折算总计</div>
|
||||
<div class="value" id="cms-daily-weighted">-</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -932,63 +933,6 @@
|
||||
|
||||
<!-- CMS系数设置对话框 -->
|
||||
<div id="settings-dialog" class="dialog">
|
||||
<div class="dialog-content">
|
||||
<span class="close" onclick="document.getElementById('settings-dialog').style.display='none'">×</span>
|
||||
<h2>CMS系数设置</h2>
|
||||
<div class="settings-form">
|
||||
<div class="form-group">
|
||||
<label for="cms-coefficient-comment">评论系数:</label>
|
||||
<input type="number" id="cms-coefficient-comment" step="0.01" min="0" max="100" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cms-coefficient-feed">动态系数:</label>
|
||||
<input type="number" id="cms-coefficient-feed" step="0.01" min="0" max="100" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cms-coefficient-complaint">举报系数:</label>
|
||||
<input type="number" id="cms-coefficient-complaint" step="0.01" min="0" max="100" />
|
||||
</div>
|
||||
<button id="save-settings-button">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Breeze系数设置对话框 -->
|
||||
<div id="breeze-settings-dialog" class="dialog">
|
||||
<div class="dialog-content">
|
||||
<span class="close"
|
||||
onclick="document.getElementById('breeze-settings-dialog').style.display='none'">×</span>
|
||||
<h2>Breeze系数设置</h2>
|
||||
<div class="settings-form" id="breeze-settings-form">
|
||||
<!-- 系数输入字段将在JS中动态生成 -->
|
||||
<div class="form-group loading">
|
||||
<p>正在加载系数数据...</p>
|
||||
</div>
|
||||
<button id="save-breeze-settings-button">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 版本更新通知弹窗 -->
|
||||
<div id="versionDialog" class="dialog">
|
||||
<div class="dialog-content">
|
||||
<span class="close" onclick="document.getElementById('versionDialog').style.display='none'">×</span>
|
||||
<h2 id="versionDialogTitle">系统版本检测</h2>
|
||||
<div class="version-info">
|
||||
<p>当前版本: <span id="currentVersion">-</span></p>
|
||||
<p>最新版本: <span id="onlineVersion">-</span></p>
|
||||
<p id="versionStatus"></p>
|
||||
<p class="check-time">上次检查: <span id="lastCheckTime">-</span></p>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: flex-end;">
|
||||
<button id="updateButton" class="dialog-button update" style="display: none;">立即更新</button>
|
||||
<button id="close-version-dialog" class="dialog-button">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 无法识别工单弹窗 -->
|
||||
<div id="unrecognizedIssuesDialog" class="dialog">
|
||||
<div class="dialog-content">
|
||||
<span class="close" onclick="document.getElementById('unrecognizedIssuesDialog').style.display='none'">×</span>
|
||||
<h2>无法识别的工单</h2>
|
||||
@ -1140,28 +1084,51 @@
|
||||
// 更新仪表盘
|
||||
function updateDashboard(data) {
|
||||
try {
|
||||
// 更新统计栏数据
|
||||
if (data.breeze && data.breeze.hourly) {
|
||||
// 获取平台可用性信息
|
||||
const breezeAvailable = data.breeze_available !== undefined ? data.breeze_available : true;
|
||||
const cmsAvailable = data.cms_available !== undefined ? data.cms_available : true;
|
||||
const inspectAvailable = data.inspect_available !== undefined ? data.inspect_available : true;
|
||||
|
||||
// 控制面板显示
|
||||
document.getElementById('breeze-panel').style.display = breezeAvailable ? 'block' : 'none';
|
||||
document.getElementById('cms-panel').style.display = cmsAvailable ? 'block' : 'none';
|
||||
document.getElementById('inspect-panel').style.display = inspectAvailable ? 'block' : 'none';
|
||||
|
||||
// 根据可用平台调整总量级显示标题
|
||||
let totalPlatforms = [];
|
||||
if (breezeAvailable) totalPlatforms.push("清风审核");
|
||||
if (cmsAvailable) totalPlatforms.push("大神CMS");
|
||||
if (inspectAvailable) totalPlatforms.push("CC审核平台");
|
||||
|
||||
const platformsText = totalPlatforms.join(" + ");
|
||||
const totalCard = document.querySelector('.stats-card.total h3');
|
||||
totalCard.textContent = `总计(折算量)- ${platformsText || "无可用平台"}`;
|
||||
|
||||
// 更新Breeze工单系统面板数据
|
||||
// 即使breeze数据不存在,也使用默认值而不是直接返回
|
||||
const breezeHourly = data.breeze && data.breeze.hourly ? data.breeze.hourly : { total: 0, weighted_total: 0, categories: {} };
|
||||
const breezeDaily = data.breeze && data.breeze.daily ? data.breeze.daily : { total: 0, weighted_total: 0, categories: {} };
|
||||
|
||||
// 更新顶部统计数据
|
||||
document.getElementById('breeze-total').textContent = data.breeze.hourly.total || '0';
|
||||
document.getElementById('breeze-daily-total').textContent = data.breeze.daily ? (data.breeze.daily.total || '0') : '0';
|
||||
document.getElementById('breeze-total').textContent = breezeHourly.total || '0';
|
||||
document.getElementById('breeze-daily-total').textContent = breezeDaily.total || '0';
|
||||
|
||||
// 更新Breeze工单系统面板
|
||||
document.getElementById('breeze-hourly-count').textContent = data.breeze.hourly.total || '-';
|
||||
document.getElementById('breeze-hourly-weighted').textContent = data.breeze.hourly.weighted_total ? data.breeze.hourly.weighted_total.toFixed(2) : '-';
|
||||
document.getElementById('breeze-daily-count').textContent = data.breeze.daily ? (data.breeze.daily.total || '-') : '-';
|
||||
document.getElementById('breeze-daily-weighted').textContent = data.breeze.daily ? (data.breeze.daily.weighted_total || '-').toFixed(2) : '-';
|
||||
document.getElementById('breeze-hourly-count').textContent = breezeHourly.total || '0';
|
||||
document.getElementById('breeze-hourly-weighted').textContent = breezeHourly.weighted_total ? breezeHourly.weighted_total.toFixed(2) : '0.00';
|
||||
document.getElementById('breeze-daily-count').textContent = breezeDaily.total || '0';
|
||||
document.getElementById('breeze-daily-weighted').textContent = breezeDaily.weighted_total ? breezeDaily.weighted_total.toFixed(2) : '0.00';
|
||||
|
||||
// 更新小时类别数据
|
||||
const breezeHourlyCategories = document.getElementById('breeze-hourly-categories');
|
||||
if (data.breeze.hourly.categories) {
|
||||
if (breezeHourly.categories && Object.keys(breezeHourly.categories).length > 0) {
|
||||
let categoriesHTML = `
|
||||
<div class="category-header">
|
||||
<div class="name">类别</div>
|
||||
<div class="count">数量</div>
|
||||
<div class="weighted">折算值</div>
|
||||
</div>`;
|
||||
for (const [name, info] of Object.entries(data.breeze.hourly.categories)) {
|
||||
for (const [name, info] of Object.entries(breezeHourly.categories)) {
|
||||
if (info.count > 0) {
|
||||
categoriesHTML += `
|
||||
<div class="category-item">
|
||||
@ -1181,14 +1148,14 @@
|
||||
|
||||
// 更新日类别数据
|
||||
const breezeDailyCategories = document.getElementById('breeze-daily-categories');
|
||||
if (data.breeze.daily.categories) {
|
||||
if (breezeDaily.categories && Object.keys(breezeDaily.categories).length > 0) {
|
||||
let categoriesHTML = `
|
||||
<div class="category-header">
|
||||
<div class="name">类别</div>
|
||||
<div class="count">数量</div>
|
||||
<div class="weighted">折算值</div>
|
||||
</div>`;
|
||||
for (const [name, info] of Object.entries(data.breeze.daily.categories)) {
|
||||
for (const [name, info] of Object.entries(breezeDaily.categories)) {
|
||||
if (info.count > 0) {
|
||||
categoriesHTML += `
|
||||
<div class="category-item">
|
||||
@ -1207,7 +1174,8 @@
|
||||
}
|
||||
|
||||
// 更新最后更新时间
|
||||
document.getElementById('breeze-last-update').textContent = '最后更新: ' + data.breeze.hourly_update;
|
||||
if (data.breeze) {
|
||||
document.getElementById('breeze-last-update').textContent = '最后更新: ' + (data.breeze.hourly_update || '未知');
|
||||
|
||||
// 更新时间戳
|
||||
if (data.breeze.hourly_update) {
|
||||
@ -1219,21 +1187,33 @@
|
||||
}
|
||||
|
||||
// 更新CMS数据
|
||||
if (data.cms && data.cms.hourly) {
|
||||
// 即使cms数据不存在,也使用默认值而不是直接返回
|
||||
const cmsHourly = data.cms && data.cms.hourly ? data.cms.hourly : {
|
||||
stats: { comment: 0, feed: 0, complaint: 0 },
|
||||
weighted_total: 0,
|
||||
total_count: 0
|
||||
};
|
||||
const cmsDaily = data.cms && data.cms.daily ? data.cms.daily : {
|
||||
stats: { comment: 0, feed: 0, complaint: 0 },
|
||||
weighted_total: 0,
|
||||
total_count: 0
|
||||
};
|
||||
|
||||
// 更新顶部统计栏
|
||||
const cmsTotal = data.cms.hourly.total_count || 0;
|
||||
document.getElementById('cms-total').textContent = cmsTotal;
|
||||
document.getElementById('cms-daily-total').textContent = data.cms.daily ? (data.cms.daily.total_count || '0') : '0';
|
||||
document.getElementById('cms-total').textContent = cmsHourly.total_count || '0';
|
||||
document.getElementById('cms-daily-total').textContent = cmsDaily.total_count || '0';
|
||||
|
||||
// 更新CMS审核系统面板
|
||||
document.getElementById('cms-hourly-comment').textContent = data.cms.hourly.stats ? data.cms.hourly.stats.comment : '-';
|
||||
document.getElementById('cms-hourly-feed').textContent = data.cms.hourly.stats ? data.cms.hourly.stats.feed : '-';
|
||||
document.getElementById('cms-hourly-complaint').textContent = data.cms.hourly.stats ? data.cms.hourly.stats.complaint : '-';
|
||||
document.getElementById('cms-hourly-count').textContent = data.cms.hourly.total_count || '-';
|
||||
document.getElementById('cms-hourly-weighted').textContent = data.cms.hourly.weighted_total ? data.cms.hourly.weighted_total.toFixed(2) : '-';
|
||||
document.getElementById('cms-last-update').textContent = '最后更新: ' + data.cms.hourly_update;
|
||||
document.getElementById('cms-hourly-comment').textContent = cmsHourly.stats ? cmsHourly.stats.comment : '0';
|
||||
document.getElementById('cms-hourly-feed').textContent = cmsHourly.stats ? cmsHourly.stats.feed : '0';
|
||||
document.getElementById('cms-hourly-complaint').textContent = cmsHourly.stats ? cmsHourly.stats.complaint : '0';
|
||||
document.getElementById('cms-hourly-count').textContent = cmsHourly.total_count || '0';
|
||||
document.getElementById('cms-hourly-weighted').textContent = cmsHourly.weighted_total ? cmsHourly.weighted_total.toFixed(2) : '0.00';
|
||||
|
||||
// 更新时间戳
|
||||
if (data.cms) {
|
||||
document.getElementById('cms-last-update').textContent = '最后更新: ' + (data.cms.hourly_update || '未知');
|
||||
|
||||
if (data.cms.hourly_update) {
|
||||
document.getElementById('cms-hourly-time').textContent = data.cms.hourly_update;
|
||||
}
|
||||
@ -1243,26 +1223,23 @@
|
||||
}
|
||||
|
||||
// 更新CMS每日数据
|
||||
if (data.cms && data.cms.daily && data.cms.daily.stats) {
|
||||
document.getElementById('cms-daily-comment').textContent = data.cms.daily.stats.comment || '-';
|
||||
document.getElementById('cms-daily-feed').textContent = data.cms.daily.stats.feed || '-';
|
||||
document.getElementById('cms-daily-complaint').textContent = data.cms.daily.stats.complaint || '-';
|
||||
document.getElementById('cms-daily-count').textContent = data.cms.daily.total_count || '-';
|
||||
document.getElementById('cms-daily-weighted').textContent = data.cms.daily.weighted_total ? data.cms.daily.weighted_total.toFixed(2) : '-';
|
||||
}
|
||||
document.getElementById('cms-daily-comment').textContent = cmsDaily.stats ? cmsDaily.stats.comment : '0';
|
||||
document.getElementById('cms-daily-feed').textContent = cmsDaily.stats ? cmsDaily.stats.feed : '0';
|
||||
document.getElementById('cms-daily-complaint').textContent = cmsDaily.stats ? cmsDaily.stats.complaint : '0';
|
||||
document.getElementById('cms-daily-count').textContent = cmsDaily.total_count || '0';
|
||||
document.getElementById('cms-daily-weighted').textContent = cmsDaily.weighted_total ? cmsDaily.weighted_total.toFixed(2) : '0.00';
|
||||
|
||||
// 更新CC审核平台数据
|
||||
if (data.inspect && data.inspect.hourly) {
|
||||
const hourlyTotal = data.inspect.hourly.total || 0;
|
||||
const hourlyWeighted = data.inspect.hourly.weighted_total || 0;
|
||||
document.getElementById('inspect-hourly-total').textContent = hourlyTotal;
|
||||
document.getElementById('inspect-hourly-weighted').textContent = `(${Math.round(hourlyWeighted)})`;
|
||||
document.getElementById('inspect-daily-total').textContent = data.inspect.daily ? (data.inspect.daily.total || '0') : '0';
|
||||
if (data.inspect.daily) {
|
||||
document.getElementById('inspect-daily-weighted').textContent = `(${Math.round(data.inspect.daily.weighted_total)})`;
|
||||
}
|
||||
const inspectHourly = data.inspect && data.inspect.hourly ? data.inspect.hourly : { total: 0, weighted_total: 0 };
|
||||
const inspectDaily = data.inspect && data.inspect.daily ? data.inspect.daily : { total: 0, weighted_total: 0 };
|
||||
|
||||
document.getElementById('inspect-hourly-total').textContent = inspectHourly.total || '0';
|
||||
document.getElementById('inspect-hourly-weighted').textContent = `(${Math.round(inspectHourly.weighted_total || 0)})`;
|
||||
document.getElementById('inspect-daily-total').textContent = inspectDaily.total || '0';
|
||||
document.getElementById('inspect-daily-weighted').textContent = `(${Math.round(inspectDaily.weighted_total || 0)})`;
|
||||
|
||||
// 更新时间戳
|
||||
if (data.inspect) {
|
||||
if (data.inspect.hourly_update) {
|
||||
document.getElementById('inspect-hourly-time').textContent = data.inspect.hourly_update;
|
||||
}
|
||||
@ -1271,10 +1248,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 更新总计数据
|
||||
// 更新总计数据 - 即使某个业务无数据也能正确显示总量级
|
||||
if (data.total) {
|
||||
document.getElementById('total-weighted-hourly').textContent = Math.round(data.total.hourly);
|
||||
document.getElementById('total-weighted-daily').textContent = Math.round(data.total.daily);
|
||||
document.getElementById('total-weighted-hourly').textContent = Math.round(data.total.hourly || 0);
|
||||
document.getElementById('total-weighted-daily').textContent = Math.round(data.total.daily || 0);
|
||||
|
||||
// 获取最新的时间戳
|
||||
const hourlyUpdateTime = getLatestTimestamp([
|
||||
@ -1960,12 +1937,15 @@
|
||||
|
||||
function updateStats(data) {
|
||||
try {
|
||||
// 更新统计栏数据
|
||||
if (data.breeze && data.breeze.hourly) {
|
||||
document.getElementById('breeze-total').textContent = data.breeze.hourly.total || '0';
|
||||
document.getElementById('breeze-daily-total').textContent = data.breeze.daily ? (data.breeze.daily.total || '0') : '0';
|
||||
// 更新统计栏数据 - 使用默认值处理缺失数据
|
||||
const breezeHourly = data.breeze && data.breeze.hourly ? data.breeze.hourly : { total: 0, weighted_total: 0 };
|
||||
const breezeDaily = data.breeze && data.breeze.daily ? data.breeze.daily : { total: 0, weighted_total: 0 };
|
||||
|
||||
document.getElementById('breeze-total').textContent = breezeHourly.total || '0';
|
||||
document.getElementById('breeze-daily-total').textContent = breezeDaily.total || '0';
|
||||
|
||||
// 更新时间戳
|
||||
if (data.breeze) {
|
||||
if (data.breeze.hourly_update) {
|
||||
document.getElementById('breeze-hourly-time').textContent = data.breeze.hourly_update;
|
||||
}
|
||||
@ -1974,14 +1954,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 更新CMS数据
|
||||
if (data.cms && data.cms.hourly) {
|
||||
// 更新CMS数据 - 使用默认值处理缺失数据
|
||||
const cmsHourly = data.cms && data.cms.hourly ? data.cms.hourly : { total_count: 0, weighted_total: 0 };
|
||||
const cmsDaily = data.cms && data.cms.daily ? data.cms.daily : { total_count: 0, weighted_total: 0 };
|
||||
|
||||
// 更新顶部统计栏
|
||||
const cmsTotal = data.cms.hourly.total_count || 0;
|
||||
document.getElementById('cms-total').textContent = cmsTotal;
|
||||
document.getElementById('cms-daily-total').textContent = data.cms.daily ? (data.cms.daily.total_count || '0') : '0';
|
||||
document.getElementById('cms-total').textContent = cmsHourly.total_count || '0';
|
||||
document.getElementById('cms-daily-total').textContent = cmsDaily.total_count || '0';
|
||||
|
||||
// 更新时间戳
|
||||
if (data.cms) {
|
||||
if (data.cms.hourly_update) {
|
||||
document.getElementById('cms-hourly-time').textContent = data.cms.hourly_update;
|
||||
}
|
||||
@ -1990,18 +1972,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 更新CC审核平台数据
|
||||
if (data.inspect && data.inspect.hourly) {
|
||||
const hourlyTotal = data.inspect.hourly.total || 0;
|
||||
const hourlyWeighted = data.inspect.hourly.weighted_total || 0;
|
||||
document.getElementById('inspect-hourly-total').textContent = hourlyTotal;
|
||||
document.getElementById('inspect-hourly-weighted').textContent = `(${Math.round(hourlyWeighted)})`;
|
||||
document.getElementById('inspect-daily-total').textContent = data.inspect.daily ? (data.inspect.daily.total || '0') : '0';
|
||||
if (data.inspect.daily) {
|
||||
document.getElementById('inspect-daily-weighted').textContent = `(${Math.round(data.inspect.daily.weighted_total)})`;
|
||||
}
|
||||
// 更新CC审核平台数据 - 使用默认值处理缺失数据
|
||||
const inspectHourly = data.inspect && data.inspect.hourly ? data.inspect.hourly : { total: 0, weighted_total: 0 };
|
||||
const inspectDaily = data.inspect && data.inspect.daily ? data.inspect.daily : { total: 0, weighted_total: 0 };
|
||||
|
||||
document.getElementById('inspect-hourly-total').textContent = inspectHourly.total || '0';
|
||||
document.getElementById('inspect-hourly-weighted').textContent = `(${Math.round(inspectHourly.weighted_total || 0)})`;
|
||||
document.getElementById('inspect-daily-total').textContent = inspectDaily.total || '0';
|
||||
document.getElementById('inspect-daily-weighted').textContent = `(${Math.round(inspectDaily.weighted_total || 0)})`;
|
||||
|
||||
// 更新时间戳
|
||||
if (data.inspect) {
|
||||
if (data.inspect.hourly_update) {
|
||||
document.getElementById('inspect-hourly-time').textContent = data.inspect.hourly_update;
|
||||
}
|
||||
@ -2010,10 +1991,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 更新总计数据
|
||||
// 更新总计数据 - 确保即使某个业务无数据也能正确显示总量级
|
||||
if (data.total) {
|
||||
document.getElementById('total-weighted-hourly').textContent = Math.round(data.total.hourly);
|
||||
document.getElementById('total-weighted-daily').textContent = Math.round(data.total.daily);
|
||||
document.getElementById('total-weighted-hourly').textContent = Math.round(data.total.hourly || 0);
|
||||
document.getElementById('total-weighted-daily').textContent = Math.round(data.total.daily || 0);
|
||||
|
||||
// 获取最新的时间戳
|
||||
const hourlyUpdateTime = getLatestTimestamp([
|
||||
|
@ -532,6 +532,12 @@
|
||||
.message.fade-out {
|
||||
animation: el-message-fade-out .3s;
|
||||
}
|
||||
|
||||
.optional-label {
|
||||
color: #999;
|
||||
font-size: 0.8em;
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -570,27 +576,27 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Breeze工单系统 Cookie</label>
|
||||
<input type="text" name="breeze_cookie" placeholder="请输入Breeze系统Cookie" required>
|
||||
<div style="color: #ff4d4f; font-size: 12px; margin-top: 5px;">
|
||||
必填项
|
||||
</div>
|
||||
<label for="breeze_cookie">
|
||||
<div>清风审核系统Cookie:<span class="optional-label">(可选)</span></div>
|
||||
<div class="cookie-help">从<a href="https://breeze.opd.netease.com/center/workbench" target="_blank">breeze.opd.netease.com</a>获取</div>
|
||||
</label>
|
||||
<input type="text" name="breeze_cookie" placeholder="请输入清风审核系统Cookie(可选)">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>CMS系统 Cookie</label>
|
||||
<input type="text" name="cms_cookie" placeholder="请输入CMS系统Cookie" required>
|
||||
<div style="color: #ff4d4f; font-size: 12px; margin-top: 5px;">
|
||||
必填项
|
||||
</div>
|
||||
<label for="cms_cookie">
|
||||
<div>大神CMS系统Cookie:<span class="optional-label">(可选)</span></div>
|
||||
<div class="cookie-help">从<a href="https://god-cms.gameyw.netease.com/cms/" target="_blank">god-cms.gameyw.netease.com</a>获取</div>
|
||||
</label>
|
||||
<input type="text" name="cms_cookie" placeholder="请输入大神CMS系统Cookie(可选)">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>CC审核平台 Cookie(可选)</label>
|
||||
<label for="inspect_cookie">
|
||||
<div>CC审核平台Cookie:<span class="optional-label">(可选)</span></div>
|
||||
<div class="cookie-help">从<a href="https://inspect.cc.163.com/#/forum/contenttrack" target="_blank">cc.163.com</a>获取</div>
|
||||
</label>
|
||||
<input type="text" name="inspect_cookie" placeholder="请输入CC审核平台Cookie(可选)">
|
||||
<div style="color: #ff4d4f; font-size: 12px; margin-top: 5px;">
|
||||
此选项可填可不填
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cookie-guide">
|
||||
|
Loading…
x
Reference in New Issue
Block a user