|
|
@@ -85,27 +85,6 @@ function singletonMaps(singleton) {
|
|
|
return byQueryText
|
|
|
}
|
|
|
|
|
|
-function SingletonLinks({ singleton }) {
|
|
|
- if (!singleton?.batch || !singleton?.run) return null
|
|
|
- const firstDecoded = singleton.decoded_items?.[0]
|
|
|
- const firstQuery = singleton.queries?.find((row) => row.query_id === firstDecoded?.query_id) || singleton.queries?.[0]
|
|
|
- const searchHref = firstQuery ? `#/query/${encodeURIComponent(singleton.run.id)}/${encodeURIComponent(firstQuery.query_id)}` : ''
|
|
|
- const decodeHref = firstDecoded ? `#/decode-item/${encodeURIComponent(firstDecoded.item_id)}` : ''
|
|
|
- const payloadText = firstDecoded?.payload_count ? ` ${firstDecoded.payload_count} payload` : ''
|
|
|
- return (
|
|
|
- <div className="singleton-panel">
|
|
|
- <div>
|
|
|
- <b>最近真实单例</b>
|
|
|
- <span>{singleton.batch.name} · {singleton.run.status}</span>
|
|
|
- </div>
|
|
|
- <div className="singleton-actions">
|
|
|
- {searchHref && <a className="btn ghost" href={searchHref}>查看搜索结果</a>}
|
|
|
- {decodeHref && <a className="btn" href={decodeHref}>查看拆解结果{payloadText}</a>}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- )
|
|
|
-}
|
|
|
-
|
|
|
function PreviewQueryRow({ item, index, latest, singleton }) {
|
|
|
const decoded = latest?.decoded_items?.[0]
|
|
|
const searchHref = latest && singleton?.run
|
|
|
@@ -171,7 +150,6 @@ function QueryGenerationPreview() {
|
|
|
<div className="sub">
|
|
|
只显示当前激活的 2 种正交方式:f1 / f2。生成逻辑来自正式 query builder;此页只预览,不写 DB、不发起搜索。
|
|
|
</div>
|
|
|
- <SingletonLinks singleton={singleton} />
|
|
|
|
|
|
<div className="famcols two">
|
|
|
{families.map((row) => (
|