@argusoft/medplat-core 1.0.25 → 1.0.27
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/dist/{AccessRights-CupmTG3T.js → AccessRights-CHu27ZOw.js} +220 -217
- package/dist/AccessRights-CHu27ZOw.js.map +1 -0
- package/dist/{AddEditQueryBuilder-C8ZSkOF0.js → AddEditQueryBuilder-Brdnm6rQ.js} +2 -2
- package/dist/{AddEditQueryBuilder-C8ZSkOF0.js.map → AddEditQueryBuilder-Brdnm6rQ.js.map} +1 -1
- package/dist/{AddFeatures-CqE3v0BN.js → AddFeatures-C0Z29oSd.js} +2 -2
- package/dist/{AddFeatures-CqE3v0BN.js.map → AddFeatures-C0Z29oSd.js.map} +1 -1
- package/dist/{AddLabelModal-CB8E8cYG.js → AddLabelModal-DFllBVcd.js} +2 -2
- package/dist/{AddLabelModal-CB8E8cYG.js.map → AddLabelModal-DFllBVcd.js.map} +1 -1
- package/dist/{AppModal-BKgIwe1h.js → AppModal-CtG2GjD_.js} +2 -2
- package/dist/{AppModal-BKgIwe1h.js.map → AppModal-CtG2GjD_.js.map} +1 -1
- package/dist/{ChangePasswordModalCore-DTYWRTa-.js → ChangePasswordModalCore-CDxkeIIM.js} +2 -2
- package/dist/{ChangePasswordModalCore-DTYWRTa-.js.map → ChangePasswordModalCore-CDxkeIIM.js.map} +1 -1
- package/dist/{EventConfigurations-lPcZGpLi.js → EventConfigurations-kNtAj_WM.js} +76 -76
- package/dist/EventConfigurations-kNtAj_WM.js.map +1 -0
- package/dist/{FeatureMenu-DUZL32RI.js → FeatureMenu-jl7-Tk6y.js} +49 -49
- package/dist/FeatureMenu-jl7-Tk6y.js.map +1 -0
- package/dist/FileSaver.min-CN9EpL2h.js.map +1 -1
- package/dist/{ImmunizationConfigurationsList-K2ddBpPJ.js → ImmunizationConfigurationsList-DdSZicTP.js} +72 -73
- package/dist/{ImmunizationConfigurationsList-K2ddBpPJ.js.map → ImmunizationConfigurationsList-DdSZicTP.js.map} +1 -1
- package/dist/ImmunizationSkeleton-D2tdv5k-.js.map +1 -1
- package/dist/{LanguagesModal-CX3oS8rk.js → LanguagesModal-D6VfaGrl.js} +2 -2
- package/dist/{LanguagesModal-CX3oS8rk.js.map → LanguagesModal-D6VfaGrl.js.map} +1 -1
- package/dist/{ManageNotification-CSl02Wq7.js → ManageNotification-CaBAOhji.js} +2 -2
- package/dist/ManageNotification-CaBAOhji.js.map +1 -0
- package/dist/{ManageRole-B9bs_T00.js → ManageRole-CGYfglpo.js} +2 -2
- package/dist/{ManageRole-B9bs_T00.js.map → ManageRole-CGYfglpo.js.map} +1 -1
- package/dist/{ManageTranslation-D9IScGhk.js → ManageTranslation-B4C9-lWD.js} +74 -74
- package/dist/ManageTranslation-B4C9-lWD.js.map +1 -0
- package/dist/{ManageUser-AB3_Vfp_.js → ManageUser-AY1EUDLI.js} +600 -601
- package/dist/ManageUser-AY1EUDLI.js.map +1 -0
- package/dist/{NotificationList-D1U1LYnz.js → NotificationList-C3Vb_jKU.js} +73 -73
- package/dist/NotificationList-C3Vb_jKU.js.map +1 -0
- package/dist/OtherTypeEventConfigModal-BeG1GrUi.js.map +1 -1
- package/dist/{QueryBuilder-DI0wCJbz.js → QueryBuilder-z7eqfd7D.js} +117 -119
- package/dist/QueryBuilder-z7eqfd7D.js.map +1 -0
- package/dist/{QueryManagement-CRykYGum.js → QueryManagement-BIhEDKuA.js} +114 -114
- package/dist/QueryManagement-BIhEDKuA.js.map +1 -0
- package/dist/{RoleManagement-BIiW9uTq.js → RoleManagement-BPl2cE27.js} +99 -99
- package/dist/RoleManagement-BPl2cE27.js.map +1 -0
- package/dist/{SubMenu-CM_4wNCR.js → SubMenu-DYxAPH2Z.js} +34 -34
- package/dist/SubMenu-DYxAPH2Z.js.map +1 -0
- package/dist/{UserList-2gGuDgNa.js → UserList-Bc8gYxRL.js} +397 -400
- package/dist/UserList-Bc8gYxRL.js.map +1 -0
- package/dist/{WidgetList-B7X8Awkg.js → WidgetList-Dw_FmbbE.js} +26 -26
- package/dist/WidgetList-Dw_FmbbE.js.map +1 -0
- package/dist/i18next-CTOWN_jH.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +10 -10
- package/dist/xlsx.min-D1LFqt_b.js.map +1 -1
- package/package.json +1 -1
- package/dist/AccessRights-CupmTG3T.js.map +0 -1
- package/dist/EventConfigurations-lPcZGpLi.js.map +0 -1
- package/dist/FeatureMenu-DUZL32RI.js.map +0 -1
- package/dist/ManageNotification-CSl02Wq7.js.map +0 -1
- package/dist/ManageTranslation-D9IScGhk.js.map +0 -1
- package/dist/ManageUser-AB3_Vfp_.js.map +0 -1
- package/dist/NotificationList-D1U1LYnz.js.map +0 -1
- package/dist/QueryBuilder-DI0wCJbz.js.map +0 -1
- package/dist/QueryManagement-CRykYGum.js.map +0 -1
- package/dist/RoleManagement-BIiW9uTq.js.map +0 -1
- package/dist/SubMenu-CM_4wNCR.js.map +0 -1
- package/dist/UserList-2gGuDgNa.js.map +0 -1
- package/dist/WidgetList-B7X8Awkg.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as d, useEffect as ie, useMemo as Te } from "react";
|
|
3
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
4
|
import me from "@/common/services/util/GeneralUtil";
|
|
5
5
|
import { api as ye } from "@/common/interceptors/AxiosInterceptor";
|
|
@@ -11,11 +11,11 @@ import { useForm as va } from "react-hook-form";
|
|
|
11
11
|
import Ca from "@/hooks/useTrackEvent";
|
|
12
12
|
import Ea from "@/views/custom-components/CustomConfirmationModal";
|
|
13
13
|
import { showToast as u } from "@/common/toaster/toaster";
|
|
14
|
-
import
|
|
15
|
-
import { useTranslateProvider as
|
|
14
|
+
import Ra from "dayjs";
|
|
15
|
+
import { useTranslateProvider as ka } from "@/common/languageTranslator/TranslationContext";
|
|
16
16
|
import De from "prop-types";
|
|
17
17
|
import { getUseSkeleton as We } from "@/store/reducers/SkeletonReducer";
|
|
18
|
-
import
|
|
18
|
+
import Ta from "@monaco-editor/react";
|
|
19
19
|
import ue from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
|
|
20
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
21
|
import { FontAwesomeIcon as l } from "@fortawesome/react-fontawesome";
|
|
@@ -23,11 +23,11 @@ import Ia from "lodash/debounce";
|
|
|
23
23
|
import qa from "@/assets/gifs/baburao.gif";
|
|
24
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: [(
|
|
26
|
+
transformRequest: [(i) => i]
|
|
27
27
|
}), Fa = (m) => ye.post("querymanagement/execute", m, {
|
|
28
28
|
headers: { "Content-Type": "application/json" },
|
|
29
|
-
transformRequest: [(
|
|
30
|
-
}), He = ({ children: m, loading:
|
|
29
|
+
transformRequest: [(i) => i]
|
|
30
|
+
}), He = ({ children: m, loading: i }) => !he(We) || !i ? 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]" })
|
|
@@ -181,13 +181,13 @@ ORDER BY current_tx_age DESC;`
|
|
|
181
181
|
border: "1px solid rgba(0, 0, 0, 0.05)"
|
|
182
182
|
}, Be = (m) => {
|
|
183
183
|
if (!m) return 0;
|
|
184
|
-
const
|
|
185
|
-
if (
|
|
184
|
+
const i = m.match(/actual\s+time=[\d.]+\.\.([\d.]+)/);
|
|
185
|
+
if (i && i[1]) return parseFloat(i[1]);
|
|
186
186
|
const w = m.match(/cost=[\d.]+\.\.([\d.]+)/);
|
|
187
187
|
return w && w[1] ? parseFloat(w[1]) : 0;
|
|
188
|
-
}, Ba = ({ rawTextLine: m, totalPlanMetric:
|
|
188
|
+
}, Ba = ({ rawTextLine: m, totalPlanMetric: i }) => {
|
|
189
189
|
if (!m || !m.trim()) return null;
|
|
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 =
|
|
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 = i > 0 ? Math.round(E / i * 100) : 0, O = I >= 35;
|
|
191
191
|
return /* @__PURE__ */ t(
|
|
192
192
|
r,
|
|
193
193
|
{
|
|
@@ -229,9 +229,9 @@ ORDER BY current_tx_age DESC;`
|
|
|
229
229
|
}
|
|
230
230
|
);
|
|
231
231
|
}, ut = () => {
|
|
232
|
-
const m = he(We), [
|
|
233
|
-
let
|
|
234
|
-
|
|
232
|
+
const m = he(We), [i, w] = d(null), [L, D] = d(null), [g, y] = d(""), [C, E] = d(0), [I, O] = d([]), [S, H] = d([]), [Pe, je] = d(!1), { user: B } = he((a) => a.Authenticate), [P, R] = d(0), [k, j] = d(""), [$e, $] = d(!1), [Ue, U] = d(!1), [q, Ye] = d([]), [Ke, be] = d([]), [Je, Ve] = d([]), [_e, Ge] = d([]), Y = S.length || null, [K, Xe] = d([]), [Ne, we] = d(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: c } = ka(), [Ce, ee] = d(!1), [Ze, f] = d(!1), [ea, ae] = d(!1), [te, M] = d(!0), [aa, J] = d(!1), [ta, re] = d(!1), se = async (a, n = null) => {
|
|
233
|
+
let s;
|
|
234
|
+
n === "index" ? s = "SELECT * FROM pg_indexes WHERE tablename = '" + a.tablename + "' limit 100" : n === "ddl" ? s = `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,30 +242,30 @@ 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;` :
|
|
245
|
+
FROM table_columns tc LEFT JOIN table_indexes ti ON tc.table_name = ti.table_name GROUP BY tc.table_name;` : s = `select * from ${a.tablename} limit 100`, y(s), $(!1), R(0), v(s);
|
|
246
246
|
}, ra = async (a) => {
|
|
247
|
-
y(a.query), V("query", a.query), M(!(a.query && a.query.trim().length > 0)), U(!1),
|
|
248
|
-
},
|
|
247
|
+
y(a.query), V("query", a.query), M(!(a.query && a.query.trim().length > 0)), U(!1), R(0);
|
|
248
|
+
}, sa = [
|
|
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:
|
|
251
|
+
{ field: "tablename", label: "Table Name", align: "left", onClick: se },
|
|
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: () =>
|
|
256
|
+
render: (a) => /* @__PURE__ */ e(p, { variant: "outlined", color: "primary", size: "small", sx: { borderRadius: "6px", textTransform: "none" }, onClick: () => se(a, "index"), children: c("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: () =>
|
|
262
|
+
render: (a) => /* @__PURE__ */ e(p, { variant: "outlined", color: "secondary", size: "small", sx: { borderRadius: "6px", textTransform: "none" }, onClick: () => se(a, "ddl"), children: c("DDL") })
|
|
263
263
|
}
|
|
264
|
-
],
|
|
264
|
+
], na = [
|
|
265
265
|
{ field: "Sr. No.", label: "#", align: "left" },
|
|
266
266
|
{ field: "query", label: "Query", align: "left", onClick: ra },
|
|
267
267
|
{ field: "created_on", label: "Executed On", align: "left" }
|
|
268
|
-
], { control:
|
|
268
|
+
], { control: ne, setValue: V, getValues: T, formState: { errors: Pa } } = va({
|
|
269
269
|
mode: "onChange",
|
|
270
270
|
defaultValues: { excelFileName: "" }
|
|
271
271
|
});
|
|
@@ -274,22 +274,22 @@ ORDER BY current_tx_age DESC;`
|
|
|
274
274
|
}, [q]), ie(() => {
|
|
275
275
|
(g == null ? void 0 : g.length) > 0 ? (M(!1), V("query", g)) : M(!0);
|
|
276
276
|
}, [g]);
|
|
277
|
-
const Ee = Ca(), v = async (a,
|
|
277
|
+
const Ee = Ca(), v = async (a, n = []) => {
|
|
278
278
|
try {
|
|
279
279
|
if (!a) {
|
|
280
280
|
u({ message: "Query can not be empty", type: "error" });
|
|
281
281
|
return;
|
|
282
282
|
}
|
|
283
283
|
f(!0), j("");
|
|
284
|
-
const
|
|
284
|
+
const s = performance.now(), { data: o } = await Me(a).catch((h) => {
|
|
285
285
|
H([]), f(!1), we(null), u({ message: `${h.response.data.message}`, type: "error" });
|
|
286
286
|
}), b = performance.now();
|
|
287
|
-
if (we((b -
|
|
287
|
+
if (we((b - s).toFixed(0)), o && !o.length) {
|
|
288
288
|
H([]), u({ message: "No data found", type: "info" }), f(!1);
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
291
|
if (o != null && o.length && a !== z && u({ message: "Query Executed Successfully", type: "success" }), a === z)
|
|
292
|
-
|
|
292
|
+
n = [
|
|
293
293
|
{
|
|
294
294
|
label: "KILL PROCESS",
|
|
295
295
|
icon: /* @__PURE__ */ e(
|
|
@@ -304,7 +304,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
304
304
|
fontSize: "11px",
|
|
305
305
|
minWidth: "auto"
|
|
306
306
|
},
|
|
307
|
-
children:
|
|
307
|
+
children: c("Kill Query")
|
|
308
308
|
}
|
|
309
309
|
),
|
|
310
310
|
onClick: ia
|
|
@@ -316,61 +316,61 @@ ORDER BY current_tx_age DESC;`
|
|
|
316
316
|
}
|
|
317
317
|
H(o.map((h, A) => ({ index: A + 1, ...h })));
|
|
318
318
|
const N = Object.keys(o[0]);
|
|
319
|
-
(
|
|
319
|
+
(n.length || a === z) && N.push("Actions");
|
|
320
320
|
const _ = N.map((h) => ({ field: h, label: h, align: "left" }));
|
|
321
|
-
Ge(
|
|
321
|
+
Ge(n), O([{ field: "index", label: "#", align: "left" }, ..._]), oe(), f(!1), R(1);
|
|
322
322
|
} catch {
|
|
323
323
|
f(!1);
|
|
324
324
|
}
|
|
325
325
|
}, oa = async () => {
|
|
326
|
-
const a =
|
|
326
|
+
const a = T("query");
|
|
327
327
|
if (!a) {
|
|
328
328
|
u({ message: "Query can not be empty", type: "error" });
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
|
-
const
|
|
331
|
+
const s = `EXPLAIN ${a.trim().replace(/;+$/, "")};`;
|
|
332
332
|
try {
|
|
333
333
|
f(!0);
|
|
334
|
-
const { data: o } = await Me(
|
|
334
|
+
const { data: o } = await Me(s).catch((b) => {
|
|
335
335
|
var N, _;
|
|
336
336
|
f(!1), u({ message: `${((_ = (N = b.response) == null ? void 0 : N.data) == null ? void 0 : _.message) || "Explain failed"}`, type: "error" });
|
|
337
337
|
});
|
|
338
338
|
if (o && o.length > 0) {
|
|
339
339
|
const b = Object.keys(o[0])[0], N = o.map((_) => _[b]);
|
|
340
|
-
Xe(N), u({ message: "Explain Plan Calculated", type: "success" }),
|
|
340
|
+
Xe(N), u({ message: "Explain Plan Calculated", type: "success" }), R(2);
|
|
341
341
|
} else
|
|
342
342
|
u({ message: "No data returned from execution plan", type: "info" });
|
|
343
343
|
f(!1);
|
|
344
344
|
} catch (o) {
|
|
345
345
|
f(!1), console.error(o);
|
|
346
346
|
}
|
|
347
|
-
},
|
|
347
|
+
}, Re = 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:
|
|
354
|
-
u({ message: `${
|
|
353
|
+
const { data: n } = await Fa(a).catch((s) => {
|
|
354
|
+
u({ message: `${s.response.data.message}`, type: "error" });
|
|
355
355
|
});
|
|
356
|
-
|
|
357
|
-
} catch (
|
|
358
|
-
console.error(
|
|
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);
|
|
359
359
|
}
|
|
360
|
-
},
|
|
361
|
-
const a = "d91d249f-c8e1-4397-a84d-6ce6eb33eb48",
|
|
362
|
-
if (!
|
|
360
|
+
}, ke = async () => {
|
|
361
|
+
const a = "d91d249f-c8e1-4397-a84d-6ce6eb33eb48", n = T("query"), s = T("excelFileName");
|
|
362
|
+
if (!n) {
|
|
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 Na(a, { paramObj: { query:
|
|
368
|
+
const b = await Na(a, { paramObj: { query: n } }).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 N = new Blob([b.data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), _ = `${
|
|
373
|
+
const N = new Blob([b.data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), _ = `${s || "rename"}_${(/* @__PURE__ */ new Date()).getTime()}.xlsx`;
|
|
374
374
|
if (navigator.msSaveBlob) {
|
|
375
375
|
const h = new Blob([b.data], { type: "" });
|
|
376
376
|
return Ee("file_download", { file_type: "xlsx", file_name: _, file_size: `${(h.size / 1024).toFixed(2)} KB`, download_status: "success" }), navigator.msSaveBlob(h, _);
|
|
@@ -404,15 +404,15 @@ ORDER BY current_tx_age DESC;`
|
|
|
404
404
|
}
|
|
405
405
|
}, oe = async () => {
|
|
406
406
|
try {
|
|
407
|
-
const a =
|
|
407
|
+
const a = T("queryHistorySearchKey"), { data: n } = await wa({
|
|
408
408
|
code: "retrieve_limited_query_history",
|
|
409
409
|
parameters: { userId: B == null ? void 0 : B.id, limit: 100, searchKey: a }
|
|
410
410
|
});
|
|
411
411
|
Ve(
|
|
412
|
-
|
|
412
|
+
n.result.map((s, o) => ({
|
|
413
413
|
index: o + 1,
|
|
414
|
-
...
|
|
415
|
-
created_on:
|
|
414
|
+
...s,
|
|
415
|
+
created_on: Ra(s.created_on).format("DD-MM-YYYY h:mm:ss A")
|
|
416
416
|
}))
|
|
417
417
|
);
|
|
418
418
|
} catch (a) {
|
|
@@ -438,27 +438,27 @@ ORDER BY current_tx_age DESC;`
|
|
|
438
438
|
try {
|
|
439
439
|
ae(!0);
|
|
440
440
|
const { data: a } = await Ma({ code: "retrieve_all_tables" });
|
|
441
|
-
Ye(a.result.map((
|
|
441
|
+
Ye(a.result.map((n, s) => ({ index: s + 1, ...n }))), ae(!1);
|
|
442
442
|
} catch {
|
|
443
443
|
ae(!1);
|
|
444
444
|
}
|
|
445
445
|
}, ga = (a) => {
|
|
446
446
|
fa(a.target.value);
|
|
447
|
-
}, fa =
|
|
447
|
+
}, fa = Te(
|
|
448
448
|
() => Ia((a) => {
|
|
449
|
-
const
|
|
450
|
-
be(q.filter((
|
|
449
|
+
const n = a.toLowerCase();
|
|
450
|
+
be(q.filter((s) => {
|
|
451
451
|
var o;
|
|
452
|
-
return (o =
|
|
452
|
+
return (o = s == null ? void 0 : s.tablename) == null ? void 0 : o.toLowerCase().includes(n);
|
|
453
453
|
}));
|
|
454
454
|
}, 300),
|
|
455
455
|
[q]
|
|
456
|
-
), le =
|
|
457
|
-
if (!
|
|
458
|
-
const a =
|
|
459
|
-
return S.filter((
|
|
460
|
-
}, [S,
|
|
461
|
-
const a =
|
|
456
|
+
), le = Te(() => {
|
|
457
|
+
if (!k) return S;
|
|
458
|
+
const a = k.toLowerCase().trim();
|
|
459
|
+
return S.filter((n) => Object.entries(n).some(([s, o]) => s === "index" || s === "Actions" ? !1 : String(o ?? "").toLowerCase().includes(a)));
|
|
460
|
+
}, [S, k]), ha = async () => {
|
|
461
|
+
const a = T("query") || g;
|
|
462
462
|
a ? await v(a, _e) : u({ message: "No context query found to refresh", type: "warning" });
|
|
463
463
|
}, ya = async () => {
|
|
464
464
|
try {
|
|
@@ -467,7 +467,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
467
467
|
console.error(a);
|
|
468
468
|
}
|
|
469
469
|
};
|
|
470
|
-
return
|
|
470
|
+
return !Ce && i !== null && !me.hasCheckRights(i == null ? void 0 : i["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: [
|
|
471
471
|
/* @__PURE__ */ e(x, { variant: "h5", color: "error", fontWeight: "700", letterSpacing: "-0.5px", children: "Access Denied" }),
|
|
472
472
|
/* @__PURE__ */ e(x, { variant: "body2", className: "text-gray-400 mt-2", children: "You don't have permission to view Query Management Tool" })
|
|
473
473
|
] }) }) : /* @__PURE__ */ t(He, { loading: Ce, children: [
|
|
@@ -478,7 +478,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
478
478
|
ba,
|
|
479
479
|
{
|
|
480
480
|
value: P,
|
|
481
|
-
onChange: (a,
|
|
481
|
+
onChange: (a, n) => R(n),
|
|
482
482
|
indicatorColor: "primary",
|
|
483
483
|
textColor: "primary",
|
|
484
484
|
sx: {
|
|
@@ -491,7 +491,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
491
491
|
{
|
|
492
492
|
label: /* @__PURE__ */ t(r, { className: "flex items-center gap-2", children: [
|
|
493
493
|
/* @__PURE__ */ e(l, { icon: Aa, className: "text-xs opacity-80" }),
|
|
494
|
-
/* @__PURE__ */ e("span", { children:
|
|
494
|
+
/* @__PURE__ */ e("span", { children: c("Query Console") })
|
|
495
495
|
] })
|
|
496
496
|
}
|
|
497
497
|
),
|
|
@@ -500,7 +500,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
500
500
|
{
|
|
501
501
|
label: /* @__PURE__ */ t(r, { className: "flex items-center gap-2", children: [
|
|
502
502
|
/* @__PURE__ */ e(l, { icon: Oe, className: "text-xs opacity-80" }),
|
|
503
|
-
/* @__PURE__ */ e("span", { children:
|
|
503
|
+
/* @__PURE__ */ e("span", { children: c("Results Layer") }),
|
|
504
504
|
!!Y && /* @__PURE__ */ e(W, { label: Y, size: "small", color: "primary", sx: { height: 18, fontSize: "10px", fontWeight: "bold" } })
|
|
505
505
|
] })
|
|
506
506
|
}
|
|
@@ -510,7 +510,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
510
510
|
{
|
|
511
511
|
label: /* @__PURE__ */ t(r, { className: "flex items-center gap-2", children: [
|
|
512
512
|
/* @__PURE__ */ e(l, { icon: xe, className: "text-xs text-indigo-500 opacity-90" }),
|
|
513
|
-
/* @__PURE__ */ e("span", { children:
|
|
513
|
+
/* @__PURE__ */ e("span", { children: c("Query Plan") }),
|
|
514
514
|
K.length > 0 && /* @__PURE__ */ e(W, { label: "Ready", size: "small", color: "info", sx: { height: 18, fontSize: "9px", fontWeight: "bold" } })
|
|
515
515
|
] })
|
|
516
516
|
}
|
|
@@ -521,43 +521,43 @@ ORDER BY current_tx_age DESC;`
|
|
|
521
521
|
/* @__PURE__ */ t(r, { className: "flex flex-wrap items-center gap-2.5", children: [
|
|
522
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
523
|
/* @__PURE__ */ e(l, { icon: ge, className: "mr-2 text-blue-500" }),
|
|
524
|
-
|
|
524
|
+
c("Tables Explorer")
|
|
525
525
|
] }),
|
|
526
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
527
|
/* @__PURE__ */ e(l, { icon: ze, className: "mr-2 text-blue-500" }),
|
|
528
|
-
|
|
528
|
+
c("DBA Toolkit")
|
|
529
529
|
] }),
|
|
530
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
531
|
/* @__PURE__ */ e(l, { icon: Le, className: "mr-2 text-purple-500" }),
|
|
532
|
-
|
|
532
|
+
c("Query History")
|
|
533
533
|
] }),
|
|
534
534
|
/* @__PURE__ */ e(_a, { orientation: "vertical", flexItem: !0, className: "hidden md:block my-1" }),
|
|
535
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
536
|
/* @__PURE__ */ e(l, { icon: Da, className: "mr-1 text-amber-500 text-[10px]" }),
|
|
537
537
|
" ",
|
|
538
|
-
|
|
538
|
+
c("Locked Queries")
|
|
539
539
|
] }),
|
|
540
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
541
|
/* @__PURE__ */ e(l, { icon: ze, className: "mr-1 text-teal-500 text-[10px]" }),
|
|
542
542
|
" ",
|
|
543
|
-
|
|
543
|
+
c("Active Queries")
|
|
544
544
|
] }),
|
|
545
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
546
|
/* @__PURE__ */ e(l, { icon: Q, className: "mr-1 text-teal-500 text-[10px]" }),
|
|
547
547
|
" ",
|
|
548
|
-
|
|
548
|
+
c("Recent Exceptions")
|
|
549
549
|
] })
|
|
550
550
|
] })
|
|
551
551
|
] }),
|
|
552
552
|
/* @__PURE__ */ t(r, { className: "flex-grow flex flex-col", children: [
|
|
553
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
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
|
-
|
|
555
|
+
Ta,
|
|
556
556
|
{
|
|
557
557
|
height: "100%",
|
|
558
558
|
defaultLanguage: "sql",
|
|
559
559
|
theme: "vs-light",
|
|
560
|
-
value:
|
|
560
|
+
value: T("query") || "",
|
|
561
561
|
onChange: (a) => {
|
|
562
562
|
V("query", a || ""), M(!(a && a.trim().length > 0));
|
|
563
563
|
},
|
|
@@ -584,7 +584,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
584
584
|
{
|
|
585
585
|
id: "excelFileName",
|
|
586
586
|
name: "excelFileName",
|
|
587
|
-
control:
|
|
587
|
+
control: ne,
|
|
588
588
|
placeholder: "Export sheet filename...",
|
|
589
589
|
size: "small",
|
|
590
590
|
className: "max-w-[220px] bg-white",
|
|
@@ -596,7 +596,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
596
596
|
{
|
|
597
597
|
variant: "outlined",
|
|
598
598
|
color: "inherit",
|
|
599
|
-
onClick:
|
|
599
|
+
onClick: ke,
|
|
600
600
|
className: "border-gray-300 text-gray-700 hover:bg-white",
|
|
601
601
|
sx: {
|
|
602
602
|
textTransform: "none",
|
|
@@ -619,7 +619,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
619
619
|
)
|
|
620
620
|
] }),
|
|
621
621
|
/* @__PURE__ */ t(r, { className: "flex gap-2.5", children: [
|
|
622
|
-
|
|
622
|
+
me.hasCheckRights(i == null ? void 0 : i["view.manage.querymanagement.execute"]) && /* @__PURE__ */ e(
|
|
623
623
|
p,
|
|
624
624
|
{
|
|
625
625
|
variant: "outlined",
|
|
@@ -628,10 +628,10 @@ ORDER BY current_tx_age DESC;`
|
|
|
628
628
|
className: "h-[38px]",
|
|
629
629
|
sx: { textTransform: "none", borderRadius: "8px", fontWeight: 600 },
|
|
630
630
|
onClick: async () => {
|
|
631
|
-
const a =
|
|
632
|
-
y(a), a != null && a.toLowerCase().includes("where") ? await
|
|
631
|
+
const a = T("query");
|
|
632
|
+
y(a), a != null && a.toLowerCase().includes("where") ? await Re(a) : E(2);
|
|
633
633
|
},
|
|
634
|
-
children:
|
|
634
|
+
children: c("Execute Command")
|
|
635
635
|
}
|
|
636
636
|
),
|
|
637
637
|
/* @__PURE__ */ t(
|
|
@@ -644,11 +644,11 @@ ORDER BY current_tx_age DESC;`
|
|
|
644
644
|
onClick: oa,
|
|
645
645
|
children: [
|
|
646
646
|
/* @__PURE__ */ e(l, { icon: xe, className: "mr-2 text-xs" }),
|
|
647
|
-
|
|
647
|
+
c("Explain Plan")
|
|
648
648
|
]
|
|
649
649
|
}
|
|
650
650
|
),
|
|
651
|
-
|
|
651
|
+
me.hasCheckRights(i == null ? void 0 : i["view.manage.querymanagement.retrieve"]) && /* @__PURE__ */ t(
|
|
652
652
|
p,
|
|
653
653
|
{
|
|
654
654
|
variant: "contained",
|
|
@@ -657,19 +657,19 @@ ORDER BY current_tx_age DESC;`
|
|
|
657
657
|
className: "h-[38px] shadow-sm shadow-green-200",
|
|
658
658
|
sx: { textTransform: "none", borderRadius: "8px", fontWeight: 600, px: 3 },
|
|
659
659
|
onClick: async () => {
|
|
660
|
-
const a =
|
|
660
|
+
const a = T("query");
|
|
661
661
|
y(a);
|
|
662
|
-
const
|
|
663
|
-
if (/\b(drop|truncate|delete|update)\b/.test(
|
|
662
|
+
const n = (a == null ? void 0 : a.toLowerCase().trim()) || "";
|
|
663
|
+
if (/\b(drop|truncate|delete|update)\b/.test(n)) {
|
|
664
664
|
re(!0);
|
|
665
665
|
return;
|
|
666
666
|
}
|
|
667
|
-
const o =
|
|
667
|
+
const o = n.startsWith("select"), b = n.includes("where");
|
|
668
668
|
o && !b ? E(1) : await v(a);
|
|
669
669
|
},
|
|
670
670
|
children: [
|
|
671
671
|
/* @__PURE__ */ e(l, { icon: Oa, className: "mr-2 text-xs" }),
|
|
672
|
-
|
|
672
|
+
c("Retrieve Data")
|
|
673
673
|
]
|
|
674
674
|
}
|
|
675
675
|
)
|
|
@@ -685,7 +685,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
685
685
|
size: "small",
|
|
686
686
|
variant: "outlined",
|
|
687
687
|
placeholder: "Filter layout results...",
|
|
688
|
-
value:
|
|
688
|
+
value: k,
|
|
689
689
|
onChange: (a) => j(a.target.value),
|
|
690
690
|
sx: {
|
|
691
691
|
width: { xs: "100%", sm: "280px" },
|
|
@@ -693,17 +693,17 @@ ORDER BY current_tx_age DESC;`
|
|
|
693
693
|
},
|
|
694
694
|
InputProps: {
|
|
695
695
|
startAdornment: /* @__PURE__ */ e(de, { position: "start", children: /* @__PURE__ */ e(l, { icon: qe, className: "text-gray-400 text-xs" }) }),
|
|
696
|
-
endAdornment:
|
|
696
|
+
endAdornment: k && /* @__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
697
|
}
|
|
698
698
|
}
|
|
699
699
|
),
|
|
700
700
|
/* @__PURE__ */ e(
|
|
701
701
|
W,
|
|
702
702
|
{
|
|
703
|
-
label:
|
|
703
|
+
label: k ? `${c("Matches")}: ${le.length} / ${Y}` : `${c("Records Loaded")}: ${Y}`,
|
|
704
704
|
size: "medium",
|
|
705
|
-
color:
|
|
706
|
-
variant:
|
|
705
|
+
color: k ? "primary" : "success",
|
|
706
|
+
variant: k ? "outlined" : "filled",
|
|
707
707
|
sx: { borderRadius: "8px", fontWeight: "600", fontSize: "12px", height: "34px" }
|
|
708
708
|
}
|
|
709
709
|
),
|
|
@@ -736,7 +736,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
736
736
|
sx: { textTransform: "none", borderRadius: "8px", fontWeight: 500 },
|
|
737
737
|
children: [
|
|
738
738
|
/* @__PURE__ */ e(l, { icon: La, className: "mr-2 text-teal-600" }),
|
|
739
|
-
|
|
739
|
+
c("Refresh")
|
|
740
740
|
]
|
|
741
741
|
}
|
|
742
742
|
),
|
|
@@ -746,7 +746,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
746
746
|
{
|
|
747
747
|
id: "excelFileName",
|
|
748
748
|
name: "excelFileName",
|
|
749
|
-
control:
|
|
749
|
+
control: ne,
|
|
750
750
|
placeholder: "Export sheet filename...",
|
|
751
751
|
size: "small",
|
|
752
752
|
className: "max-w-[220px] bg-white",
|
|
@@ -758,7 +758,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
758
758
|
{
|
|
759
759
|
variant: "outlined",
|
|
760
760
|
color: "inherit",
|
|
761
|
-
onClick:
|
|
761
|
+
onClick: ke,
|
|
762
762
|
className: "border-gray-300 text-gray-700 hover:bg-white",
|
|
763
763
|
sx: {
|
|
764
764
|
textTransform: "none",
|
|
@@ -775,7 +775,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
775
775
|
},
|
|
776
776
|
children: [
|
|
777
777
|
/* @__PURE__ */ e(l, { icon: Ie, className: "mr-2 text-blue-600" }),
|
|
778
|
-
|
|
778
|
+
c("Spreadsheet")
|
|
779
779
|
]
|
|
780
780
|
}
|
|
781
781
|
)
|
|
@@ -803,7 +803,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
803
803
|
size: "small",
|
|
804
804
|
color: "inherit",
|
|
805
805
|
onClick: () => {
|
|
806
|
-
S.length > 0 ? j("") :
|
|
806
|
+
S.length > 0 ? j("") : R(0);
|
|
807
807
|
},
|
|
808
808
|
className: "mt-4 border-gray-300 text-gray-600 bg-white",
|
|
809
809
|
sx: { textTransform: "none", borderRadius: "8px", fontSize: "12px" },
|
|
@@ -816,13 +816,13 @@ ORDER BY current_tx_age DESC;`
|
|
|
816
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):" }),
|
|
817
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
818
|
const a = Be(K[0]);
|
|
819
|
-
return K.map((
|
|
819
|
+
return K.map((n, s) => /* @__PURE__ */ e(
|
|
820
820
|
Ba,
|
|
821
821
|
{
|
|
822
|
-
rawTextLine:
|
|
822
|
+
rawTextLine: n,
|
|
823
823
|
totalPlanMetric: a
|
|
824
824
|
},
|
|
825
|
-
|
|
825
|
+
s
|
|
826
826
|
));
|
|
827
827
|
})() })
|
|
828
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: [
|
|
@@ -835,7 +835,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
835
835
|
variant: "outlined",
|
|
836
836
|
size: "small",
|
|
837
837
|
color: "primary",
|
|
838
|
-
onClick: () =>
|
|
838
|
+
onClick: () => R(0),
|
|
839
839
|
className: "mt-4",
|
|
840
840
|
sx: { textTransform: "none", borderRadius: "8px" },
|
|
841
841
|
children: "Go to Query Console"
|
|
@@ -849,7 +849,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
849
849
|
/* @__PURE__ */ t(x, { variant: "h6", fontWeight: "700", className: "flex items-center gap-2.5 text-gray-800", letterSpacing: "-0.4px", children: [
|
|
850
850
|
/* @__PURE__ */ e(l, { icon: ge, className: "text-blue-500 text-lg" }),
|
|
851
851
|
" ",
|
|
852
|
-
|
|
852
|
+
c("Tables Explorer")
|
|
853
853
|
] }),
|
|
854
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" }) })
|
|
855
855
|
] }),
|
|
@@ -871,7 +871,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
871
871
|
{
|
|
872
872
|
strip: !0,
|
|
873
873
|
isLoading: ea,
|
|
874
|
-
columns:
|
|
874
|
+
columns: sa,
|
|
875
875
|
tableData: Ke,
|
|
876
876
|
paginationConfig: Fe,
|
|
877
877
|
styleConfig: Qe
|
|
@@ -883,7 +883,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
883
883
|
/* @__PURE__ */ t(x, { variant: "h6", fontWeight: "700", className: "flex items-center gap-2.5 text-gray-800", letterSpacing: "-0.4px", children: [
|
|
884
884
|
/* @__PURE__ */ e(l, { icon: Le, className: "text-purple-500 text-lg" }),
|
|
885
885
|
" ",
|
|
886
|
-
|
|
886
|
+
c("Query History")
|
|
887
887
|
] }),
|
|
888
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" }) })
|
|
889
889
|
] }),
|
|
@@ -893,20 +893,20 @@ ORDER BY current_tx_age DESC;`
|
|
|
893
893
|
{
|
|
894
894
|
id: "queryHistorySearchKey",
|
|
895
895
|
name: "queryHistorySearchKey",
|
|
896
|
-
control:
|
|
896
|
+
control: ne,
|
|
897
897
|
placeholder: "Search previous queries...",
|
|
898
898
|
size: "small",
|
|
899
899
|
className: "flex-grow",
|
|
900
900
|
sx: { "& .MuiOutlinedInput-root": { borderRadius: "10px" } }
|
|
901
901
|
}
|
|
902
902
|
),
|
|
903
|
-
/* @__PURE__ */ e(p, { variant: "contained", color: "primary", onClick: oe, sx: { borderRadius: "10px", px: 3, textTransform: "none" }, children:
|
|
903
|
+
/* @__PURE__ */ e(p, { variant: "contained", color: "primary", onClick: oe, sx: { borderRadius: "10px", px: 3, textTransform: "none" }, children: c("Search") })
|
|
904
904
|
] }),
|
|
905
905
|
/* @__PURE__ */ e(r, { className: "overflow-y-auto flex-grow border border-gray-150 rounded-xl", children: /* @__PURE__ */ e(
|
|
906
906
|
ue,
|
|
907
907
|
{
|
|
908
908
|
strip: !0,
|
|
909
|
-
columns:
|
|
909
|
+
columns: na,
|
|
910
910
|
tableData: Je,
|
|
911
911
|
paginationConfig: Fe,
|
|
912
912
|
styleConfig: Qe
|
|
@@ -917,25 +917,25 @@ ORDER BY current_tx_age DESC;`
|
|
|
917
917
|
/* @__PURE__ */ t(r, { className: "flex items-center justify-between border-b border-gray-100 pb-3", children: [
|
|
918
918
|
/* @__PURE__ */ t(x, { variant: "h6", fontWeight: "700", className: "flex items-center gap-2.5 text-gray-800", letterSpacing: "-0.4px", children: [
|
|
919
919
|
/* @__PURE__ */ e(l, { icon: ge, className: "text-purple-500 text-lg" }),
|
|
920
|
-
|
|
920
|
+
c("DBA Toolkit")
|
|
921
921
|
] }),
|
|
922
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" }) })
|
|
923
923
|
] }),
|
|
924
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
|
|
926
|
-
return
|
|
925
|
+
const n = Qa.filter((s) => s.category === a);
|
|
926
|
+
return n.length === 0 ? null : /* @__PURE__ */ t(r, { className: "flex flex-col gap-2", children: [
|
|
927
927
|
/* @__PURE__ */ e(x, { variant: "caption", className: "text-slate-400 font-bold uppercase tracking-wider pl-1 text-[11px]", children: a }),
|
|
928
|
-
/* @__PURE__ */ e(r, { className: "grid grid-cols-1 md:grid-cols-2 gap-3", children:
|
|
928
|
+
/* @__PURE__ */ e(r, { className: "grid grid-cols-1 md:grid-cols-2 gap-3", children: n.map((s, o) => /* @__PURE__ */ t(
|
|
929
929
|
r,
|
|
930
930
|
{
|
|
931
931
|
onClick: () => {
|
|
932
|
-
V("query",
|
|
932
|
+
V("query", s.code), M(!1), J(!1), R(0), u({ message: `Injected script: ${s.name}`, type: "success" });
|
|
933
933
|
},
|
|
934
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",
|
|
935
935
|
children: [
|
|
936
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:
|
|
938
|
-
/* @__PURE__ */ e(x, { variant: "caption", className: "text-slate-500 block mt-1 leading-normal", children:
|
|
937
|
+
/* @__PURE__ */ e(x, { variant: "body2", className: "font-bold text-slate-800 group-hover:text-purple-700 transition-colors", children: s.name }),
|
|
938
|
+
/* @__PURE__ */ e(x, { variant: "caption", className: "text-slate-500 block mt-1 leading-normal", children: s.description })
|
|
939
939
|
] }),
|
|
940
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: [
|
|
941
941
|
/* @__PURE__ */ e("span", { children: "Load Into Editor" }),
|
|
@@ -999,7 +999,7 @@ ORDER BY current_tx_age DESC;`
|
|
|
999
999
|
title: "CONFIRM ACTION",
|
|
1000
1000
|
open: C,
|
|
1001
1001
|
handleClick: async () => {
|
|
1002
|
-
C === 1 && v(g), C === 2 &&
|
|
1002
|
+
C === 1 && v(g), C === 2 && Re(g), C === 3 && ca(), E(0);
|
|
1003
1003
|
},
|
|
1004
1004
|
handleClose: () => E(0)
|
|
1005
1005
|
}
|
|
@@ -1009,4 +1009,4 @@ ORDER BY current_tx_age DESC;`
|
|
|
1009
1009
|
export {
|
|
1010
1010
|
ut as default
|
|
1011
1011
|
};
|
|
1012
|
-
//# sourceMappingURL=QueryManagement-
|
|
1012
|
+
//# sourceMappingURL=QueryManagement-BIhEDKuA.js.map
|