@hawtio/ai-plugin 0.1.5 → 0.1.6
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/CHANGELOG.md +7 -0
- package/dist/index.js +30 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.1.6](///compare/v0.1.5...v0.1.6) (2026-05-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* make attribute modal open automatically after diagnosis finished 06725b6
|
|
11
|
+
|
|
5
12
|
## [0.1.5](///compare/v0.1.1...v0.1.5) (2026-05-01)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.js
CHANGED
|
@@ -15925,12 +15925,15 @@ var init_Attributes = __esm({
|
|
|
15925
15925
|
setAttributes(attrs);
|
|
15926
15926
|
setIsReading(false);
|
|
15927
15927
|
});
|
|
15928
|
-
attributeService.register(
|
|
15929
|
-
|
|
15930
|
-
|
|
15931
|
-
|
|
15928
|
+
attributeService.register(
|
|
15929
|
+
{ type: "read", mbean: objectName },
|
|
15930
|
+
(response) => {
|
|
15931
|
+
if (response && !Jolokia.isError(response)) {
|
|
15932
|
+
log.debug("Scheduler - Attributes:", response.value);
|
|
15933
|
+
setAttributes(response.value);
|
|
15934
|
+
}
|
|
15932
15935
|
}
|
|
15933
|
-
|
|
15936
|
+
);
|
|
15934
15937
|
return () => attributeService.unregisterAll();
|
|
15935
15938
|
}, [selectedNode]);
|
|
15936
15939
|
(0, import_react10.useEffect)(() => {
|
|
@@ -15965,6 +15968,16 @@ var init_Attributes = __esm({
|
|
|
15965
15968
|
setIsModalOpen(true);
|
|
15966
15969
|
}
|
|
15967
15970
|
};
|
|
15971
|
+
const showDiagnosisResult = () => {
|
|
15972
|
+
if (!isModalOpen && Object.keys(attributes).length > 0) {
|
|
15973
|
+
if (!isAttributeSelected) {
|
|
15974
|
+
const name2 = Object.keys(attributes).sort((a, b) => a > b ? 1 : -1)[0];
|
|
15975
|
+
setSelected({ name: name2, value: String(attributes[name2]) });
|
|
15976
|
+
setIsAttributeSelected(true);
|
|
15977
|
+
}
|
|
15978
|
+
setIsModalOpen(true);
|
|
15979
|
+
}
|
|
15980
|
+
};
|
|
15968
15981
|
const getSortParams = () => ({
|
|
15969
15982
|
sortBy: {
|
|
15970
15983
|
index: 0,
|
|
@@ -15991,14 +16004,7 @@ var init_Attributes = __esm({
|
|
|
15991
16004
|
}
|
|
15992
16005
|
);
|
|
15993
16006
|
const attributesTable = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { id: "attribute-table-with-panel", children: [
|
|
15994
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
15995
|
-
AiJmxToolbar,
|
|
15996
|
-
{
|
|
15997
|
-
attributes,
|
|
15998
|
-
setAiMessage,
|
|
15999
|
-
onDiagnosisFinished: () => setIsModalOpen(true)
|
|
16000
|
-
}
|
|
16001
|
-
),
|
|
16007
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AiJmxToolbar, { attributes, setAiMessage, onDiagnosisFinished: showDiagnosisResult }),
|
|
16002
16008
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_table.Table, { "aria-label": "Attributes", variant: "compact", children: [
|
|
16003
16009
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_table.Thead, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_table.Tr, { children: [
|
|
16004
16010
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_table.Th, { sort: getSortParams(), children: "Attribute" }),
|
|
@@ -16103,14 +16109,17 @@ var init_AttributeTable2 = __esm({
|
|
|
16103
16109
|
const setJobForSpecificNode = async (node2) => {
|
|
16104
16110
|
if (!node2 || !node2?.objectName) return;
|
|
16105
16111
|
const mbean = node2.objectName;
|
|
16106
|
-
attributeService.register(
|
|
16107
|
-
|
|
16108
|
-
|
|
16109
|
-
|
|
16110
|
-
|
|
16111
|
-
|
|
16112
|
+
attributeService.register(
|
|
16113
|
+
{ type: "read", mbean },
|
|
16114
|
+
(response) => {
|
|
16115
|
+
if (response && typeof response === "object" && "value" in response) {
|
|
16116
|
+
setAttributesList((attributesList2) => {
|
|
16117
|
+
attributesList2[mbean] = response.value;
|
|
16118
|
+
return { ...attributesList2 };
|
|
16119
|
+
});
|
|
16120
|
+
}
|
|
16112
16121
|
}
|
|
16113
|
-
|
|
16122
|
+
);
|
|
16114
16123
|
};
|
|
16115
16124
|
const setReadingJobs = async (currentSelection) => {
|
|
16116
16125
|
if (!currentSelection) return;
|
|
@@ -16468,7 +16477,7 @@ var plugin = () => {
|
|
|
16468
16477
|
aiCommon();
|
|
16469
16478
|
jmxAi();
|
|
16470
16479
|
};
|
|
16471
|
-
import_react21.configManager.addProductInfo("Hawtio AI Plugin", "0.1.
|
|
16480
|
+
import_react21.configManager.addProductInfo("Hawtio AI Plugin", "0.1.6");
|
|
16472
16481
|
// Annotate the CommonJS export names for ESM import in node:
|
|
16473
16482
|
0 && (module.exports = {
|
|
16474
16483
|
plugin
|