@cartanova/qgrid-cli 2.11.0 → 2.11.1
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/web-dist/client/assets/index-C96h3feE.js +32 -0
- package/bundle/web-dist/client/assets/logs-DBM6U0QD.js +1 -0
- package/bundle/web-dist/client/assets/monit-BBjXa7vB.js +1 -0
- package/bundle/web-dist/client/assets/plus-BsQdY7PS.js +1 -0
- package/bundle/web-dist/client/assets/refresh-cw-D9IUmT23.js +1 -0
- package/bundle/web-dist/client/assets/request-model-Bpp_rkK8.js +1 -0
- package/bundle/web-dist/client/assets/routes-Crz_PQzi.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-Cdwm3OBB.js +1 -0
- package/bundle/web-dist/client/assets/show-DBUhALT1.js +2 -0
- package/bundle/web-dist/client/assets/tokens-CVQAVJTo.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-B7QmGJq3.js +513 -0
- package/bundle/web-dist/server/assets/{monit-B2hqorPe.js → monit-DFt7x3bh.js} +117 -375
- package/bundle/web-dist/server/assets/plus-DaYQRpBt.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-BpXNsAy-.js +23 -0
- package/bundle/web-dist/server/assets/{request-model-I6OdODSH.js → request-model-eHE6YbaF.js} +6 -15
- package/bundle/web-dist/server/assets/{routes-B95YlUv2.js → routes-_Y-PJfgO.js} +203 -679
- package/bundle/web-dist/server/assets/{services.generated-DQATJ6qf.js → services.generated-CMJ8AHbO.js} +3796 -4012
- package/bundle/web-dist/server/assets/settings-JwJKxn2e.js +461 -0
- package/bundle/web-dist/server/assets/{show-Bxaj3rhH.js → show-BEv6z1v_.js} +368 -1270
- package/bundle/web-dist/server/assets/tokens-CNT4mI-f.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 +1130 -2626
- package/package.json +1 -1
- 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/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
|
@@ -1,8 +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-
|
|
5
|
+
import { t as useUpdateTokenMutation } from "./use-update-token-mutation-Sm6kh02m.js";
|
|
6
6
|
import { n as unpricedRequestTitle, t as unpricedRequestLabel } from "./total-cost-fTE9Xy82.js";
|
|
7
7
|
//#region ../../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@19.2.4/node_modules/@dnd-kit/utilities/dist/utilities.esm.js
|
|
8
8
|
var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom());
|
|
@@ -2235,113 +2235,70 @@ function useSortable({ animateLayoutChanges = defaultAnimateLayoutChanges, attri
|
|
|
2235
2235
|
KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left;
|
|
2236
2236
|
//#endregion
|
|
2237
2237
|
//#region ~icons/lucide/gauge.jsx
|
|
2238
|
-
var
|
|
2239
|
-
var
|
|
2240
|
-
var lucideGauge = (props) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("svg", {
|
|
2238
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
2239
|
+
var lucideGauge = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
2241
2240
|
viewBox: "0 0 24 24",
|
|
2242
2241
|
width: "1.2em",
|
|
2243
2242
|
height: "1.2em",
|
|
2244
2243
|
...props,
|
|
2245
|
-
children: /* @__PURE__ */ (0,
|
|
2244
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
2246
2245
|
fill: "none",
|
|
2247
2246
|
stroke: "currentColor",
|
|
2248
2247
|
strokeLinecap: "round",
|
|
2249
2248
|
strokeLinejoin: "round",
|
|
2250
2249
|
strokeWidth: 2,
|
|
2251
2250
|
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);
|
|
2251
|
+
})
|
|
2252
|
+
});
|
|
2262
2253
|
//#endregion
|
|
2263
2254
|
//#region ~icons/lucide/grip-vertical.jsx
|
|
2264
|
-
var
|
|
2265
|
-
var lucideGripVertical = (props) => /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("svg", {
|
|
2255
|
+
var lucideGripVertical = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
2266
2256
|
viewBox: "0 0 24 24",
|
|
2267
2257
|
width: "1.2em",
|
|
2268
2258
|
height: "1.2em",
|
|
2269
2259
|
...props,
|
|
2270
|
-
children: /* @__PURE__ */ (0,
|
|
2260
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", {
|
|
2271
2261
|
fill: "none",
|
|
2272
2262
|
stroke: "currentColor",
|
|
2273
2263
|
strokeLinecap: "round",
|
|
2274
2264
|
strokeLinejoin: "round",
|
|
2275
2265
|
strokeWidth: 2,
|
|
2276
2266
|
children: [
|
|
2277
|
-
/* @__PURE__ */ (0,
|
|
2267
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
|
|
2278
2268
|
cx: 9,
|
|
2279
2269
|
cy: 12,
|
|
2280
2270
|
r: 1
|
|
2281
|
-
},
|
|
2282
|
-
|
|
2283
|
-
lineNumber: 2,
|
|
2284
|
-
columnNumber: 200
|
|
2285
|
-
}, void 0),
|
|
2286
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("circle", {
|
|
2271
|
+
}),
|
|
2272
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
|
|
2287
2273
|
cx: 9,
|
|
2288
2274
|
cy: 5,
|
|
2289
2275
|
r: 1
|
|
2290
|
-
},
|
|
2291
|
-
|
|
2292
|
-
lineNumber: 2,
|
|
2293
|
-
columnNumber: 231
|
|
2294
|
-
}, void 0),
|
|
2295
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("circle", {
|
|
2276
|
+
}),
|
|
2277
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
|
|
2296
2278
|
cx: 9,
|
|
2297
2279
|
cy: 19,
|
|
2298
2280
|
r: 1
|
|
2299
|
-
},
|
|
2300
|
-
|
|
2301
|
-
lineNumber: 2,
|
|
2302
|
-
columnNumber: 261
|
|
2303
|
-
}, void 0),
|
|
2304
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("circle", {
|
|
2281
|
+
}),
|
|
2282
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
|
|
2305
2283
|
cx: 15,
|
|
2306
2284
|
cy: 12,
|
|
2307
2285
|
r: 1
|
|
2308
|
-
},
|
|
2309
|
-
|
|
2310
|
-
lineNumber: 2,
|
|
2311
|
-
columnNumber: 292
|
|
2312
|
-
}, void 0),
|
|
2313
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("circle", {
|
|
2286
|
+
}),
|
|
2287
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
|
|
2314
2288
|
cx: 15,
|
|
2315
2289
|
cy: 5,
|
|
2316
2290
|
r: 1
|
|
2317
|
-
},
|
|
2318
|
-
|
|
2319
|
-
lineNumber: 2,
|
|
2320
|
-
columnNumber: 324
|
|
2321
|
-
}, void 0),
|
|
2322
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("circle", {
|
|
2291
|
+
}),
|
|
2292
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", {
|
|
2323
2293
|
cx: 15,
|
|
2324
2294
|
cy: 19,
|
|
2325
2295
|
r: 1
|
|
2326
|
-
}
|
|
2327
|
-
fileName: _jsxFileName$2,
|
|
2328
|
-
lineNumber: 2,
|
|
2329
|
-
columnNumber: 355
|
|
2330
|
-
}, void 0)
|
|
2296
|
+
})
|
|
2331
2297
|
]
|
|
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);
|
|
2298
|
+
})
|
|
2299
|
+
});
|
|
2342
2300
|
//#endregion
|
|
2343
2301
|
//#region src/components/qgrid/UsageCard.tsx
|
|
2344
|
-
var _jsxFileName$1 = "/home/runner/work/qgrid/qgrid/packages/web/src/components/qgrid/UsageCard.tsx";
|
|
2345
2302
|
var QUOTA_THRESHOLD_PROVIDERS = new Set([
|
|
2346
2303
|
"anthropic",
|
|
2347
2304
|
"openai",
|
|
@@ -2446,118 +2403,66 @@ function formatPeriodType(periodType) {
|
|
|
2446
2403
|
function UsageStateNotes({ usage }) {
|
|
2447
2404
|
const period = formatPeriodType(usage.periodType);
|
|
2448
2405
|
if (!(usage.onDemandExcluded === true || usage.zdrVideoExcluded === true || usage.keepaliveApplicable === false || period !== null || !!usage.tier)) return null;
|
|
2449
|
-
return /* @__PURE__ */ (0,
|
|
2406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2450
2407
|
className: "flex flex-wrap items-center gap-1 text-[10px]",
|
|
2451
2408
|
children: [
|
|
2452
|
-
usage.onDemandExcluded === true && /* @__PURE__ */ (
|
|
2409
|
+
usage.onDemandExcluded === true && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2453
2410
|
className: "px-1.5 py-0.5 rounded-full bg-amber-50 text-amber-700",
|
|
2454
2411
|
title: "xAI에서 on-demand 과금을 끄면 다시 라우팅됩니다",
|
|
2455
2412
|
children: "excluded: on-demand billing enabled"
|
|
2456
|
-
},
|
|
2457
|
-
|
|
2458
|
-
lineNumber: 172,
|
|
2459
|
-
columnNumber: 9
|
|
2460
|
-
}, this),
|
|
2461
|
-
usage.zdrVideoExcluded === true && /* @__PURE__ */ (void 0)("span", {
|
|
2413
|
+
}),
|
|
2414
|
+
usage.zdrVideoExcluded === true && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2462
2415
|
className: "px-1.5 py-0.5 rounded-full bg-amber-50 text-amber-700",
|
|
2463
2416
|
title: "xAI에서 data-retention opt-out(Zero Data Retention)을 끄면 비디오가 다시 라우팅됩니다",
|
|
2464
2417
|
children: "video unavailable: zero data retention"
|
|
2465
|
-
},
|
|
2466
|
-
|
|
2467
|
-
lineNumber: 180,
|
|
2468
|
-
columnNumber: 9
|
|
2469
|
-
}, this),
|
|
2470
|
-
period !== null && /* @__PURE__ */ (void 0)("span", {
|
|
2418
|
+
}),
|
|
2419
|
+
period !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2471
2420
|
className: "px-1.5 py-0.5 rounded-full bg-sand-100 text-sand-600",
|
|
2472
2421
|
children: period
|
|
2473
|
-
},
|
|
2474
|
-
|
|
2475
|
-
lineNumber: 188,
|
|
2476
|
-
columnNumber: 9
|
|
2477
|
-
}, this),
|
|
2478
|
-
usage.tier && /* @__PURE__ */ (void 0)("span", {
|
|
2422
|
+
}),
|
|
2423
|
+
usage.tier && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2479
2424
|
className: "px-1.5 py-0.5 rounded-full bg-sand-100 text-sand-600",
|
|
2480
2425
|
children: usage.tier
|
|
2481
|
-
},
|
|
2482
|
-
|
|
2483
|
-
lineNumber: 191,
|
|
2484
|
-
columnNumber: 9
|
|
2485
|
-
}, this),
|
|
2486
|
-
usage.keepaliveApplicable === false && /* @__PURE__ */ (void 0)("span", {
|
|
2426
|
+
}),
|
|
2427
|
+
usage.keepaliveApplicable === false && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2487
2428
|
className: "px-1.5 py-0.5 rounded-full bg-sand-100 text-sand-400",
|
|
2488
2429
|
title: "이 provider는 토큰 윈도 keepalive 대상이 아닙니다",
|
|
2489
2430
|
children: "keepalive n/a"
|
|
2490
|
-
}
|
|
2491
|
-
fileName: _jsxFileName$1,
|
|
2492
|
-
lineNumber: 194,
|
|
2493
|
-
columnNumber: 9
|
|
2494
|
-
}, this)
|
|
2431
|
+
})
|
|
2495
2432
|
]
|
|
2496
|
-
}
|
|
2497
|
-
fileName: _jsxFileName$1,
|
|
2498
|
-
lineNumber: 170,
|
|
2499
|
-
columnNumber: 5
|
|
2500
|
-
}, this);
|
|
2433
|
+
});
|
|
2501
2434
|
}
|
|
2502
2435
|
function UsageRow({ label, utilization, resetsAt, windowDurationMins, theme, threshold }) {
|
|
2503
2436
|
const pct = utilization ?? 0;
|
|
2504
2437
|
const hasThreshold = threshold !== void 0 && threshold !== null;
|
|
2505
|
-
return /* @__PURE__ */ (0,
|
|
2438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2506
2439
|
className: "flex items-center gap-2",
|
|
2507
2440
|
children: [
|
|
2508
|
-
/* @__PURE__ */ (0,
|
|
2441
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2509
2442
|
className: "text-xs text-sand-600 w-7 shrink-0",
|
|
2510
2443
|
children: formatWindowLabel(label, windowDurationMins)
|
|
2511
|
-
},
|
|
2512
|
-
|
|
2513
|
-
lineNumber: 228,
|
|
2514
|
-
columnNumber: 7
|
|
2515
|
-
}, this),
|
|
2516
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2444
|
+
}),
|
|
2445
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2517
2446
|
className: "relative flex-1 min-w-0 h-2 bg-sand-200 rounded-full overflow-hidden",
|
|
2518
|
-
children: [/* @__PURE__ */ (0,
|
|
2447
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2519
2448
|
className: `h-full rounded-full transition-all duration-300 ${barColor(pct, theme)}`,
|
|
2520
2449
|
style: { width: `${Math.min(pct, 100)}%` }
|
|
2521
|
-
},
|
|
2522
|
-
fileName: _jsxFileName$1,
|
|
2523
|
-
lineNumber: 232,
|
|
2524
|
-
columnNumber: 9
|
|
2525
|
-
}, this), hasThreshold && /* @__PURE__ */ (void 0)("div", {
|
|
2450
|
+
}), hasThreshold && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2526
2451
|
className: "absolute top-[-2px] bottom-[-2px] w-0.5 bg-sienna-500 rounded-full",
|
|
2527
2452
|
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", {
|
|
2453
|
+
})]
|
|
2454
|
+
}),
|
|
2455
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
2539
2456
|
className: "text-xs tabular-nums text-sand-700 w-9 text-right shrink-0",
|
|
2540
2457
|
children: [pct, "%"]
|
|
2541
|
-
},
|
|
2542
|
-
|
|
2543
|
-
lineNumber: 244,
|
|
2544
|
-
columnNumber: 7
|
|
2545
|
-
}, this),
|
|
2546
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2458
|
+
}),
|
|
2459
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2547
2460
|
className: "hidden sm:inline text-[10px] text-sand-400 w-24 text-right shrink-0",
|
|
2548
2461
|
title: formatResets(resetsAt),
|
|
2549
2462
|
children: formatResets(resetsAt)
|
|
2550
|
-
}
|
|
2551
|
-
fileName: _jsxFileName$1,
|
|
2552
|
-
lineNumber: 245,
|
|
2553
|
-
columnNumber: 7
|
|
2554
|
-
}, this)
|
|
2463
|
+
})
|
|
2555
2464
|
]
|
|
2556
|
-
}
|
|
2557
|
-
fileName: _jsxFileName$1,
|
|
2558
|
-
lineNumber: 227,
|
|
2559
|
-
columnNumber: 5
|
|
2560
|
-
}, this);
|
|
2465
|
+
});
|
|
2561
2466
|
}
|
|
2562
2467
|
function TokenUsage({ token, theme }) {
|
|
2563
2468
|
const queryClient = useQueryClient();
|
|
@@ -2569,124 +2474,60 @@ function TokenUsage({ token, theme }) {
|
|
|
2569
2474
|
dataUpdatedAt,
|
|
2570
2475
|
queryClient
|
|
2571
2476
|
]);
|
|
2572
|
-
if (token.reauth_required) return /* @__PURE__ */ (0,
|
|
2477
|
+
if (token.reauth_required) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2573
2478
|
className: "py-1",
|
|
2574
|
-
children: [/* @__PURE__ */ (0,
|
|
2479
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2575
2480
|
className: "text-[11px] text-amber-600",
|
|
2576
2481
|
children: "Session expired"
|
|
2577
|
-
},
|
|
2578
|
-
fileName: _jsxFileName$1,
|
|
2579
|
-
lineNumber: 267,
|
|
2580
|
-
columnNumber: 9
|
|
2581
|
-
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("p", {
|
|
2482
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2582
2483
|
className: "text-[10px] text-sand-400 mt-0.5",
|
|
2583
2484
|
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", {
|
|
2485
|
+
})]
|
|
2486
|
+
});
|
|
2487
|
+
if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2595
2488
|
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", {
|
|
2489
|
+
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" })]
|
|
2490
|
+
});
|
|
2491
|
+
if (data?.error) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2611
2492
|
className: "py-1",
|
|
2612
|
-
children: [/* @__PURE__ */ (0,
|
|
2493
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2613
2494
|
className: "text-[11px] text-amber-600",
|
|
2614
2495
|
children: "Unavailable"
|
|
2615
|
-
},
|
|
2616
|
-
fileName: _jsxFileName$1,
|
|
2617
|
-
lineNumber: 285,
|
|
2618
|
-
columnNumber: 9
|
|
2619
|
-
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("p", {
|
|
2496
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2620
2497
|
className: "text-[10px] text-sand-400 mt-0.5",
|
|
2621
2498
|
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", {
|
|
2499
|
+
})]
|
|
2500
|
+
});
|
|
2501
|
+
if (!data?.fiveHour && !data?.sevenDay) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2633
2502
|
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", {
|
|
2503
|
+
children: [data && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageStateNotes, { usage: data }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2639
2504
|
className: "text-[11px] text-sand-400",
|
|
2640
2505
|
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);
|
|
2506
|
+
})]
|
|
2507
|
+
});
|
|
2651
2508
|
const thresholdForPrimary = QUOTA_THRESHOLD_PROVIDERS.has(token.provider) ? token.quota_threshold : null;
|
|
2652
|
-
return /* @__PURE__ */ (0,
|
|
2509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2653
2510
|
className: "space-y-1.5 py-1",
|
|
2654
2511
|
children: [
|
|
2655
|
-
/* @__PURE__ */ (0,
|
|
2656
|
-
|
|
2657
|
-
lineNumber: 307,
|
|
2658
|
-
columnNumber: 7
|
|
2659
|
-
}, this),
|
|
2660
|
-
data.fiveHour && /* @__PURE__ */ (void 0)(UsageRow, {
|
|
2512
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageStateNotes, { usage: data }),
|
|
2513
|
+
data.fiveHour && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageRow, {
|
|
2661
2514
|
label: "5h",
|
|
2662
2515
|
utilization: data.fiveHour.utilization,
|
|
2663
2516
|
resetsAt: data.fiveHour.resetsAt,
|
|
2664
2517
|
windowDurationMins: data.fiveHour.windowDurationMins,
|
|
2665
2518
|
theme,
|
|
2666
2519
|
threshold: thresholdForPrimary
|
|
2667
|
-
},
|
|
2668
|
-
|
|
2669
|
-
lineNumber: 309,
|
|
2670
|
-
columnNumber: 9
|
|
2671
|
-
}, this),
|
|
2672
|
-
data.sevenDay && /* @__PURE__ */ (void 0)(UsageRow, {
|
|
2520
|
+
}),
|
|
2521
|
+
data.sevenDay && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageRow, {
|
|
2673
2522
|
label: formatPeriodType(data.periodType) === "monthly" ? "1mo" : "7d",
|
|
2674
2523
|
utilization: data.sevenDay.utilization,
|
|
2675
2524
|
resetsAt: data.sevenDay.resetsAt,
|
|
2676
2525
|
windowDurationMins: data.sevenDay.windowDurationMins,
|
|
2677
2526
|
theme,
|
|
2678
2527
|
threshold: token.provider === "grok" ? thresholdForPrimary : void 0
|
|
2679
|
-
}
|
|
2680
|
-
fileName: _jsxFileName$1,
|
|
2681
|
-
lineNumber: 319,
|
|
2682
|
-
columnNumber: 9
|
|
2683
|
-
}, this)
|
|
2528
|
+
})
|
|
2684
2529
|
]
|
|
2685
|
-
}
|
|
2686
|
-
fileName: _jsxFileName$1,
|
|
2687
|
-
lineNumber: 306,
|
|
2688
|
-
columnNumber: 5
|
|
2689
|
-
}, this);
|
|
2530
|
+
});
|
|
2690
2531
|
}
|
|
2691
2532
|
function ThresholdControl({ token }) {
|
|
2692
2533
|
const [pos, setPos] = (0, import_react.useState)(null);
|
|
@@ -2714,19 +2555,11 @@ function ThresholdControl({ token }) {
|
|
|
2714
2555
|
setValue(String(token.quota_threshold ?? 100));
|
|
2715
2556
|
};
|
|
2716
2557
|
const close = () => setPos(null);
|
|
2717
|
-
if (!supported) return /* @__PURE__ */ (0,
|
|
2558
|
+
if (!supported) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
2718
2559
|
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
2560
|
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);
|
|
2561
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideGauge, { className: "size-3" }), "n/a"]
|
|
2562
|
+
});
|
|
2730
2563
|
const adjust = (delta) => {
|
|
2731
2564
|
const current = /^\d+$/.test(value.trim()) ? Number(value.trim()) : 0;
|
|
2732
2565
|
const next = Math.min(Math.max(current + delta, 0), 100);
|
|
@@ -2741,147 +2574,83 @@ function ThresholdControl({ token }) {
|
|
|
2741
2574
|
await Promise.all([queryClient.invalidateQueries({ queryKey: ["Token"] }), queryClient.invalidateQueries({ queryKey: ["Qgrid"] })]);
|
|
2742
2575
|
close();
|
|
2743
2576
|
};
|
|
2744
|
-
return /* @__PURE__ */ (0,
|
|
2577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2745
2578
|
className: "inline-flex",
|
|
2746
|
-
children: [/* @__PURE__ */ (0,
|
|
2579
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
2747
2580
|
ref: triggerRef,
|
|
2748
2581
|
type: "button",
|
|
2749
2582
|
title: "사용률 제한 설정",
|
|
2750
2583
|
onClick: open ? close : openPopover,
|
|
2751
2584
|
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", {
|
|
2585
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideGauge, { className: "size-3" }), "Set limit"]
|
|
2586
|
+
}), open && pos && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2762
2587
|
className: "fixed inset-0 z-40",
|
|
2763
2588
|
onPointerDown: close
|
|
2764
|
-
},
|
|
2765
|
-
fileName: _jsxFileName$1,
|
|
2766
|
-
lineNumber: 429,
|
|
2767
|
-
columnNumber: 11
|
|
2768
|
-
}, this), /* @__PURE__ */ (void 0)("div", {
|
|
2589
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2769
2590
|
className: "fixed z-50 w-60 panel shadow-xl p-3",
|
|
2770
2591
|
style: {
|
|
2771
2592
|
top: pos.top,
|
|
2772
2593
|
left: pos.left
|
|
2773
2594
|
},
|
|
2774
2595
|
children: [
|
|
2775
|
-
/* @__PURE__ */ (
|
|
2596
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
|
|
2776
2597
|
htmlFor: `threshold-${token.id}`,
|
|
2777
2598
|
className: "text-[10px] uppercase tracking-wider text-sand-500 font-medium",
|
|
2778
2599
|
children: "사용률 제한"
|
|
2779
|
-
},
|
|
2780
|
-
|
|
2781
|
-
lineNumber: 434,
|
|
2782
|
-
columnNumber: 13
|
|
2783
|
-
}, this),
|
|
2784
|
-
/* @__PURE__ */ (void 0)("div", {
|
|
2600
|
+
}),
|
|
2601
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2785
2602
|
className: "mt-1 flex items-center gap-2",
|
|
2786
2603
|
children: [
|
|
2787
|
-
/* @__PURE__ */ (
|
|
2604
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2788
2605
|
type: "button",
|
|
2789
2606
|
onClick: () => adjust(-10),
|
|
2790
2607
|
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
2608
|
children: "−"
|
|
2792
|
-
},
|
|
2793
|
-
|
|
2794
|
-
lineNumber: 441,
|
|
2795
|
-
columnNumber: 15
|
|
2796
|
-
}, this),
|
|
2797
|
-
/* @__PURE__ */ (void 0)(o, {
|
|
2609
|
+
}),
|
|
2610
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(o, {
|
|
2798
2611
|
id: `threshold-${token.id}`,
|
|
2799
2612
|
value,
|
|
2800
2613
|
onChange: (e) => setValue(e.target.value),
|
|
2801
2614
|
inputMode: "numeric",
|
|
2802
2615
|
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", {
|
|
2616
|
+
}),
|
|
2617
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2809
2618
|
type: "button",
|
|
2810
2619
|
onClick: () => adjust(10),
|
|
2811
2620
|
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
2621
|
children: "+"
|
|
2813
|
-
},
|
|
2814
|
-
|
|
2815
|
-
lineNumber: 459,
|
|
2816
|
-
columnNumber: 15
|
|
2817
|
-
}, this),
|
|
2818
|
-
/* @__PURE__ */ (void 0)("span", {
|
|
2622
|
+
}),
|
|
2623
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
2819
2624
|
className: "text-sm text-sand-500",
|
|
2820
2625
|
children: "%"
|
|
2821
|
-
}
|
|
2822
|
-
fileName: _jsxFileName$1,
|
|
2823
|
-
lineNumber: 466,
|
|
2824
|
-
columnNumber: 15
|
|
2825
|
-
}, this)
|
|
2626
|
+
})
|
|
2826
2627
|
]
|
|
2827
|
-
},
|
|
2828
|
-
|
|
2829
|
-
lineNumber: 440,
|
|
2830
|
-
columnNumber: 13
|
|
2831
|
-
}, this),
|
|
2832
|
-
validation.ok ? /* @__PURE__ */ (void 0)("p", {
|
|
2628
|
+
}),
|
|
2629
|
+
validation.ok ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2833
2630
|
className: "mt-1.5 text-[11px] text-sand-500 leading-snug",
|
|
2834
2631
|
children: validation.value === null ? "제한 없음 — 사용률과 무관하게 항상 사용합니다." : "기준 사용률이 임계치에 달하면 해당 토큰을 건너뜁니다."
|
|
2835
|
-
}
|
|
2836
|
-
fileName: _jsxFileName$1,
|
|
2837
|
-
lineNumber: 469,
|
|
2838
|
-
columnNumber: 15
|
|
2839
|
-
}, this) : /* @__PURE__ */ (void 0)("p", {
|
|
2632
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2840
2633
|
className: "mt-1.5 text-[11px] text-red-500",
|
|
2841
2634
|
children: validation.error
|
|
2842
|
-
},
|
|
2843
|
-
|
|
2844
|
-
lineNumber: 475,
|
|
2845
|
-
columnNumber: 15
|
|
2846
|
-
}, this),
|
|
2847
|
-
/* @__PURE__ */ (void 0)("div", {
|
|
2635
|
+
}),
|
|
2636
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2848
2637
|
className: "mt-2 flex items-center justify-end gap-1.5",
|
|
2849
|
-
children: [/* @__PURE__ */ (
|
|
2638
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2850
2639
|
type: "button",
|
|
2851
2640
|
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
2641
|
onClick: close,
|
|
2853
2642
|
children: "Cancel"
|
|
2854
|
-
},
|
|
2855
|
-
fileName: _jsxFileName$1,
|
|
2856
|
-
lineNumber: 478,
|
|
2857
|
-
columnNumber: 15
|
|
2858
|
-
}, this), /* @__PURE__ */ (void 0)("button", {
|
|
2643
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2859
2644
|
type: "button",
|
|
2860
2645
|
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
2646
|
disabled: updateMutation.isPending || !validation.ok,
|
|
2862
2647
|
onClick: save,
|
|
2863
2648
|
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)
|
|
2649
|
+
})]
|
|
2650
|
+
})
|
|
2874
2651
|
]
|
|
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);
|
|
2652
|
+
})] })]
|
|
2653
|
+
});
|
|
2885
2654
|
}
|
|
2886
2655
|
function WeightControl({ token }) {
|
|
2887
2656
|
const [pos, setPos] = (0, import_react.useState)(null);
|
|
@@ -2920,125 +2689,73 @@ function WeightControl({ token }) {
|
|
|
2920
2689
|
await Promise.all([queryClient.invalidateQueries({ queryKey: ["Token"] }), queryClient.invalidateQueries({ queryKey: ["Qgrid"] })]);
|
|
2921
2690
|
close();
|
|
2922
2691
|
};
|
|
2923
|
-
return /* @__PURE__ */ (0,
|
|
2692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2924
2693
|
className: "inline-flex",
|
|
2925
|
-
children: [/* @__PURE__ */ (0,
|
|
2694
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
|
|
2926
2695
|
ref: triggerRef,
|
|
2927
2696
|
type: "button",
|
|
2928
2697
|
title: "라우팅 가중치 설정",
|
|
2929
2698
|
onClick: pos ? close : openPopover,
|
|
2930
2699
|
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
2700
|
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", {
|
|
2701
|
+
}), pos && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
2937
2702
|
className: "fixed inset-0 z-40",
|
|
2938
2703
|
onPointerDown: close
|
|
2939
|
-
},
|
|
2940
|
-
fileName: _jsxFileName$1,
|
|
2941
|
-
lineNumber: 567,
|
|
2942
|
-
columnNumber: 11
|
|
2943
|
-
}, this), /* @__PURE__ */ (void 0)("div", {
|
|
2704
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2944
2705
|
className: "fixed z-50 w-60 panel shadow-xl p-3",
|
|
2945
2706
|
style: pos,
|
|
2946
2707
|
children: [
|
|
2947
|
-
/* @__PURE__ */ (
|
|
2708
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
|
|
2948
2709
|
htmlFor: `weight-${token.id}`,
|
|
2949
2710
|
className: "text-[10px] uppercase tracking-wider text-sand-500 font-medium",
|
|
2950
2711
|
children: "라우팅 가중치"
|
|
2951
|
-
},
|
|
2952
|
-
|
|
2953
|
-
lineNumber: 569,
|
|
2954
|
-
columnNumber: 13
|
|
2955
|
-
}, this),
|
|
2956
|
-
/* @__PURE__ */ (void 0)("div", {
|
|
2712
|
+
}),
|
|
2713
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
2957
2714
|
className: "mt-1 flex items-center gap-2",
|
|
2958
2715
|
children: [
|
|
2959
|
-
/* @__PURE__ */ (
|
|
2716
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2960
2717
|
type: "button",
|
|
2961
2718
|
onClick: () => adjust(-1),
|
|
2962
2719
|
className: "size-9 shrink-0 rounded-md border border-sand-200 text-sand-600",
|
|
2963
2720
|
children: "−"
|
|
2964
|
-
},
|
|
2965
|
-
|
|
2966
|
-
lineNumber: 576,
|
|
2967
|
-
columnNumber: 15
|
|
2968
|
-
}, this),
|
|
2969
|
-
/* @__PURE__ */ (void 0)(o, {
|
|
2721
|
+
}),
|
|
2722
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(o, {
|
|
2970
2723
|
id: `weight-${token.id}`,
|
|
2971
2724
|
value,
|
|
2972
2725
|
onChange: (event) => setValue(event.target.value),
|
|
2973
2726
|
inputMode: "numeric",
|
|
2974
2727
|
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", {
|
|
2728
|
+
}),
|
|
2729
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
2981
2730
|
type: "button",
|
|
2982
2731
|
onClick: () => adjust(1),
|
|
2983
2732
|
className: "size-9 shrink-0 rounded-md border border-sand-200 text-sand-600",
|
|
2984
2733
|
children: "+"
|
|
2985
|
-
}
|
|
2986
|
-
fileName: _jsxFileName$1,
|
|
2987
|
-
lineNumber: 594,
|
|
2988
|
-
columnNumber: 15
|
|
2989
|
-
}, this)
|
|
2734
|
+
})
|
|
2990
2735
|
]
|
|
2991
|
-
},
|
|
2992
|
-
|
|
2993
|
-
lineNumber: 575,
|
|
2994
|
-
columnNumber: 13
|
|
2995
|
-
}, this),
|
|
2996
|
-
/* @__PURE__ */ (void 0)("p", {
|
|
2736
|
+
}),
|
|
2737
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
2997
2738
|
className: `mt-1.5 text-[11px] ${validation.ok ? "text-sand-500" : "text-red-500"}`,
|
|
2998
2739
|
children: validation.ok ? "새 요청의 상대 배정 비율입니다." : validation.error
|
|
2999
|
-
},
|
|
3000
|
-
|
|
3001
|
-
lineNumber: 602,
|
|
3002
|
-
columnNumber: 13
|
|
3003
|
-
}, this),
|
|
3004
|
-
/* @__PURE__ */ (void 0)("div", {
|
|
2740
|
+
}),
|
|
2741
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3005
2742
|
className: "mt-2 flex items-center justify-end gap-1.5",
|
|
3006
|
-
children: [/* @__PURE__ */ (
|
|
2743
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
3007
2744
|
type: "button",
|
|
3008
2745
|
onClick: close,
|
|
3009
2746
|
className: "px-2 py-1 text-[11px]",
|
|
3010
2747
|
children: "Cancel"
|
|
3011
|
-
},
|
|
3012
|
-
fileName: _jsxFileName$1,
|
|
3013
|
-
lineNumber: 606,
|
|
3014
|
-
columnNumber: 15
|
|
3015
|
-
}, this), /* @__PURE__ */ (void 0)("button", {
|
|
2748
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
3016
2749
|
type: "button",
|
|
3017
2750
|
onClick: save,
|
|
3018
2751
|
disabled: updateMutation.isPending || !validation.ok,
|
|
3019
2752
|
className: "px-2 py-1 text-[11px] rounded-md bg-sienna-400 text-white disabled:opacity-50",
|
|
3020
2753
|
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)
|
|
2754
|
+
})]
|
|
2755
|
+
})
|
|
3031
2756
|
]
|
|
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);
|
|
2757
|
+
})] })]
|
|
2758
|
+
});
|
|
3042
2759
|
}
|
|
3043
2760
|
/**
|
|
3044
2761
|
* 재로그인의 유일한 진입점.
|
|
@@ -3055,7 +2772,7 @@ function ReloginButton({ token }) {
|
|
|
3055
2772
|
const submitCode = async (pastedCode) => {
|
|
3056
2773
|
if (await oauth.submitCode(pastedCode)) oauth.reset();
|
|
3057
2774
|
};
|
|
3058
|
-
return /* @__PURE__ */ (0,
|
|
2775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
3059
2776
|
type: "button",
|
|
3060
2777
|
title: "기존 이름으로 다시 로그인",
|
|
3061
2778
|
disabled: provider === null || oauth.loadingProvider !== null,
|
|
@@ -3063,69 +2780,33 @@ function ReloginButton({ token }) {
|
|
|
3063
2780
|
if (provider) oauth.start(provider, token.name ?? "");
|
|
3064
2781
|
},
|
|
3065
2782
|
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", {
|
|
2783
|
+
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" }), "로그인 대기"] }) : "재로그인"
|
|
2784
|
+
}), oauth.codeEntryProvider && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3076
2785
|
className: "fixed inset-0 z-50 flex items-start justify-center pt-[15vh]",
|
|
3077
|
-
children: [/* @__PURE__ */ (
|
|
2786
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3078
2787
|
className: "absolute inset-0 bg-sand-900/8 backdrop-blur-sm",
|
|
3079
2788
|
onClick: oauth.reset,
|
|
3080
2789
|
onKeyDown: () => {}
|
|
3081
|
-
},
|
|
3082
|
-
fileName: _jsxFileName$1,
|
|
3083
|
-
lineNumber: 665,
|
|
3084
|
-
columnNumber: 11
|
|
3085
|
-
}, this), /* @__PURE__ */ (void 0)("div", {
|
|
2790
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3086
2791
|
className: "relative panel shadow-xl w-full max-w-md mx-4",
|
|
3087
|
-
children: [/* @__PURE__ */ (
|
|
2792
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3088
2793
|
className: "px-5 py-4 border-b border-sand-100/60",
|
|
3089
|
-
children: /* @__PURE__ */ (
|
|
2794
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
|
|
3090
2795
|
className: "text-base font-medium text-sand-900",
|
|
3091
2796
|
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", {
|
|
2797
|
+
})
|
|
2798
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3102
2799
|
className: "px-5 py-4",
|
|
3103
|
-
children: /* @__PURE__ */ (
|
|
2800
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OAuthCodeEntry, {
|
|
3104
2801
|
provider: oauth.codeEntryProvider,
|
|
3105
2802
|
isPending: oauth.completeMutation.isPending,
|
|
3106
2803
|
isError: oauth.completeMutation.isError,
|
|
3107
2804
|
onSubmit: (code) => void submitCode(code),
|
|
3108
2805
|
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);
|
|
2806
|
+
})
|
|
2807
|
+
})]
|
|
2808
|
+
})]
|
|
2809
|
+
})] });
|
|
3129
2810
|
}
|
|
3130
2811
|
function SortableTokenCard({ token }) {
|
|
3131
2812
|
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
|
|
@@ -3142,7 +2823,7 @@ function SortableTokenCard({ token }) {
|
|
|
3142
2823
|
if (token.name) totalCostParams.token_name = token.name;
|
|
3143
2824
|
const { data: costData } = QgridService.useTotalCost(totalCostParams, { enabled: !!token.name });
|
|
3144
2825
|
const theme = getProviderTheme(token.provider);
|
|
3145
|
-
return /* @__PURE__ */ (0,
|
|
2826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3146
2827
|
ref: setNodeRef,
|
|
3147
2828
|
style: {
|
|
3148
2829
|
transform: CSS.Translate.toString(transform),
|
|
@@ -3151,85 +2832,45 @@ function SortableTokenCard({ token }) {
|
|
|
3151
2832
|
zIndex: isDragging ? 10 : void 0
|
|
3152
2833
|
},
|
|
3153
2834
|
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", {
|
|
2835
|
+
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
2836
|
className: "pl-4 pr-3 py-3",
|
|
3160
2837
|
children: [
|
|
3161
|
-
/* @__PURE__ */ (0,
|
|
2838
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3162
2839
|
className: "flex items-start justify-between gap-2 mb-2",
|
|
3163
|
-
children: [/* @__PURE__ */ (0,
|
|
2840
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3164
2841
|
className: "flex items-center gap-1.5 min-w-0",
|
|
3165
|
-
children: [/* @__PURE__ */ (0,
|
|
2842
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
3166
2843
|
type: "button",
|
|
3167
2844
|
"aria-label": "순서 변경 핸들",
|
|
3168
2845
|
...attributes,
|
|
3169
2846
|
...listeners,
|
|
3170
2847
|
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", {
|
|
2848
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(lucideGripVertical, { className: "size-3.5" })
|
|
2849
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3181
2850
|
className: "text-[13px] font-medium text-sand-800 truncate select-none",
|
|
3182
2851
|
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", {
|
|
2852
|
+
})]
|
|
2853
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
3193
2854
|
className: `text-[11px] tabular-nums font-medium shrink-0 ${theme.cost}`,
|
|
3194
|
-
children: [formatUsd(costData?.usd ?? 0), costData && unpricedRequestLabel(costData) ? /* @__PURE__ */ (0,
|
|
2855
|
+
children: [formatUsd(costData?.usd ?? 0), costData && unpricedRequestLabel(costData) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3195
2856
|
className: "ml-1 font-normal text-sand-400",
|
|
3196
2857
|
title: unpricedRequestTitle(costData) ?? void 0,
|
|
3197
2858
|
children: unpricedRequestLabel(costData)
|
|
3198
|
-
}
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
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", {
|
|
2859
|
+
}) : null]
|
|
2860
|
+
})]
|
|
2861
|
+
}),
|
|
2862
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3214
2863
|
className: "flex flex-wrap items-center gap-1 mb-2",
|
|
3215
2864
|
children: [
|
|
3216
|
-
/* @__PURE__ */ (0,
|
|
2865
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3217
2866
|
className: `text-[10px] px-1.5 py-0.5 rounded-full uppercase ${theme.badge}`,
|
|
3218
2867
|
children: token.provider
|
|
3219
|
-
},
|
|
3220
|
-
|
|
3221
|
-
lineNumber: 756,
|
|
3222
|
-
columnNumber: 11
|
|
3223
|
-
}, this),
|
|
3224
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("span", {
|
|
2868
|
+
}),
|
|
2869
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3225
2870
|
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
2871
|
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", {
|
|
2872
|
+
}),
|
|
2873
|
+
QUOTA_THRESHOLD_PROVIDERS.has(token.provider) && token.quota_threshold !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
3233
2874
|
className: "px-1.5 py-0.5 rounded-full bg-sienna-50 text-[10px] tabular-nums font-medium text-sienna-600",
|
|
3234
2875
|
title: `사용률 ${token.quota_threshold}% 이상이면 이 토큰 제외`,
|
|
3235
2876
|
children: [
|
|
@@ -3237,65 +2878,25 @@ function SortableTokenCard({ token }) {
|
|
|
3237
2878
|
token.quota_threshold,
|
|
3238
2879
|
"%"
|
|
3239
2880
|
]
|
|
3240
|
-
}
|
|
3241
|
-
fileName: _jsxFileName$1,
|
|
3242
|
-
lineNumber: 765,
|
|
3243
|
-
columnNumber: 13
|
|
3244
|
-
}, this)
|
|
2881
|
+
})
|
|
3245
2882
|
]
|
|
3246
|
-
},
|
|
3247
|
-
|
|
3248
|
-
lineNumber: 755,
|
|
3249
|
-
columnNumber: 9
|
|
3250
|
-
}, this),
|
|
3251
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(TokenUsage, {
|
|
2883
|
+
}),
|
|
2884
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TokenUsage, {
|
|
3252
2885
|
token,
|
|
3253
2886
|
theme
|
|
3254
|
-
},
|
|
3255
|
-
|
|
3256
|
-
lineNumber: 773,
|
|
3257
|
-
columnNumber: 9
|
|
3258
|
-
}, this),
|
|
3259
|
-
/* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2887
|
+
}),
|
|
2888
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3260
2889
|
className: "mt-2 flex flex-wrap items-center gap-1.5",
|
|
3261
2890
|
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)
|
|
2891
|
+
token.reauth_required && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReloginButton, { token }),
|
|
2892
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1" }),
|
|
2893
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(WeightControl, { token }),
|
|
2894
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThresholdControl, { token })
|
|
3282
2895
|
]
|
|
3283
|
-
}
|
|
3284
|
-
fileName: _jsxFileName$1,
|
|
3285
|
-
lineNumber: 774,
|
|
3286
|
-
columnNumber: 9
|
|
3287
|
-
}, this)
|
|
2896
|
+
})
|
|
3288
2897
|
]
|
|
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);
|
|
2898
|
+
})]
|
|
2899
|
+
});
|
|
3299
2900
|
}
|
|
3300
2901
|
var PROVIDERS = [
|
|
3301
2902
|
"all",
|
|
@@ -3345,143 +2946,66 @@ function UsageCard() {
|
|
|
3345
2946
|
}
|
|
3346
2947
|
});
|
|
3347
2948
|
};
|
|
3348
|
-
if (isLoading) return /* @__PURE__ */ (0,
|
|
2949
|
+
if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3349
2950
|
className: "panel p-5",
|
|
3350
|
-
children: /* @__PURE__ */ (0,
|
|
2951
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3351
2952
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
3352
|
-
children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ (0,
|
|
2953
|
+
children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3353
2954
|
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", {
|
|
2955
|
+
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" })]
|
|
2956
|
+
}, `skel-${i}`))
|
|
2957
|
+
})
|
|
2958
|
+
});
|
|
2959
|
+
if (localTokens.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3379
2960
|
className: "panel px-5 py-10",
|
|
3380
|
-
children: /* @__PURE__ */ (0,
|
|
2961
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
3381
2962
|
className: "text-sand-400 text-[13px] text-center",
|
|
3382
2963
|
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);
|
|
2964
|
+
})
|
|
2965
|
+
});
|
|
3393
2966
|
const filteredTokens = providerFilter === "all" ? localTokens : localTokens.filter((t) => t.provider === providerFilter);
|
|
3394
|
-
return /* @__PURE__ */ (0,
|
|
2967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3395
2968
|
className: "panel overflow-hidden",
|
|
3396
|
-
children: [/* @__PURE__ */ (0,
|
|
2969
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3397
2970
|
className: "panel-header flex items-center justify-between px-5 py-2.5",
|
|
3398
|
-
children: [/* @__PURE__ */ (0,
|
|
2971
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3399
2972
|
className: "text-[13px] font-medium text-sand-700",
|
|
3400
2973
|
children: "Token Usage"
|
|
3401
|
-
},
|
|
3402
|
-
fileName: _jsxFileName$1,
|
|
3403
|
-
lineNumber: 886,
|
|
3404
|
-
columnNumber: 9
|
|
3405
|
-
}, this), /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", {
|
|
2974
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3406
2975
|
className: "segmented-control flex gap-0.5",
|
|
3407
|
-
children: PROVIDERS.map((p) => /* @__PURE__ */ (0,
|
|
2976
|
+
children: PROVIDERS.map((p) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
3408
2977
|
type: "button",
|
|
3409
2978
|
"data-active": providerFilter === p,
|
|
3410
2979
|
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
2980
|
onClick: () => setProviderFilter(p),
|
|
3412
2981
|
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", {
|
|
2982
|
+
}, p))
|
|
2983
|
+
})]
|
|
2984
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3428
2985
|
className: "p-4",
|
|
3429
|
-
children: /* @__PURE__ */ (0,
|
|
2986
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DndContext, {
|
|
3430
2987
|
sensors,
|
|
3431
2988
|
collisionDetection: closestCenter,
|
|
3432
2989
|
onDragEnd: handleDragEnd,
|
|
3433
|
-
children: /* @__PURE__ */ (0,
|
|
2990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SortableContext, {
|
|
3434
2991
|
items: filteredTokens.map((t) => String(t.id)),
|
|
3435
2992
|
strategy: rectSortingStrategy,
|
|
3436
|
-
children: /* @__PURE__ */ (0,
|
|
2993
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3437
2994
|
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);
|
|
2995
|
+
children: filteredTokens.map((token) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SortableTokenCard, { token }, token.id))
|
|
2996
|
+
})
|
|
2997
|
+
})
|
|
2998
|
+
})
|
|
2999
|
+
})]
|
|
3000
|
+
});
|
|
3468
3001
|
}
|
|
3469
3002
|
//#endregion
|
|
3470
3003
|
//#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
3004
|
function Dashboard() {
|
|
3473
|
-
return /* @__PURE__ */ (0,
|
|
3005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3474
3006
|
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);
|
|
3007
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UsageCard, {})
|
|
3008
|
+
});
|
|
3485
3009
|
}
|
|
3486
3010
|
//#endregion
|
|
3487
3011
|
export { Dashboard as component };
|