Add month/quarter/half-year/all list window presets with this month as default.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -230,7 +230,7 @@ function deleteKeyHistory(id){
|
||||
|
||||
function listWindowQueryString(){
|
||||
const presetEl = document.getElementById("win-preset-select");
|
||||
const preset = (presetEl && presetEl.value) || new URLSearchParams(window.location.search).get("win_preset") || "utc_today";
|
||||
const preset = (presetEl && presetEl.value) || new URLSearchParams(window.location.search).get("win_preset") || "utc_this_month";
|
||||
const q = new URLSearchParams(window.location.search);
|
||||
q.set("win_preset", preset);
|
||||
if(preset === "custom"){
|
||||
|
||||
@@ -759,7 +759,7 @@ function deleteKeyHistory(id){
|
||||
|
||||
function listWindowQueryString(){
|
||||
const presetEl = document.getElementById("win-preset-select");
|
||||
const preset = (presetEl && presetEl.value) || new URLSearchParams(window.location.search).get("win_preset") || "utc_today";
|
||||
const preset = (presetEl && presetEl.value) || new URLSearchParams(window.location.search).get("win_preset") || "utc_this_month";
|
||||
const q = new URLSearchParams(window.location.search);
|
||||
q.set("win_preset", preset);
|
||||
if(preset === "custom"){
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
<div class="instance-header-panel card">
|
||||
<div class="instance-header-toolbar">
|
||||
<div class="instance-header-toolbar-filter">
|
||||
<span class="list-window-label" title="列表按 UTC 时间筛选,默认当日">UTC {{ list_window.label }}</span>
|
||||
<span class="list-window-label" title="列表按 UTC 时间筛选,默认本月">UTC {{ list_window.label }}</span>
|
||||
<label class="list-window-preset">预设
|
||||
<select id="win-preset-select" onchange="toggleListWindowCustom()">
|
||||
<option value="utc_this_month" {% if list_window.preset == 'utc_this_month' %}selected{% endif %}>本月</option>
|
||||
<option value="utc_last3m" {% if list_window.preset == 'utc_last3m' %}selected{% endif %}>近3月</option>
|
||||
<option value="utc_last6m" {% if list_window.preset == 'utc_last6m' %}selected{% endif %}>近6月</option>
|
||||
<option value="all" {% if list_window.preset == 'all' %}selected{% endif %}>全部</option>
|
||||
<option value="utc_today" {% if list_window.preset == 'utc_today' %}selected{% endif %}>UTC 当日</option>
|
||||
<option value="utc_last24h" {% if list_window.preset == 'utc_last24h' %}selected{% endif %}>近 24 小时</option>
|
||||
<option value="utc_last7d" {% if list_window.preset == 'utc_last7d' %}selected{% endif %}>近 7 天</option>
|
||||
|
||||
Reference in New Issue
Block a user