PhilipL commited on
Commit
2111b0e
·
unverified ·
1 Parent(s): d9871e3

adjust admin test btn

Browse files
Files changed (1) hide show
  1. app.py +27 -6
app.py CHANGED
@@ -528,12 +528,33 @@ with gr.Blocks(title="模擬校園入口與資安防護系統") as demo:
528
  ai_explanation_output = gr.Textbox(label="AI 分析結果與說明", lines=4, interactive=False)
529
 
530
  with gr.Accordion("▼ HDBSCAN 異常辨識自動化測試區", open=True, elem_classes="weight-card"):
531
- gr.Markdown("#### 點擊按鈕將直接以指定時間點執行該系統的操作,結果將顯示於左側 Log 區。")
532
- 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")
533
- 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")
534
- 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")
535
- 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")
536
- 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")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
 
538
  def update_dataframes(df_all, df_abn): return gr.update(value=df_all), gr.update(value=df_abn)
539
  store_df_all.change(fn=update_dataframes, inputs=[store_df_all, store_df_abn], outputs=[log_display, abnormal_log_display])
 
528
  ai_explanation_output = gr.Textbox(label="AI 分析結果與說明", lines=4, interactive=False)
529
 
530
  with gr.Accordion("▼ HDBSCAN 異常辨識自動化測試區", open=True, elem_classes="weight-card"):
531
+ gr.Markdown("<span style='color:gray; font-size:0.9em;'>點擊按鈕將直接以指定時間點執行該系統的操作,結果將顯示於左側 Log 區。</span>")
532
+ gr.Markdown("#### 1. 選課相關系統 (具備強烈季節性)")
533
+ with gr.Row():
534
+ t_pre_sel_norm = gr.Button("✅ 正常: 期末網路預選系統 (06-13 11:00)", size="sm"); t_pre_sel_anom = gr.Button("⚠️ 異常: 期末網路預選系統 (10-15 13:00)", size="sm")
535
+ with gr.Row():
536
+ t_course_norm = gr.Button("✅ 正常: 課程系統 (02-25 07:50)", size="sm"); t_course_anom = gr.Button("⚠️ 異常: 課程系統 (07-15 05:00)", size="sm")
537
+ with gr.Row():
538
+ t_add_drop_norm = gr.Button("✅ 正常: 開學後加退選系統 (02-18 14:00)", size="sm"); t_add_drop_anom = gr.Button("⚠️ 異常: 開學後加退選系統 (05-15 12:00)", size="sm")
539
+ gr.Markdown("#### 2. 期末與成績相關 (具備週期性)")
540
+ with gr.Row():
541
+ t_eval_norm = gr.Button("✅ 正常: 期末網路教學評量 (12-17 13:20)", size="sm"); t_eval_anom = gr.Button("⚠️ 異常: 期末網路教學評量 (03-15 03:00)", size="sm")
542
+ with gr.Row():
543
+ t_score_norm = gr.Button("✅ 正常: 學業成績查詢系統 (11-17 18:50)", size="sm"); t_score_anom = gr.Button("⚠️ 異常: 學業成績查詢系統 (02-15 03:00)", size="sm")
544
+ gr.Markdown("#### 3. 校務與行政服務 (生活與常規)")
545
+ with gr.Row():
546
+ t_dorm_norm = gr.Button("✅ 正常: 學生宿舍登錄(抽籤)系統 (07-21 23:10)", size="sm"); t_dorm_anom = gr.Button("⚠️ 異常: 學生宿舍登錄(抽籤)系統 (11-15 16:00)", size="sm")
547
+ with gr.Row():
548
+ t_schol_norm = gr.Button("✅ 正常: 獎助學金申請系統 (03-12 14:00)", size="sm"); t_schol_anom = gr.Button("⚠️ 異常: 獎助學金申請系統 (08-15 02:00)", size="sm")
549
+ with gr.Row():
550
+ t_card_norm = gr.Button("✅ 正常: 學生證掛失 (10-23 13:40)", size="sm"); t_card_anom = gr.Button("⚠️ 異常: 學生證掛失 (08-10 03:00)", size="sm")
551
+ gr.Markdown("#### 4. 學習與日常輔助系統 (具備作息規律)")
552
+ with gr.Row():
553
+ 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")
554
+ with gr.Row():
555
+ t_leave_norm = gr.Button("✅ 正常: 學生請假系統 (03-29 08:45)", size="sm"); t_leave_anom = gr.Button("⚠️ 異常: 學生請假系統 (08-15 13:00)", size="sm")
556
+ with gr.Row():
557
+ t_vdesk_norm = gr.Button("✅ 正常: 軟體雲/WebMail (03-22 18:00)", size="sm"); t_vdesk_anom = gr.Button("⚠️ 異常: 軟體雲/WebMail (08-10 00:00)", size="sm")
558
 
559
  def update_dataframes(df_all, df_abn): return gr.update(value=df_all), gr.update(value=df_abn)
560
  store_df_all.change(fn=update_dataframes, inputs=[store_df_all, store_df_abn], outputs=[log_display, abnormal_log_display])