- {[['resource_id', resource === 'posts' ? '投稿 ID' : 'タグ ID'],
- ['user_id', '操作者 ID'],
- ...(resource === 'posts' ? [['tag', '記載・変更タグ ID']] : [])]
- .map (([key, name]) => (
-
+
+
+
+
+
+
+ {label (`titles.${resource}`)}
+
+ {
+ if (next.toString () === canonical) void refetch ()
+ else setParams (next)
+ }}/>
+
- {mode === 'summary' ? (
-
- {() => }
- ) : (
- )}
-
-
-
-
-
- 変更日時:開始以上・終了未満。入力は端末の時刻帯、月別は UTC。
- 件数は履歴レコード数です。
- {isPending && {label ('shared:messages.loadingEllipsis')}
}
- {isError && {label ('common:fetchError')}
}
- {data != null && <>
- 総件数:{data.count}
-
-
-
- {mode === 'summary'
- ? <>| 集計軸 | 件数 | >
- : <>{resource === 'posts' ? '投稿' : 'タグ'} |
- {columns.map (column =>
- {countColumns[column]} | )}>}
-
-
- {mode === 'summary' ? groups.map (group => (
-
- |
- {groupName (group)} |
- {group.count} |
-
)) : versions.map (row => {
- const id = 'postId' in row ? row.postId : row.tagId
- return
- | #{id} |
- {columns.map (column =>
- {column === 'url'
- ?
- {cell (row, column)}
- : cell (row, column)} | )}
-
- })}
-
-
-
-
- >}
- )
+ {isPending &&
{label ('shared:messages.loadingEllipsis')}
}
+ {isError &&
{label ('common:fetchError')}
}
+ {data != null && <>
+
{label ('total', { count: data.count })}
+
+
+
+ {mode === 'summary'
+ ? <>| {label (`axes.${axis}`)} |
+ {label ('metric')} | >
+ : <>
+ {label (resource === 'posts' ? 'history:post' : 'navigation:tags')} |
+ {columns.map (column => (
+
+ {label (countColumns[column])} | ))}>}
+
+
+ {mode === 'summary' ? groups.map (group => (
+
+ |
+ {group.key == null ? label ('history:bot') : groupName (group)}
+ |
+ {group.count} |
+
)) : versions.map (row => {
+ const id = 'postId' in row ? row.postId : row.tagId
+ return
+ | #{id} |
+ {columns.map (column => (
+
+ {column === 'url'
+ ?
+ {cell (row, column)}
+ : (column === 'category' && 'tagId' in row
+ ?
+ {cell (row, column)}
+ : cell (row, column))} | ))}
+
+ })}
+
+
+ {(mode === 'summary' ? groups.length : versions.length) === 0
+ &&
{label ('empty')}
}
+
+
+ >}
+
+