cds-caching 1.3.1 → 1.3.2

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.
Files changed (32) hide show
  1. package/README.md +16 -0
  2. package/app/dashboard/controller/App-dbg.controller.js +14 -14
  3. package/app/dashboard/controller/App-dbg.controller.js.map +1 -1
  4. package/app/dashboard/controller/App.controller.js +1 -1
  5. package/app/dashboard/controller/App.controller.js.map +1 -1
  6. package/app/dashboard/controller/App.controller.ts +14 -14
  7. package/app/dashboard/controller/BaseController-dbg.js +7 -0
  8. package/app/dashboard/controller/BaseController-dbg.js.map +1 -1
  9. package/app/dashboard/controller/BaseController.js +1 -1
  10. package/app/dashboard/controller/BaseController.js.map +1 -1
  11. package/app/dashboard/controller/BaseController.ts +10 -0
  12. package/app/dashboard/controller/Cache-dbg.controller.js +34 -25
  13. package/app/dashboard/controller/Cache-dbg.controller.js.map +1 -1
  14. package/app/dashboard/controller/Cache.controller.js +1 -1
  15. package/app/dashboard/controller/Cache.controller.js.map +1 -1
  16. package/app/dashboard/controller/Cache.controller.ts +36 -25
  17. package/app/dashboard/controller/SingleMetric-dbg.controller.js +56 -50
  18. package/app/dashboard/controller/SingleMetric-dbg.controller.js.map +1 -1
  19. package/app/dashboard/controller/SingleMetric.controller.js +1 -1
  20. package/app/dashboard/controller/SingleMetric.controller.js.map +1 -1
  21. package/app/dashboard/controller/SingleMetric.controller.ts +29 -22
  22. package/app/dashboard/i18n/i18n.properties +235 -0
  23. package/app/dashboard/i18n/i18n_de.properties +271 -3
  24. package/app/dashboard/i18n/i18n_en.properties +295 -2
  25. package/app/dashboard/resources/sap-ui-custom.js +11 -11
  26. package/app/dashboard/resources/sap-ui-custom.js.map +1 -1
  27. package/app/dashboard/view/Cache.view.xml +149 -149
  28. package/app/dashboard/view/Main.view.xml +7 -7
  29. package/app/dashboard/view/SingleMetric.view.xml +30 -30
  30. package/cds-plugin.js +31 -8
  31. package/lib/util.js +28 -2
  32. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SingleMetric.controller.js","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","getModel","loadMetric","formatChart","async","_loadMetric","cacheName","model","context","bindContext","metric","requestObject","generateLatencyChartData","generateCacheThroughChartData","generateNativeChartData","MessageBox","error","console","_generateLatencyChartData","operation","latency","avgReadThroughLatency","_generateCacheThroughChartData","count","_generateNativeChartData","_formatChart","latencyChart","byId","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 ODataModel from \"sap/ui/model/odata/v4/ODataModel\";\nimport { Route$PatternMatchedEvent } from \"sap/ui/core/routing/Route\";\nimport MessageBox from \"sap/m/MessageBox\";\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 // Create a JSON model for UI data binding\n this.uiModel = new JSONModel({\n metricId: \"\",\n // Performance metrics\n hitRatio: 0,\n cacheEfficiency: 0,\n throughput: 0,\n errorRate: 0,\n // Latency metrics\n avgLatency: 0,\n avgHitLatency: 0,\n avgMissLatency: 0,\n // Operation counts\n hits: 0,\n misses: 0,\n sets: 0,\n deletes: 0,\n errors: 0,\n // Native function metrics\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 // System information\n memoryUsage: 0,\n itemCount: 0,\n uniqueKeys: 0,\n uptimeMs: 0,\n // Chart data\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\n // Set layout to three columns\n (<JSONModel>this.getModel(\"app\")).setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n\n // Load the specific metric\n this.loadMetric(cache, metricId);\n\n this.formatChart();\n }\n\n /**\n * Load specific metric data\n */\n private async loadMetric(cacheName: string, metricId: string): Promise<void> {\n try {\n const model = this.getModel() as ODataModel;\n\n // Try to get the metric from the Metrics entity\n const context = model.bindContext(`/Metrics(ID='${metricId}',cache='${cacheName}')`);\n const metric = await context.requestObject();\n\n if (metric) {\n // Set all the metric values\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 // Latency metrics\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 // Operation counts\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 // Native function metrics\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 // System information\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\n // Calculate unique keys (this might need to come from a different source)\n this.uiModel.setProperty(\"/uniqueKeys\", 0); // TODO: Get from key metrics data\n\n // Generate chart data\n this.generateLatencyChartData(metric);\n this.generateCacheThroughChartData(metric);\n this.generateNativeChartData(metric);\n\n } else {\n MessageBox.error(\"Metric not found\");\n }\n\n } catch (error) {\n console.error(\"Error loading metric:\", error);\n MessageBox.error(\"Failed to load metric details\");\n }\n }\n\n /**\n * Generate latency data for the chart\n */\n private generateLatencyChartData(metric: any): void {\n const latencyData = [\n {\n operation: \"Average Hit Latency\",\n latency: metric.avgHitLatency || 0\n },\n {\n operation: \"Average Miss Latency\",\n latency: metric.avgMissLatency || 0\n },\n {\n operation: \"Average Read-Through Latency\",\n latency: metric.avgReadThroughLatency || 0\n }\n ];\n\n this.uiModel.setProperty(\"/latencyData\", latencyData);\n }\n\n /**\n * Generate Read-Through operations data for pie chart\n */\n private generateCacheThroughChartData(metric: any): void {\n const cacheThroughData = [\n {\n operation: \"Hits\",\n count: metric.hits || 0\n },\n {\n operation: \"Misses\",\n count: metric.misses || 0\n },\n {\n operation: \"Errors\",\n count: metric.errors || 0\n }\n ];\n\n this.uiModel.setProperty(\"/cacheThroughData\", cacheThroughData);\n }\n\n /**\n * Generate Native Function operations data for pie chart\n */\n private generateNativeChartData(metric: any): void {\n const nativeData = [\n {\n operation: \"Sets\",\n count: metric.nativeSets || 0\n },\n {\n operation: \"Gets\",\n count: metric.nativeGets || 0\n },\n {\n operation: \"Deletes\",\n count: metric.nativeDeletes || 0\n },\n {\n operation: \"Clears\",\n count: metric.nativeClears || 0\n },\n {\n operation: \"Delete By Tags\",\n count: metric.nativeDeleteByTags || 0\n },\n {\n operation: \"Errors\",\n count: metric.nativeErrors || 0\n }\n ];\n\n this.uiModel.setProperty(\"/nativeData\", nativeData);\n }\n\n public formatChart() {\n // Format latency chart (bar chart)\n const latencyChart = this.getView().byId(\"metricLatencyChart\") as any;\n if (latencyChart) {\n latencyChart.setVizProperties({\n legend: {\n visible: false\n },\n plotArea: {\n dataLabel: {\n visible: true,\n formatString: \"#,## ms\"\n },\n gridline: {\n visible: false\n }\n },\n valueAxis: {\n axisLine: {\n visible: false\n },\n axisTick: {\n visible: false\n },\n label: {\n visible: false\n },\n title: {\n visible: false\n }\n },\n categoryAxis: {\n title: {\n visible: false\n }\n },\n title: {\n visible: false,\n text: 'Latency by Operation'\n }\n });\n }\n\n // Format Read-Through pie chart\n const cacheThroughChart = this.getView().byId(\"metricCacheThroughChart\") as any;\n if (cacheThroughChart) {\n cacheThroughChart.setVizProperties({\n legend: {\n visible: true\n },\n plotArea: {\n dataLabel: {\n visible: true\n }\n },\n title: {\n visible: false\n }\n });\n }\n\n // Format Native Function pie chart\n const nativeChart = this.getView().byId(\"metricNativeChart\") as any;\n if (nativeChart) {\n nativeChart.setVizProperties({\n legend: {\n visible: true\n },\n plotArea: {\n dataLabel: {\n visible: true\n }\n },\n title: {\n visible: false\n }\n });\n }\n }\n\n /**\n * Handle refresh button press\n */\n public onRefresh(): void {\n const cacheName = this.getModel(\"app\").getProperty(\"/selectedCache\");\n const metricId = this.uiModel.getProperty(\"/metricId\");\n\n if (cacheName && metricId) {\n this.loadMetric(cacheName, metricId);\n }\n }\n\n /**\n * Handle full screen mode\n */\n public handleFullScreen(): void {\n (<JSONModel>this.getModel(\"app\")).setProperty(\"/layout\", \"EndColumnFullScreen\");\n }\n\n /**\n * Handle exit full screen mode\n */\n public handleExitFullScreen(): void {\n (<JSONModel>this.getModel(\"app\")).setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n }\n\n /**\n * Handle close end column\n */\n public handleClose(): void {\n (<JSONModel>this.getModel(\"app\")).setProperty(\"/layout\", \"TwoColumnsMidExpanded\");\n this.getRouter().navTo(\"cache\", { cache: this.getModel(\"app\").getProperty(\"/selectedCache\") });\n }\n\n /**\n * Handle grid columns change\n */\n public onColumnsChange(): void {\n // Handle responsive grid column changes if needed\n }\n} "],"mappings":"wMAAOA,EAAcC,EAAAC,GAMrB,MAGqBC,EAAqBH,EAAcI,OAAA,wDAG7CC,OAAM,SAAAC,IACTC,wBAAAC,MAGAA,KAAKC,QAAU,IAAIC,EAAU,CACzBC,SAAU,GAEVC,SAAU,EACVC,gBAAiB,EACjBC,WAAY,EACZC,UAAW,EAEXC,WAAY,EACZC,cAAe,EACfC,eAAgB,EAEhBC,KAAM,EACNC,OAAQ,EACRC,KAAM,EACNC,QAAS,EACTC,OAAQ,EAERC,WAAY,EACZC,WAAY,EACZC,cAAe,EACfC,aAAc,EACdC,mBAAoB,EACpBC,aAAc,EACdC,sBAAuB,EACvBC,iBAAkB,EAClBC,gBAAiB,EAEjBC,YAAa,EACbC,UAAW,EACXC,WAAY,EACZC,SAAU,EAEVC,YAAa,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,QAAS,OAGjBS,MAAO,CACHT,QAAS,QAGrB,CACJ,EAKOc,UAAS,SAAAC,IACZ,MAAMvC,EAAYhD,KAAK2C,SAAS,OAAO6C,YAAY,kBACnD,MAAMrF,EAAWH,KAAKC,QAAQuF,YAAY,aAE1C,GAAIxC,GAAa7C,EAAU,CACvBH,KAAK4C,WAAWI,EAAW7C,EAC/B,CACJ,EAKOsF,iBAAgB,SAAAC,IACP1F,KAAK2C,SAAS,OAAQD,YAAY,UAAW,sBAC7D,EAKOiD,qBAAoB,SAAAC,IACX5F,KAAK2C,SAAS,OAAQD,YAAY,UAAW,0BAC7D,EAKOmD,YAAW,SAAAC,IACF9F,KAAK2C,SAAS,OAAQD,YAAY,UAAW,yBACzD1C,KAAKkC,YAAY6D,MAAM,QAAS,CAAEvD,MAAOxC,KAAK2C,SAAS,OAAO6C,YAAY,mBAC9E,EAKOQ,gBAAe,SAAAC,IAClB,IACH,OApUgBtG,CAAY","ignoreList":[]}
1
+ {"version":3,"file":"SingleMetric.controller.js","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","getModel","loadMetric","formatChart","async","_loadMetric","cacheName","model","rb","getResourceBundle","context","bindContext","metric","requestObject","generateLatencyChartData","generateCacheThroughChartData","generateNativeChartData","MessageBox","error","i18nText","console","_generateLatencyChartData","t","k","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 ODataModel from \"sap/ui/model/odata/v4/ODataModel\";\nimport { Route$PatternMatchedEvent } from \"sap/ui/core/routing/Route\";\nimport MessageBox from \"sap/m/MessageBox\";\nimport ResourceBundle from \"sap/base/i18n/ResourceBundle\";\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 // Create a JSON model for UI data binding\n this.uiModel = new JSONModel({\n metricId: \"\",\n // Performance metrics\n hitRatio: 0,\n cacheEfficiency: 0,\n throughput: 0,\n errorRate: 0,\n // Latency metrics\n avgLatency: 0,\n avgHitLatency: 0,\n avgMissLatency: 0,\n // Operation counts\n hits: 0,\n misses: 0,\n sets: 0,\n deletes: 0,\n errors: 0,\n // Native function metrics\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 // System information\n memoryUsage: 0,\n itemCount: 0,\n uniqueKeys: 0,\n uptimeMs: 0,\n // Chart data\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\n // Set layout to three columns\n (<JSONModel>this.getModel(\"app\")).setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n\n // Load the specific metric\n this.loadMetric(cache, metricId);\n\n this.formatChart();\n }\n\n /**\n * Load specific metric data\n */\n private async loadMetric(cacheName: string, metricId: string): Promise<void> {\n try {\n const model = this.getModel() as ODataModel;\n const rb = await this.getResourceBundle();\n\n // Try to get the metric from the Metrics entity\n const context = model.bindContext(`/Metrics(ID='${metricId}',cache='${cacheName}')`);\n const metric = await context.requestObject();\n\n if (metric) {\n // Set all the metric values\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 // Latency metrics\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 // Operation counts\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 // Native function metrics\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 // System information\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\n // Calculate unique keys (this might need to come from a different source)\n this.uiModel.setProperty(\"/uniqueKeys\", 0); // TODO: Get from key metrics data\n\n // Generate chart data\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 /**\n * Generate latency data for the chart\n */\n private generateLatencyChartData(metric: any, rb: ResourceBundle): void {\n const t = (k: string) => rb.getText(k);\n const latencyData = [\n {\n operation: t(\"chartOpAvgHitLatency\"),\n latency: metric.avgHitLatency || 0\n },\n {\n operation: t(\"chartOpAvgMissLatency\"),\n latency: metric.avgMissLatency || 0\n },\n {\n operation: t(\"chartOpAvgReadThroughLatency\"),\n latency: metric.avgReadThroughLatency || 0\n }\n ];\n\n this.uiModel.setProperty(\"/latencyData\", latencyData);\n }\n\n /**\n * Generate Read-Through operations data for pie chart\n */\n private generateCacheThroughChartData(metric: any, rb: ResourceBundle): void {\n const t = (k: string) => rb.getText(k);\n const cacheThroughData = [\n {\n operation: t(\"chartOpHits\"),\n count: metric.hits || 0\n },\n {\n operation: t(\"chartOpMisses\"),\n count: metric.misses || 0\n },\n {\n operation: t(\"chartOpErrors\"),\n count: metric.errors || 0\n }\n ];\n\n this.uiModel.setProperty(\"/cacheThroughData\", cacheThroughData);\n }\n\n /**\n * Generate Native Function operations data for pie chart\n */\n private generateNativeChartData(metric: any, rb: ResourceBundle): void {\n const t = (k: string) => rb.getText(k);\n const nativeData = [\n {\n operation: t(\"chartOpSets\"),\n count: metric.nativeSets || 0\n },\n {\n operation: t(\"chartOpGets\"),\n count: metric.nativeGets || 0\n },\n {\n operation: t(\"chartOpDeletes\"),\n count: metric.nativeDeletes || 0\n },\n {\n operation: t(\"chartOpClears\"),\n count: metric.nativeClears || 0\n },\n {\n operation: t(\"chartOpDeleteByTags\"),\n count: metric.nativeDeleteByTags || 0\n },\n {\n operation: t(\"chartOpErrors\"),\n count: metric.nativeErrors || 0\n }\n ];\n\n this.uiModel.setProperty(\"/nativeData\", nativeData);\n }\n\n public formatChart() {\n // Format latency chart (bar chart)\n const latencyChart = this.getView().byId(\"metricLatencyChart\") as any;\n if (latencyChart) {\n void this.getResourceBundle().then((rb) => {\n latencyChart.setVizProperties({\n legend: {\n visible: false\n },\n plotArea: {\n dataLabel: {\n visible: true,\n formatString: \"#,## ms\"\n },\n gridline: {\n visible: false\n }\n },\n valueAxis: {\n axisLine: {\n visible: false\n },\n axisTick: {\n visible: false\n },\n label: {\n visible: false\n },\n title: {\n visible: false\n }\n },\n categoryAxis: {\n title: {\n visible: false\n }\n },\n title: {\n visible: false,\n text: rb.getText(\"chartTitleLatencyByOperation\")\n }\n });\n });\n }\n\n // Format Read-Through pie chart\n const cacheThroughChart = this.getView().byId(\"metricCacheThroughChart\") as any;\n if (cacheThroughChart) {\n cacheThroughChart.setVizProperties({\n legend: {\n visible: true\n },\n plotArea: {\n dataLabel: {\n visible: true\n }\n },\n title: {\n visible: false\n }\n });\n }\n\n // Format Native Function pie chart\n const nativeChart = this.getView().byId(\"metricNativeChart\") as any;\n if (nativeChart) {\n nativeChart.setVizProperties({\n legend: {\n visible: true\n },\n plotArea: {\n dataLabel: {\n visible: true\n }\n },\n title: {\n visible: false\n }\n });\n }\n }\n\n /**\n * Handle refresh button press\n */\n public onRefresh(): void {\n const cacheName = this.getModel(\"app\").getProperty(\"/selectedCache\");\n const metricId = this.uiModel.getProperty(\"/metricId\");\n\n if (cacheName && metricId) {\n this.loadMetric(cacheName, metricId);\n }\n }\n\n /**\n * Handle full screen mode\n */\n public handleFullScreen(): void {\n (<JSONModel>this.getModel(\"app\")).setProperty(\"/layout\", \"EndColumnFullScreen\");\n }\n\n /**\n * Handle exit full screen mode\n */\n public handleExitFullScreen(): void {\n (<JSONModel>this.getModel(\"app\")).setProperty(\"/layout\", \"ThreeColumnsEndExpanded\");\n }\n\n /**\n * Handle close end column\n */\n public handleClose(): void {\n (<JSONModel>this.getModel(\"app\")).setProperty(\"/layout\", \"TwoColumnsMidExpanded\");\n this.getRouter().navTo(\"cache\", { cache: this.getModel(\"app\").getProperty(\"/selectedCache\") });\n }\n\n /**\n * Handle grid columns change\n */\n public onColumnsChange(): void {\n // Handle responsive grid column changes if needed\n }\n} "],"mappings":"wMAAOA,EAAcC,EAAAC,GAOrB,MAGqBC,EAAqBH,EAAcI,OAAA,wDAG7CC,OAAM,SAAAC,IACTC,wBAAAC,MAGAA,KAAKC,QAAU,IAAIC,EAAU,CACzBC,SAAU,GAEVC,SAAU,EACVC,gBAAiB,EACjBC,WAAY,EACZC,UAAW,EAEXC,WAAY,EACZC,cAAe,EACfC,eAAgB,EAEhBC,KAAM,EACNC,OAAQ,EACRC,KAAM,EACNC,QAAS,EACTC,OAAQ,EAERC,WAAY,EACZC,WAAY,EACZC,cAAe,EACfC,aAAc,EACdC,mBAAoB,EACpBC,aAAc,EACdC,sBAAuB,EACvBC,iBAAkB,EAClBC,gBAAiB,EAEjBC,YAAa,EACbC,UAAW,EACXC,WAAY,EACZC,SAAU,EAEVC,YAAa,GACbC,iBAAkB,GAClBC,WAAY,KAEhB/B,KAAKgC,UAAUC,SAASjC,KAAKC,QAAS,MAEtCD,KAAKkC,YAAYC,SAAS,gBAAgBC,qBAAqBpC,KAAKqC,eAAgBrC,KACxF,EAEOqC,eAAc,SAAAC,EAACC,GAClB,MAAMC,MAAEA,EAAKrC,SAAEA,GAAaoC,EAAME,aAAa,aAE/CzC,KAAKC,QAAQyC,YAAY,YAAavC,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AMa,EAAc5F,KAAKgC,UAAU2C,KAAK,qBACxC,GAAIiB,EAAa,CACbA,EAAYf,iBAAiB,CACzBC,OAAQ,CACJC,QAAS,MAEbC,SAAU,CACNC,UAAW,CACPF,QAAS,OAGjBS,MAAO,CACHT,QAAS,QAGrB,CACJ,EAKOc,UAAS,SAAAC,IACZ,MAAM9C,EAAYhD,KAAK2C,SAAS,OAAOoD,YAAY,kBACnD,MAAM5F,EAAWH,KAAKC,QAAQ8F,YAAY,aAE1C,GAAI/C,GAAa7C,EAAU,CACvBH,KAAK4C,WAAWI,EAAW7C,EAC/B,CACJ,EAKO6F,iBAAgB,SAAAC,IACPjG,KAAK2C,SAAS,OAAQD,YAAY,UAAW,sBAC7D,EAKOwD,qBAAoB,SAAAC,IACXnG,KAAK2C,SAAS,OAAQD,YAAY,UAAW,0BAC7D,EAKO0D,YAAW,SAAAC,IACFrG,KAAK2C,SAAS,OAAQD,YAAY,UAAW,yBACzD1C,KAAKkC,YAAYoE,MAAM,QAAS,CAAE9D,MAAOxC,KAAK2C,SAAS,OAAOoD,YAAY,mBAC9E,EAKOQ,gBAAe,SAAAC,IAClB,IACH,OA1UgB7G,CAAY","ignoreList":[]}
@@ -3,6 +3,7 @@ import JSONModel from "sap/ui/model/json/JSONModel";
3
3
  import ODataModel from "sap/ui/model/odata/v4/ODataModel";
4
4
  import { Route$PatternMatchedEvent } from "sap/ui/core/routing/Route";
5
5
  import MessageBox from "sap/m/MessageBox";
6
+ import ResourceBundle from "sap/base/i18n/ResourceBundle";
6
7
 
7
8
  /**
8
9
  * @namespace cds.plugin.caching.dashboard.controller
@@ -76,6 +77,7 @@ export default class SingleMetric extends BaseController {
76
77
  private async loadMetric(cacheName: string, metricId: string): Promise<void> {
77
78
  try {
78
79
  const model = this.getModel() as ODataModel;
80
+ const rb = await this.getResourceBundle();
79
81
 
80
82
  // Try to get the metric from the Metrics entity
81
83
  const context = model.bindContext(`/Metrics(ID='${metricId}',cache='${cacheName}')`);
@@ -120,35 +122,36 @@ export default class SingleMetric extends BaseController {
120
122
  this.uiModel.setProperty("/uniqueKeys", 0); // TODO: Get from key metrics data
121
123
 
122
124
  // Generate chart data
123
- this.generateLatencyChartData(metric);
124
- this.generateCacheThroughChartData(metric);
125
- this.generateNativeChartData(metric);
125
+ this.generateLatencyChartData(metric, rb);
126
+ this.generateCacheThroughChartData(metric, rb);
127
+ this.generateNativeChartData(metric, rb);
126
128
 
127
129
  } else {
128
- MessageBox.error("Metric not found");
130
+ MessageBox.error(await this.i18nText("msgMetricNotFound"));
129
131
  }
130
132
 
131
133
  } catch (error) {
132
134
  console.error("Error loading metric:", error);
133
- MessageBox.error("Failed to load metric details");
135
+ MessageBox.error(await this.i18nText("msgLoadMetricFailed"));
134
136
  }
135
137
  }
136
138
 
137
139
  /**
138
140
  * Generate latency data for the chart
139
141
  */
140
- private generateLatencyChartData(metric: any): void {
142
+ private generateLatencyChartData(metric: any, rb: ResourceBundle): void {
143
+ const t = (k: string) => rb.getText(k);
141
144
  const latencyData = [
142
145
  {
143
- operation: "Average Hit Latency",
146
+ operation: t("chartOpAvgHitLatency"),
144
147
  latency: metric.avgHitLatency || 0
145
148
  },
146
149
  {
147
- operation: "Average Miss Latency",
150
+ operation: t("chartOpAvgMissLatency"),
148
151
  latency: metric.avgMissLatency || 0
149
152
  },
150
153
  {
151
- operation: "Average Read-Through Latency",
154
+ operation: t("chartOpAvgReadThroughLatency"),
152
155
  latency: metric.avgReadThroughLatency || 0
153
156
  }
154
157
  ];
@@ -159,18 +162,19 @@ export default class SingleMetric extends BaseController {
159
162
  /**
160
163
  * Generate Read-Through operations data for pie chart
161
164
  */
162
- private generateCacheThroughChartData(metric: any): void {
165
+ private generateCacheThroughChartData(metric: any, rb: ResourceBundle): void {
166
+ const t = (k: string) => rb.getText(k);
163
167
  const cacheThroughData = [
164
168
  {
165
- operation: "Hits",
169
+ operation: t("chartOpHits"),
166
170
  count: metric.hits || 0
167
171
  },
168
172
  {
169
- operation: "Misses",
173
+ operation: t("chartOpMisses"),
170
174
  count: metric.misses || 0
171
175
  },
172
176
  {
173
- operation: "Errors",
177
+ operation: t("chartOpErrors"),
174
178
  count: metric.errors || 0
175
179
  }
176
180
  ];
@@ -181,30 +185,31 @@ export default class SingleMetric extends BaseController {
181
185
  /**
182
186
  * Generate Native Function operations data for pie chart
183
187
  */
184
- private generateNativeChartData(metric: any): void {
188
+ private generateNativeChartData(metric: any, rb: ResourceBundle): void {
189
+ const t = (k: string) => rb.getText(k);
185
190
  const nativeData = [
186
191
  {
187
- operation: "Sets",
192
+ operation: t("chartOpSets"),
188
193
  count: metric.nativeSets || 0
189
194
  },
190
195
  {
191
- operation: "Gets",
196
+ operation: t("chartOpGets"),
192
197
  count: metric.nativeGets || 0
193
198
  },
194
199
  {
195
- operation: "Deletes",
200
+ operation: t("chartOpDeletes"),
196
201
  count: metric.nativeDeletes || 0
197
202
  },
198
203
  {
199
- operation: "Clears",
204
+ operation: t("chartOpClears"),
200
205
  count: metric.nativeClears || 0
201
206
  },
202
207
  {
203
- operation: "Delete By Tags",
208
+ operation: t("chartOpDeleteByTags"),
204
209
  count: metric.nativeDeleteByTags || 0
205
210
  },
206
211
  {
207
- operation: "Errors",
212
+ operation: t("chartOpErrors"),
208
213
  count: metric.nativeErrors || 0
209
214
  }
210
215
  ];
@@ -216,7 +221,8 @@ export default class SingleMetric extends BaseController {
216
221
  // Format latency chart (bar chart)
217
222
  const latencyChart = this.getView().byId("metricLatencyChart") as any;
218
223
  if (latencyChart) {
219
- latencyChart.setVizProperties({
224
+ void this.getResourceBundle().then((rb) => {
225
+ latencyChart.setVizProperties({
220
226
  legend: {
221
227
  visible: false
222
228
  },
@@ -250,9 +256,10 @@ export default class SingleMetric extends BaseController {
250
256
  },
251
257
  title: {
252
258
  visible: false,
253
- text: 'Latency by Operation'
259
+ text: rb.getText("chartTitleLatencyByOperation")
254
260
  }
255
261
  });
262
+ });
256
263
  }
257
264
 
258
265
  // Format Read-Through pie chart
@@ -1,3 +1,5 @@
1
+ # Default (English) \u2013 bundle fallback
2
+
1
3
  appTitle=Cache Performance Dashboard
2
4
  appDescription=Comprehensive cache statistics and monitoring dashboard
3
5
  btnText=Say Hello
@@ -59,3 +61,236 @@ statisticsAvgHitRatio=Average Hit Ratio
59
61
  statisticsAvgLatency=Average Latency
60
62
  statisticsTotalRequests=Total Requests
61
63
  statisticsNoData=No statistics found for the selected criteria
64
+
65
+ # Main list
66
+ homePageTitle=cds-caching \u2013 Dashboard
67
+ cachingServicesHeader=Caching Services
68
+ noCachesAvailable=No caches available
69
+ colName=Name
70
+ colStatisticTrackingEnabled=Statistic Tracking Enabled
71
+ colKeyTrackingEnabled=Key Tracking Enabled
72
+
73
+ # Tooltips
74
+ ttFullScreenEnter=Enter Full Screen Mode
75
+ ttFullScreenExit=Exit Full Screen Mode
76
+ ttCloseMidColumn=Close middle column
77
+ ttCloseEndColumn=Close end column
78
+
79
+ # Cache view \u2013 page
80
+ cachePagePrefix=Cache:
81
+ enableMetricsLabel=Enable Metrics
82
+ enableKeyMetricsLabel=Enable Key Metrics
83
+ actionClearCache=Clear Cache
84
+
85
+ # Tabs
86
+ tabOverview=Overview
87
+ tabMetrics=Metrics
88
+ tabKeyMetrics=Key Metrics
89
+ tabBrowseCacheEntries=Browse Cache Entries
90
+
91
+ # Cards overview
92
+ configCardTitle=Configuration
93
+ configCardSubtitle=Cache Configuration
94
+ createEntryTitle=Create Cache Entry
95
+ createEntrySubtitle=Create a new cache entry
96
+ getEntryTitle=Get Cache Entry
97
+ getEntrySubtitle=Get a cache entry
98
+ deleteEntryTitle=Delete Cache Entry
99
+ deleteEntrySubtitle=Delete a cache entry
100
+
101
+ # Form
102
+ labelKey=Key
103
+ labelValue=Value
104
+ labelTtlSeconds=TTL (seconds)
105
+ btnSetEntry=Set Entry
106
+ btnGetEntry=Get Entry
107
+ btnDeleteEntry=Delete Entry
108
+
109
+ # Metrics & toolbars
110
+ aggregatedMetricsByHour=Aggregated Metrics by Hour
111
+ btnClearMetrics=Clear Metrics
112
+ btnLoadCacheEntries=Load Cache Entries
113
+ keyMetricsToolbarTitle=Key Metrics
114
+
115
+ # Column groups
116
+ groupReadThrough=Read-Through
117
+ groupReadThroughOps=Read-Through Operations
118
+ groupReadThroughPerformance=Read-Through Performance
119
+ groupReadThroughLatencies=Read-Through Latencies
120
+ groupReadThroughHitLatencies=Read-Through Hit Latencies
121
+ groupReadThroughMissLatencies=Read-Through Miss Latencies
122
+ groupNativeFunction=Native Function
123
+ groupNativeFunctionOps=Native Function Operations
124
+ groupNativeFunctionPerformance=Native Function Performance
125
+ ctxGroup=Context
126
+ infoAdditional=Additional Information
127
+
128
+ # Column sub-labels
129
+ colHits=Hits
130
+ colMisses=Misses
131
+ colTotalRequests=Total Requests
132
+ colHitRatioPct=Hit Ratio %
133
+ colErrorRatePct=Error Rate %
134
+ colCacheEfficiency=Cache Efficiency
135
+ colTimestamp=Timestamp
136
+ colAvgLatencyMs=Avg Latency (ms)
137
+ colHitAvgMs=Hit Avg (ms)
138
+ colHitMinMs=Hit Min (ms)
139
+ colHitMaxMs=Hit Max (ms)
140
+ colMissAvgMs=Miss Avg (ms)
141
+ colMissMinMs=Miss Min (ms)
142
+ colMissMaxMs=Miss Max (ms)
143
+ colTotal=Total
144
+ colSets=Sets
145
+ colGets=Gets
146
+ colDeletes=Deletes
147
+ colClears=Clears
148
+ colDeleteByTags=Delete By Tags
149
+ colErrors=Errors
150
+ colKeyName=Key Name
151
+ colOperation=Operation
152
+ colType=Type
153
+ colOperationType=Operation Type
154
+ colTarget=Target
155
+ colMetadata=Metadata
156
+ colAvgHitLatencyMs=Avg Hit Latency (ms)
157
+ colMinHitLatencyMs=Min Hit Latency (ms)
158
+ colMaxHitLatencyMs=Max Hit Latency (ms)
159
+ colAvgMissLatencyMs=Avg Miss Latency (ms)
160
+ colMinMissLatencyMs=Min Miss Latency (ms)
161
+ colMaxMissLatencyMs=Max Miss Latency (ms)
162
+ colTenant=Tenant
163
+ colUser=User
164
+ colLocale=Locale
165
+ colLastAccess=Last Access
166
+ colFirstAccess=First Access
167
+ colTags=Tags
168
+ btnShowMetadata=Show Metadata
169
+
170
+ # Browse
171
+ cacheEntriesTitle=Cache Entries
172
+ cacheEntriesSubtitle=Browse all cache entries (use with caution)
173
+ messageStripLoadEntriesWarning=Warning: Loading all cache entries may impact performance for large caches. Use the button below to load entries on demand.
174
+
175
+ # Placeholder chart
176
+ chartPlaceholder=Chart visualization will be implemented here
177
+ selectChartHitLatency=Hit Latency
178
+ selectChartMissLatency=Miss Latency
179
+
180
+ # Card chart headers (hidden section)
181
+ trendsCardTitle=Trends
182
+ trendsCardSubtitle=Performance trends over time
183
+
184
+ # Single metric \u2013 page
185
+ metricDetailsPageTitle=Metric Details
186
+ metricPagePrefix=Metric:
187
+ sectionReadThroughPerformance=Read-Through Performance
188
+ sectionNativeFunctionPerformance=Native Function Performance
189
+
190
+ # Generic tiles
191
+ tileSubCacheHitRate=Cache Hit Rate
192
+ tileSubPerformanceFactor=Performance Factor
193
+ tileSubReqPerSec=Requests per Second
194
+ tileSubCacheErrors=Cache Errors
195
+ tileSubCacheOperations=Cache Operations
196
+ tileSubSuccessfulRetrievals=Successful Retrievals
197
+ tileSubFailedRetrievals=Failed Retrievals
198
+ tileSubErrorCount=Error Count
199
+ tileSubCacheHitResponse=Cache Hit Response
200
+ tileSubCacheMissResponse=Cache Miss Response
201
+ headerCacheEfficiency=Cache Efficiency
202
+ headerErrorRate=Error Rate
203
+ headerCacheHits=Cache Hits
204
+ headerCacheMisses=Cache Misses
205
+ headerCacheErrors=Cache Errors
206
+ headerHitLatency=Hit Latency
207
+ headerMissLatency=Miss Latency
208
+ headerNativeThroughput=Native Throughput
209
+ headerNativeErrorRate=Native Error Rate
210
+ headerNativeSets=Native Sets
211
+ headerNativeGets=Native Gets
212
+ headerNativeDeletes=Native Deletes
213
+ headerNativeClears=Native Clears
214
+ headerDeleteByTags=Delete By Tags
215
+ headerNativeErrors=Native Errors
216
+ headerTotalNativeOps=Total Native Ops
217
+ tileSubNativeOpsPerSec=Operations per Second
218
+ tileSubWriteOps=Write Operations
219
+ tileSubReadOps=Read Operations
220
+ tileSubDeleteOps=Delete Operations
221
+ tileSubClearOps=Clear Operations
222
+ tileSubTagDeletes=Tag-based Deletes
223
+ tileSubAllOperations=All Operations
224
+
225
+ # Cards (single metric)
226
+ cardReadThroughOps=Read-Through Operations
227
+ cardReadThroughOpsSub=Hit/Miss/Error Distribution
228
+ cardLatencyCompare=Latency Comparison
229
+ cardLatencyCompareSub=Read-Through Latency Metrics
230
+ cardNativeFunctionOps=Native Function Operations
231
+ cardNativeFunctionOpsSub=Operation Distribution
232
+
233
+ # Viz internal labels
234
+ vizMeasureCount=Count
235
+ vizMeasureLatency=Latency
236
+
237
+ # Controllers & messages
238
+ msgNoCacheSelected=No cache selected
239
+ msgUpdatingStatsConfig=Updating statistics configuration\u2026
240
+ msgStatsEnabled=Statistics enabled successfully
241
+ msgStatsDisabled=Statistics disabled successfully
242
+ msgFailedUpdateStatsConfig=Failed to update statistics configuration
243
+ msgErrorUpdateStatsConfig=Error updating statistics configuration
244
+ msgUpdatingKeyTracking=Updating key tracking configuration\u2026
245
+ msgKeyTrackingEnabled=Key tracking enabled successfully
246
+ msgKeyTrackingDisabled=Key tracking disabled successfully
247
+ msgFailedKeyTracking=Failed to update key tracking configuration
248
+ msgErrorKeyTracking=Error updating key tracking configuration
249
+ msgStatsPersisted=Statistics persisted successfully
250
+ msgFailedPersistStats=Failed to persist statistics
251
+ msgErrorPersistStats=Error persisting statistics
252
+ msgLoadEntriesFailed=Failed to load cache entries
253
+ msgProvideKeyValue=Please provide both key and value
254
+ msgEntryCreated=Cache entry created successfully
255
+ msgCreateEntryFailed=Failed to create cache entry
256
+ msgProvideKey=Please provide a key
257
+ msgEntryDeleted=Cache entry deleted successfully
258
+ msgDeleteEntryFailed=Failed to delete cache entry
259
+ msgNotFound=Not found
260
+ msgGetEntryError=Error: Entry not found or error occurred
261
+ msgMetricsEnabled=Metrics enabled successfully
262
+ msgMetricsDisabled=Metrics disabled successfully
263
+ msgFailedUpdateMetrics=Failed to update metrics setting
264
+ msgKeyMetricsEnabled=Key metrics enabled successfully
265
+ msgKeyMetricsDisabled=Key metrics disabled successfully
266
+ msgFailedKeyMetrics=Failed to update key metrics setting
267
+ msgConfirmClearCache=Are you sure you want to clear this cache? This action cannot be undone.
268
+ msgCacheCleared=Cache cleared successfully
269
+ msgClearCacheFailed=Failed to clear cache
270
+ msgMetricsCleared=Metrics cleared successfully
271
+ msgKeyMetricsCleared=Key metrics cleared successfully
272
+ msgFailedClearMetrics=Failed to clear metrics
273
+ msgFailedClearKeyMetrics=Failed to clear key metrics
274
+ msgMetricNotFound=Metric not found
275
+ msgLoadMetricFailed=Failed to load metric details
276
+
277
+ # Key metrics popover tabs
278
+ keyTabMetadata=Metadata
279
+ keyTabSubject=Subject
280
+ keyTabQuery=Query
281
+ keyTabCacheOptions=Cache Options
282
+
283
+ # Chart (single metric) \u2013 operation labels
284
+ chartOpAvgHitLatency=Average Hit Latency
285
+ chartOpAvgMissLatency=Average Miss Latency
286
+ chartOpAvgReadThroughLatency=Average Read-Through Latency
287
+ chartOpHits=Hits
288
+ chartOpMisses=Misses
289
+ chartOpErrors=Errors
290
+ chartOpSets=Sets
291
+ chartOpGets=Gets
292
+ chartOpDeletes=Deletes
293
+ chartOpClears=Clears
294
+ chartOpDeleteByTags=Delete By Tags
295
+
296
+ chartTitleLatencyByOperation=Latency by Operation