cds-caching 3.0.1 → 3.1.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.
@@ -1 +1 @@
1
- {"version":3,"file":"Component-preload.js","sections":[{"offset":{"line":1,"column":0},"map":{"version":3,"names":["models","_interopRequireDefault","__models","formatter","__formatter","Component","UIComponent","extend","metadata","manifest","interfaces","init","_init","UIComponent.prototype.init.call","this","setModel","createDeviceModel","JSONModel","selectedCache","selectedTab","layout","getRouter","initialize","getContentDensityClass","_getContentDensityClass","contentDensityClass","undefined","document","body","classList","contains","Device","support","touch"],"sources":["Component.ts"],"sourcesContent":["import UIComponent from \"sap/ui/core/UIComponent\";\nimport models from \"./model/models\";\nimport Device from \"sap/ui/Device\";\nimport formatter from \"./model/formatter\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\n/**\n * @namespace cds.plugin.caching.dashboard\n */\nexport default class Component extends UIComponent {\n\tpublic static metadata = {\n\t\tmanifest: \"json\",\n\t\tinterfaces: [\"sap.ui.core.IAsyncContentCreation\"]\n\t};\n\n\tprivate contentDensityClass: string;\n\n\tpublic init(): void {\n\t\t// call the base component's init function\n\t\tsuper.init();\n\n\t\t// create the device model\n\t\tthis.setModel(models.createDeviceModel(), \"device\");\n\n\t\tthis.setModel(new JSONModel({\n\t\t\tselectedCache: null,\n\t\t\tselectedTab: \"main\",\n\t\t\tlayout: \"OneColumn\"\n\t\t}), \"app\");\n\n\t\t// create the formatter model\n\t\tthis.setModel(new JSONModel(formatter), \"formatter\");\n\n\t\t// create the views based on the url/hash\n\t\tthis.getRouter().initialize();\n\t}\n\n\t/**\n\t * This method can be called to determine whether the sapUiSizeCompact or sapUiSizeCozy\n\t * design mode class should be set, which influences the size appearance of some controls.\n\t * @public\n\t * @returns css class, either 'sapUiSizeCompact' or 'sapUiSizeCozy' - or an empty string if no css class should be set\n\t */\n\tpublic getContentDensityClass(): string {\n\t\tif (this.contentDensityClass === undefined) {\n\t\t\t// check whether FLP has already set the content density class; do nothing in this case\n\t\t\tif (document.body.classList.contains(\"sapUiSizeCozy\") || document.body.classList.contains(\"sapUiSizeCompact\")) {\n\t\t\t\tthis.contentDensityClass = \"\";\n\t\t\t} else if (!Device.support.touch) {\n\t\t\t\t// apply \"compact\" mode if touch is not supported\n\t\t\t\tthis.contentDensityClass = \"sapUiSizeCompact\";\n\t\t\t} else {\n\t\t\t\t// \"cozy\" in case of touch support; default for most sap.m controls, but needed for desktop-first controls like sap.ui.table.Table\n\t\t\t\tthis.contentDensityClass = \"sapUiSizeCozy\";\n\t\t\t}\n\t\t}\n\t\treturn this.contentDensityClass;\n\t}\n}\n"],"mappings":"AAAA,kSACOA,EAAMC,EAAAC,GAAA,MAENC,EAASF,EAAAG,GAGhB,MAGqBC,EAAkBC,EAAWC,OAAA,0CACnCC,SAAW,CACxBC,SAAU,OACVC,WAAY,CAAC,sCAKPC,KAAI,SAAAC,IAEVC,sBAAAC,MAGAA,KAAKC,SAASf,EAAOgB,oBAAqB,UAE1CF,KAAKC,SAAS,IAAIE,EAAU,CAC3BC,cAAe,KACfC,YAAa,OACbC,OAAQ,cACL,OAGJN,KAAKC,SAAS,IAAIE,EAAUd,GAAY,aAGxCW,KAAKO,YAAYC,YAClB,EAQOC,uBAAsB,SAAAC,IAC5B,GAAIV,KAAKW,sBAAwBC,UAAW,CAE3C,GAAIC,SAASC,KAAKC,UAAUC,SAAS,kBAAoBH,SAASC,KAAKC,UAAUC,SAAS,oBAAqB,CAC9GhB,KAAKW,oBAAsB,EAC5B,MAAO,IAAKM,EAAOC,QAAQC,MAAO,CAEjCnB,KAAKW,oBAAsB,kBAC5B,KAAO,CAENX,KAAKW,oBAAsB,eAC5B,CACD,CACA,OAAOX,KAAKW,mBACb,IAAC,OAhDmBpB,CAAS","ignoreList":[],"sourceRoot":""}},{"offset":{"line":2,"column":0},"map":{"version":3,"names":["BaseController","_interopRequireDefault","__BaseController","App","extend","onInit","_onInit","this","getView","addStyleClass","getOwnerComponent","getContentDensityClass"],"sources":["App.controller.ts"],"sourcesContent":["import BaseController from \"./BaseController\";\n\n/**\n * @namespace cds.plugin.caching.dashboard.controller\n */\nexport default class App extends BaseController {\n\n\tpublic onInit(): void {\n\t\tthis.getView().addStyleClass(this.getOwnerComponent().getContentDensityClass());\n\t}\n\n}\n"],"mappings":"AAAA,gNAAOA,EAAcC,EAAAC,GAErB,MAGqBC,EAAYH,EAAcI,OAAA,+CAEvCC,OAAM,SAAAC,IACZC,KAAKC,UAAUC,cAAcF,KAAKG,oBAAoBC,yBACvD,IAAC,OAJmBR,CAAG","ignoreList":[],"sourceRoot":"controller"}},{"offset":{"line":3,"column":0},"map":{"version":3,"names":["BaseController","Controller","extend","onInit","_onInit","getOwnerComponent","_getOwnerComponent","Controller.prototype.getOwnerComponent.call","this","getRouter","_getRouter","UIComponent","getRouterFor","getResourceBundle","_getResourceBundle","model","getModel","i18nText","async","_i18nText","key","args","bundle","length","getText","_getModel","name","getView","getAppModel","_getAppModel","getODataModel","_getODataModel","setModel","_setModel","navTo","_navTo","parameters","replace","undefined","onNavBack","_onNavBack","previousHash","History","getInstance","getPreviousHash","window","history","go"],"sources":["BaseController.ts"],"sourcesContent":["import Controller from \"sap/ui/core/mvc/Controller\";\nimport UIComponent from \"sap/ui/core/UIComponent\";\nimport AppComponent from \"../Component\";\nimport Model from \"sap/ui/model/Model\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport ODataModel from \"sap/ui/model/odata/v4/ODataModel\";\nimport ResourceModel from \"sap/ui/model/resource/ResourceModel\";\nimport ResourceBundle from \"sap/base/i18n/ResourceBundle\";\nimport Router from \"sap/ui/core/routing/Router\";\nimport History from \"sap/ui/core/routing/History\";\n\n/**\n * @namespace cds.plugin.caching.dashboard.controller\n */\nexport default abstract class BaseController extends Controller {\n\n\tpublic onInit(): void {\n\n\t}\n\n\t/**\n\t * Convenience method for accessing the component of the controller's view.\n\t * @returns The component of the controller's view\n\t */\n\tpublic getOwnerComponent(): AppComponent {\n\t\treturn super.getOwnerComponent() as AppComponent;\n\t}\n\n\t/**\n\t * Convenience method to get the components' router instance.\n\t * @returns The router instance\n\t */\n\tpublic getRouter(): Router {\n\t\treturn UIComponent.getRouterFor(this);\n\t}\n\n\t/**\n\t * Convenience method for getting the i18n resource bundle of the component.\n\t * @returns The i18n resource bundle of the component\n\t */\n\tpublic getResourceBundle(): Promise<ResourceBundle> {\n\t\tconst model = this.getOwnerComponent().getModel(\"i18n\") as ResourceModel;\n\t\treturn model.getResourceBundle() as Promise<ResourceBundle>;\n\t}\n\n\t/**\n\t * Returns a translated string from the i18n bundle (ResourceModel is async).\n\t */\n\tpublic async i18nText(key: string, args?: (string | number)[]): Promise<string> {\n\t\tconst bundle = await this.getResourceBundle();\n\t\treturn args && args.length\n\t\t\t? bundle.getText(key, args)\n\t\t\t: bundle.getText(key);\n\t}\n\n\t/**\n\t * Convenience method for getting the view model by name in every controller of the application.\n\t * @param name The model name\n\t * @returns The model instance\n\t */\n\tpublic getModel(name?: string): Model {\n\t\treturn this.getView().getModel(name);\n\t}\n\n\t/**\n\t * Returns the application JSON model.\n\t */\n\tprotected getAppModel(): JSONModel {\n\t\treturn this.getModel(\"app\") as JSONModel;\n\t}\n\n\t/**\n\t * Returns the default OData V4 model.\n\t */\n\tprotected getODataModel(): ODataModel {\n\t\treturn this.getModel() as ODataModel;\n\t}\n\n\t/**\n\t * Convenience method for setting the view model in every controller of the application.\n\t * @param model The model instance\n\t * @param name The model name\n\t * @returns The current base controller instance\n\t */\n\tpublic setModel(model: Model, name?: string): BaseController {\n\t\tthis.getView().setModel(model, name);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Convenience method for triggering the navigation to a specific target.\n\t * @param name Target name\n\t * @param parameters Navigation parameters\n\t * @param replace Defines if the hash should be replaced (no browser history entry) or set (browser history entry)\n\t */\n\tpublic navTo(name: string, parameters?: object, replace?: boolean): void {\n\t\tthis.getRouter().navTo(name, parameters, undefined, replace);\n\t}\n\n\t/**\n\t * Convenience event handler for navigating back.\n\t * It there is a history entry we go one step back in the browser history\n\t * If not, it will replace the current entry of the browser history with the main route.\n\t */\n\tpublic onNavBack(): void {\n\t\tconst previousHash = History.getInstance().getPreviousHash();\n\t\tif (previousHash !== undefined) {\n\t\t\twindow.history.go(-1);\n\t\t} else {\n\t\t\tthis.getRouter().navTo(\"main\", {}, undefined, true);\n\t\t}\n\t}\n}\n"],"mappings":"AAAA,+LAWA,MAG8BA,EAAuBC,EAAUC,OAAA,0DAEvDC,OAAM,SAAAC,IAEb,EAMOC,kBAAiB,SAAAC,IACvB,OAAAC,mCAAAC,KACD,EAMOC,UAAS,SAAAC,IACf,OAAOC,EAAYC,aAAaJ,KACjC,EAMOK,kBAAiB,SAAAC,IACvB,MAAMC,EAAQP,KAAKH,oBAAoBW,SAAS,QAChD,OAAOD,EAAMF,mBACd,EAKaI,SAAQC,eAAAC,EAACC,EAAaC,GAClC,MAAMC,QAAed,KAAKK,oBAC1B,OAAOQ,GAAQA,EAAKE,OACjBD,EAAOE,QAAQJ,EAAKC,GACpBC,EAAOE,QAAQJ,EACnB,EAOOJ,SAAQ,SAAAS,EAACC,GACf,OAAOlB,KAAKmB,UAAUX,SAASU,EAChC,EAKUE,YAAW,SAAAC,IACpB,OAAOrB,KAAKQ,SAAS,MACtB,EAKUc,cAAa,SAAAC,IACtB,OAAOvB,KAAKQ,UACb,EAQOgB,SAAQ,SAAAC,EAAClB,EAAcW,GAC7BlB,KAAKmB,UAAUK,SAASjB,EAAOW,GAC/B,OAAOlB,IACR,EAQO0B,MAAK,SAAAC,EAACT,EAAcU,EAAqBC,GAC/C7B,KAAKC,YAAYyB,MAAMR,EAAMU,EAAYE,UAAWD,EACrD,EAOOE,UAAS,SAAAC,IACf,MAAMC,EAAeC,EAAQC,cAAcC,kBAC3C,GAAIH,IAAiBH,UAAW,CAC/BO,OAAOC,QAAQC,IAAI,EACpB,KAAO,CACNvC,KAAKC,YAAYyB,MAAM,OAAQ,CAAC,EAAGI,UAAW,KAC/C,CACD,IAAC,OAjG4BtC,CAAc","ignoreList":[],"sourceRoot":"controller"}},{"offset":{"line":4,"column":0},"map":{"version":3,"names":["BaseController","_interopRequireDefault","__BaseController","Cache","extend","onInit","_onInit","BaseController.prototype.onInit.call","this","uiModel","JSONModel","selectedTab","statistics","loading","loadingEntries","showEntriesTable","cacheEntries","createKey","createValue","createTtl","getKey","getValue","deleteKey","metricsEnabled","keyMetricsEnabled","getView","setModel","getRouter","getRoute","attachPatternMatched","onRouteMatched","_onRouteMatched","event","cache","getParameter","getAppModel","setProperty","bindElement","path","replace","events","change","context","getElementBinding","getBoundContext","getProperty","loadStatistics","loadKeyMetricsData","_loadStatistics","refresh","table","byId","binding","getBinding","isSuspended","resume","_loadKeyMetricsData","onLoadCacheEntries","async","_onLoadCacheEntries","cacheContext","setSizeLimit","model","getODataModel","bindContext","invoke","value","entries","requestObject","entry","Array","isArray","tags","join","error","console","MessageBox","i18nText","onMetricsRowSelect","_onMetricsRowSelect","selectedRow","metric","getObject","cacheName","navTo","metricId","ID","onSetKey","_onSetKey","key","ttl","setParameter","MessageToast","show","onGetKey","_onGetKey","action","result","onDeleteKey","_onDeleteKey","onEnableMetricsChange","_onEnableMetricsChange","enabled","onEnableKeyMetricsChange","_onEnableKeyMetricsChange","onClearCache","_onClearCache","confirmMsg","confirm","actions","Action","OK","CANCEL","emphasizedAction","onClose","success","onRefresh","_onRefresh","handleClose","_handleClose","handleFullScreen","_handleFullScreen","handleExitFullScreen","_handleExitFullScreen","onKeyMetricsRowSelect","_onKeyMetricsRowSelect","keyMetricId","keyName","encodeURIComponent","onRefreshKeyMetricsData","_onRefreshKeyMetricsData","onRefreshMetricsData","_onRefreshMetricsData","onShowKeyMetricsMetadata","_onShowKeyMetricsMetadata","getSource","getBindingContext","formatJson","json","JSON","stringify","parse","localData","metadata","subject","query","cacheOptions","fragment","Fragment","load","name","controller","popover","openBy","onClearMetrics","_onClearMetrics","onClearKeyMetrics","_onClearKeyMetrics"],"sources":["Cache.controller.ts"],"sourcesContent":["import MessageBox from \"sap/m/MessageBox\";\nimport BaseController from \"./BaseController\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport { Route$PatternMatchedEvent } from \"sap/ui/core/routing/Route\";\nimport Table, { Table$RowSelectionChangeEvent } from \"sap/ui/table/Table\";\nimport MessageToast from \"sap/m/MessageToast\";\nimport Context from \"sap/ui/model/odata/v4/Context\";\nimport ODataListBinding from \"sap/ui/model/odata/v4/ODataListBinding\";\nimport { Button$PressEvent } from \"sap/m/Button\";\nimport { Switch$ChangeEvent } from \"sap/m/Switch\";\nimport Fragment from \"sap/ui/core/Fragment\";\nimport Popover from \"sap/m/Popover\";\n\n/**\n * @namespace cds.plugin.caching.dashboard.controller\n */\nexport default class Cache extends BaseController {\n private uiModel: JSONModel;\n\n public onInit(): void {\n super.onInit();\n\n this.uiModel = new JSONModel({\n selectedTab: \"main\",\n statistics: [],\n loading: false,\n loadingEntries: false,\n showEntriesTable: false,\n cacheEntries: [],\n\n createKey: \"\",\n createValue: \"\",\n createTtl: 3600,\n\n getKey: \"\",\n getValue: \"\",\n\n deleteKey: \"\",\n\n metricsEnabled: false,\n keyMetricsEnabled: false,\n });\n this.getView().setModel(this.uiModel, \"ui\");\n\n this.getRouter().getRoute(\"cache\").attachPatternMatched(this.onRouteMatched, this);\n }\n\n public onRouteMatched(event: Route$PatternMatchedEvent): void {\n const { cache } = event.getParameter(\"arguments\") as { cache: string };\n this.getAppModel().setProperty(\"/selectedCache\", cache);\n this.getAppModel().setProperty(\"/layout\", \"TwoColumnsMidExpanded\");\n\n this.getView().bindElement({\n path: `/Caches('${cache.replace(/'/g, \"''\")}')`,\n events: {\n change: () => {\n const context = this.getView().getElementBinding()?.getBoundContext();\n if (context) {\n this.uiModel.setProperty(\"/config\", context.getProperty(\"configuration\"));\n this.loadStatistics();\n this.loadKeyMetricsData();\n }\n }\n }\n });\n }\n\n private loadStatistics(refresh = false): void {\n const table = this.getView().byId(\"metricsTable\") as Table;\n const binding = table.getBinding(\"rows\") as ODataListBinding;\n if (binding.isSuspended()) {\n binding.resume();\n }\n if (refresh) {\n binding.refresh();\n }\n }\n\n private loadKeyMetricsData(refresh = false): void {\n const table = this.getView().byId(\"keyMetricsTable\") as Table;\n const binding = table.getBinding(\"rows\") as ODataListBinding;\n if (binding.isSuspended()) {\n binding.resume();\n }\n if (refresh) {\n binding.refresh();\n }\n }\n\n public async onLoadCacheEntries(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n\n try {\n this.uiModel.setProperty(\"/loadingEntries\", true);\n this.uiModel.setProperty(\"/showEntriesTable\", true);\n this.uiModel.setSizeLimit(100_000);\n\n const model = this.getODataModel();\n const context = model.bindContext(`plugin.cds_caching.CachingApiService.getEntries(...)`, cacheContext);\n await context.invoke();\n const { value: entries } = await context.requestObject() as { value: Array<{ tags: string[] | string; entryKey: string; value: string; timestamp: string }> };\n for (const entry of entries) {\n if (Array.isArray(entry.tags)) {\n entry.tags = entry.tags.join(\", \");\n }\n }\n\n this.uiModel.setProperty(\"/cacheEntries\", entries);\n\n } catch (error) {\n console.error(\"Error loading cache entries:\", error);\n MessageBox.error(await this.i18nText(\"msgLoadEntriesFailed\"));\n } finally {\n this.uiModel.setProperty(\"/loadingEntries\", false);\n }\n }\n\n public onMetricsRowSelect(event: Table$RowSelectionChangeEvent): void {\n const selectedRow = event.getParameter(\"rowContext\");\n if (selectedRow) {\n const metric = selectedRow.getObject() as { ID: string };\n const cacheName = this.getView().getElementBinding().getBoundContext().getProperty(\"name\");\n\n this.getRouter().navTo(\"singleMetric\", {\n cache: cacheName,\n metricId: metric.ID\n });\n\n this.getAppModel().setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n }\n }\n\n public async onSetKey(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n const key = this.uiModel.getProperty(\"/createKey\");\n const value = this.uiModel.getProperty(\"/createValue\");\n const ttl = this.uiModel.getProperty(\"/createTtl\");\n\n if (!key || !value) {\n MessageBox.error(await this.i18nText(\"msgProvideKeyValue\"));\n return;\n }\n\n try {\n const model = this.getODataModel();\n const context = model.bindContext(`plugin.cds_caching.CachingApiService.setEntry(...)`, cacheContext);\n context.setParameter(\"key\", key);\n context.setParameter(\"value\", value);\n context.setParameter(\"ttl\", ttl);\n await context.invoke();\n\n MessageToast.show(await this.i18nText(\"msgEntryCreated\"));\n\n this.uiModel.setProperty(\"/createKey\", \"\");\n this.uiModel.setProperty(\"/createValue\", \"\");\n this.uiModel.setProperty(\"/createTtl\", 3600);\n\n } catch (error) {\n console.error(\"Error setting cache entry:\", error);\n MessageBox.error(await this.i18nText(\"msgCreateEntryFailed\"));\n }\n }\n\n public async onGetKey(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n const key = this.uiModel.getProperty(\"/getKey\");\n\n if (!key) {\n MessageBox.error(await this.i18nText(\"msgProvideKey\"));\n return;\n }\n\n try {\n const model = this.getODataModel();\n const action = model.bindContext(`plugin.cds_caching.CachingApiService.getEntry(...)`, cacheContext);\n action.setParameter(\"key\", key);\n await action.invoke();\n\n const result = await action.requestObject() as { value?: string };\n this.uiModel.setProperty(\"/getValue\", result.value || (await this.i18nText(\"msgNotFound\")));\n\n } catch (error) {\n console.error(\"Error getting cache entry:\", error);\n this.uiModel.setProperty(\"/getValue\", await this.i18nText(\"msgGetEntryError\"));\n }\n }\n\n public async onDeleteKey(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n const key = this.uiModel.getProperty(\"/deleteKey\");\n\n if (!key) {\n MessageBox.error(await this.i18nText(\"msgProvideKey\"));\n return;\n }\n\n try {\n const model = this.getODataModel();\n const context = model.bindContext(`plugin.cds_caching.CachingApiService.deleteEntry(...)`, cacheContext);\n context.setParameter(\"key\", key);\n await context.invoke();\n\n MessageToast.show(await this.i18nText(\"msgEntryDeleted\"));\n this.uiModel.setProperty(\"/deleteKey\", \"\");\n\n } catch (error) {\n console.error(\"Error deleting cache entry:\", error);\n MessageBox.error(await this.i18nText(\"msgDeleteEntryFailed\"));\n }\n }\n\n public async onEnableMetricsChange(event: Switch$ChangeEvent): Promise<void> {\n const enabled = event.getParameter(\"state\");\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n\n try {\n const model = this.getODataModel();\n const context = model.bindContext(`plugin.cds_caching.CachingApiService.setMetricsEnabled(...)`, cacheContext);\n context.setParameter(\"enabled\", enabled);\n await context.invoke();\n\n MessageToast.show(await this.i18nText(enabled ? \"msgMetricsEnabled\" : \"msgMetricsDisabled\"));\n } catch (error) {\n console.error(\"Error setting metrics enabled:\", error);\n MessageBox.error(await this.i18nText(\"msgFailedUpdateMetrics\"));\n this.uiModel.setProperty(\"/metricsEnabled\", !enabled);\n }\n }\n\n public async onEnableKeyMetricsChange(event: Switch$ChangeEvent): Promise<void> {\n const enabled = event.getParameter(\"state\");\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n\n try {\n const model = this.getODataModel();\n const context = model.bindContext(`plugin.cds_caching.CachingApiService.setKeyMetricsEnabled(...)`, cacheContext);\n context.setParameter(\"enabled\", enabled);\n await context.invoke();\n\n MessageToast.show(await this.i18nText(enabled ? \"msgKeyMetricsEnabled\" : \"msgKeyMetricsDisabled\"));\n\n } catch (error) {\n console.error(\"Error setting key metrics enabled:\", error);\n MessageBox.error(await this.i18nText(\"msgFailedKeyMetrics\"));\n this.uiModel.setProperty(\"/keyMetricsEnabled\", !enabled);\n }\n }\n\n public async onClearCache(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n\n const confirmMsg = await this.i18nText(\"msgConfirmClearCache\");\n MessageBox.confirm(confirmMsg, {\n actions: [MessageBox.Action.OK, MessageBox.Action.CANCEL],\n emphasizedAction: MessageBox.Action.OK,\n onClose: async (action: string) => {\n if (action === MessageBox.Action.OK) {\n try {\n const model = this.getODataModel();\n const context = model.bindContext(`plugin.cds_caching.CachingApiService.clear(...)`, cacheContext);\n await context.invoke();\n\n MessageBox.success(await this.i18nText(\"msgCacheCleared\"));\n await this.onRefresh();\n\n } catch (error) {\n console.error(\"Error clearing cache:\", error);\n MessageBox.error(await this.i18nText(\"msgClearCacheFailed\"));\n }\n }\n }\n });\n }\n\n public async onRefresh(): Promise<void> {\n if (this.getView().getElementBinding()?.getBoundContext()) {\n this.loadStatistics(true);\n this.loadKeyMetricsData(true);\n }\n }\n\n public handleClose(): void {\n this.getRouter().navTo(\"main\");\n }\n\n public handleFullScreen(): void {\n this.getAppModel().setProperty(\"/layout\", \"MidColumnFullScreen\");\n }\n\n public handleExitFullScreen(): void {\n this.getAppModel().setProperty(\"/layout\", \"TwoColumnsMidExpanded\");\n }\n\n public onKeyMetricsRowSelect(event: Table$RowSelectionChangeEvent): void {\n const selectedRow = event.getParameter(\"rowContext\");\n if (selectedRow) {\n const metric = selectedRow.getObject() as { ID: string; keyName: string };\n const cacheName = this.getView().getElementBinding().getBoundContext().getProperty(\"name\");\n\n this.getRouter().navTo(\"singleKeyMetric\", {\n cache: cacheName,\n keyMetricId: metric.ID,\n keyName: encodeURIComponent(metric.keyName)\n });\n\n this.getAppModel().setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n }\n }\n\n public async onRefreshKeyMetricsData(): Promise<void> {\n this.loadKeyMetricsData(true);\n }\n\n public async onRefreshMetricsData(): Promise<void> {\n this.loadStatistics(true);\n }\n\n public async onShowKeyMetricsMetadata(event: Button$PressEvent): Promise<void> {\n const context = event.getSource().getBindingContext() as Context;\n\n const formatJson = (json: string) => {\n try {\n return JSON.stringify(JSON.parse(json), null, 2);\n } catch {\n return json;\n }\n };\n\n const localData = new JSONModel({\n metadata: formatJson(context.getProperty(\"metadata\")),\n subject: formatJson(context.getProperty(\"subject\")),\n query: formatJson(context.getProperty(\"query\")),\n cacheOptions: formatJson(context.getProperty(\"cacheOptions\")),\n keyName: context.getProperty(\"keyName\"),\n });\n\n const fragment = await Fragment.load({\n name: \"cds.plugin.caching.dashboard.view.KeyMetricsMetadata\",\n controller: this,\n });\n\n const popover = fragment as Popover;\n popover.setModel(localData, \"localData\");\n popover.openBy(event.getSource());\n }\n\n public async onClearMetrics(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n if (!cacheContext) {\n return;\n }\n\n try {\n const model = this.getODataModel();\n const action = model.bindContext(`plugin.cds_caching.CachingApiService.clearMetrics(...)`, cacheContext);\n await action.invoke();\n\n MessageToast.show(await this.i18nText(\"msgMetricsCleared\"));\n await this.onRefreshMetricsData();\n\n } catch (error) {\n console.error(\"Error clearing metrics:\", error);\n MessageBox.error(await this.i18nText(\"msgFailedClearMetrics\"));\n }\n }\n\n public async onClearKeyMetrics(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n if (!cacheContext) {\n return;\n }\n\n try {\n const model = this.getODataModel();\n const action = model.bindContext(`plugin.cds_caching.CachingApiService.clearKeyMetrics(...)`, cacheContext);\n await action.invoke();\n\n MessageToast.show(await this.i18nText(\"msgKeyMetricsCleared\"));\n await this.onRefreshKeyMetricsData();\n\n } catch (error) {\n console.error(\"Error clearing key metrics:\", error);\n MessageBox.error(await this.i18nText(\"msgFailedClearKeyMetrics\"));\n }\n }\n\n}\n"],"mappings":"AAAA,uTACOA,EAAcC,EAAAC,GAYrB,MAGqBC,EAAcH,EAAcI,OAAA,iDAGtCC,OAAM,SAAAC,IACTC,wBAAAC,MAEAA,KAAKC,QAAU,IAAIC,EAAU,CACzBC,YAAa,OACbC,WAAY,GACZC,QAAS,MACTC,eAAgB,MAChBC,iBAAkB,MAClBC,aAAc,GAEdC,UAAW,GACXC,YAAa,GACbC,UAAW,KAEXC,OAAQ,GACRC,SAAU,GAEVC,UAAW,GAEXC,eAAgB,MAChBC,kBAAmB,QAEvBhB,KAAKiB,UAAUC,SAASlB,KAAKC,QAAS,MAEtCD,KAAKmB,YAAYC,SAAS,SAASC,qBAAqBrB,KAAKsB,eAAgBtB,KACjF,EAEOsB,eAA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rF,EAAQG,YAAY,aAGjC,MAAMsG,QAAiBC,EAASC,KAAK,CACjCC,KAAM,uDACNC,WAAY/I,OAGhB,MAAMgJ,EAAUL,EAChBK,EAAQ9H,SAASoH,EAAW,aAC5BU,EAAQC,OAAOzH,EAAMuG,YACzB,EAEamB,eAAchG,eAAAiG,IACvB,MAAM/F,EAAepD,KAAKiB,UAAUkB,oBAAoBC,kBACxD,IAAKgB,EAAc,CACf,MACJ,CAEA,IACI,MAAME,EAAQtD,KAAKuD,gBACnB,MAAMiC,EAASlC,EAAME,YAAY,yDAA0DJ,SACrFoC,EAAO/B,SAEb2B,EAAaC,WAAWrF,KAAKqE,SAAS,4BAChCrE,KAAK2H,sBAEf,CAAE,MAAOzD,GACLC,QAAQD,MAAM,0BAA2BA,GACzCE,EAAWF,YAAYlE,KAAKqE,SAAS,yBACzC,CACJ,EAEa+E,kBAAiBlG,eAAAmG,IAC1B,MAAMjG,EAAepD,KAAKiB,UAAUkB,oBAAoBC,kBACxD,IAAKgB,EAAc,CACf,MACJ,CAEA,IACI,MAAME,EAAQtD,KAAKuD,gBACnB,MAAMiC,EAASlC,EAAME,YAAY,4DAA6DJ,SACxFoC,EAAO/B,SAEb2B,EAAaC,WAAWrF,KAAKqE,SAAS,+BAChCrE,KAAKyH,yBAEf,CAAE,MAAOvD,GACLC,QAAQD,MAAM,8BAA+BA,GAC7CE,EAAWF,YAAYlE,KAAKqE,SAAS,4BACzC,CACJ,IAAC,OAhXgB1E,CAAK","ignoreList":[],"sourceRoot":"controller"}},{"offset":{"line":5,"column":0},"map":{"version":3,"names":["BaseController","_interopRequireDefault","__BaseController","Main","extend","onInit","_onInit","this","getRouter","getRoute","attachPatternMatched","onRouteMatched","_onRouteMatched","_event","getAppModel","setProperty","getView","byId","getBinding","refresh","onCacheSelect","_onCacheSelect","event","cache","getParameter","getBindingContext","getProperty","navTo","onRefresh","_onRefresh"],"sources":["Main.controller.ts"],"sourcesContent":["import { ListBase$ItemPressEvent } from \"sap/m/ListBase\";\nimport BaseController from \"./BaseController\";\nimport { Route$PatternMatchedEvent } from \"sap/ui/core/routing/Route\";\nimport List from \"sap/m/List\";\n\n/**\n * @namespace cds.plugin.caching.dashboard.controller\n */\nexport default class Main extends BaseController {\n\n\tpublic onInit(): void {\n\t\tthis.getRouter().getRoute(\"main\").attachPatternMatched(this.onRouteMatched, this);\n\t}\n\n\tpublic onRouteMatched(_event: Route$PatternMatchedEvent): void {\n\t\tthis.getAppModel().setProperty(\"/layout\", \"OneColumn\");\n\t\t(this.getView().byId(\"cachesList\") as List).getBinding(\"items\").refresh();\n\t}\n\n\tpublic onCacheSelect(event: ListBase$ItemPressEvent): void {\n\t\tconst cache = event.getParameter(\"listItem\").getBindingContext().getProperty(\"name\");\n\t\tthis.getRouter().navTo(\"cache\", { cache: cache });\n\t}\n\n\tpublic onRefresh(): void {\n\t\t(this.getView().byId(\"cachesList\") as List).getBinding(\"items\").refresh();\n\t}\n\n}\n"],"mappings":"AAAA,iNACOA,EAAcC,EAAAC,GAIrB,MAGqBC,EAAaH,EAAcI,OAAA,gDAExCC,OAAM,SAAAC,IACZC,KAAKC,YAAYC,SAAS,QAAQC,qBAAqBH,KAAKI,eAAgBJ,KAC7E,EAEOI,eAAc,SAAAC,EAACC,GACrBN,KAAKO,cAAcC,YAAY,UAAW,aACzCR,KAAKS,UAAUC,KAAK,cAAuBC,WAAW,SAASC,SACjE,EAEOC,cAAa,SAAAC,EAACC,GACpB,MAAMC,EAAQD,EAAME,aAAa,YAAYC,oBAAoBC,YAAY,QAC7EnB,KAAKC,YAAYmB,MAAM,QAAS,CAAEJ,MAAOA,GAC1C,EAEOK,UAAS,SAAAC,IACdtB,KAAKS,UAAUC,KAAK,cAAuBC,WAAW,SAASC,SACjE,IAAC,OAlBmBhB,CAAI","ignoreList":[],"sourceRoot":"controller"}},{"offset":{"line":6,"column":0},"map":{"version":3,"names":["BaseController","_interopRequireDefault","__BaseController","SingleKeyMetric","extend","onInit","_onInit","BaseController.prototype.onInit.call","this","uiModel","JSONModel","keyMetricId","keyName","operation","dataType","operationType","target","tenant","user","locale","hits","misses","totalRequests","hitRatio","cacheEfficiency","avgHitLatency","avgMissLatency","nativeHits","nativeMisses","nativeSets","nativeDeletes","metadata","subject","query","cacheOptions","lastAccess","timestamp","getView","setModel","getRouter","getRoute","attachPatternMatched","onRouteMatched","_onRouteMatched","event","cache","getParameter","setProperty","getAppModel","loadKeyMetric","decodeURIComponent","escapeODataString","_escapeODataString","value","replace","formatJson","_formatJson","JSON","stringify","parse","async","_loadKeyMetric","cacheName","model","getODataModel","context","bindContext","metric","requestObject","MessageBox","error","i18nText","console","onRefresh","_onRefresh","getProperty","handleFullScreen","_handleFullScreen","handleExitFullScreen","_handleExitFullScreen","handleClose","_handleClose","navTo"],"sources":["SingleKeyMetric.controller.ts"],"sourcesContent":["import BaseController from \"./BaseController\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport { Route$PatternMatchedEvent } from \"sap/ui/core/routing/Route\";\nimport MessageBox from \"sap/m/MessageBox\";\n\ninterface KeyMetricData {\n keyName?: string;\n operation?: string;\n dataType?: string;\n operationType?: string;\n target?: string;\n tenant?: string;\n user?: string;\n locale?: string;\n hits?: number;\n misses?: number;\n totalRequests?: number;\n hitRatio?: number;\n cacheEfficiency?: number;\n avgHitLatency?: number;\n avgMissLatency?: number;\n nativeHits?: number;\n nativeMisses?: number;\n nativeSets?: number;\n nativeDeletes?: number;\n metadata?: string;\n subject?: string;\n query?: string;\n cacheOptions?: string;\n lastAccess?: string;\n timestamp?: string;\n}\n\n/**\n * @namespace cds.plugin.caching.dashboard.controller\n */\nexport default class SingleKeyMetric extends BaseController {\n private uiModel: JSONModel;\n\n public onInit(): void {\n super.onInit();\n\n this.uiModel = new JSONModel({\n keyMetricId: \"\",\n keyName: \"\",\n operation: \"\",\n dataType: \"\",\n operationType: \"\",\n target: \"\",\n tenant: \"\",\n user: \"\",\n locale: \"\",\n hits: 0,\n misses: 0,\n totalRequests: 0,\n hitRatio: 0,\n cacheEfficiency: 0,\n avgHitLatency: 0,\n avgMissLatency: 0,\n nativeHits: 0,\n nativeMisses: 0,\n nativeSets: 0,\n nativeDeletes: 0,\n metadata: \"\",\n subject: \"\",\n query: \"\",\n cacheOptions: \"\",\n lastAccess: \"\",\n timestamp: \"\",\n });\n this.getView().setModel(this.uiModel, \"ui\");\n\n this.getRouter().getRoute(\"singleKeyMetric\").attachPatternMatched(this.onRouteMatched, this);\n }\n\n public onRouteMatched(event: Route$PatternMatchedEvent): void {\n const { cache, keyMetricId, keyName } = event.getParameter(\"arguments\") as {\n cache: string;\n keyMetricId: string;\n keyName: string;\n };\n\n this.uiModel.setProperty(\"/keyMetricId\", keyMetricId);\n this.getAppModel().setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n\n this.loadKeyMetric(cache, keyMetricId, decodeURIComponent(keyName));\n }\n\n private escapeODataString(value: string): string {\n return value.replace(/'/g, \"''\");\n }\n\n private formatJson(value: string): string {\n if (!value) {\n return \"\";\n }\n try {\n return JSON.stringify(JSON.parse(value), null, 2);\n } catch {\n return value;\n }\n }\n\n private async loadKeyMetric(cacheName: string, keyMetricId: string, keyName: string): Promise<void> {\n try {\n const model = this.getODataModel();\n const context = model.bindContext(\n `/KeyMetrics(ID='${this.escapeODataString(keyMetricId)}',cache='${this.escapeODataString(cacheName)}',keyName='${this.escapeODataString(keyName)}')`\n );\n const metric = await context.requestObject() as KeyMetricData;\n\n if (metric) {\n this.uiModel.setProperty(\"/keyName\", metric.keyName || keyName);\n this.uiModel.setProperty(\"/operation\", metric.operation || \"\");\n this.uiModel.setProperty(\"/dataType\", metric.dataType || \"\");\n this.uiModel.setProperty(\"/operationType\", metric.operationType || \"\");\n this.uiModel.setProperty(\"/target\", metric.target || \"\");\n this.uiModel.setProperty(\"/tenant\", metric.tenant || \"\");\n this.uiModel.setProperty(\"/user\", metric.user || \"\");\n this.uiModel.setProperty(\"/locale\", metric.locale || \"\");\n this.uiModel.setProperty(\"/hits\", metric.hits || 0);\n this.uiModel.setProperty(\"/misses\", metric.misses || 0);\n this.uiModel.setProperty(\"/totalRequests\", metric.totalRequests || 0);\n this.uiModel.setProperty(\"/hitRatio\", metric.hitRatio || 0);\n this.uiModel.setProperty(\"/cacheEfficiency\", metric.cacheEfficiency || 0);\n this.uiModel.setProperty(\"/avgHitLatency\", metric.avgHitLatency || 0);\n this.uiModel.setProperty(\"/avgMissLatency\", metric.avgMissLatency || 0);\n this.uiModel.setProperty(\"/nativeHits\", metric.nativeHits || 0);\n this.uiModel.setProperty(\"/nativeMisses\", metric.nativeMisses || 0);\n this.uiModel.setProperty(\"/nativeSets\", metric.nativeSets || 0);\n this.uiModel.setProperty(\"/nativeDeletes\", metric.nativeDeletes || 0);\n this.uiModel.setProperty(\"/metadata\", this.formatJson(metric.metadata || \"\"));\n this.uiModel.setProperty(\"/subject\", this.formatJson(metric.subject || \"\"));\n this.uiModel.setProperty(\"/query\", this.formatJson(metric.query || \"\"));\n this.uiModel.setProperty(\"/cacheOptions\", this.formatJson(metric.cacheOptions || \"\"));\n this.uiModel.setProperty(\"/lastAccess\", metric.lastAccess || \"\");\n this.uiModel.setProperty(\"/timestamp\", metric.timestamp || \"\");\n } else {\n MessageBox.error(await this.i18nText(\"msgMetricNotFound\"));\n }\n } catch (error) {\n console.error(\"Error loading key metric:\", error);\n MessageBox.error(await this.i18nText(\"msgLoadMetricFailed\"));\n }\n }\n\n public onRefresh(): void {\n const cacheName = this.getAppModel().getProperty(\"/selectedCache\");\n const keyMetricId = this.uiModel.getProperty(\"/keyMetricId\");\n const keyName = this.uiModel.getProperty(\"/keyName\");\n\n if (cacheName && keyMetricId && keyName) {\n this.loadKeyMetric(cacheName, keyMetricId, keyName);\n }\n }\n\n public handleFullScreen(): void {\n this.getAppModel().setProperty(\"/layout\", \"EndColumnFullScreen\");\n }\n\n public handleExitFullScreen(): void {\n this.getAppModel().setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n }\n\n public handleClose(): void {\n this.getAppModel().setProperty(\"/layout\", \"TwoColumnsMidExpanded\");\n this.getRouter().navTo(\"cache\", { cache: this.getAppModel().getProperty(\"/selectedCache\") });\n }\n}\n"],"mappings":"AAAA,iRAAOA,EAAcC,EAAAC,GAiCrB,MAGqBC,EAAwBH,EAAcI,OAAA,2DAGhDC,OAAM,SAAAC,IACTC,wBAAAC,MAEAA,KAAKC,QAAU,IAAIC,EAAU,CACzBC,YAAa,GACbC,QAAS,GACTC,UAAW,GACXC,SAAU,GACVC,cAAe,GACfC,OAAQ,GACRC,OAAQ,GACRC,KAAM,GACNC,OAAQ,GACRC,KAAM,EACNC,OAAQ,EACRC,cAAe,EACfC,SAAU,EACVC,gBAAiB,EACjBC,cAAe,EACfC,eAAgB,EAChBC,WAAY,EACZC,aAAc,EACdC,WAAY,EACZC,cAAe,EACfC,SAAU,GACVC,QAAS,GACTC,MAAO,GACPC,aAAc,GACdC,WAAY,GACZC,UAAW,KAEf5B,KAAK6B,UAAUC,SAAS9B,KAAKC,QAAS,MAEtCD,KAAK+B,YAAYC,SAAS,mBAAmBC,qBAAqBjC,KAAKkC,eAAgBlC,KAC3F,EAEOkC,eAAc,SAAAC,EAACC,GAClB,MAAMC,MAAEA,EAAKlC,YAAEA,EAAWC,QAAEA,GAAYgC,EAAME,aAAa,aAM3DtC,KAAKC,QAAQsC,YAAY,eAAgBpC,GACzCH,KAAKwC,cAAcD,YAAY,UAAW,2BAE1CvC,KAAKyC,cAAcJ,EAAOlC,EAAauC,mBAAmBtC,GAC9D,EAEQuC,kBAAiB,SAAAC,EAACC,GACtB,OAAOA,EAAMC,QAAQ,KAAM,KAC/B,EAEQC,WAAU,SAAAC,EAACH,GACf,IAAKA,EAAO,CACR,MAAO,EACX,CACA,IACI,OAAOI,KAAKC,UAAUD,KAAKE,MAAMN,GAAQ,KAAM,EACnD,CAAE,MACE,OAAOA,CACX,CACJ,EAEcJ,cAAaW,eAAAC,EAACC,EAAmBnD,EAAqBC,GAChE,IACI,MAAMmD,EAA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C,YAAY,YAAavC,KAAK+C,WAAWY,EAAOpC,UAAY,KACzEvB,KAAKC,QAAQsC,YAAY,WAAYvC,KAAK+C,WAAWY,EAAOnC,SAAW,KACvExB,KAAKC,QAAQsC,YAAY,SAAUvC,KAAK+C,WAAWY,EAAOlC,OAAS,KACnEzB,KAAKC,QAAQsC,YAAY,gBAAiBvC,KAAK+C,WAAWY,EAAOjC,cAAgB,KACjF1B,KAAKC,QAAQsC,YAAY,cAAeoB,EAAOhC,YAAc,IAC7D3B,KAAKC,QAAQsC,YAAY,aAAcoB,EAAO/B,WAAa,GAC/D,KAAO,CACHiC,EAAWC,YAAY9D,KAAK+D,SAAS,qBACzC,CACJ,CAAE,MAAOD,GACLE,QAAQF,MAAM,4BAA6BA,GAC3CD,EAAWC,YAAY9D,KAAK+D,SAAS,uBACzC,CACJ,EAEOE,UAAS,SAAAC,IACZ,MAAMZ,EAAYtD,KAAKwC,cAAc2B,YAAY,kBACjD,MAAMhE,EAAcH,KAAKC,QAAQkE,YAAY,gBAC7C,MAAM/D,EAAUJ,KAAKC,QAAQkE,YAAY,YAEzC,GAAIb,GAAanD,GAAeC,EAAS,CACrCJ,KAAKyC,cAAca,EAAWnD,EAAaC,EAC/C,CACJ,EAEOgE,iBAAgB,SAAAC,IACnBrE,KAAKwC,cAAcD,YAAY,UAAW,sBAC9C,EAEO+B,qBAAoB,SAAAC,IACvBvE,KAAKwC,cAAcD,YAAY,UAAW,0BAC9C,EAEOiC,YAAW,SAAAC,IACdzE,KAAKwC,cAAcD,YAAY,UAAW,yBAC1CvC,KAAK+B,YAAY2C,MAAM,QAAS,CAAErC,MAAOrC,KAAKwC,cAAc2B,YAAY,mBAC5E,IAAC,OAnIgBxE,CAAe","ignoreList":[],"sourceRoot":"controller"}},{"offset":{"line":7,"column":0},"map":{"version":3,"names":["BaseController","_interopRequireDefault","__BaseController","SingleMetric","extend","onInit","_onInit","BaseController.prototype.onInit.call","this","uiModel","JSONModel","metricId","hitRatio","cacheEfficiency","throughput","errorRate","avgLatency","avgHitLatency","avgMissLatency","hits","misses","sets","deletes","errors","nativeSets","nativeGets","nativeDeletes","nativeClears","nativeDeleteByTags","nativeErrors","totalNativeOperations","nativeThroughput","nativeErrorRate","memoryUsage","itemCount","uniqueKeys","uptimeMs","latencyData","cacheThroughData","nativeData","getView","setModel","getRouter","getRoute","attachPatternMatched","onRouteMatched","_onRouteMatched","event","cache","getParameter","setProperty","getAppModel","loadMetric","formatChart","escapeODataString","_escapeODataString","value","replace","async","_loadMetric","cacheName","model","getODataModel","rb","getResourceBundle","context","bindContext","metric","requestObject","generateLatencyChartData","generateCacheThroughChartData","generateNativeChartData","MessageBox","error","i18nText","console","_generateLatencyChartData","t","key","getText","operation","latency","avgReadThroughLatency","_generateCacheThroughChartData","count","_generateNativeChartData","_formatChart","latencyChart","byId","then","setVizProperties","legend","visible","plotArea","dataLabel","formatString","gridline","valueAxis","axisLine","axisTick","label","title","categoryAxis","text","cacheThroughChart","nativeChart","onRefresh","_onRefresh","getProperty","handleFullScreen","_handleFullScreen","handleExitFullScreen","_handleExitFullScreen","handleClose","_handleClose","navTo","onColumnsChange","_onColumnsChange"],"sources":["SingleMetric.controller.ts"],"sourcesContent":["import BaseController from \"./BaseController\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport { Route$PatternMatchedEvent } from \"sap/ui/core/routing/Route\";\nimport MessageBox from \"sap/m/MessageBox\";\nimport ResourceBundle from \"sap/base/i18n/ResourceBundle\";\n\ninterface VizChart {\n setVizProperties(properties: object): void;\n}\n\ninterface MetricData {\n hitRatio?: number;\n cacheEfficiency?: number;\n throughput?: number;\n errorRate?: number;\n avgLatency?: number;\n avgHitLatency?: number;\n avgMissLatency?: number;\n avgReadThroughLatency?: number;\n hits?: number;\n misses?: number;\n sets?: number;\n deletes?: number;\n errors?: number;\n nativeSets?: number;\n nativeGets?: number;\n nativeDeletes?: number;\n nativeClears?: number;\n nativeDeleteByTags?: number;\n nativeErrors?: number;\n totalNativeOperations?: number;\n nativeThroughput?: number;\n nativeErrorRate?: number;\n memoryUsage?: number;\n itemCount?: number;\n uptimeMs?: number;\n}\n\n/**\n * @namespace cds.plugin.caching.dashboard.controller\n */\nexport default class SingleMetric extends BaseController {\n private uiModel: JSONModel;\n\n public onInit(): void {\n super.onInit();\n\n this.uiModel = new JSONModel({\n metricId: \"\",\n hitRatio: 0,\n cacheEfficiency: 0,\n throughput: 0,\n errorRate: 0,\n avgLatency: 0,\n avgHitLatency: 0,\n avgMissLatency: 0,\n hits: 0,\n misses: 0,\n sets: 0,\n deletes: 0,\n errors: 0,\n nativeSets: 0,\n nativeGets: 0,\n nativeDeletes: 0,\n nativeClears: 0,\n nativeDeleteByTags: 0,\n nativeErrors: 0,\n totalNativeOperations: 0,\n nativeThroughput: 0,\n nativeErrorRate: 0,\n memoryUsage: 0,\n itemCount: 0,\n uniqueKeys: 0,\n uptimeMs: 0,\n latencyData: [],\n cacheThroughData: [],\n nativeData: []\n });\n this.getView().setModel(this.uiModel, \"ui\");\n\n this.getRouter().getRoute(\"singleMetric\").attachPatternMatched(this.onRouteMatched, this);\n }\n\n public onRouteMatched(event: Route$PatternMatchedEvent): void {\n const { cache, metricId } = event.getParameter(\"arguments\") as { cache: string; metricId: string };\n\n this.uiModel.setProperty(\"/metricId\", metricId);\n this.getAppModel().setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n\n this.loadMetric(cache, metricId);\n this.formatChart();\n }\n\n private escapeODataString(value: string): string {\n return value.replace(/'/g, \"''\");\n }\n\n private async loadMetric(cacheName: string, metricId: string): Promise<void> {\n try {\n const model = this.getODataModel();\n const rb = await this.getResourceBundle();\n\n const context = model.bindContext(\n `/Metrics(ID='${this.escapeODataString(metricId)}',cache='${this.escapeODataString(cacheName)}')`\n );\n const metric = await context.requestObject() as MetricData;\n\n if (metric) {\n this.uiModel.setProperty(\"/hitRatio\", metric.hitRatio || 0);\n this.uiModel.setProperty(\"/cacheEfficiency\", metric.cacheEfficiency || 0);\n this.uiModel.setProperty(\"/throughput\", metric.throughput || 0);\n this.uiModel.setProperty(\"/errorRate\", metric.errorRate || 0);\n\n this.uiModel.setProperty(\"/avgLatency\", metric.avgLatency || 0);\n this.uiModel.setProperty(\"/avgHitLatency\", metric.avgHitLatency || 0);\n this.uiModel.setProperty(\"/avgMissLatency\", metric.avgMissLatency || 0);\n\n this.uiModel.setProperty(\"/hits\", metric.hits || 0);\n this.uiModel.setProperty(\"/misses\", metric.misses || 0);\n this.uiModel.setProperty(\"/sets\", metric.sets || 0);\n this.uiModel.setProperty(\"/deletes\", metric.deletes || 0);\n this.uiModel.setProperty(\"/errors\", metric.errors || 0);\n\n this.uiModel.setProperty(\"/nativeSets\", metric.nativeSets || 0);\n this.uiModel.setProperty(\"/nativeGets\", metric.nativeGets || 0);\n this.uiModel.setProperty(\"/nativeDeletes\", metric.nativeDeletes || 0);\n this.uiModel.setProperty(\"/nativeClears\", metric.nativeClears || 0);\n this.uiModel.setProperty(\"/nativeDeleteByTags\", metric.nativeDeleteByTags || 0);\n this.uiModel.setProperty(\"/nativeErrors\", metric.nativeErrors || 0);\n this.uiModel.setProperty(\"/totalNativeOperations\", metric.totalNativeOperations || 0);\n this.uiModel.setProperty(\"/nativeThroughput\", metric.nativeThroughput || 0);\n this.uiModel.setProperty(\"/nativeErrorRate\", metric.nativeErrorRate || 0);\n\n this.uiModel.setProperty(\"/memoryUsage\", metric.memoryUsage || 0);\n this.uiModel.setProperty(\"/itemCount\", metric.itemCount || 0);\n this.uiModel.setProperty(\"/uptimeMs\", metric.uptimeMs || 0);\n this.uiModel.setProperty(\"/uniqueKeys\", 0);\n\n this.generateLatencyChartData(metric, rb);\n this.generateCacheThroughChartData(metric, rb);\n this.generateNativeChartData(metric, rb);\n\n } else {\n MessageBox.error(await this.i18nText(\"msgMetricNotFound\"));\n }\n\n } catch (error) {\n console.error(\"Error loading metric:\", error);\n MessageBox.error(await this.i18nText(\"msgLoadMetricFailed\"));\n }\n }\n\n private generateLatencyChartData(metric: MetricData, rb: ResourceBundle): void {\n const t = (key: string) => rb.getText(key);\n const latencyData = [\n { operation: t(\"chartOpAvgHitLatency\"), latency: metric.avgHitLatency || 0 },\n { operation: t(\"chartOpAvgMissLatency\"), latency: metric.avgMissLatency || 0 },\n { operation: t(\"chartOpAvgReadThroughLatency\"), latency: metric.avgReadThroughLatency || 0 }\n ];\n\n this.uiModel.setProperty(\"/latencyData\", latencyData);\n }\n\n private generateCacheThroughChartData(metric: MetricData, rb: ResourceBundle): void {\n const t = (key: string) => rb.getText(key);\n const cacheThroughData = [\n { operation: t(\"chartOpHits\"), count: metric.hits || 0 },\n { operation: t(\"chartOpMisses\"), count: metric.misses || 0 },\n { operation: t(\"chartOpErrors\"), count: metric.errors || 0 }\n ];\n\n this.uiModel.setProperty(\"/cacheThroughData\", cacheThroughData);\n }\n\n private generateNativeChartData(metric: MetricData, rb: ResourceBundle): void {\n const t = (key: string) => rb.getText(key);\n const nativeData = [\n { operation: t(\"chartOpSets\"), count: metric.nativeSets || 0 },\n { operation: t(\"chartOpGets\"), count: metric.nativeGets || 0 },\n { operation: t(\"chartOpDeletes\"), count: metric.nativeDeletes || 0 },\n { operation: t(\"chartOpClears\"), count: metric.nativeClears || 0 },\n { operation: t(\"chartOpDeleteByTags\"), count: metric.nativeDeleteByTags || 0 },\n { operation: t(\"chartOpErrors\"), count: metric.nativeErrors || 0 }\n ];\n\n this.uiModel.setProperty(\"/nativeData\", nativeData);\n }\n\n public formatChart(): void {\n const latencyChart = this.getView().byId(\"metricLatencyChart\") as unknown as VizChart;\n if (latencyChart) {\n void this.getResourceBundle().then((rb) => {\n latencyChart.setVizProperties({\n legend: { visible: false },\n plotArea: {\n dataLabel: { visible: true, formatString: \"#,## ms\" },\n gridline: { visible: false }\n },\n valueAxis: {\n axisLine: { visible: false },\n axisTick: { visible: false },\n label: { visible: false },\n title: { visible: false }\n },\n categoryAxis: { title: { visible: false } },\n title: { visible: false, text: rb.getText(\"chartTitleLatencyByOperation\") }\n });\n });\n }\n\n const cacheThroughChart = this.getView().byId(\"metricCacheThroughChart\") as unknown as VizChart;\n if (cacheThroughChart) {\n cacheThroughChart.setVizProperties({\n legend: { visible: true },\n plotArea: { dataLabel: { visible: true } },\n title: { visible: false }\n });\n }\n\n const nativeChart = this.getView().byId(\"metricNativeChart\") as unknown as VizChart;\n if (nativeChart) {\n nativeChart.setVizProperties({\n legend: { visible: true },\n plotArea: { dataLabel: { visible: true } },\n title: { visible: false }\n });\n }\n }\n\n public onRefresh(): void {\n const cacheName = this.getAppModel().getProperty(\"/selectedCache\");\n const metricId = this.uiModel.getProperty(\"/metricId\");\n\n if (cacheName && metricId) {\n this.loadMetric(cacheName, metricId);\n }\n }\n\n public handleFullScreen(): void {\n this.getAppModel().setProperty(\"/layout\", \"EndColumnFullScreen\");\n }\n\n public handleExitFullScreen(): void {\n this.getAppModel().setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n }\n\n public handleClose(): void {\n this.getAppModel().setProperty(\"/layout\", \"TwoColumnsMidExpanded\");\n this.getRouter().navTo(\"cache\", { cache: this.getAppModel().getProperty(\"/selectedCache\") });\n }\n\n public onColumnsChange(): void {\n // Handle responsive grid column changes if needed\n }\n}\n"],"mappings":"AAAA,8QAAOA,EAAcC,EAAAC,GAsCrB,MAGqBC,EAAqBH,EAAcI,OAAA,wDAG7CC,OAAM,SAAAC,IACTC,wBAAAC,MAEAA,KAAKC,QAAU,IAAIC,EAAU,CACzBC,SAAU,GACVC,SAAU,EACVC,gBAAiB,EACjBC,WAAY,EACZC,UAAW,EACXC,WAAY,EACZC,cAAe,EACfC,eAAgB,EAChBC,KAAM,EACNC,OAAQ,EACRC,KAAM,EACNC,QAAS,EACTC,OAAQ,EACRC,WAAY,EACZC,WAAY,EACZC,cAAe,EACfC,aAAc,EACdC,mBAAoB,EACpBC,aAAc,EACdC,sBAAuB,EACvBC,iBAAkB,EAClBC,gBAAiB,EACjBC,YAAa,EACbC,UAAW,EACXC,WAAY,EACZC,SAAU,EACV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cacheName","Filter","path","operator","FilterOperator","EQ","value1","cacheAndIdFilter","id","periodFilter","period","__exports","__esModule"],"sources":["filters.ts"],"sourcesContent":["import Filter from \"sap/ui/model/Filter\";\nimport FilterOperator from \"sap/ui/model/FilterOperator\";\n\nexport function cacheNameFilter(cacheName: string): Filter {\n\treturn new Filter({ path: \"cache\", operator: FilterOperator.EQ, value1: cacheName });\n}\n\nexport function cacheAndIdFilter(cacheName: string, id: string): Filter[] {\n\treturn [\n\t\tnew Filter({ path: \"cache\", operator: FilterOperator.EQ, value1: cacheName }),\n\t\tnew Filter({ path: \"ID\", operator: FilterOperator.EQ, value1: id }),\n\t];\n}\n\nexport function periodFilter(period: string): Filter {\n\treturn new Filter({ path: \"period\", operator: FilterOperator.EQ, value1: period });\n}\n"],"mappings":"AAAA,gJAGO,SAASA,EAAgBC,GAC/B,OAAO,IAAIC,EAAO,CAAEC,KAAM,QAASC,SAAUC,EAAeC,GAAIC,OAAQN,GACzE,CAEO,SAASO,EAAiBP,EAAmBQ,GACnD,MAAO,CACN,IAAIP,EAAO,CAAEC,KAAM,QAASC,SAAUC,EAAeC,GAAIC,OAAQN,IACjE,IAAIC,EAAO,CAAEC,KAAM,KAAMC,SAAUC,EAAeC,GAAIC,OAAQE,IAEhE,CAEO,SAASC,EAAaC,GAC5B,OAAO,IAAIT,EAAO,CAAEC,KAAM,SAAUC,SAAUC,EAAeC,GAAIC,OAAQI,GAC1E,CAAC,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAZ,kBAAAY,EAAAJ,mBAAAI,EAAAF,eAAA,OAAAE,CAAA","ignoreList":[],"sourceRoot":"model"}},{"offset":{"line":9,"column":0},"map":{"version":3,"names":["ValueColor","sap_m_library","__exports","formatIntegerValue","value","undefined","toFixed","formatNumberValue","formatPercentage","formatPercentageValue","formatLatency","numberValue","Number","formatMemoryUsage","bytes","sizes","i","Math","floor","log","pow","formatThroughput","formatCacheEfficiency","formatUptime","ms","seconds","minutes","hours","days","formatDate","dateString","date","Date","toLocaleString","formatHitRatioWithColor","None","Good","Critical","Error","formatLatencyWithColor","formatErrorRateWithColor","Neutral","getTotalRequests","hits","misses","getTotalOperations","sets","deletes","formatJSON","parsed","JSON","parse","stringify","e","formatKeyName","keyName","maxLength","length","substring","getRelativeTime","now","diffMs","getTime","diffSeconds","diffMinutes","diffHours","diffDays","formatCacheEfficiencyWithColor","formatTruncatedText"],"sources":["formatter.ts"],"sourcesContent":["import { ValueColor } from \"sap/m/library\";\n\n/**\n * Formatter utility for cache statistics dashboard\n */\nexport default {\n\n\tformatIntegerValue(value: number): string {\n\t\tif (value === null || value === undefined || value === 0) {\n\t\t\treturn \"0\";\n\t\t}\n\t\treturn `${value.toFixed(0)}`;\n\t},\n\n\tformatNumberValue(value: number): string {\n\t\tif (value === null || value === undefined || value === 0) {\n\t\t\treturn \"0\";\n\t\t}\n\t\treturn `${value.toFixed(2)}`;\n\t},\n\n\t/**\n\t * Format percentage values\n\t */\n\tformatPercentage(value: number): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn \"0%\";\n\t\t}\n\t\treturn `${(value * 100).toFixed(1)}%`;\n\t},\n\n\tformatPercentageValue(value: number): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn \"0\";\n\t\t}\n\t\treturn `${(value * 100).toFixed(1)}`;\n\t},\n\n\t/**\n\t * Format latency values in milliseconds\n\t */\n\tformatLatency(value: string): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn \"0ms\";\n\t\t}\n\t\t// Make sure value is a number\n\t\tconst numberValue = Number(value);\n\n\t\tif (numberValue < 1) {\n\t\t\treturn `${(numberValue * 1000).toFixed(2)}μs`;\n\t\t}\n\t\treturn `${numberValue.toFixed(2)}ms`;\n\t},\n\n\t/**\n\t * Format memory usage in human readable format\n\t */\n\tformatMemoryUsage(bytes: number): string {\n\t\tif (bytes === null || bytes === undefined) {\n\t\t\treturn \"0 B\";\n\t\t}\n\t\tconst sizes = ['B', 'KB', 'MB', 'GB'];\n\t\tconst i = Math.floor(Math.log(bytes) / Math.log(1024));\n\t\treturn `${(bytes / Math.pow(1024, i)).toFixed(2)} ${sizes[i]}`;\n\t},\n\n\t/**\n\t * Format throughput (requests per second)\n\t */\n\tformatThroughput(value: number): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn \"0 req/s\";\n\t\t}\n\t\treturn `${value.toFixed(2)} req/s`;\n\t},\n\n\t/**\n\t * Format cache efficiency ratio\n\t */\n\tformatCacheEfficiency(value: number): string {\n\t\tif (value === null || value === undefined || value === 0) {\n\t\t\treturn \"N/A\";\n\t\t}\n\t\tif (value < 1) {\n\t\t\treturn `${(value * 100).toFixed(1)}%`;\n\t\t}\n\t\treturn `${value.toFixed(1)}x`;\n\t},\n\n\t/**\n\t * Format uptime in human readable format\n\t */\n\tformatUptime(ms: number): string {\n\t\tif (ms === null || ms === undefined) {\n\t\t\treturn \"0s\";\n\t\t}\n\t\tconst seconds = Math.floor(ms / 1000);\n\t\tconst minutes = Math.floor(seconds / 60);\n\t\tconst hours = Math.floor(minutes / 60);\n\t\tconst days = Math.floor(hours / 24);\n\n\t\tif (days > 0) {\n\t\t\treturn `${days}d ${hours % 24}h ${minutes % 60}m`;\n\t\t} else if (hours > 0) {\n\t\t\treturn `${hours}h ${minutes % 60}m ${seconds % 60}s`;\n\t\t} else if (minutes > 0) {\n\t\t\treturn `${minutes}m ${seconds % 60}s`;\n\t\t} else {\n\t\t\treturn `${seconds}s`;\n\t\t}\n\t},\n\n\t/**\n\t * Format date for display\n\t */\n\tformatDate(dateString: string): string {\n\t\tif (!dateString) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst date = new Date(dateString);\n\t\treturn date.toLocaleString();\n\t},\n\n\t/**\n\t * Format hit ratio with color indication\n\t */\n\tformatHitRatioWithColor(value: number): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn ValueColor.None;\n\t\t}\n\n\t\tif (value >= 0.9) {\n\t\t\treturn ValueColor.Good;\n\t\t} else if (value >= 0.7) {\n\t\t\treturn ValueColor.Critical;\n\t\t} else {\n\t\t\treturn ValueColor.Error;\n\t\t}\n\t},\n\n\t/**\n\t * Format latency with color indication\n\t */\n\tformatLatencyWithColor(value: number): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn ValueColor.None;\n\t\t}\n\n\t\tif (value <= 10) {\n\t\t\treturn ValueColor.Good;\n\t\t} else if (value <= 50) {\n\t\t\treturn ValueColor.Critical;\n\t\t} else {\n\t\t\treturn ValueColor.Error;\n\t\t}\n\t},\n\n\t/**\n\t * Format error rate with color indication\n\t */\n\tformatErrorRateWithColor(value: number): string {\n\t\tif (value <= 0.01) {\n\t\t\treturn ValueColor.Good;\n\t\t} else if (value <= 0.05) {\n\t\t\treturn ValueColor.Critical;\n\t\t} else if (value <= 0.1) {\n\t\t\treturn ValueColor.Error;\n\t\t} else {\n\t\t\treturn ValueColor.Neutral;\n\t\t}\n\t},\n\n\t/**\n\t * Get total requests (hits + misses)\n\t */\n\tgetTotalRequests(hits: number, misses: number): number {\n\t\treturn (hits || 0) + (misses || 0);\n\t},\n\n\t/**\n\t * Get total operations (hits + misses + sets + deletes)\n\t */\n\tgetTotalOperations(hits: number, misses: number, sets: number, deletes: number): number {\n\t\treturn (hits || 0) + (misses || 0) + (sets || 0) + (deletes || 0);\n\t},\n\n\t/**\n\t * Format JSON for display\n\t */\n\tformatJSON(value: any): string {\n\t\tif (!value) {\n\t\t\treturn \"\";\n\t\t}\n\t\ttry {\n\t\t\tif (typeof value === 'string') {\n\t\t\t\t// Try to parse and format if it's a JSON string\n\t\t\t\tconst parsed = JSON.parse(value);\n\t\t\t\treturn JSON.stringify(parsed, null, 2);\n\t\t\t} else {\n\t\t\t\t// Format if it's already an object\n\t\t\t\treturn JSON.stringify(value, null, 2);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// Return as-is if it's not valid JSON\n\t\t\treturn value;\n\t\t}\n\t},\n\n\t/**\n\t * Format key name for display (truncate if too long)\n\t */\n\tformatKeyName(keyName: string, maxLength: number = 30): string {\n\t\tif (!keyName) {\n\t\t\treturn \"\";\n\t\t}\n\t\tif (keyName.length <= maxLength) {\n\t\t\treturn keyName;\n\t\t}\n\t\treturn keyName.substring(0, maxLength - 3) + \"...\";\n\t},\n\n\t/**\n\t * Get relative time since last access\n\t */\n\tgetRelativeTime(dateString: string): string {\n\t\tif (!dateString) {\n\t\t\treturn \"Never\";\n\t\t}\n\t\tconst date = new Date(dateString);\n\t\tconst now = new Date();\n\t\tconst diffMs = now.getTime() - date.getTime();\n\t\tconst diffSeconds = Math.floor(diffMs / 1000);\n\t\tconst diffMinutes = Math.floor(diffSeconds / 60);\n\t\tconst diffHours = Math.floor(diffMinutes / 60);\n\t\tconst diffDays = Math.floor(diffHours / 24);\n\n\t\tif (diffDays > 0) {\n\t\t\treturn `${diffDays} day${diffDays > 1 ? 's' : ''} ago`;\n\t\t} else if (diffHours > 0) {\n\t\t\treturn `${diffHours} hour${diffHours > 1 ? 's' : ''} ago`;\n\t\t} else if (diffMinutes > 0) {\n\t\t\treturn `${diffMinutes} minute${diffMinutes > 1 ? 's' : ''} ago`;\n\t\t} else {\n\t\t\treturn `${diffSeconds} second${diffSeconds > 1 ? 's' : ''} ago`;\n\t\t}\n\t},\n\n\t/**\n\t * Format cache efficiency with color indication\n\t */\n\tformatCacheEfficiencyWithColor(value: number): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn ValueColor.None;\n\t\t}\n\n\t\tif (value > 5) {\n\t\t\treturn ValueColor.Good;\n\t\t} else if (value >= 3) {\n\t\t\treturn ValueColor.Critical;\n\t\t} else {\n\t\t\treturn ValueColor.Error;\n\t\t}\n\t},\n\n\tformatTruncatedText(value: string, maxLength: number = 50): string {\n\t\tif (!value) {\n\t\t\treturn \"\";\n\t\t}\n\t\tif (value.length <= maxLength) {\n\t\t\treturn value;\n\t\t}\n\t\treturn value.substring(0, maxLength) + \"...\";\n\t}\n};\n"],"mappings":"AAAA,kHAASA,EAAUC,EAAA,cAEnB,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C3B,MAAO,GAAGA,WAAqBA,EAAc,EAAI,IAAM,QACxD,KAAO,CACN,MAAO,GAAGD,WAAqBA,EAAc,EAAI,IAAM,QACxD,CACD,EAKAI,+BAA+B/D,GAC9B,GAAIA,IAAU,MAAQA,IAAUC,UAAW,CAC1C,OAAOL,EAAWmC,IACnB,CAEA,GAAI/B,EAAQ,EAAG,CACd,OAAOJ,EAAWoC,IACnB,MAAO,GAAIhC,GAAS,EAAG,CACtB,OAAOJ,EAAWqC,QACnB,KAAO,CACN,OAAOrC,EAAWsC,KACnB,CACD,EAEA8B,oBAAoBhE,EAAeoD,EAAoB,IACtD,IAAKpD,EAAO,CACX,MAAO,EACR,CACA,GAAIA,EAAMqD,QAAUD,EAAW,CAC9B,OAAOpD,CACR,CACA,OAAOA,EAAMsD,UAAU,EAAGF,GAAa,KACxC,GACA,OAAAtD,CAAA","ignoreList":[],"sourceRoot":"model"}},{"offset":{"line":10,"column":0},"map":{"version":3,"names":["createDeviceModel","model","JSONModel","Device","setDefaultBindingMode","BindingMode","OneWay","__exports"],"sources":["models.ts"],"sourcesContent":["import JSONModel from \"sap/ui/model/json/JSONModel\";\nimport BindingMode from \"sap/ui/model/BindingMode\";\n\nimport Device from \"sap/ui/Device\";\n\n\nexport default {\n\tcreateDeviceModel: () => {\n\t\tconst model = new JSONModel(Device);\n\t\tmodel.setDefaultBindingMode(BindingMode.OneWay);\n\t\treturn model;\n\t}\n};\n"],"mappings":"AAAA,4KAMe,CACdA,kBAAmBA,KAClB,MAAMC,EAAQ,IAAIC,EAAUC,GAC5BF,EAAMG,sBAAsBC,EAAYC,QACxC,OAAOL,IAER,OAAAM,CAAA","ignoreList":[],"sourceRoot":"model"}},{"offset":{"line":11,"column":0},"map":{"version":3,"names":["cacheAndIdFilter","___model_filters","cacheNameFilter","periodFilter","CacheStatisticsService","constructor","model","this","ODataModel","serviceUrl","autoExpandSelect","groupId","getModel","getCurrentMetrics","cacheName","binding","bindList","undefined","Sorter","path","descending","data","requestContexts","results","map","item","getObject","length","transformStatistics","error","console","MessageBox","getHistoricalMetrics","period","from","to","filters","push","Filter","operator","FilterOperator","GE","value1","LE","getTopKeys","getColdKeys","persistStatistics","context","bindContext","invoke","hits","misses","sets","deletes","errors","avgLatency","p95Latency","p99Latency","minLatency","maxLatency","avgHitLatency","p95HitLatency","p99HitLatency","minHitLatency","maxHitLatency","avgMissLatency","p95MissLatency","p99MissLatency","minMissLatency","maxMissLatency","avgSetLatency","avgDeleteLatency","memoryUsage","itemCount","hitRatio","throughput","errorRate","cacheEfficiency","uptimeMs","uniqueKeys","topKeys","coldKeys","lastPersisted","Date","toISOString","getAvailableMetrics","getMetricById","metricId","setMetricsEnabled","enabled","setParameter","setKeyMetricsEnabled"],"sources":["CacheStatisticsService.ts"],"sourcesContent":["import MessageBox from \"sap/m/MessageBox\";\nimport ODataModel from \"sap/ui/model/odata/v4/ODataModel\";\nimport Filter from \"sap/ui/model/Filter\";\nimport FilterOperator from \"sap/ui/model/FilterOperator\";\nimport Sorter from \"sap/ui/model/Sorter\";\nimport Context from \"sap/ui/model/odata/v4/Context\";\nimport { cacheAndIdFilter, cacheNameFilter, periodFilter } from \"../model/filters\";\n\nexport interface CacheStatistics {\n hits: number;\n misses: number;\n sets: number;\n deletes: number;\n errors: number;\n\n // Overall latency metrics\n avgLatency: number;\n p95Latency: number;\n p99Latency: number;\n minLatency: number;\n maxLatency: number;\n\n // Hit-specific latency metrics\n avgHitLatency: number;\n p95HitLatency: number;\n p99HitLatency: number;\n minHitLatency: number;\n maxHitLatency: number;\n\n // Miss-specific latency metrics\n avgMissLatency: number;\n p95MissLatency: number;\n p99MissLatency: number;\n minMissLatency: number;\n maxMissLatency: number;\n\n // Set/Delete latency metrics\n avgSetLatency: number;\n avgDeleteLatency: number;\n\n // Performance metrics\n memoryUsage: number;\n itemCount: number;\n hitRatio: number;\n throughput: number;\n errorRate: number;\n cacheEfficiency: number;\n uptimeMs: number;\n uniqueKeys: number;\n topKeys: KeyAccess[];\n coldKeys: KeyAccess[];\n lastPersisted: string;\n}\n\nexport interface KeyAccess {\n keyName: string;\n hits: number;\n misses: number;\n sets: number;\n deletes: number;\n total: number;\n lastAccess: string;\n dataType: string;\n serviceName: string;\n entityName: string;\n operation: string;\n metadata: string;\n}\n\nexport interface HistoricalStatistics {\n ID: string;\n cache: string;\n timestamp: string;\n period: string;\n\n hits: number;\n misses: number;\n sets: number;\n deletes: number;\n errors: number;\n totalRequests: number;\n\n avgHitLatency: number;\n p95HitLatency: number;\n p99HitLatency: number;\n minHitLatency: number;\n maxHitLatency: number;\n avgMissLatency: number;\n p95MissLatency: number;\n p99MissLatency: number;\n minMissLatency: number;\n maxMissLatency: number;\n avgSetLatency: number;\n avgDeleteLatency: number;\n\n hitRatio: number;\n throughput: number;\n errorRate: number;\n cacheEfficiency: number;\n\n nativeSets: number;\n nativeGets: number;\n nativeDeletes: number;\n nativeClears: number;\n nativeDeleteByTags: number;\n nativeErrors: number;\n totalNativeOperations: number;\n\n nativeThroughput: number;\n nativeErrorRate: number;\n\n memoryUsage: number;\n itemCount: number;\n uptimeMs: number;\n}\n\n/**\n * Service class for interacting with the Cache Statistics API using OData V4\n */\nexport default class CacheStatisticsService {\n private model: ODataModel;\n\n constructor(model?: ODataModel) {\n this.model = model || new ODataModel({\n serviceUrl: \"/odata/v4/caching/\",\n autoExpandSelect: true,\n groupId: \"$auto\"\n });\n }\n\n getModel(): ODataModel {\n return this.model;\n }\n\n async getCurrentMetrics(cacheName: string): Promise<CacheStatistics | null> {\n try {\n const binding = this.model.bindList(\n \"/Metrics\",\n undefined,\n [new Sorter({ path: \"timestamp\", descending: true })],\n [periodFilter(\"hourly\"), cacheNameFilter(cacheName)]\n );\n\n const data = await binding.requestContexts();\n const results = data.map((item: Context) => item.getObject());\n\n if (results.length > 0) {\n return this.transformStatistics(results[0]);\n }\n return null;\n } catch (error) {\n console.error(\"Error fetching current metrics:\", error);\n MessageBox.error(\"Failed to load current metrics\");\n return null;\n }\n }\n\n async getHistoricalMetrics(cacheName: string, period: string = \"hourly\", from?: string, to?: string): Promise<HistoricalStatistics[]> {\n try {\n const filters: Filter[] = [periodFilter(period), cacheNameFilter(cacheName)];\n if (from) {\n filters.push(new Filter({ path: \"timestamp\", operator: FilterOperator.GE, value1: from }));\n }\n if (to) {\n filters.push(new Filter({ path: \"timestamp\", operator: FilterOperator.LE, value1: to }));\n }\n\n const binding = this.model.bindList(\n \"/Metrics\",\n undefined,\n [new Sorter({ path: \"timestamp\", descending: true })],\n filters\n );\n\n const data = await binding.requestContexts();\n return data.map((item: Context) => item.getObject());\n } catch (error) {\n console.error(\"Error fetching historical metrics:\", error);\n MessageBox.error(\"Failed to load historical metrics\");\n return [];\n }\n }\n\n async getTopKeys(cacheName: string): Promise<KeyAccess[]> {\n try {\n const binding = this.model.bindList(\n \"/KeyMetrics\",\n undefined,\n [new Sorter({ path: \"totalRequests\", descending: true })],\n [periodFilter(\"current\"), cacheNameFilter(cacheName)]\n );\n\n const data = await binding.requestContexts();\n return data.map((item: Context) => item.getObject());\n } catch (error) {\n console.error(\"Error fetching top keys:\", error);\n MessageBox.error(\"Failed to load top keys\");\n return [];\n }\n }\n\n async getColdKeys(cacheName: string): Promise<KeyAccess[]> {\n try {\n const binding = this.model.bindList(\n \"/KeyMetrics\",\n undefined,\n [new Sorter({ path: \"lastAccess\", descending: false })],\n [periodFilter(\"current\"), cacheNameFilter(cacheName)]\n );\n\n const data = await binding.requestContexts();\n return data.map((item: Context) => item.getObject());\n } catch (error) {\n console.error(\"Error fetching cold keys:\", error);\n MessageBox.error(\"Failed to load cold keys\");\n return [];\n }\n }\n\n async persistStatistics(): Promise<boolean> {\n try {\n const context = this.model.bindContext(\"/persistStatistics(...)\");\n await context.invoke();\n return true;\n } catch (error) {\n console.error(\"Error persisting statistics:\", error);\n MessageBox.error(\"Failed to persist statistics\");\n return false;\n }\n }\n\n private transformStatistics(data: Record<string, unknown>): CacheStatistics {\n return {\n hits: (data.hits as number) || 0,\n misses: (data.misses as number) || 0,\n sets: (data.sets as number) || 0,\n deletes: (data.deletes as number) || 0,\n errors: (data.errors as number) || 0,\n\n avgLatency: (data.avgLatency as number) || 0,\n p95Latency: (data.p95Latency as number) || 0,\n p99Latency: (data.p99Latency as number) || 0,\n minLatency: (data.minLatency as number) || 0,\n maxLatency: (data.maxLatency as number) || 0,\n\n avgHitLatency: (data.avgHitLatency as number) || 0,\n p95HitLatency: (data.p95HitLatency as number) || 0,\n p99HitLatency: (data.p99HitLatency as number) || 0,\n minHitLatency: (data.minHitLatency as number) || 0,\n maxHitLatency: (data.maxHitLatency as number) || 0,\n\n avgMissLatency: (data.avgMissLatency as number) || 0,\n p95MissLatency: (data.p95MissLatency as number) || 0,\n p99MissLatency: (data.p99MissLatency as number) || 0,\n minMissLatency: (data.minMissLatency as number) || 0,\n maxMissLatency: (data.maxMissLatency as number) || 0,\n\n avgSetLatency: (data.avgSetLatency as number) || 0,\n avgDeleteLatency: (data.avgDeleteLatency as number) || 0,\n\n memoryUsage: (data.memoryUsage as number) || 0,\n itemCount: (data.itemCount as number) || 0,\n hitRatio: (data.hitRatio as number) || 0,\n throughput: (data.throughput as number) || 0,\n errorRate: (data.errorRate as number) || 0,\n cacheEfficiency: (data.cacheEfficiency as number) || 0,\n uptimeMs: (data.uptimeMs as number) || 0,\n uniqueKeys: 0,\n topKeys: [],\n coldKeys: [],\n lastPersisted: (data.lastPersisted as string) || new Date().toISOString()\n };\n }\n\n async getAvailableMetrics(cacheName: string): Promise<Record<string, unknown>[]> {\n try {\n const binding = this.model.bindList(\n \"/Metrics\",\n undefined,\n [new Sorter({ path: \"timestamp\", descending: true })],\n [cacheNameFilter(cacheName)]\n );\n\n const data = await binding.requestContexts();\n return data.map((item: Context) => item.getObject());\n } catch (error) {\n console.error(\"Error fetching available metrics:\", error);\n MessageBox.error(\"Failed to load available metrics\");\n return [];\n }\n }\n\n async getMetricById(cacheName: string, metricId: string): Promise<CacheStatistics | null> {\n try {\n const binding = this.model.bindList(\n \"/Metrics\",\n undefined,\n undefined,\n cacheAndIdFilter(cacheName, metricId)\n );\n\n const data = await binding.requestContexts();\n const results = data.map((item: Context) => item.getObject());\n\n if (results.length > 0) {\n return this.transformStatistics(results[0]);\n }\n return null;\n } catch (error) {\n console.error(\"Error fetching metric by ID:\", error);\n MessageBox.error(\"Failed to load metric\");\n return null;\n }\n }\n\n async setMetricsEnabled(cacheName: string, enabled: boolean): Promise<boolean> {\n try {\n const context = this.model.bindContext(\"/setMetricsEnabled(...)\");\n context.setParameter(\"cache\", cacheName);\n context.setParameter(\"enabled\", enabled);\n await context.invoke();\n return true;\n } catch (error) {\n console.error(\"Error setting metrics enabled:\", error);\n MessageBox.error(\"Failed to update metrics configuration\");\n return false;\n }\n }\n\n async setKeyMetricsEnabled(cacheName: string, enabled: boolean): Promise<boolean> {\n try {\n const context = this.model.bindContext(\"/setKeyMetricsEnabled(...)\");\n context.setParameter(\"cache\", cacheName);\n context.setParameter(\"enabled\", enabled);\n await context.invoke();\n return true;\n } catch (error) {\n console.error(\"Error setting key metrics enabled:\", error);\n MessageBox.error(\"Failed to update key metrics configuration\");\n return false;\n }\n }\n}\n"],"mappings":"AAAA,8QAMSA,EAAgBC,EAAA,0BAAEC,EAAeD,EAAA,yBAAEE,EAAYF,EAAA,gBAiHzC,MAAMG,EAGjBC,YAAYC,GACRC,KAAKD,MAAQA,GAAS,IAAIE,EAAW,CACjCC,WAAY,qBACZC,iBAAkB,KAClBC,QAAS,SAEjB,CAEAC,WACI,OAAOL,KAAKD,KAChB,CAEA,uBAAMO,CAAkBC,GACpB,IACI,MAAMC,EAAUR,KAAKD,MAAMU,SACvB,WACAC,UACA,CAAC,IAAIC,EAAO,CAAEC,KAAM,YAAaC,WAAY,QAC7C,CAACjB,EAAa,UAAWD,EAAgBY,KAG7C,MAAMO,QAAaN,EAAQO,kBAC3B,MAAMC,EAAUF,EAAKG,IAAKC,GAAkBA,EAAKC,aAEjD,GAAIH,EAAQI,OAAS,EAAG,CACpB,OAAOpB,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,YAAY,8BACvCD,EAAQ2C,aAAa,QAAS5E,GAC9BiC,EAAQ2C,aAAa,UAAWD,SAC1B1C,EAAQE,SACd,OAAO,IACX,CAAE,MAAOpB,GACLC,QAAQD,MAAM,qCAAsCA,GACpDE,EAAWF,MAAM,8CACjB,OAAO,KACX,CACJ,EACH,OAAAzB,CAAA","ignoreList":[],"sourceRoot":"service"}},{"offset":{"line":12,"column":0},"map":{"version":3,"names":[],"sources":["Component-preload.js?bundle-code-0"],"mappings":"AAAA;AACA","sourcesContent":["sap.ui.require.preload({\n"],"sourceRoot":""}}]}
1
+ {"version":3,"file":"Component-preload.js","sections":[{"offset":{"line":1,"column":0},"map":{"version":3,"names":["models","_interopRequireDefault","__models","formatter","__formatter","Component","UIComponent","extend","metadata","manifest","interfaces","init","_init","UIComponent.prototype.init.call","this","setModel","createDeviceModel","JSONModel","selectedCache","selectedTab","layout","getRouter","initialize","getContentDensityClass","_getContentDensityClass","contentDensityClass","undefined","document","body","classList","contains","Device","support","touch"],"sources":["Component.ts"],"sourcesContent":["import UIComponent from \"sap/ui/core/UIComponent\";\nimport models from \"./model/models\";\nimport Device from \"sap/ui/Device\";\nimport formatter from \"./model/formatter\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\n\n/**\n * @namespace cds.plugin.caching.dashboard\n */\nexport default class Component extends UIComponent {\n\tpublic static metadata = {\n\t\tmanifest: \"json\",\n\t\tinterfaces: [\"sap.ui.core.IAsyncContentCreation\"]\n\t};\n\n\tprivate contentDensityClass: string;\n\n\tpublic init(): void {\n\t\t// call the base component's init function\n\t\tsuper.init();\n\n\t\t// create the device model\n\t\tthis.setModel(models.createDeviceModel(), \"device\");\n\n\t\tthis.setModel(new JSONModel({\n\t\t\tselectedCache: null,\n\t\t\tselectedTab: \"main\",\n\t\t\tlayout: \"OneColumn\"\n\t\t}), \"app\");\n\n\t\t// create the formatter model\n\t\tthis.setModel(new JSONModel(formatter), \"formatter\");\n\n\t\t// create the views based on the url/hash\n\t\tthis.getRouter().initialize();\n\t}\n\n\t/**\n\t * This method can be called to determine whether the sapUiSizeCompact or sapUiSizeCozy\n\t * design mode class should be set, which influences the size appearance of some controls.\n\t * @public\n\t * @returns css class, either 'sapUiSizeCompact' or 'sapUiSizeCozy' - or an empty string if no css class should be set\n\t */\n\tpublic getContentDensityClass(): string {\n\t\tif (this.contentDensityClass === undefined) {\n\t\t\t// check whether FLP has already set the content density class; do nothing in this case\n\t\t\tif (document.body.classList.contains(\"sapUiSizeCozy\") || document.body.classList.contains(\"sapUiSizeCompact\")) {\n\t\t\t\tthis.contentDensityClass = \"\";\n\t\t\t} else if (!Device.support.touch) {\n\t\t\t\t// apply \"compact\" mode if touch is not supported\n\t\t\t\tthis.contentDensityClass = \"sapUiSizeCompact\";\n\t\t\t} else {\n\t\t\t\t// \"cozy\" in case of touch support; default for most sap.m controls, but needed for desktop-first controls like sap.ui.table.Table\n\t\t\t\tthis.contentDensityClass = \"sapUiSizeCozy\";\n\t\t\t}\n\t\t}\n\t\treturn this.contentDensityClass;\n\t}\n}\n"],"mappings":"AAAA,kSACOA,EAAMC,EAAAC,GAAA,MAENC,EAASF,EAAAG,GAGhB,MAGqBC,EAAkBC,EAAWC,OAAA,0CACnCC,SAAW,CACxBC,SAAU,OACVC,WAAY,CAAC,sCAKPC,KAAI,SAAAC,IAEVC,sBAAAC,MAGAA,KAAKC,SAASf,EAAOgB,oBAAqB,UAE1CF,KAAKC,SAAS,IAAIE,EAAU,CAC3BC,cAAe,KACfC,YAAa,OACbC,OAAQ,cACL,OAGJN,KAAKC,SAAS,IAAIE,EAAUd,GAAY,aAGxCW,KAAKO,YAAYC,YAClB,EAQOC,uBAAsB,SAAAC,IAC5B,GAAIV,KAAKW,sBAAwBC,UAAW,CAE3C,GAAIC,SAASC,KAAKC,UAAUC,SAAS,kBAAoBH,SAASC,KAAKC,UAAUC,SAAS,oBAAqB,CAC9GhB,KAAKW,oBAAsB,EAC5B,MAAO,IAAKM,EAAOC,QAAQC,MAAO,CAEjCnB,KAAKW,oBAAsB,kBAC5B,KAAO,CAENX,KAAKW,oBAAsB,eAC5B,CACD,CACA,OAAOX,KAAKW,mBACb,IAAC,OAhDmBpB,CAAS","ignoreList":[],"sourceRoot":""}},{"offset":{"line":2,"column":0},"map":{"version":3,"names":["BaseController","_interopRequireDefault","__BaseController","App","extend","onInit","_onInit","this","getView","addStyleClass","getOwnerComponent","getContentDensityClass"],"sources":["App.controller.ts"],"sourcesContent":["import BaseController from \"./BaseController\";\n\n/**\n * @namespace cds.plugin.caching.dashboard.controller\n */\nexport default class App extends BaseController {\n\n\tpublic onInit(): void {\n\t\tthis.getView().addStyleClass(this.getOwnerComponent().getContentDensityClass());\n\t}\n\n}\n"],"mappings":"AAAA,gNAAOA,EAAcC,EAAAC,GAErB,MAGqBC,EAAYH,EAAcI,OAAA,+CAEvCC,OAAM,SAAAC,IACZC,KAAKC,UAAUC,cAAcF,KAAKG,oBAAoBC,yBACvD,IAAC,OAJmBR,CAAG","ignoreList":[],"sourceRoot":"controller"}},{"offset":{"line":3,"column":0},"map":{"version":3,"names":["BaseController","Controller","extend","onInit","_onInit","getOwnerComponent","_getOwnerComponent","Controller.prototype.getOwnerComponent.call","this","getRouter","_getRouter","UIComponent","getRouterFor","getResourceBundle","_getResourceBundle","model","getModel","i18nText","async","_i18nText","key","args","bundle","length","getText","_getModel","name","getView","getAppModel","_getAppModel","getODataModel","_getODataModel","setModel","_setModel","navTo","_navTo","parameters","replace","undefined","onNavBack","_onNavBack","previousHash","History","getInstance","getPreviousHash","window","history","go"],"sources":["BaseController.ts"],"sourcesContent":["import Controller from \"sap/ui/core/mvc/Controller\";\nimport UIComponent from \"sap/ui/core/UIComponent\";\nimport AppComponent from \"../Component\";\nimport Model from \"sap/ui/model/Model\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport ODataModel from \"sap/ui/model/odata/v4/ODataModel\";\nimport ResourceModel from \"sap/ui/model/resource/ResourceModel\";\nimport ResourceBundle from \"sap/base/i18n/ResourceBundle\";\nimport Router from \"sap/ui/core/routing/Router\";\nimport History from \"sap/ui/core/routing/History\";\n\n/**\n * @namespace cds.plugin.caching.dashboard.controller\n */\nexport default abstract class BaseController extends Controller {\n\n\tpublic onInit(): void {\n\n\t}\n\n\t/**\n\t * Convenience method for accessing the component of the controller's view.\n\t * @returns The component of the controller's view\n\t */\n\tpublic getOwnerComponent(): AppComponent {\n\t\treturn super.getOwnerComponent() as AppComponent;\n\t}\n\n\t/**\n\t * Convenience method to get the components' router instance.\n\t * @returns The router instance\n\t */\n\tpublic getRouter(): Router {\n\t\treturn UIComponent.getRouterFor(this);\n\t}\n\n\t/**\n\t * Convenience method for getting the i18n resource bundle of the component.\n\t * @returns The i18n resource bundle of the component\n\t */\n\tpublic getResourceBundle(): Promise<ResourceBundle> {\n\t\tconst model = this.getOwnerComponent().getModel(\"i18n\") as ResourceModel;\n\t\treturn model.getResourceBundle() as Promise<ResourceBundle>;\n\t}\n\n\t/**\n\t * Returns a translated string from the i18n bundle (ResourceModel is async).\n\t */\n\tpublic async i18nText(key: string, args?: (string | number)[]): Promise<string> {\n\t\tconst bundle = await this.getResourceBundle();\n\t\treturn args && args.length\n\t\t\t? bundle.getText(key, args)\n\t\t\t: bundle.getText(key);\n\t}\n\n\t/**\n\t * Convenience method for getting the view model by name in every controller of the application.\n\t * @param name The model name\n\t * @returns The model instance\n\t */\n\tpublic getModel(name?: string): Model {\n\t\treturn this.getView().getModel(name);\n\t}\n\n\t/**\n\t * Returns the application JSON model.\n\t */\n\tprotected getAppModel(): JSONModel {\n\t\treturn this.getModel(\"app\") as JSONModel;\n\t}\n\n\t/**\n\t * Returns the default OData V4 model.\n\t */\n\tprotected getODataModel(): ODataModel {\n\t\treturn this.getModel() as ODataModel;\n\t}\n\n\t/**\n\t * Convenience method for setting the view model in every controller of the application.\n\t * @param model The model instance\n\t * @param name The model name\n\t * @returns The current base controller instance\n\t */\n\tpublic setModel(model: Model, name?: string): BaseController {\n\t\tthis.getView().setModel(model, name);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Convenience method for triggering the navigation to a specific target.\n\t * @param name Target name\n\t * @param parameters Navigation parameters\n\t * @param replace Defines if the hash should be replaced (no browser history entry) or set (browser history entry)\n\t */\n\tpublic navTo(name: string, parameters?: object, replace?: boolean): void {\n\t\tthis.getRouter().navTo(name, parameters, undefined, replace);\n\t}\n\n\t/**\n\t * Convenience event handler for navigating back.\n\t * It there is a history entry we go one step back in the browser history\n\t * If not, it will replace the current entry of the browser history with the main route.\n\t */\n\tpublic onNavBack(): void {\n\t\tconst previousHash = History.getInstance().getPreviousHash();\n\t\tif (previousHash !== undefined) {\n\t\t\twindow.history.go(-1);\n\t\t} else {\n\t\t\tthis.getRouter().navTo(\"main\", {}, undefined, true);\n\t\t}\n\t}\n}\n"],"mappings":"AAAA,+LAWA,MAG8BA,EAAuBC,EAAUC,OAAA,0DAEvDC,OAAM,SAAAC,IAEb,EAMOC,kBAAiB,SAAAC,IACvB,OAAAC,mCAAAC,KACD,EAMOC,UAAS,SAAAC,IACf,OAAOC,EAAYC,aAAaJ,KACjC,EAMOK,kBAAiB,SAAAC,IACvB,MAAMC,EAAQP,KAAKH,oBAAoBW,SAAS,QAChD,OAAOD,EAAMF,mBACd,EAKaI,SAAQC,eAAAC,EAACC,EAAaC,GAClC,MAAMC,QAAed,KAAKK,oBAC1B,OAAOQ,GAAQA,EAAKE,OACjBD,EAAOE,QAAQJ,EAAKC,GACpBC,EAAOE,QAAQJ,EACnB,EAOOJ,SAAQ,SAAAS,EAACC,GACf,OAAOlB,KAAKmB,UAAUX,SAASU,EAChC,EAKUE,YAAW,SAAAC,IACpB,OAAOrB,KAAKQ,SAAS,MACtB,EAKUc,cAAa,SAAAC,IACtB,OAAOvB,KAAKQ,UACb,EAQOgB,SAAQ,SAAAC,EAAClB,EAAcW,GAC7BlB,KAAKmB,UAAUK,SAASjB,EAAOW,GAC/B,OAAOlB,IACR,EAQO0B,MAAK,SAAAC,EAACT,EAAcU,EAAqBC,GAC/C7B,KAAKC,YAAYyB,MAAMR,EAAMU,EAAYE,UAAWD,EACrD,EAOOE,UAAS,SAAAC,IACf,MAAMC,EAAeC,EAAQC,cAAcC,kBAC3C,GAAIH,IAAiBH,UAAW,CAC/BO,OAAOC,QAAQC,IAAI,EACpB,KAAO,CACNvC,KAAKC,YAAYyB,MAAM,OAAQ,CAAC,EAAGI,UAAW,KAC/C,CACD,IAAC,OAjG4BtC,CAAc","ignoreList":[],"sourceRoot":"controller"}},{"offset":{"line":4,"column":0},"map":{"version":3,"names":["BaseController","_interopRequireDefault","__BaseController","Cache","extend","onInit","_onInit","BaseController.prototype.onInit.call","this","uiModel","JSONModel","selectedTab","statistics","loading","loadingEntries","showEntriesTable","cacheEntries","createKey","createValue","createTtl","getKey","getValue","deleteKey","metricsEnabled","keyMetricsEnabled","getView","setModel","getRouter","getRoute","attachPatternMatched","onRouteMatched","_onRouteMatched","event","cache","getParameter","getAppModel","setProperty","bindElement","path","replace","events","change","context","getElementBinding","getBoundContext","getProperty","loadStatistics","loadKeyMetricsData","_loadStatistics","refresh","table","byId","binding","getBinding","isSuspended","resume","_loadKeyMetricsData","onLoadCacheEntries","async","_onLoadCacheEntries","cacheContext","setSizeLimit","model","getODataModel","bindContext","invoke","value","entries","requestObject","entry","Array","isArray","tags","join","error","console","MessageBox","i18nText","onMetricsRowSelect","_onMetricsRowSelect","selectedRow","metric","getObject","cacheName","navTo","metricId","ID","onSetKey","_onSetKey","key","ttl","setParameter","MessageToast","show","onGetKey","_onGetKey","action","result","onDeleteKey","_onDeleteKey","onEnableMetricsChange","_onEnableMetricsChange","enabled","onEnableKeyMetricsChange","_onEnableKeyMetricsChange","onClearCache","_onClearCache","confirmMsg","confirm","actions","Action","OK","CANCEL","emphasizedAction","onClose","success","onRefresh","_onRefresh","handleClose","_handleClose","handleFullScreen","_handleFullScreen","handleExitFullScreen","_handleExitFullScreen","onKeyMetricsRowSelect","_onKeyMetricsRowSelect","keyMetricId","keyName","encodeURIComponent","onRefreshKeyMetricsData","_onRefreshKeyMetricsData","onRefreshMetricsData","_onRefreshMetricsData","onShowKeyMetricsMetadata","_onShowKeyMetricsMetadata","getSource","getBindingContext","formatJson","json","JSON","stringify","parse","localData","metadata","subject","query","cacheOptions","fragment","Fragment","load","name","controller","popover","openBy","onClearMetrics","_onClearMetrics","onClearKeyMetrics","_onClearKeyMetrics"],"sources":["Cache.controller.ts"],"sourcesContent":["import MessageBox from \"sap/m/MessageBox\";\nimport BaseController from \"./BaseController\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport { Route$PatternMatchedEvent } from \"sap/ui/core/routing/Route\";\nimport Table, { Table$RowSelectionChangeEvent } from \"sap/ui/table/Table\";\nimport MessageToast from \"sap/m/MessageToast\";\nimport Context from \"sap/ui/model/odata/v4/Context\";\nimport ODataListBinding from \"sap/ui/model/odata/v4/ODataListBinding\";\nimport { Button$PressEvent } from \"sap/m/Button\";\nimport { Switch$ChangeEvent } from \"sap/m/Switch\";\nimport Fragment from \"sap/ui/core/Fragment\";\nimport Popover from \"sap/m/Popover\";\n\n/**\n * @namespace cds.plugin.caching.dashboard.controller\n */\nexport default class Cache extends BaseController {\n private uiModel: JSONModel;\n\n public onInit(): void {\n super.onInit();\n\n this.uiModel = new JSONModel({\n selectedTab: \"main\",\n statistics: [],\n loading: false,\n loadingEntries: false,\n showEntriesTable: false,\n cacheEntries: [],\n\n createKey: \"\",\n createValue: \"\",\n createTtl: 3600,\n\n getKey: \"\",\n getValue: \"\",\n\n deleteKey: \"\",\n\n metricsEnabled: false,\n keyMetricsEnabled: false,\n });\n this.getView().setModel(this.uiModel, \"ui\");\n\n this.getRouter().getRoute(\"cache\").attachPatternMatched(this.onRouteMatched, this);\n }\n\n public onRouteMatched(event: Route$PatternMatchedEvent): void {\n const { cache } = event.getParameter(\"arguments\") as { cache: string };\n this.getAppModel().setProperty(\"/selectedCache\", cache);\n this.getAppModel().setProperty(\"/layout\", \"TwoColumnsMidExpanded\");\n\n this.getView().bindElement({\n path: `/Caches('${cache.replace(/'/g, \"''\")}')`,\n events: {\n change: () => {\n const context = this.getView().getElementBinding()?.getBoundContext();\n if (context) {\n this.uiModel.setProperty(\"/config\", context.getProperty(\"configuration\"));\n this.loadStatistics();\n this.loadKeyMetricsData();\n }\n }\n }\n });\n }\n\n private loadStatistics(refresh = false): void {\n const table = this.getView().byId(\"metricsTable\") as Table;\n const binding = table.getBinding(\"rows\") as ODataListBinding;\n if (binding.isSuspended()) {\n binding.resume();\n }\n if (refresh) {\n binding.refresh();\n }\n }\n\n private loadKeyMetricsData(refresh = false): void {\n const table = this.getView().byId(\"keyMetricsTable\") as Table;\n const binding = table.getBinding(\"rows\") as ODataListBinding;\n if (binding.isSuspended()) {\n binding.resume();\n }\n if (refresh) {\n binding.refresh();\n }\n }\n\n public async onLoadCacheEntries(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n\n try {\n this.uiModel.setProperty(\"/loadingEntries\", true);\n this.uiModel.setProperty(\"/showEntriesTable\", true);\n this.uiModel.setSizeLimit(100_000);\n\n const model = this.getODataModel();\n const context = model.bindContext(`plugin.cds_caching.CachingApiService.getEntries(...)`, cacheContext);\n await context.invoke();\n const { value: entries } = await context.requestObject() as { value: Array<{ tags: string[] | string; entryKey: string; value: string; timestamp: string }> };\n for (const entry of entries) {\n if (Array.isArray(entry.tags)) {\n entry.tags = entry.tags.join(\", \");\n }\n }\n\n this.uiModel.setProperty(\"/cacheEntries\", entries);\n\n } catch (error) {\n console.error(\"Error loading cache entries:\", error);\n MessageBox.error(await this.i18nText(\"msgLoadEntriesFailed\"));\n } finally {\n this.uiModel.setProperty(\"/loadingEntries\", false);\n }\n }\n\n public onMetricsRowSelect(event: Table$RowSelectionChangeEvent): void {\n const selectedRow = event.getParameter(\"rowContext\");\n if (selectedRow) {\n const metric = selectedRow.getObject() as { ID: string };\n const cacheName = this.getView().getElementBinding().getBoundContext().getProperty(\"name\");\n\n this.getRouter().navTo(\"singleMetric\", {\n cache: cacheName,\n metricId: metric.ID\n });\n\n this.getAppModel().setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n }\n }\n\n public async onSetKey(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n const key = this.uiModel.getProperty(\"/createKey\");\n const value = this.uiModel.getProperty(\"/createValue\");\n const ttl = this.uiModel.getProperty(\"/createTtl\");\n\n if (!key || !value) {\n MessageBox.error(await this.i18nText(\"msgProvideKeyValue\"));\n return;\n }\n\n try {\n const model = this.getODataModel();\n const context = model.bindContext(`plugin.cds_caching.CachingApiService.setEntry(...)`, cacheContext);\n context.setParameter(\"key\", key);\n context.setParameter(\"value\", value);\n context.setParameter(\"ttl\", ttl);\n await context.invoke();\n\n MessageToast.show(await this.i18nText(\"msgEntryCreated\"));\n\n this.uiModel.setProperty(\"/createKey\", \"\");\n this.uiModel.setProperty(\"/createValue\", \"\");\n this.uiModel.setProperty(\"/createTtl\", 3600);\n\n } catch (error) {\n console.error(\"Error setting cache entry:\", error);\n MessageBox.error(await this.i18nText(\"msgCreateEntryFailed\"));\n }\n }\n\n public async onGetKey(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n const key = this.uiModel.getProperty(\"/getKey\");\n\n if (!key) {\n MessageBox.error(await this.i18nText(\"msgProvideKey\"));\n return;\n }\n\n try {\n const model = this.getODataModel();\n const action = model.bindContext(`plugin.cds_caching.CachingApiService.getEntry(...)`, cacheContext);\n action.setParameter(\"key\", key);\n await action.invoke();\n\n const result = await action.requestObject() as { value?: string };\n this.uiModel.setProperty(\"/getValue\", result.value || (await this.i18nText(\"msgNotFound\")));\n\n } catch (error) {\n console.error(\"Error getting cache entry:\", error);\n this.uiModel.setProperty(\"/getValue\", await this.i18nText(\"msgGetEntryError\"));\n }\n }\n\n public async onDeleteKey(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n const key = this.uiModel.getProperty(\"/deleteKey\");\n\n if (!key) {\n MessageBox.error(await this.i18nText(\"msgProvideKey\"));\n return;\n }\n\n try {\n const model = this.getODataModel();\n const context = model.bindContext(`plugin.cds_caching.CachingApiService.deleteEntry(...)`, cacheContext);\n context.setParameter(\"key\", key);\n await context.invoke();\n\n MessageToast.show(await this.i18nText(\"msgEntryDeleted\"));\n this.uiModel.setProperty(\"/deleteKey\", \"\");\n\n } catch (error) {\n console.error(\"Error deleting cache entry:\", error);\n MessageBox.error(await this.i18nText(\"msgDeleteEntryFailed\"));\n }\n }\n\n public async onEnableMetricsChange(event: Switch$ChangeEvent): Promise<void> {\n const enabled = event.getParameter(\"state\");\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n\n try {\n const model = this.getODataModel();\n const context = model.bindContext(`plugin.cds_caching.CachingApiService.setMetricsEnabled(...)`, cacheContext);\n context.setParameter(\"enabled\", enabled);\n await context.invoke();\n\n MessageToast.show(await this.i18nText(enabled ? \"msgMetricsEnabled\" : \"msgMetricsDisabled\"));\n } catch (error) {\n console.error(\"Error setting metrics enabled:\", error);\n MessageBox.error(await this.i18nText(\"msgFailedUpdateMetrics\"));\n this.uiModel.setProperty(\"/metricsEnabled\", !enabled);\n }\n }\n\n public async onEnableKeyMetricsChange(event: Switch$ChangeEvent): Promise<void> {\n const enabled = event.getParameter(\"state\");\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n\n try {\n const model = this.getODataModel();\n const context = model.bindContext(`plugin.cds_caching.CachingApiService.setKeyMetricsEnabled(...)`, cacheContext);\n context.setParameter(\"enabled\", enabled);\n await context.invoke();\n\n MessageToast.show(await this.i18nText(enabled ? \"msgKeyMetricsEnabled\" : \"msgKeyMetricsDisabled\"));\n\n } catch (error) {\n console.error(\"Error setting key metrics enabled:\", error);\n MessageBox.error(await this.i18nText(\"msgFailedKeyMetrics\"));\n this.uiModel.setProperty(\"/keyMetricsEnabled\", !enabled);\n }\n }\n\n public async onClearCache(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n\n const confirmMsg = await this.i18nText(\"msgConfirmClearCache\");\n MessageBox.confirm(confirmMsg, {\n actions: [MessageBox.Action.OK, MessageBox.Action.CANCEL],\n emphasizedAction: MessageBox.Action.OK,\n onClose: async (action: string) => {\n if (action === MessageBox.Action.OK) {\n try {\n const model = this.getODataModel();\n const context = model.bindContext(`plugin.cds_caching.CachingApiService.clear(...)`, cacheContext);\n await context.invoke();\n\n MessageBox.success(await this.i18nText(\"msgCacheCleared\"));\n await this.onRefresh();\n\n } catch (error) {\n console.error(\"Error clearing cache:\", error);\n MessageBox.error(await this.i18nText(\"msgClearCacheFailed\"));\n }\n }\n }\n });\n }\n\n public async onRefresh(): Promise<void> {\n if (this.getView().getElementBinding()?.getBoundContext()) {\n this.loadStatistics(true);\n this.loadKeyMetricsData(true);\n }\n }\n\n public handleClose(): void {\n this.getRouter().navTo(\"main\");\n }\n\n public handleFullScreen(): void {\n this.getAppModel().setProperty(\"/layout\", \"MidColumnFullScreen\");\n }\n\n public handleExitFullScreen(): void {\n this.getAppModel().setProperty(\"/layout\", \"TwoColumnsMidExpanded\");\n }\n\n public onKeyMetricsRowSelect(event: Table$RowSelectionChangeEvent): void {\n const selectedRow = event.getParameter(\"rowContext\");\n if (selectedRow) {\n const metric = selectedRow.getObject() as { ID: string; keyName: string };\n const cacheName = this.getView().getElementBinding().getBoundContext().getProperty(\"name\");\n\n this.getRouter().navTo(\"singleKeyMetric\", {\n cache: cacheName,\n keyMetricId: metric.ID,\n keyName: encodeURIComponent(metric.keyName)\n });\n\n this.getAppModel().setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n }\n }\n\n public async onRefreshKeyMetricsData(): Promise<void> {\n this.loadKeyMetricsData(true);\n }\n\n public async onRefreshMetricsData(): Promise<void> {\n this.loadStatistics(true);\n }\n\n public async onShowKeyMetricsMetadata(event: Button$PressEvent): Promise<void> {\n const context = event.getSource().getBindingContext() as Context;\n\n const formatJson = (json: string) => {\n try {\n return JSON.stringify(JSON.parse(json), null, 2);\n } catch {\n return json;\n }\n };\n\n const localData = new JSONModel({\n metadata: formatJson(context.getProperty(\"metadata\")),\n subject: formatJson(context.getProperty(\"subject\")),\n query: formatJson(context.getProperty(\"query\")),\n cacheOptions: formatJson(context.getProperty(\"cacheOptions\")),\n keyName: context.getProperty(\"keyName\"),\n });\n\n const fragment = await Fragment.load({\n name: \"cds.plugin.caching.dashboard.view.KeyMetricsMetadata\",\n controller: this,\n });\n\n const popover = fragment as Popover;\n popover.setModel(localData, \"localData\");\n popover.openBy(event.getSource());\n }\n\n public async onClearMetrics(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n if (!cacheContext) {\n return;\n }\n\n try {\n const model = this.getODataModel();\n const action = model.bindContext(`plugin.cds_caching.CachingApiService.clearMetrics(...)`, cacheContext);\n await action.invoke();\n\n MessageToast.show(await this.i18nText(\"msgMetricsCleared\"));\n await this.onRefreshMetricsData();\n\n } catch (error) {\n console.error(\"Error clearing metrics:\", error);\n MessageBox.error(await this.i18nText(\"msgFailedClearMetrics\"));\n }\n }\n\n public async onClearKeyMetrics(): Promise<void> {\n const cacheContext = this.getView().getElementBinding().getBoundContext() as Context;\n if (!cacheContext) {\n return;\n }\n\n try {\n const model = this.getODataModel();\n const action = model.bindContext(`plugin.cds_caching.CachingApiService.clearKeyMetrics(...)`, cacheContext);\n await action.invoke();\n\n MessageToast.show(await this.i18nText(\"msgKeyMetricsCleared\"));\n await this.onRefreshKeyMetricsData();\n\n } catch (error) {\n console.error(\"Error clearing key metrics:\", error);\n MessageBox.error(await this.i18nText(\"msgFailedClearKeyMetrics\"));\n }\n }\n\n}\n"],"mappings":"AAAA,uTACOA,EAAcC,EAAAC,GAYrB,MAGqBC,EAAcH,EAAcI,OAAA,iDAGtCC,OAAM,SAAAC,IACTC,wBAAAC,MAEAA,KAAKC,QAAU,IAAIC,EAAU,CACzBC,YAAa,OACbC,WAAY,GACZC,QAAS,MACTC,eAAgB,MAChBC,iBAAkB,MAClBC,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H,GAAO,KAAM,EAClD,CAAE,MACE,OAAOA,CACX,GAGJ,MAAMI,EAAY,IAAIpI,EAAU,CAC5BqI,SAAUN,EAAW/F,EAAQG,YAAY,aACzCmG,QAASP,EAAW/F,EAAQG,YAAY,YACxCoG,MAAOR,EAAW/F,EAAQG,YAAY,UACtCqG,aAAcT,EAAW/F,EAAQG,YAAY,iBAC7CkF,QAASrF,EAAQG,YAAY,aAGjC,MAAMsG,QAAiBC,EAASC,KAAK,CACjCC,KAAM,uDACNC,WAAY/I,OAGhB,MAAMgJ,EAAUL,EAChBK,EAAQ9H,SAASoH,EAAW,aAC5BU,EAAQC,OAAOzH,EAAMuG,YACzB,EAEamB,eAAchG,eAAAiG,IACvB,MAAM/F,EAAepD,KAAKiB,UAAUkB,oBAAoBC,kBACxD,IAAKgB,EAAc,CACf,MACJ,CAEA,IACI,MAAME,EAAQtD,KAAKuD,gBACnB,MAAMiC,EAASlC,EAAME,YAAY,yDAA0DJ,SACrFoC,EAAO/B,SAEb2B,EAAaC,WAAWrF,KAAKqE,SAAS,4BAChCrE,KAAK2H,sBAEf,CAAE,MAAOzD,GACLC,QAAQD,MAAM,0BAA2BA,GACzCE,EAAWF,YAAYlE,KAAKqE,SAAS,yBACzC,CACJ,EAEa+E,kBAAiBlG,eAAAmG,IAC1B,MAAMjG,EAAepD,KAAKiB,UAAUkB,oBAAoBC,kBACxD,IAAKgB,EAAc,CACf,MACJ,CAEA,IACI,MAAME,EAAQtD,KAAKuD,gBACnB,MAAMiC,EAASlC,EAAME,YAAY,4DAA6DJ,SACxFoC,EAAO/B,SAEb2B,EAAaC,WAAWrF,KAAKqE,SAAS,+BAChCrE,KAAKyH,yBAEf,CAAE,MAAOvD,GACLC,QAAQD,MAAM,8BAA+BA,GAC7CE,EAAWF,YAAYlE,KAAKqE,SAAS,4BACzC,CACJ,IAAC,OAhXgB1E,CAAK","ignoreList":[],"sourceRoot":"controller"}},{"offset":{"line":5,"column":0},"map":{"version":3,"names":["BaseController","_interopRequireDefault","__BaseController","Main","extend","onInit","_onInit","this","getRouter","getRoute","attachPatternMatched","onRouteMatched","_onRouteMatched","_event","getAppModel","setProperty","getView","byId","getBinding","refresh","onCacheSelect","_onCacheSelect","event","cache","getParameter","getBindingContext","getProperty","navTo","onRefresh","_onRefresh"],"sources":["Main.controller.ts"],"sourcesContent":["import { ListBase$ItemPressEvent } from \"sap/m/ListBase\";\nimport BaseController from \"./BaseController\";\nimport { Route$PatternMatchedEvent } from \"sap/ui/core/routing/Route\";\nimport List from \"sap/m/List\";\n\n/**\n * @namespace cds.plugin.caching.dashboard.controller\n */\nexport default class Main extends BaseController {\n\n\tpublic onInit(): void {\n\t\tthis.getRouter().getRoute(\"main\").attachPatternMatched(this.onRouteMatched, this);\n\t}\n\n\tpublic onRouteMatched(_event: Route$PatternMatchedEvent): void {\n\t\tthis.getAppModel().setProperty(\"/layout\", \"OneColumn\");\n\t\t(this.getView().byId(\"cachesList\") as List).getBinding(\"items\").refresh();\n\t}\n\n\tpublic onCacheSelect(event: ListBase$ItemPressEvent): void {\n\t\tconst cache = event.getParameter(\"listItem\").getBindingContext().getProperty(\"name\");\n\t\tthis.getRouter().navTo(\"cache\", { cache: cache });\n\t}\n\n\tpublic onRefresh(): void {\n\t\t(this.getView().byId(\"cachesList\") as List).getBinding(\"items\").refresh();\n\t}\n\n}\n"],"mappings":"AAAA,iNACOA,EAAcC,EAAAC,GAIrB,MAGqBC,EAAaH,EAAcI,OAAA,gDAExCC,OAAM,SAAAC,IACZC,KAAKC,YAAYC,SAAS,QAAQC,qBAAqBH,KAAKI,eAAgBJ,KAC7E,EAEOI,eAAc,SAAAC,EAACC,GACrBN,KAAKO,cAAcC,YAAY,UAAW,aACzCR,KAAKS,UAAUC,KAAK,cAAuBC,WAAW,SAASC,SACjE,EAEOC,cAAa,SAAAC,EAACC,GACpB,MAAMC,EAAQD,EAAME,aAAa,YAAYC,oBAAoBC,YAAY,QAC7EnB,KAAKC,YAAYmB,MAAM,QAAS,CAAEJ,MAAOA,GAC1C,EAEOK,UAAS,SAAAC,IACdtB,KAAKS,UAAUC,KAAK,cAAuBC,WAAW,SAASC,SACjE,IAAC,OAlBmBhB,CAAI","ignoreList":[],"sourceRoot":"controller"}},{"offset":{"line":6,"column":0},"map":{"version":3,"names":["BaseController","_interopRequireDefault","__BaseController","SingleKeyMetric","extend","onInit","_onInit","BaseController.prototype.onInit.call","this","uiModel","JSONModel","keyMetricId","keyName","operation","dataType","operationType","target","tenant","user","locale","hits","misses","totalRequests","hitRatio","cacheEfficiency","avgHitLatency","avgMissLatency","nativeHits","nativeMisses","nativeSets","nativeDeletes","metadata","subject","query","cacheOptions","lastAccess","timestamp","getView","setModel","getRouter","getRoute","attachPatternMatched","onRouteMatched","_onRouteMatched","event","cache","getParameter","setProperty","getAppModel","loadKeyMetric","decodeURIComponent","escapeODataString","_escapeODataString","value","replace","formatJson","_formatJson","JSON","stringify","parse","async","_loadKeyMetric","cacheName","model","getODataModel","context","bindContext","metric","requestObject","MessageBox","error","i18nText","console","onRefresh","_onRefresh","getProperty","handleFullScreen","_handleFullScreen","handleExitFullScreen","_handleExitFullScreen","handleClose","_handleClose","navTo"],"sources":["SingleKeyMetric.controller.ts"],"sourcesContent":["import BaseController from \"./BaseController\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport { Route$PatternMatchedEvent } from \"sap/ui/core/routing/Route\";\nimport MessageBox from \"sap/m/MessageBox\";\n\ninterface KeyMetricData {\n keyName?: string;\n operation?: string;\n dataType?: string;\n operationType?: string;\n target?: string;\n tenant?: string;\n user?: string;\n locale?: string;\n hits?: number;\n misses?: number;\n totalRequests?: number;\n hitRatio?: number;\n cacheEfficiency?: number;\n avgHitLatency?: number;\n avgMissLatency?: number;\n nativeHits?: number;\n nativeMisses?: number;\n nativeSets?: number;\n nativeDeletes?: number;\n metadata?: string;\n subject?: string;\n query?: string;\n cacheOptions?: string;\n lastAccess?: string;\n timestamp?: string;\n}\n\n/**\n * @namespace cds.plugin.caching.dashboard.controller\n */\nexport default class SingleKeyMetric extends BaseController {\n private uiModel: JSONModel;\n\n public onInit(): void {\n super.onInit();\n\n this.uiModel = new JSONModel({\n keyMetricId: \"\",\n keyName: \"\",\n operation: \"\",\n dataType: \"\",\n operationType: \"\",\n target: \"\",\n tenant: \"\",\n user: \"\",\n locale: \"\",\n hits: 0,\n misses: 0,\n totalRequests: 0,\n hitRatio: 0,\n cacheEfficiency: 0,\n avgHitLatency: 0,\n avgMissLatency: 0,\n nativeHits: 0,\n nativeMisses: 0,\n nativeSets: 0,\n nativeDeletes: 0,\n metadata: \"\",\n subject: \"\",\n query: \"\",\n cacheOptions: \"\",\n lastAccess: \"\",\n timestamp: \"\",\n });\n this.getView().setModel(this.uiModel, \"ui\");\n\n this.getRouter().getRoute(\"singleKeyMetric\").attachPatternMatched(this.onRouteMatched, this);\n }\n\n public onRouteMatched(event: Route$PatternMatchedEvent): void {\n const { cache, keyMetricId, keyName } = event.getParameter(\"arguments\") as {\n cache: string;\n keyMetricId: string;\n keyName: string;\n };\n\n this.uiModel.setProperty(\"/keyMetricId\", keyMetricId);\n this.getAppModel().setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n\n this.loadKeyMetric(cache, keyMetricId, decodeURIComponent(keyName));\n }\n\n private escapeODataString(value: string): string {\n return value.replace(/'/g, \"''\");\n }\n\n private formatJson(value: string): string {\n if (!value) {\n return \"\";\n }\n try {\n return JSON.stringify(JSON.parse(value), null, 2);\n } catch {\n return value;\n }\n }\n\n private async loadKeyMetric(cacheName: string, keyMetricId: string, keyName: string): Promise<void> {\n try {\n const model = this.getODataModel();\n const context = model.bindContext(\n `/KeyMetrics(ID='${this.escapeODataString(keyMetricId)}',cache='${this.escapeODataString(cacheName)}',keyName='${this.escapeODataString(keyName)}')`\n );\n const metric = await context.requestObject() as KeyMetricData;\n\n if (metric) {\n this.uiModel.setProperty(\"/keyName\", metric.keyName || keyName);\n this.uiModel.setProperty(\"/operation\", metric.operation || \"\");\n this.uiModel.setProperty(\"/dataType\", metric.dataType || \"\");\n this.uiModel.setProperty(\"/operationType\", metric.operationType || \"\");\n this.uiModel.setProperty(\"/target\", metric.target || \"\");\n this.uiModel.setProperty(\"/tenant\", metric.tenant || \"\");\n this.uiModel.setProperty(\"/user\", metric.user || \"\");\n this.uiModel.setProperty(\"/locale\", metric.locale || \"\");\n this.uiModel.setProperty(\"/hits\", metric.hits || 0);\n this.uiModel.setProperty(\"/misses\", metric.misses || 0);\n this.uiModel.setProperty(\"/totalRequests\", metric.totalRequests || 0);\n this.uiModel.setProperty(\"/hitRatio\", metric.hitRatio || 0);\n this.uiModel.setProperty(\"/cacheEfficiency\", metric.cacheEfficiency || 0);\n this.uiModel.setProperty(\"/avgHitLatency\", metric.avgHitLatency || 0);\n this.uiModel.setProperty(\"/avgMissLatency\", metric.avgMissLatency || 0);\n this.uiModel.setProperty(\"/nativeHits\", metric.nativeHits || 0);\n this.uiModel.setProperty(\"/nativeMisses\", metric.nativeMisses || 0);\n this.uiModel.setProperty(\"/nativeSets\", metric.nativeSets || 0);\n this.uiModel.setProperty(\"/nativeDeletes\", metric.nativeDeletes || 0);\n this.uiModel.setProperty(\"/metadata\", this.formatJson(metric.metadata || \"\"));\n this.uiModel.setProperty(\"/subject\", this.formatJson(metric.subject || \"\"));\n this.uiModel.setProperty(\"/query\", this.formatJson(metric.query || \"\"));\n this.uiModel.setProperty(\"/cacheOptions\", this.formatJson(metric.cacheOptions || \"\"));\n this.uiModel.setProperty(\"/lastAccess\", metric.lastAccess || \"\");\n this.uiModel.setProperty(\"/timestamp\", metric.timestamp || \"\");\n } else {\n MessageBox.error(await this.i18nText(\"msgMetricNotFound\"));\n }\n } catch (error) {\n console.error(\"Error loading key metric:\", error);\n MessageBox.error(await this.i18nText(\"msgLoadMetricFailed\"));\n }\n }\n\n public onRefresh(): void {\n const cacheName = this.getAppModel().getProperty(\"/selectedCache\");\n const keyMetricId = this.uiModel.getProperty(\"/keyMetricId\");\n const keyName = this.uiModel.getProperty(\"/keyName\");\n\n if (cacheName && keyMetricId && keyName) {\n this.loadKeyMetric(cacheName, keyMetricId, keyName);\n }\n }\n\n public handleFullScreen(): void {\n this.getAppModel().setProperty(\"/layout\", \"EndColumnFullScreen\");\n }\n\n public handleExitFullScreen(): void {\n this.getAppModel().setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n }\n\n public handleClose(): void {\n this.getAppModel().setProperty(\"/layout\", \"TwoColumnsMidExpanded\");\n this.getRouter().navTo(\"cache\", { cache: this.getAppModel().getProperty(\"/selectedCache\") });\n }\n}\n"],"mappings":"AAAA,iRAAOA,EAAcC,EAAAC,GAiCrB,MAGqBC,EAAwBH,EAAcI,OAAA,2DAGhDC,OAAM,SAAAC,IACTC,wBAAAC,MAEAA,KAAKC,QAAU,IAAIC,EAAU,CACzBC,YAAa,GACbC,QAAS,GACTC,UAAW,GACXC,SAAU,GACVC,cAAe,GACfC,OAAQ,GACRC,OAAQ,GACRC,KAAM,GACNC,OAAQ,GACRC,KAAM,EACNC,OAAQ,EACRC,cAAe,EACfC,SAAU,EACVC,gBAAiB,EACjBC,cAAe,EACfC,eAAgB,EAChBC,WAAY,EACZC,aAAc,EACdC,WAAY,EACZC,cAAe,EACfC,SAAU,GACVC,QAAS,GACTC,MAAO,GACPC,aAAc,GACdC,WAAY,GACZC,UAAW,KAEf5B,KAAK6B,UAAUC,SAAS9B,KAAKC,QAAS,MAEtCD,KAAK+B,YAAYC,SAAS,mBAAmBC,qBAAqBjC,KAAKkC,eAAgBlC,KAC3F,EAEOkC,eAAc,SAAAC,EAACC,GAClB,MAAMC,MAAEA,EAAKlC,YAAEA,EAAWC,QAAEA,GAAYgC,EAAME,aAAa,aAM3DtC,KAAKC,QAAQsC,YAAY,eAAgBpC,GACzCH,KAAKwC,cAAcD,YAAY,UAAW,2BAE1CvC,KAAKyC,cAAcJ,EAAOlC,EAAauC,mBAAmBtC,GAC9D,EAEQuC,kBAAiB,SAAAC,EAACC,GACtB,OAAOA,EAAMC,QA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QAAS,CAAErC,MAAOrC,KAAKwC,cAAc2B,YAAY,mBAC5E,IAAC,OAnIgBxE,CAAe","ignoreList":[],"sourceRoot":"controller"}},{"offset":{"line":7,"column":0},"map":{"version":3,"names":["BaseController","_interopRequireDefault","__BaseController","SingleMetric","extend","onInit","_onInit","BaseController.prototype.onInit.call","this","uiModel","JSONModel","metricId","hitRatio","cacheEfficiency","throughput","errorRate","avgLatency","avgHitLatency","avgMissLatency","hits","misses","sets","deletes","errors","nativeSets","nativeGets","nativeDeletes","nativeClears","nativeDeleteByTags","nativeErrors","totalNativeOperations","nativeThroughput","nativeErrorRate","memoryUsage","itemCount","uniqueKeys","uptimeMs","latencyData","cacheThroughData","nativeData","getView","setModel","getRouter","getRoute","attachPatternMatched","onRouteMatched","_onRouteMatched","event","cache","getParameter","setProperty","getAppModel","loadMetric","formatChart","escapeODataString","_escapeODataString","value","replace","async","_loadMetric","cacheName","model","getODataModel","rb","getResourceBundle","context","bindContext","metric","requestObject","generateLatencyChartData","generateCacheThroughChartData","generateNativeChartData","MessageBox","error","i18nText","console","_generateLatencyChartData","t","key","getText","operation","latency","avgReadThroughLatency","_generateCacheThroughChartData","count","_generateNativeChartData","_formatChart","latencyChart","byId","then","setVizProperties","legend","visible","plotArea","dataLabel","formatString","gridline","valueAxis","axisLine","axisTick","label","title","categoryAxis","text","cacheThroughChart","nativeChart","onRefresh","_onRefresh","getProperty","handleFullScreen","_handleFullScreen","handleExitFullScreen","_handleExitFullScreen","handleClose","_handleClose","navTo","onColumnsChange","_onColumnsChange"],"sources":["SingleMetric.controller.ts"],"sourcesContent":["import BaseController from \"./BaseController\";\nimport JSONModel from \"sap/ui/model/json/JSONModel\";\nimport { Route$PatternMatchedEvent } from \"sap/ui/core/routing/Route\";\nimport MessageBox from \"sap/m/MessageBox\";\nimport ResourceBundle from \"sap/base/i18n/ResourceBundle\";\n\ninterface VizChart {\n setVizProperties(properties: object): void;\n}\n\ninterface MetricData {\n hitRatio?: number;\n cacheEfficiency?: number;\n throughput?: number;\n errorRate?: number;\n avgLatency?: number;\n avgHitLatency?: number;\n avgMissLatency?: number;\n avgReadThroughLatency?: number;\n hits?: number;\n misses?: number;\n sets?: number;\n deletes?: number;\n errors?: number;\n nativeSets?: number;\n nativeGets?: number;\n nativeDeletes?: number;\n nativeClears?: number;\n nativeDeleteByTags?: number;\n nativeErrors?: number;\n totalNativeOperations?: number;\n nativeThroughput?: number;\n nativeErrorRate?: number;\n memoryUsage?: number;\n itemCount?: number;\n uptimeMs?: number;\n}\n\n/**\n * @namespace cds.plugin.caching.dashboard.controller\n */\nexport default class SingleMetric extends BaseController {\n private uiModel: JSONModel;\n\n public onInit(): void {\n super.onInit();\n\n this.uiModel = new JSONModel({\n metricId: \"\",\n hitRatio: 0,\n cacheEfficiency: 0,\n throughput: 0,\n errorRate: 0,\n avgLatency: 0,\n avgHitLatency: 0,\n avgMissLatency: 0,\n hits: 0,\n misses: 0,\n sets: 0,\n deletes: 0,\n errors: 0,\n nativeSets: 0,\n nativeGets: 0,\n nativeDeletes: 0,\n nativeClears: 0,\n nativeDeleteByTags: 0,\n nativeErrors: 0,\n totalNativeOperations: 0,\n nativeThroughput: 0,\n nativeErrorRate: 0,\n memoryUsage: 0,\n itemCount: 0,\n uniqueKeys: 0,\n uptimeMs: 0,\n latencyData: [],\n cacheThroughData: [],\n nativeData: []\n });\n this.getView().setModel(this.uiModel, \"ui\");\n\n this.getRouter().getRoute(\"singleMetric\").attachPatternMatched(this.onRouteMatched, this);\n }\n\n public onRouteMatched(event: Route$PatternMatchedEvent): void {\n const { cache, metricId } = event.getParameter(\"arguments\") as { cache: string; metricId: string };\n\n this.uiModel.setProperty(\"/metricId\", metricId);\n this.getAppModel().setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n\n this.loadMetric(cache, metricId);\n this.formatChart();\n }\n\n private escapeODataString(value: string): string {\n return value.replace(/'/g, \"''\");\n }\n\n private async loadMetric(cacheName: string, metricId: string): Promise<void> {\n try {\n const model = this.getODataModel();\n const rb = await this.getResourceBundle();\n\n const context = model.bindContext(\n `/Metrics(ID='${this.escapeODataString(metricId)}',cache='${this.escapeODataString(cacheName)}')`\n );\n const metric = await context.requestObject() as MetricData;\n\n if (metric) {\n this.uiModel.setProperty(\"/hitRatio\", metric.hitRatio || 0);\n this.uiModel.setProperty(\"/cacheEfficiency\", metric.cacheEfficiency || 0);\n this.uiModel.setProperty(\"/throughput\", metric.throughput || 0);\n this.uiModel.setProperty(\"/errorRate\", metric.errorRate || 0);\n\n this.uiModel.setProperty(\"/avgLatency\", metric.avgLatency || 0);\n this.uiModel.setProperty(\"/avgHitLatency\", metric.avgHitLatency || 0);\n this.uiModel.setProperty(\"/avgMissLatency\", metric.avgMissLatency || 0);\n\n this.uiModel.setProperty(\"/hits\", metric.hits || 0);\n this.uiModel.setProperty(\"/misses\", metric.misses || 0);\n this.uiModel.setProperty(\"/sets\", metric.sets || 0);\n this.uiModel.setProperty(\"/deletes\", metric.deletes || 0);\n this.uiModel.setProperty(\"/errors\", metric.errors || 0);\n\n this.uiModel.setProperty(\"/nativeSets\", metric.nativeSets || 0);\n this.uiModel.setProperty(\"/nativeGets\", metric.nativeGets || 0);\n this.uiModel.setProperty(\"/nativeDeletes\", metric.nativeDeletes || 0);\n this.uiModel.setProperty(\"/nativeClears\", metric.nativeClears || 0);\n this.uiModel.setProperty(\"/nativeDeleteByTags\", metric.nativeDeleteByTags || 0);\n this.uiModel.setProperty(\"/nativeErrors\", metric.nativeErrors || 0);\n this.uiModel.setProperty(\"/totalNativeOperations\", metric.totalNativeOperations || 0);\n this.uiModel.setProperty(\"/nativeThroughput\", metric.nativeThroughput || 0);\n this.uiModel.setProperty(\"/nativeErrorRate\", metric.nativeErrorRate || 0);\n\n this.uiModel.setProperty(\"/memoryUsage\", metric.memoryUsage || 0);\n this.uiModel.setProperty(\"/itemCount\", metric.itemCount || 0);\n this.uiModel.setProperty(\"/uptimeMs\", metric.uptimeMs || 0);\n this.uiModel.setProperty(\"/uniqueKeys\", 0);\n\n this.generateLatencyChartData(metric, rb);\n this.generateCacheThroughChartData(metric, rb);\n this.generateNativeChartData(metric, rb);\n\n } else {\n MessageBox.error(await this.i18nText(\"msgMetricNotFound\"));\n }\n\n } catch (error) {\n console.error(\"Error loading metric:\", error);\n MessageBox.error(await this.i18nText(\"msgLoadMetricFailed\"));\n }\n }\n\n private generateLatencyChartData(metric: MetricData, rb: ResourceBundle): void {\n const t = (key: string) => rb.getText(key);\n const latencyData = [\n { operation: t(\"chartOpAvgHitLatency\"), latency: metric.avgHitLatency || 0 },\n { operation: t(\"chartOpAvgMissLatency\"), latency: metric.avgMissLatency || 0 },\n { operation: t(\"chartOpAvgReadThroughLatency\"), latency: metric.avgReadThroughLatency || 0 }\n ];\n\n this.uiModel.setProperty(\"/latencyData\", latencyData);\n }\n\n private generateCacheThroughChartData(metric: MetricData, rb: ResourceBundle): void {\n const t = (key: string) => rb.getText(key);\n const cacheThroughData = [\n { operation: t(\"chartOpHits\"), count: metric.hits || 0 },\n { operation: t(\"chartOpMisses\"), count: metric.misses || 0 },\n { operation: t(\"chartOpErrors\"), count: metric.errors || 0 }\n ];\n\n this.uiModel.setProperty(\"/cacheThroughData\", cacheThroughData);\n }\n\n private generateNativeChartData(metric: MetricData, rb: ResourceBundle): void {\n const t = (key: string) => rb.getText(key);\n const nativeData = [\n { operation: t(\"chartOpSets\"), count: metric.nativeSets || 0 },\n { operation: t(\"chartOpGets\"), count: metric.nativeGets || 0 },\n { operation: t(\"chartOpDeletes\"), count: metric.nativeDeletes || 0 },\n { operation: t(\"chartOpClears\"), count: metric.nativeClears || 0 },\n { operation: t(\"chartOpDeleteByTags\"), count: metric.nativeDeleteByTags || 0 },\n { operation: t(\"chartOpErrors\"), count: metric.nativeErrors || 0 }\n ];\n\n this.uiModel.setProperty(\"/nativeData\", nativeData);\n }\n\n public formatChart(): void {\n const latencyChart = this.getView().byId(\"metricLatencyChart\") as unknown as VizChart;\n if (latencyChart) {\n void this.getResourceBundle().then((rb) => {\n latencyChart.setVizProperties({\n legend: { visible: false },\n plotArea: {\n dataLabel: { visible: true, formatString: \"#,## ms\" },\n gridline: { visible: false }\n },\n valueAxis: {\n axisLine: { visible: false },\n axisTick: { visible: false },\n label: { visible: false },\n title: { visible: false }\n },\n categoryAxis: { title: { visible: false } },\n title: { visible: false, text: rb.getText(\"chartTitleLatencyByOperation\") }\n });\n });\n }\n\n const cacheThroughChart = this.getView().byId(\"metricCacheThroughChart\") as unknown as VizChart;\n if (cacheThroughChart) {\n cacheThroughChart.setVizProperties({\n legend: { visible: true },\n plotArea: { dataLabel: { visible: true } },\n title: { visible: false }\n });\n }\n\n const nativeChart = this.getView().byId(\"metricNativeChart\") as unknown as VizChart;\n if (nativeChart) {\n nativeChart.setVizProperties({\n legend: { visible: true },\n plotArea: { dataLabel: { visible: true } },\n title: { visible: false }\n });\n }\n }\n\n public onRefresh(): void {\n const cacheName = this.getAppModel().getProperty(\"/selectedCache\");\n const metricId = this.uiModel.getProperty(\"/metricId\");\n\n if (cacheName && metricId) {\n this.loadMetric(cacheName, metricId);\n }\n }\n\n public handleFullScreen(): void {\n this.getAppModel().setProperty(\"/layout\", \"EndColumnFullScreen\");\n }\n\n public handleExitFullScreen(): void {\n this.getAppModel().setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n }\n\n public handleClose(): void {\n this.getAppModel().setProperty(\"/layout\", \"TwoColumnsMidExpanded\");\n this.getRouter().navTo(\"cache\", { cache: this.getAppModel().getProperty(\"/selectedCache\") });\n }\n\n public onColumnsChange(): void {\n // Handle responsive grid column changes if needed\n }\n}\n"],"mappings":"AAAA,8QAAOA,EAAcC,EAAAC,GAsCrB,MAGqBC,EAAqBH,EAAcI,OAAA,wDAG7CC,OAAM,SAAAC,IACTC,wBAAAC,MAEAA,KAAKC,QAAU,IAAIC,EAAU,CACzBC,SAAU,GACVC,SAAU,EACVC,gBAAiB,EACjBC,WAAY,EACZC,UAAW,EACXC,WAAY,EACZC,cAAe,EACfC,eAA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d1G,KAAK2C,cAAcD,YAAY,UAAW,yBAC1C1C,KAAKkC,YAAYyE,MAAM,QAAS,CAAEnE,MAAOxC,KAAK2C,cAAcyD,YAAY,mBAC5E,EAEOQ,gBAAe,SAAAC,IAClB,IACH,OApNgBlH,CAAY","ignoreList":[],"sourceRoot":"controller"}},{"offset":{"line":8,"column":0},"map":{"version":3,"names":["cacheNameFilter","cacheName","Filter","path","operator","FilterOperator","EQ","value1","cacheAndIdFilter","id","periodFilter","period","__exports","__esModule"],"sources":["filters.ts"],"sourcesContent":["import Filter from \"sap/ui/model/Filter\";\nimport FilterOperator from \"sap/ui/model/FilterOperator\";\n\nexport function cacheNameFilter(cacheName: string): Filter {\n\treturn new Filter({ path: \"cache\", operator: FilterOperator.EQ, value1: cacheName });\n}\n\nexport function cacheAndIdFilter(cacheName: string, id: string): Filter[] {\n\treturn [\n\t\tnew Filter({ path: \"cache\", operator: FilterOperator.EQ, value1: cacheName }),\n\t\tnew Filter({ path: \"ID\", operator: FilterOperator.EQ, value1: id }),\n\t];\n}\n\nexport function periodFilter(period: string): Filter {\n\treturn new Filter({ path: \"period\", operator: FilterOperator.EQ, value1: period });\n}\n"],"mappings":"AAAA,gJAGO,SAASA,EAAgBC,GAC/B,OAAO,IAAIC,EAAO,CAAEC,KAAM,QAASC,SAAUC,EAAeC,GAAIC,OAAQN,GACzE,CAEO,SAASO,EAAiBP,EAAmBQ,GACnD,MAAO,CACN,IAAIP,EAAO,CAAEC,KAAM,QAASC,SAAUC,EAAeC,GAAIC,OAAQN,IACjE,IAAIC,EAAO,CAAEC,KAAM,KAAMC,SAAUC,EAAeC,GAAIC,OAAQE,IAEhE,CAEO,SAASC,EAAaC,GAC5B,OAAO,IAAIT,EAAO,CAAEC,KAAM,SAAUC,SAAUC,EAAeC,GAAIC,OAAQI,GAC1E,CAAC,IAAAC,EAAA,CAAAC,WAAA,MAAAD,EAAAZ,kBAAAY,EAAAJ,mBAAAI,EAAAF,eAAA,OAAAE,CAAA","ignoreList":[],"sourceRoot":"model"}},{"offset":{"line":9,"column":0},"map":{"version":3,"names":["ValueColor","sap_m_library","__exports","formatIntegerValue","value","undefined","toFixed","formatNumberValue","formatPercentage","formatPercentageValue","formatLatency","numberValue","Number","formatMemoryUsage","bytes","sizes","i","Math","floor","log","pow","formatThroughput","formatCacheEfficiency","formatUptime","ms","seconds","minutes","hours","days","formatDate","dateString","date","Date","toLocaleString","formatHitRatioWithColor","None","Good","Critical","Error","formatLatencyWithColor","formatErrorRateWithColor","Neutral","getTotalRequests","hits","misses","getTotalOperations","sets","deletes","formatJSON","parsed","JSON","parse","stringify","e","formatKeyName","keyName","maxLength","length","substring","getRelativeTime","now","diffMs","getTime","diffSeconds","diffMinutes","diffHours","diffDays","formatCacheEfficiencyWithColor","formatTruncatedText"],"sources":["formatter.ts"],"sourcesContent":["import { ValueColor } from \"sap/m/library\";\n\n/**\n * Formatter utility for cache statistics dashboard\n */\nexport default {\n\n\tformatIntegerValue(value: number): string {\n\t\tif (value === null || value === undefined || value === 0) {\n\t\t\treturn \"0\";\n\t\t}\n\t\treturn `${value.toFixed(0)}`;\n\t},\n\n\tformatNumberValue(value: number): string {\n\t\tif (value === null || value === undefined || value === 0) {\n\t\t\treturn \"0\";\n\t\t}\n\t\treturn `${value.toFixed(2)}`;\n\t},\n\n\t/**\n\t * Format percentage values\n\t */\n\tformatPercentage(value: number): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn \"0%\";\n\t\t}\n\t\treturn `${(value * 100).toFixed(1)}%`;\n\t},\n\n\tformatPercentageValue(value: number): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn \"0\";\n\t\t}\n\t\treturn `${(value * 100).toFixed(1)}`;\n\t},\n\n\t/**\n\t * Format latency values in milliseconds\n\t */\n\tformatLatency(value: string): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn \"0ms\";\n\t\t}\n\t\t// Make sure value is a number\n\t\tconst numberValue = Number(value);\n\n\t\tif (numberValue < 1) {\n\t\t\treturn `${(numberValue * 1000).toFixed(2)}μs`;\n\t\t}\n\t\treturn `${numberValue.toFixed(2)}ms`;\n\t},\n\n\t/**\n\t * Format memory usage in human readable format\n\t */\n\tformatMemoryUsage(bytes: number): string {\n\t\tif (bytes === null || bytes === undefined) {\n\t\t\treturn \"0 B\";\n\t\t}\n\t\tconst sizes = ['B', 'KB', 'MB', 'GB'];\n\t\tconst i = Math.floor(Math.log(bytes) / Math.log(1024));\n\t\treturn `${(bytes / Math.pow(1024, i)).toFixed(2)} ${sizes[i]}`;\n\t},\n\n\t/**\n\t * Format throughput (requests per second)\n\t */\n\tformatThroughput(value: number): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn \"0 req/s\";\n\t\t}\n\t\treturn `${value.toFixed(2)} req/s`;\n\t},\n\n\t/**\n\t * Format cache efficiency ratio\n\t */\n\tformatCacheEfficiency(value: number): string {\n\t\tif (value === null || value === undefined || value === 0) {\n\t\t\treturn \"N/A\";\n\t\t}\n\t\tif (value < 1) {\n\t\t\treturn `${(value * 100).toFixed(1)}%`;\n\t\t}\n\t\treturn `${value.toFixed(1)}x`;\n\t},\n\n\t/**\n\t * Format uptime in human readable format\n\t */\n\tformatUptime(ms: number): string {\n\t\tif (ms === null || ms === undefined) {\n\t\t\treturn \"0s\";\n\t\t}\n\t\tconst seconds = Math.floor(ms / 1000);\n\t\tconst minutes = Math.floor(seconds / 60);\n\t\tconst hours = Math.floor(minutes / 60);\n\t\tconst days = Math.floor(hours / 24);\n\n\t\tif (days > 0) {\n\t\t\treturn `${days}d ${hours % 24}h ${minutes % 60}m`;\n\t\t} else if (hours > 0) {\n\t\t\treturn `${hours}h ${minutes % 60}m ${seconds % 60}s`;\n\t\t} else if (minutes > 0) {\n\t\t\treturn `${minutes}m ${seconds % 60}s`;\n\t\t} else {\n\t\t\treturn `${seconds}s`;\n\t\t}\n\t},\n\n\t/**\n\t * Format date for display\n\t */\n\tformatDate(dateString: string): string {\n\t\tif (!dateString) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst date = new Date(dateString);\n\t\treturn date.toLocaleString();\n\t},\n\n\t/**\n\t * Format hit ratio with color indication\n\t */\n\tformatHitRatioWithColor(value: number): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn ValueColor.None;\n\t\t}\n\n\t\tif (value >= 0.9) {\n\t\t\treturn ValueColor.Good;\n\t\t} else if (value >= 0.7) {\n\t\t\treturn ValueColor.Critical;\n\t\t} else {\n\t\t\treturn ValueColor.Error;\n\t\t}\n\t},\n\n\t/**\n\t * Format latency with color indication\n\t */\n\tformatLatencyWithColor(value: number): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn ValueColor.None;\n\t\t}\n\n\t\tif (value <= 10) {\n\t\t\treturn ValueColor.Good;\n\t\t} else if (value <= 50) {\n\t\t\treturn ValueColor.Critical;\n\t\t} else {\n\t\t\treturn ValueColor.Error;\n\t\t}\n\t},\n\n\t/**\n\t * Format error rate with color indication\n\t */\n\tformatErrorRateWithColor(value: number): string {\n\t\tif (value <= 0.01) {\n\t\t\treturn ValueColor.Good;\n\t\t} else if (value <= 0.05) {\n\t\t\treturn ValueColor.Critical;\n\t\t} else if (value <= 0.1) {\n\t\t\treturn ValueColor.Error;\n\t\t} else {\n\t\t\treturn ValueColor.Neutral;\n\t\t}\n\t},\n\n\t/**\n\t * Get total requests (hits + misses)\n\t */\n\tgetTotalRequests(hits: number, misses: number): number {\n\t\treturn (hits || 0) + (misses || 0);\n\t},\n\n\t/**\n\t * Get total operations (hits + misses + sets + deletes)\n\t */\n\tgetTotalOperations(hits: number, misses: number, sets: number, deletes: number): number {\n\t\treturn (hits || 0) + (misses || 0) + (sets || 0) + (deletes || 0);\n\t},\n\n\t/**\n\t * Format JSON for display\n\t */\n\tformatJSON(value: any): string {\n\t\tif (!value) {\n\t\t\treturn \"\";\n\t\t}\n\t\ttry {\n\t\t\tif (typeof value === 'string') {\n\t\t\t\t// Try to parse and format if it's a JSON string\n\t\t\t\tconst parsed = JSON.parse(value);\n\t\t\t\treturn JSON.stringify(parsed, null, 2);\n\t\t\t} else {\n\t\t\t\t// Format if it's already an object\n\t\t\t\treturn JSON.stringify(value, null, 2);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// Return as-is if it's not valid JSON\n\t\t\treturn value;\n\t\t}\n\t},\n\n\t/**\n\t * Format key name for display (truncate if too long)\n\t */\n\tformatKeyName(keyName: string, maxLength: number = 30): string {\n\t\tif (!keyName) {\n\t\t\treturn \"\";\n\t\t}\n\t\tif (keyName.length <= maxLength) {\n\t\t\treturn keyName;\n\t\t}\n\t\treturn keyName.substring(0, maxLength - 3) + \"...\";\n\t},\n\n\t/**\n\t * Get relative time since last access\n\t */\n\tgetRelativeTime(dateString: string): string {\n\t\tif (!dateString) {\n\t\t\treturn \"Never\";\n\t\t}\n\t\tconst date = new Date(dateString);\n\t\tconst now = new Date();\n\t\tconst diffMs = now.getTime() - date.getTime();\n\t\tconst diffSeconds = Math.floor(diffMs / 1000);\n\t\tconst diffMinutes = Math.floor(diffSeconds / 60);\n\t\tconst diffHours = Math.floor(diffMinutes / 60);\n\t\tconst diffDays = Math.floor(diffHours / 24);\n\n\t\tif (diffDays > 0) {\n\t\t\treturn `${diffDays} day${diffDays > 1 ? 's' : ''} ago`;\n\t\t} else if (diffHours > 0) {\n\t\t\treturn `${diffHours} hour${diffHours > 1 ? 's' : ''} ago`;\n\t\t} else if (diffMinutes > 0) {\n\t\t\treturn `${diffMinutes} minute${diffMinutes > 1 ? 's' : ''} ago`;\n\t\t} else {\n\t\t\treturn `${diffSeconds} second${diffSeconds > 1 ? 's' : ''} ago`;\n\t\t}\n\t},\n\n\t/**\n\t * Format cache efficiency with color indication\n\t */\n\tformatCacheEfficiencyWithColor(value: number): string {\n\t\tif (value === null || value === undefined) {\n\t\t\treturn ValueColor.None;\n\t\t}\n\n\t\tif (value > 5) {\n\t\t\treturn ValueColor.Good;\n\t\t} else if (value >= 3) {\n\t\t\treturn ValueColor.Critical;\n\t\t} else {\n\t\t\treturn ValueColor.Error;\n\t\t}\n\t},\n\n\tformatTruncatedText(value: string, maxLength: number = 50): string {\n\t\tif (!value) {\n\t\t\treturn \"\";\n\t\t}\n\t\tif (value.length <= maxLength) {\n\t\t\treturn value;\n\t\t}\n\t\treturn value.substring(0, maxLength) + \"...\";\n\t}\n};\n"],"mappings":"AAAA,kHAASA,EAAUC,EAAA,cAEnB,IAAAC,EAGe,CAEdC,mBAAmBC,GAClB,GAAIA,IAAU,MAAQA,IAAUC,WAAaD,IAAU,EAAG,CACzD,MAAO,GACR,CACA,MAAO,GAAGA,EAAME,QAAQ,IACzB,EAEAC,kBAAkBH,GACjB,GAAIA,IAAU,MAAQA,IAAUC,WAAaD,IAAU,EAAG,CACzD,MAAO,GACR,CACA,MAAO,GAAGA,EAAME,QAAQ,IACzB,EAKAE,iBAAiBJ,GAChB,GAAIA,IAAU,MAAQA,IAAUC,UAAW,CAC1C,MAAO,IACR,CACA,MAAO,IAAID,EAAQ,KAAKE,QAAQ,KACjC,EAEAG,sBAAsBL,GACrB,GAAIA,IAAU,MAAQA,IAAUC,UAAW,CAC1C,MAAO,GACR,CACA,MAAO,IAAID,EAAQ,KAAKE,QAAQ,IACjC,EAKAI,cAAcN,GACb,GAAIA,IAAU,MAAQA,IAAUC,UAAW,CAC1C,MAAO,KACR,CAEA,MAAMM,EAAcC,OAAOR,GAE3B,GAAIO,EAAc,EAAG,CACpB,MAAO,IAAIA,EAAc,KAAML,QAAQ,MACxC,CACA,MAAO,GAAGK,EAAYL,QAAQ,MAC/B,EAKAO,kBAAkBC,GACjB,GAAIA,IAAU,MAAQA,IAAUT,UAAW,CAC1C,MAAO,KACR,CACA,MAAMU,EAAQ,CAAC,IAAK,KAAM,KAAM,MAChC,MAAMC,EAAIC,KAAKC,MAAMD,KAAKE,IAAIL,GAASG,KAAKE,IAAI,OAChD,MAAO,IAAIL,EAAQG,KAAKG,IAAI,KAAMJ,IAAIV,QAAQ,MAAMS,EAAMC,IAC3D,EAKAK,iB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AKC,MAAM8C,EAAc,IAC3C,MAAME,EAAWjD,KAAKC,MAAM+C,EAAY,IAExC,GAAIC,EAAW,EAAG,CACjB,MAAO,GAAGA,QAAeA,EAAW,EAAI,IAAM,QAC/C,MAAO,GAAID,EAAY,EAAG,CACzB,MAAO,GAAGA,SAAiBA,EAAY,EAAI,IAAM,QAClD,MAAO,GAAID,EAAc,EAAG,CAC3B,MAAO,GAAGA,WAAqBA,EAAc,EAAI,IAAM,QACxD,KAAO,CACN,MAAO,GAAGD,WAAqBA,EAAc,EAAI,IAAM,QACxD,CACD,EAKAI,+BAA+B/D,GAC9B,GAAIA,IAAU,MAAQA,IAAUC,UAAW,CAC1C,OAAOL,EAAWmC,IACnB,CAEA,GAAI/B,EAAQ,EAAG,CACd,OAAOJ,EAAWoC,IACnB,MAAO,GAAIhC,GAAS,EAAG,CACtB,OAAOJ,EAAWqC,QACnB,KAAO,CACN,OAAOrC,EAAWsC,KACnB,CACD,EAEA8B,oBAAoBhE,EAAeoD,EAAoB,IACtD,IAAKpD,EAAO,CACX,MAAO,EACR,CACA,GAAIA,EAAMqD,QAAUD,EAAW,CAC9B,OAAOpD,CACR,CACA,OAAOA,EAAMsD,UAAU,EAAGF,GAAa,KACxC,GACA,OAAAtD,CAAA","ignoreList":[],"sourceRoot":"model"}},{"offset":{"line":10,"column":0},"map":{"version":3,"names":["createDeviceModel","model","JSONModel","Device","setDefaultBindingMode","BindingMode","OneWay","__exports"],"sources":["models.ts"],"sourcesContent":["import JSONModel from \"sap/ui/model/json/JSONModel\";\nimport BindingMode from \"sap/ui/model/BindingMode\";\n\nimport Device from \"sap/ui/Device\";\n\n\nexport default {\n\tcreateDeviceModel: () => {\n\t\tconst model = new JSONModel(Device);\n\t\tmodel.setDefaultBindingMode(BindingMode.OneWay);\n\t\treturn model;\n\t}\n};\n"],"mappings":"AAAA,4KAMe,CACdA,kBAAmBA,KAClB,MAAMC,EAAQ,IAAIC,EAAUC,GAC5BF,EAAMG,sBAAsBC,EAAYC,QACxC,OAAOL,IAER,OAAAM,CAAA","ignoreList":[],"sourceRoot":"model"}},{"offset":{"line":11,"column":0},"map":{"version":3,"names":["cacheAndIdFilter","___model_filters","cacheNameFilter","periodFilter","CacheStatisticsService","constructor","model","this","ODataModel","serviceUrl","autoExpandSelect","groupId","getModel","getCurrentMetrics","cacheName","binding","bindList","undefined","Sorter","path","descending","data","requestContexts","results","map","item","getObject","length","transformStatistics","error","console","MessageBox","getHistoricalMetrics","period","from","to","filters","push","Filter","operator","FilterOperator","GE","value1","LE","getTopKeys","getColdKeys","persistStatistics","context","bindContext","invoke","hits","misses","sets","deletes","errors","avgLatency","p95Latency","p99Latency","minLatency","maxLatency","avgHitLatency","p95HitLatency","p99HitLatency","minHitLatency","maxHitLatency","avgMissLatency","p95MissLatency","p99MissLatency","minMissLatency","maxMissLatency","avgSetLatency","avgDeleteLatency","memoryUsage","itemCount","hitRatio","throughput","errorRate","cacheEfficiency","uptimeMs","uniqueKeys","topKeys","coldKeys","lastPersisted","Date","toISOString","getAvailableMetrics","getMetricById","metricId","setMetricsEnabled","enabled","setParameter","setKeyMetricsEnabled"],"sources":["CacheStatisticsService.ts"],"sourcesContent":["import MessageBox from \"sap/m/MessageBox\";\nimport ODataModel from \"sap/ui/model/odata/v4/ODataModel\";\nimport Filter from \"sap/ui/model/Filter\";\nimport FilterOperator from \"sap/ui/model/FilterOperator\";\nimport Sorter from \"sap/ui/model/Sorter\";\nimport Context from \"sap/ui/model/odata/v4/Context\";\nimport { cacheAndIdFilter, cacheNameFilter, periodFilter } from \"../model/filters\";\n\nexport interface CacheStatistics {\n hits: number;\n misses: number;\n sets: number;\n deletes: number;\n errors: number;\n\n // Overall latency metrics\n avgLatency: number;\n p95Latency: number;\n p99Latency: number;\n minLatency: number;\n maxLatency: number;\n\n // Hit-specific latency metrics\n avgHitLatency: number;\n p95HitLatency: number;\n p99HitLatency: number;\n minHitLatency: number;\n maxHitLatency: number;\n\n // Miss-specific latency metrics\n avgMissLatency: number;\n p95MissLatency: number;\n p99MissLatency: number;\n minMissLatency: number;\n maxMissLatency: number;\n\n // Set/Delete latency metrics\n avgSetLatency: number;\n avgDeleteLatency: number;\n\n // Performance metrics\n memoryUsage: number;\n itemCount: number;\n hitRatio: number;\n throughput: number;\n errorRate: number;\n cacheEfficiency: number;\n uptimeMs: number;\n uniqueKeys: number;\n topKeys: KeyAccess[];\n coldKeys: KeyAccess[];\n lastPersisted: string;\n}\n\nexport interface KeyAccess {\n keyName: string;\n hits: number;\n misses: number;\n sets: number;\n deletes: number;\n total: number;\n lastAccess: string;\n dataType: string;\n serviceName: string;\n entityName: string;\n operation: string;\n metadata: string;\n}\n\nexport interface HistoricalStatistics {\n ID: string;\n cache: string;\n timestamp: string;\n period: string;\n\n hits: number;\n misses: number;\n sets: number;\n deletes: number;\n errors: number;\n totalRequests: number;\n\n avgHitLatency: number;\n p95HitLatency: number;\n p99HitLatency: number;\n minHitLatency: number;\n maxHitLatency: number;\n avgMissLatency: number;\n p95MissLatency: number;\n p99MissLatency: number;\n minMissLatency: number;\n maxMissLatency: number;\n avgSetLatency: number;\n avgDeleteLatency: number;\n\n hitRatio: number;\n throughput: number;\n errorRate: number;\n cacheEfficiency: number;\n\n nativeSets: number;\n nativeGets: number;\n nativeDeletes: number;\n nativeClears: number;\n nativeDeleteByTags: number;\n nativeErrors: number;\n totalNativeOperations: number;\n\n nativeThroughput: number;\n nativeErrorRate: number;\n\n memoryUsage: number;\n itemCount: number;\n uptimeMs: number;\n}\n\n/**\n * Service class for interacting with the Cache Statistics API using OData V4\n */\nexport default class CacheStatisticsService {\n private model: ODataModel;\n\n constructor(model?: ODataModel) {\n this.model = model || new ODataModel({\n serviceUrl: \"/odata/v4/caching-api/\",\n autoExpandSelect: true,\n groupId: \"$auto\"\n });\n }\n\n getModel(): ODataModel {\n return this.model;\n }\n\n async getCurrentMetrics(cacheName: string): Promise<CacheStatistics | null> {\n try {\n const binding = this.model.bindList(\n \"/Metrics\",\n undefined,\n [new Sorter({ path: \"timestamp\", descending: true })],\n [periodFilter(\"hourly\"), cacheNameFilter(cacheName)]\n );\n\n const data = await binding.requestContexts();\n const results = data.map((item: Context) => item.getObject());\n\n if (results.length > 0) {\n return this.transformStatistics(results[0]);\n }\n return null;\n } catch (error) {\n console.error(\"Error fetching current metrics:\", error);\n MessageBox.error(\"Failed to load current metrics\");\n return null;\n }\n }\n\n async getHistoricalMetrics(cacheName: string, period: string = \"hourly\", from?: string, to?: string): Promise<HistoricalStatistics[]> {\n try {\n const filters: Filter[] = [periodFilter(period), cacheNameFilter(cacheName)];\n if (from) {\n filters.push(new Filter({ path: \"timestamp\", operator: FilterOperator.GE, value1: from }));\n }\n if (to) {\n filters.push(new Filter({ path: \"timestamp\", operator: FilterOperator.LE, value1: to }));\n }\n\n const binding = this.model.bindList(\n \"/Metrics\",\n undefined,\n [new Sorter({ path: \"timestamp\", descending: true })],\n filters\n );\n\n const data = await binding.requestContexts();\n return data.map((item: Context) => item.getObject());\n } catch (error) {\n console.error(\"Error fetching historical metrics:\", error);\n MessageBox.error(\"Failed to load historical metrics\");\n return [];\n }\n }\n\n async getTopKeys(cacheName: string): Promise<KeyAccess[]> {\n try {\n const binding = this.model.bindList(\n \"/KeyMetrics\",\n undefined,\n [new Sorter({ path: \"totalRequests\", descending: true })],\n [periodFilter(\"current\"), cacheNameFilter(cacheName)]\n );\n\n const data = await binding.requestContexts();\n return data.map((item: Context) => item.getObject());\n } catch (error) {\n console.error(\"Error fetching top keys:\", error);\n MessageBox.error(\"Failed to load top keys\");\n return [];\n }\n }\n\n async getColdKeys(cacheName: string): Promise<KeyAccess[]> {\n try {\n const binding = this.model.bindList(\n \"/KeyMetrics\",\n undefined,\n [new Sorter({ path: \"lastAccess\", descending: false })],\n [periodFilter(\"current\"), cacheNameFilter(cacheName)]\n );\n\n const data = await binding.requestContexts();\n return data.map((item: Context) => item.getObject());\n } catch (error) {\n console.error(\"Error fetching cold keys:\", error);\n MessageBox.error(\"Failed to load cold keys\");\n return [];\n }\n }\n\n async persistStatistics(): Promise<boolean> {\n try {\n const context = this.model.bindContext(\"/persistStatistics(...)\");\n await context.invoke();\n return true;\n } catch (error) {\n console.error(\"Error persisting statistics:\", error);\n MessageBox.error(\"Failed to persist statistics\");\n return false;\n }\n }\n\n private transformStatistics(data: Record<string, unknown>): CacheStatistics {\n return {\n hits: (data.hits as number) || 0,\n misses: (data.misses as number) || 0,\n sets: (data.sets as number) || 0,\n deletes: (data.deletes as number) || 0,\n errors: (data.errors as number) || 0,\n\n avgLatency: (data.avgLatency as number) || 0,\n p95Latency: (data.p95Latency as number) || 0,\n p99Latency: (data.p99Latency as number) || 0,\n minLatency: (data.minLatency as number) || 0,\n maxLatency: (data.maxLatency as number) || 0,\n\n avgHitLatency: (data.avgHitLatency as number) || 0,\n p95HitLatency: (data.p95HitLatency as number) || 0,\n p99HitLatency: (data.p99HitLatency as number) || 0,\n minHitLatency: (data.minHitLatency as number) || 0,\n maxHitLatency: (data.maxHitLatency as number) || 0,\n\n avgMissLatency: (data.avgMissLatency as number) || 0,\n p95MissLatency: (data.p95MissLatency as number) || 0,\n p99MissLatency: (data.p99MissLatency as number) || 0,\n minMissLatency: (data.minMissLatency as number) || 0,\n maxMissLatency: (data.maxMissLatency as number) || 0,\n\n avgSetLatency: (data.avgSetLatency as number) || 0,\n avgDeleteLatency: (data.avgDeleteLatency as number) || 0,\n\n memoryUsage: (data.memoryUsage as number) || 0,\n itemCount: (data.itemCount as number) || 0,\n hitRatio: (data.hitRatio as number) || 0,\n throughput: (data.throughput as number) || 0,\n errorRate: (data.errorRate as number) || 0,\n cacheEfficiency: (data.cacheEfficiency as number) || 0,\n uptimeMs: (data.uptimeMs as number) || 0,\n uniqueKeys: 0,\n topKeys: [],\n coldKeys: [],\n lastPersisted: (data.lastPersisted as string) || new Date().toISOString()\n };\n }\n\n async getAvailableMetrics(cacheName: string): Promise<Record<string, unknown>[]> {\n try {\n const binding = this.model.bindList(\n \"/Metrics\",\n undefined,\n [new Sorter({ path: \"timestamp\", descending: true })],\n [cacheNameFilter(cacheName)]\n );\n\n const data = await binding.requestContexts();\n return data.map((item: Context) => item.getObject());\n } catch (error) {\n console.error(\"Error fetching available metrics:\", error);\n MessageBox.error(\"Failed to load available metrics\");\n return [];\n }\n }\n\n async getMetricById(cacheName: string, metricId: string): Promise<CacheStatistics | null> {\n try {\n const binding = this.model.bindList(\n \"/Metrics\",\n undefined,\n undefined,\n cacheAndIdFilter(cacheName, metricId)\n );\n\n const data = await binding.requestContexts();\n const results = data.map((item: Context) => item.getObject());\n\n if (results.length > 0) {\n return this.transformStatistics(results[0]);\n }\n return null;\n } catch (error) {\n console.error(\"Error fetching metric by ID:\", error);\n MessageBox.error(\"Failed to load metric\");\n return null;\n }\n }\n\n async setMetricsEnabled(cacheName: string, enabled: boolean): Promise<boolean> {\n try {\n const context = this.model.bindContext(\"/setMetricsEnabled(...)\");\n context.setParameter(\"cache\", cacheName);\n context.setParameter(\"enabled\", enabled);\n await context.invoke();\n return true;\n } catch (error) {\n console.error(\"Error setting metrics enabled:\", error);\n MessageBox.error(\"Failed to update metrics configuration\");\n return false;\n }\n }\n\n async setKeyMetricsEnabled(cacheName: string, enabled: boolean): Promise<boolean> {\n try {\n const context = this.model.bindContext(\"/setKeyMetricsEnabled(...)\");\n context.setParameter(\"cache\", cacheName);\n context.setParameter(\"enabled\", enabled);\n await context.invoke();\n return true;\n } catch (error) {\n console.error(\"Error setting key metrics enabled:\", error);\n MessageBox.error(\"Failed to update key metrics configuration\");\n return false;\n }\n }\n}\n"],"mappings":"AAAA,8QAMSA,EAAgBC,EAAA,0BAAEC,EAAeD,EAAA,yBAAEE,EAAYF,EAAA,gBAiHzC,MAAMG,EAGjBC,YAAYC,GACRC,KAAKD,MAAQA,GAAS,IAAIE,EAAW,CACjCC,WAAY,yBACZC,iBAAkB,KAClBC,QAAS,SAEjB,CAEAC,WACI,OAAOL,KAAKD,KAChB,CAEA,uBAAMO,CAAkBC,GACpB,IACI,MAAMC,EAAUR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AAa,QAAS5E,GAC9BiC,EAAQ2C,aAAa,UAAWD,SAC1B1C,EAAQE,SACd,OAAO,IACX,CAAE,MAAOpB,GACLC,QAAQD,MAAM,iCAAkCA,GAChDE,EAAWF,MAAM,0CACjB,OAAO,KACX,CACJ,CAEA,0BAAM8D,CAAqB7E,EAAmB2E,GAC1C,IACI,MAAM1C,EAAUxC,KAAKD,MAAM0C,YAAY,8BACvCD,EAAQ2C,aAAa,QAAS5E,GAC9BiC,EAAQ2C,aAAa,UAAWD,SAC1B1C,EAAQE,SACd,OAAO,IACX,CAAE,MAAOpB,GACLC,QAAQD,MAAM,qCAAsCA,GACpDE,EAAWF,MAAM,8CACjB,OAAO,KACX,CACJ,EACH,OAAAzB,CAAA","ignoreList":[],"sourceRoot":"service"}},{"offset":{"line":12,"column":0},"map":{"version":3,"names":[],"sources":["Component-preload.js?bundle-code-0"],"mappings":"AAAA;AACA","sourcesContent":["sap.ui.require.preload({\n"],"sourceRoot":""}}]}
@@ -11,7 +11,7 @@
11
11
 
12
12
  <script
13
13
  id="sap-ui-bootstrap"
14
- src="https://ui5.sap.com/1.136.1/resources/sap-ui-core.js"
14
+ src="https://ui5.sap.com/1.148.10/resources/sap-ui-core.js"
15
15
  data-sap-ui-resource-roots='{
16
16
  "cds.plugin.caching.dashboard": "./"
17
17
  }'
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dataSources": {
17
17
  "caching": {
18
- "uri": "/odata/v4/caching/",
18
+ "uri": "/odata/v4/caching-api/",
19
19
  "type": "OData",
20
20
  "settings": {
21
21
  "odataVersion": "4.0"
@@ -39,7 +39,7 @@
39
39
  "id": "app"
40
40
  },
41
41
  "dependencies": {
42
- "minUI5Version": "1.136.1",
42
+ "minUI5Version": "1.148.10",
43
43
  "libs": {
44
44
  "sap.ui.core": {},
45
45
  "sap.m": {},
@@ -75,8 +75,8 @@
75
75
  },
76
76
  "": {
77
77
  "type": "sap.ui.model.odata.v4.ODataModel",
78
+ "dataSource": "caching",
78
79
  "settings": {
79
- "serviceUrl": "/odata/v4/caching-api/",
80
80
  "operationMode": "Server",
81
81
  "autoExpandSelect": true,
82
82
  "groupId": "$auto"
@@ -10,7 +10,7 @@ sap.ui.define(["sap/m/MessageBox", "sap/ui/model/odata/v4/ODataModel", "sap/ui/m
10
10
  class CacheStatisticsService {
11
11
  constructor(model) {
12
12
  this.model = model || new ODataModel({
13
- serviceUrl: "/odata/v4/caching/",
13
+ serviceUrl: "/odata/v4/caching-api/",
14
14
  autoExpandSelect: true,
15
15
  groupId: "$auto"
16
16
  });