@64mb/freelens-power 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/THIRD_PARTY_LICENSES +1707 -0
- package/out/main/ai.js +63 -23
- package/out/main/ai.js.map +1 -1
- package/out/main/cluster-icons-catalog.js +28 -0
- package/out/main/cluster-icons-catalog.js.map +1 -0
- package/out/main/cluster-icons.js +125 -0
- package/out/main/cluster-icons.js.map +1 -0
- package/out/main/common/ai-terminal-context.js +51 -0
- package/out/main/common/ai-terminal-context.js.map +1 -0
- package/out/main/common/ai.js.map +1 -1
- package/out/main/common/cluster-icon-ipc.js +6 -0
- package/out/main/common/cluster-icon-ipc.js.map +1 -0
- package/out/main/common/cluster-icons.js +121 -0
- package/out/main/common/cluster-icons.js.map +1 -0
- package/out/main/common/dashboard.js +2 -1
- package/out/main/common/dashboard.js.map +1 -1
- package/out/main/common/settings-export.js +4 -2
- package/out/main/common/settings-export.js.map +1 -1
- package/out/main/common/store/cluster-icons-store.js +32 -0
- package/out/main/common/store/cluster-icons-store.js.map +1 -0
- package/out/main/common/store/dashboard-preferences-store.js +2 -1
- package/out/main/common/store/dashboard-preferences-store.js.map +1 -1
- package/out/main/common/store/monitoring-preferences-store.js +5 -0
- package/out/main/common/store/monitoring-preferences-store.js.map +1 -1
- package/out/main/dashboard-views.js +20 -10
- package/out/main/dashboard-views.js.map +1 -1
- package/out/main/diagnostics-menu-order.js +57 -0
- package/out/main/diagnostics-menu-order.js.map +1 -0
- package/out/main/index.js +9 -1
- package/out/main/index.js.map +1 -1
- package/out/main/monitoring-history.js +13 -3
- package/out/main/monitoring-history.js.map +1 -1
- package/out/renderer/_virtual/_global-external_react-dom.js +2 -1
- package/out/renderer/_virtual/_global-external_react.js +10 -5
- package/out/renderer/_virtual/_rolldown/runtime.js +22 -0
- package/out/renderer/ai-terminal-context.js +200 -0
- package/out/renderer/ai-terminal-context.js.map +1 -0
- package/out/renderer/ai.js +90 -9
- package/out/renderer/ai.js.map +1 -1
- package/out/renderer/appearance.js +1 -0
- package/out/renderer/appearance.js.map +1 -1
- package/out/renderer/cluster-icon-colors.js +188 -0
- package/out/renderer/cluster-icon-colors.js.map +1 -0
- package/out/renderer/cluster-icons.js +304 -0
- package/out/renderer/cluster-icons.js.map +1 -0
- package/out/renderer/dashboard.js +51 -14
- package/out/renderer/dashboard.js.map +1 -1
- package/out/renderer/details/secret-certificate-details.js +9 -2
- package/out/renderer/details/secret-certificate-details.js.map +1 -1
- package/out/renderer/diagnostics.css.js +39 -0
- package/out/renderer/diagnostics.css.js.map +1 -0
- package/out/renderer/diagnostics.js +796 -343
- package/out/renderer/diagnostics.js.map +1 -1
- package/out/renderer/index.js +9 -4
- package/out/renderer/index.js.map +1 -1
- package/out/renderer/monitoring-details-chart.js +42 -0
- package/out/renderer/monitoring-details-chart.js.map +1 -0
- package/out/renderer/monitoring-history-collection.js +2 -18
- package/out/renderer/monitoring-history-collection.js.map +1 -1
- package/out/renderer/monitoring-history-view.js +111 -34
- package/out/renderer/monitoring-history-view.js.map +1 -1
- package/out/renderer/monitoring.js +68 -27
- package/out/renderer/monitoring.js.map +1 -1
- package/out/renderer/node-monitoring.js +23 -12
- package/out/renderer/node-monitoring.js.map +1 -1
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +10 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +8 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +9 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +9 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +8 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/classCallCheck.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/createClass.js +15 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/createClass.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/createSuper.js +19 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/createSuper.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/defineProperty.js +14 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/extends.js +19 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +15 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inherits.js +14 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inherits.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +18 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +8 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +26 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +8 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +8 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +27 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/objectSpread2.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +15 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +14 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +12 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +15 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +12 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/slicedToArray.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +8 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +12 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +16 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +11 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/typeof.js +18 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +13 -0
- package/out/renderer/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@emotion_cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js +237 -0
- package/out/renderer/node_modules/.pnpm/@emotion_cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js +25 -0
- package/out/renderer/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@emotion_memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +12 -0
- package/out/renderer/node_modules/.pnpm/@emotion_memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@emotion_react@11.14.0_@types_react@17.0.93_react@17.0.2/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js +58 -0
- package/out/renderer/node_modules/.pnpm/@emotion_react@11.14.0_@types_react@17.0.93_react@17.0.2/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@emotion_react@11.14.0_@types_react@17.0.93_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js +54 -0
- package/out/renderer/node_modules/.pnpm/@emotion_react@11.14.0_@types_react@17.0.93_react@17.0.2/node_modules/@emotion/react/dist/emotion-react.browser.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@emotion_serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +133 -0
- package/out/renderer/node_modules/.pnpm/@emotion_serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@emotion_sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js +65 -0
- package/out/renderer/node_modules/.pnpm/@emotion_sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@emotion_unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +54 -0
- package/out/renderer/node_modules/.pnpm/@emotion_unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@emotion_use-insertion-effect-with-fallbacks@1.2.0_react@17.0.2/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js +12 -0
- package/out/renderer/node_modules/.pnpm/@emotion_use-insertion-effect-with-fallbacks@1.2.0_react@17.0.2/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@emotion_utils@1.4.2/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js +30 -0
- package/out/renderer/node_modules/.pnpm/@emotion_utils@1.4.2/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +211 -0
- package/out/renderer/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +97 -0
- package/out/renderer/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +31 -0
- package/out/renderer/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +93 -0
- package/out/renderer/node_modules/.pnpm/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/memoize-one@6.0.0/node_modules/memoize-one/dist/memoize-one.esm.js +38 -0
- package/out/renderer/node_modules/.pnpm/memoize-one@6.0.0/node_modules/memoize-one/dist/memoize-one.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +159 -0
- package/out/renderer/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +103 -0
- package/out/renderer/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +18 -0
- package/out/renderer/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/Select-ef7c0426.esm.js +2200 -0
- package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/Select-ef7c0426.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/index-641ee5b8.esm.js +992 -0
- package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/index-641ee5b8.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/react-select.esm.js +14 -0
- package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/react-select.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js +56 -0
- package/out/renderer/node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js +22 -0
- package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js +30 -0
- package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js +164 -0
- package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js +37 -0
- package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js +245 -0
- package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js +120 -0
- package/out/renderer/node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/use-isomorphic-layout-effect@1.2.1_@types_react@17.0.93_react@17.0.2/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +6 -0
- package/out/renderer/node_modules/.pnpm/use-isomorphic-layout-effect@1.2.1_@types_react@17.0.93_react@17.0.2/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js.map +1 -0
- package/out/renderer/pod-monitoring.js +15 -19
- package/out/renderer/pod-monitoring.js.map +1 -1
- package/out/renderer/preferences/ai-shortcuts-preferences.js +12 -4
- package/out/renderer/preferences/ai-shortcuts-preferences.js.map +1 -1
- package/out/renderer/preferences/dashboard-preferences.js +37 -6
- package/out/renderer/preferences/dashboard-preferences.js.map +1 -1
- package/out/renderer/preferences/monitoring-preferences.js +131 -44
- package/out/renderer/preferences/monitoring-preferences.js.map +1 -1
- package/out/renderer/preferences/preferences.js +31 -7
- package/out/renderer/preferences/preferences.js.map +1 -1
- package/out/renderer/read-only.js +2 -2
- package/out/renderer/read-only.js.map +1 -1
- package/out/renderer/src/common/ai-terminal-context.js +51 -0
- package/out/renderer/src/common/ai-terminal-context.js.map +1 -0
- package/out/renderer/src/common/ai.js.map +1 -1
- package/out/renderer/src/common/cluster-icon-ipc.js +6 -0
- package/out/renderer/src/common/cluster-icon-ipc.js.map +1 -0
- package/out/renderer/src/common/cluster-icons.js +133 -0
- package/out/renderer/src/common/cluster-icons.js.map +1 -0
- package/out/renderer/src/common/dashboard.js +2 -1
- package/out/renderer/src/common/dashboard.js.map +1 -1
- package/out/renderer/src/common/date-time.js +11 -0
- package/out/renderer/src/common/date-time.js.map +1 -0
- package/out/renderer/src/common/monitoring-history.js +2 -0
- package/out/renderer/src/common/monitoring-history.js.map +1 -1
- package/out/renderer/src/common/resource-diagnostics.js.map +1 -1
- package/out/renderer/src/common/settings-export.js.map +1 -1
- package/out/renderer/src/common/store/dashboard-preferences-store.js +2 -1
- package/out/renderer/src/common/store/dashboard-preferences-store.js.map +1 -1
- package/out/renderer/src/common/store/monitoring-preferences-store.js +5 -0
- package/out/renderer/src/common/store/monitoring-preferences-store.js.map +1 -1
- package/out/renderer/welcome.js +28 -6
- package/out/renderer/welcome.js.map +1 -1
- package/package.json +3 -2
|
@@ -3,14 +3,23 @@ const require__global_external_mobx = require("./_virtual/_global-external_mobx.
|
|
|
3
3
|
const require_monitoring_preferences_store = require("./src/common/store/monitoring-preferences-store.js");
|
|
4
4
|
const require__global_external_react = require("./_virtual/_global-external_react.js");
|
|
5
5
|
const require_jsx_runtime = require("./_virtual/_global-external_react/jsx-runtime.js");
|
|
6
|
+
const require_react_select_esm = require("./node_modules/.pnpm/react-select@5.10.2_@types_react@17.0.93_react-dom@17.0.2_react@17.0.2__react@17.0.2/node_modules/react-select/dist/react-select.esm.js");
|
|
6
7
|
const require_monitoring_history = require("./monitoring-history.js");
|
|
7
8
|
//#region src/renderer/monitoring-history-view.tsx
|
|
8
9
|
var HISTORY_RANGES = {
|
|
10
|
+
"5m": 3e5,
|
|
9
11
|
"30m": 18e5,
|
|
10
12
|
"2h": 72e5,
|
|
11
13
|
"24h": 864e5,
|
|
12
14
|
"7d": 6048e5
|
|
13
15
|
};
|
|
16
|
+
var RANGE_LABELS = {
|
|
17
|
+
"5m": "5 min",
|
|
18
|
+
"30m": "30 min",
|
|
19
|
+
"2h": "2 hours",
|
|
20
|
+
"24h": "24 hours",
|
|
21
|
+
"7d": "7 days"
|
|
22
|
+
};
|
|
14
23
|
function mergeHistorySamples(points, live, from) {
|
|
15
24
|
const buckets = /* @__PURE__ */ new Map();
|
|
16
25
|
for (const point of points) {
|
|
@@ -59,7 +68,7 @@ function useMonitoringHistory(identity, liveSamples) {
|
|
|
59
68
|
const preferences = require_monitoring_preferences_store.MonitoringPreferencesStore.getInstanceOrCreate();
|
|
60
69
|
const [enabled, setEnabled] = require__global_external_react.useState(preferences.historyEnabled === true);
|
|
61
70
|
require__global_external_react.useEffect(() => require__global_external_mobx.reaction(() => preferences.historyEnabled === true, setEnabled, { fireImmediately: true }), [preferences]);
|
|
62
|
-
const [range, setRange] = require__global_external_react.useState("
|
|
71
|
+
const [range, setRange] = require__global_external_react.useState("5m");
|
|
63
72
|
const [points, setPoints] = require__global_external_react.useState([]);
|
|
64
73
|
const [status, setStatus] = require__global_external_react.useState("");
|
|
65
74
|
require__global_external_react.useEffect(() => {
|
|
@@ -76,7 +85,7 @@ function useMonitoringHistory(identity, liveSamples) {
|
|
|
76
85
|
})).then((value) => {
|
|
77
86
|
if (current) {
|
|
78
87
|
setPoints(value);
|
|
79
|
-
setStatus(value.length ? "
|
|
88
|
+
setStatus(value.length ? "" : "No local history for this range. Collection starts when enabled.");
|
|
80
89
|
}
|
|
81
90
|
}).catch(() => {
|
|
82
91
|
if (current) setStatus("Local history unavailable. Live samples remain visible.");
|
|
@@ -101,44 +110,112 @@ function useMonitoringHistory(identity, liveSamples) {
|
|
|
101
110
|
status
|
|
102
111
|
};
|
|
103
112
|
}
|
|
104
|
-
function MonitoringHistoryRange({ range, onChange, native = false }) {
|
|
105
|
-
return /* @__PURE__ */ require_jsx_runtime.jsxs("
|
|
113
|
+
function MonitoringHistoryRange({ range, onChange, native = false, status, compact = false }) {
|
|
114
|
+
return /* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
115
|
+
className: compact ? "power-history-compact" : void 0,
|
|
106
116
|
style: {
|
|
107
|
-
display: "
|
|
108
|
-
|
|
109
|
-
|
|
117
|
+
display: "flex",
|
|
118
|
+
flexDirection: "column",
|
|
119
|
+
alignItems: "flex-start",
|
|
120
|
+
gap: 8,
|
|
121
|
+
marginBottom: compact ? 0 : 12
|
|
110
122
|
},
|
|
111
|
-
children: [
|
|
112
|
-
style
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ require_jsx_runtime.jsx("style", { children: `
|
|
125
|
+
.power-history-select.Select { min-width: 0; width: 100%; }
|
|
126
|
+
.power-history-select .Select__control { min-height: 32px; }
|
|
127
|
+
.power-history-select .Select__value-container { padding: 6px 10px; }
|
|
128
|
+
.power-history-compact .Select__control { min-height: 26px; height:26px; font-size:12px; }
|
|
129
|
+
.power-history-compact .Select__value-container { padding:4px 8px; }
|
|
130
|
+
.power-history-compact .Select__indicator { padding:3px; }
|
|
131
|
+
.power-history-compact .Select__indicator svg { width:14px;height:14px; }
|
|
132
|
+
` }),
|
|
133
|
+
/* @__PURE__ */ require_jsx_runtime.jsxs("label", {
|
|
134
|
+
style: {
|
|
135
|
+
display: "inline-flex",
|
|
136
|
+
alignItems: "center",
|
|
137
|
+
gap: 12,
|
|
138
|
+
minHeight: compact ? 26 : 32,
|
|
139
|
+
color: "var(--textColorSecondary)"
|
|
122
140
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
141
|
+
children: [!compact && "Period", /* @__PURE__ */ require_jsx_runtime.jsx("span", {
|
|
142
|
+
style: {
|
|
143
|
+
width: compact ? 88 : 140,
|
|
144
|
+
position: "relative",
|
|
145
|
+
display: "inline-flex",
|
|
146
|
+
alignItems: "center"
|
|
147
|
+
},
|
|
148
|
+
children: native ? /* @__PURE__ */ require_jsx_runtime.jsx(require_extensions.Renderer.Component.Select, {
|
|
149
|
+
className: "power-history-select",
|
|
150
|
+
"aria-label": "History range",
|
|
151
|
+
value: range,
|
|
152
|
+
options: Object.keys(HISTORY_RANGES).map((value) => ({
|
|
153
|
+
value,
|
|
154
|
+
label: RANGE_LABELS[value]
|
|
155
|
+
})),
|
|
156
|
+
onChange: (option) => {
|
|
157
|
+
if (option) onChange(option.value);
|
|
158
|
+
},
|
|
159
|
+
isClearable: false
|
|
160
|
+
}) : /* @__PURE__ */ require_jsx_runtime.jsx(require_react_select_esm.default, {
|
|
161
|
+
"aria-label": "History range",
|
|
162
|
+
className: "Select power-history-select",
|
|
163
|
+
classNamePrefix: "Select",
|
|
164
|
+
unstyled: true,
|
|
165
|
+
isSearchable: false,
|
|
166
|
+
isClearable: false,
|
|
167
|
+
value: {
|
|
168
|
+
value: range,
|
|
169
|
+
label: RANGE_LABELS[range]
|
|
170
|
+
},
|
|
171
|
+
options: Object.keys(HISTORY_RANGES).map((value) => ({
|
|
172
|
+
value,
|
|
173
|
+
label: RANGE_LABELS[value]
|
|
174
|
+
})),
|
|
175
|
+
onChange: (option) => {
|
|
176
|
+
if (option) onChange(option.value);
|
|
177
|
+
},
|
|
178
|
+
onKeyDown: (event) => {
|
|
179
|
+
if (event.key === "Escape") event.stopPropagation();
|
|
180
|
+
},
|
|
181
|
+
menuPortalTarget: document.body,
|
|
182
|
+
menuPlacement: "auto",
|
|
183
|
+
styles: {
|
|
184
|
+
menuPortal: (base) => ({
|
|
185
|
+
...base,
|
|
186
|
+
zIndex: 1e4
|
|
187
|
+
}),
|
|
188
|
+
...compact ? {
|
|
189
|
+
menu: (base) => ({
|
|
190
|
+
...base,
|
|
191
|
+
minWidth: 88,
|
|
192
|
+
width: "100%"
|
|
193
|
+
}),
|
|
194
|
+
menuList: (base) => ({
|
|
195
|
+
...base,
|
|
196
|
+
padding: 4
|
|
197
|
+
}),
|
|
198
|
+
option: (base) => ({
|
|
199
|
+
...base,
|
|
200
|
+
fontSize: 12,
|
|
201
|
+
lineHeight: "16px",
|
|
202
|
+
padding: "4px 8px",
|
|
203
|
+
minHeight: 24
|
|
204
|
+
})
|
|
205
|
+
} : {}
|
|
206
|
+
}
|
|
207
|
+
})
|
|
208
|
+
})]
|
|
209
|
+
}),
|
|
210
|
+
status && /* @__PURE__ */ require_jsx_runtime.jsx("small", {
|
|
211
|
+
role: "status",
|
|
128
212
|
style: {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
color: "var(--textColorPrimary)",
|
|
132
|
-
background: "var(--contentColor)",
|
|
133
|
-
border: "1px solid var(--borderColor)",
|
|
134
|
-
borderRadius: 4
|
|
213
|
+
color: "var(--textColorSecondary)",
|
|
214
|
+
lineHeight: 1.4
|
|
135
215
|
},
|
|
136
|
-
children:
|
|
137
|
-
value,
|
|
138
|
-
children: value
|
|
139
|
-
}, value))
|
|
216
|
+
children: status
|
|
140
217
|
})
|
|
141
|
-
|
|
218
|
+
]
|
|
142
219
|
});
|
|
143
220
|
}
|
|
144
221
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitoring-history-view.js","names":[],"sources":["../../src/renderer/monitoring-history-view.tsx"],"sourcesContent":["import { Renderer } from \"@freelensapp/extensions\";\nimport { reaction } from \"mobx\";\nimport { useEffect, useState } from \"react\";\nimport { MonitoringPreferencesStore } from \"../common/store/monitoring-preferences-store\";\nimport { monitoringHistory } from \"./monitoring-history\";\n\nimport type { HistoryIdentity, HistoryPoint } from \"../common/monitoring-history\";\nimport type { MonitoringSample } from \"../common/monitoring-math\";\nexport const HISTORY_RANGES = { \"30m\": 1_800_000, \"2h\": 7_200_000, \"24h\": 86_400_000, \"7d\": 604_800_000 } as const;\nexport type HistoryRange = keyof typeof HISTORY_RANGES;\nexport function mergeHistorySamples(\n points: HistoryPoint[],\n live: MonitoringSample[],\n from: number,\n): MonitoringSample[] {\n const buckets = new Map<number, MonitoringSample>();\n for (const point of points) {\n if (point.time < from) continue;\n const sample = buckets.get(point.time) ?? { time: point.time, cpu: NaN, memory: NaN };\n if (point.metric === \"cpu\" || point.metric === \"memory\") {\n sample[point.metric] = point.avg;\n sample.historical ??= {};\n sample.historical[point.metric] = {\n min: point.min,\n max: point.max,\n count: point.count,\n resolution: point.resolution,\n gap: point.gap,\n };\n if (point.gap) sample.breakBefore = true;\n } else if (point.metric !== \"restarts\") {\n const match = /^(cpu|memory)(Requests|Limits|Capacity|Allocatable)$/.exec(point.metric);\n if (match) {\n sample.resources ??= { cpu: {}, memory: {} };\n sample.resources[match[1] as \"cpu\" | \"memory\"][\n match[2].toLowerCase() as \"requests\" | \"limits\" | \"capacity\" | \"allocatable\"\n ] = point.avg;\n }\n }\n if (point.gap) sample.resourceStatus = \"Partial historical bucket; missing samples are gaps\";\n buckets.set(point.time, sample);\n }\n for (const sample of live)\n if (sample.time >= from) {\n for (const point of points)\n if (sample.time >= point.time && sample.time < point.time + point.resolution) buckets.delete(point.time);\n buckets.set(sample.time, sample);\n }\n const samples = [...buckets.values()]\n .filter((sample) => Number.isFinite(sample.cpu) && Number.isFinite(sample.memory))\n .sort((a, b) => a.time - b.time);\n const resolution = (sample: MonitoringSample) =>\n Math.max(sample.historical?.cpu?.resolution ?? 30_000, sample.historical?.memory?.resolution ?? 30_000);\n return samples.map((sample, index) =>\n index > 0 &&\n sample.time - samples[index - 1].time > 1.8 * Math.max(resolution(sample), resolution(samples[index - 1]))\n ? { ...sample, breakBefore: true }\n : sample,\n );\n}\nexport function useMonitoringHistory(identity: HistoryIdentity | undefined, liveSamples: MonitoringSample[]) {\n const preferences = MonitoringPreferencesStore.getInstanceOrCreate<MonitoringPreferencesStore>();\n const [enabled, setEnabled] = useState(preferences.historyEnabled === true);\n useEffect(\n () => reaction(() => preferences.historyEnabled === true, setEnabled, { fireImmediately: true }),\n [preferences],\n );\n const [range, setRange] = useState<HistoryRange>(\"30m\");\n const [points, setPoints] = useState<HistoryPoint[]>([]);\n const [status, setStatus] = useState(\"\");\n const key = identity ? `${identity.clusterId}/${identity.scope}/${identity.uid}` : \"\";\n useEffect(() => {\n let current = true;\n setPoints([]);\n setStatus(\"\");\n if (!identity || !enabled) return;\n const query = () => {\n const to = Date.now();\n void Promise.resolve()\n .then(() => monitoringHistory.query({ ...identity, from: to - HISTORY_RANGES[range] + 1000, to }))\n .then((value) => {\n if (current) {\n setPoints(value);\n setStatus(\n value.length\n ? \"Historical averages; min/max available in stored buckets\"\n : \"No local history for this range. Collection starts when enabled.\",\n );\n }\n })\n .catch(() => {\n if (current) setStatus(\"Local history unavailable. Live samples remain visible.\");\n });\n };\n query();\n const timer = window.setInterval(query, 30_000);\n return () => {\n current = false;\n window.clearInterval(timer);\n };\n }, [key, range, enabled]);\n return {\n range,\n setRange,\n samples: mergeHistorySamples(points, liveSamples, Date.now() - HISTORY_RANGES[range]),\n points,\n status,\n };\n}\nexport function MonitoringHistoryRange({\n range,\n onChange,\n native = false,\n}: {\n range: HistoryRange;\n onChange: (value: HistoryRange) => void;\n // host [Select] requires injected context unavailable in detached chart roots\n native?: boolean;\n}) {\n return (\n <label style={{ display: \"inline-flex\", alignItems: \"center\", gap: 8 }}>\n History range\n <span style={{ width: 120 }}>\n {native ? (\n <Renderer.Component.Select\n aria-label=\"History range\"\n value={range}\n options={Object.keys(HISTORY_RANGES).map((value) => ({ value: value as HistoryRange, label: value }))}\n onChange={(option) => {\n if (option) onChange(option.value);\n }}\n isClearable={false}\n />\n ) : (\n <select\n aria-label=\"History range\"\n value={range}\n onChange={(event) => onChange(event.target.value as HistoryRange)}\n style={{\n width: \"100%\",\n padding: \"6px 8px\",\n color: \"var(--textColorPrimary)\",\n background: \"var(--contentColor)\",\n border: \"1px solid var(--borderColor)\",\n borderRadius: 4,\n }}\n >\n {Object.keys(HISTORY_RANGES).map((value) => (\n <option key={value} value={value}>\n {value}\n </option>\n ))}\n </select>\n )}\n </span>\n </label>\n );\n}\n"],"mappings":";;;;;;;AAQA,IAAa,iBAAiB;CAAE,OAAO;CAAW,MAAM;CAAW,OAAO;CAAY,MAAM;AAAY;AAExG,SAAgB,oBACd,QACA,MACA,MACoB;CACpB,MAAM,0BAAU,IAAI,IAA8B;CAClD,KAAK,MAAM,SAAS,QAAQ;EAC1B,IAAI,MAAM,OAAO,MAAM;EACvB,MAAM,SAAS,QAAQ,IAAI,MAAM,IAAI,KAAK;GAAE,MAAM,MAAM;GAAM,KAAK;GAAK,QAAQ;EAAI;EACpF,IAAI,MAAM,WAAW,SAAS,MAAM,WAAW,UAAU;GACvD,OAAO,MAAM,UAAU,MAAM;GAC7B,OAAO,eAAe,CAAC;GACvB,OAAO,WAAW,MAAM,UAAU;IAChC,KAAK,MAAM;IACX,KAAK,MAAM;IACX,OAAO,MAAM;IACb,YAAY,MAAM;IAClB,KAAK,MAAM;GACb;GACA,IAAI,MAAM,KAAK,OAAO,cAAc;EACtC,OAAO,IAAI,MAAM,WAAW,YAAY;GACtC,MAAM,QAAQ,uDAAuD,KAAK,MAAM,MAAM;GACtF,IAAI,OAAO;IACT,OAAO,cAAc;KAAE,KAAK,CAAC;KAAG,QAAQ,CAAC;IAAE;IAC3C,OAAO,UAAU,MAAM,GAAuB,CAC5C,MAAM,EAAE,CAAC,YAAY,KACnB,MAAM;GACZ;EACF;EACA,IAAI,MAAM,KAAK,OAAO,iBAAiB;EACvC,QAAQ,IAAI,MAAM,MAAM,MAAM;CAChC;CACA,KAAK,MAAM,UAAU,MACnB,IAAI,OAAO,QAAQ,MAAM;EACvB,KAAK,MAAM,SAAS,QAClB,IAAI,OAAO,QAAQ,MAAM,QAAQ,OAAO,OAAO,MAAM,OAAO,MAAM,YAAY,QAAQ,OAAO,MAAM,IAAI;EACzG,QA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,CAAA,CACD;;AAEX"}
|
|
1
|
+
{"version":3,"file":"monitoring-history-view.js","names":[],"sources":["../../src/renderer/monitoring-history-view.tsx"],"sourcesContent":["import { Renderer } from \"@freelensapp/extensions\";\nimport { reaction } from \"mobx\";\nimport { useEffect, useState } from \"react\";\nimport ReactSelect from \"react-select\";\nimport { MonitoringPreferencesStore } from \"../common/store/monitoring-preferences-store\";\nimport { monitoringHistory } from \"./monitoring-history\";\n\nimport type { HistoryIdentity, HistoryPoint } from \"../common/monitoring-history\";\nimport type { MonitoringSample } from \"../common/monitoring-math\";\nexport const HISTORY_RANGES = {\n \"5m\": 300_000,\n \"30m\": 1_800_000,\n \"2h\": 7_200_000,\n \"24h\": 86_400_000,\n \"7d\": 604_800_000,\n} as const;\nexport type HistoryRange = keyof typeof HISTORY_RANGES;\nconst RANGE_LABELS: Record<HistoryRange, string> = {\n \"5m\": \"5 min\",\n \"30m\": \"30 min\",\n \"2h\": \"2 hours\",\n \"24h\": \"24 hours\",\n \"7d\": \"7 days\",\n};\nexport function mergeHistorySamples(\n points: HistoryPoint[],\n live: MonitoringSample[],\n from: number,\n): MonitoringSample[] {\n const buckets = new Map<number, MonitoringSample>();\n for (const point of points) {\n if (point.time < from) continue;\n const sample = buckets.get(point.time) ?? { time: point.time, cpu: NaN, memory: NaN };\n if (point.metric === \"cpu\" || point.metric === \"memory\") {\n sample[point.metric] = point.avg;\n sample.historical ??= {};\n sample.historical[point.metric] = {\n min: point.min,\n max: point.max,\n count: point.count,\n resolution: point.resolution,\n gap: point.gap,\n };\n if (point.gap) sample.breakBefore = true;\n } else if (point.metric !== \"restarts\") {\n const match = /^(cpu|memory)(Requests|Limits|Capacity|Allocatable)$/.exec(point.metric);\n if (match) {\n sample.resources ??= { cpu: {}, memory: {} };\n sample.resources[match[1] as \"cpu\" | \"memory\"][\n match[2].toLowerCase() as \"requests\" | \"limits\" | \"capacity\" | \"allocatable\"\n ] = point.avg;\n }\n }\n if (point.gap) sample.resourceStatus = \"Partial historical bucket; missing samples are gaps\";\n buckets.set(point.time, sample);\n }\n for (const sample of live)\n if (sample.time >= from) {\n for (const point of points)\n if (sample.time >= point.time && sample.time < point.time + point.resolution) buckets.delete(point.time);\n buckets.set(sample.time, sample);\n }\n const samples = [...buckets.values()]\n .filter((sample) => Number.isFinite(sample.cpu) && Number.isFinite(sample.memory))\n .sort((a, b) => a.time - b.time);\n const resolution = (sample: MonitoringSample) =>\n Math.max(sample.historical?.cpu?.resolution ?? 30_000, sample.historical?.memory?.resolution ?? 30_000);\n return samples.map((sample, index) =>\n index > 0 &&\n sample.time - samples[index - 1].time > 1.8 * Math.max(resolution(sample), resolution(samples[index - 1]))\n ? { ...sample, breakBefore: true }\n : sample,\n );\n}\nexport function useMonitoringHistory(identity: HistoryIdentity | undefined, liveSamples: MonitoringSample[]) {\n const preferences = MonitoringPreferencesStore.getInstanceOrCreate<MonitoringPreferencesStore>();\n const [enabled, setEnabled] = useState(preferences.historyEnabled === true);\n useEffect(\n () => reaction(() => preferences.historyEnabled === true, setEnabled, { fireImmediately: true }),\n [preferences],\n );\n const [range, setRange] = useState<HistoryRange>(\"5m\");\n const [points, setPoints] = useState<HistoryPoint[]>([]);\n const [status, setStatus] = useState(\"\");\n const key = identity ? `${identity.clusterId}/${identity.scope}/${identity.uid}` : \"\";\n useEffect(() => {\n let current = true;\n setPoints([]);\n setStatus(\"\");\n if (!identity || !enabled) return;\n const query = () => {\n const to = Date.now();\n void Promise.resolve()\n .then(() => monitoringHistory.query({ ...identity, from: to - HISTORY_RANGES[range] + 1000, to }))\n .then((value) => {\n if (current) {\n setPoints(value);\n setStatus(value.length ? \"\" : \"No local history for this range. Collection starts when enabled.\");\n }\n })\n .catch(() => {\n if (current) setStatus(\"Local history unavailable. Live samples remain visible.\");\n });\n };\n query();\n const timer = window.setInterval(query, 30_000);\n return () => {\n current = false;\n window.clearInterval(timer);\n };\n }, [key, range, enabled]);\n return {\n range,\n setRange,\n samples: mergeHistorySamples(points, liveSamples, Date.now() - HISTORY_RANGES[range]),\n points,\n status,\n };\n}\nexport function MonitoringHistoryRange({\n range,\n onChange,\n native = false,\n status,\n compact = false,\n}: {\n range: HistoryRange;\n onChange: (value: HistoryRange) => void;\n // host [Select] requires injected context unavailable in detached chart roots\n native?: boolean;\n status?: string;\n compact?: boolean;\n}) {\n return (\n <div\n className={compact ? \"power-history-compact\" : undefined}\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: 8,\n marginBottom: compact ? 0 : 12,\n }}\n >\n <style>{`\n .power-history-select.Select { min-width: 0; width: 100%; }\n .power-history-select .Select__control { min-height: 32px; }\n .power-history-select .Select__value-container { padding: 6px 10px; }\n .power-history-compact .Select__control { min-height: 26px; height:26px; font-size:12px; }\n .power-history-compact .Select__value-container { padding:4px 8px; }\n .power-history-compact .Select__indicator { padding:3px; }\n .power-history-compact .Select__indicator svg { width:14px;height:14px; }\n `}</style>\n <label\n style={{\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 12,\n minHeight: compact ? 26 : 32,\n color: \"var(--textColorSecondary)\",\n }}\n >\n {!compact && \"Period\"}\n <span style={{ width: compact ? 88 : 140, position: \"relative\", display: \"inline-flex\", alignItems: \"center\" }}>\n {native ? (\n <Renderer.Component.Select\n className=\"power-history-select\"\n aria-label=\"History range\"\n value={range}\n options={Object.keys(HISTORY_RANGES).map((value) => ({\n value: value as HistoryRange,\n label: RANGE_LABELS[value as HistoryRange],\n }))}\n onChange={(option) => {\n if (option) onChange(option.value);\n }}\n isClearable={false}\n />\n ) : (\n <ReactSelect\n aria-label=\"History range\"\n className=\"Select power-history-select\"\n classNamePrefix=\"Select\"\n unstyled\n isSearchable={false}\n isClearable={false}\n value={{ value: range, label: RANGE_LABELS[range] }}\n options={Object.keys(HISTORY_RANGES).map((value) => ({\n value: value as HistoryRange,\n label: RANGE_LABELS[value as HistoryRange],\n }))}\n onChange={(option) => {\n if (option) onChange(option.value);\n }}\n onKeyDown={(event) => {\n if (event.key === \"Escape\") event.stopPropagation();\n }}\n menuPortalTarget={document.body}\n menuPlacement=\"auto\"\n styles={{\n menuPortal: (base) => ({ ...base, zIndex: 10000 }),\n ...(compact\n ? {\n menu: (base) => ({ ...base, minWidth: 88, width: \"100%\" }),\n menuList: (base) => ({ ...base, padding: 4 }),\n option: (base) => ({\n ...base,\n fontSize: 12,\n lineHeight: \"16px\",\n padding: \"4px 8px\",\n minHeight: 24,\n }),\n }\n : {}),\n }}\n />\n )}\n </span>\n </label>\n {status && (\n <small role=\"status\" style={{ color: \"var(--textColorSecondary)\", lineHeight: 1.4 }}>\n {status}\n </small>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AASA,IAAa,iBAAiB;CAC5B,MAAM;CACN,OAAO;CACP,MAAM;CACN,OAAO;CACP,MAAM;AACR;AAEA,IAAM,eAA6C;CACjD,MAAM;CACN,OAAO;CACP,MAAM;CACN,OAAO;CACP,MAAM;AACR;AACA,SAAgB,oBACd,QACA,MACA,MACoB;CACpB,MAAM,0BAAU,IAAI,IAA8B;CAClD,KAAK,MAAM,SAAS,QAAQ;EAC1B,IAAI,MAAM,OAAO,MAAM;EACvB,MAAM,SAAS,QAAQ,IAAI,MAAM,IAAI,KAAK;GAAE,MAAM,MAAM;GAAM,KAAK;GAAK,QAAQ;EAAI;EACpF,IAAI,MAAM,WAAW,SAAS,MAAM,WAAW,UAAU;GACvD,OAAO,MAAM,UAAU,MAAM;GAC7B,OAAO,eAAe,CAAC;GACvB,OAAO,WAAW,MAAM,UAAU;IAChC,KAAK,MAAM;IACX,KAAK,MAAM;IACX,OAAO,MAAM;IACb,YAAY,MAAM;IAClB,KAAK,MAAM;GACb;GACA,IAAI,MAAM,KAAK,OAAO,cAAc;EACtC,OAAO,IAAI,MAAM,WAAW,YAAY;GACtC,MAAM,QAAQ,uDAAuD,KAAK,MAAM,MAAM;GACtF,IAAI,OAAO;IACT,OAAO,cAAc;KAAE,KAAK,CAAC;KAAG,QAAQ,CAAC;IAAE;IAC3C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,7 @@ const require_monitoring_preferences_store = require("./src/common/store/monitor
|
|
|
4
4
|
const require__global_external_react = require("./_virtual/_global-external_react.js");
|
|
5
5
|
const require__global_external_react_dom = require("./_virtual/_global-external_react-dom.js");
|
|
6
6
|
const require_jsx_runtime = require("./_virtual/_global-external_react/jsx-runtime.js");
|
|
7
|
+
const require_date_time = require("./src/common/date-time.js");
|
|
7
8
|
const require_monitoring_math = require("./src/common/monitoring-math.js");
|
|
8
9
|
const require_monitoring_collector = require("./monitoring-collector.js");
|
|
9
10
|
const require_monitoring_history_view = require("./monitoring-history-view.js");
|
|
@@ -37,7 +38,7 @@ function ResourceTitle({ metric, label }) {
|
|
|
37
38
|
}), label ?? (metric === "cpu" ? "CPU" : "Memory")]
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
function MetricChart({ metric, samples, status, scope = "node" }) {
|
|
41
|
+
function MetricChart({ metric, samples, status, scope = "node", headerAction }) {
|
|
41
42
|
const [selectedTime, setSelectedTime] = require__global_external_react.useState();
|
|
42
43
|
const [pinned, setPinned] = require__global_external_react.useState(false);
|
|
43
44
|
const previousMetric = require__global_external_react.useRef(metric);
|
|
@@ -138,11 +139,19 @@ function MetricChart({ metric, samples, status, scope = "node" }) {
|
|
|
138
139
|
position: "relative"
|
|
139
140
|
},
|
|
140
141
|
children: [
|
|
142
|
+
headerAction && /* @__PURE__ */ require_jsx_runtime.jsx("div", {
|
|
143
|
+
className: "power-monitoring-period-action",
|
|
144
|
+
children: headerAction
|
|
145
|
+
}),
|
|
141
146
|
/* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
147
|
+
"data-monitoring-heading": "",
|
|
142
148
|
style: {
|
|
143
149
|
display: "flex",
|
|
144
150
|
alignItems: "center",
|
|
145
|
-
|
|
151
|
+
flexWrap: "wrap",
|
|
152
|
+
gap: 12,
|
|
153
|
+
paddingRight: headerAction ? 100 : 0,
|
|
154
|
+
minHeight: headerAction ? 32 : void 0
|
|
146
155
|
},
|
|
147
156
|
children: [/* @__PURE__ */ require_jsx_runtime.jsx(ResourceTitle, { metric }), /* @__PURE__ */ require_jsx_runtime.jsx("span", { children: status ? "Unavailable" : last ? format(last[metric]) : "Collecting…" })]
|
|
148
157
|
}),
|
|
@@ -226,25 +235,52 @@ function MetricChart({ metric, samples, status, scope = "node" }) {
|
|
|
226
235
|
strokeWidth: 4
|
|
227
236
|
}, `range:${sample.time}`);
|
|
228
237
|
}),
|
|
229
|
-
visibleSeries.map((line) =>
|
|
230
|
-
"
|
|
231
|
-
|
|
238
|
+
visibleSeries.map((line) => {
|
|
239
|
+
let path = "";
|
|
240
|
+
let gaps = "";
|
|
241
|
+
let previous;
|
|
242
|
+
let interrupted = false;
|
|
243
|
+
for (const sample of samples) {
|
|
232
244
|
const value = line.value(sample);
|
|
233
|
-
if (value === void 0)
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
245
|
+
if (value === void 0 || !Number.isFinite(value)) {
|
|
246
|
+
interrupted = true;
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
const point = `${x(sample)},${208 - value / max * 184}`;
|
|
250
|
+
const gap = previous && (interrupted || sample.breakBefore || sample.time - previous.sample.time > 1.8 * Math.max(sample.historical?.[metric]?.resolution ?? 3e4, previous.sample.historical?.[metric]?.resolution ?? 3e4));
|
|
251
|
+
path += ` ${!previous || gap ? "M" : "L"}${point}`;
|
|
252
|
+
if (previous && gap) gaps += ` M${previous.point} L${point}`;
|
|
253
|
+
previous = {
|
|
254
|
+
sample,
|
|
255
|
+
point
|
|
256
|
+
};
|
|
257
|
+
interrupted = false;
|
|
258
|
+
}
|
|
259
|
+
return /* @__PURE__ */ require_jsx_runtime.jsxs("g", { children: [/* @__PURE__ */ require_jsx_runtime.jsx("path", {
|
|
260
|
+
"data-monitoring-series": line.key,
|
|
261
|
+
d: path,
|
|
262
|
+
fill: "none",
|
|
263
|
+
stroke: line.color,
|
|
264
|
+
strokeWidth: "2",
|
|
265
|
+
strokeDasharray: line.key === "capacity" || line.key === "allocatable" ? "5 3" : void 0
|
|
266
|
+
}), gaps && /* @__PURE__ */ require_jsx_runtime.jsx("path", {
|
|
267
|
+
"data-monitoring-gap": line.key,
|
|
268
|
+
d: gaps,
|
|
269
|
+
fill: "none",
|
|
270
|
+
stroke: line.color,
|
|
271
|
+
strokeWidth: "2",
|
|
272
|
+
strokeDasharray: "3 4",
|
|
273
|
+
opacity: ".65",
|
|
274
|
+
children: /* @__PURE__ */ require_jsx_runtime.jsx("title", { children: "Dashed connections span missing measurements; intermediate values are unknown" })
|
|
275
|
+
})] }, line.key);
|
|
276
|
+
}),
|
|
241
277
|
samples.map((sample) => /* @__PURE__ */ require_jsx_runtime.jsx("circle", {
|
|
242
278
|
cx: x(sample),
|
|
243
279
|
cy: y(sample),
|
|
244
280
|
r: "2",
|
|
245
281
|
fill: "currentColor",
|
|
246
282
|
children: /* @__PURE__ */ require_jsx_runtime.jsxs("title", { children: [
|
|
247
|
-
|
|
283
|
+
require_date_time.formatDateTime(sample.time),
|
|
248
284
|
": ",
|
|
249
285
|
format(sample[metric])
|
|
250
286
|
] })
|
|
@@ -290,7 +326,10 @@ function MetricChart({ metric, samples, status, scope = "node" }) {
|
|
|
290
326
|
pointerEvents: "none"
|
|
291
327
|
},
|
|
292
328
|
children: [
|
|
293
|
-
/* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
329
|
+
/* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
330
|
+
style: { whiteSpace: "pre-wrap" },
|
|
331
|
+
children: [require_date_time.formatDateTime(selected.time), pinned ? " · Pinned" : ""]
|
|
332
|
+
}),
|
|
294
333
|
visibleSeries.map((line) => /* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
295
334
|
style: { color: line.color },
|
|
296
335
|
children: [
|
|
@@ -569,6 +608,7 @@ function MonitoringCharts({ samples, status }) {
|
|
|
569
608
|
/* @__PURE__ */ require_jsx_runtime.jsx("style", { children: `
|
|
570
609
|
[data-monitoring-layout] { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr); gap:16px; align-items:stretch }
|
|
571
610
|
[data-monitoring-trends], [data-monitoring-summaries] { display:contents }
|
|
611
|
+
.power-monitoring-period-action { position:absolute;right:16px;top:19px }
|
|
572
612
|
@container (min-width: 961px) {
|
|
573
613
|
[data-monitoring-summaries] > section { --power-monitoring-summary-top:16px }
|
|
574
614
|
}
|
|
@@ -578,23 +618,19 @@ function MonitoringCharts({ samples, status }) {
|
|
|
578
618
|
}
|
|
579
619
|
@container (max-width: 580px) {
|
|
580
620
|
[data-monitoring-layout] { grid-template-columns:minmax(0,1fr) }
|
|
621
|
+
.power-monitoring-period-action { left:16px;right:auto;top:15px }
|
|
622
|
+
[data-monitoring-trends] > section:first-child { --power-monitoring-trend-top:56px }
|
|
581
623
|
.power-ai-overview-actions + [data-testid="cluster-overview-page"] [data-monitoring-trends] > section:not(:first-child) { --power-monitoring-trend-top:16px }
|
|
582
624
|
}
|
|
583
625
|
` }),
|
|
584
|
-
/* @__PURE__ */ require_jsx_runtime.
|
|
626
|
+
history.status && /* @__PURE__ */ require_jsx_runtime.jsx("small", {
|
|
627
|
+
role: "status",
|
|
585
628
|
style: {
|
|
586
|
-
display: "
|
|
587
|
-
|
|
588
|
-
gap: 12,
|
|
629
|
+
display: "block",
|
|
630
|
+
color: "var(--textColorSecondary)",
|
|
589
631
|
marginBottom: 8
|
|
590
632
|
},
|
|
591
|
-
children:
|
|
592
|
-
range: history.range,
|
|
593
|
-
onChange: history.setRange
|
|
594
|
-
}), /* @__PURE__ */ require_jsx_runtime.jsx("small", {
|
|
595
|
-
role: "status",
|
|
596
|
-
children: history.status
|
|
597
|
-
})]
|
|
633
|
+
children: history.status
|
|
598
634
|
}),
|
|
599
635
|
/* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
600
636
|
"data-monitoring-layout": "",
|
|
@@ -603,7 +639,12 @@ function MonitoringCharts({ samples, status }) {
|
|
|
603
639
|
children: ["cpu", "memory"].map((metric) => /* @__PURE__ */ require_jsx_runtime.jsx(MetricChart, {
|
|
604
640
|
metric,
|
|
605
641
|
samples: history.samples,
|
|
606
|
-
status
|
|
642
|
+
status,
|
|
643
|
+
headerAction: metric === "cpu" ? /* @__PURE__ */ require_jsx_runtime.jsx(require_monitoring_history_view.MonitoringHistoryRange, {
|
|
644
|
+
compact: true,
|
|
645
|
+
range: history.range,
|
|
646
|
+
onChange: history.setRange
|
|
647
|
+
}) : void 0
|
|
607
648
|
}, metric))
|
|
608
649
|
}), /* @__PURE__ */ require_jsx_runtime.jsx("div", {
|
|
609
650
|
"data-monitoring-summaries": "",
|