fix: improve event script controls and daily reviews
This commit is contained in:
@@ -383,12 +383,15 @@ export interface SystemSettings {
|
||||
webDavUpload: WebDavUploadSettings;
|
||||
s3Upload: S3UploadSettings;
|
||||
enableEventScripts: boolean;
|
||||
enableLiveStartedScript: boolean;
|
||||
liveStartedScriptMode: string;
|
||||
liveStartedScriptPath: string;
|
||||
liveStartedScriptContent: string;
|
||||
enableLiveEndedScript: boolean;
|
||||
liveEndedScriptMode: string;
|
||||
liveEndedScriptPath: string;
|
||||
liveEndedScriptContent: string;
|
||||
enableSegmentCompletedScript: boolean;
|
||||
segmentCompletedScriptMode: string;
|
||||
segmentCompletedScriptPath: string;
|
||||
segmentCompletedScriptContent: string;
|
||||
|
||||
@@ -86,9 +86,10 @@ onMounted(loadReport);
|
||||
<div class="page-stack">
|
||||
<div class="page-header">
|
||||
<div>
|
||||
<h1 class="page-title">鍥為【鏃ユ姤</h1>
|
||||
<h1 class="page-title">回顾日报</h1>
|
||||
<p class="page-subtitle">
|
||||
鎸夊ぉ鑱氬悎褰曞埗鏃堕暱銆佸紓甯稿拰寮瑰箷鐑害銆傛棩鎶ュ彧鍋氶〉闈㈠唴鏌ョ湅锛屼笉浼氫富鍔ㄦ帹閫併€? </p>
|
||||
按天聚合录制时长、异常和弹幕热度。日报只做页面内查看,不会主动推送。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<el-space wrap class="header-actions">
|
||||
@@ -101,7 +102,7 @@ onMounted(loadReport);
|
||||
:disabled-date="disableFutureDates"
|
||||
@change="loadReport"
|
||||
/>
|
||||
<el-button @click="loadReport">鍒锋柊鏃ユ姤</el-button>
|
||||
<el-button @click="loadReport">刷新日报</el-button>
|
||||
</el-space>
|
||||
</div>
|
||||
|
||||
@@ -203,15 +204,15 @@ onMounted(loadReport);
|
||||
<span>{{ formatDuration(item.durationSeconds) }}</span>
|
||||
</div>
|
||||
<div class="highlight-item__stats">
|
||||
<span>鍒嗙墖 {{ item.segmentCount }}</span>
|
||||
<span>寮瑰箷 {{ item.danmakuCount }}</span>
|
||||
<span>璀﹀憡 {{ item.warningCount }}</span>
|
||||
<span>閿欒 {{ item.errorCount }}</span>
|
||||
<span>分片 {{ item.segmentCount }}</span>
|
||||
<span>弹幕 {{ item.danmakuCount }}</span>
|
||||
<span>警告 {{ item.warningCount }}</span>
|
||||
<span>错误 {{ item.errorCount }}</span>
|
||||
</div>
|
||||
<div class="highlight-item__summary">{{ item.summary || "-" }}</div>
|
||||
<div class="highlight-item__footer">
|
||||
<span>{{ formatDate(item.startedAt || item.endedAt) }}</span>
|
||||
<el-button size="small" @click="openSession(item.recordSessionId)">鏌ョ湅浼氳瘽</el-button>
|
||||
<el-button size="small" @click="openSession(item.recordSessionId)">查看会话</el-button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -95,12 +95,15 @@ const form = reactive<SystemSettings>({
|
||||
forcePathStyle: false
|
||||
},
|
||||
enableEventScripts: false,
|
||||
enableLiveStartedScript: false,
|
||||
liveStartedScriptMode: "path",
|
||||
liveStartedScriptPath: "",
|
||||
liveStartedScriptContent: "",
|
||||
enableLiveEndedScript: false,
|
||||
liveEndedScriptMode: "path",
|
||||
liveEndedScriptPath: "",
|
||||
liveEndedScriptContent: "",
|
||||
enableSegmentCompletedScript: false,
|
||||
segmentCompletedScriptMode: "path",
|
||||
segmentCompletedScriptPath: "",
|
||||
segmentCompletedScriptContent: "",
|
||||
@@ -986,6 +989,7 @@ onMounted(loadSettings);
|
||||
<p class="event-script-section__subtitle">房间首次进入在线状态时触发。</p>
|
||||
</div>
|
||||
<div class="event-script-section__actions">
|
||||
<el-switch v-model="form.enableLiveStartedScript" inline-prompt active-text="开" inactive-text="关" />
|
||||
<el-radio-group v-model="form.liveStartedScriptMode" size="small">
|
||||
<el-radio-button
|
||||
v-for="option in eventScriptModeOptions"
|
||||
@@ -1039,6 +1043,7 @@ onMounted(loadSettings);
|
||||
<p class="event-script-section__subtitle">房间从在线切回离线时触发。</p>
|
||||
</div>
|
||||
<div class="event-script-section__actions">
|
||||
<el-switch v-model="form.enableLiveEndedScript" inline-prompt active-text="开" inactive-text="关" />
|
||||
<el-radio-group v-model="form.liveEndedScriptMode" size="small">
|
||||
<el-radio-button
|
||||
v-for="option in eventScriptModeOptions"
|
||||
@@ -1092,6 +1097,7 @@ onMounted(loadSettings);
|
||||
<p class="event-script-section__subtitle">MP4 转码完成并且分片状态变成 completed 后触发。</p>
|
||||
</div>
|
||||
<div class="event-script-section__actions">
|
||||
<el-switch v-model="form.enableSegmentCompletedScript" inline-prompt active-text="开" inactive-text="关" />
|
||||
<el-radio-group v-model="form.segmentCompletedScriptMode" size="small">
|
||||
<el-radio-button
|
||||
v-for="option in eventScriptModeOptions"
|
||||
@@ -1150,6 +1156,10 @@ onMounted(loadSettings);
|
||||
如果脚本想把自定义内容写进系统日志,请把文本写入 <code>LIVE_RECORDER_SCRIPT_LOG_PATH</code> 指向的临时文件。
|
||||
</div>
|
||||
|
||||
<div class="event-script-help__intro">
|
||||
官方 Docker 镜像默认内置 <code>curl</code> 和 <code>jq</code>;如果你使用宿主机直跑或自定义镜像,实际可用命令以运行环境为准。
|
||||
</div>
|
||||
|
||||
<div class="event-script-example">
|
||||
<div class="event-script-example__label">环境变量示例值</div>
|
||||
<div class="event-script-example__grid">
|
||||
|
||||
Reference in New Issue
Block a user