@argusoft/medplat-core 1.0.16 → 1.0.18

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.
@@ -1,33 +1,33 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { useState as c, useEffect as le, useMemo as ve } from "react";
3
- import { Box as s, Card as F, Typography as x, Tabs as ga, Tab as ie, Chip as X, Button as p, Divider as fa, TextField as Ce, InputAdornment as ce, IconButton as V, Modal as G } from "@mui/material";
4
- import de from "@/common/services/util/GeneralUtil";
5
- import { api as fe } from "@/common/interceptors/AxiosInterceptor";
6
- import { downloadExcel as ha, execute as ya } from "@/common/services/GlobalApis";
7
- import { getAssignedFeatures as ba } from "@/utils/feature.js";
8
- import { useSelector as ge } from "react-redux";
9
- import Ee from "@/views/custom-components/CustomTextField";
10
- import { useForm as _a } from "react-hook-form";
11
- import Na from "@/hooks/useTrackEvent";
12
- import wa from "@/views/custom-components/CustomConfirmationModal";
2
+ import { useState as c, useEffect as ie, useMemo as ke } from "react";
3
+ import { Box as r, Card as F, Typography as x, Tabs as ba, Tab as ce, Chip as W, Button as p, Divider as _a, TextField as Ae, InputAdornment as de, IconButton as G, Modal as X } from "@mui/material";
4
+ import me from "@/common/services/util/GeneralUtil";
5
+ import { api as ye } from "@/common/interceptors/AxiosInterceptor";
6
+ import { downloadExcel as Na, execute as wa } from "@/common/services/GlobalApis";
7
+ import { getAssignedFeatures as Sa } from "@/utils/feature.js";
8
+ import { useSelector as he } from "react-redux";
9
+ import pe from "@/views/custom-components/CustomTextField";
10
+ import { useForm as va } from "react-hook-form";
11
+ import Ca from "@/hooks/useTrackEvent";
12
+ import Ea from "@/views/custom-components/CustomConfirmationModal";
13
13
  import { showToast as u } from "@/common/toaster/toaster";
14
- import Sa from "dayjs";
15
- import { useTranslateProvider as va } from "@/common/languageTranslator/TranslationContext";
16
- import Te from "prop-types";
17
- import { getUseSkeleton as Ie } from "@/store/reducers/SkeletonReducer";
18
- import Ca from "@monaco-editor/react";
19
- import me from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
20
- import { faTerminal as Ea, faTableList as Re, faSitemap as pe, faDatabase as ue, faSlidersH as ke, faHistory as Ae, faLock as Ta, faTimes as Q, faDownload as Ra, faPlay as ka, faSearch as De } from "@fortawesome/free-solid-svg-icons";
21
- import { FontAwesomeIcon as o } from "@fortawesome/react-fontawesome";
22
- import Aa from "lodash/debounce";
23
- import Da from "@/assets/gifs/baburao.gif";
24
- import './QueryManagement.css';const Oa = (m) => fe.post("resource/getdatawithtimeout", m), Oe = (m) => fe.post("querymanagement/retrieve", m, {
14
+ import Ta from "dayjs";
15
+ import { useTranslateProvider as Ra } from "@/common/languageTranslator/TranslationContext";
16
+ import De from "prop-types";
17
+ import { getUseSkeleton as We } from "@/store/reducers/SkeletonReducer";
18
+ import ka from "@monaco-editor/react";
19
+ import ue from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
20
+ import { faTerminal as Aa, faTableList as Oe, faSitemap as xe, faDatabase as ge, faSlidersH as ze, faHistory as Le, faLock as Da, faTimes as Q, faDownload as Ie, faPlay as Oa, faSearch as qe, faClock as za, faSyncAlt as La } from "@fortawesome/free-solid-svg-icons";
21
+ import { FontAwesomeIcon as l } from "@fortawesome/react-fontawesome";
22
+ import Ia from "lodash/debounce";
23
+ import qa from "@/assets/gifs/baburao.gif";
24
+ import './QueryManagement.css';const Ma = (m) => ye.post("resource/getdatawithtimeout", m), Me = (m) => ye.post("querymanagement/retrieve", m, {
25
25
  headers: { "Content-Type": "application/json" },
26
- transformRequest: [(l) => l]
27
- }), La = (m) => fe.post("querymanagement/execute", m, {
26
+ transformRequest: [(d) => d]
27
+ }), Fa = (m) => ye.post("querymanagement/execute", m, {
28
28
  headers: { "Content-Type": "application/json" },
29
- transformRequest: [(l) => l]
30
- }), qe = ({ children: m, loading: l }) => !ge(Ie) || !l ? m : /* @__PURE__ */ t("div", { className: "flex flex-col space-y-4 h-[100vh] pt-3 relative w-full", children: [
29
+ transformRequest: [(d) => d]
30
+ }), He = ({ children: m, loading: d }) => !he(We) || !d ? m : /* @__PURE__ */ t("div", { className: "flex flex-col space-y-4 h-[100vh] pt-3 relative w-full", children: [
31
31
  /* @__PURE__ */ t("div", { className: " flex flex-row space-x-2 overflow-auto", children: [
32
32
  /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-[100%] h-[50px] " }),
33
33
  /* @__PURE__ */ e("div", { className: "bg-gray-300 animate-pulse rounded-sm w-[100%] h-[50px] mx-[10px]" })
@@ -44,11 +44,11 @@ import './QueryManagement.css';const Oa = (m) => fe.post("resource/getdatawithti
44
44
  ] })
45
45
  ] })
46
46
  ] });
47
- qe.propTypes = {
48
- children: Te.any,
49
- loading: Te.any
47
+ He.propTypes = {
48
+ children: De.any,
49
+ loading: De.any
50
50
  };
51
- const za = [
51
+ const Qa = [
52
52
  {
53
53
  category: "Performance & Space",
54
54
  name: "Table Disk Usage Breakdown",
@@ -103,7 +103,7 @@ ORDER BY seq_scan DESC;`
103
103
  category: "Index Health",
104
104
  name: "Duplicate & Redundant Indexes",
105
105
  description: "Finds index keys pointing to the same table column combination—wasting memory buffers and slowing down mutations.",
106
- code: `SELECT
106
+ code: `SELECT
107
107
  indrelid::regclass AS table_name,
108
108
  amname AS access_method,
109
109
  indkey::text AS stringified_keys,
@@ -163,10 +163,10 @@ FROM pg_database
163
163
  WHERE datallowconn = true
164
164
  ORDER BY current_tx_age DESC;`
165
165
  }
166
- ], Le = { pagination: !1 }, ze = { tableStyle: { maxHeight: "55vh", borderRadius: "8px" } }, Ia = {
166
+ ], Fe = { pagination: !1 }, Qe = { tableStyle: { maxHeight: "55vh", borderRadius: "8px" } }, Wa = {
167
167
  pagination: !1,
168
168
  paginationType: "virtual-scroll"
169
- }, qa = { tableStyle: { maxHeight: "62vh", borderRadius: "8px" } }, xe = {
169
+ }, Ha = { tableStyle: { maxHeight: "62vh", borderRadius: "8px" } }, fe = {
170
170
  position: "absolute",
171
171
  top: "50%",
172
172
  left: "50%",
@@ -179,44 +179,44 @@ ORDER BY current_tx_age DESC;`
179
179
  borderRadius: "16px",
180
180
  outline: "none",
181
181
  border: "1px solid rgba(0, 0, 0, 0.05)"
182
- }, Me = (m) => {
182
+ }, Be = (m) => {
183
183
  if (!m) return 0;
184
- const l = m.match(/actual\s+time=[\d.]+\.\.([\d.]+)/);
185
- if (l && l[1]) return parseFloat(l[1]);
186
- const N = m.match(/cost=[\d.]+\.\.([\d.]+)/);
187
- return N && N[1] ? parseFloat(N[1]) : 0;
188
- }, Ma = ({ rawTextLine: m, totalPlanMetric: l }) => {
184
+ const d = m.match(/actual\s+time=[\d.]+\.\.([\d.]+)/);
185
+ if (d && d[1]) return parseFloat(d[1]);
186
+ const w = m.match(/cost=[\d.]+\.\.([\d.]+)/);
187
+ return w && w[1] ? parseFloat(w[1]) : 0;
188
+ }, Ba = ({ rawTextLine: m, totalPlanMetric: d }) => {
189
189
  if (!m || !m.trim()) return null;
190
- const N = m.search(/\S/), z = N > 0 ? Math.floor(N / 2) : 0, R = m.trim(), h = R.includes("Seq Scan"), y = R.includes("Index Scan"), S = R.startsWith("->") || z > 0, v = Me(R), I = l > 0 ? Math.round(v / l * 100) : 0, k = I >= 35;
190
+ const w = m.search(/\S/), L = w > 0 ? Math.floor(w / 2) : 0, D = m.trim(), g = D.includes("Seq Scan"), y = D.includes("Index Scan"), C = D.startsWith("->") || L > 0, E = Be(D), I = d > 0 ? Math.round(E / d * 100) : 0, O = I >= 35;
191
191
  return /* @__PURE__ */ t(
192
- s,
192
+ r,
193
193
  {
194
194
  className: "flex items-center justify-between gap-4 py-2 px-3 my-1 rounded-lg border transition-all hover:bg-slate-100/80",
195
195
  sx: {
196
- marginLeft: `${z * 24}px`,
197
- backgroundColor: k ? "#fff5f5" : h ? "#fef2f2" : y ? "#f0fdf4" : "#ffffff",
198
- borderColor: k ? "#fecaca" : h ? "#fca5a5" : y ? "#bbf7d0" : "#e2e8f0",
199
- borderLeft: k ? "5px solid #dc2626" : h ? "5px solid #ef4444" : y ? "5px solid #22c55e" : "1px solid #e2e8f0"
196
+ marginLeft: `${L * 24}px`,
197
+ backgroundColor: O ? "#fff5f5" : g ? "#fef2f2" : y ? "#f0fdf4" : "#ffffff",
198
+ borderColor: O ? "#fecaca" : g ? "#fca5a5" : y ? "#bbf7d0" : "#e2e8f0",
199
+ borderLeft: O ? "5px solid #dc2626" : g ? "5px solid #ef4444" : y ? "5px solid #22c55e" : "1px solid #e2e8f0"
200
200
  },
201
201
  children: [
202
- /* @__PURE__ */ t(s, { className: "flex items-center gap-2 overflow-hidden flex-grow", children: [
203
- S && /* @__PURE__ */ e("span", { className: "text-gray-400 font-bold select-none", children: "↳" }),
202
+ /* @__PURE__ */ t(r, { className: "flex items-center gap-2 overflow-hidden flex-grow", children: [
203
+ C && /* @__PURE__ */ e("span", { className: "text-gray-400 font-bold select-none", children: "↳" }),
204
204
  /* @__PURE__ */ e(
205
205
  x,
206
206
  {
207
207
  variant: "body2",
208
208
  className: "font-mono text-slate-700 font-medium break-all whitespace-pre-wrap",
209
- sx: { color: k || h ? "#991b1b" : y ? "#166534" : "#334155" },
210
- children: R
209
+ sx: { color: O || g ? "#991b1b" : y ? "#166534" : "#334155" },
210
+ children: D
211
211
  }
212
212
  )
213
213
  ] }),
214
- v > 0 && /* @__PURE__ */ e(s, { className: "flex items-center gap-1.5 shrink-0", children: /* @__PURE__ */ e(
215
- X,
214
+ E > 0 && /* @__PURE__ */ e(r, { className: "flex items-center gap-1.5 shrink-0", children: /* @__PURE__ */ e(
215
+ W,
216
216
  {
217
217
  label: `${I}% cost`,
218
218
  size: "small",
219
- color: k ? "error" : I > 15 ? "warning" : "default",
219
+ color: O ? "error" : I > 15 ? "warning" : "default",
220
220
  sx: {
221
221
  fontSize: "11px",
222
222
  fontWeight: "700",
@@ -228,10 +228,10 @@ ORDER BY current_tx_age DESC;`
228
228
  ]
229
229
  }
230
230
  );
231
- }, it = () => {
232
- const m = ge(Ie), [l, N] = c({}), [z, R] = c(null), [h, y] = c(""), [S, v] = c(0), [I, k] = c([]), [w, W] = c([]), [Fe, Qe] = c(!1), { user: H } = ge((a) => a.Authenticate), [B, C] = c(0), [E, P] = c(""), [We, j] = c(!1), [He, $] = c(!1), [q, Be] = c([]), [Pe, he] = c([]), [je, $e] = c([]), [Ue, Ye] = c([]), U = w.length || null, [Y, Ke] = c([]), D = "select pid,datname,state,wait_event_type,cast(now() - query_start as text) as query_age,cast(now() - state_change as text) as state_age,query from pg_stat_activity where state in ('active','idle in transaction') order by query_age;", ye = `select pg_terminate_backend( ${z} )`, Z = "select cast(pid as text) as pid, cast(usename as text) as usename, cast(pg_blocking_pids(pid) as text) as blocked_by, datname as Database_Name,cast(query as text) as blocked_query from pg_stat_activity where cardinality(pg_blocking_pids(pid)) > 0", be = "select * from caught_exception where username = (select user_name from um_user where id = " + H.id + ") order by id desc limit 100", { translate: d } = va(), [_e, ee] = c(!1), [Je, f] = c(!1), [Ve, ae] = c(!1), [te, M] = c(!0), [Ge, K] = c(!1), [Xe, re] = c(!1), se = async (a, n = null) => {
233
- let r;
234
- n === "index" ? r = "SELECT * FROM pg_indexes WHERE tablename = '" + a.tablename + "' limit 100" : n === "ddl" ? r = `WITH table_columns AS (
231
+ }, ut = () => {
232
+ const m = he(We), [d, w] = c({}), [L, D] = c(null), [g, y] = c(""), [C, E] = c(0), [I, O] = c([]), [S, H] = c([]), [Pe, je] = c(!1), { user: B } = he((a) => a.Authenticate), [P, T] = c(0), [R, j] = c(""), [$e, $] = c(!1), [Ue, U] = c(!1), [q, Ye] = c([]), [Ke, be] = c([]), [Je, Ve] = c([]), [_e, Ge] = c([]), Y = S.length || null, [K, Xe] = c([]), [Ne, we] = c(null), z = "select pid,datname,state,wait_event_type,cast(now() - query_start as text) as query_age,cast(now() - state_change as text) as state_age,query from pg_stat_activity where state in ('active','idle in transaction') order by query_age desc;", Se = `select pg_terminate_backend( ${L} )`, Z = "select cast(pid as text) as pid, cast(usename as text) as usename, cast(pg_blocking_pids(pid) as text) as blocked_by, datname as Database_Name,cast(query as text) as blocked_query from pg_stat_activity where cardinality(pg_blocking_pids(pid)) > 0", ve = "select * from caught_exception where username = (select user_name from um_user where id = " + B.id + ") order by id desc limit 100", { translate: i } = Ra(), [Ce, ee] = c(!1), [Ze, f] = c(!1), [ea, ae] = c(!1), [te, M] = c(!0), [aa, J] = c(!1), [ta, re] = c(!1), ne = async (a, s = null) => {
233
+ let n;
234
+ s === "index" ? n = "SELECT * FROM pg_indexes WHERE tablename = '" + a.tablename + "' limit 100" : s === "ddl" ? n = `WITH table_columns AS (
235
235
  SELECT c.relname AS table_name, a.attname AS column_name, pg_catalog.format_type(a.atttypid, a.atttypmod) AS column_type,
236
236
  CASE WHEN a.attnotnull THEN 'not null' ELSE 'null' END AS column_constraint
237
237
  FROM pg_class c JOIN pg_attribute a ON a.attrelid = c.oid JOIN pg_type t ON a.atttypid = t.oid
@@ -242,54 +242,54 @@ ORDER BY current_tx_age DESC;`
242
242
  WHERE t.relname = '${a.tablename}'
243
243
  )
244
244
  SELECT 'CREATE TABLE ' || tc.table_name || E'\\n(\\n' || array_to_string(array_agg(DISTINCT ' ' || tc.column_name || ' ' || tc.column_type || ' ' || tc.column_constraint), E',\\n') || E'\\n);\\n' || COALESCE(string_agg(DISTINCT ti.index_def, E'\\n'), '') AS ddl
245
- FROM table_columns tc LEFT JOIN table_indexes ti ON tc.table_name = ti.table_name GROUP BY tc.table_name;` : r = `select * from ${a.tablename} limit 100`, y(r), j(!1), C(0), T(r);
246
- }, Ze = async (a) => {
247
- y(a.query), J("query", a.query), M(!(a.query && a.query.trim().length > 0)), $(!1), C(0);
248
- }, ea = [
245
+ FROM table_columns tc LEFT JOIN table_indexes ti ON tc.table_name = ti.table_name GROUP BY tc.table_name;` : n = `select * from ${a.tablename} limit 100`, y(n), $(!1), T(0), v(n);
246
+ }, ra = async (a) => {
247
+ y(a.query), V("query", a.query), M(!(a.query && a.query.trim().length > 0)), U(!1), T(0);
248
+ }, na = [
249
249
  { field: "Sr. No.", label: "#", align: "left" },
250
250
  { field: "size_pretty", label: "Size", align: "left" },
251
- { field: "tablename", label: "Table Name", align: "left", onClick: se },
251
+ { field: "tablename", label: "Table Name", align: "left", onClick: ne },
252
252
  {
253
253
  field: "Action",
254
254
  label: "Action",
255
255
  align: "center",
256
- render: (a) => /* @__PURE__ */ e(p, { variant: "outlined", color: "primary", size: "small", sx: { borderRadius: "6px", textTransform: "none" }, onClick: () => se(a, "index"), children: d("Index") })
256
+ render: (a) => /* @__PURE__ */ e(p, { variant: "outlined", color: "primary", size: "small", sx: { borderRadius: "6px", textTransform: "none" }, onClick: () => ne(a, "index"), children: i("Index") })
257
257
  },
258
258
  {
259
259
  field: "DDL",
260
260
  label: "DDL",
261
261
  align: "center",
262
- render: (a) => /* @__PURE__ */ e(p, { variant: "outlined", color: "secondary", size: "small", sx: { borderRadius: "6px", textTransform: "none" }, onClick: () => se(a, "ddl"), children: d("DDL") })
262
+ render: (a) => /* @__PURE__ */ e(p, { variant: "outlined", color: "secondary", size: "small", sx: { borderRadius: "6px", textTransform: "none" }, onClick: () => ne(a, "ddl"), children: i("DDL") })
263
263
  }
264
- ], aa = [
264
+ ], sa = [
265
265
  { field: "Sr. No.", label: "#", align: "left" },
266
- { field: "query", label: "Query", align: "left", onClick: Ze },
266
+ { field: "query", label: "Query", align: "left", onClick: ra },
267
267
  { field: "created_on", label: "Executed On", align: "left" }
268
- ], { control: Ne, setValue: J, getValues: A, formState: { errors: Fa } } = _a({
268
+ ], { control: se, setValue: V, getValues: k, formState: { errors: Pa } } = va({
269
269
  mode: "onChange",
270
270
  defaultValues: { excelFileName: "" }
271
271
  });
272
- le(() => {
273
- he(q);
274
- }, [q]), le(() => {
275
- (h == null ? void 0 : h.length) > 0 ? (M(!1), J("query", h)) : M(!0);
276
- }, [h]);
277
- const we = Na(), T = async (a, n = []) => {
272
+ ie(() => {
273
+ be(q);
274
+ }, [q]), ie(() => {
275
+ (g == null ? void 0 : g.length) > 0 ? (M(!1), V("query", g)) : M(!0);
276
+ }, [g]);
277
+ const Ee = Ca(), v = async (a, s = []) => {
278
278
  try {
279
279
  if (!a) {
280
280
  u({ message: "Query can not be empty", type: "error" });
281
281
  return;
282
282
  }
283
- f(!0), P("");
284
- const { data: r } = await Oe(a).catch((g) => {
285
- W([]), f(!1), u({ message: `${g.response.data.message}`, type: "error" });
286
- });
287
- if (r && !r.length) {
288
- W([]), u({ message: "No data found", type: "info" }), f(!1);
283
+ f(!0), j("");
284
+ const n = performance.now(), { data: o } = await Me(a).catch((h) => {
285
+ H([]), f(!1), we(null), u({ message: `${h.response.data.message}`, type: "error" });
286
+ }), b = performance.now();
287
+ if (we((b - n).toFixed(0)), o && !o.length) {
288
+ H([]), u({ message: "No data found", type: "info" }), f(!1);
289
289
  return;
290
290
  }
291
- if (r != null && r.length && a !== D && u({ message: "Query Executed Successfully", type: "success" }), a === D)
292
- n = [
291
+ if (o != null && o.length && a !== z && u({ message: "Query Executed Successfully", type: "success" }), a === z)
292
+ s = [
293
293
  {
294
294
  label: "KILL PROCESS",
295
295
  icon: /* @__PURE__ */ e(
@@ -304,178 +304,181 @@ ORDER BY current_tx_age DESC;`
304
304
  fontSize: "11px",
305
305
  minWidth: "auto"
306
306
  },
307
- children: d("Kill Query")
307
+ children: i("Kill Query")
308
308
  }
309
309
  ),
310
- onClick: na
310
+ onClick: ia
311
311
  }
312
312
  ];
313
- else if (a === ye) {
314
- r != null && r.length && u({ message: "Terminated Successfully", type: "success" }), W([]);
313
+ else if (a === Se) {
314
+ o != null && o.length && u({ message: "Terminated Successfully", type: "success" }), H([]);
315
315
  return;
316
316
  }
317
- W(r.map((g, _) => ({ index: _ + 1, ...g })));
318
- const i = Object.keys(r[0]);
319
- (n.length || a === D) && i.push("Actions");
320
- const b = i.map((g) => ({ field: g, label: g, align: "left" }));
321
- Ye(n), k([{ field: "index", label: "#", align: "left" }, ...b]), ne(), f(!1), C(1);
317
+ H(o.map((h, A) => ({ index: A + 1, ...h })));
318
+ const N = Object.keys(o[0]);
319
+ (s.length || a === z) && N.push("Actions");
320
+ const _ = N.map((h) => ({ field: h, label: h, align: "left" }));
321
+ Ge(s), O([{ field: "index", label: "#", align: "left" }, ..._]), oe(), f(!1), T(1);
322
322
  } catch {
323
323
  f(!1);
324
324
  }
325
- }, ta = async () => {
326
- const a = A("query");
325
+ }, oa = async () => {
326
+ const a = k("query");
327
327
  if (!a) {
328
328
  u({ message: "Query can not be empty", type: "error" });
329
329
  return;
330
330
  }
331
- const r = `EXPLAIN ${a.trim().replace(/;+$/, "")};`;
331
+ const n = `EXPLAIN ${a.trim().replace(/;+$/, "")};`;
332
332
  try {
333
333
  f(!0);
334
- const { data: i } = await Oe(r).catch((b) => {
335
- var g, _;
336
- f(!1), u({ message: `${((_ = (g = b.response) == null ? void 0 : g.data) == null ? void 0 : _.message) || "Explain failed"}`, type: "error" });
334
+ const { data: o } = await Me(n).catch((b) => {
335
+ var N, _;
336
+ f(!1), u({ message: `${((_ = (N = b.response) == null ? void 0 : N.data) == null ? void 0 : _.message) || "Explain failed"}`, type: "error" });
337
337
  });
338
- if (i && i.length > 0) {
339
- const b = Object.keys(i[0])[0], g = i.map((_) => _[b]);
340
- Ke(g), u({ message: "Explain Plan Calculated", type: "success" }), C(2);
338
+ if (o && o.length > 0) {
339
+ const b = Object.keys(o[0])[0], N = o.map((_) => _[b]);
340
+ Xe(N), u({ message: "Explain Plan Calculated", type: "success" }), T(2);
341
341
  } else
342
342
  u({ message: "No data returned from execution plan", type: "info" });
343
343
  f(!1);
344
- } catch (i) {
345
- f(!1), console.error(i);
344
+ } catch (o) {
345
+ f(!1), console.error(o);
346
346
  }
347
- }, Se = async (a) => {
347
+ }, Te = async (a) => {
348
348
  try {
349
349
  if (!a) {
350
350
  u({ message: "Query can not be empty", type: "error" });
351
351
  return;
352
352
  }
353
- const { data: n } = await La(a).catch((r) => {
354
- u({ message: `${r.response.data.message}`, type: "error" });
353
+ const { data: s } = await Fa(a).catch((n) => {
354
+ u({ message: `${n.response.data.message}`, type: "error" });
355
355
  });
356
- n.length || u({ message: "No data found", type: "info" }), n.length && u({ message: "Query updated successfully", type: "success" });
357
- } catch (n) {
358
- console.error(n);
356
+ s.length || u({ message: "No data found", type: "info" }), s.length && u({ message: "Query updated successfully", type: "success" });
357
+ } catch (s) {
358
+ console.error(s);
359
359
  }
360
- }, ra = async () => {
361
- const a = "d91d249f-c8e1-4397-a84d-6ce6eb33eb48", n = A("query"), r = A("excelFileName");
362
- if (!n) {
360
+ }, Re = async () => {
361
+ const a = "d91d249f-c8e1-4397-a84d-6ce6eb33eb48", s = k("query"), n = k("excelFileName");
362
+ if (!s) {
363
363
  u({ message: "Query can not be empty", type: "info" });
364
364
  return;
365
365
  }
366
366
  try {
367
367
  f(!0);
368
- const b = await ha(a, { paramObj: { query: n } }).catch((O) => (u({ message: "Operation Unsuccessful, Something went wrong", type: "error" }), null));
368
+ const b = await Na(a, { paramObj: { query: s } }).catch((h) => (u({ message: "Operation Unsuccessful, Something went wrong", type: "error" }), null));
369
369
  if (!b) {
370
370
  f(!1);
371
371
  return;
372
372
  }
373
- const g = new Blob([b.data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), _ = `${r || "rename"}_${(/* @__PURE__ */ new Date()).getTime()}.xlsx`;
373
+ const N = new Blob([b.data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), _ = `${n || "rename"}_${(/* @__PURE__ */ new Date()).getTime()}.xlsx`;
374
374
  if (navigator.msSaveBlob) {
375
- const O = new Blob([b.data], { type: "" });
376
- return we("file_download", { file_type: "xlsx", file_name: _, file_size: `${(O.size / 1024).toFixed(2)} KB`, download_status: "success" }), navigator.msSaveBlob(O, _);
375
+ const h = new Blob([b.data], { type: "" });
376
+ return Ee("file_download", { file_type: "xlsx", file_name: _, file_size: `${(h.size / 1024).toFixed(2)} KB`, download_status: "success" }), navigator.msSaveBlob(h, _);
377
377
  } else {
378
- const O = URL.createObjectURL(g), L = document.createElement("a");
379
- L.href = O, L.download = _, L.style.display = "none", document.body.appendChild(L), L.click(), we("file_download", { file_type: "xlsx", file_name: _, file_size: `${(g.size / 1024).toFixed(2)} KB`, download_status: "success" }), URL.revokeObjectURL(O), L.remove();
378
+ const h = URL.createObjectURL(N), A = document.createElement("a");
379
+ A.href = h, A.download = _, A.style.display = "none", document.body.appendChild(A), A.click(), Ee("file_download", { file_type: "xlsx", file_name: _, file_size: `${(N.size / 1024).toFixed(2)} KB`, download_status: "success" }), URL.revokeObjectURL(h), A.remove();
380
380
  }
381
381
  f(!1);
382
382
  } catch {
383
383
  f(!1), u({ type: "error", message: "Something went wrong!" });
384
384
  }
385
- }, sa = async () => {
385
+ }, la = async () => {
386
386
  try {
387
- Qe(!0), y(Z), await T(Z);
387
+ je(!0), y(Z), await v(Z);
388
388
  } catch (a) {
389
389
  console.error(a);
390
390
  }
391
- }, na = async (a) => {
392
- v(3), R(a.pid);
393
- }, oa = async () => {
391
+ }, ia = async (a) => {
392
+ E(3), D(a.pid);
393
+ }, ca = async () => {
394
394
  try {
395
- await T(ye), await T(Fe ? Z : D);
395
+ await v(Se), await v(Pe ? Z : z);
396
396
  } catch (a) {
397
397
  console.error(a);
398
398
  }
399
- }, la = async () => {
399
+ }, da = async () => {
400
400
  try {
401
- y(D), await T(D);
401
+ y(z), await v(z);
402
402
  } catch (a) {
403
403
  console.error(a);
404
404
  }
405
- }, ne = async () => {
405
+ }, oe = async () => {
406
406
  try {
407
- const a = A("queryHistorySearchKey"), { data: n } = await ya({
407
+ const a = k("queryHistorySearchKey"), { data: s } = await wa({
408
408
  code: "retrieve_limited_query_history",
409
- parameters: { userId: H == null ? void 0 : H.id, limit: 100, searchKey: a }
409
+ parameters: { userId: B == null ? void 0 : B.id, limit: 100, searchKey: a }
410
410
  });
411
- $e(
412
- n.result.map((r, i) => ({
413
- index: i + 1,
414
- ...r,
415
- created_on: Sa(r.created_on).format("DD-MM-YYYY h:mm:ss A")
411
+ Ve(
412
+ s.result.map((n, o) => ({
413
+ index: o + 1,
414
+ ...n,
415
+ created_on: Ta(n.created_on).format("DD-MM-YYYY h:mm:ss A")
416
416
  }))
417
417
  );
418
418
  } catch (a) {
419
419
  console.error(a);
420
420
  }
421
- }, ia = async () => {
421
+ }, ma = async () => {
422
422
  try {
423
423
  ee(!0);
424
- const { data: a } = await ba("techo.querymanagement");
425
- a && N(JSON.parse(a)), await ne(), ee(!1);
424
+ const { data: a } = await Sa("techo.querymanagement");
425
+ a && w(JSON.parse(a)), await oe(), ee(!1);
426
426
  } catch {
427
427
  ee(!1);
428
428
  }
429
429
  };
430
- le(() => {
431
- ia();
430
+ ie(() => {
431
+ ma();
432
432
  }, []);
433
- const ca = async () => {
434
- j(!0), q.length || await ma();
435
- }, da = () => {
436
- K(!0);
437
- }, ma = async () => {
433
+ const pa = async () => {
434
+ $(!0), q.length || await xa();
435
+ }, ua = () => {
436
+ J(!0);
437
+ }, xa = async () => {
438
438
  try {
439
439
  ae(!0);
440
- const { data: a } = await Oa({ code: "retrieve_all_tables" });
441
- Be(a.result.map((n, r) => ({ index: r + 1, ...n }))), ae(!1);
440
+ const { data: a } = await Ma({ code: "retrieve_all_tables" });
441
+ Ye(a.result.map((s, n) => ({ index: n + 1, ...s }))), ae(!1);
442
442
  } catch {
443
443
  ae(!1);
444
444
  }
445
- }, pa = (a) => {
446
- ua(a.target.value);
447
- }, ua = ve(
448
- () => Aa((a) => {
449
- const n = a.toLowerCase();
450
- he(q.filter((r) => {
451
- var i;
452
- return (i = r == null ? void 0 : r.tablename) == null ? void 0 : i.toLowerCase().includes(n);
445
+ }, ga = (a) => {
446
+ fa(a.target.value);
447
+ }, fa = ke(
448
+ () => Ia((a) => {
449
+ const s = a.toLowerCase();
450
+ be(q.filter((n) => {
451
+ var o;
452
+ return (o = n == null ? void 0 : n.tablename) == null ? void 0 : o.toLowerCase().includes(s);
453
453
  }));
454
454
  }, 300),
455
455
  [q]
456
- ), oe = ve(() => {
457
- if (!E) return w;
458
- const a = E.toLowerCase().trim();
459
- return w.filter((n) => Object.entries(n).some(([r, i]) => r === "index" || r === "Actions" ? !1 : String(i ?? "").toLowerCase().includes(a)));
460
- }, [w, E]), xa = async () => {
456
+ ), le = ke(() => {
457
+ if (!R) return S;
458
+ const a = R.toLowerCase().trim();
459
+ return S.filter((s) => Object.entries(s).some(([n, o]) => n === "index" || n === "Actions" ? !1 : String(o ?? "").toLowerCase().includes(a)));
460
+ }, [S, R]), ha = async () => {
461
+ const a = k("query") || g;
462
+ a ? await v(a, _e) : u({ message: "No context query found to refresh", type: "warning" });
463
+ }, ya = async () => {
461
464
  try {
462
- y(be), await T(be);
465
+ y(ve), await v(ve);
463
466
  } catch (a) {
464
467
  console.error(a);
465
468
  }
466
469
  };
467
- return de.isTecho && !_e && !(l != null && l["view.manage.querymanagement.retrieve"]) ? /* @__PURE__ */ e(s, { className: "flex justify-center items-center w-full h-[80vh]", children: /* @__PURE__ */ t(F, { className: "p-8 max-w-md text-center shadow-2xl border border-gray-100 rounded-2xl bg-white", children: [
470
+ return me.isTecho && !Ce && !(d != null && d["view.manage.querymanagement.retrieve"]) ? /* @__PURE__ */ e(r, { className: "flex justify-center items-center w-full h-[80vh]", children: /* @__PURE__ */ t(F, { className: "p-8 max-w-md text-center shadow-2xl border border-gray-100 rounded-2xl bg-white", children: [
468
471
  /* @__PURE__ */ e(x, { variant: "h5", color: "error", fontWeight: "700", letterSpacing: "-0.5px", children: "Access Denied" }),
469
472
  /* @__PURE__ */ e(x, { variant: "body2", className: "text-gray-400 mt-2", children: "You don't have permission to view Query Management Tool" })
470
- ] }) }) : /* @__PURE__ */ t(qe, { loading: _e, children: [
471
- Je && m && /* @__PURE__ */ e("div", { className: "loader-overlay", children: /* @__PURE__ */ e("div", { className: "loader-spinner" }) }),
472
- /* @__PURE__ */ t(s, { className: "w-full flex flex-col gap-4 mt-2 p-3 min-h-[85vh] bg-[#fdfeff]", children: [
473
+ ] }) }) : /* @__PURE__ */ t(He, { loading: Ce, children: [
474
+ Ze && m && /* @__PURE__ */ e("div", { className: "loader-overlay", children: /* @__PURE__ */ e("div", { className: "loader-spinner" }) }),
475
+ /* @__PURE__ */ t(r, { className: "w-full flex flex-col gap-4 mt-2 p-3 min-h-[85vh] bg-[#fdfeff]", children: [
473
476
  /* @__PURE__ */ t(F, { className: "px-4 py-2.5 shadow-sm border border-gray-200/70 rounded-xl bg-white flex flex-wrap items-center justify-between gap-4", children: [
474
477
  /* @__PURE__ */ t(
475
- ga,
478
+ ba,
476
479
  {
477
- value: B,
478
- onChange: (a, n) => C(n),
480
+ value: P,
481
+ onChange: (a, s) => T(s),
479
482
  indicatorColor: "primary",
480
483
  textColor: "primary",
481
484
  sx: {
@@ -484,79 +487,79 @@ ORDER BY current_tx_age DESC;`
484
487
  },
485
488
  children: [
486
489
  /* @__PURE__ */ e(
487
- ie,
490
+ ce,
488
491
  {
489
- label: /* @__PURE__ */ t(s, { className: "flex items-center gap-2", children: [
490
- /* @__PURE__ */ e(o, { icon: Ea, className: "text-xs opacity-80" }),
491
- /* @__PURE__ */ e("span", { children: d("Query Console") })
492
+ label: /* @__PURE__ */ t(r, { className: "flex items-center gap-2", children: [
493
+ /* @__PURE__ */ e(l, { icon: Aa, className: "text-xs opacity-80" }),
494
+ /* @__PURE__ */ e("span", { children: i("Query Console") })
492
495
  ] })
493
496
  }
494
497
  ),
495
498
  /* @__PURE__ */ e(
496
- ie,
499
+ ce,
497
500
  {
498
- label: /* @__PURE__ */ t(s, { className: "flex items-center gap-2", children: [
499
- /* @__PURE__ */ e(o, { icon: Re, className: "text-xs opacity-80" }),
500
- /* @__PURE__ */ e("span", { children: d("Results Layer") }),
501
- !!U && /* @__PURE__ */ e(X, { label: U, size: "small", color: "primary", sx: { height: 18, fontSize: "10px", fontWeight: "bold" } })
501
+ label: /* @__PURE__ */ t(r, { className: "flex items-center gap-2", children: [
502
+ /* @__PURE__ */ e(l, { icon: Oe, className: "text-xs opacity-80" }),
503
+ /* @__PURE__ */ e("span", { children: i("Results Layer") }),
504
+ !!Y && /* @__PURE__ */ e(W, { label: Y, size: "small", color: "primary", sx: { height: 18, fontSize: "10px", fontWeight: "bold" } })
502
505
  ] })
503
506
  }
504
507
  ),
505
508
  /* @__PURE__ */ e(
506
- ie,
509
+ ce,
507
510
  {
508
- label: /* @__PURE__ */ t(s, { className: "flex items-center gap-2", children: [
509
- /* @__PURE__ */ e(o, { icon: pe, className: "text-xs text-indigo-500 opacity-90" }),
510
- /* @__PURE__ */ e("span", { children: d("Query Plan") }),
511
- Y.length > 0 && /* @__PURE__ */ e(X, { label: "Ready", size: "small", color: "info", sx: { height: 18, fontSize: "9px", fontWeight: "bold" } })
511
+ label: /* @__PURE__ */ t(r, { className: "flex items-center gap-2", children: [
512
+ /* @__PURE__ */ e(l, { icon: xe, className: "text-xs text-indigo-500 opacity-90" }),
513
+ /* @__PURE__ */ e("span", { children: i("Query Plan") }),
514
+ K.length > 0 && /* @__PURE__ */ e(W, { label: "Ready", size: "small", color: "info", sx: { height: 18, fontSize: "9px", fontWeight: "bold" } })
512
515
  ] })
513
516
  }
514
517
  )
515
518
  ]
516
519
  }
517
520
  ),
518
- /* @__PURE__ */ t(s, { className: "flex flex-wrap items-center gap-2.5", children: [
519
- /* @__PURE__ */ t(p, { variant: "outlined", color: "inherit", size: "small", onClick: ca, className: "h-[36px] border-gray-300 hover:bg-gray-50 text-gray-700", sx: { textTransform: "none", borderRadius: "8px", fontWeight: 500 }, children: [
520
- /* @__PURE__ */ e(o, { icon: ue, className: "mr-2 text-blue-500" }),
521
- d("Tables Explorer")
521
+ /* @__PURE__ */ t(r, { className: "flex flex-wrap items-center gap-2.5", children: [
522
+ /* @__PURE__ */ t(p, { variant: "outlined", color: "inherit", size: "small", onClick: pa, className: "h-[36px] border-gray-300 hover:bg-gray-50 text-gray-700", sx: { textTransform: "none", borderRadius: "8px", fontWeight: 500 }, children: [
523
+ /* @__PURE__ */ e(l, { icon: ge, className: "mr-2 text-blue-500" }),
524
+ i("Tables Explorer")
522
525
  ] }),
523
- /* @__PURE__ */ t(p, { variant: "outlined", color: "inherit", size: "small", onClick: da, className: "h-[36px] border-gray-300 hover:bg-gray-50 text-gray-700", sx: { textTransform: "none", borderRadius: "8px", fontWeight: 500 }, children: [
524
- /* @__PURE__ */ e(o, { icon: ke, className: "mr-2 text-blue-500" }),
525
- d("DBA Toolkit")
526
+ /* @__PURE__ */ t(p, { variant: "outlined", color: "inherit", size: "small", onClick: ua, className: "h-[36px] border-gray-300 hover:bg-gray-50 text-gray-700", sx: { textTransform: "none", borderRadius: "8px", fontWeight: 500 }, children: [
527
+ /* @__PURE__ */ e(l, { icon: ze, className: "mr-2 text-blue-500" }),
528
+ i("DBA Toolkit")
526
529
  ] }),
527
- /* @__PURE__ */ t(p, { variant: "outlined", color: "inherit", size: "small", onClick: () => $(!0), className: "h-[36px] border-gray-300 hover:bg-gray-50 text-gray-700", sx: { textTransform: "none", borderRadius: "8px", fontWeight: 500 }, children: [
528
- /* @__PURE__ */ e(o, { icon: Ae, className: "mr-2 text-purple-500" }),
529
- d("Query History")
530
+ /* @__PURE__ */ t(p, { variant: "outlined", color: "inherit", size: "small", onClick: () => U(!0), className: "h-[36px] border-gray-300 hover:bg-gray-50 text-gray-700", sx: { textTransform: "none", borderRadius: "8px", fontWeight: 500 }, children: [
531
+ /* @__PURE__ */ e(l, { icon: Le, className: "mr-2 text-purple-500" }),
532
+ i("Query History")
530
533
  ] }),
531
- /* @__PURE__ */ e(fa, { orientation: "vertical", flexItem: !0, className: "hidden md:block my-1" }),
532
- /* @__PURE__ */ t(p, { size: "small", color: "secondary", onClick: sa, className: "h-[34px] font-semibold text-xs text-gray-500", sx: { textTransform: "none" }, children: [
533
- /* @__PURE__ */ e(o, { icon: Ta, className: "mr-1 text-amber-500 text-[10px]" }),
534
+ /* @__PURE__ */ e(_a, { orientation: "vertical", flexItem: !0, className: "hidden md:block my-1" }),
535
+ /* @__PURE__ */ t(p, { size: "small", color: "secondary", onClick: la, className: "h-[34px] font-semibold text-xs text-gray-500", sx: { textTransform: "none" }, children: [
536
+ /* @__PURE__ */ e(l, { icon: Da, className: "mr-1 text-amber-500 text-[10px]" }),
534
537
  " ",
535
- d("Locked Queries")
538
+ i("Locked Queries")
536
539
  ] }),
537
- /* @__PURE__ */ t(p, { size: "small", color: "secondary", onClick: la, className: "h-[34px] font-semibold text-xs text-gray-500", sx: { textTransform: "none" }, children: [
538
- /* @__PURE__ */ e(o, { icon: ke, className: "mr-1 text-teal-500 text-[10px]" }),
540
+ /* @__PURE__ */ t(p, { size: "small", color: "secondary", onClick: da, className: "h-[34px] font-semibold text-xs text-gray-500", sx: { textTransform: "none" }, children: [
541
+ /* @__PURE__ */ e(l, { icon: ze, className: "mr-1 text-teal-500 text-[10px]" }),
539
542
  " ",
540
- d("Active Queries")
543
+ i("Active Queries")
541
544
  ] }),
542
- /* @__PURE__ */ t(p, { size: "small", color: "secondary", onClick: xa, className: "h-[34px] font-semibold text-xs text-gray-500", sx: { textTransform: "none" }, children: [
543
- /* @__PURE__ */ e(o, { icon: Q, className: "mr-1 text-teal-500 text-[10px]" }),
545
+ /* @__PURE__ */ t(p, { size: "small", color: "secondary", onClick: ya, className: "h-[34px] font-semibold text-xs text-gray-500", sx: { textTransform: "none" }, children: [
546
+ /* @__PURE__ */ e(l, { icon: Q, className: "mr-1 text-teal-500 text-[10px]" }),
544
547
  " ",
545
- d("Recent Exceptions")
548
+ i("Recent Exceptions")
546
549
  ] })
547
550
  ] })
548
551
  ] }),
549
- /* @__PURE__ */ t(s, { className: "flex-grow flex flex-col", children: [
550
- B === 0 && /* @__PURE__ */ t(F, { className: "p-4 shadow-sm border border-gray-200 rounded-2xl bg-white flex flex-col gap-4 flex-grow min-h-[520px]", children: [
551
- /* @__PURE__ */ e(s, { className: "flex-grow relative rounded-xl overflow-hidden border border-gray-200 shadow-inner bg-[#fffffe] h-[400px]", children: /* @__PURE__ */ e(
552
- Ca,
552
+ /* @__PURE__ */ t(r, { className: "flex-grow flex flex-col", children: [
553
+ P === 0 && /* @__PURE__ */ t(F, { className: "p-4 shadow-sm border border-gray-200 rounded-2xl bg-white flex flex-col gap-4 flex-grow min-h-[520px]", children: [
554
+ /* @__PURE__ */ e(r, { className: "flex-grow relative rounded-xl overflow-hidden border border-gray-200 shadow-inner bg-[#fffffe] h-[400px]", children: /* @__PURE__ */ e(
555
+ ka,
553
556
  {
554
557
  height: "100%",
555
558
  defaultLanguage: "sql",
556
559
  theme: "vs-light",
557
- value: A("query") || "",
560
+ value: k("query") || "",
558
561
  onChange: (a) => {
559
- J("query", a || ""), M(!(a && a.trim().length > 0));
562
+ V("query", a || ""), M(!(a && a.trim().length > 0));
560
563
  },
561
564
  options: {
562
565
  minimap: { enabled: !1 },
@@ -567,7 +570,6 @@ ORDER BY current_tx_age DESC;`
567
570
  scrollBeyondLastLine: !1,
568
571
  readOnly: !1,
569
572
  automaticLayout: !0,
570
- // Auto-resizes if windows or panels move
571
573
  tabSize: 2,
572
574
  suggestOnTriggerCharacters: !0,
573
575
  wordWrap: "on"
@@ -575,14 +577,14 @@ ORDER BY current_tx_age DESC;`
575
577
  loading: /* @__PURE__ */ e("div", { className: "p-4 text-gray-400 font-mono text-xs", children: "Loading IDE Engine..." })
576
578
  }
577
579
  ) }),
578
- /* @__PURE__ */ t(s, { className: "flex flex-wrap items-center justify-between gap-3 pt-3 border-t border-gray-100", children: [
579
- /* @__PURE__ */ t(s, { className: "flex items-center gap-2 bg-gray-50/80 p-1.5 rounded-xl border border-gray-200/60", children: [
580
+ /* @__PURE__ */ t(r, { className: "flex flex-wrap items-center justify-between gap-3 pt-3 border-t border-gray-100", children: [
581
+ /* @__PURE__ */ t(r, { className: "flex items-center gap-2 bg-gray-50/80 p-1.5 rounded-xl border border-gray-200/60", children: [
580
582
  /* @__PURE__ */ e(
581
- Ee,
583
+ pe,
582
584
  {
583
585
  id: "excelFileName",
584
586
  name: "excelFileName",
585
- control: Ne,
587
+ control: se,
586
588
  placeholder: "Export sheet filename...",
587
589
  size: "small",
588
590
  className: "max-w-[220px] bg-white",
@@ -594,7 +596,7 @@ ORDER BY current_tx_age DESC;`
594
596
  {
595
597
  variant: "outlined",
596
598
  color: "inherit",
597
- onClick: ra,
599
+ onClick: Re,
598
600
  className: "border-gray-300 text-gray-700 hover:bg-white",
599
601
  sx: {
600
602
  textTransform: "none",
@@ -610,14 +612,14 @@ ORDER BY current_tx_age DESC;`
610
612
  lineHeight: 1
611
613
  },
612
614
  children: [
613
- /* @__PURE__ */ e(o, { icon: Ra, className: "mr-2 text-gray-400" }),
615
+ /* @__PURE__ */ e(l, { icon: Ie, className: "mr-2 text-gray-400" }),
614
616
  "Spreadsheet"
615
617
  ]
616
618
  }
617
619
  )
618
620
  ] }),
619
- /* @__PURE__ */ t(s, { className: "flex gap-2.5", children: [
620
- (!de.isTecho || (l == null ? void 0 : l["view.manage.querymanagement.execute"])) && /* @__PURE__ */ e(
621
+ /* @__PURE__ */ t(r, { className: "flex gap-2.5", children: [
622
+ (!me.isTecho || (d == null ? void 0 : d["view.manage.querymanagement.execute"])) && /* @__PURE__ */ e(
621
623
  p,
622
624
  {
623
625
  variant: "outlined",
@@ -626,10 +628,10 @@ ORDER BY current_tx_age DESC;`
626
628
  className: "h-[38px]",
627
629
  sx: { textTransform: "none", borderRadius: "8px", fontWeight: 600 },
628
630
  onClick: async () => {
629
- const a = A("query");
630
- y(a), a != null && a.toLowerCase().includes("where") ? await Se(a) : v(2);
631
+ const a = k("query");
632
+ y(a), a != null && a.toLowerCase().includes("where") ? await Te(a) : E(2);
631
633
  },
632
- children: d("Execute Command")
634
+ children: i("Execute Command")
633
635
  }
634
636
  ),
635
637
  /* @__PURE__ */ t(
@@ -639,14 +641,14 @@ ORDER BY current_tx_age DESC;`
639
641
  disabled: te,
640
642
  className: "h-[38px] border-indigo-200 text-indigo-600 hover:bg-indigo-50 disabled:border-gray-200 disabled:text-gray-400",
641
643
  sx: { textTransform: "none", borderRadius: "8px", fontWeight: 600 },
642
- onClick: ta,
644
+ onClick: oa,
643
645
  children: [
644
- /* @__PURE__ */ e(o, { icon: pe, className: "mr-2 text-xs" }),
645
- d("Explain Plan")
646
+ /* @__PURE__ */ e(l, { icon: xe, className: "mr-2 text-xs" }),
647
+ i("Explain Plan")
646
648
  ]
647
649
  }
648
650
  ),
649
- (!de.isTecho || (l == null ? void 0 : l["view.manage.querymanagement.retrieve"])) && /* @__PURE__ */ t(
651
+ (!me.isTecho || (d == null ? void 0 : d["view.manage.querymanagement.retrieve"])) && /* @__PURE__ */ t(
650
652
  p,
651
653
  {
652
654
  variant: "contained",
@@ -655,70 +657,145 @@ ORDER BY current_tx_age DESC;`
655
657
  className: "h-[38px] shadow-sm shadow-green-200",
656
658
  sx: { textTransform: "none", borderRadius: "8px", fontWeight: 600, px: 3 },
657
659
  onClick: async () => {
658
- const a = A("query");
660
+ const a = k("query");
659
661
  y(a);
660
- const n = (a == null ? void 0 : a.toLowerCase().trim()) || "";
661
- if (/\b(drop|truncate|delete|update)\b/.test(n)) {
662
+ const s = (a == null ? void 0 : a.toLowerCase().trim()) || "";
663
+ if (/\b(drop|truncate|delete|update)\b/.test(s)) {
662
664
  re(!0);
663
665
  return;
664
666
  }
665
- const i = n.startsWith("select"), b = n.includes("where");
666
- i && !b ? v(1) : await T(a);
667
+ const o = s.startsWith("select"), b = s.includes("where");
668
+ o && !b ? E(1) : await v(a);
667
669
  },
668
670
  children: [
669
- /* @__PURE__ */ e(o, { icon: ka, className: "mr-2 text-xs" }),
670
- d("Retrieve Data")
671
+ /* @__PURE__ */ e(l, { icon: Oa, className: "mr-2 text-xs" }),
672
+ i("Retrieve Data")
671
673
  ]
672
674
  }
673
675
  )
674
676
  ] })
675
677
  ] })
676
678
  ] }),
677
- B === 1 && /* @__PURE__ */ t(F, { className: "p-4 shadow-sm border border-gray-200 rounded-2xl bg-white flex flex-col flex-grow min-h-[520px]", children: [
678
- /* @__PURE__ */ e(s, { className: "flex flex-wrap items-center justify-between border-b border-gray-100 pb-3 mb-3 gap-3", children: w.length > 0 && /* @__PURE__ */ t(s, { className: "flex items-center gap-3 w-full sm:w-auto", children: [
679
- /* @__PURE__ */ e(
680
- Ce,
681
- {
682
- size: "small",
683
- variant: "outlined",
684
- placeholder: "Filter layout results...",
685
- value: E,
686
- onChange: (a) => P(a.target.value),
687
- sx: {
688
- width: { xs: "100%", sm: "280px" },
689
- "& .MuiOutlinedInput-root": { borderRadius: "10px", height: "36px", backgroundColor: "#fafbfe" }
690
- },
691
- InputProps: {
692
- startAdornment: /* @__PURE__ */ e(ce, { position: "start", children: /* @__PURE__ */ e(o, { icon: De, className: "text-gray-400 text-xs" }) }),
693
- endAdornment: E && /* @__PURE__ */ e(ce, { position: "end", children: /* @__PURE__ */ e(V, { size: "small", onClick: () => P(""), edge: "end", children: /* @__PURE__ */ e(o, { icon: Q, className: "text-[10px]" }) }) })
679
+ P === 1 && /* @__PURE__ */ t(F, { className: "p-4 shadow-sm border border-gray-200 rounded-2xl bg-white flex flex-col flex-grow min-h-[520px]", children: [
680
+ /* @__PURE__ */ e(r, { className: "flex flex-wrap items-center justify-between border-b border-gray-100 pb-3 mb-3 gap-3", children: S.length > 0 && /* @__PURE__ */ t(r, { className: "flex flex-wrap items-center justify-between w-full gap-3", children: [
681
+ /* @__PURE__ */ t(r, { className: "flex items-center gap-3 w-full sm:w-auto", children: [
682
+ /* @__PURE__ */ e(
683
+ Ae,
684
+ {
685
+ size: "small",
686
+ variant: "outlined",
687
+ placeholder: "Filter layout results...",
688
+ value: R,
689
+ onChange: (a) => j(a.target.value),
690
+ sx: {
691
+ width: { xs: "100%", sm: "280px" },
692
+ "& .MuiOutlinedInput-root": { borderRadius: "10px", height: "36px", backgroundColor: "#fafbfe" }
693
+ },
694
+ InputProps: {
695
+ startAdornment: /* @__PURE__ */ e(de, { position: "start", children: /* @__PURE__ */ e(l, { icon: qe, className: "text-gray-400 text-xs" }) }),
696
+ endAdornment: R && /* @__PURE__ */ e(de, { position: "end", children: /* @__PURE__ */ e(G, { size: "small", onClick: () => j(""), edge: "end", children: /* @__PURE__ */ e(l, { icon: Q, className: "text-[10px]" }) }) })
697
+ }
694
698
  }
695
- }
696
- ),
697
- /* @__PURE__ */ e(
698
- X,
699
- {
700
- label: E ? `${d("Matches")}: ${oe.length} / ${U}` : `${d("Records Loaded")}: ${U}`,
701
- size: "medium",
702
- color: E ? "primary" : "success",
703
- variant: E ? "outlined" : "filled",
704
- sx: { borderRadius: "8px", fontWeight: "600", fontSize: "12px", height: "34px" }
705
- }
706
- )
699
+ ),
700
+ /* @__PURE__ */ e(
701
+ W,
702
+ {
703
+ label: R ? `${i("Matches")}: ${le.length} / ${Y}` : `${i("Records Loaded")}: ${Y}`,
704
+ size: "medium",
705
+ color: R ? "primary" : "success",
706
+ variant: R ? "outlined" : "filled",
707
+ sx: { borderRadius: "8px", fontWeight: "600", fontSize: "12px", height: "34px" }
708
+ }
709
+ ),
710
+ Ne && /* @__PURE__ */ e(
711
+ W,
712
+ {
713
+ icon: /* @__PURE__ */ e(l, { icon: za, style: { fontSize: "11px", color: "#475569" } }),
714
+ label: `${Ne} ms`,
715
+ variant: "outlined",
716
+ sx: {
717
+ borderRadius: "8px",
718
+ fontWeight: "500",
719
+ fontSize: "12px",
720
+ height: "34px",
721
+ backgroundColor: "#f1f5f9",
722
+ borderColor: "#e2e8f0"
723
+ }
724
+ }
725
+ )
726
+ ] }),
727
+ /* @__PURE__ */ t(r, { className: "flex flex-wrap items-center gap-2.5 ml-auto", children: [
728
+ /* @__PURE__ */ t(
729
+ p,
730
+ {
731
+ variant: "outlined",
732
+ color: "inherit",
733
+ size: "small",
734
+ onClick: ha,
735
+ className: "h-[36px] border-gray-300 hover:bg-gray-50 text-gray-700",
736
+ sx: { textTransform: "none", borderRadius: "8px", fontWeight: 500 },
737
+ children: [
738
+ /* @__PURE__ */ e(l, { icon: La, className: "mr-2 text-teal-600" }),
739
+ i("Refresh")
740
+ ]
741
+ }
742
+ ),
743
+ /* @__PURE__ */ t(r, { className: "flex items-center gap-2 bg-gray-50/80 p-1.5 rounded-xl border border-gray-200/60", children: [
744
+ /* @__PURE__ */ e(
745
+ pe,
746
+ {
747
+ id: "excelFileName",
748
+ name: "excelFileName",
749
+ control: se,
750
+ placeholder: "Export sheet filename...",
751
+ size: "small",
752
+ className: "max-w-[220px] bg-white",
753
+ sx: { "& .MuiOutlinedInput-root": { borderRadius: "8px", height: "36px" } }
754
+ }
755
+ ),
756
+ /* @__PURE__ */ t(
757
+ p,
758
+ {
759
+ variant: "outlined",
760
+ color: "inherit",
761
+ onClick: Re,
762
+ className: "border-gray-300 text-gray-700 hover:bg-white",
763
+ sx: {
764
+ textTransform: "none",
765
+ borderRadius: "8px",
766
+ height: "36px",
767
+ minWidth: "max-content",
768
+ display: "inline-flex",
769
+ alignItems: "center",
770
+ justifyContent: "center",
771
+ px: 2,
772
+ py: 0,
773
+ fontSize: "0.875rem",
774
+ lineHeight: 1
775
+ },
776
+ children: [
777
+ /* @__PURE__ */ e(l, { icon: Ie, className: "mr-2 text-blue-600" }),
778
+ i("Spreadsheet")
779
+ ]
780
+ }
781
+ )
782
+ ] })
783
+ ] })
707
784
  ] }) }),
708
- oe.length ? /* @__PURE__ */ e(s, { className: "w-full overflow-x-auto flex-grow border border-gray-150 rounded-xl", children: /* @__PURE__ */ e(
709
- me,
785
+ le.length ? /* @__PURE__ */ e(r, { className: "w-full overflow-x-auto flex-grow border border-gray-150 rounded-xl", children: /* @__PURE__ */ e(
786
+ ue,
710
787
  {
711
788
  className: "min-w-[600px]",
712
789
  columns: I,
713
- actions: Ue,
714
- tableData: oe,
715
- paginationConfig: Ia,
716
- styleConfig: qa
790
+ actions: _e,
791
+ tableData: le,
792
+ paginationConfig: Wa,
793
+ styleConfig: Ha
717
794
  }
718
- ) }) : /* @__PURE__ */ t(s, { className: "flex flex-col items-center justify-center flex-grow py-24 text-gray-400 bg-gray-50/50 rounded-xl border border-dashed border-gray-200", children: [
719
- /* @__PURE__ */ e(o, { icon: Re, size: "2x", className: "mb-3 text-gray-300" }),
720
- /* @__PURE__ */ e(x, { variant: "body2", fontWeight: "600", className: "text-gray-600", children: w.length > 0 ? "No Matching Metadata Fields" : "No Active Dataset Displayed" }),
721
- /* @__PURE__ */ e(x, { variant: "caption", className: "mt-1 text-gray-400 max-w-xs text-center", children: w.length > 0 ? "The criteria keywords queried didn't flag hits inside the running table frame matrix." : "Head backwards into the query console and fire data queries to populate results layer." }),
795
+ ) }) : /* @__PURE__ */ t(r, { className: "flex flex-col items-center justify-center flex-grow py-24 text-gray-400 bg-gray-50/50 rounded-xl border border-dashed border-gray-200", children: [
796
+ /* @__PURE__ */ e(l, { icon: Oe, size: "2x", className: "mb-3 text-gray-300" }),
797
+ /* @__PURE__ */ e(x, { variant: "body2", fontWeight: "600", className: "text-gray-600", children: S.length > 0 ? "No Matching Metadata Fields" : "No Active Dataset Displayed" }),
798
+ /* @__PURE__ */ e(x, { variant: "caption", className: "mt-1 text-gray-400 max-w-xs text-center", children: S.length > 0 ? "The criteria keywords queried didn't flag hits inside the running table frame matrix." : "Head backwards into the query console and fire data queries to populate results layer." }),
722
799
  /* @__PURE__ */ e(
723
800
  p,
724
801
  {
@@ -726,30 +803,30 @@ ORDER BY current_tx_age DESC;`
726
803
  size: "small",
727
804
  color: "inherit",
728
805
  onClick: () => {
729
- w.length > 0 ? P("") : C(0);
806
+ S.length > 0 ? j("") : T(0);
730
807
  },
731
808
  className: "mt-4 border-gray-300 text-gray-600 bg-white",
732
809
  sx: { textTransform: "none", borderRadius: "8px", fontSize: "12px" },
733
- children: w.length > 0 ? "Reset Matrix Filter" : "Go to Query Workspace"
810
+ children: S.length > 0 ? "Reset Matrix Filter" : "Go to Query Workspace"
734
811
  }
735
812
  )
736
813
  ] })
737
814
  ] }),
738
- B === 2 && /* @__PURE__ */ e(F, { className: "p-5 shadow-sm border border-gray-200 rounded-2xl bg-white flex flex-col flex-grow min-h-[520px]", children: Y.length > 0 ? /* @__PURE__ */ t(s, { className: "flex flex-col flex-grow w-full", children: [
815
+ P === 2 && /* @__PURE__ */ e(F, { className: "p-5 shadow-sm border border-gray-200 rounded-2xl bg-white flex flex-col flex-grow min-h-[520px]", children: K.length > 0 ? /* @__PURE__ */ t(r, { className: "flex flex-col flex-grow w-full", children: [
739
816
  /* @__PURE__ */ e(x, { variant: "subtitle2", className: "text-gray-500 font-bold mb-3 uppercase tracking-wider text-xs", children: "Plan Graph Node Sequence: (Root Bottleneck Impact Assessment):" }),
740
- /* @__PURE__ */ e(s, { className: "flex-grow w-full overflow-y-auto bg-slate-50/50 border border-gray-200/80 rounded-xl p-4 max-h-[60vh]", children: (() => {
741
- const a = Me(Y[0]);
742
- return Y.map((n, r) => /* @__PURE__ */ e(
743
- Ma,
817
+ /* @__PURE__ */ e(r, { className: "flex-grow w-full overflow-y-auto bg-slate-50/50 border border-gray-200/80 rounded-xl p-4 max-h-[60vh]", children: (() => {
818
+ const a = Be(K[0]);
819
+ return K.map((s, n) => /* @__PURE__ */ e(
820
+ Ba,
744
821
  {
745
- rawTextLine: n,
822
+ rawTextLine: s,
746
823
  totalPlanMetric: a
747
824
  },
748
- r
825
+ n
749
826
  ));
750
827
  })() })
751
- ] }) : /* @__PURE__ */ t(s, { className: "flex flex-col items-center justify-center flex-grow py-24 text-gray-400 bg-gray-50/30 rounded-xl border border-dashed border-gray-200", children: [
752
- /* @__PURE__ */ e(o, { icon: pe, size: "2x", className: "mb-3 text-indigo-300" }),
828
+ ] }) : /* @__PURE__ */ t(r, { className: "flex flex-col items-center justify-center flex-grow py-24 text-gray-400 bg-gray-50/30 rounded-xl border border-dashed border-gray-200", children: [
829
+ /* @__PURE__ */ e(l, { icon: xe, size: "2x", className: "mb-3 text-indigo-300" }),
753
830
  /* @__PURE__ */ e(x, { variant: "body2", fontWeight: "600", className: "text-gray-600", children: "No Query Plan Loaded" }),
754
831
  /* @__PURE__ */ e(x, { variant: "caption", className: "mt-1 text-gray-400 max-w-xs text-center", children: "Type a query inside the editor and select 'Explain Plan' to compile the database execution steps." }),
755
832
  /* @__PURE__ */ e(
@@ -758,7 +835,7 @@ ORDER BY current_tx_age DESC;`
758
835
  variant: "outlined",
759
836
  size: "small",
760
837
  color: "primary",
761
- onClick: () => C(0),
838
+ onClick: () => T(0),
762
839
  className: "mt-4",
763
840
  sx: { textTransform: "none", borderRadius: "8px" },
764
841
  children: "Go to Query Console"
@@ -767,118 +844,118 @@ ORDER BY current_tx_age DESC;`
767
844
  ] }) })
768
845
  ] })
769
846
  ] }),
770
- /* @__PURE__ */ e(G, { open: We, onClose: () => j(!1), children: /* @__PURE__ */ t(s, { sx: xe, className: "flex flex-col gap-4 max-h-[85vh]", children: [
771
- /* @__PURE__ */ t(s, { className: "flex items-center justify-between border-b border-gray-100 pb-3", children: [
847
+ /* @__PURE__ */ e(X, { open: $e, onClose: () => $(!1), children: /* @__PURE__ */ t(r, { sx: fe, className: "flex flex-col gap-4 max-h-[85vh]", children: [
848
+ /* @__PURE__ */ t(r, { className: "flex items-center justify-between border-b border-gray-100 pb-3", children: [
772
849
  /* @__PURE__ */ t(x, { variant: "h6", fontWeight: "700", className: "flex items-center gap-2.5 text-gray-800", letterSpacing: "-0.4px", children: [
773
- /* @__PURE__ */ e(o, { icon: ue, className: "text-blue-500 text-lg" }),
850
+ /* @__PURE__ */ e(l, { icon: ge, className: "text-blue-500 text-lg" }),
774
851
  " ",
775
- d("Tables Explorer")
852
+ i("Tables Explorer")
776
853
  ] }),
777
- /* @__PURE__ */ e(V, { onClick: () => j(!1), size: "small", className: "hover:bg-gray-100", children: /* @__PURE__ */ e(o, { icon: Q, className: "text-sm text-gray-400" }) })
854
+ /* @__PURE__ */ e(G, { onClick: () => $(!1), size: "small", className: "hover:bg-gray-100", children: /* @__PURE__ */ e(l, { icon: Q, className: "text-sm text-gray-400" }) })
778
855
  ] }),
779
856
  /* @__PURE__ */ e(
780
- Ce,
857
+ Ae,
781
858
  {
782
859
  fullWidth: !0,
783
- onChange: pa,
860
+ onChange: ga,
784
861
  size: "small",
785
862
  placeholder: "Type matching schema name indexes...",
786
863
  sx: { "& .MuiOutlinedInput-root": { borderRadius: "10px", backgroundColor: "#fdfeff" } },
787
864
  InputProps: {
788
- startAdornment: /* @__PURE__ */ e(ce, { position: "start", children: /* @__PURE__ */ e(o, { icon: De, className: "text-gray-400 text-xs" }) })
865
+ startAdornment: /* @__PURE__ */ e(de, { position: "start", children: /* @__PURE__ */ e(l, { icon: qe, className: "text-gray-400 text-xs" }) })
789
866
  }
790
867
  }
791
868
  ),
792
- /* @__PURE__ */ e(s, { className: "overflow-y-auto flex-grow border border-gray-100 rounded-xl", children: /* @__PURE__ */ e(
793
- me,
869
+ /* @__PURE__ */ e(r, { className: "overflow-y-auto flex-grow border border-gray-100 rounded-xl", children: /* @__PURE__ */ e(
870
+ ue,
794
871
  {
795
872
  strip: !0,
796
- isLoading: Ve,
797
- columns: ea,
798
- tableData: Pe,
799
- paginationConfig: Le,
800
- styleConfig: ze
873
+ isLoading: ea,
874
+ columns: na,
875
+ tableData: Ke,
876
+ paginationConfig: Fe,
877
+ styleConfig: Qe
801
878
  }
802
879
  ) })
803
880
  ] }) }),
804
- /* @__PURE__ */ e(G, { open: He, onClose: () => $(!1), children: /* @__PURE__ */ t(s, { sx: xe, className: "flex flex-col gap-4 max-h-[85vh]", children: [
805
- /* @__PURE__ */ t(s, { className: "flex items-center justify-between border-b border-gray-100 pb-3", children: [
881
+ /* @__PURE__ */ e(X, { open: Ue, onClose: () => U(!1), children: /* @__PURE__ */ t(r, { sx: fe, className: "flex flex-col gap-4 max-h-[85vh]", children: [
882
+ /* @__PURE__ */ t(r, { className: "flex items-center justify-between border-b border-gray-100 pb-3", children: [
806
883
  /* @__PURE__ */ t(x, { variant: "h6", fontWeight: "700", className: "flex items-center gap-2.5 text-gray-800", letterSpacing: "-0.4px", children: [
807
- /* @__PURE__ */ e(o, { icon: Ae, className: "text-purple-500 text-lg" }),
884
+ /* @__PURE__ */ e(l, { icon: Le, className: "text-purple-500 text-lg" }),
808
885
  " ",
809
- d("Query History")
886
+ i("Query History")
810
887
  ] }),
811
- /* @__PURE__ */ e(V, { onClick: () => $(!1), size: "small", className: "hover:bg-gray-100", children: /* @__PURE__ */ e(o, { icon: Q, className: "text-sm text-gray-400" }) })
888
+ /* @__PURE__ */ e(G, { onClick: () => U(!1), size: "small", className: "hover:bg-gray-100", children: /* @__PURE__ */ e(l, { icon: Q, className: "text-sm text-gray-400" }) })
812
889
  ] }),
813
- /* @__PURE__ */ t(s, { className: "flex gap-2.5", children: [
890
+ /* @__PURE__ */ t(r, { className: "flex gap-2.5", children: [
814
891
  /* @__PURE__ */ e(
815
- Ee,
892
+ pe,
816
893
  {
817
894
  id: "queryHistorySearchKey",
818
895
  name: "queryHistorySearchKey",
819
- control: Ne,
896
+ control: se,
820
897
  placeholder: "Search previous queries...",
821
898
  size: "small",
822
899
  className: "flex-grow",
823
900
  sx: { "& .MuiOutlinedInput-root": { borderRadius: "10px" } }
824
901
  }
825
902
  ),
826
- /* @__PURE__ */ e(p, { variant: "contained", color: "primary", onClick: ne, sx: { borderRadius: "10px", px: 3, textTransform: "none" }, children: d("Search") })
903
+ /* @__PURE__ */ e(p, { variant: "contained", color: "primary", onClick: oe, sx: { borderRadius: "10px", px: 3, textTransform: "none" }, children: i("Search") })
827
904
  ] }),
828
- /* @__PURE__ */ e(s, { className: "overflow-y-auto flex-grow border border-gray-150 rounded-xl", children: /* @__PURE__ */ e(
829
- me,
905
+ /* @__PURE__ */ e(r, { className: "overflow-y-auto flex-grow border border-gray-150 rounded-xl", children: /* @__PURE__ */ e(
906
+ ue,
830
907
  {
831
908
  strip: !0,
832
- columns: aa,
833
- tableData: je,
834
- paginationConfig: Le,
835
- styleConfig: ze
909
+ columns: sa,
910
+ tableData: Je,
911
+ paginationConfig: Fe,
912
+ styleConfig: Qe
836
913
  }
837
914
  ) })
838
915
  ] }) }),
839
- /* @__PURE__ */ e(G, { open: Ge, onClose: () => K(!1), children: /* @__PURE__ */ t(s, { sx: xe, className: "flex flex-col gap-4 max-h-[85vh]", children: [
840
- /* @__PURE__ */ t(s, { className: "flex items-center justify-between border-b border-gray-100 pb-3", children: [
916
+ /* @__PURE__ */ e(X, { open: aa, onClose: () => J(!1), children: /* @__PURE__ */ t(r, { sx: fe, className: "flex flex-col gap-4 max-h-[85vh]", children: [
917
+ /* @__PURE__ */ t(r, { className: "flex items-center justify-between border-b border-gray-100 pb-3", children: [
841
918
  /* @__PURE__ */ t(x, { variant: "h6", fontWeight: "700", className: "flex items-center gap-2.5 text-gray-800", letterSpacing: "-0.4px", children: [
842
- /* @__PURE__ */ e(o, { icon: ue, className: "text-purple-500 text-lg" }),
843
- d("DBA Toolkit")
919
+ /* @__PURE__ */ e(l, { icon: ge, className: "text-purple-500 text-lg" }),
920
+ i("DBA Toolkit")
844
921
  ] }),
845
- /* @__PURE__ */ e(V, { onClick: () => K(!1), size: "small", className: "hover:bg-gray-100", children: /* @__PURE__ */ e(o, { icon: Q, className: "text-sm text-gray-400" }) })
922
+ /* @__PURE__ */ e(G, { onClick: () => J(!1), size: "small", className: "hover:bg-gray-100", children: /* @__PURE__ */ e(l, { icon: Q, className: "text-sm text-gray-400" }) })
846
923
  ] }),
847
- /* @__PURE__ */ e(s, { className: "overflow-y-auto flex-grow bg-slate-50/50 p-3 rounded-xl border border-gray-100 flex flex-col gap-5", children: ["Performance & Space", "Index Health", "Maintenance"].map((a) => {
848
- const n = za.filter((r) => r.category === a);
849
- return n.length === 0 ? null : /* @__PURE__ */ t(s, { className: "flex flex-col gap-2", children: [
924
+ /* @__PURE__ */ e(r, { className: "overflow-y-auto flex-grow bg-slate-50/50 p-3 rounded-xl border border-gray-100 flex flex-col gap-5", children: ["Performance & Space", "Index Health", "Maintenance"].map((a) => {
925
+ const s = Qa.filter((n) => n.category === a);
926
+ return s.length === 0 ? null : /* @__PURE__ */ t(r, { className: "flex flex-col gap-2", children: [
850
927
  /* @__PURE__ */ e(x, { variant: "caption", className: "text-slate-400 font-bold uppercase tracking-wider pl-1 text-[11px]", children: a }),
851
- /* @__PURE__ */ e(s, { className: "grid grid-cols-1 md:grid-cols-2 gap-3", children: n.map((r, i) => /* @__PURE__ */ t(
852
- s,
928
+ /* @__PURE__ */ e(r, { className: "grid grid-cols-1 md:grid-cols-2 gap-3", children: s.map((n, o) => /* @__PURE__ */ t(
929
+ r,
853
930
  {
854
931
  onClick: () => {
855
- J("query", r.code), M(!1), K(!1), C(0), u({ message: `Injected script: ${r.name}`, type: "success" });
932
+ V("query", n.code), M(!1), J(!1), T(0), u({ message: `Injected script: ${n.name}`, type: "success" });
856
933
  },
857
934
  className: "p-4 bg-white hover:bg-purple-50/30 border border-slate-200 hover:border-purple-300 rounded-xl cursor-pointer transition-all shadow-sm group flex flex-col justify-between",
858
935
  children: [
859
- /* @__PURE__ */ t(s, { children: [
860
- /* @__PURE__ */ e(x, { variant: "body2", className: "font-bold text-slate-800 group-hover:text-purple-700 transition-colors", children: r.name }),
861
- /* @__PURE__ */ e(x, { variant: "caption", className: "text-slate-500 block mt-1 leading-normal", children: r.description })
936
+ /* @__PURE__ */ t(r, { children: [
937
+ /* @__PURE__ */ e(x, { variant: "body2", className: "font-bold text-slate-800 group-hover:text-purple-700 transition-colors", children: n.name }),
938
+ /* @__PURE__ */ e(x, { variant: "caption", className: "text-slate-500 block mt-1 leading-normal", children: n.description })
862
939
  ] }),
863
- /* @__PURE__ */ t(s, { className: "mt-3 pt-2 border-t border-slate-100 flex items-center justify-between text-xs text-purple-600 font-medium opacity-80 group-hover:opacity-100", children: [
940
+ /* @__PURE__ */ t(r, { className: "mt-3 pt-2 border-t border-slate-100 flex items-center justify-between text-xs text-purple-600 font-medium opacity-80 group-hover:opacity-100", children: [
864
941
  /* @__PURE__ */ e("span", { children: "Load Into Editor" }),
865
942
  /* @__PURE__ */ e("span", { className: "font-mono text-[10px] bg-purple-100 px-1.5 py-0.5 rounded text-purple-700", children: "SQL" })
866
943
  ] })
867
944
  ]
868
945
  },
869
- i
946
+ o
870
947
  )) })
871
948
  ] }, a);
872
949
  }) })
873
950
  ] }) }),
874
951
  /* @__PURE__ */ e(
875
- G,
952
+ X,
876
953
  {
877
- open: Xe,
954
+ open: ta,
878
955
  onClose: () => re(!1),
879
956
  sx: { display: "flex", alignItems: "center", justifyContent: "center" },
880
957
  children: /* @__PURE__ */ t(
881
- s,
958
+ r,
882
959
  {
883
960
  sx: {
884
961
  bgcolor: "background.paper",
@@ -894,7 +971,7 @@ ORDER BY current_tx_age DESC;`
894
971
  /* @__PURE__ */ e(
895
972
  "img",
896
973
  {
897
- src: Da,
974
+ src: qa,
898
975
  alt: "baburao",
899
976
  style: { width: "100%", borderRadius: "8px", marginBottom: "16px" }
900
977
  }
@@ -915,21 +992,21 @@ ORDER BY current_tx_age DESC;`
915
992
  )
916
993
  }
917
994
  ),
918
- !!S && /* @__PURE__ */ e(
919
- wa,
995
+ !!C && /* @__PURE__ */ e(
996
+ Ea,
920
997
  {
921
- description: S === 3 ? `Are you sure you want to kill process id ${z}?` : "The query does not include a WHERE clause. Are you sure you want to proceed?",
998
+ description: C === 3 ? `Are you sure you want to kill process id ${L}?` : "The query does not include a WHERE clause. Are you sure you want to proceed?",
922
999
  title: "CONFIRM ACTION",
923
- open: S,
1000
+ open: C,
924
1001
  handleClick: async () => {
925
- S === 1 && T(h), S === 2 && Se(h), S === 3 && oa(), v(0);
1002
+ C === 1 && v(g), C === 2 && Te(g), C === 3 && ca(), E(0);
926
1003
  },
927
- handleClose: () => v(0)
1004
+ handleClose: () => E(0)
928
1005
  }
929
1006
  )
930
1007
  ] });
931
1008
  };
932
1009
  export {
933
- it as default
1010
+ ut as default
934
1011
  };
935
- //# sourceMappingURL=QueryManagement-B2y23kus.js.map
1012
+ //# sourceMappingURL=QueryManagement-DGHV_-d5.js.map