@argusoft/medplat-form-engine 1.0.20 → 1.0.22
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/{ChangePasswordModalCore-ClND1mel-CmFNZntP.js → ChangePasswordModalCore-ClND1mel-DIVIXMo9.js} +2 -2
- package/dist/{ChangePasswordModalCore-ClND1mel-CmFNZntP.js.map → ChangePasswordModalCore-ClND1mel-DIVIXMo9.js.map} +1 -1
- package/dist/EventConfigurations-D8juDb29-2lFYlu4y.js +449 -0
- package/dist/EventConfigurations-D8juDb29-2lFYlu4y.js.map +1 -0
- package/dist/{FeatureMenu-CLX8VNZ--BP8v_6V-.js → FeatureMenu-CLX8VNZ--CJbuoMAo.js} +2 -2
- package/dist/{FeatureMenu-CLX8VNZ--BP8v_6V-.js.map → FeatureMenu-CLX8VNZ--CJbuoMAo.js.map} +1 -1
- package/dist/ImmunizationConfigurationBase-BqPTExSk-KtUYd4ce.js +5649 -0
- package/dist/ImmunizationConfigurationBase-BqPTExSk-KtUYd4ce.js.map +1 -0
- package/dist/{ImmunizationConfigurationsList-K2ddBpPJ-un50WS9n.js → ImmunizationConfigurationsList-K2ddBpPJ-BXXtfySZ.js} +17 -17
- package/dist/{ImmunizationConfigurationsList-K2ddBpPJ-un50WS9n.js.map → ImmunizationConfigurationsList-K2ddBpPJ-BXXtfySZ.js.map} +1 -1
- package/dist/LanguagesModal-CX3oS8rk-ZZNlYP-A.js.map +1 -1
- package/dist/{ManageNotification-BUAvg5Ge-Bhydybdr.js → ManageNotification-BUAvg5Ge-CoFSujgQ.js} +2 -2
- package/dist/{ManageNotification-BUAvg5Ge-Bhydybdr.js.map → ManageNotification-BUAvg5Ge-CoFSujgQ.js.map} +1 -1
- package/dist/ManageTranslation-D9IScGhk-DWuYBAs5.js.map +1 -1
- package/dist/{ManageUser-eBS0yC5k-DXVvbH0N.js → ManageUser-eBS0yC5k-Czte7Daw.js} +3 -3
- package/dist/{ManageUser-eBS0yC5k-DXVvbH0N.js.map → ManageUser-eBS0yC5k-Czte7Daw.js.map} +1 -1
- package/dist/{MedplatFormWrapper-C1R9ZJ3u.js → MedplatFormWrapper-BAq0tR-Z.js} +23937 -23308
- package/dist/MedplatFormWrapper-BAq0tR-Z.js.map +1 -0
- package/dist/MedplatFormWrapper.css +1 -1
- package/dist/{NotificationList-CUZSWp2J-DBaOb_L9.js → NotificationList-CUZSWp2J-m3Lea935.js} +23 -23
- package/dist/{NotificationList-CUZSWp2J-DBaOb_L9.js.map → NotificationList-CUZSWp2J-m3Lea935.js.map} +1 -1
- package/dist/QueryBuilder-DXexUIe8-D3hu9ipu.js.map +1 -1
- package/dist/{QueryManagement-B2y23kus-6z3FKq9G.js → QueryManagement-DGHV_-d5-Gd6oGWRf.js} +380 -303
- package/dist/QueryManagement-DGHV_-d5-Gd6oGWRf.js.map +1 -0
- package/dist/{SecurityAuditLogList-DHTcOtbx-B3QyLrA6.js → SecurityAuditLogList-DHTcOtbx-DyRFp2ER.js} +3 -3
- package/dist/{SecurityAuditLogList-DHTcOtbx-B3QyLrA6.js.map → SecurityAuditLogList-DHTcOtbx-DyRFp2ER.js.map} +1 -1
- package/dist/{ServerSyncModal-D_oFpv3C-CGSmzgzH.js → ServerSyncModal-D_oFpv3C-2buxeurB.js} +10 -10
- package/dist/{ServerSyncModal-D_oFpv3C-CGSmzgzH.js.map → ServerSyncModal-D_oFpv3C-2buxeurB.js.map} +1 -1
- package/dist/{SubMenu-BGznOP2a-B88vYIZx.js → SubMenu-BGznOP2a-BShiOQvp.js} +3 -3
- package/dist/{SubMenu-BGznOP2a-B88vYIZx.js.map → SubMenu-BGznOP2a-BShiOQvp.js.map} +1 -1
- package/dist/UserList-BAeAFeXZ-dObYbxZz.js.map +1 -1
- package/dist/{default-D_Nhv5H-.js → default-WLQVhB8h.js} +2 -2
- package/dist/{default-D_Nhv5H-.js.map → default-WLQVhB8h.js.map} +1 -1
- package/dist/{index-BFznsakV-Cqob1b1b.js → index-BFznsakV-Cl4v9jE1.js} +3 -3
- package/dist/{index-BFznsakV-Cqob1b1b.js.map → index-BFznsakV-Cl4v9jE1.js.map} +1 -1
- package/dist/{index-CIs3fGL6.js → index-DbddVURn.js} +154 -154
- package/dist/index-DbddVURn.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/EventConfigurations-DZvSJ5EZ-DjzXbwJS.js +0 -395
- package/dist/EventConfigurations-DZvSJ5EZ-DjzXbwJS.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-VqVvVR57-Ch37h6yS.js +0 -5385
- package/dist/ImmunizationConfigurationBase-VqVvVR57-Ch37h6yS.js.map +0 -1
- package/dist/MedplatFormWrapper-C1R9ZJ3u.js.map +0 -1
- package/dist/QueryManagement-B2y23kus-6z3FKq9G.js.map +0 -1
- package/dist/index-CIs3fGL6.js.map +0 -1
- /package/dist/{EventConfigurations-DZvSJ5EZ.css → EventConfigurations-D8juDb29.css} +0 -0
- /package/dist/{ImmunizationConfigurationBase-VqVvVR57.css → ImmunizationConfigurationBase-BqPTExSk.css} +0 -0
- /package/dist/{QueryManagement-B2y23kus.css → QueryManagement-DGHV_-d5.css} +0 -0
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Box as n, Card as
|
|
4
|
-
import
|
|
5
|
-
import { api as
|
|
6
|
-
import { downloadExcel as
|
|
7
|
-
import { getAssignedFeatures as
|
|
8
|
-
import { useSelector as
|
|
9
|
-
import
|
|
10
|
-
import { useForm as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
2
|
+
import { useState as c, useEffect as oe, useMemo as ke } from "react";
|
|
3
|
+
import { Box as n, Card as F, Typography as u, Tabs as ba, Tab as ie, Chip as W, Button as m, Divider as _a, TextField as Te, InputAdornment as ce, IconButton as K, Modal as G } from "@mui/material";
|
|
4
|
+
import de from "@/common/services/util/GeneralUtil";
|
|
5
|
+
import { api as he } from "@/common/interceptors/AxiosInterceptor";
|
|
6
|
+
import { downloadExcel as Na, execute as wa } from "@/common/services/GlobalApis";
|
|
7
|
+
import { getAssignedFeatures as va } from "@/utils/feature.js";
|
|
8
|
+
import { useSelector as fe } from "react-redux";
|
|
9
|
+
import me from "@/views/custom-components/CustomTextField";
|
|
10
|
+
import { useForm as Sa } from "react-hook-form";
|
|
11
|
+
import Ca from "@/hooks/useTrackEvent";
|
|
12
|
+
import Ea from "@/views/custom-components/CustomConfirmationModal";
|
|
13
13
|
import { showToast as x } from "@/common/toaster/toaster";
|
|
14
|
-
import { C as
|
|
15
|
-
import { useTranslateProvider as
|
|
16
|
-
import
|
|
17
|
-
import { getUseSkeleton as
|
|
18
|
-
import { F as
|
|
19
|
-
import
|
|
20
|
-
import { faTerminal as
|
|
21
|
-
import { FontAwesomeIcon as
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import './QueryManagement-
|
|
14
|
+
import { C as Ra } from "./index-DbddVURn.js";
|
|
15
|
+
import { useTranslateProvider as ka } from "@/common/languageTranslator/TranslationContext";
|
|
16
|
+
import Ae from "prop-types";
|
|
17
|
+
import { getUseSkeleton as We } from "@/store/reducers/SkeletonReducer";
|
|
18
|
+
import { F as Ta } from "./index-B4r0wjBD.js";
|
|
19
|
+
import pe from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
|
|
20
|
+
import { faTerminal as Aa, faTableList as ze, faSitemap as xe, faDatabase as ue, faSlidersH as Oe, faHistory as Le, faLock as za, faTimes as M, faDownload as qe, faPlay as Oa, faSearch as De, faClock as La, faSyncAlt as qa } from "@fortawesome/free-solid-svg-icons";
|
|
21
|
+
import { FontAwesomeIcon as o } from "@fortawesome/react-fontawesome";
|
|
22
|
+
import Da from "lodash/debounce";
|
|
23
|
+
import Ia from "@/assets/gifs/baburao.gif";
|
|
24
|
+
import './QueryManagement-DGHV_-d5.css';const Fa = (p) => he.post("resource/getdatawithtimeout", p), Ie = (p) => he.post("querymanagement/retrieve", p, {
|
|
25
25
|
headers: { "Content-Type": "application/json" },
|
|
26
26
|
transformRequest: [(d) => d]
|
|
27
|
-
}),
|
|
27
|
+
}), Ma = (p) => he.post("querymanagement/execute", p, {
|
|
28
28
|
headers: { "Content-Type": "application/json" },
|
|
29
29
|
transformRequest: [(d) => d]
|
|
30
|
-
}),
|
|
30
|
+
}), He = ({ children: p, loading: d }) => !fe(We) || !d ? p : /* @__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-B2y23kus.css';const za = (m) => ge.post("resource/getd
|
|
|
44
44
|
] })
|
|
45
45
|
] })
|
|
46
46
|
] });
|
|
47
|
-
|
|
48
|
-
children:
|
|
49
|
-
loading:
|
|
47
|
+
He.propTypes = {
|
|
48
|
+
children: Ae.any,
|
|
49
|
+
loading: Ae.any
|
|
50
50
|
};
|
|
51
|
-
const
|
|
51
|
+
const Wa = [
|
|
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
|
-
],
|
|
166
|
+
], Fe = { pagination: !1 }, Me = { tableStyle: { maxHeight: "55vh", borderRadius: "8px" } }, Ha = {
|
|
167
167
|
pagination: !1,
|
|
168
168
|
paginationType: "virtual-scroll"
|
|
169
|
-
},
|
|
169
|
+
}, Ba = { tableStyle: { maxHeight: "62vh", borderRadius: "8px" } }, ge = {
|
|
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
|
-
},
|
|
183
|
-
if (!
|
|
184
|
-
const d =
|
|
182
|
+
}, Be = (p) => {
|
|
183
|
+
if (!p) return 0;
|
|
184
|
+
const d = p.match(/actual\s+time=[\d.]+\.\.([\d.]+)/);
|
|
185
185
|
if (d && d[1]) return parseFloat(d[1]);
|
|
186
|
-
const
|
|
187
|
-
return
|
|
188
|
-
},
|
|
189
|
-
if (!
|
|
190
|
-
const
|
|
186
|
+
const v = p.match(/cost=[\d.]+\.\.([\d.]+)/);
|
|
187
|
+
return v && v[1] ? parseFloat(v[1]) : 0;
|
|
188
|
+
}, ja = ({ rawTextLine: p, totalPlanMetric: d }) => {
|
|
189
|
+
if (!p || !p.trim()) return null;
|
|
190
|
+
const v = p.search(/\S/), L = v > 0 ? Math.floor(v / 2) : 0, A = p.trim(), h = A.includes("Seq Scan"), y = A.includes("Index Scan"), S = A.startsWith("->") || L > 0, C = Be(A), q = d > 0 ? Math.round(C / d * 100) : 0, z = q >= 35;
|
|
191
191
|
return /* @__PURE__ */ t(
|
|
192
192
|
n,
|
|
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
196
|
marginLeft: `${L * 24}px`,
|
|
197
|
-
backgroundColor:
|
|
198
|
-
borderColor:
|
|
199
|
-
borderLeft:
|
|
197
|
+
backgroundColor: z ? "#fff5f5" : h ? "#fef2f2" : y ? "#f0fdf4" : "#ffffff",
|
|
198
|
+
borderColor: z ? "#fecaca" : h ? "#fca5a5" : y ? "#bbf7d0" : "#e2e8f0",
|
|
199
|
+
borderLeft: z ? "5px solid #dc2626" : h ? "5px solid #ef4444" : y ? "5px solid #22c55e" : "1px solid #e2e8f0"
|
|
200
200
|
},
|
|
201
201
|
children: [
|
|
202
202
|
/* @__PURE__ */ t(n, { className: "flex items-center gap-2 overflow-hidden flex-grow", children: [
|
|
203
|
-
|
|
203
|
+
S && /* @__PURE__ */ e("span", { className: "text-gray-400 font-bold select-none", children: "↳" }),
|
|
204
204
|
/* @__PURE__ */ e(
|
|
205
|
-
|
|
205
|
+
u,
|
|
206
206
|
{
|
|
207
207
|
variant: "body2",
|
|
208
208
|
className: "font-mono text-slate-700 font-medium break-all whitespace-pre-wrap",
|
|
209
|
-
sx: { color:
|
|
209
|
+
sx: { color: z || h ? "#991b1b" : y ? "#166534" : "#334155" },
|
|
210
210
|
children: A
|
|
211
211
|
}
|
|
212
212
|
)
|
|
213
213
|
] }),
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
C > 0 && /* @__PURE__ */ e(n, { className: "flex items-center gap-1.5 shrink-0", children: /* @__PURE__ */ e(
|
|
215
|
+
W,
|
|
216
216
|
{
|
|
217
|
-
label: `${
|
|
217
|
+
label: `${q}% cost`,
|
|
218
218
|
size: "small",
|
|
219
|
-
color:
|
|
219
|
+
color: z ? "error" : q > 15 ? "warning" : "default",
|
|
220
220
|
sx: {
|
|
221
221
|
fontSize: "11px",
|
|
222
222
|
fontWeight: "700",
|
|
@@ -228,8 +228,8 @@ ORDER BY current_tx_age DESC;`
|
|
|
228
228
|
]
|
|
229
229
|
}
|
|
230
230
|
);
|
|
231
|
-
},
|
|
232
|
-
const
|
|
231
|
+
}, xt = () => {
|
|
232
|
+
const p = fe(We), [d, v] = c({}), [L, A] = c(null), [h, y] = c(""), [S, C] = c(0), [q, z] = c([]), [_, H] = c([]), [je, $e] = c(!1), { user: V } = fe((a) => a.Authenticate), [B, E] = c(0), [R, j] = c(""), [Pe, $] = c(!1), [Qe, P] = c(!1), [D, Ue] = c([]), [Ye, ye] = c([]), [Je, Ke] = c([]), [be, Ge] = c([]), Q = _.length || null, [U, Ve] = c([]), [_e, Ne] = c(null), O = "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;", we = `select pg_terminate_backend( ${L} )`, X = "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 = " + V.id + ") order by id desc limit 100", { translate: i } = ka(), [Se, Z] = c(!1), [Xe, g] = c(!1), [Ze, ee] = c(!1), [ae, I] = c(!0), [ea, Y] = c(!1), [aa, te] = c(!1), re = async (a, s = null) => {
|
|
233
233
|
let r;
|
|
234
234
|
s === "index" ? r = "SELECT * FROM pg_indexes WHERE tablename = '" + a.tablename + "' limit 100" : s === "ddl" ? r = `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,
|
|
@@ -242,10 +242,10 @@ 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`,
|
|
246
|
-
},
|
|
247
|
-
|
|
248
|
-
},
|
|
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), $(!1), E(0), N(r);
|
|
246
|
+
}, ta = async (a) => {
|
|
247
|
+
y(a.query), J("query", a.query), I(!(a.query && a.query.trim().length > 0)), P(!1), E(0);
|
|
248
|
+
}, ra = [
|
|
249
249
|
{ field: "Sr. No.", label: "#", align: "left" },
|
|
250
250
|
{ field: "size_pretty", label: "Size", align: "left" },
|
|
251
251
|
{ field: "tablename", label: "Table Name", align: "left", onClick: re },
|
|
@@ -253,47 +253,47 @@ ORDER BY current_tx_age DESC;`
|
|
|
253
253
|
field: "Action",
|
|
254
254
|
label: "Action",
|
|
255
255
|
align: "center",
|
|
256
|
-
render: (a) => /* @__PURE__ */ e(
|
|
256
|
+
render: (a) => /* @__PURE__ */ e(m, { variant: "outlined", color: "primary", size: "small", sx: { borderRadius: "6px", textTransform: "none" }, onClick: () => re(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(
|
|
262
|
+
render: (a) => /* @__PURE__ */ e(m, { variant: "outlined", color: "secondary", size: "small", sx: { borderRadius: "6px", textTransform: "none" }, onClick: () => re(a, "ddl"), children: i("DDL") })
|
|
263
263
|
}
|
|
264
|
-
],
|
|
264
|
+
], na = [
|
|
265
265
|
{ field: "Sr. No.", label: "#", align: "left" },
|
|
266
|
-
{ field: "query", label: "Query", align: "left", onClick:
|
|
266
|
+
{ field: "query", label: "Query", align: "left", onClick: ta },
|
|
267
267
|
{ field: "created_on", label: "Executed On", align: "left" }
|
|
268
|
-
], { control:
|
|
268
|
+
], { control: ne, setValue: J, getValues: k, formState: { errors: $a } } = Sa({
|
|
269
269
|
mode: "onChange",
|
|
270
270
|
defaultValues: { excelFileName: "" }
|
|
271
271
|
});
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}, [
|
|
275
|
-
(
|
|
276
|
-
}, [
|
|
277
|
-
const
|
|
272
|
+
oe(() => {
|
|
273
|
+
ye(D);
|
|
274
|
+
}, [D]), oe(() => {
|
|
275
|
+
(h == null ? void 0 : h.length) > 0 ? (I(!1), J("query", h)) : I(!0);
|
|
276
|
+
}, [h]);
|
|
277
|
+
const Ce = Ca(), N = async (a, s = []) => {
|
|
278
278
|
try {
|
|
279
279
|
if (!a) {
|
|
280
280
|
x({ message: "Query can not be empty", type: "error" });
|
|
281
281
|
return;
|
|
282
282
|
}
|
|
283
|
-
|
|
284
|
-
const { data:
|
|
285
|
-
|
|
286
|
-
});
|
|
287
|
-
if (r && !
|
|
288
|
-
|
|
283
|
+
g(!0), j("");
|
|
284
|
+
const r = performance.now(), { data: l } = await Ie(a).catch((f) => {
|
|
285
|
+
H([]), g(!1), Ne(null), x({ message: `${f.response.data.message}`, type: "error" });
|
|
286
|
+
}), w = performance.now();
|
|
287
|
+
if (Ne((w - r).toFixed(0)), l && !l.length) {
|
|
288
|
+
H([]), x({ message: "No data found", type: "info" }), g(!1);
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
|
-
if (
|
|
291
|
+
if (l != null && l.length && a !== O && x({ message: "Query Executed Successfully", type: "success" }), a === O)
|
|
292
292
|
s = [
|
|
293
293
|
{
|
|
294
294
|
label: "KILL PROCESS",
|
|
295
295
|
icon: /* @__PURE__ */ e(
|
|
296
|
-
|
|
296
|
+
m,
|
|
297
297
|
{
|
|
298
298
|
variant: "outlined",
|
|
299
299
|
color: "error",
|
|
@@ -307,175 +307,178 @@ ORDER BY current_tx_age DESC;`
|
|
|
307
307
|
children: i("Kill Query")
|
|
308
308
|
}
|
|
309
309
|
),
|
|
310
|
-
onClick:
|
|
310
|
+
onClick: oa
|
|
311
311
|
}
|
|
312
312
|
];
|
|
313
|
-
else if (a ===
|
|
314
|
-
|
|
313
|
+
else if (a === we) {
|
|
314
|
+
l != null && l.length && x({ message: "Terminated Successfully", type: "success" }), H([]);
|
|
315
315
|
return;
|
|
316
316
|
}
|
|
317
|
-
|
|
318
|
-
const
|
|
319
|
-
(s.length || a ===
|
|
320
|
-
const
|
|
321
|
-
|
|
317
|
+
H(l.map((f, ya) => ({ index: ya + 1, ...f })));
|
|
318
|
+
const b = Object.keys(l[0]);
|
|
319
|
+
(s.length || a === O) && b.push("Actions");
|
|
320
|
+
const T = b.map((f) => ({ field: f, label: f, align: "left" }));
|
|
321
|
+
Ge(s), z([{ field: "index", label: "#", align: "left" }, ...T]), se(), g(!1), E(1);
|
|
322
322
|
} catch {
|
|
323
|
-
|
|
323
|
+
g(!1);
|
|
324
324
|
}
|
|
325
|
-
},
|
|
326
|
-
const a =
|
|
325
|
+
}, sa = async () => {
|
|
326
|
+
const a = k("query");
|
|
327
327
|
if (!a) {
|
|
328
328
|
x({ message: "Query can not be empty", type: "error" });
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
331
|
const s = `EXPLAIN ${a.trim().replace(/;+$/, "")};`;
|
|
332
332
|
try {
|
|
333
|
-
|
|
334
|
-
const { data: r } = await
|
|
335
|
-
var
|
|
336
|
-
|
|
333
|
+
g(!0);
|
|
334
|
+
const { data: r } = await Ie(s).catch((l) => {
|
|
335
|
+
var w, b;
|
|
336
|
+
g(!1), x({ message: `${((b = (w = l.response) == null ? void 0 : w.data) == null ? void 0 : b.message) || "Explain failed"}`, type: "error" });
|
|
337
337
|
});
|
|
338
338
|
if (r && r.length > 0) {
|
|
339
|
-
const
|
|
340
|
-
|
|
339
|
+
const l = Object.keys(r[0])[0], w = r.map((b) => b[l]);
|
|
340
|
+
Ve(w), x({ message: "Explain Plan Calculated", type: "success" }), E(2);
|
|
341
341
|
} else
|
|
342
342
|
x({ message: "No data returned from execution plan", type: "info" });
|
|
343
|
-
|
|
343
|
+
g(!1);
|
|
344
344
|
} catch (r) {
|
|
345
|
-
|
|
345
|
+
g(!1), console.error(r);
|
|
346
346
|
}
|
|
347
|
-
},
|
|
347
|
+
}, Ee = async (a) => {
|
|
348
348
|
try {
|
|
349
349
|
if (!a) {
|
|
350
350
|
x({ message: "Query can not be empty", type: "error" });
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
|
-
const { data: s } = await
|
|
353
|
+
const { data: s } = await Ma(a).catch((r) => {
|
|
354
354
|
x({ message: `${r.response.data.message}`, type: "error" });
|
|
355
355
|
});
|
|
356
356
|
s.length || x({ message: "No data found", type: "info" }), s.length && x({ message: "Query updated successfully", type: "success" });
|
|
357
357
|
} catch (s) {
|
|
358
358
|
console.error(s);
|
|
359
359
|
}
|
|
360
|
-
},
|
|
361
|
-
const a = "d91d249f-c8e1-4397-a84d-6ce6eb33eb48", s =
|
|
360
|
+
}, Re = async () => {
|
|
361
|
+
const a = "d91d249f-c8e1-4397-a84d-6ce6eb33eb48", s = k("query"), r = k("excelFileName");
|
|
362
362
|
if (!s) {
|
|
363
363
|
x({ message: "Query can not be empty", type: "info" });
|
|
364
364
|
return;
|
|
365
365
|
}
|
|
366
366
|
try {
|
|
367
|
-
|
|
368
|
-
const
|
|
369
|
-
if (!
|
|
370
|
-
|
|
367
|
+
g(!0);
|
|
368
|
+
const l = await Na(a, { paramObj: { query: s } }).catch((T) => (x({ message: "Operation Unsuccessful, Something went wrong", type: "error" }), null));
|
|
369
|
+
if (!l) {
|
|
370
|
+
g(!1);
|
|
371
371
|
return;
|
|
372
372
|
}
|
|
373
|
-
const
|
|
373
|
+
const w = new Blob([l.data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), b = `${r || "rename"}_${(/* @__PURE__ */ new Date()).getTime()}.xlsx`;
|
|
374
374
|
if (navigator.msSaveBlob) {
|
|
375
|
-
const
|
|
376
|
-
return
|
|
375
|
+
const T = new Blob([l.data], { type: "" });
|
|
376
|
+
return Ce("file_download", { file_type: "xlsx", file_name: b, file_size: `${(T.size / 1024).toFixed(2)} KB`, download_status: "success" }), navigator.msSaveBlob(T, b);
|
|
377
377
|
} else {
|
|
378
|
-
const
|
|
379
|
-
|
|
378
|
+
const T = URL.createObjectURL(w), f = document.createElement("a");
|
|
379
|
+
f.href = T, f.download = b, f.style.display = "none", document.body.appendChild(f), f.click(), Ce("file_download", { file_type: "xlsx", file_name: b, file_size: `${(w.size / 1024).toFixed(2)} KB`, download_status: "success" }), URL.revokeObjectURL(T), f.remove();
|
|
380
380
|
}
|
|
381
|
-
|
|
381
|
+
g(!1);
|
|
382
382
|
} catch {
|
|
383
|
-
|
|
383
|
+
g(!1), x({ type: "error", message: "Something went wrong!" });
|
|
384
384
|
}
|
|
385
|
-
},
|
|
385
|
+
}, la = async () => {
|
|
386
386
|
try {
|
|
387
|
-
|
|
387
|
+
$e(!0), y(X), await N(X);
|
|
388
388
|
} catch (a) {
|
|
389
389
|
console.error(a);
|
|
390
390
|
}
|
|
391
|
-
},
|
|
392
|
-
|
|
393
|
-
},
|
|
391
|
+
}, oa = async (a) => {
|
|
392
|
+
C(3), A(a.pid);
|
|
393
|
+
}, ia = async () => {
|
|
394
394
|
try {
|
|
395
|
-
await
|
|
395
|
+
await N(we), await N(je ? X : O);
|
|
396
396
|
} catch (a) {
|
|
397
397
|
console.error(a);
|
|
398
398
|
}
|
|
399
|
-
},
|
|
399
|
+
}, ca = async () => {
|
|
400
400
|
try {
|
|
401
|
-
|
|
401
|
+
y(O), await N(O);
|
|
402
402
|
} catch (a) {
|
|
403
403
|
console.error(a);
|
|
404
404
|
}
|
|
405
|
-
},
|
|
405
|
+
}, se = async () => {
|
|
406
406
|
try {
|
|
407
|
-
const a =
|
|
407
|
+
const a = k("queryHistorySearchKey"), { data: s } = await wa({
|
|
408
408
|
code: "retrieve_limited_query_history",
|
|
409
409
|
parameters: { userId: V == null ? void 0 : V.id, limit: 100, searchKey: a }
|
|
410
410
|
});
|
|
411
|
-
|
|
412
|
-
s.result.map((r,
|
|
413
|
-
index:
|
|
411
|
+
Ke(
|
|
412
|
+
s.result.map((r, l) => ({
|
|
413
|
+
index: l + 1,
|
|
414
414
|
...r,
|
|
415
|
-
created_on:
|
|
415
|
+
created_on: Ra(r.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
|
-
},
|
|
421
|
+
}, da = async () => {
|
|
422
422
|
try {
|
|
423
423
|
Z(!0);
|
|
424
|
-
const { data: a } = await
|
|
425
|
-
a &&
|
|
424
|
+
const { data: a } = await va("techo.querymanagement");
|
|
425
|
+
a && v(JSON.parse(a)), await se(), Z(!1);
|
|
426
426
|
} catch {
|
|
427
427
|
Z(!1);
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
|
-
|
|
431
|
-
|
|
430
|
+
oe(() => {
|
|
431
|
+
da();
|
|
432
432
|
}, []);
|
|
433
|
-
const
|
|
434
|
-
|
|
435
|
-
},
|
|
436
|
-
|
|
437
|
-
},
|
|
433
|
+
const ma = async () => {
|
|
434
|
+
$(!0), D.length || await xa();
|
|
435
|
+
}, pa = () => {
|
|
436
|
+
Y(!0);
|
|
437
|
+
}, xa = async () => {
|
|
438
438
|
try {
|
|
439
439
|
ee(!0);
|
|
440
|
-
const { data: a } = await
|
|
441
|
-
|
|
440
|
+
const { data: a } = await Fa({ code: "retrieve_all_tables" });
|
|
441
|
+
Ue(a.result.map((s, r) => ({ index: r + 1, ...s }))), ee(!1);
|
|
442
442
|
} catch {
|
|
443
443
|
ee(!1);
|
|
444
444
|
}
|
|
445
|
-
},
|
|
446
|
-
|
|
447
|
-
},
|
|
448
|
-
() =>
|
|
445
|
+
}, ua = (a) => {
|
|
446
|
+
ga(a.target.value);
|
|
447
|
+
}, ga = ke(
|
|
448
|
+
() => Da((a) => {
|
|
449
449
|
const s = a.toLowerCase();
|
|
450
|
-
|
|
451
|
-
var
|
|
452
|
-
return (
|
|
450
|
+
ye(D.filter((r) => {
|
|
451
|
+
var l;
|
|
452
|
+
return (l = r == null ? void 0 : r.tablename) == null ? void 0 : l.toLowerCase().includes(s);
|
|
453
453
|
}));
|
|
454
454
|
}, 300),
|
|
455
|
-
[
|
|
456
|
-
),
|
|
457
|
-
if (!
|
|
458
|
-
const a =
|
|
459
|
-
return
|
|
460
|
-
}, [
|
|
455
|
+
[D]
|
|
456
|
+
), le = ke(() => {
|
|
457
|
+
if (!R) return _;
|
|
458
|
+
const a = R.toLowerCase().trim();
|
|
459
|
+
return _.filter((s) => Object.entries(s).some(([r, l]) => r === "index" || r === "Actions" ? !1 : String(l ?? "").toLowerCase().includes(a)));
|
|
460
|
+
}, [_, R]), fa = async () => {
|
|
461
|
+
const a = k("query") || h;
|
|
462
|
+
a ? await N(a, be) : x({ message: "No context query found to refresh", type: "warning" });
|
|
463
|
+
}, ha = async () => {
|
|
461
464
|
try {
|
|
462
|
-
|
|
465
|
+
y(ve), await N(ve);
|
|
463
466
|
} catch (a) {
|
|
464
467
|
console.error(a);
|
|
465
468
|
}
|
|
466
469
|
};
|
|
467
|
-
return
|
|
468
|
-
/* @__PURE__ */ e(
|
|
469
|
-
/* @__PURE__ */ e(
|
|
470
|
-
] }) }) : /* @__PURE__ */ t(
|
|
471
|
-
|
|
470
|
+
return de.isTecho && !Se && !(d != null && d["view.manage.querymanagement.retrieve"]) ? /* @__PURE__ */ e(n, { 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
|
+
/* @__PURE__ */ e(u, { variant: "h5", color: "error", fontWeight: "700", letterSpacing: "-0.5px", children: "Access Denied" }),
|
|
472
|
+
/* @__PURE__ */ e(u, { variant: "body2", className: "text-gray-400 mt-2", children: "You don't have permission to view Query Management Tool" })
|
|
473
|
+
] }) }) : /* @__PURE__ */ t(He, { loading: Se, children: [
|
|
474
|
+
Xe && p && /* @__PURE__ */ e("div", { className: "loader-overlay", children: /* @__PURE__ */ e("div", { className: "loader-spinner" }) }),
|
|
472
475
|
/* @__PURE__ */ t(n, { className: "w-full flex flex-col gap-4 mt-2 p-3 min-h-[85vh] bg-[#fdfeff]", children: [
|
|
473
|
-
/* @__PURE__ */ t(
|
|
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
|
-
|
|
478
|
+
ba,
|
|
476
479
|
{
|
|
477
480
|
value: B,
|
|
478
|
-
onChange: (a, s) =>
|
|
481
|
+
onChange: (a, s) => E(s),
|
|
479
482
|
indicatorColor: "primary",
|
|
480
483
|
textColor: "primary",
|
|
481
484
|
sx: {
|
|
@@ -484,31 +487,31 @@ ORDER BY current_tx_age DESC;`
|
|
|
484
487
|
},
|
|
485
488
|
children: [
|
|
486
489
|
/* @__PURE__ */ e(
|
|
487
|
-
|
|
490
|
+
ie,
|
|
488
491
|
{
|
|
489
492
|
label: /* @__PURE__ */ t(n, { className: "flex items-center gap-2", children: [
|
|
490
|
-
/* @__PURE__ */ e(
|
|
493
|
+
/* @__PURE__ */ e(o, { icon: Aa, className: "text-xs opacity-80" }),
|
|
491
494
|
/* @__PURE__ */ e("span", { children: i("Query Console") })
|
|
492
495
|
] })
|
|
493
496
|
}
|
|
494
497
|
),
|
|
495
498
|
/* @__PURE__ */ e(
|
|
496
|
-
|
|
499
|
+
ie,
|
|
497
500
|
{
|
|
498
501
|
label: /* @__PURE__ */ t(n, { className: "flex items-center gap-2", children: [
|
|
499
|
-
/* @__PURE__ */ e(
|
|
502
|
+
/* @__PURE__ */ e(o, { icon: ze, className: "text-xs opacity-80" }),
|
|
500
503
|
/* @__PURE__ */ e("span", { children: i("Results Layer") }),
|
|
501
|
-
!!
|
|
504
|
+
!!Q && /* @__PURE__ */ e(W, { label: Q, size: "small", color: "primary", sx: { height: 18, fontSize: "10px", fontWeight: "bold" } })
|
|
502
505
|
] })
|
|
503
506
|
}
|
|
504
507
|
),
|
|
505
508
|
/* @__PURE__ */ e(
|
|
506
|
-
|
|
509
|
+
ie,
|
|
507
510
|
{
|
|
508
511
|
label: /* @__PURE__ */ t(n, { className: "flex items-center gap-2", children: [
|
|
509
|
-
/* @__PURE__ */ e(
|
|
512
|
+
/* @__PURE__ */ e(o, { icon: xe, className: "text-xs text-indigo-500 opacity-90" }),
|
|
510
513
|
/* @__PURE__ */ e("span", { children: i("Query Plan") }),
|
|
511
|
-
|
|
514
|
+
U.length > 0 && /* @__PURE__ */ e(W, { label: "Ready", size: "small", color: "info", sx: { height: 18, fontSize: "9px", fontWeight: "bold" } })
|
|
512
515
|
] })
|
|
513
516
|
}
|
|
514
517
|
)
|
|
@@ -516,47 +519,47 @@ ORDER BY current_tx_age DESC;`
|
|
|
516
519
|
}
|
|
517
520
|
),
|
|
518
521
|
/* @__PURE__ */ t(n, { className: "flex flex-wrap items-center gap-2.5", children: [
|
|
519
|
-
/* @__PURE__ */ t(
|
|
520
|
-
/* @__PURE__ */ e(
|
|
522
|
+
/* @__PURE__ */ t(m, { variant: "outlined", color: "inherit", size: "small", onClick: ma, className: "h-[36px] border-gray-300 hover:bg-gray-50 text-gray-700", sx: { textTransform: "none", borderRadius: "8px", fontWeight: 500 }, children: [
|
|
523
|
+
/* @__PURE__ */ e(o, { icon: ue, className: "mr-2 text-blue-500" }),
|
|
521
524
|
i("Tables Explorer")
|
|
522
525
|
] }),
|
|
523
|
-
/* @__PURE__ */ t(
|
|
524
|
-
/* @__PURE__ */ e(
|
|
526
|
+
/* @__PURE__ */ t(m, { 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: [
|
|
527
|
+
/* @__PURE__ */ e(o, { icon: Oe, className: "mr-2 text-blue-500" }),
|
|
525
528
|
i("DBA Toolkit")
|
|
526
529
|
] }),
|
|
527
|
-
/* @__PURE__ */ t(
|
|
528
|
-
/* @__PURE__ */ e(
|
|
530
|
+
/* @__PURE__ */ t(m, { variant: "outlined", color: "inherit", size: "small", onClick: () => P(!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(o, { icon: Le, className: "mr-2 text-purple-500" }),
|
|
529
532
|
i("Query History")
|
|
530
533
|
] }),
|
|
531
|
-
/* @__PURE__ */ e(
|
|
532
|
-
/* @__PURE__ */ t(
|
|
533
|
-
/* @__PURE__ */ e(
|
|
534
|
+
/* @__PURE__ */ e(_a, { orientation: "vertical", flexItem: !0, className: "hidden md:block my-1" }),
|
|
535
|
+
/* @__PURE__ */ t(m, { size: "small", color: "secondary", onClick: la, className: "h-[34px] font-semibold text-xs text-gray-500", sx: { textTransform: "none" }, children: [
|
|
536
|
+
/* @__PURE__ */ e(o, { icon: za, className: "mr-1 text-amber-500 text-[10px]" }),
|
|
534
537
|
" ",
|
|
535
538
|
i("Locked Queries")
|
|
536
539
|
] }),
|
|
537
|
-
/* @__PURE__ */ t(
|
|
538
|
-
/* @__PURE__ */ e(
|
|
540
|
+
/* @__PURE__ */ t(m, { size: "small", color: "secondary", onClick: ca, className: "h-[34px] font-semibold text-xs text-gray-500", sx: { textTransform: "none" }, children: [
|
|
541
|
+
/* @__PURE__ */ e(o, { icon: Oe, className: "mr-1 text-teal-500 text-[10px]" }),
|
|
539
542
|
" ",
|
|
540
543
|
i("Active Queries")
|
|
541
544
|
] }),
|
|
542
|
-
/* @__PURE__ */ t(
|
|
543
|
-
/* @__PURE__ */ e(
|
|
545
|
+
/* @__PURE__ */ t(m, { size: "small", color: "secondary", onClick: ha, className: "h-[34px] font-semibold text-xs text-gray-500", sx: { textTransform: "none" }, children: [
|
|
546
|
+
/* @__PURE__ */ e(o, { icon: M, className: "mr-1 text-teal-500 text-[10px]" }),
|
|
544
547
|
" ",
|
|
545
548
|
i("Recent Exceptions")
|
|
546
549
|
] })
|
|
547
550
|
] })
|
|
548
551
|
] }),
|
|
549
552
|
/* @__PURE__ */ t(n, { className: "flex-grow flex flex-col", children: [
|
|
550
|
-
B === 0 && /* @__PURE__ */ t(
|
|
553
|
+
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
554
|
/* @__PURE__ */ e(n, { className: "flex-grow relative rounded-xl overflow-hidden border border-gray-200 shadow-inner bg-[#fffffe] h-[400px]", children: /* @__PURE__ */ e(
|
|
552
|
-
|
|
555
|
+
Ta,
|
|
553
556
|
{
|
|
554
557
|
height: "100%",
|
|
555
558
|
defaultLanguage: "sql",
|
|
556
559
|
theme: "vs-light",
|
|
557
|
-
value:
|
|
560
|
+
value: k("query") || "",
|
|
558
561
|
onChange: (a) => {
|
|
559
|
-
|
|
562
|
+
J("query", a || ""), I(!(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"
|
|
@@ -578,11 +580,11 @@ ORDER BY current_tx_age DESC;`
|
|
|
578
580
|
/* @__PURE__ */ t(n, { className: "flex flex-wrap items-center justify-between gap-3 pt-3 border-t border-gray-100", children: [
|
|
579
581
|
/* @__PURE__ */ t(n, { 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
|
-
|
|
583
|
+
me,
|
|
582
584
|
{
|
|
583
585
|
id: "excelFileName",
|
|
584
586
|
name: "excelFileName",
|
|
585
|
-
control:
|
|
587
|
+
control: ne,
|
|
586
588
|
placeholder: "Export sheet filename...",
|
|
587
589
|
size: "small",
|
|
588
590
|
className: "max-w-[220px] bg-white",
|
|
@@ -590,11 +592,11 @@ ORDER BY current_tx_age DESC;`
|
|
|
590
592
|
}
|
|
591
593
|
),
|
|
592
594
|
/* @__PURE__ */ t(
|
|
593
|
-
|
|
595
|
+
m,
|
|
594
596
|
{
|
|
595
597
|
variant: "outlined",
|
|
596
598
|
color: "inherit",
|
|
597
|
-
onClick:
|
|
599
|
+
onClick: Re,
|
|
598
600
|
className: "border-gray-300 text-gray-700 hover:bg-white",
|
|
599
601
|
sx: {
|
|
600
602
|
textTransform: "none",
|
|
@@ -610,15 +612,15 @@ ORDER BY current_tx_age DESC;`
|
|
|
610
612
|
lineHeight: 1
|
|
611
613
|
},
|
|
612
614
|
children: [
|
|
613
|
-
/* @__PURE__ */ e(
|
|
615
|
+
/* @__PURE__ */ e(o, { icon: qe, className: "mr-2 text-gray-400" }),
|
|
614
616
|
"Spreadsheet"
|
|
615
617
|
]
|
|
616
618
|
}
|
|
617
619
|
)
|
|
618
620
|
] }),
|
|
619
621
|
/* @__PURE__ */ t(n, { className: "flex gap-2.5", children: [
|
|
620
|
-
(!
|
|
621
|
-
|
|
622
|
+
(!de.isTecho || (d == null ? void 0 : d["view.manage.querymanagement.execute"])) && /* @__PURE__ */ e(
|
|
623
|
+
m,
|
|
622
624
|
{
|
|
623
625
|
variant: "outlined",
|
|
624
626
|
color: "secondary",
|
|
@@ -626,28 +628,28 @@ 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 =
|
|
630
|
-
|
|
631
|
+
const a = k("query");
|
|
632
|
+
y(a), a != null && a.toLowerCase().includes("where") ? await Ee(a) : C(2);
|
|
631
633
|
},
|
|
632
634
|
children: i("Execute Command")
|
|
633
635
|
}
|
|
634
636
|
),
|
|
635
637
|
/* @__PURE__ */ t(
|
|
636
|
-
|
|
638
|
+
m,
|
|
637
639
|
{
|
|
638
640
|
variant: "outlined",
|
|
639
641
|
disabled: ae,
|
|
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:
|
|
644
|
+
onClick: sa,
|
|
643
645
|
children: [
|
|
644
|
-
/* @__PURE__ */ e(
|
|
646
|
+
/* @__PURE__ */ e(o, { icon: xe, className: "mr-2 text-xs" }),
|
|
645
647
|
i("Explain Plan")
|
|
646
648
|
]
|
|
647
649
|
}
|
|
648
650
|
),
|
|
649
|
-
(!
|
|
650
|
-
|
|
651
|
+
(!de.isTecho || (d == null ? void 0 : d["view.manage.querymanagement.retrieve"])) && /* @__PURE__ */ t(
|
|
652
|
+
m,
|
|
651
653
|
{
|
|
652
654
|
variant: "contained",
|
|
653
655
|
color: "success",
|
|
@@ -655,18 +657,18 @@ 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 =
|
|
659
|
-
|
|
660
|
+
const a = k("query");
|
|
661
|
+
y(a);
|
|
660
662
|
const s = (a == null ? void 0 : a.toLowerCase().trim()) || "";
|
|
661
663
|
if (/\b(drop|truncate|delete|update)\b/.test(s)) {
|
|
662
664
|
te(!0);
|
|
663
665
|
return;
|
|
664
666
|
}
|
|
665
|
-
const r = s.startsWith("select"),
|
|
666
|
-
r && !
|
|
667
|
+
const r = s.startsWith("select"), l = s.includes("where");
|
|
668
|
+
r && !l ? C(1) : await N(a);
|
|
667
669
|
},
|
|
668
670
|
children: [
|
|
669
|
-
/* @__PURE__ */ e(
|
|
671
|
+
/* @__PURE__ */ e(o, { icon: Oa, className: "mr-2 text-xs" }),
|
|
670
672
|
i("Retrieve Data")
|
|
671
673
|
]
|
|
672
674
|
}
|
|
@@ -674,73 +676,148 @@ ORDER BY current_tx_age DESC;`
|
|
|
674
676
|
] })
|
|
675
677
|
] })
|
|
676
678
|
] }),
|
|
677
|
-
B === 1 && /* @__PURE__ */ t(
|
|
678
|
-
/* @__PURE__ */ e(n, { className: "flex flex-wrap items-center justify-between border-b border-gray-100 pb-3 mb-3 gap-3", children:
|
|
679
|
-
/* @__PURE__ */
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
679
|
+
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: [
|
|
680
|
+
/* @__PURE__ */ e(n, { className: "flex flex-wrap items-center justify-between border-b border-gray-100 pb-3 mb-3 gap-3", children: _.length > 0 && /* @__PURE__ */ t(n, { className: "flex flex-wrap items-center justify-between w-full gap-3", children: [
|
|
681
|
+
/* @__PURE__ */ t(n, { className: "flex items-center gap-3 w-full sm:w-auto", children: [
|
|
682
|
+
/* @__PURE__ */ e(
|
|
683
|
+
Te,
|
|
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(ce, { position: "start", children: /* @__PURE__ */ e(o, { icon: De, className: "text-gray-400 text-xs" }) }),
|
|
696
|
+
endAdornment: R && /* @__PURE__ */ e(ce, { position: "end", children: /* @__PURE__ */ e(K, { size: "small", onClick: () => j(""), edge: "end", children: /* @__PURE__ */ e(o, { icon: M, className: "text-[10px]" }) }) })
|
|
697
|
+
}
|
|
694
698
|
}
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
699
|
+
),
|
|
700
|
+
/* @__PURE__ */ e(
|
|
701
|
+
W,
|
|
702
|
+
{
|
|
703
|
+
label: R ? `${i("Matches")}: ${le.length} / ${Q}` : `${i("Records Loaded")}: ${Q}`,
|
|
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
|
+
_e && /* @__PURE__ */ e(
|
|
711
|
+
W,
|
|
712
|
+
{
|
|
713
|
+
icon: /* @__PURE__ */ e(o, { icon: La, style: { fontSize: "11px", color: "#475569" } }),
|
|
714
|
+
label: `${_e} 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(n, { className: "flex flex-wrap items-center gap-2.5 ml-auto", children: [
|
|
728
|
+
/* @__PURE__ */ t(
|
|
729
|
+
m,
|
|
730
|
+
{
|
|
731
|
+
variant: "outlined",
|
|
732
|
+
color: "inherit",
|
|
733
|
+
size: "small",
|
|
734
|
+
onClick: fa,
|
|
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(o, { icon: qa, className: "mr-2 text-teal-600" }),
|
|
739
|
+
i("Refresh")
|
|
740
|
+
]
|
|
741
|
+
}
|
|
742
|
+
),
|
|
743
|
+
/* @__PURE__ */ t(n, { 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
|
+
me,
|
|
746
|
+
{
|
|
747
|
+
id: "excelFileName",
|
|
748
|
+
name: "excelFileName",
|
|
749
|
+
control: ne,
|
|
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
|
+
m,
|
|
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(o, { icon: qe, className: "mr-2 text-blue-600" }),
|
|
778
|
+
i("Spreadsheet")
|
|
779
|
+
]
|
|
780
|
+
}
|
|
781
|
+
)
|
|
782
|
+
] })
|
|
783
|
+
] })
|
|
707
784
|
] }) }),
|
|
708
|
-
|
|
709
|
-
|
|
785
|
+
le.length ? /* @__PURE__ */ e(n, { className: "w-full overflow-x-auto flex-grow border border-gray-150 rounded-xl", children: /* @__PURE__ */ e(
|
|
786
|
+
pe,
|
|
710
787
|
{
|
|
711
788
|
className: "min-w-[600px]",
|
|
712
|
-
columns:
|
|
713
|
-
actions:
|
|
714
|
-
tableData:
|
|
715
|
-
paginationConfig:
|
|
716
|
-
styleConfig:
|
|
789
|
+
columns: q,
|
|
790
|
+
actions: be,
|
|
791
|
+
tableData: le,
|
|
792
|
+
paginationConfig: Ha,
|
|
793
|
+
styleConfig: Ba
|
|
717
794
|
}
|
|
718
795
|
) }) : /* @__PURE__ */ t(n, { 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(
|
|
720
|
-
/* @__PURE__ */ e(
|
|
721
|
-
/* @__PURE__ */ e(
|
|
796
|
+
/* @__PURE__ */ e(o, { icon: ze, size: "2x", className: "mb-3 text-gray-300" }),
|
|
797
|
+
/* @__PURE__ */ e(u, { variant: "body2", fontWeight: "600", className: "text-gray-600", children: _.length > 0 ? "No Matching Metadata Fields" : "No Active Dataset Displayed" }),
|
|
798
|
+
/* @__PURE__ */ e(u, { variant: "caption", className: "mt-1 text-gray-400 max-w-xs text-center", children: _.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
|
+
m,
|
|
724
801
|
{
|
|
725
802
|
variant: "outlined",
|
|
726
803
|
size: "small",
|
|
727
804
|
color: "inherit",
|
|
728
805
|
onClick: () => {
|
|
729
|
-
|
|
806
|
+
_.length > 0 ? j("") : E(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:
|
|
810
|
+
children: _.length > 0 ? "Reset Matrix Filter" : "Go to Query Workspace"
|
|
734
811
|
}
|
|
735
812
|
)
|
|
736
813
|
] })
|
|
737
814
|
] }),
|
|
738
|
-
B === 2 && /* @__PURE__ */ e(
|
|
739
|
-
/* @__PURE__ */ e(
|
|
815
|
+
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: U.length > 0 ? /* @__PURE__ */ t(n, { className: "flex flex-col flex-grow w-full", children: [
|
|
816
|
+
/* @__PURE__ */ e(u, { 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
817
|
/* @__PURE__ */ e(n, { 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 =
|
|
742
|
-
return
|
|
743
|
-
|
|
818
|
+
const a = Be(U[0]);
|
|
819
|
+
return U.map((s, r) => /* @__PURE__ */ e(
|
|
820
|
+
ja,
|
|
744
821
|
{
|
|
745
822
|
rawTextLine: s,
|
|
746
823
|
totalPlanMetric: a
|
|
@@ -749,16 +826,16 @@ ORDER BY current_tx_age DESC;`
|
|
|
749
826
|
));
|
|
750
827
|
})() })
|
|
751
828
|
] }) : /* @__PURE__ */ t(n, { 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(
|
|
753
|
-
/* @__PURE__ */ e(
|
|
754
|
-
/* @__PURE__ */ e(
|
|
829
|
+
/* @__PURE__ */ e(o, { icon: xe, size: "2x", className: "mb-3 text-indigo-300" }),
|
|
830
|
+
/* @__PURE__ */ e(u, { variant: "body2", fontWeight: "600", className: "text-gray-600", children: "No Query Plan Loaded" }),
|
|
831
|
+
/* @__PURE__ */ e(u, { 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(
|
|
756
|
-
|
|
833
|
+
m,
|
|
757
834
|
{
|
|
758
835
|
variant: "outlined",
|
|
759
836
|
size: "small",
|
|
760
837
|
color: "primary",
|
|
761
|
-
onClick: () =>
|
|
838
|
+
onClick: () => E(0),
|
|
762
839
|
className: "mt-4",
|
|
763
840
|
sx: { textTransform: "none", borderRadius: "8px" },
|
|
764
841
|
children: "Go to Query Console"
|
|
@@ -767,98 +844,98 @@ ORDER BY current_tx_age DESC;`
|
|
|
767
844
|
] }) })
|
|
768
845
|
] })
|
|
769
846
|
] }),
|
|
770
|
-
/* @__PURE__ */ e(
|
|
847
|
+
/* @__PURE__ */ e(G, { open: Pe, onClose: () => $(!1), children: /* @__PURE__ */ t(n, { sx: ge, className: "flex flex-col gap-4 max-h-[85vh]", children: [
|
|
771
848
|
/* @__PURE__ */ t(n, { className: "flex items-center justify-between border-b border-gray-100 pb-3", children: [
|
|
772
|
-
/* @__PURE__ */ t(
|
|
773
|
-
/* @__PURE__ */ e(
|
|
849
|
+
/* @__PURE__ */ t(u, { variant: "h6", fontWeight: "700", className: "flex items-center gap-2.5 text-gray-800", letterSpacing: "-0.4px", children: [
|
|
850
|
+
/* @__PURE__ */ e(o, { icon: ue, className: "text-blue-500 text-lg" }),
|
|
774
851
|
" ",
|
|
775
852
|
i("Tables Explorer")
|
|
776
853
|
] }),
|
|
777
|
-
/* @__PURE__ */ e(
|
|
854
|
+
/* @__PURE__ */ e(K, { onClick: () => $(!1), size: "small", className: "hover:bg-gray-100", children: /* @__PURE__ */ e(o, { icon: M, className: "text-sm text-gray-400" }) })
|
|
778
855
|
] }),
|
|
779
856
|
/* @__PURE__ */ e(
|
|
780
|
-
|
|
857
|
+
Te,
|
|
781
858
|
{
|
|
782
859
|
fullWidth: !0,
|
|
783
|
-
onChange:
|
|
860
|
+
onChange: ua,
|
|
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(
|
|
865
|
+
startAdornment: /* @__PURE__ */ e(ce, { position: "start", children: /* @__PURE__ */ e(o, { icon: De, className: "text-gray-400 text-xs" }) })
|
|
789
866
|
}
|
|
790
867
|
}
|
|
791
868
|
),
|
|
792
869
|
/* @__PURE__ */ e(n, { className: "overflow-y-auto flex-grow border border-gray-100 rounded-xl", children: /* @__PURE__ */ e(
|
|
793
|
-
|
|
870
|
+
pe,
|
|
794
871
|
{
|
|
795
872
|
strip: !0,
|
|
796
|
-
isLoading:
|
|
797
|
-
columns:
|
|
798
|
-
tableData:
|
|
799
|
-
paginationConfig:
|
|
800
|
-
styleConfig:
|
|
873
|
+
isLoading: Ze,
|
|
874
|
+
columns: ra,
|
|
875
|
+
tableData: Ye,
|
|
876
|
+
paginationConfig: Fe,
|
|
877
|
+
styleConfig: Me
|
|
801
878
|
}
|
|
802
879
|
) })
|
|
803
880
|
] }) }),
|
|
804
|
-
/* @__PURE__ */ e(
|
|
881
|
+
/* @__PURE__ */ e(G, { open: Qe, onClose: () => P(!1), children: /* @__PURE__ */ t(n, { sx: ge, className: "flex flex-col gap-4 max-h-[85vh]", children: [
|
|
805
882
|
/* @__PURE__ */ t(n, { className: "flex items-center justify-between border-b border-gray-100 pb-3", children: [
|
|
806
|
-
/* @__PURE__ */ t(
|
|
807
|
-
/* @__PURE__ */ e(
|
|
883
|
+
/* @__PURE__ */ t(u, { variant: "h6", fontWeight: "700", className: "flex items-center gap-2.5 text-gray-800", letterSpacing: "-0.4px", children: [
|
|
884
|
+
/* @__PURE__ */ e(o, { icon: Le, className: "text-purple-500 text-lg" }),
|
|
808
885
|
" ",
|
|
809
886
|
i("Query History")
|
|
810
887
|
] }),
|
|
811
|
-
/* @__PURE__ */ e(
|
|
888
|
+
/* @__PURE__ */ e(K, { onClick: () => P(!1), size: "small", className: "hover:bg-gray-100", children: /* @__PURE__ */ e(o, { icon: M, className: "text-sm text-gray-400" }) })
|
|
812
889
|
] }),
|
|
813
890
|
/* @__PURE__ */ t(n, { className: "flex gap-2.5", children: [
|
|
814
891
|
/* @__PURE__ */ e(
|
|
815
|
-
|
|
892
|
+
me,
|
|
816
893
|
{
|
|
817
894
|
id: "queryHistorySearchKey",
|
|
818
895
|
name: "queryHistorySearchKey",
|
|
819
|
-
control:
|
|
896
|
+
control: ne,
|
|
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(
|
|
903
|
+
/* @__PURE__ */ e(m, { variant: "contained", color: "primary", onClick: se, sx: { borderRadius: "10px", px: 3, textTransform: "none" }, children: i("Search") })
|
|
827
904
|
] }),
|
|
828
905
|
/* @__PURE__ */ e(n, { className: "overflow-y-auto flex-grow border border-gray-150 rounded-xl", children: /* @__PURE__ */ e(
|
|
829
|
-
|
|
906
|
+
pe,
|
|
830
907
|
{
|
|
831
908
|
strip: !0,
|
|
832
|
-
columns:
|
|
833
|
-
tableData:
|
|
834
|
-
paginationConfig:
|
|
835
|
-
styleConfig:
|
|
909
|
+
columns: na,
|
|
910
|
+
tableData: Je,
|
|
911
|
+
paginationConfig: Fe,
|
|
912
|
+
styleConfig: Me
|
|
836
913
|
}
|
|
837
914
|
) })
|
|
838
915
|
] }) }),
|
|
839
|
-
/* @__PURE__ */ e(
|
|
916
|
+
/* @__PURE__ */ e(G, { open: ea, onClose: () => Y(!1), children: /* @__PURE__ */ t(n, { sx: ge, className: "flex flex-col gap-4 max-h-[85vh]", children: [
|
|
840
917
|
/* @__PURE__ */ t(n, { className: "flex items-center justify-between border-b border-gray-100 pb-3", children: [
|
|
841
|
-
/* @__PURE__ */ t(
|
|
842
|
-
/* @__PURE__ */ e(
|
|
918
|
+
/* @__PURE__ */ t(u, { variant: "h6", fontWeight: "700", className: "flex items-center gap-2.5 text-gray-800", letterSpacing: "-0.4px", children: [
|
|
919
|
+
/* @__PURE__ */ e(o, { icon: ue, className: "text-purple-500 text-lg" }),
|
|
843
920
|
i("DBA Toolkit")
|
|
844
921
|
] }),
|
|
845
|
-
/* @__PURE__ */ e(
|
|
922
|
+
/* @__PURE__ */ e(K, { onClick: () => Y(!1), size: "small", className: "hover:bg-gray-100", children: /* @__PURE__ */ e(o, { icon: M, className: "text-sm text-gray-400" }) })
|
|
846
923
|
] }),
|
|
847
924
|
/* @__PURE__ */ e(n, { 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 s =
|
|
925
|
+
const s = Wa.filter((r) => r.category === a);
|
|
849
926
|
return s.length === 0 ? null : /* @__PURE__ */ t(n, { className: "flex flex-col gap-2", children: [
|
|
850
|
-
/* @__PURE__ */ e(
|
|
851
|
-
/* @__PURE__ */ e(n, { className: "grid grid-cols-1 md:grid-cols-2 gap-3", children: s.map((r,
|
|
927
|
+
/* @__PURE__ */ e(u, { variant: "caption", className: "text-slate-400 font-bold uppercase tracking-wider pl-1 text-[11px]", children: a }),
|
|
928
|
+
/* @__PURE__ */ e(n, { className: "grid grid-cols-1 md:grid-cols-2 gap-3", children: s.map((r, l) => /* @__PURE__ */ t(
|
|
852
929
|
n,
|
|
853
930
|
{
|
|
854
931
|
onClick: () => {
|
|
855
|
-
|
|
932
|
+
J("query", r.code), I(!1), Y(!1), E(0), x({ message: `Injected script: ${r.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
936
|
/* @__PURE__ */ t(n, { children: [
|
|
860
|
-
/* @__PURE__ */ e(
|
|
861
|
-
/* @__PURE__ */ e(
|
|
937
|
+
/* @__PURE__ */ e(u, { variant: "body2", className: "font-bold text-slate-800 group-hover:text-purple-700 transition-colors", children: r.name }),
|
|
938
|
+
/* @__PURE__ */ e(u, { variant: "caption", className: "text-slate-500 block mt-1 leading-normal", children: r.description })
|
|
862
939
|
] }),
|
|
863
940
|
/* @__PURE__ */ t(n, { 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" }),
|
|
@@ -866,15 +943,15 @@ ORDER BY current_tx_age DESC;`
|
|
|
866
943
|
] })
|
|
867
944
|
]
|
|
868
945
|
},
|
|
869
|
-
|
|
946
|
+
l
|
|
870
947
|
)) })
|
|
871
948
|
] }, a);
|
|
872
949
|
}) })
|
|
873
950
|
] }) }),
|
|
874
951
|
/* @__PURE__ */ e(
|
|
875
|
-
|
|
952
|
+
G,
|
|
876
953
|
{
|
|
877
|
-
open:
|
|
954
|
+
open: aa,
|
|
878
955
|
onClose: () => te(!1),
|
|
879
956
|
sx: { display: "flex", alignItems: "center", justifyContent: "center" },
|
|
880
957
|
children: /* @__PURE__ */ t(
|
|
@@ -890,18 +967,18 @@ ORDER BY current_tx_age DESC;`
|
|
|
890
967
|
outline: "none"
|
|
891
968
|
},
|
|
892
969
|
children: [
|
|
893
|
-
/* @__PURE__ */ e(
|
|
970
|
+
/* @__PURE__ */ e(u, { variant: "h5", color: "error", fontWeight: "700", sx: { mb: 2 }, children: "🛑 ACCESS DENIED!" }),
|
|
894
971
|
/* @__PURE__ */ e(
|
|
895
972
|
"img",
|
|
896
973
|
{
|
|
897
|
-
src:
|
|
974
|
+
src: Ia,
|
|
898
975
|
alt: "baburao",
|
|
899
976
|
style: { width: "100%", borderRadius: "8px", marginBottom: "16px" }
|
|
900
977
|
}
|
|
901
978
|
),
|
|
902
|
-
/* @__PURE__ */ e(
|
|
979
|
+
/* @__PURE__ */ e(u, { variant: "body2", className: "text-gray-600 mb-4", children: "Nice try! Attempting to commit such acts from a data retrieval screen is strictly forbidden by the DBA overlords." }),
|
|
903
980
|
/* @__PURE__ */ e(
|
|
904
|
-
|
|
981
|
+
m,
|
|
905
982
|
{
|
|
906
983
|
variant: "contained",
|
|
907
984
|
color: "error",
|
|
@@ -915,21 +992,21 @@ ORDER BY current_tx_age DESC;`
|
|
|
915
992
|
)
|
|
916
993
|
}
|
|
917
994
|
),
|
|
918
|
-
!!
|
|
919
|
-
|
|
995
|
+
!!S && /* @__PURE__ */ e(
|
|
996
|
+
Ea,
|
|
920
997
|
{
|
|
921
|
-
description:
|
|
998
|
+
description: S === 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:
|
|
1000
|
+
open: S,
|
|
924
1001
|
handleClick: async () => {
|
|
925
|
-
|
|
1002
|
+
S === 1 && N(h), S === 2 && Ee(h), S === 3 && ia(), C(0);
|
|
926
1003
|
},
|
|
927
|
-
handleClose: () =>
|
|
1004
|
+
handleClose: () => C(0)
|
|
928
1005
|
}
|
|
929
1006
|
)
|
|
930
1007
|
] });
|
|
931
1008
|
};
|
|
932
1009
|
export {
|
|
933
|
-
|
|
1010
|
+
xt as default
|
|
934
1011
|
};
|
|
935
|
-
//# sourceMappingURL=QueryManagement-
|
|
1012
|
+
//# sourceMappingURL=QueryManagement-DGHV_-d5-Gd6oGWRf.js.map
|