Spaces:
Sleeping
Sleeping
adjust admin test btn
Browse files527 unmodified lines528529530531532533534535536537538539527 unmodified linesai_explanation_output = gr.Textbox(label="AI 分析結果與說明", lines=4, interactive=False)with gr.Accordion("▼ HDBSCAN 異常辨識自動化測試區", open=True, elem_classes="weight-card"):gr.Markdown("#### 點擊按鈕將直接以指定時間點執行該系統的操作,結果將顯示於左側 Log 區。")with gr.Row(): t_pre_sel_norm = gr.Button("✅ 正常: 預選系統 (06-13 11:00)", size="sm"); t_pre_sel_anom = gr.Button("⚠️ 異常: 預選系統 (10-15 13:00)", size="sm")with gr.Row(): t_course_norm = gr.Button("✅ 正常: 課程系統 (02-25 07:50)", size="sm"); t_course_anom = gr.Button("⚠️ 異常: 課程系統 (07-15 05:00)", size="sm")with gr.Row(): t_add_drop_norm = gr.Button("✅ 正常: 加退選系統 (02-18 14:00)", size="sm"); t_add_drop_anom = gr.Button("⚠️ 異常: 加退選系統 (05-15 12:00)", size="sm")with gr.Row(): t_eval_norm = gr.Button("✅ 正常: 教學評量 (12-17 13:20)", size="sm"); t_eval_anom = gr.Button("⚠️ 異常: 教學評量 (03-15 03:00)", size="sm")with gr.Row(): t_score_norm = gr.Button("✅ 正常: 成績查詢 (11-17 18:50)", size="sm"); t_score_anom = gr.Button("⚠️ 異常: 成績查詢 (02-15 03:00)", size="sm")def update_dataframes(df_all, df_abn): return gr.update(value=df_all), gr.update(value=df_abn)store_df_all.change(fn=update_dataframes, inputs=[store_df_all, store_df_abn], outputs=[log_display, abnormal_log_display])527 unmodified lines528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560527 unmodified linesai_explanation_output = gr.Textbox(label="AI 分析結果與說明", lines=4, interactive=False)with gr.Accordion("▼ HDBSCAN 異常辨識自動化測試區", open=True, elem_classes="weight-card"):gr.Markdown("<span style='color:gray; font-size:0.9em;'>點擊按鈕將直接以指定時間點執行該系統的操作,結果將顯示於左側 Log 區。</span>")gr.Markdown("#### 1. 選課相關系統 (具備強烈季節性)")with gr.Row():t_pre_sel_norm = gr.Button("✅ 正常: 期末網路預選系統 (06-13 11:00)", size="sm"); t_pre_sel_anom = gr.Button("⚠️ 異常: 期末網路預選系統 (10-15 13:00)", size="sm")with gr.Row():t_course_norm = gr.Button("✅ 正常: 課程系統 (02-25 07:50)", size="sm"); t_course_anom = gr.Button("⚠️ 異常: 課程系統 (07-15 05:00)", size="sm")with gr.Row():t_add_drop_norm = gr.Button("✅ 正常: 開學後加退選系統 (02-18 14:00)", size="sm"); t_add_drop_anom = gr.Button("⚠️ 異常: 開學後加退選系統 (05-15 12:00)", size="sm")gr.Markdown("#### 2. 期末與成績相關 (具備週期性)")with gr.Row():t_eval_norm = gr.Button("✅ 正常: 期末網路教學評量 (12-17 13:20)", size="sm"); t_eval_anom = gr.Button("⚠️ 異常: 期末網路教學評量 (03-15 03:00)", size="sm")with gr.Row():t_score_norm = gr.Button("✅ 正常: 學業成績查詢系統 (11-17 18:50)", size="sm"); t_score_anom = gr.Button("⚠️ 異常: 學業成績查詢系統 (02-15 03:00)", size="sm")gr.Markdown("#### 3. 校務與行政服務 (生活與常規)")with gr.Row():t_dorm_norm = gr.Button("✅ 正常: 學生宿舍登錄(抽籤)系統 (07-21 23:10)", size="sm"); t_dorm_anom = gr.Button("⚠️ 異常: 學生宿舍登錄(抽籤)系統 (11-15 16:00)", size="sm")with gr.Row():t_schol_norm = gr.Button("✅ 正常: 獎助學金申請系統 (03-12 14:00)", size="sm"); t_schol_anom = gr.Button("⚠️ 異常: 獎助學金申請系統 (08-15 02:00)", size="sm")with gr.Row():t_card_norm = gr.Button("✅ 正常: 學生證掛失 (10-23 13:40)", size="sm"); t_card_anom = gr.Button("⚠️ 異常: 學生證掛失 (08-10 03:00)", size="sm")gr.Markdown("#### 4. 學習與日常輔助系統 (具備作息規律)")with gr.Row():t_istudy_norm = gr.Button("✅ 正常: 北科i學園PLUS (10-18 16:00)", size="sm"); t_istudy_anom = gr.Button("⚠️ 異常: 北科i學園PLUS (08-20 02:00)", size="sm")with gr.Row():t_leave_norm = gr.Button("✅ 正常: 學生請假系統 (03-29 08:45)", size="sm"); t_leave_anom = gr.Button("⚠️ 異常: 學生請假系統 (08-15 13:00)", size="sm")with gr.Row():t_vdesk_norm = gr.Button("✅ 正常: 軟體雲/WebMail (03-22 18:00)", size="sm"); t_vdesk_anom = gr.Button("⚠️ 異常: 軟體雲/WebMail (08-10 00:00)", size="sm")def update_dataframes(df_all, df_abn): return gr.update(value=df_all), gr.update(value=df_abn)store_df_all.change(fn=update_dataframes, inputs=[store_df_all, store_df_abn], outputs=[log_display, abnormal_log_display])
app.py+27-6