@cartanova/qgrid-cli 2.11.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/dist/application/qgrid/qgrid-response-format.js +9 -1
- package/bundle/dist/application/qgrid/qgrid-run-lifecycle.js +28 -4
- package/bundle/dist/application/qgrid/qgrid.dispatcher.js +7 -4
- package/bundle/dist/application/qgrid/qgrid.frame.js +25 -4
- package/bundle/dist/application/request-log/request-log.model.js +5 -1
- package/bundle/dist/utils/providers/anthropic/anthropic-dispatcher.js +7 -2
- package/bundle/dist/utils/providers/anthropic/claude-session.js +10 -2
- package/bundle/dist/utils/providers/grok/grok-backend-protocol.js +1 -1
- package/bundle/dist/utils/providers/grok/grok-dispatcher.js +43 -12
- package/bundle/dist/utils/providers/grok/grok-types.js +2 -2
- package/bundle/dist/utils/providers/openai/openai-dispatcher.js +9 -3
- package/bundle/src/application/qgrid/qgrid-response-format.ts +9 -0
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.test.ts +63 -0
- package/bundle/src/application/qgrid/qgrid-run-lifecycle.ts +49 -7
- package/bundle/src/application/qgrid/qgrid.dispatcher.ts +6 -0
- package/bundle/src/application/qgrid/qgrid.frame.test.ts +9 -2
- package/bundle/src/application/qgrid/qgrid.frame.ts +39 -3
- package/bundle/src/application/request-log/request-log.model.ts +11 -0
- package/bundle/src/utils/providers/anthropic/anthropic-dispatcher.ts +2 -0
- package/bundle/src/utils/providers/anthropic/claude-session.ts +15 -1
- package/bundle/src/utils/providers/common/provider-dispatcher.ts +10 -0
- package/bundle/src/utils/providers/grok/grok-backend-protocol.ts +6 -1
- package/bundle/src/utils/providers/grok/grok-dispatcher.test.ts +74 -3
- package/bundle/src/utils/providers/grok/grok-dispatcher.ts +66 -18
- package/bundle/src/utils/providers/grok/grok-quota.test.ts +18 -0
- package/bundle/src/utils/providers/grok/grok-types.ts +2 -1
- package/bundle/src/utils/providers/openai/openai-dispatcher.test.ts +18 -0
- package/bundle/src/utils/providers/openai/openai-dispatcher.ts +10 -2
- package/bundle/web-dist/client/assets/index-CK9LwGNV.js +32 -0
- package/bundle/web-dist/client/assets/logs-DjQcEivP.js +1 -0
- package/bundle/web-dist/client/assets/monit-RTxpU7oZ.js +1 -0
- package/bundle/web-dist/client/assets/plus-DDvVTvQP.js +1 -0
- package/bundle/web-dist/client/assets/refresh-cw-CTQsNddA.js +1 -0
- package/bundle/web-dist/client/assets/request-model-DliRuPcw.js +1 -0
- package/bundle/web-dist/client/assets/routes-DVHoo-YF.js +5 -0
- package/bundle/web-dist/client/assets/{services.generated-CefiDXEv.js → services.generated-B5lc3aIC.js} +1 -1
- package/bundle/web-dist/client/assets/settings-BQUz6UFr.js +1 -0
- package/bundle/web-dist/client/assets/show-CalQG1Ew.js +2 -0
- package/bundle/web-dist/client/assets/tokens-DU4fWXI9.js +1 -0
- package/bundle/web-dist/client/assets/use-oauth-login-flow-BfxYI4Oh.js +1 -0
- package/bundle/web-dist/client/assets/use-update-token-mutation-qKBC2sn7.js +1 -0
- package/bundle/web-dist/client/assets/vendor-react-DH4kUfK2.js +9 -0
- package/bundle/web-dist/client/assets/vendor-tanstack-DRPs09ai.js +1 -0
- package/bundle/web-dist/client/index.html +4 -4
- package/bundle/web-dist/server/assets/{lazyRouteComponent-D8iTIHyn.js → lazyRouteComponent-AKiHfZWp.js} +2 -2
- package/bundle/web-dist/server/assets/logs-B5M5B7pN.js +531 -0
- package/bundle/web-dist/server/assets/{monit-B2hqorPe.js → monit-p6JM8MMl.js} +117 -375
- package/bundle/web-dist/server/assets/plus-I0FfLVgU.js +19 -0
- package/bundle/web-dist/server/assets/{react-dom-BIYQzBqG.js → react-dom-Cv23mm1K.js} +1 -1
- package/bundle/web-dist/server/assets/refresh-cw-DYsnffRC.js +23 -0
- package/bundle/web-dist/server/assets/{request-model-I6OdODSH.js → request-model-Cp6h5EuP.js} +7 -16
- package/bundle/web-dist/server/assets/{routes-B95YlUv2.js → routes-rIXpkI-t.js} +200 -691
- package/bundle/web-dist/server/assets/{services.generated-DQATJ6qf.js → services.generated-CMJ8AHbO.js} +3796 -4012
- package/bundle/web-dist/server/assets/settings-_MoaFGxj.js +461 -0
- package/bundle/web-dist/server/assets/{show-Bxaj3rhH.js → show-Cfm9UeDr.js} +375 -1271
- package/bundle/web-dist/server/assets/tokens-DMSHDg9D.js +560 -0
- package/bundle/web-dist/server/assets/{use-oauth-login-flow-CKDHgc3U.js → use-oauth-login-flow-jkAkT3X6.js} +16 -50
- package/bundle/web-dist/server/assets/{use-update-token-mutation-BEbgOzaa.js → use-update-token-mutation-Sm6kh02m.js} +1 -1
- package/bundle/web-dist/server/entry-server.generated.js +1177 -2657
- package/package.json +1 -1
- package/skills/qgrid/references/ai-sdk-provider-contract.md +1 -1
- package/skills/qgrid/references/cli-env-and-server-boot.md +4 -3
- package/skills/qgrid/references/decision-rationale.md +2 -1
- package/skills/qgrid/references/grok-runtime.md +7 -1
- package/skills/qgrid/references/repo-map.md +2 -0
- package/skills/qgrid/references/request-log-run-lifecycle.md +5 -0
- package/skills/qgrid/references/verification-and-debugging.md +24 -5
- package/bundle/web-dist/client/assets/index-BA7uQ-6c.js +0 -31
- package/bundle/web-dist/client/assets/logs-C47OJGEI.js +0 -1
- package/bundle/web-dist/client/assets/monit-BS9no0dU.js +0 -4
- package/bundle/web-dist/client/assets/plus-sdACTfH0.js +0 -1
- package/bundle/web-dist/client/assets/refresh-cw-CY8o_1cT.js +0 -1
- package/bundle/web-dist/client/assets/request-model-BRtFuZvj.js +0 -1
- package/bundle/web-dist/client/assets/routes-kqgkUxE8.js +0 -5
- package/bundle/web-dist/client/assets/settings-DNDvFGSw.js +0 -1
- package/bundle/web-dist/client/assets/show-u8Np69q3.js +0 -2
- package/bundle/web-dist/client/assets/tokens-QvP410NW.js +0 -1
- package/bundle/web-dist/client/assets/total-cost-MnfKU8IN.js +0 -1
- package/bundle/web-dist/client/assets/use-oauth-login-flow-Bzdh28Ws.js +0 -1
- package/bundle/web-dist/client/assets/use-update-token-mutation-CfJKaxmR.js +0 -1
- package/bundle/web-dist/client/assets/vendor-react-CUFFrVN9.js +0 -244
- package/bundle/web-dist/client/assets/vendor-tanstack-Bf_jag9G.js +0 -1
- package/bundle/web-dist/server/assets/logs-B3OTd9hy.js +0 -825
- package/bundle/web-dist/server/assets/plus-DwG7h9kq.js +0 -28
- package/bundle/web-dist/server/assets/refresh-cw-mMBkwOq0.js +0 -44
- package/bundle/web-dist/server/assets/settings-C3gbGk0m.js +0 -830
- package/bundle/web-dist/server/assets/tokens-CZjH3cB7.js +0 -1038
- package/bundle/web-dist/server/assets/total-cost-fTE9Xy82.js +0 -18
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as require_react_dom } from "./react-dom-
|
|
3
|
-
import { i as o, n as useOAuthLoginFlow, r as OAuthCodeEntry, t as isOAuthProvider } from "./use-oauth-login-flow-
|
|
1
|
+
import { $ as __toESM, M as require_jsx_runtime, N as require_react, j as useQueryClient, n as QgridService, o as TokenService } from "./services.generated-CMJ8AHbO.js";
|
|
2
|
+
import { t as require_react_dom } from "./react-dom-Cv23mm1K.js";
|
|
3
|
+
import { i as o, n as useOAuthLoginFlow, r as OAuthCodeEntry, t as isOAuthProvider } from "./use-oauth-login-flow-jkAkT3X6.js";
|
|
4
4
|
import { i as formatUsd } from "./cost-BC9yzyA9.js";
|
|
5
|
-
import { t as useUpdateTokenMutation } from "./use-update-token-mutation-
|
|
6
|
-
import { n as unpricedRequestTitle, t as unpricedRequestLabel } from "./total-cost-fTE9Xy82.js";
|
|
5
|
+
import { t as useUpdateTokenMutation } from "./use-update-token-mutation-Sm6kh02m.js";
|
|
7
6
|
//#region ../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@19.2.4/node_modules/@dnd-kit/utilities/dist/utilities.esm.js
|
|
8
7
|
var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom());
|
|
9
8
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
@@ -2235,113 +2234,70 @@ function useSortable({ animateLayoutChanges = defaultAnimateLayoutChanges, attri
|
|
|
2235
2234
|
KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left;
|
|
2236
2235
|
//#endregion
|
|
2237
2236
|
//#region ~icons/lucide/gauge.jsx
|
|
2238
|
-
var
|
|
2239
|
-
var
|
|
2240
|
-
var lucideGauge = (props) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("svg", {
|
|
2237
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
2238
|
+
var lucideGauge = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
2241
2239
|
viewBox: "0 0 24 24",
|
|
2242
2240
|
width: "1.2em",
|
|
2243
2241
|
height: "1.2em",
|
|
2244
2242
|
...props,
|
|
2245
|
-
children: /* @__PURE__ */ (0,
|
|
2243
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
2246
2244
|
fill: "none",
|
|
2247
2245
|
stroke: "currentColor",
|
|
2248
2246
|
strokeLinecap: "round",
|
|
2249
2247
|
strokeLinejoin: "round",
|
|
2250
2248
|
strokeWidth: 2,
|
|
2251
2249
|
d: "m12 14l4-4M3.34 19a10 10 0 1 1 17.32 0"
|
|
2252
|
-
}
|
|
2253
|
-
|
|
2254
|
-
lineNumber: 2,
|
|
2255
|
-
columnNumber: 95
|
|
2256
|
-
}, void 0)
|
|
2257
|
-
}, void 0, false, {
|
|
2258
|
-
fileName: _jsxFileName$3,
|
|
2259
|
-
lineNumber: 2,
|
|
2260
|
-
columnNumber: 30
|
|
2261
|
-
}, void 0);
|
|
2250
|
+
})
|
|
2251
|
+
});
|
|
2262
2252
|
//#endregion
|
|
2263
2253
|
//#region ~icons/lucide/grip-vertical.jsx
|
|
2264
|
-
var
|
|
2265
|
-
var lucideGripVertical = (props) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("svg", {
|
|
2254
|
+
var lucideGripVertical = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
2266
2255
|
viewBox: "0 0 24 24",
|
|
2267
2256
|
width: "1.2em",
|
|
2268
2257
|
height: "1.2em",
|
|
2269
2258
|
...props,
|
|
2270
|
-
children: /* @__PURE__ */ (0,
|
|
2259
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", {
|
|
2271
2260
|
fill: "none",
|
|
2272
2261
|
stroke: "currentColor",
|
|
2273
2262
|
strokeLinecap: "round",
|
|
2274
2263
|
strokeLinejoin: "round",
|
|
2275
2264
|
strokeWidth: 2,
|
|
2276
2265
|
children: [
|
|
2277
|
-
/* @__PURE__ */ (0,
|
|
2266
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
|
|
2278
2267
|
cx: 9,
|
|
2279
2268
|
cy: 12,
|
|
2280
2269
|
r: 1
|
|
2281
|
-
},
|
|
2282
|
-
|
|
2283
|
-
lineNumber: 2,
|
|
2284
|
-
columnNumber: 200
|
|
2285
|
-
}, void 0),
|
|
2286
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("circle", {
|
|
2270
|
+
}),
|
|
2271
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
|
|
2287
2272
|
cx: 9,
|
|
2288
2273
|
cy: 5,
|
|
2289
2274
|
r: 1
|
|
2290
|
-
},
|
|
2291
|
-
|
|
2292
|
-
lineNumber: 2,
|
|
2293
|
-
columnNumber: 231
|
|
2294
|
-
}, void 0),
|
|
2295
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("circle", {
|
|
2275
|
+
}),
|
|
2276
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
|
|
2296
2277
|
cx: 9,
|
|
2297
2278
|
cy: 19,
|
|
2298
2279
|
r: 1
|
|
2299
|
-
},
|
|
2300
|
-
|
|
2301
|
-
lineNumber: 2,
|
|
2302
|
-
columnNumber: 261
|
|
2303
|
-
}, void 0),
|
|
2304
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("circle", {
|
|
2280
|
+
}),
|
|
2281
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
|
|
2305
2282
|
cx: 15,
|
|
2306
2283
|
cy: 12,
|
|
2307
2284
|
r: 1
|
|
2308
|
-
},
|
|
2309
|
-
|
|
2310
|
-
lineNumber: 2,
|
|
2311
|
-
columnNumber: 292
|
|
2312
|
-
}, void 0),
|
|
2313
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("circle", {
|
|
2285
|
+
}),
|
|
2286
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
|
|
2314
2287
|
cx: 15,
|
|
2315
2288
|
cy: 5,
|
|
2316
2289
|
r: 1
|
|
2317
|
-
},
|
|
2318
|
-
|
|
2319
|
-
lineNumber: 2,
|
|
2320
|
-
columnNumber: 324
|
|
2321
|
-
}, void 0),
|
|
2322
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("circle", {
|
|
2290
|
+
}),
|
|
2291
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
|
|
2323
2292
|
cx: 15,
|
|
2324
2293
|
cy: 19,
|
|
2325
2294
|
r: 1
|
|
2326
|
-
}
|
|
2327
|
-
fileName: _jsxFileName$2,
|
|
2328
|
-
lineNumber: 2,
|
|
2329
|
-
columnNumber: 355
|
|
2330
|
-
}, void 0)
|
|
2295
|
+
})
|
|
2331
2296
|
]
|
|
2332
|
-
}
|
|
2333
|
-
|
|
2334
|
-
lineNumber: 2,
|
|
2335
|
-
columnNumber: 102
|
|
2336
|
-
}, void 0)
|
|
2337
|
-
}, void 0, false, {
|
|
2338
|
-
fileName: _jsxFileName$2,
|
|
2339
|
-
lineNumber: 2,
|
|
2340
|
-
columnNumber: 37
|
|
2341
|
-
}, void 0);
|
|
2297
|
+
})
|
|
2298
|
+
});
|
|
2342
2299
|
//#endregion
|
|
2343
2300
|
//#region src/components/qgrid/UsageCard.tsx
|
|
2344
|
-
var _jsxFileName$1 = "/home/runner/work/qgrid/qgrid/packages/web/src/components/qgrid/UsageCard.tsx";
|
|
2345
2301
|
var QUOTA_THRESHOLD_PROVIDERS = new Set([
|
|
2346
2302
|
"anthropic",
|
|
2347
2303
|
"openai",
|
|
@@ -2442,122 +2398,60 @@ function formatPeriodType(periodType) {
|
|
|
2442
2398
|
const label = periodType.replace(/^USAGE_PERIOD_TYPE_/, "").toLowerCase();
|
|
2443
2399
|
return label && label !== "unspecified" ? label : null;
|
|
2444
2400
|
}
|
|
2445
|
-
/** Grok 등 provider별 상태 표시(on-demand 제외,
|
|
2401
|
+
/** Grok 등 provider별 상태 표시(on-demand 제외, 과금 주기, 티어). */
|
|
2446
2402
|
function UsageStateNotes({ usage }) {
|
|
2447
2403
|
const period = formatPeriodType(usage.periodType);
|
|
2448
|
-
if (!(usage.onDemandExcluded === true ||
|
|
2449
|
-
return /* @__PURE__ */ (0,
|
|
2404
|
+
if (!(usage.onDemandExcluded === true || period !== null || !!usage.tier)) return null;
|
|
2405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2450
2406
|
className: "flex flex-wrap items-center gap-1 text-[10px]",
|
|
2451
2407
|
children: [
|
|
2452
|
-
usage.onDemandExcluded === true && /* @__PURE__ */ (
|
|
2408
|
+
usage.onDemandExcluded === true && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2453
2409
|
className: "px-1.5 py-0.5 rounded-full bg-amber-50 text-amber-700",
|
|
2454
2410
|
title: "xAI에서 on-demand 과금을 끄면 다시 라우팅됩니다",
|
|
2455
2411
|
children: "excluded: on-demand billing enabled"
|
|
2456
|
-
},
|
|
2457
|
-
|
|
2458
|
-
lineNumber: 172,
|
|
2459
|
-
columnNumber: 9
|
|
2460
|
-
}, this),
|
|
2461
|
-
usage.zdrVideoExcluded === true && /* @__PURE__ */ (void 0)("span", {
|
|
2462
|
-
className: "px-1.5 py-0.5 rounded-full bg-amber-50 text-amber-700",
|
|
2463
|
-
title: "xAI에서 data-retention opt-out(Zero Data Retention)을 끄면 비디오가 다시 라우팅됩니다",
|
|
2464
|
-
children: "video unavailable: zero data retention"
|
|
2465
|
-
}, void 0, false, {
|
|
2466
|
-
fileName: _jsxFileName$1,
|
|
2467
|
-
lineNumber: 180,
|
|
2468
|
-
columnNumber: 9
|
|
2469
|
-
}, this),
|
|
2470
|
-
period !== null && /* @__PURE__ */ (void 0)("span", {
|
|
2412
|
+
}),
|
|
2413
|
+
period !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2471
2414
|
className: "px-1.5 py-0.5 rounded-full bg-sand-100 text-sand-600",
|
|
2472
2415
|
children: period
|
|
2473
|
-
},
|
|
2474
|
-
|
|
2475
|
-
lineNumber: 188,
|
|
2476
|
-
columnNumber: 9
|
|
2477
|
-
}, this),
|
|
2478
|
-
usage.tier && /* @__PURE__ */ (void 0)("span", {
|
|
2416
|
+
}),
|
|
2417
|
+
usage.tier && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2479
2418
|
className: "px-1.5 py-0.5 rounded-full bg-sand-100 text-sand-600",
|
|
2480
2419
|
children: usage.tier
|
|
2481
|
-
}
|
|
2482
|
-
fileName: _jsxFileName$1,
|
|
2483
|
-
lineNumber: 191,
|
|
2484
|
-
columnNumber: 9
|
|
2485
|
-
}, this),
|
|
2486
|
-
usage.keepaliveApplicable === false && /* @__PURE__ */ (void 0)("span", {
|
|
2487
|
-
className: "px-1.5 py-0.5 rounded-full bg-sand-100 text-sand-400",
|
|
2488
|
-
title: "이 provider는 토큰 윈도 keepalive 대상이 아닙니다",
|
|
2489
|
-
children: "keepalive n/a"
|
|
2490
|
-
}, void 0, false, {
|
|
2491
|
-
fileName: _jsxFileName$1,
|
|
2492
|
-
lineNumber: 194,
|
|
2493
|
-
columnNumber: 9
|
|
2494
|
-
}, this)
|
|
2420
|
+
})
|
|
2495
2421
|
]
|
|
2496
|
-
}
|
|
2497
|
-
fileName: _jsxFileName$1,
|
|
2498
|
-
lineNumber: 170,
|
|
2499
|
-
columnNumber: 5
|
|
2500
|
-
}, this);
|
|
2422
|
+
});
|
|
2501
2423
|
}
|
|
2502
2424
|
function UsageRow({ label, utilization, resetsAt, windowDurationMins, theme, threshold }) {
|
|
2503
2425
|
const pct = utilization ?? 0;
|
|
2504
2426
|
const hasThreshold = threshold !== void 0 && threshold !== null;
|
|
2505
|
-
return /* @__PURE__ */ (0,
|
|
2427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2506
2428
|
className: "flex items-center gap-2",
|
|
2507
2429
|
children: [
|
|
2508
|
-
/* @__PURE__ */ (0,
|
|
2430
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2509
2431
|
className: "text-xs text-sand-600 w-7 shrink-0",
|
|
2510
2432
|
children: formatWindowLabel(label, windowDurationMins)
|
|
2511
|
-
},
|
|
2512
|
-
|
|
2513
|
-
lineNumber: 228,
|
|
2514
|
-
columnNumber: 7
|
|
2515
|
-
}, this),
|
|
2516
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2433
|
+
}),
|
|
2434
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2517
2435
|
className: "relative flex-1 min-w-0 h-2 bg-sand-200 rounded-full overflow-hidden",
|
|
2518
|
-
children: [/* @__PURE__ */ (0,
|
|
2436
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2519
2437
|
className: `h-full rounded-full transition-all duration-300 ${barColor(pct, theme)}`,
|
|
2520
2438
|
style: { width: `${Math.min(pct, 100)}%` }
|
|
2521
|
-
},
|
|
2522
|
-
fileName: _jsxFileName$1,
|
|
2523
|
-
lineNumber: 232,
|
|
2524
|
-
columnNumber: 9
|
|
2525
|
-
}, this), hasThreshold && /* @__PURE__ */ (void 0)("div", {
|
|
2439
|
+
}), hasThreshold && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2526
2440
|
className: "absolute top-[-2px] bottom-[-2px] w-0.5 bg-sienna-500 rounded-full",
|
|
2527
2441
|
style: { left: `calc(${Math.min(threshold, 100)}% - 1px)` }
|
|
2528
|
-
}
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
columnNumber: 11
|
|
2532
|
-
}, this)]
|
|
2533
|
-
}, void 0, true, {
|
|
2534
|
-
fileName: _jsxFileName$1,
|
|
2535
|
-
lineNumber: 231,
|
|
2536
|
-
columnNumber: 7
|
|
2537
|
-
}, this),
|
|
2538
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2442
|
+
})]
|
|
2443
|
+
}),
|
|
2444
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
2539
2445
|
className: "text-xs tabular-nums text-sand-700 w-9 text-right shrink-0",
|
|
2540
2446
|
children: [pct, "%"]
|
|
2541
|
-
},
|
|
2542
|
-
|
|
2543
|
-
lineNumber: 244,
|
|
2544
|
-
columnNumber: 7
|
|
2545
|
-
}, this),
|
|
2546
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2447
|
+
}),
|
|
2448
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2547
2449
|
className: "hidden sm:inline text-[10px] text-sand-400 w-24 text-right shrink-0",
|
|
2548
2450
|
title: formatResets(resetsAt),
|
|
2549
2451
|
children: formatResets(resetsAt)
|
|
2550
|
-
}
|
|
2551
|
-
fileName: _jsxFileName$1,
|
|
2552
|
-
lineNumber: 245,
|
|
2553
|
-
columnNumber: 7
|
|
2554
|
-
}, this)
|
|
2452
|
+
})
|
|
2555
2453
|
]
|
|
2556
|
-
}
|
|
2557
|
-
fileName: _jsxFileName$1,
|
|
2558
|
-
lineNumber: 227,
|
|
2559
|
-
columnNumber: 5
|
|
2560
|
-
}, this);
|
|
2454
|
+
});
|
|
2561
2455
|
}
|
|
2562
2456
|
function TokenUsage({ token, theme }) {
|
|
2563
2457
|
const queryClient = useQueryClient();
|
|
@@ -2569,124 +2463,60 @@ function TokenUsage({ token, theme }) {
|
|
|
2569
2463
|
dataUpdatedAt,
|
|
2570
2464
|
queryClient
|
|
2571
2465
|
]);
|
|
2572
|
-
if (token.reauth_required) return /* @__PURE__ */ (0,
|
|
2466
|
+
if (token.reauth_required) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2573
2467
|
className: "py-1",
|
|
2574
|
-
children: [/* @__PURE__ */ (0,
|
|
2468
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2575
2469
|
className: "text-[11px] text-amber-600",
|
|
2576
2470
|
children: "Session expired"
|
|
2577
|
-
},
|
|
2578
|
-
fileName: _jsxFileName$1,
|
|
2579
|
-
lineNumber: 267,
|
|
2580
|
-
columnNumber: 9
|
|
2581
|
-
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("p", {
|
|
2471
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2582
2472
|
className: "text-[10px] text-sand-400 mt-0.5",
|
|
2583
2473
|
children: "Please re-login via OAuth"
|
|
2584
|
-
}
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
columnNumber: 9
|
|
2588
|
-
}, this)]
|
|
2589
|
-
}, void 0, true, {
|
|
2590
|
-
fileName: _jsxFileName$1,
|
|
2591
|
-
lineNumber: 266,
|
|
2592
|
-
columnNumber: 7
|
|
2593
|
-
}, this);
|
|
2594
|
-
if (isLoading) return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2474
|
+
})]
|
|
2475
|
+
});
|
|
2476
|
+
if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2595
2477
|
className: "animate-pulse space-y-2 py-2",
|
|
2596
|
-
children: [/* @__PURE__ */ (0,
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
columnNumber: 9
|
|
2600
|
-
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "h-2 w-3/4 bg-sand-200 rounded-full" }, void 0, false, {
|
|
2601
|
-
fileName: _jsxFileName$1,
|
|
2602
|
-
lineNumber: 277,
|
|
2603
|
-
columnNumber: 9
|
|
2604
|
-
}, this)]
|
|
2605
|
-
}, void 0, true, {
|
|
2606
|
-
fileName: _jsxFileName$1,
|
|
2607
|
-
lineNumber: 275,
|
|
2608
|
-
columnNumber: 7
|
|
2609
|
-
}, this);
|
|
2610
|
-
if (data?.error) return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2478
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-2 w-full bg-sand-200 rounded-full" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-2 w-3/4 bg-sand-200 rounded-full" })]
|
|
2479
|
+
});
|
|
2480
|
+
if (data?.error) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2611
2481
|
className: "py-1",
|
|
2612
|
-
children: [/* @__PURE__ */ (0,
|
|
2482
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2613
2483
|
className: "text-[11px] text-amber-600",
|
|
2614
2484
|
children: "Unavailable"
|
|
2615
|
-
},
|
|
2616
|
-
fileName: _jsxFileName$1,
|
|
2617
|
-
lineNumber: 285,
|
|
2618
|
-
columnNumber: 9
|
|
2619
|
-
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("p", {
|
|
2485
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2620
2486
|
className: "text-[10px] text-sand-400 mt-0.5",
|
|
2621
2487
|
children: data.error
|
|
2622
|
-
}
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
columnNumber: 9
|
|
2626
|
-
}, this)]
|
|
2627
|
-
}, void 0, true, {
|
|
2628
|
-
fileName: _jsxFileName$1,
|
|
2629
|
-
lineNumber: 284,
|
|
2630
|
-
columnNumber: 7
|
|
2631
|
-
}, this);
|
|
2632
|
-
if (!data?.fiveHour && !data?.sevenDay) return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2488
|
+
})]
|
|
2489
|
+
});
|
|
2490
|
+
if (!data?.fiveHour && !data?.sevenDay) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2633
2491
|
className: "space-y-1.5 py-1",
|
|
2634
|
-
children: [data && /* @__PURE__ */ (
|
|
2635
|
-
fileName: _jsxFileName$1,
|
|
2636
|
-
lineNumber: 294,
|
|
2637
|
-
columnNumber: 18
|
|
2638
|
-
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("p", {
|
|
2492
|
+
children: [data && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageStateNotes, { usage: data }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2639
2493
|
className: "text-[11px] text-sand-400",
|
|
2640
2494
|
children: "No usage data"
|
|
2641
|
-
}
|
|
2642
|
-
|
|
2643
|
-
lineNumber: 295,
|
|
2644
|
-
columnNumber: 9
|
|
2645
|
-
}, this)]
|
|
2646
|
-
}, void 0, true, {
|
|
2647
|
-
fileName: _jsxFileName$1,
|
|
2648
|
-
lineNumber: 293,
|
|
2649
|
-
columnNumber: 7
|
|
2650
|
-
}, this);
|
|
2495
|
+
})]
|
|
2496
|
+
});
|
|
2651
2497
|
const thresholdForPrimary = QUOTA_THRESHOLD_PROVIDERS.has(token.provider) ? token.quota_threshold : null;
|
|
2652
|
-
return /* @__PURE__ */ (0,
|
|
2498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2653
2499
|
className: "space-y-1.5 py-1",
|
|
2654
2500
|
children: [
|
|
2655
|
-
/* @__PURE__ */ (0,
|
|
2656
|
-
|
|
2657
|
-
lineNumber: 307,
|
|
2658
|
-
columnNumber: 7
|
|
2659
|
-
}, this),
|
|
2660
|
-
data.fiveHour && /* @__PURE__ */ (void 0)(UsageRow, {
|
|
2501
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageStateNotes, { usage: data }),
|
|
2502
|
+
data.fiveHour && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageRow, {
|
|
2661
2503
|
label: "5h",
|
|
2662
2504
|
utilization: data.fiveHour.utilization,
|
|
2663
2505
|
resetsAt: data.fiveHour.resetsAt,
|
|
2664
2506
|
windowDurationMins: data.fiveHour.windowDurationMins,
|
|
2665
2507
|
theme,
|
|
2666
2508
|
threshold: thresholdForPrimary
|
|
2667
|
-
},
|
|
2668
|
-
|
|
2669
|
-
lineNumber: 309,
|
|
2670
|
-
columnNumber: 9
|
|
2671
|
-
}, this),
|
|
2672
|
-
data.sevenDay && /* @__PURE__ */ (void 0)(UsageRow, {
|
|
2509
|
+
}),
|
|
2510
|
+
data.sevenDay && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageRow, {
|
|
2673
2511
|
label: formatPeriodType(data.periodType) === "monthly" ? "1mo" : "7d",
|
|
2674
2512
|
utilization: data.sevenDay.utilization,
|
|
2675
2513
|
resetsAt: data.sevenDay.resetsAt,
|
|
2676
2514
|
windowDurationMins: data.sevenDay.windowDurationMins,
|
|
2677
2515
|
theme,
|
|
2678
2516
|
threshold: token.provider === "grok" ? thresholdForPrimary : void 0
|
|
2679
|
-
}
|
|
2680
|
-
fileName: _jsxFileName$1,
|
|
2681
|
-
lineNumber: 319,
|
|
2682
|
-
columnNumber: 9
|
|
2683
|
-
}, this)
|
|
2517
|
+
})
|
|
2684
2518
|
]
|
|
2685
|
-
}
|
|
2686
|
-
fileName: _jsxFileName$1,
|
|
2687
|
-
lineNumber: 306,
|
|
2688
|
-
columnNumber: 5
|
|
2689
|
-
}, this);
|
|
2519
|
+
});
|
|
2690
2520
|
}
|
|
2691
2521
|
function ThresholdControl({ token }) {
|
|
2692
2522
|
const [pos, setPos] = (0, import_react.useState)(null);
|
|
@@ -2714,19 +2544,11 @@ function ThresholdControl({ token }) {
|
|
|
2714
2544
|
setValue(String(token.quota_threshold ?? 100));
|
|
2715
2545
|
};
|
|
2716
2546
|
const close = () => setPos(null);
|
|
2717
|
-
if (!supported) return /* @__PURE__ */ (0,
|
|
2547
|
+
if (!supported) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
2718
2548
|
className: "inline-flex items-center gap-1 px-1.5 py-0.5 rounded-md text-[10px] text-sand-300 border border-sand-100",
|
|
2719
2549
|
title: "Quota threshold는 이 provider에서 지원되지 않습니다",
|
|
2720
|
-
children: [/* @__PURE__ */ (0,
|
|
2721
|
-
|
|
2722
|
-
lineNumber: 385,
|
|
2723
|
-
columnNumber: 9
|
|
2724
|
-
}, this), "n/a"]
|
|
2725
|
-
}, void 0, true, {
|
|
2726
|
-
fileName: _jsxFileName$1,
|
|
2727
|
-
lineNumber: 381,
|
|
2728
|
-
columnNumber: 7
|
|
2729
|
-
}, this);
|
|
2550
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideGauge, { className: "size-3" }), "n/a"]
|
|
2551
|
+
});
|
|
2730
2552
|
const adjust = (delta) => {
|
|
2731
2553
|
const current = /^\d+$/.test(value.trim()) ? Number(value.trim()) : 0;
|
|
2732
2554
|
const next = Math.min(Math.max(current + delta, 0), 100);
|
|
@@ -2741,147 +2563,83 @@ function ThresholdControl({ token }) {
|
|
|
2741
2563
|
await Promise.all([queryClient.invalidateQueries({ queryKey: ["Token"] }), queryClient.invalidateQueries({ queryKey: ["Qgrid"] })]);
|
|
2742
2564
|
close();
|
|
2743
2565
|
};
|
|
2744
|
-
return /* @__PURE__ */ (0,
|
|
2566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2745
2567
|
className: "inline-flex",
|
|
2746
|
-
children: [/* @__PURE__ */ (0,
|
|
2568
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
2747
2569
|
ref: triggerRef,
|
|
2748
2570
|
type: "button",
|
|
2749
2571
|
title: "사용률 제한 설정",
|
|
2750
2572
|
onClick: open ? close : openPopover,
|
|
2751
2573
|
className: "flex items-center gap-1 px-1.5 py-0.5 rounded-md text-[10px] border border-sand-200/80 text-sand-400 hover:text-sand-600 hover:border-sand-300 transition-colors duration-150",
|
|
2752
|
-
children: [/* @__PURE__ */ (0,
|
|
2753
|
-
|
|
2754
|
-
lineNumber: 421,
|
|
2755
|
-
columnNumber: 9
|
|
2756
|
-
}, this), "Set limit"]
|
|
2757
|
-
}, void 0, true, {
|
|
2758
|
-
fileName: _jsxFileName$1,
|
|
2759
|
-
lineNumber: 414,
|
|
2760
|
-
columnNumber: 7
|
|
2761
|
-
}, this), open && pos && /* @__PURE__ */ (void 0)(import_jsx_dev_runtime.Fragment, { children: [/* @__PURE__ */ (void 0)("div", {
|
|
2574
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideGauge, { className: "size-3" }), "Set limit"]
|
|
2575
|
+
}), open && pos && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2762
2576
|
className: "fixed inset-0 z-40",
|
|
2763
2577
|
onPointerDown: close
|
|
2764
|
-
},
|
|
2765
|
-
fileName: _jsxFileName$1,
|
|
2766
|
-
lineNumber: 429,
|
|
2767
|
-
columnNumber: 11
|
|
2768
|
-
}, this), /* @__PURE__ */ (void 0)("div", {
|
|
2578
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2769
2579
|
className: "fixed z-50 w-60 panel shadow-xl p-3",
|
|
2770
2580
|
style: {
|
|
2771
2581
|
top: pos.top,
|
|
2772
2582
|
left: pos.left
|
|
2773
2583
|
},
|
|
2774
2584
|
children: [
|
|
2775
|
-
/* @__PURE__ */ (
|
|
2585
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
|
|
2776
2586
|
htmlFor: `threshold-${token.id}`,
|
|
2777
2587
|
className: "text-[10px] uppercase tracking-wider text-sand-500 font-medium",
|
|
2778
2588
|
children: "사용률 제한"
|
|
2779
|
-
},
|
|
2780
|
-
|
|
2781
|
-
lineNumber: 434,
|
|
2782
|
-
columnNumber: 13
|
|
2783
|
-
}, this),
|
|
2784
|
-
/* @__PURE__ */ (void 0)("div", {
|
|
2589
|
+
}),
|
|
2590
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2785
2591
|
className: "mt-1 flex items-center gap-2",
|
|
2786
2592
|
children: [
|
|
2787
|
-
/* @__PURE__ */ (
|
|
2593
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2788
2594
|
type: "button",
|
|
2789
2595
|
onClick: () => adjust(-10),
|
|
2790
2596
|
className: "size-9 shrink-0 rounded-md border border-sand-200 text-sand-600 text-base leading-none hover:bg-sand-100 transition-colors duration-150",
|
|
2791
2597
|
children: "−"
|
|
2792
|
-
},
|
|
2793
|
-
|
|
2794
|
-
lineNumber: 441,
|
|
2795
|
-
columnNumber: 15
|
|
2796
|
-
}, this),
|
|
2797
|
-
/* @__PURE__ */ (void 0)(o, {
|
|
2598
|
+
}),
|
|
2599
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(o, {
|
|
2798
2600
|
id: `threshold-${token.id}`,
|
|
2799
2601
|
value,
|
|
2800
2602
|
onChange: (e) => setValue(e.target.value),
|
|
2801
2603
|
inputMode: "numeric",
|
|
2802
2604
|
className: `h-9 w-14 border rounded-md text-center text-sm text-sand-900 bg-white tabular-nums focus:outline-none ${validation.ok ? "border-sand-200 focus:border-sienna-300" : "border-red-300 focus:border-red-400"}`
|
|
2803
|
-
},
|
|
2804
|
-
|
|
2805
|
-
lineNumber: 448,
|
|
2806
|
-
columnNumber: 15
|
|
2807
|
-
}, this),
|
|
2808
|
-
/* @__PURE__ */ (void 0)("button", {
|
|
2605
|
+
}),
|
|
2606
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2809
2607
|
type: "button",
|
|
2810
2608
|
onClick: () => adjust(10),
|
|
2811
2609
|
className: "size-9 shrink-0 rounded-md border border-sand-200 text-sand-600 text-base leading-none hover:bg-sand-100 transition-colors duration-150",
|
|
2812
2610
|
children: "+"
|
|
2813
|
-
},
|
|
2814
|
-
|
|
2815
|
-
lineNumber: 459,
|
|
2816
|
-
columnNumber: 15
|
|
2817
|
-
}, this),
|
|
2818
|
-
/* @__PURE__ */ (void 0)("span", {
|
|
2611
|
+
}),
|
|
2612
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2819
2613
|
className: "text-sm text-sand-500",
|
|
2820
2614
|
children: "%"
|
|
2821
|
-
}
|
|
2822
|
-
fileName: _jsxFileName$1,
|
|
2823
|
-
lineNumber: 466,
|
|
2824
|
-
columnNumber: 15
|
|
2825
|
-
}, this)
|
|
2615
|
+
})
|
|
2826
2616
|
]
|
|
2827
|
-
},
|
|
2828
|
-
|
|
2829
|
-
lineNumber: 440,
|
|
2830
|
-
columnNumber: 13
|
|
2831
|
-
}, this),
|
|
2832
|
-
validation.ok ? /* @__PURE__ */ (void 0)("p", {
|
|
2617
|
+
}),
|
|
2618
|
+
validation.ok ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2833
2619
|
className: "mt-1.5 text-[11px] text-sand-500 leading-snug",
|
|
2834
2620
|
children: validation.value === null ? "제한 없음 — 사용률과 무관하게 항상 사용합니다." : "기준 사용률이 임계치에 달하면 해당 토큰을 건너뜁니다."
|
|
2835
|
-
}
|
|
2836
|
-
fileName: _jsxFileName$1,
|
|
2837
|
-
lineNumber: 469,
|
|
2838
|
-
columnNumber: 15
|
|
2839
|
-
}, this) : /* @__PURE__ */ (void 0)("p", {
|
|
2621
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2840
2622
|
className: "mt-1.5 text-[11px] text-red-500",
|
|
2841
2623
|
children: validation.error
|
|
2842
|
-
},
|
|
2843
|
-
|
|
2844
|
-
lineNumber: 475,
|
|
2845
|
-
columnNumber: 15
|
|
2846
|
-
}, this),
|
|
2847
|
-
/* @__PURE__ */ (void 0)("div", {
|
|
2624
|
+
}),
|
|
2625
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2848
2626
|
className: "mt-2 flex items-center justify-end gap-1.5",
|
|
2849
|
-
children: [/* @__PURE__ */ (
|
|
2627
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2850
2628
|
type: "button",
|
|
2851
2629
|
className: "px-2 py-1 text-[11px] font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150",
|
|
2852
2630
|
onClick: close,
|
|
2853
2631
|
children: "Cancel"
|
|
2854
|
-
},
|
|
2855
|
-
fileName: _jsxFileName$1,
|
|
2856
|
-
lineNumber: 478,
|
|
2857
|
-
columnNumber: 15
|
|
2858
|
-
}, this), /* @__PURE__ */ (void 0)("button", {
|
|
2632
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2859
2633
|
type: "button",
|
|
2860
2634
|
className: "px-2 py-1 text-[11px] font-medium rounded-md bg-sienna-400 text-white hover:bg-sienna-500 disabled:opacity-50 transition-colors duration-150",
|
|
2861
2635
|
disabled: updateMutation.isPending || !validation.ok,
|
|
2862
2636
|
onClick: save,
|
|
2863
2637
|
children: updateMutation.isPending ? "Saving..." : "Save"
|
|
2864
|
-
}
|
|
2865
|
-
|
|
2866
|
-
lineNumber: 485,
|
|
2867
|
-
columnNumber: 15
|
|
2868
|
-
}, this)]
|
|
2869
|
-
}, void 0, true, {
|
|
2870
|
-
fileName: _jsxFileName$1,
|
|
2871
|
-
lineNumber: 477,
|
|
2872
|
-
columnNumber: 13
|
|
2873
|
-
}, this)
|
|
2638
|
+
})]
|
|
2639
|
+
})
|
|
2874
2640
|
]
|
|
2875
|
-
}
|
|
2876
|
-
|
|
2877
|
-
lineNumber: 430,
|
|
2878
|
-
columnNumber: 11
|
|
2879
|
-
}, this)] }, void 0, true)]
|
|
2880
|
-
}, void 0, true, {
|
|
2881
|
-
fileName: _jsxFileName$1,
|
|
2882
|
-
lineNumber: 413,
|
|
2883
|
-
columnNumber: 5
|
|
2884
|
-
}, this);
|
|
2641
|
+
})] })]
|
|
2642
|
+
});
|
|
2885
2643
|
}
|
|
2886
2644
|
function WeightControl({ token }) {
|
|
2887
2645
|
const [pos, setPos] = (0, import_react.useState)(null);
|
|
@@ -2920,125 +2678,73 @@ function WeightControl({ token }) {
|
|
|
2920
2678
|
await Promise.all([queryClient.invalidateQueries({ queryKey: ["Token"] }), queryClient.invalidateQueries({ queryKey: ["Qgrid"] })]);
|
|
2921
2679
|
close();
|
|
2922
2680
|
};
|
|
2923
|
-
return /* @__PURE__ */ (0,
|
|
2681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2924
2682
|
className: "inline-flex",
|
|
2925
|
-
children: [/* @__PURE__ */ (0,
|
|
2683
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
2926
2684
|
ref: triggerRef,
|
|
2927
2685
|
type: "button",
|
|
2928
2686
|
title: "라우팅 가중치 설정",
|
|
2929
2687
|
onClick: pos ? close : openPopover,
|
|
2930
2688
|
className: "flex items-center gap-1 px-1.5 py-0.5 rounded-md text-[10px] border border-sand-200/80 text-sand-400 hover:text-sand-600 hover:border-sand-300 transition-colors duration-150",
|
|
2931
2689
|
children: ["Weight ", token.weight]
|
|
2932
|
-
},
|
|
2933
|
-
fileName: _jsxFileName$1,
|
|
2934
|
-
lineNumber: 556,
|
|
2935
|
-
columnNumber: 7
|
|
2936
|
-
}, this), pos && /* @__PURE__ */ (void 0)(import_jsx_dev_runtime.Fragment, { children: [/* @__PURE__ */ (void 0)("div", {
|
|
2690
|
+
}), pos && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2937
2691
|
className: "fixed inset-0 z-40",
|
|
2938
2692
|
onPointerDown: close
|
|
2939
|
-
},
|
|
2940
|
-
fileName: _jsxFileName$1,
|
|
2941
|
-
lineNumber: 567,
|
|
2942
|
-
columnNumber: 11
|
|
2943
|
-
}, this), /* @__PURE__ */ (void 0)("div", {
|
|
2693
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2944
2694
|
className: "fixed z-50 w-60 panel shadow-xl p-3",
|
|
2945
2695
|
style: pos,
|
|
2946
2696
|
children: [
|
|
2947
|
-
/* @__PURE__ */ (
|
|
2697
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
|
|
2948
2698
|
htmlFor: `weight-${token.id}`,
|
|
2949
2699
|
className: "text-[10px] uppercase tracking-wider text-sand-500 font-medium",
|
|
2950
2700
|
children: "라우팅 가중치"
|
|
2951
|
-
},
|
|
2952
|
-
|
|
2953
|
-
lineNumber: 569,
|
|
2954
|
-
columnNumber: 13
|
|
2955
|
-
}, this),
|
|
2956
|
-
/* @__PURE__ */ (void 0)("div", {
|
|
2701
|
+
}),
|
|
2702
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2957
2703
|
className: "mt-1 flex items-center gap-2",
|
|
2958
2704
|
children: [
|
|
2959
|
-
/* @__PURE__ */ (
|
|
2705
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2960
2706
|
type: "button",
|
|
2961
2707
|
onClick: () => adjust(-1),
|
|
2962
2708
|
className: "size-9 shrink-0 rounded-md border border-sand-200 text-sand-600",
|
|
2963
2709
|
children: "−"
|
|
2964
|
-
},
|
|
2965
|
-
|
|
2966
|
-
lineNumber: 576,
|
|
2967
|
-
columnNumber: 15
|
|
2968
|
-
}, this),
|
|
2969
|
-
/* @__PURE__ */ (void 0)(o, {
|
|
2710
|
+
}),
|
|
2711
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(o, {
|
|
2970
2712
|
id: `weight-${token.id}`,
|
|
2971
2713
|
value,
|
|
2972
2714
|
onChange: (event) => setValue(event.target.value),
|
|
2973
2715
|
inputMode: "numeric",
|
|
2974
2716
|
className: `h-9 w-16 border rounded-md text-center text-sm tabular-nums ${validation.ok ? "border-sand-200" : "border-red-300"}`
|
|
2975
|
-
},
|
|
2976
|
-
|
|
2977
|
-
lineNumber: 583,
|
|
2978
|
-
columnNumber: 15
|
|
2979
|
-
}, this),
|
|
2980
|
-
/* @__PURE__ */ (void 0)("button", {
|
|
2717
|
+
}),
|
|
2718
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2981
2719
|
type: "button",
|
|
2982
2720
|
onClick: () => adjust(1),
|
|
2983
2721
|
className: "size-9 shrink-0 rounded-md border border-sand-200 text-sand-600",
|
|
2984
2722
|
children: "+"
|
|
2985
|
-
}
|
|
2986
|
-
fileName: _jsxFileName$1,
|
|
2987
|
-
lineNumber: 594,
|
|
2988
|
-
columnNumber: 15
|
|
2989
|
-
}, this)
|
|
2723
|
+
})
|
|
2990
2724
|
]
|
|
2991
|
-
},
|
|
2992
|
-
|
|
2993
|
-
lineNumber: 575,
|
|
2994
|
-
columnNumber: 13
|
|
2995
|
-
}, this),
|
|
2996
|
-
/* @__PURE__ */ (void 0)("p", {
|
|
2725
|
+
}),
|
|
2726
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2997
2727
|
className: `mt-1.5 text-[11px] ${validation.ok ? "text-sand-500" : "text-red-500"}`,
|
|
2998
2728
|
children: validation.ok ? "새 요청의 상대 배정 비율입니다." : validation.error
|
|
2999
|
-
},
|
|
3000
|
-
|
|
3001
|
-
lineNumber: 602,
|
|
3002
|
-
columnNumber: 13
|
|
3003
|
-
}, this),
|
|
3004
|
-
/* @__PURE__ */ (void 0)("div", {
|
|
2729
|
+
}),
|
|
2730
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3005
2731
|
className: "mt-2 flex items-center justify-end gap-1.5",
|
|
3006
|
-
children: [/* @__PURE__ */ (
|
|
2732
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
3007
2733
|
type: "button",
|
|
3008
2734
|
onClick: close,
|
|
3009
2735
|
className: "px-2 py-1 text-[11px]",
|
|
3010
2736
|
children: "Cancel"
|
|
3011
|
-
},
|
|
3012
|
-
fileName: _jsxFileName$1,
|
|
3013
|
-
lineNumber: 606,
|
|
3014
|
-
columnNumber: 15
|
|
3015
|
-
}, this), /* @__PURE__ */ (void 0)("button", {
|
|
2737
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
3016
2738
|
type: "button",
|
|
3017
2739
|
onClick: save,
|
|
3018
2740
|
disabled: updateMutation.isPending || !validation.ok,
|
|
3019
2741
|
className: "px-2 py-1 text-[11px] rounded-md bg-sienna-400 text-white disabled:opacity-50",
|
|
3020
2742
|
children: updateMutation.isPending ? "Saving..." : "Save"
|
|
3021
|
-
}
|
|
3022
|
-
|
|
3023
|
-
lineNumber: 609,
|
|
3024
|
-
columnNumber: 15
|
|
3025
|
-
}, this)]
|
|
3026
|
-
}, void 0, true, {
|
|
3027
|
-
fileName: _jsxFileName$1,
|
|
3028
|
-
lineNumber: 605,
|
|
3029
|
-
columnNumber: 13
|
|
3030
|
-
}, this)
|
|
2743
|
+
})]
|
|
2744
|
+
})
|
|
3031
2745
|
]
|
|
3032
|
-
}
|
|
3033
|
-
|
|
3034
|
-
lineNumber: 568,
|
|
3035
|
-
columnNumber: 11
|
|
3036
|
-
}, this)] }, void 0, true)]
|
|
3037
|
-
}, void 0, true, {
|
|
3038
|
-
fileName: _jsxFileName$1,
|
|
3039
|
-
lineNumber: 555,
|
|
3040
|
-
columnNumber: 5
|
|
3041
|
-
}, this);
|
|
2746
|
+
})] })]
|
|
2747
|
+
});
|
|
3042
2748
|
}
|
|
3043
2749
|
/**
|
|
3044
2750
|
* 재로그인의 유일한 진입점.
|
|
@@ -3055,7 +2761,7 @@ function ReloginButton({ token }) {
|
|
|
3055
2761
|
const submitCode = async (pastedCode) => {
|
|
3056
2762
|
if (await oauth.submitCode(pastedCode)) oauth.reset();
|
|
3057
2763
|
};
|
|
3058
|
-
return /* @__PURE__ */ (0,
|
|
2764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
3059
2765
|
type: "button",
|
|
3060
2766
|
title: "기존 이름으로 다시 로그인",
|
|
3061
2767
|
disabled: provider === null || oauth.loadingProvider !== null,
|
|
@@ -3063,69 +2769,33 @@ function ReloginButton({ token }) {
|
|
|
3063
2769
|
if (provider) oauth.start(provider, token.name ?? "");
|
|
3064
2770
|
},
|
|
3065
2771
|
className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-md text-[10px] font-medium border border-sienna-300 text-sienna-600 hover:bg-sienna-50 disabled:opacity-50 transition-colors duration-150",
|
|
3066
|
-
children: oauth.loadingProvider === token.provider ? /* @__PURE__ */ (0,
|
|
3067
|
-
|
|
3068
|
-
lineNumber: 655,
|
|
3069
|
-
columnNumber: 13
|
|
3070
|
-
}, this), "로그인 대기"] }, void 0, true) : "재로그인"
|
|
3071
|
-
}, void 0, false, {
|
|
3072
|
-
fileName: _jsxFileName$1,
|
|
3073
|
-
lineNumber: 644,
|
|
3074
|
-
columnNumber: 7
|
|
3075
|
-
}, this), oauth.codeEntryProvider && /* @__PURE__ */ (void 0)("div", {
|
|
2772
|
+
children: oauth.loadingProvider === token.provider ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "size-2.5 border-2 border-sienna-400 border-t-transparent rounded-full animate-spin" }), "로그인 대기"] }) : "재로그인"
|
|
2773
|
+
}), oauth.codeEntryProvider && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3076
2774
|
className: "fixed inset-0 z-50 flex items-start justify-center pt-[15vh]",
|
|
3077
|
-
children: [/* @__PURE__ */ (
|
|
2775
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3078
2776
|
className: "absolute inset-0 bg-sand-900/8 backdrop-blur-sm",
|
|
3079
2777
|
onClick: oauth.reset,
|
|
3080
2778
|
onKeyDown: () => {}
|
|
3081
|
-
},
|
|
3082
|
-
fileName: _jsxFileName$1,
|
|
3083
|
-
lineNumber: 665,
|
|
3084
|
-
columnNumber: 11
|
|
3085
|
-
}, this), /* @__PURE__ */ (void 0)("div", {
|
|
2779
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3086
2780
|
className: "relative panel shadow-xl w-full max-w-md mx-4",
|
|
3087
|
-
children: [/* @__PURE__ */ (
|
|
2781
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3088
2782
|
className: "px-5 py-4 border-b border-sand-100/60",
|
|
3089
|
-
children: /* @__PURE__ */ (
|
|
2783
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
|
|
3090
2784
|
className: "text-base font-medium text-sand-900",
|
|
3091
2785
|
children: "재로그인"
|
|
3092
|
-
}
|
|
3093
|
-
|
|
3094
|
-
lineNumber: 672,
|
|
3095
|
-
columnNumber: 15
|
|
3096
|
-
}, this)
|
|
3097
|
-
}, void 0, false, {
|
|
3098
|
-
fileName: _jsxFileName$1,
|
|
3099
|
-
lineNumber: 671,
|
|
3100
|
-
columnNumber: 13
|
|
3101
|
-
}, this), /* @__PURE__ */ (void 0)("div", {
|
|
2786
|
+
})
|
|
2787
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3102
2788
|
className: "px-5 py-4",
|
|
3103
|
-
children: /* @__PURE__ */ (
|
|
2789
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OAuthCodeEntry, {
|
|
3104
2790
|
provider: oauth.codeEntryProvider,
|
|
3105
2791
|
isPending: oauth.completeMutation.isPending,
|
|
3106
2792
|
isError: oauth.completeMutation.isError,
|
|
3107
2793
|
onSubmit: (code) => void submitCode(code),
|
|
3108
2794
|
onRestart: oauth.reset
|
|
3109
|
-
}
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
}, this)
|
|
3114
|
-
}, void 0, false, {
|
|
3115
|
-
fileName: _jsxFileName$1,
|
|
3116
|
-
lineNumber: 674,
|
|
3117
|
-
columnNumber: 13
|
|
3118
|
-
}, this)]
|
|
3119
|
-
}, void 0, true, {
|
|
3120
|
-
fileName: _jsxFileName$1,
|
|
3121
|
-
lineNumber: 670,
|
|
3122
|
-
columnNumber: 11
|
|
3123
|
-
}, this)]
|
|
3124
|
-
}, void 0, true, {
|
|
3125
|
-
fileName: _jsxFileName$1,
|
|
3126
|
-
lineNumber: 664,
|
|
3127
|
-
columnNumber: 9
|
|
3128
|
-
}, this)] }, void 0, true);
|
|
2795
|
+
})
|
|
2796
|
+
})]
|
|
2797
|
+
})]
|
|
2798
|
+
})] });
|
|
3129
2799
|
}
|
|
3130
2800
|
function SortableTokenCard({ token }) {
|
|
3131
2801
|
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
|
|
@@ -3142,7 +2812,7 @@ function SortableTokenCard({ token }) {
|
|
|
3142
2812
|
if (token.name) totalCostParams.token_name = token.name;
|
|
3143
2813
|
const { data: costData } = QgridService.useTotalCost(totalCostParams, { enabled: !!token.name });
|
|
3144
2814
|
const theme = getProviderTheme(token.provider);
|
|
3145
|
-
return /* @__PURE__ */ (0,
|
|
2815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3146
2816
|
ref: setNodeRef,
|
|
3147
2817
|
style: {
|
|
3148
2818
|
transform: CSS.Translate.toString(transform),
|
|
@@ -3151,85 +2821,41 @@ function SortableTokenCard({ token }) {
|
|
|
3151
2821
|
zIndex: isDragging ? 10 : void 0
|
|
3152
2822
|
},
|
|
3153
2823
|
className: "relative rounded-lg bg-white border border-sand-200/80 overflow-hidden shadow-sm hover:shadow-md transition-shadow duration-200",
|
|
3154
|
-
children: [/* @__PURE__ */ (0,
|
|
3155
|
-
fileName: _jsxFileName$1,
|
|
3156
|
-
lineNumber: 724,
|
|
3157
|
-
columnNumber: 7
|
|
3158
|
-
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2824
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `absolute inset-y-0 left-0 w-1 ${theme.stripe}` }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3159
2825
|
className: "pl-4 pr-3 py-3",
|
|
3160
2826
|
children: [
|
|
3161
|
-
/* @__PURE__ */ (0,
|
|
2827
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3162
2828
|
className: "flex items-start justify-between gap-2 mb-2",
|
|
3163
|
-
children: [/* @__PURE__ */ (0,
|
|
2829
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3164
2830
|
className: "flex items-center gap-1.5 min-w-0",
|
|
3165
|
-
children: [/* @__PURE__ */ (0,
|
|
2831
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
3166
2832
|
type: "button",
|
|
3167
2833
|
"aria-label": "순서 변경 핸들",
|
|
3168
2834
|
...attributes,
|
|
3169
2835
|
...listeners,
|
|
3170
2836
|
className: "shrink-0 -m-1 p-1 text-sand-300 hover:text-sand-500 cursor-grab active:cursor-grabbing touch-none",
|
|
3171
|
-
children: /* @__PURE__ */ (0,
|
|
3172
|
-
|
|
3173
|
-
lineNumber: 737,
|
|
3174
|
-
columnNumber: 15
|
|
3175
|
-
}, this)
|
|
3176
|
-
}, void 0, false, {
|
|
3177
|
-
fileName: _jsxFileName$1,
|
|
3178
|
-
lineNumber: 730,
|
|
3179
|
-
columnNumber: 13
|
|
3180
|
-
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2837
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideGripVertical, { className: "size-3.5" })
|
|
2838
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3181
2839
|
className: "text-[13px] font-medium text-sand-800 truncate select-none",
|
|
3182
2840
|
children: token.name ?? "Unnamed"
|
|
3183
|
-
}
|
|
3184
|
-
|
|
3185
|
-
lineNumber: 739,
|
|
3186
|
-
columnNumber: 13
|
|
3187
|
-
}, this)]
|
|
3188
|
-
}, void 0, true, {
|
|
3189
|
-
fileName: _jsxFileName$1,
|
|
3190
|
-
lineNumber: 729,
|
|
3191
|
-
columnNumber: 11
|
|
3192
|
-
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2841
|
+
})]
|
|
2842
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3193
2843
|
className: `text-[11px] tabular-nums font-medium shrink-0 ${theme.cost}`,
|
|
3194
|
-
children:
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
}, void 0, false, {
|
|
3199
|
-
fileName: _jsxFileName$1,
|
|
3200
|
-
lineNumber: 746,
|
|
3201
|
-
columnNumber: 15
|
|
3202
|
-
}, this) : null]
|
|
3203
|
-
}, void 0, true, {
|
|
3204
|
-
fileName: _jsxFileName$1,
|
|
3205
|
-
lineNumber: 743,
|
|
3206
|
-
columnNumber: 11
|
|
3207
|
-
}, this)]
|
|
3208
|
-
}, void 0, true, {
|
|
3209
|
-
fileName: _jsxFileName$1,
|
|
3210
|
-
lineNumber: 728,
|
|
3211
|
-
columnNumber: 9
|
|
3212
|
-
}, this),
|
|
3213
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2844
|
+
children: formatUsd(costData?.usd ?? 0)
|
|
2845
|
+
})]
|
|
2846
|
+
}),
|
|
2847
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3214
2848
|
className: "flex flex-wrap items-center gap-1 mb-2",
|
|
3215
2849
|
children: [
|
|
3216
|
-
/* @__PURE__ */ (0,
|
|
2850
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3217
2851
|
className: `text-[10px] px-1.5 py-0.5 rounded-full uppercase ${theme.badge}`,
|
|
3218
2852
|
children: token.provider
|
|
3219
|
-
},
|
|
3220
|
-
|
|
3221
|
-
lineNumber: 756,
|
|
3222
|
-
columnNumber: 11
|
|
3223
|
-
}, this),
|
|
3224
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2853
|
+
}),
|
|
2854
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3225
2855
|
className: `text-[10px] px-1.5 py-0.5 rounded-full ${token.active ? "bg-sage-100 text-sage-600" : "bg-sand-200 text-sand-500"}`,
|
|
3226
2856
|
children: token.active ? "Active" : "Inactive"
|
|
3227
|
-
},
|
|
3228
|
-
|
|
3229
|
-
lineNumber: 759,
|
|
3230
|
-
columnNumber: 11
|
|
3231
|
-
}, this),
|
|
3232
|
-
QUOTA_THRESHOLD_PROVIDERS.has(token.provider) && token.quota_threshold !== null && /* @__PURE__ */ (void 0)("span", {
|
|
2857
|
+
}),
|
|
2858
|
+
QUOTA_THRESHOLD_PROVIDERS.has(token.provider) && token.quota_threshold !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
3233
2859
|
className: "px-1.5 py-0.5 rounded-full bg-sienna-50 text-[10px] tabular-nums font-medium text-sienna-600",
|
|
3234
2860
|
title: `사용률 ${token.quota_threshold}% 이상이면 이 토큰 제외`,
|
|
3235
2861
|
children: [
|
|
@@ -3237,65 +2863,25 @@ function SortableTokenCard({ token }) {
|
|
|
3237
2863
|
token.quota_threshold,
|
|
3238
2864
|
"%"
|
|
3239
2865
|
]
|
|
3240
|
-
}
|
|
3241
|
-
fileName: _jsxFileName$1,
|
|
3242
|
-
lineNumber: 765,
|
|
3243
|
-
columnNumber: 13
|
|
3244
|
-
}, this)
|
|
2866
|
+
})
|
|
3245
2867
|
]
|
|
3246
|
-
},
|
|
3247
|
-
|
|
3248
|
-
lineNumber: 755,
|
|
3249
|
-
columnNumber: 9
|
|
3250
|
-
}, this),
|
|
3251
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(TokenUsage, {
|
|
2868
|
+
}),
|
|
2869
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TokenUsage, {
|
|
3252
2870
|
token,
|
|
3253
2871
|
theme
|
|
3254
|
-
},
|
|
3255
|
-
|
|
3256
|
-
lineNumber: 773,
|
|
3257
|
-
columnNumber: 9
|
|
3258
|
-
}, this),
|
|
3259
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2872
|
+
}),
|
|
2873
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3260
2874
|
className: "mt-2 flex flex-wrap items-center gap-1.5",
|
|
3261
2875
|
children: [
|
|
3262
|
-
token.reauth_required && /* @__PURE__ */ (
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
}, this),
|
|
3267
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: "flex-1" }, void 0, false, {
|
|
3268
|
-
fileName: _jsxFileName$1,
|
|
3269
|
-
lineNumber: 778,
|
|
3270
|
-
columnNumber: 11
|
|
3271
|
-
}, this),
|
|
3272
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(WeightControl, { token }, void 0, false, {
|
|
3273
|
-
fileName: _jsxFileName$1,
|
|
3274
|
-
lineNumber: 779,
|
|
3275
|
-
columnNumber: 11
|
|
3276
|
-
}, this),
|
|
3277
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(ThresholdControl, { token }, void 0, false, {
|
|
3278
|
-
fileName: _jsxFileName$1,
|
|
3279
|
-
lineNumber: 780,
|
|
3280
|
-
columnNumber: 11
|
|
3281
|
-
}, this)
|
|
2876
|
+
token.reauth_required && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReloginButton, { token }),
|
|
2877
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1" }),
|
|
2878
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(WeightControl, { token }),
|
|
2879
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThresholdControl, { token })
|
|
3282
2880
|
]
|
|
3283
|
-
}
|
|
3284
|
-
fileName: _jsxFileName$1,
|
|
3285
|
-
lineNumber: 774,
|
|
3286
|
-
columnNumber: 9
|
|
3287
|
-
}, this)
|
|
2881
|
+
})
|
|
3288
2882
|
]
|
|
3289
|
-
}
|
|
3290
|
-
|
|
3291
|
-
lineNumber: 727,
|
|
3292
|
-
columnNumber: 7
|
|
3293
|
-
}, this)]
|
|
3294
|
-
}, void 0, true, {
|
|
3295
|
-
fileName: _jsxFileName$1,
|
|
3296
|
-
lineNumber: 719,
|
|
3297
|
-
columnNumber: 5
|
|
3298
|
-
}, this);
|
|
2883
|
+
})]
|
|
2884
|
+
});
|
|
3299
2885
|
}
|
|
3300
2886
|
var PROVIDERS = [
|
|
3301
2887
|
"all",
|
|
@@ -3345,143 +2931,66 @@ function UsageCard() {
|
|
|
3345
2931
|
}
|
|
3346
2932
|
});
|
|
3347
2933
|
};
|
|
3348
|
-
if (isLoading) return /* @__PURE__ */ (0,
|
|
2934
|
+
if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3349
2935
|
className: "panel p-5",
|
|
3350
|
-
children: /* @__PURE__ */ (0,
|
|
2936
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3351
2937
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
3352
|
-
children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ (0,
|
|
2938
|
+
children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3353
2939
|
className: "rounded-lg bg-sand-50 px-4 py-3 animate-pulse",
|
|
3354
|
-
children: [/* @__PURE__ */ (0,
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
fileName: _jsxFileName$1,
|
|
3360
|
-
lineNumber: 862,
|
|
3361
|
-
columnNumber: 15
|
|
3362
|
-
}, this)]
|
|
3363
|
-
}, `skel-${i}`, true, {
|
|
3364
|
-
fileName: _jsxFileName$1,
|
|
3365
|
-
lineNumber: 860,
|
|
3366
|
-
columnNumber: 13
|
|
3367
|
-
}, this))
|
|
3368
|
-
}, void 0, false, {
|
|
3369
|
-
fileName: _jsxFileName$1,
|
|
3370
|
-
lineNumber: 858,
|
|
3371
|
-
columnNumber: 9
|
|
3372
|
-
}, this)
|
|
3373
|
-
}, void 0, false, {
|
|
3374
|
-
fileName: _jsxFileName$1,
|
|
3375
|
-
lineNumber: 857,
|
|
3376
|
-
columnNumber: 7
|
|
3377
|
-
}, this);
|
|
3378
|
-
if (localTokens.length === 0) return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2940
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-3 w-16 bg-sand-200 rounded mb-3" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-2 w-full bg-sand-200 rounded-full" })]
|
|
2941
|
+
}, `skel-${i}`))
|
|
2942
|
+
})
|
|
2943
|
+
});
|
|
2944
|
+
if (localTokens.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3379
2945
|
className: "panel px-5 py-10",
|
|
3380
|
-
children: /* @__PURE__ */ (0,
|
|
2946
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
3381
2947
|
className: "text-sand-400 text-[13px] text-center",
|
|
3382
2948
|
children: "No tokens registered"
|
|
3383
|
-
}
|
|
3384
|
-
|
|
3385
|
-
lineNumber: 873,
|
|
3386
|
-
columnNumber: 9
|
|
3387
|
-
}, this)
|
|
3388
|
-
}, void 0, false, {
|
|
3389
|
-
fileName: _jsxFileName$1,
|
|
3390
|
-
lineNumber: 872,
|
|
3391
|
-
columnNumber: 7
|
|
3392
|
-
}, this);
|
|
2949
|
+
})
|
|
2950
|
+
});
|
|
3393
2951
|
const filteredTokens = providerFilter === "all" ? localTokens : localTokens.filter((t) => t.provider === providerFilter);
|
|
3394
|
-
return /* @__PURE__ */ (0,
|
|
2952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3395
2953
|
className: "panel overflow-hidden",
|
|
3396
|
-
children: [/* @__PURE__ */ (0,
|
|
2954
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3397
2955
|
className: "panel-header flex items-center justify-between px-5 py-2.5",
|
|
3398
|
-
children: [/* @__PURE__ */ (0,
|
|
2956
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3399
2957
|
className: "text-[13px] font-medium text-sand-700",
|
|
3400
2958
|
children: "Token Usage"
|
|
3401
|
-
},
|
|
3402
|
-
fileName: _jsxFileName$1,
|
|
3403
|
-
lineNumber: 886,
|
|
3404
|
-
columnNumber: 9
|
|
3405
|
-
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2959
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3406
2960
|
className: "segmented-control flex gap-0.5",
|
|
3407
|
-
children: PROVIDERS.map((p) => /* @__PURE__ */ (0,
|
|
2961
|
+
children: PROVIDERS.map((p) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
3408
2962
|
type: "button",
|
|
3409
2963
|
"data-active": providerFilter === p,
|
|
3410
2964
|
className: `px-2.5 py-[3px] text-[11px] font-medium rounded-[6px] transition-all duration-150 ${providerFilter === p ? "text-sand-800" : "text-sand-500 hover:text-sand-700"}`,
|
|
3411
2965
|
onClick: () => setProviderFilter(p),
|
|
3412
2966
|
children: PROVIDER_FILTER_LABELS[p]
|
|
3413
|
-
}, p
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
columnNumber: 13
|
|
3417
|
-
}, this))
|
|
3418
|
-
}, void 0, false, {
|
|
3419
|
-
fileName: _jsxFileName$1,
|
|
3420
|
-
lineNumber: 887,
|
|
3421
|
-
columnNumber: 9
|
|
3422
|
-
}, this)]
|
|
3423
|
-
}, void 0, true, {
|
|
3424
|
-
fileName: _jsxFileName$1,
|
|
3425
|
-
lineNumber: 885,
|
|
3426
|
-
columnNumber: 7
|
|
3427
|
-
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2967
|
+
}, p))
|
|
2968
|
+
})]
|
|
2969
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3428
2970
|
className: "p-4",
|
|
3429
|
-
children: /* @__PURE__ */ (0,
|
|
2971
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DndContext, {
|
|
3430
2972
|
sensors,
|
|
3431
2973
|
collisionDetection: closestCenter,
|
|
3432
2974
|
onDragEnd: handleDragEnd,
|
|
3433
|
-
children: /* @__PURE__ */ (0,
|
|
2975
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SortableContext, {
|
|
3434
2976
|
items: filteredTokens.map((t) => String(t.id)),
|
|
3435
2977
|
strategy: rectSortingStrategy,
|
|
3436
|
-
children: /* @__PURE__ */ (0,
|
|
2978
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3437
2979
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
3438
|
-
children: filteredTokens.map((token) => /* @__PURE__ */ (0,
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
fileName: _jsxFileName$1,
|
|
3445
|
-
lineNumber: 910,
|
|
3446
|
-
columnNumber: 13
|
|
3447
|
-
}, this)
|
|
3448
|
-
}, void 0, false, {
|
|
3449
|
-
fileName: _jsxFileName$1,
|
|
3450
|
-
lineNumber: 906,
|
|
3451
|
-
columnNumber: 11
|
|
3452
|
-
}, this)
|
|
3453
|
-
}, void 0, false, {
|
|
3454
|
-
fileName: _jsxFileName$1,
|
|
3455
|
-
lineNumber: 905,
|
|
3456
|
-
columnNumber: 9
|
|
3457
|
-
}, this)
|
|
3458
|
-
}, void 0, false, {
|
|
3459
|
-
fileName: _jsxFileName$1,
|
|
3460
|
-
lineNumber: 904,
|
|
3461
|
-
columnNumber: 7
|
|
3462
|
-
}, this)]
|
|
3463
|
-
}, void 0, true, {
|
|
3464
|
-
fileName: _jsxFileName$1,
|
|
3465
|
-
lineNumber: 884,
|
|
3466
|
-
columnNumber: 5
|
|
3467
|
-
}, this);
|
|
2980
|
+
children: filteredTokens.map((token) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SortableTokenCard, { token }, token.id))
|
|
2981
|
+
})
|
|
2982
|
+
})
|
|
2983
|
+
})
|
|
2984
|
+
})]
|
|
2985
|
+
});
|
|
3468
2986
|
}
|
|
3469
2987
|
//#endregion
|
|
3470
2988
|
//#region src/routes/index.tsx?tsr-split=component
|
|
3471
|
-
var _jsxFileName = "/home/runner/work/qgrid/qgrid/packages/web/src/routes/index.tsx?tsr-split=component";
|
|
3472
2989
|
function Dashboard() {
|
|
3473
|
-
return /* @__PURE__ */ (0,
|
|
2990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3474
2991
|
className: "max-w-6xl mx-auto",
|
|
3475
|
-
children: /* @__PURE__ */ (0,
|
|
3476
|
-
|
|
3477
|
-
lineNumber: 4,
|
|
3478
|
-
columnNumber: 7
|
|
3479
|
-
}, this)
|
|
3480
|
-
}, void 0, false, {
|
|
3481
|
-
fileName: _jsxFileName,
|
|
3482
|
-
lineNumber: 3,
|
|
3483
|
-
columnNumber: 10
|
|
3484
|
-
}, this);
|
|
2992
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageCard, {})
|
|
2993
|
+
});
|
|
3485
2994
|
}
|
|
3486
2995
|
//#endregion
|
|
3487
2996
|
export { Dashboard as component };
|