cds-caching 3.1.0 → 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.
- package/app/dashboard/Component-preload.js +2 -2
- package/app/dashboard/Component-preload.js.map +1 -1
- package/app/dashboard/index.html +1 -1
- package/app/dashboard/manifest.json +3 -3
- package/app/dashboard/service/CacheStatisticsService-dbg.js +1 -1
- package/app/dashboard/service/CacheStatisticsService-dbg.js.map +1 -1
- package/app/dashboard/service/CacheStatisticsService.js +1 -1
- package/app/dashboard/service/CacheStatisticsService.js.map +1 -1
- package/app/dashboard-src/index.html +1 -1
- package/app/dashboard-src/manifest.json +3 -3
- package/app/dashboard-src/service/CacheStatisticsService.ts +1 -1
- package/lib/add.js +1 -1
- package/lib/dashboard-bootstrap.js +1 -1
- package/package.json +2 -2
|
@@ -9,12 +9,12 @@ sap.ui.predefine("cds/plugin/caching/dashboard/controller/SingleMetric.controlle
|
|
|
9
9
|
sap.ui.predefine("cds/plugin/caching/dashboard/model/filters", ["sap/ui/model/Filter","sap/ui/model/FilterOperator"],function(e,r){"use strict";function t(t){return new e({path:"cache",operator:r.EQ,value1:t})}function a(t,a){return[new e({path:"cache",operator:r.EQ,value1:t}),new e({path:"ID",operator:r.EQ,value1:a})]}function n(t){return new e({path:"period",operator:r.EQ,value1:t})}var o={__esModule:true};o.cacheNameFilter=t;o.cacheAndIdFilter=a;o.periodFilter=n;return o});
|
|
10
10
|
sap.ui.predefine("cds/plugin/caching/dashboard/model/formatter", ["sap/m/library"],function(e){"use strict";const r=e["ValueColor"];var t={formatIntegerValue(e){if(e===null||e===undefined||e===0){return"0"}return`${e.toFixed(0)}`},formatNumberValue(e){if(e===null||e===undefined||e===0){return"0"}return`${e.toFixed(2)}`},formatPercentage(e){if(e===null||e===undefined){return"0%"}return`${(e*100).toFixed(1)}%`},formatPercentageValue(e){if(e===null||e===undefined){return"0"}return`${(e*100).toFixed(1)}`},formatLatency(e){if(e===null||e===undefined){return"0ms"}const r=Number(e);if(r<1){return`${(r*1e3).toFixed(2)}μs`}return`${r.toFixed(2)}ms`},formatMemoryUsage(e){if(e===null||e===undefined){return"0 B"}const r=["B","KB","MB","GB"];const t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(2)} ${r[t]}`},formatThroughput(e){if(e===null||e===undefined){return"0 req/s"}return`${e.toFixed(2)} req/s`},formatCacheEfficiency(e){if(e===null||e===undefined||e===0){return"N/A"}if(e<1){return`${(e*100).toFixed(1)}%`}return`${e.toFixed(1)}x`},formatUptime(e){if(e===null||e===undefined){return"0s"}const r=Math.floor(e/1e3);const t=Math.floor(r/60);const n=Math.floor(t/60);const o=Math.floor(n/24);if(o>0){return`${o}d ${n%24}h ${t%60}m`}else if(n>0){return`${n}h ${t%60}m ${r%60}s`}else if(t>0){return`${t}m ${r%60}s`}else{return`${r}s`}},formatDate(e){if(!e){return""}const r=new Date(e);return r.toLocaleString()},formatHitRatioWithColor(e){if(e===null||e===undefined){return r.None}if(e>=.9){return r.Good}else if(e>=.7){return r.Critical}else{return r.Error}},formatLatencyWithColor(e){if(e===null||e===undefined){return r.None}if(e<=10){return r.Good}else if(e<=50){return r.Critical}else{return r.Error}},formatErrorRateWithColor(e){if(e<=.01){return r.Good}else if(e<=.05){return r.Critical}else if(e<=.1){return r.Error}else{return r.Neutral}},getTotalRequests(e,r){return(e||0)+(r||0)},getTotalOperations(e,r,t,n){return(e||0)+(r||0)+(t||0)+(n||0)},formatJSON(e){if(!e){return""}try{if(typeof e==="string"){const r=JSON.parse(e);return JSON.stringify(r,null,2)}else{return JSON.stringify(e,null,2)}}catch(r){return e}},formatKeyName(e,r=30){if(!e){return""}if(e.length<=r){return e}return e.substring(0,r-3)+"..."},getRelativeTime(e){if(!e){return"Never"}const r=new Date(e);const t=new Date;const n=t.getTime()-r.getTime();const o=Math.floor(n/1e3);const u=Math.floor(o/60);const i=Math.floor(u/60);const f=Math.floor(i/24);if(f>0){return`${f} day${f>1?"s":""} ago`}else if(i>0){return`${i} hour${i>1?"s":""} ago`}else if(u>0){return`${u} minute${u>1?"s":""} ago`}else{return`${o} second${o>1?"s":""} ago`}},formatCacheEfficiencyWithColor(e){if(e===null||e===undefined){return r.None}if(e>5){return r.Good}else if(e>=3){return r.Critical}else{return r.Error}},formatTruncatedText(e,r=50){if(!e){return""}if(e.length<=r){return e}return e.substring(0,r)+"..."}};return t});
|
|
11
11
|
sap.ui.predefine("cds/plugin/caching/dashboard/model/models", ["sap/ui/model/json/JSONModel","sap/ui/model/BindingMode","sap/ui/Device"],function(e,i,n){"use strict";var d={createDeviceModel:()=>{const d=new e(n);d.setDefaultBindingMode(i.OneWay);return d}};return d});
|
|
12
|
-
sap.ui.predefine("cds/plugin/caching/dashboard/service/CacheStatisticsService", ["sap/m/MessageBox","sap/ui/model/odata/v4/ODataModel","sap/ui/model/Filter","sap/ui/model/FilterOperator","sap/ui/model/Sorter","../model/filters"],function(e,t,r,s,a,n){"use strict";const i=n["cacheAndIdFilter"];const c=n["cacheNameFilter"];const o=n["periodFilter"];class l{constructor(e){this.model=e||new t({serviceUrl:"/odata/v4/caching/",autoExpandSelect:true,groupId:"$auto"})}getModel(){return this.model}async getCurrentMetrics(t){try{const e=this.model.bindList("/Metrics",undefined,[new a({path:"timestamp",descending:true})],[o("hourly"),c(t)]);const r=await e.requestContexts();const s=r.map(e=>e.getObject());if(s.length>0){return this.transformStatistics(s[0])}return null}catch(t){console.error("Error fetching current metrics:",t);e.error("Failed to load current metrics");return null}}async getHistoricalMetrics(t,n="hourly",i,l){try{const e=[o(n),c(t)];if(i){e.push(new r({path:"timestamp",operator:s.GE,value1:i}))}if(l){e.push(new r({path:"timestamp",operator:s.LE,value1:l}))}const d=this.model.bindList("/Metrics",undefined,[new a({path:"timestamp",descending:true})],e);const u=await d.requestContexts();return u.map(e=>e.getObject())}catch(t){console.error("Error fetching historical metrics:",t);e.error("Failed to load historical metrics");return[]}}async getTopKeys(t){try{const e=this.model.bindList("/KeyMetrics",undefined,[new a({path:"totalRequests",descending:true})],[o("current"),c(t)]);const r=await e.requestContexts();return r.map(e=>e.getObject())}catch(t){console.error("Error fetching top keys:",t);e.error("Failed to load top keys");return[]}}async getColdKeys(t){try{const e=this.model.bindList("/KeyMetrics",undefined,[new a({path:"lastAccess",descending:false})],[o("current"),c(t)]);const r=await e.requestContexts();return r.map(e=>e.getObject())}catch(t){console.error("Error fetching cold keys:",t);e.error("Failed to load cold keys");return[]}}async persistStatistics(){try{const e=this.model.bindContext("/persistStatistics(...)");await e.invoke();return true}catch(t){console.error("Error persisting statistics:",t);e.error("Failed to persist statistics");return false}}transformStatistics(e){return{hits:e.hits||0,misses:e.misses||0,sets:e.sets||0,deletes:e.deletes||0,errors:e.errors||0,avgLatency:e.avgLatency||0,p95Latency:e.p95Latency||0,p99Latency:e.p99Latency||0,minLatency:e.minLatency||0,maxLatency:e.maxLatency||0,avgHitLatency:e.avgHitLatency||0,p95HitLatency:e.p95HitLatency||0,p99HitLatency:e.p99HitLatency||0,minHitLatency:e.minHitLatency||0,maxHitLatency:e.maxHitLatency||0,avgMissLatency:e.avgMissLatency||0,p95MissLatency:e.p95MissLatency||0,p99MissLatency:e.p99MissLatency||0,minMissLatency:e.minMissLatency||0,maxMissLatency:e.maxMissLatency||0,avgSetLatency:e.avgSetLatency||0,avgDeleteLatency:e.avgDeleteLatency||0,memoryUsage:e.memoryUsage||0,itemCount:e.itemCount||0,hitRatio:e.hitRatio||0,throughput:e.throughput||0,errorRate:e.errorRate||0,cacheEfficiency:e.cacheEfficiency||0,uptimeMs:e.uptimeMs||0,uniqueKeys:0,topKeys:[],coldKeys:[],lastPersisted:e.lastPersisted||(new Date).toISOString()}}async getAvailableMetrics(t){try{const e=this.model.bindList("/Metrics",undefined,[new a({path:"timestamp",descending:true})],[c(t)]);const r=await e.requestContexts();return r.map(e=>e.getObject())}catch(t){console.error("Error fetching available metrics:",t);e.error("Failed to load available metrics");return[]}}async getMetricById(t,r){try{const e=this.model.bindList("/Metrics",undefined,undefined,i(t,r));const s=await e.requestContexts();const a=s.map(e=>e.getObject());if(a.length>0){return this.transformStatistics(a[0])}return null}catch(t){console.error("Error fetching metric by ID:",t);e.error("Failed to load metric");return null}}async setMetricsEnabled(t,r){try{const e=this.model.bindContext("/setMetricsEnabled(...)");e.setParameter("cache",t);e.setParameter("enabled",r);await e.invoke();return true}catch(t){console.error("Error setting metrics enabled:",t);e.error("Failed to update metrics configuration");return false}}async setKeyMetricsEnabled(t,r){try{const e=this.model.bindContext("/setKeyMetricsEnabled(...)");e.setParameter("cache",t);e.setParameter("enabled",r);await e.invoke();return true}catch(t){console.error("Error setting key metrics enabled:",t);e.error("Failed to update key metrics configuration");return false}}}return l});
|
|
12
|
+
sap.ui.predefine("cds/plugin/caching/dashboard/service/CacheStatisticsService", ["sap/m/MessageBox","sap/ui/model/odata/v4/ODataModel","sap/ui/model/Filter","sap/ui/model/FilterOperator","sap/ui/model/Sorter","../model/filters"],function(e,t,r,s,a,n){"use strict";const i=n["cacheAndIdFilter"];const c=n["cacheNameFilter"];const o=n["periodFilter"];class l{constructor(e){this.model=e||new t({serviceUrl:"/odata/v4/caching-api/",autoExpandSelect:true,groupId:"$auto"})}getModel(){return this.model}async getCurrentMetrics(t){try{const e=this.model.bindList("/Metrics",undefined,[new a({path:"timestamp",descending:true})],[o("hourly"),c(t)]);const r=await e.requestContexts();const s=r.map(e=>e.getObject());if(s.length>0){return this.transformStatistics(s[0])}return null}catch(t){console.error("Error fetching current metrics:",t);e.error("Failed to load current metrics");return null}}async getHistoricalMetrics(t,n="hourly",i,l){try{const e=[o(n),c(t)];if(i){e.push(new r({path:"timestamp",operator:s.GE,value1:i}))}if(l){e.push(new r({path:"timestamp",operator:s.LE,value1:l}))}const d=this.model.bindList("/Metrics",undefined,[new a({path:"timestamp",descending:true})],e);const u=await d.requestContexts();return u.map(e=>e.getObject())}catch(t){console.error("Error fetching historical metrics:",t);e.error("Failed to load historical metrics");return[]}}async getTopKeys(t){try{const e=this.model.bindList("/KeyMetrics",undefined,[new a({path:"totalRequests",descending:true})],[o("current"),c(t)]);const r=await e.requestContexts();return r.map(e=>e.getObject())}catch(t){console.error("Error fetching top keys:",t);e.error("Failed to load top keys");return[]}}async getColdKeys(t){try{const e=this.model.bindList("/KeyMetrics",undefined,[new a({path:"lastAccess",descending:false})],[o("current"),c(t)]);const r=await e.requestContexts();return r.map(e=>e.getObject())}catch(t){console.error("Error fetching cold keys:",t);e.error("Failed to load cold keys");return[]}}async persistStatistics(){try{const e=this.model.bindContext("/persistStatistics(...)");await e.invoke();return true}catch(t){console.error("Error persisting statistics:",t);e.error("Failed to persist statistics");return false}}transformStatistics(e){return{hits:e.hits||0,misses:e.misses||0,sets:e.sets||0,deletes:e.deletes||0,errors:e.errors||0,avgLatency:e.avgLatency||0,p95Latency:e.p95Latency||0,p99Latency:e.p99Latency||0,minLatency:e.minLatency||0,maxLatency:e.maxLatency||0,avgHitLatency:e.avgHitLatency||0,p95HitLatency:e.p95HitLatency||0,p99HitLatency:e.p99HitLatency||0,minHitLatency:e.minHitLatency||0,maxHitLatency:e.maxHitLatency||0,avgMissLatency:e.avgMissLatency||0,p95MissLatency:e.p95MissLatency||0,p99MissLatency:e.p99MissLatency||0,minMissLatency:e.minMissLatency||0,maxMissLatency:e.maxMissLatency||0,avgSetLatency:e.avgSetLatency||0,avgDeleteLatency:e.avgDeleteLatency||0,memoryUsage:e.memoryUsage||0,itemCount:e.itemCount||0,hitRatio:e.hitRatio||0,throughput:e.throughput||0,errorRate:e.errorRate||0,cacheEfficiency:e.cacheEfficiency||0,uptimeMs:e.uptimeMs||0,uniqueKeys:0,topKeys:[],coldKeys:[],lastPersisted:e.lastPersisted||(new Date).toISOString()}}async getAvailableMetrics(t){try{const e=this.model.bindList("/Metrics",undefined,[new a({path:"timestamp",descending:true})],[c(t)]);const r=await e.requestContexts();return r.map(e=>e.getObject())}catch(t){console.error("Error fetching available metrics:",t);e.error("Failed to load available metrics");return[]}}async getMetricById(t,r){try{const e=this.model.bindList("/Metrics",undefined,undefined,i(t,r));const s=await e.requestContexts();const a=s.map(e=>e.getObject());if(a.length>0){return this.transformStatistics(a[0])}return null}catch(t){console.error("Error fetching metric by ID:",t);e.error("Failed to load metric");return null}}async setMetricsEnabled(t,r){try{const e=this.model.bindContext("/setMetricsEnabled(...)");e.setParameter("cache",t);e.setParameter("enabled",r);await e.invoke();return true}catch(t){console.error("Error setting metrics enabled:",t);e.error("Failed to update metrics configuration");return false}}async setKeyMetricsEnabled(t,r){try{const e=this.model.bindContext("/setKeyMetricsEnabled(...)");e.setParameter("cache",t);e.setParameter("enabled",r);await e.invoke();return true}catch(t){console.error("Error setting key metrics enabled:",t);e.error("Failed to update key metrics configuration");return false}}}return l});
|
|
13
13
|
sap.ui.require.preload({
|
|
14
14
|
"cds/plugin/caching/dashboard/i18n/i18n.properties":'# Default (English) \\u2013 bundle fallback\n\nappTitle=Cache Performance Dashboard\nappDescription=Comprehensive cache statistics and monitoring dashboard\nbtnText=Say Hello\n\n# Main Dashboard\nmainTitle=Cache Performance Dashboard\nrefreshButton=Refresh\npersistButton=Persist Statistics\n\n# Navigation\nkeyAnalysis=Key Analysis\n\n# Metrics\nhitRatio=Hit Ratio\navgLatency=Average Latency\nthroughput=Throughput\nerrorRate=Error Rate\ntotalRequests=Total Requests\nmemoryUsage=Memory Usage\nuniqueKeys=Unique Keys\nuptime=Uptime\n\n# Keys\nkeysTitle=Key Analysis\nkeysSubtitle=Cache Key Access Patterns\ntopKeys=Top Accessed Keys\ncoldKeys=Cold Keys\nkeyStatistics=Key Statistics\ntotalKeysTracked=Total Keys Tracked\nmostActiveKey=Most Active Key\nleastActiveKey=Least Active Key\n\n# Common\nloading=Loading...\nnoData=No data available\nerror=Error\nsuccess=Success\nwarning=Warning\n\n# Statistics Page\nstatisticsTitle=Statistics\nstatisticsSubtitle=Historical cache statistics\nstatisticsFilters=Filters\nstatisticsFiltersSubtitle=Select date range and period\nstatisticsSummary=Summary\nstatisticsSummarySubtitle=Statistics overview\nstatisticsData=Statistics Data\nstatisticsDataSubtitle=Detailed statistics records\nstatisticsTrends=Trends\nstatisticsTrendsSubtitle=Performance trends over time\nstatisticsPeriod=Period\nstatisticsFrom=From\nstatisticsTo=To\nstatisticsLoad=Load\nstatisticsRefresh=Refresh\nstatisticsExport=Export CSV\nstatisticsTotalRecords=Total Records\nstatisticsAvgHitRatio=Average Hit Ratio\nstatisticsAvgLatency=Average Latency\nstatisticsTotalRequests=Total Requests\nstatisticsNoData=No statistics found for the selected criteria\n\n# Main list\nhomePageTitle=cds-caching \\u2013 Dashboard\ncachingServicesHeader=Caching Services\nnoCachesAvailable=No caches available\ncolName=Name\ncolStatisticTrackingEnabled=Statistic Tracking Enabled\ncolKeyTrackingEnabled=Key Tracking Enabled\n\n# Tooltips\nttFullScreenEnter=Enter Full Screen Mode\nttFullScreenExit=Exit Full Screen Mode\nttCloseMidColumn=Close middle column\nttCloseEndColumn=Close end column\n\n# Cache view \\u2013 page\ncachePagePrefix=Cache:\nenableMetricsLabel=Enable Metrics\nenableKeyMetricsLabel=Enable Key Metrics\nactionClearCache=Clear Cache\n\n# Tabs\ntabOverview=Overview\ntabMetrics=Metrics\ntabKeyMetrics=Key Metrics\ntabBrowseCacheEntries=Browse Cache Entries\n\n# Cards overview\nconfigCardTitle=Configuration\nconfigCardSubtitle=Cache Configuration\ncreateEntryTitle=Create Cache Entry\ncreateEntrySubtitle=Create a new cache entry\ngetEntryTitle=Get Cache Entry\ngetEntrySubtitle=Get a cache entry\ndeleteEntryTitle=Delete Cache Entry\ndeleteEntrySubtitle=Delete a cache entry\n\n# Form\nlabelKey=Key\nlabelValue=Value\nlabelTtlSeconds=TTL (seconds)\nbtnSetEntry=Set Entry\nbtnGetEntry=Get Entry\nbtnDeleteEntry=Delete Entry\n\n# Metrics & toolbars\naggregatedMetricsByHour=Aggregated Metrics by Hour\nbtnClearMetrics=Clear Metrics\nbtnLoadCacheEntries=Load Cache Entries\nkeyMetricsToolbarTitle=Key Metrics\n\n# Column groups\ngroupReadThrough=Read-Through\ngroupReadThroughOps=Read-Through Operations\ngroupReadThroughPerformance=Read-Through Performance\ngroupReadThroughLatencies=Read-Through Latencies\ngroupReadThroughHitLatencies=Read-Through Hit Latencies\ngroupReadThroughMissLatencies=Read-Through Miss Latencies\ngroupNativeFunction=Native Function\ngroupNativeFunctionOps=Native Function Operations\ngroupNativeFunctionPerformance=Native Function Performance\nctxGroup=Context\ninfoAdditional=Additional Information\n\n# Column sub-labels\ncolHits=Hits\ncolMisses=Misses\ncolTotalRequests=Total Requests\ncolHitRatioPct=Hit Ratio %\ncolErrorRatePct=Error Rate %\ncolCacheEfficiency=Cache Efficiency\ncolTimestamp=Timestamp\ncolAvgLatencyMs=Avg Latency (ms)\ncolHitAvgMs=Hit Avg (ms)\ncolHitMinMs=Hit Min (ms)\ncolHitMaxMs=Hit Max (ms)\ncolMissAvgMs=Miss Avg (ms)\ncolMissMinMs=Miss Min (ms)\ncolMissMaxMs=Miss Max (ms)\ncolTotal=Total\ncolSets=Sets\ncolGets=Gets\ncolDeletes=Deletes\ncolClears=Clears\ncolDeleteByTags=Delete By Tags\ncolErrors=Errors\ncolKeyName=Key Name\ncolOperation=Operation\ncolType=Type\ncolOperationType=Operation Type\ncolTarget=Target\ncolMetadata=Metadata\ncolAvgHitLatencyMs=Avg Hit Latency (ms)\ncolMinHitLatencyMs=Min Hit Latency (ms)\ncolMaxHitLatencyMs=Max Hit Latency (ms)\ncolAvgMissLatencyMs=Avg Miss Latency (ms)\ncolMinMissLatencyMs=Min Miss Latency (ms)\ncolMaxMissLatencyMs=Max Miss Latency (ms)\ncolTenant=Tenant\ncolUser=User\ncolLocale=Locale\ncolLastAccess=Last Access\ncolFirstAccess=First Access\ncolTags=Tags\nbtnShowMetadata=Show Metadata\n\n# Browse\ncacheEntriesTitle=Cache Entries\ncacheEntriesSubtitle=Browse all cache entries (use with caution)\nmessageStripLoadEntriesWarning=Warning: Loading all cache entries may impact performance for large caches. Use the button below to load entries on demand.\n\n# Placeholder chart\nchartPlaceholder=Chart visualization will be implemented here\nselectChartHitLatency=Hit Latency\nselectChartMissLatency=Miss Latency\n\n# Card chart headers (hidden section)\ntrendsCardTitle=Trends\ntrendsCardSubtitle=Performance trends over time\n\n# Single metric \\u2013 page\nmetricDetailsPageTitle=Metric Details\nmetricPagePrefix=Metric:\nkeyMetricDetailsPageTitle=Key Metric Details\nkeyMetricPagePrefix=Key:\nsectionReadThroughPerformance=Read-Through Performance\nsectionNativeFunctionPerformance=Native Function Performance\n\n# Generic tiles\ntileSubCacheHitRate=Cache Hit Rate\ntileSubPerformanceFactor=Performance Factor\ntileSubReqPerSec=Requests per Second\ntileSubCacheErrors=Cache Errors\ntileSubCacheOperations=Cache Operations\ntileSubSuccessfulRetrievals=Successful Retrievals\ntileSubFailedRetrievals=Failed Retrievals\ntileSubErrorCount=Error Count\ntileSubCacheHitResponse=Cache Hit Response\ntileSubCacheMissResponse=Cache Miss Response\nheaderCacheEfficiency=Cache Efficiency\nheaderErrorRate=Error Rate\nheaderCacheHits=Cache Hits\nheaderCacheMisses=Cache Misses\nheaderCacheErrors=Cache Errors\nheaderHitLatency=Hit Latency\nheaderMissLatency=Miss Latency\nheaderNativeThroughput=Native Throughput\nheaderNativeErrorRate=Native Error Rate\nheaderNativeSets=Native Sets\nheaderNativeGets=Native Gets\nheaderNativeDeletes=Native Deletes\nheaderNativeClears=Native Clears\nheaderDeleteByTags=Delete By Tags\nheaderNativeErrors=Native Errors\nheaderTotalNativeOps=Total Native Ops\ntileSubNativeOpsPerSec=Operations per Second\ntileSubWriteOps=Write Operations\ntileSubReadOps=Read Operations\ntileSubDeleteOps=Delete Operations\ntileSubClearOps=Clear Operations\ntileSubTagDeletes=Tag-based Deletes\ntileSubAllOperations=All Operations\n\n# Cards (single metric)\ncardReadThroughOps=Read-Through Operations\ncardReadThroughOpsSub=Hit/Miss/Error Distribution\ncardLatencyCompare=Latency Comparison\ncardLatencyCompareSub=Read-Through Latency Metrics\ncardNativeFunctionOps=Native Function Operations\ncardNativeFunctionOpsSub=Operation Distribution\n\n# Viz internal labels\nvizMeasureCount=Count\nvizMeasureLatency=Latency\n\n# Controllers & messages\nmsgNoCacheSelected=No cache selected\nmsgUpdatingStatsConfig=Updating statistics configuration\\u2026\nmsgStatsEnabled=Statistics enabled successfully\nmsgStatsDisabled=Statistics disabled successfully\nmsgFailedUpdateStatsConfig=Failed to update statistics configuration\nmsgErrorUpdateStatsConfig=Error updating statistics configuration\nmsgUpdatingKeyTracking=Updating key tracking configuration\\u2026\nmsgKeyTrackingEnabled=Key tracking enabled successfully\nmsgKeyTrackingDisabled=Key tracking disabled successfully\nmsgFailedKeyTracking=Failed to update key tracking configuration\nmsgErrorKeyTracking=Error updating key tracking configuration\nmsgStatsPersisted=Statistics persisted successfully\nmsgFailedPersistStats=Failed to persist statistics\nmsgErrorPersistStats=Error persisting statistics\nmsgLoadEntriesFailed=Failed to load cache entries\nmsgProvideKeyValue=Please provide both key and value\nmsgEntryCreated=Cache entry created successfully\nmsgCreateEntryFailed=Failed to create cache entry\nmsgProvideKey=Please provide a key\nmsgEntryDeleted=Cache entry deleted successfully\nmsgDeleteEntryFailed=Failed to delete cache entry\nmsgNotFound=Not found\nmsgGetEntryError=Error: Entry not found or error occurred\nmsgMetricsEnabled=Metrics enabled successfully\nmsgMetricsDisabled=Metrics disabled successfully\nmsgFailedUpdateMetrics=Failed to update metrics setting\nmsgKeyMetricsEnabled=Key metrics enabled successfully\nmsgKeyMetricsDisabled=Key metrics disabled successfully\nmsgFailedKeyMetrics=Failed to update key metrics setting\nmsgConfirmClearCache=Are you sure you want to clear this cache? This action cannot be undone.\nmsgCacheCleared=Cache cleared successfully\nmsgClearCacheFailed=Failed to clear cache\nmsgMetricsCleared=Metrics cleared successfully\nmsgKeyMetricsCleared=Key metrics cleared successfully\nmsgFailedClearMetrics=Failed to clear metrics\nmsgFailedClearKeyMetrics=Failed to clear key metrics\nmsgMetricNotFound=Metric not found\nmsgLoadMetricFailed=Failed to load metric details\n\n# Key metrics popover tabs\nkeyTabMetadata=Metadata\nkeyTabSubject=Subject\nkeyTabQuery=Query\nkeyTabCacheOptions=Cache Options\n\n# Chart (single metric) \\u2013 operation labels\nchartOpAvgHitLatency=Average Hit Latency\nchartOpAvgMissLatency=Average Miss Latency\nchartOpAvgReadThroughLatency=Average Read-Through Latency\nchartOpHits=Hits\nchartOpMisses=Misses\nchartOpErrors=Errors\nchartOpSets=Sets\nchartOpGets=Gets\nchartOpDeletes=Deletes\nchartOpClears=Clears\nchartOpDeleteByTags=Delete By Tags\n\nchartTitleLatencyByOperation=Latency by Operation\n',
|
|
15
15
|
"cds/plugin/caching/dashboard/i18n/i18n_de.properties":'# German\n\nappTitle=Cache-Performance-Dashboard\nappDescription=Zusammenfassendes Statistik- und \\u00dcberwachungs-Dashboard\nbtnText=Hallo sagen\n\nmainTitle=Cache-Performance-Dashboard\nrefreshButton=Aktualisieren\npersistButton=Statistiken speichern\n\nkeyAnalysis=Schl\\u00fcsselanalyse\n\nhitRatio=Trefferquote\navgLatency=Mittlere Latenz\nthroughput=Durchsatz\nerrorRate=Fehlerrate\ntotalRequests=Anfragen gesamt\nmemoryUsage=Speicherverbrauch\nuniqueKeys=Eindeutige Schl\\u00fcssel\nuptime=Betriebszeit\n\nkeysTitle=Schl\\u00fcsselanalyse\nkeysSubtitle=Zugriffsmuster auf Cache-Schl\\u00fcssel\ntopKeys=Meist genutzte Schl\\u00fcssel\ncoldKeys=Kalte Schl\\u00fcssel\nkeyStatistics=Schl\\u00fcsselstatistiken\ntotalKeysTracked=Erfasste Schl\\u00fcssel gesamt\nmostActiveKey=Aktivster Schl\\u00fcssel\nleastActiveKey=Am wenigsten aktiver Schl\\u00fcssel\n\nloading=Wird geladen\\u2026\nnoData=Keine Daten verf\\u00fcgbar\nerror=Fehler\nsuccess=Erfolg\nwarning=Warnung\n\nstatisticsTitle=Statistiken\nstatisticsSubtitle=Historische Cache-Statistiken\nstatisticsFilters=Filter\nstatisticsFiltersSubtitle=Datumsbereich und Zeitraum w\\u00e4hlen\nstatisticsSummary=Zusammenfassung\nstatisticsSummarySubtitle=Statistik-\\u00dcberblick\nstatisticsData=Statistikdaten\nstatisticsDataSubtitle=Detaillierte Statistikdatens\\u00e4tze\nstatisticsTrends=Trends\nstatisticsTrendsSubtitle=Leistungstrends \\u00fcber die Zeit\nstatisticsPeriod=Zeitraum\nstatisticsFrom=Von\nstatisticsTo=Bis\nstatisticsLoad=Laden\nstatisticsRefresh=Aktualisieren\nstatisticsExport=CSV exportieren\nstatisticsTotalRecords=Datens\\u00e4tze gesamt\nstatisticsAvgHitRatio=Mittlere Trefferquote\nstatisticsAvgLatency=Mittlere Latenz\nstatisticsTotalRequests=Anfragen gesamt\nstatisticsNoData=Keine Statistiken f\\u00fcr die gew\\u00e4hlten Kriterien\n\nhomePageTitle=cds-caching \\u2013 Dashboard\ncachingServicesHeader=Caching-Services\nnoCachesAvailable=Keine Caches verf\\u00fcgbar\ncolName=Name\ncolStatisticTrackingEnabled=Statistiken aktiv\ncolKeyTrackingEnabled=Schl\\u00fcsselmetriken aktiv\n\nttFullScreenEnter=Vollbildmodus\nttFullScreenExit=Vollbildmodus beenden\nttCloseMidColumn=Mittlere Spalte schlie\\u00dfen\nttCloseEndColumn=Rechte Spalte schlie\\u00dfen\n\ncachePagePrefix=Cache:\nenableMetricsLabel=Metriken aktivieren\nenableKeyMetricsLabel=Schl\\u00fcsselmetriken aktivieren\nactionClearCache=Cache leeren\n\ntabOverview=\\u00dcberblick\ntabMetrics=Metriken\ntabKeyMetrics=Schl\\u00fcsselmetriken\ntabBrowseCacheEntries=Cache-Eintr\\u00e4ge durchsuchen\n\nconfigCardTitle=Konfiguration\nconfigCardSubtitle=Cache-Konfiguration\ncreateEntryTitle=Cache-Eintrag anlegen\ncreateEntrySubtitle=Neuen Cache-Eintrag anlegen\ngetEntryTitle=Cache-Eintrag lesen\ngetEntrySubtitle=Cache-Eintrag abrufen\ndeleteEntryTitle=Cache-Eintrag l\\u00f6schen\ndeleteEntrySubtitle=Cache-Eintrag entfernen\n\nlabelKey=Schl\\u00fcssel\nlabelValue=Wert\nlabelTtlSeconds=TTL (Sekunden)\nbtnSetEntry=Eintrag setzen\nbtnGetEntry=Eintrag abrufen\nbtnDeleteEntry=Eintrag l\\u00f6schen\n\naggregatedMetricsByHour=Aggregierte Metriken pro Stunde\nbtnClearMetrics=Metriken leeren\nbtnLoadCacheEntries=Cache-Eintr\\u00e4ge laden\nkeyMetricsToolbarTitle=Schl\\u00fcsselmetriken\n\ngroupReadThrough=Read-Through\ngroupReadThroughOps=Read-Through-Vorg\\u00e4nge\ngroupReadThroughPerformance=Read-Through-Leistung\ngroupReadThroughLatencies=Read-Through-Latenzen\ngroupReadThroughHitLatencies=Read-Through-Treffer-Latenzen\ngroupReadThroughMissLatencies=Read-Through-Cache-Miss-Latenzen\ngroupNativeFunction=Native-Funktion\ngroupNativeFunctionOps=Native-Funktionsvorg\\u00e4nge\ngroupNativeFunctionPerformance=Native-Funktionsleistung\nctxGroup=Kontext\ninfoAdditional=Zusatzinformationen\n\ncolHits=Hits\ncolMisses=Misses\ncolTotalRequests=Anfragen gesamt\ncolHitRatioPct=Trefferquote %\ncolErrorRatePct=Fehlerrate %\ncolCacheEfficiency=Cache-Effizienz\ncolTimestamp=Zeitstempel\ncolAvgLatencyMs=\\u00d8 Latenz (ms)\ncolHitAvgMs=Treffer \\u00d8 (ms)\ncolHitMinMs=Treffer min (ms)\ncolHitMaxMs=Treffer max (ms)\ncolMissAvgMs=Miss \\u00d8 (ms)\ncolMissMinMs=Miss min (ms)\ncolMissMaxMs=Miss max (ms)\ncolTotal=Gesamt\ncolSets=Sets\ncolGets=Gets\ncolDeletes=Deletes\ncolClears=Clears\ncolDeleteByTags=L\\u00f6schen per Tags\ncolErrors=Fehler\ncolKeyName=Schl\\u00fcsselname\ncolOperation=Operation\ncolType=Typ\ncolOperationType=Operationstyp\ncolTarget=Ziel\ncolMetadata=Metadaten\ncolAvgHitLatencyMs=\\u00d8 Treffer-Latenz (ms)\ncolMinHitLatencyMs=Min. Treffer-Latenz (ms)\ncolMaxHitLatencyMs=Max. Treffer-Latenz (ms)\ncolAvgMissLatencyMs=\\u00d8 Miss-Latenz (ms)\ncolMinMissLatencyMs=Min. Miss-Latenz (ms)\ncolMaxMissLatencyMs=Max. Miss-Latenz (ms)\ncolTenant=Mandant\ncolUser=Benutzer\ncolLocale=Locale\ncolLastAccess=Letzter Zugriff\ncolFirstAccess=Erster Zugriff\ncolTags=Tags\nbtnShowMetadata=Metadaten anzeigen\n\ncacheEntriesTitle=Cache-Eintr\\u00e4ge\ncacheEntriesSubtitle=Alle Cache-Eintr\\u00e4ge durchsuchen (Vorsicht)\nmessageStripLoadEntriesWarning=Hinweis: Das Laden aller Cache-Eintr\\u00e4ge kann bei gro\\u00dfen Caches die Leistung beeintr\\u00e4chtigen. Verwenden Sie die Schaltfl\\u00e4che, um Bedarf einzutragen.\n\nchartPlaceholder=Diagramm-Ansicht wird hier implementiert\nselectChartHitLatency=Treffer-Latenz\nselectChartMissLatency=Miss-Latenz\n\ntrendsCardTitle=Trends\ntrendsCardSubtitle=Leistungstrends \\u00fcber die Zeit\n\nmetricDetailsPageTitle=Metrikdetails\nmetricPagePrefix=Metrik:\nkeyMetricDetailsPageTitle=Schl\\u00fcsselmetrikdetails\nkeyMetricPagePrefix=Schl\\u00fcssel:\nsectionReadThroughPerformance=Read-Through-Leistung\nsectionNativeFunctionPerformance=Native-Funktionsleistung\n\ntileSubCacheHitRate=Cache-Trefferquote\ntileSubPerformanceFactor=Leistungsfaktor\ntileSubReqPerSec=Anfragen pro Sekunde\ntileSubCacheErrors=Cache-Fehler\ntileSubCacheOperations=Cache-Operationen\ntileSubSuccessfulRetrievals=Erfolgreiche Lesevorg\\u00e4nge\ntileSubFailedRetrievals=Fehlgeschlagene Lesevorg\\u00e4nge\ntileSubErrorCount=Fehleranzahl\ntileSubCacheHitResponse=Antwort bei Treffer\ntileSubCacheMissResponse=Antwort bei Miss\nheaderCacheEfficiency=Cache-Effizienz\nheaderErrorRate=Fehlerrate\nheaderCacheHits=Cache-Treffer\nheaderCacheMisses=Cache-Misses\nheaderCacheErrors=Cache-Fehler\nheaderHitLatency=Treffer-Latenz\nheaderMissLatency=Miss-Latenz\nheaderNativeThroughput=Native-Durchsatz\nheaderNativeErrorRate=Native-Fehlerrate\nheaderNativeSets=Native-Set-Operationen\nheaderNativeGets=Native-Get-Operationen\nheaderNativeDeletes=Native-L\\u00f6schvorg\\u00e4nge\nheaderNativeClears=Native-Clear-Operationen\nheaderDeleteByTags=L\\u00f6schen per Tags\nheaderNativeErrors=Native-Fehler\nheaderTotalNativeOps=Native-Operationen gesamt\ntileSubNativeOpsPerSec=Operationen pro Sekunde\ntileSubWriteOps=Schreibvorg\\u00e4nge\ntileSubReadOps=Lesevorg\\u00e4nge\ntileSubDeleteOps=L\\u00f6schvorg\\u00e4nge\ntileSubClearOps=Clear-Operationen\ntileSubTagDeletes=Tag-basiertes L\\u00f6schen\ntileSubAllOperations=Alle Operationen\n\ncardReadThroughOps=Read-Through-Vorg\\u00e4nge\ncardReadThroughOpsSub=Verteilung Treffer/Miss/Fehler\ncardLatencyCompare=Latenzvergleich\ncardLatencyCompareSub=Read-Through-Latenzmetriken\ncardNativeFunctionOps=Native-Funktionsvorg\\u00e4nge\ncardNativeFunctionOpsSub=Verteilung Treffer/Miss/Fehler\n\nvizMeasureCount=Anzahl\nvizMeasureLatency=Latenz\n\nmsgNoCacheSelected=Kein Cache ausgew\\u00e4hlt\nmsgUpdatingStatsConfig=Statistik-Konfiguration wird aktualisiert\\u2026\nmsgStatsEnabled=Statistik-Erfassung aktiviert\nmsgStatsDisabled=Statistik-Erfassung deaktiviert\nmsgFailedUpdateStatsConfig=Statistik-Konfiguration konnte nicht aktualisiert werden\nmsgErrorUpdateStatsConfig=Fehler beim Aktualisieren der Statistik-Konfiguration\nmsgUpdatingKeyTracking=Schl\\u00fcsselverfolgung wird konfiguriert\\u2026\nmsgKeyTrackingEnabled=Schl\\u00fcsselverfolgung aktiviert\nmsgKeyTrackingDisabled=Schl\\u00fcsselverfolgung deaktiviert\nmsgFailedKeyTracking=Schl\\u00fcsselverfolgung konnte nicht konfiguriert werden\nmsgErrorKeyTracking=Fehler bei der Konfiguration der Schl\\u00fcsselverfolgung\nmsgStatsPersisted=Statistiken gespeichert\nmsgFailedPersistStats=Statistiken konnten nicht gespeichert werden\nmsgErrorPersistStats=Fehler beim Speichern der Statistiken\nmsgLoadEntriesFailed=Cache-Eintr\\u00e4ge konnten nicht geladen werden\nmsgProvideKeyValue=Bitte Schl\\u00fcssel und Wert eingeben\nmsgEntryCreated=Cache-Eintrag angelegt\nmsgCreateEntryFailed=Cache-Eintrag konnte nicht angelegt werden\nmsgProvideKey=Bitte einen Schl\\u00fcssel eingeben\nmsgEntryDeleted=Cache-Eintrag gel\\u00f6scht\nmsgDeleteEntryFailed=Cache-Eintrag konnte nicht gel\\u00f6scht werden\nmsgNotFound=Nicht gefunden\nmsgGetEntryError=Fehler: Eintrag nicht gefunden oder Fehler\nmsgMetricsEnabled=Metriken aktiviert\nmsgMetricsDisabled=Metriken deaktiviert\nmsgFailedUpdateMetrics=Metrik-Einstellung konnte nicht aktualisiert werden\nmsgKeyMetricsEnabled=Schl\\u00fcsselmetriken aktiviert\nmsgKeyMetricsDisabled=Schl\\u00fcsselmetriken deaktiviert\nmsgFailedKeyMetrics=Schl\\u00fcsselmetriken-Einstellung konnte nicht aktualisiert werden\nmsgConfirmClearCache=Cache wirklich leeren? Diese Aktion kann nicht r\\u00fcckg\\u00e4ngig gemacht werden.\nmsgCacheCleared=Cache geleert\nmsgClearCacheFailed=Cache konnte nicht geleert werden\nmsgMetricsCleared=Metriken geleert\nmsgKeyMetricsCleared=Schl\\u00fcsselmetriken geleert\nmsgFailedClearMetrics=Metriken konnten nicht geleert werden\nmsgFailedClearKeyMetrics=Schl\\u00fcsselmetriken konnten nicht geleert werden\nmsgMetricNotFound=Metrik nicht gefunden\nmsgLoadMetricFailed=Metrikdetails konnten nicht geladen werden\n\nkeyTabMetadata=Metadaten\nkeyTabSubject=Subject\nkeyTabQuery=Abfrage\nkeyTabCacheOptions=Cache-Optionen\n\nchartOpAvgHitLatency=Mittlere Treffer-Latenz\nchartOpAvgMissLatency=Mittlere Miss-Latenz\nchartOpAvgReadThroughLatency=Mittlere Read-Through-Latenz\nchartOpHits=Hits\nchartOpMisses=Misses\nchartOpErrors=Fehler\nchartOpSets=Sets\nchartOpGets=Gets\nchartOpDeletes=Deletes\nchartOpClears=Clears\nchartOpDeleteByTags=L\\u00f6schen per Tags\n\nchartTitleLatencyByOperation=Latenz je Operation\n',
|
|
16
16
|
"cds/plugin/caching/dashboard/i18n/i18n_en.properties":'# Default (English) \\u2013 bundle fallback\n\nappTitle=Cache Performance Dashboard\nappDescription=Comprehensive cache statistics and monitoring dashboard\nbtnText=Say Hello\n\n# Main Dashboard\nmainTitle=Cache Performance Dashboard\nrefreshButton=Refresh\npersistButton=Persist Statistics\n\n# Navigation\nkeyAnalysis=Key Analysis\n\n# Metrics\nhitRatio=Hit Ratio\navgLatency=Average Latency\nthroughput=Throughput\nerrorRate=Error Rate\ntotalRequests=Total Requests\nmemoryUsage=Memory Usage\nuniqueKeys=Unique Keys\nuptime=Uptime\n\n# Keys\nkeysTitle=Key Analysis\nkeysSubtitle=Cache Key Access Patterns\ntopKeys=Top Accessed Keys\ncoldKeys=Cold Keys\nkeyStatistics=Key Statistics\ntotalKeysTracked=Total Keys Tracked\nmostActiveKey=Most Active Key\nleastActiveKey=Least Active Key\n\n# Common\nloading=Loading...\nnoData=No data available\nerror=Error\nsuccess=Success\nwarning=Warning\n\n# Statistics Page\nstatisticsTitle=Statistics\nstatisticsSubtitle=Historical cache statistics\nstatisticsFilters=Filters\nstatisticsFiltersSubtitle=Select date range and period\nstatisticsSummary=Summary\nstatisticsSummarySubtitle=Statistics overview\nstatisticsData=Statistics Data\nstatisticsDataSubtitle=Detailed statistics records\nstatisticsTrends=Trends\nstatisticsTrendsSubtitle=Performance trends over time\nstatisticsPeriod=Period\nstatisticsFrom=From\nstatisticsTo=To\nstatisticsLoad=Load\nstatisticsRefresh=Refresh\nstatisticsExport=Export CSV\nstatisticsTotalRecords=Total Records\nstatisticsAvgHitRatio=Average Hit Ratio\nstatisticsAvgLatency=Average Latency\nstatisticsTotalRequests=Total Requests\nstatisticsNoData=No statistics found for the selected criteria\n\n# Main list\nhomePageTitle=cds-caching \\u2013 Dashboard\ncachingServicesHeader=Caching Services\nnoCachesAvailable=No caches available\ncolName=Name\ncolStatisticTrackingEnabled=Statistic Tracking Enabled\ncolKeyTrackingEnabled=Key Tracking Enabled\n\n# Tooltips\nttFullScreenEnter=Enter Full Screen Mode\nttFullScreenExit=Exit Full Screen Mode\nttCloseMidColumn=Close middle column\nttCloseEndColumn=Close end column\n\n# Cache view \\u2013 page\ncachePagePrefix=Cache:\nenableMetricsLabel=Enable Metrics\nenableKeyMetricsLabel=Enable Key Metrics\nactionClearCache=Clear Cache\n\n# Tabs\ntabOverview=Overview\ntabMetrics=Metrics\ntabKeyMetrics=Key Metrics\ntabBrowseCacheEntries=Browse Cache Entries\n\n# Cards overview\nconfigCardTitle=Configuration\nconfigCardSubtitle=Cache Configuration\ncreateEntryTitle=Create Cache Entry\ncreateEntrySubtitle=Create a new cache entry\ngetEntryTitle=Get Cache Entry\ngetEntrySubtitle=Get a cache entry\ndeleteEntryTitle=Delete Cache Entry\ndeleteEntrySubtitle=Delete a cache entry\n\n# Form\nlabelKey=Key\nlabelValue=Value\nlabelTtlSeconds=TTL (seconds)\nbtnSetEntry=Set Entry\nbtnGetEntry=Get Entry\nbtnDeleteEntry=Delete Entry\n\n# Metrics & toolbars\naggregatedMetricsByHour=Aggregated Metrics by Hour\nbtnClearMetrics=Clear Metrics\nbtnLoadCacheEntries=Load Cache Entries\nkeyMetricsToolbarTitle=Key Metrics\n\n# Column groups\ngroupReadThrough=Read-Through\ngroupReadThroughOps=Read-Through Operations\ngroupReadThroughPerformance=Read-Through Performance\ngroupReadThroughLatencies=Read-Through Latencies\ngroupReadThroughHitLatencies=Read-Through Hit Latencies\ngroupReadThroughMissLatencies=Read-Through Miss Latencies\ngroupNativeFunction=Native Function\ngroupNativeFunctionOps=Native Function Operations\ngroupNativeFunctionPerformance=Native Function Performance\nctxGroup=Context\ninfoAdditional=Additional Information\n\n# Column sub-labels\ncolHits=Hits\ncolMisses=Misses\ncolTotalRequests=Total Requests\ncolHitRatioPct=Hit Ratio %\ncolErrorRatePct=Error Rate %\ncolCacheEfficiency=Cache Efficiency\ncolTimestamp=Timestamp\ncolAvgLatencyMs=Avg Latency (ms)\ncolHitAvgMs=Hit Avg (ms)\ncolHitMinMs=Hit Min (ms)\ncolHitMaxMs=Hit Max (ms)\ncolMissAvgMs=Miss Avg (ms)\ncolMissMinMs=Miss Min (ms)\ncolMissMaxMs=Miss Max (ms)\ncolTotal=Total\ncolSets=Sets\ncolGets=Gets\ncolDeletes=Deletes\ncolClears=Clears\ncolDeleteByTags=Delete By Tags\ncolErrors=Errors\ncolKeyName=Key Name\ncolOperation=Operation\ncolType=Type\ncolOperationType=Operation Type\ncolTarget=Target\ncolMetadata=Metadata\ncolAvgHitLatencyMs=Avg Hit Latency (ms)\ncolMinHitLatencyMs=Min Hit Latency (ms)\ncolMaxHitLatencyMs=Max Hit Latency (ms)\ncolAvgMissLatencyMs=Avg Miss Latency (ms)\ncolMinMissLatencyMs=Min Miss Latency (ms)\ncolMaxMissLatencyMs=Max Miss Latency (ms)\ncolTenant=Tenant\ncolUser=User\ncolLocale=Locale\ncolLastAccess=Last Access\ncolFirstAccess=First Access\ncolTags=Tags\nbtnShowMetadata=Show Metadata\n\n# Browse\ncacheEntriesTitle=Cache Entries\ncacheEntriesSubtitle=Browse all cache entries (use with caution)\nmessageStripLoadEntriesWarning=Warning: Loading all cache entries may impact performance for large caches. Use the button below to load entries on demand.\n\n# Placeholder chart\nchartPlaceholder=Chart visualization will be implemented here\nselectChartHitLatency=Hit Latency\nselectChartMissLatency=Miss Latency\n\n# Card chart headers (hidden section)\ntrendsCardTitle=Trends\ntrendsCardSubtitle=Performance trends over time\n\n# Single metric \\u2013 page\nmetricDetailsPageTitle=Metric Details\nmetricPagePrefix=Metric:\nkeyMetricDetailsPageTitle=Key Metric Details\nkeyMetricPagePrefix=Key:\nsectionReadThroughPerformance=Read-Through Performance\nsectionNativeFunctionPerformance=Native Function Performance\n\n# Generic tiles\ntileSubCacheHitRate=Cache Hit Rate\ntileSubPerformanceFactor=Performance Factor\ntileSubReqPerSec=Requests per Second\ntileSubCacheErrors=Cache Errors\ntileSubCacheOperations=Cache Operations\ntileSubSuccessfulRetrievals=Successful Retrievals\ntileSubFailedRetrievals=Failed Retrievals\ntileSubErrorCount=Error Count\ntileSubCacheHitResponse=Cache Hit Response\ntileSubCacheMissResponse=Cache Miss Response\nheaderCacheEfficiency=Cache Efficiency\nheaderErrorRate=Error Rate\nheaderCacheHits=Cache Hits\nheaderCacheMisses=Cache Misses\nheaderCacheErrors=Cache Errors\nheaderHitLatency=Hit Latency\nheaderMissLatency=Miss Latency\nheaderNativeThroughput=Native Throughput\nheaderNativeErrorRate=Native Error Rate\nheaderNativeSets=Native Sets\nheaderNativeGets=Native Gets\nheaderNativeDeletes=Native Deletes\nheaderNativeClears=Native Clears\nheaderDeleteByTags=Delete By Tags\nheaderNativeErrors=Native Errors\nheaderTotalNativeOps=Total Native Ops\ntileSubNativeOpsPerSec=Operations per Second\ntileSubWriteOps=Write Operations\ntileSubReadOps=Read Operations\ntileSubDeleteOps=Delete Operations\ntileSubClearOps=Clear Operations\ntileSubTagDeletes=Tag-based Deletes\ntileSubAllOperations=All Operations\n\n# Cards (single metric)\ncardReadThroughOps=Read-Through Operations\ncardReadThroughOpsSub=Hit/Miss/Error Distribution\ncardLatencyCompare=Latency Comparison\ncardLatencyCompareSub=Read-Through Latency Metrics\ncardNativeFunctionOps=Native Function Operations\ncardNativeFunctionOpsSub=Operation Distribution\n\n# Viz internal labels\nvizMeasureCount=Count\nvizMeasureLatency=Latency\n\n# Controllers & messages\nmsgNoCacheSelected=No cache selected\nmsgUpdatingStatsConfig=Updating statistics configuration\\u2026\nmsgStatsEnabled=Statistics enabled successfully\nmsgStatsDisabled=Statistics disabled successfully\nmsgFailedUpdateStatsConfig=Failed to update statistics configuration\nmsgErrorUpdateStatsConfig=Error updating statistics configuration\nmsgUpdatingKeyTracking=Updating key tracking configuration\\u2026\nmsgKeyTrackingEnabled=Key tracking enabled successfully\nmsgKeyTrackingDisabled=Key tracking disabled successfully\nmsgFailedKeyTracking=Failed to update key tracking configuration\nmsgErrorKeyTracking=Error updating key tracking configuration\nmsgStatsPersisted=Statistics persisted successfully\nmsgFailedPersistStats=Failed to persist statistics\nmsgErrorPersistStats=Error persisting statistics\nmsgLoadEntriesFailed=Failed to load cache entries\nmsgProvideKeyValue=Please provide both key and value\nmsgEntryCreated=Cache entry created successfully\nmsgCreateEntryFailed=Failed to create cache entry\nmsgProvideKey=Please provide a key\nmsgEntryDeleted=Cache entry deleted successfully\nmsgDeleteEntryFailed=Failed to delete cache entry\nmsgNotFound=Not found\nmsgGetEntryError=Error: Entry not found or error occurred\nmsgMetricsEnabled=Metrics enabled successfully\nmsgMetricsDisabled=Metrics disabled successfully\nmsgFailedUpdateMetrics=Failed to update metrics setting\nmsgKeyMetricsEnabled=Key metrics enabled successfully\nmsgKeyMetricsDisabled=Key metrics disabled successfully\nmsgFailedKeyMetrics=Failed to update key metrics setting\nmsgConfirmClearCache=Are you sure you want to clear this cache? This action cannot be undone.\nmsgCacheCleared=Cache cleared successfully\nmsgClearCacheFailed=Failed to clear cache\nmsgMetricsCleared=Metrics cleared successfully\nmsgKeyMetricsCleared=Key metrics cleared successfully\nmsgFailedClearMetrics=Failed to clear metrics\nmsgFailedClearKeyMetrics=Failed to clear key metrics\nmsgMetricNotFound=Metric not found\nmsgLoadMetricFailed=Failed to load metric details\n\n# Key metrics popover tabs\nkeyTabMetadata=Metadata\nkeyTabSubject=Subject\nkeyTabQuery=Query\nkeyTabCacheOptions=Cache Options\n\n# Chart (single metric) \\u2013 operation labels\nchartOpAvgHitLatency=Average Hit Latency\nchartOpAvgMissLatency=Average Miss Latency\nchartOpAvgReadThroughLatency=Average Read-Through Latency\nchartOpHits=Hits\nchartOpMisses=Misses\nchartOpErrors=Errors\nchartOpSets=Sets\nchartOpGets=Gets\nchartOpDeletes=Deletes\nchartOpClears=Clears\nchartOpDeleteByTags=Delete By Tags\n\nchartTitleLatencyByOperation=Latency by Operation\n',
|
|
17
|
-
"cds/plugin/caching/dashboard/manifest.json":'{"_version":"1.12.0","sap.app":{"id":"cds.plugin.caching.dashboard","type":"application","i18n":"i18n/i18n.properties","title":"{{appTitle}}","description":"{{appDescription}}","applicationVersion":{"version":"1.0.0"},"sourceTemplate":{"id":"generator-ui5-ts-app","version":"1.1.0"},"dataSources":{"caching":{"uri":"/odata/v4/caching/","type":"OData","settings":{"odataVersion":"4.0"}}}},"sap.ui":{"technology":"UI5","icons":{},"deviceTypes":{"desktop":true,"tablet":true,"phone":true}},"sap.ui5":{"rootView":{"viewName":"cds.plugin.caching.dashboard.view.App","type":"XML","id":"app"},"dependencies":{"minUI5Version":"1.
|
|
17
|
+
"cds/plugin/caching/dashboard/manifest.json":'{"_version":"1.12.0","sap.app":{"id":"cds.plugin.caching.dashboard","type":"application","i18n":"i18n/i18n.properties","title":"{{appTitle}}","description":"{{appDescription}}","applicationVersion":{"version":"1.0.0"},"sourceTemplate":{"id":"generator-ui5-ts-app","version":"1.1.0"},"dataSources":{"caching":{"uri":"/odata/v4/caching-api/","type":"OData","settings":{"odataVersion":"4.0"}}}},"sap.ui":{"technology":"UI5","icons":{},"deviceTypes":{"desktop":true,"tablet":true,"phone":true}},"sap.ui5":{"rootView":{"viewName":"cds.plugin.caching.dashboard.view.App","type":"XML","id":"app"},"dependencies":{"minUI5Version":"1.148.10","libs":{"sap.ui.core":{},"sap.m":{},"sap.ui.layout":{},"sap.viz":{},"sap.ui.table":{},"sap.ui.unified":{},"sap.f":{},"sap.tnt":{}}},"handleValidation":true,"contentDensities":{"compact":true,"cozy":true},"models":{"i18n":{"type":"sap.ui.model.resource.ResourceModel","settings":{"bundleName":"cds.plugin.caching.dashboard.i18n.i18n","supportedLocales":["en","de"],"fallbackLocale":"en","async":true}},"formatter":{"type":"sap.ui.model.json.JSONModel","settings":{}},"":{"type":"sap.ui.model.odata.v4.ODataModel","dataSource":"caching","settings":{"operationMode":"Server","autoExpandSelect":true,"groupId":"$auto"}}},"routing":{"config":{"routerClass":"sap.f.routing.Router","viewType":"XML","viewPath":"cds.plugin.caching.dashboard.view","controlId":"fcl","controlAggregation":"pages"},"routes":[{"pattern":"","name":"main","target":"main","subroutes":[{"pattern":"cache/{cache}","name":"cache","target":"cache","subroutes":[{"pattern":"cache/{cache}/statistic/{metricId}","name":"singleMetric","target":"singleMetric"},{"pattern":"cache/{cache}/key-metric/{keyMetricId}/{keyName}","name":"singleKeyMetric","target":"singleKeyMetric"}]}]}],"targets":{"main":{"viewName":"Main","viewLevel":1,"controlAggregation":"beginColumnPages"},"cache":{"viewName":"Cache","viewLevel":2,"controlAggregation":"midColumnPages"},"singleMetric":{"viewName":"SingleMetric","viewLevel":3,"controlAggregation":"endColumnPages"},"singleKeyMetric":{"viewName":"SingleKeyMetric","viewLevel":3,"controlAggregation":"endColumnPages"}}},"flexBundle":false}}',
|
|
18
18
|
"cds/plugin/caching/dashboard/view/App.view.xml":'<mvc:View controllerName="cds.plugin.caching.dashboard.controller.App" displayBlock="true"\n\txmlns="sap.m"\n\txmlns:core="sap.ui.core"\n\txmlns:l="sap.ui.layout"\n\txmlns:f="sap.f"\n\txmlns:form="sap.ui.layout.form"\n\txmlns:fb="sap.ui.comp.filterbar"\n\txmlns:card="sap.f.cards"\n\txmlns:viz="sap.viz.ui5.controls"\n\txmlns:viz.feeds="sap.viz.ui5.controls.common.feeds"\n\txmlns:mvc="sap.ui.core.mvc"><App id="app"><f:FlexibleColumnLayout id="fcl" layout="{app>/layout}"></f:FlexibleColumnLayout></App></mvc:View> ',
|
|
19
19
|
"cds/plugin/caching/dashboard/view/Cache.view.xml":'<mvc:View controllerName="cds.plugin.caching.dashboard.controller.Cache"\n\txmlns="sap.m"\n\txmlns:mvc="sap.ui.core.mvc"\n\txmlns:f="sap.f"\n\txmlns:card="sap.f.cards"\n\txmlns:core="sap.ui.core"\n\txmlns:l="sap.ui.layout"\n\txmlns:ui="sap.ui.table"\n\txmlns:form="sap.ui.layout.form"\n\txmlns:semantic="sap.m.semantic"\n\txmlns:unified="sap.ui.unified"\n\txmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1" app:routePattern="statistics" core:require="{\n\t\tformatter: \'cds/plugin/caching/dashboard/model/formatter\'\n\t}"><f:DynamicPage title="{= ${i18n>cachePagePrefix} + \' \' + ${app>/selectedCache} }" stickySubheaderProvider="cacheStickySubheaderProvider"><f:title><f:DynamicPageTitle><f:heading><Title text="{= ${i18n>cachePagePrefix} + \' \' + ${app>/selectedCache} }"/></f:heading><f:actions><Label text="{i18n>enableMetricsLabel}" class=""/><Switch id="cacheEnableMetrics" state="{ path: \'metricsEnabled\', mode: \'sap.ui.model.BindingMode.OneWay\'}" change="onEnableMetricsChange" /><Label text="{i18n>enableKeyMetricsLabel}" class=""/><Switch id="cacheEnableKeyMetrics" state="{ path: \'keyMetricsEnabled\', mode: \'sap.ui.model.BindingMode.OneWay\' }" change="onEnableKeyMetricsChange" /><ToolbarSeparator /><Button text="{i18n>actionClearCache}" type="Transparent" press="onClearCache" /></f:actions><f:navigationActions><OverflowToolbarButton type="Transparent" icon="sap-icon://full-screen" press="handleFullScreen" tooltip="{i18n>ttFullScreenEnter}" visible="{= ${app>/layout} === \'TwoColumnsMidExpanded\' }"/><OverflowToolbarButton type="Transparent" icon="sap-icon://exit-full-screen" press="handleExitFullScreen" tooltip="{i18n>ttFullScreenExit}" visible="{= ${app>/layout} === \'MidColumnFullScreen\' }"/><OverflowToolbarButton type="Transparent" icon="sap-icon://decline" press="handleClose" tooltip="{i18n>ttCloseMidColumn}"/></f:navigationActions></f:DynamicPageTitle></f:title><f:header><f:DynamicPageHeader><f:content></f:content></f:DynamicPageHeader></f:header><f:content><IconTabBar id="cacheStickySubheaderProvider" stretchContentHeight="true" expandable="false" headerMode="Inline" selectedKey="{ui>/selectedTab}"><items><IconTabFilter text="{i18n>tabOverview}" key="main"><f:GridContainer snapToRow="true" allowDenseFill="true"><f:Card><f:header><card:Header title="{i18n>configCardTitle}" subtitle="{i18n>configCardSubtitle}" /></f:header><f:content><VBox width="100%"><form:SimpleForm width="100%" editable="true" labelSpanL="2" labelSpanM="2" labelSpanS="2" layout="ResponsiveGridLayout"><form:content><TextArea rows="10" editable="false" width="100%" value="{ path: \'config\', formatter: \'formatter.formatJSON\' }" /></form:content></form:SimpleForm></VBox></f:content><f:layoutData><f:GridContainerItemLayoutData columns="6" minRows="3"/></f:layoutData></f:Card><f:Card><f:header><card:Header title="{i18n>createEntryTitle}" subtitle="{i18n>createEntrySubtitle}" /></f:header><f:content><VBox width="100%"><form:SimpleForm width="100%" editable="true" labelSpanL="2" labelSpanM="2" labelSpanS="2" layout="ResponsiveGridLayout"><form:content><Label text="{i18n>labelKey}" /><Input id="createKeyInput" value="{ui>/createKey}" width="100%" /><Label text="{i18n>labelValue}"/><TextArea id="createValueInput" rows="10" value="{ui>/createValue}" width="100%" /><Label text="{i18n>labelTtlSeconds}"/><Input id="createTtlInput" type="Number" value="{ui>/createTtl}" width="100%" /></form:content></form:SimpleForm><Button text="{i18n>btnSetEntry}" type="Emphasized" press="onSetKey" class="sapUiSmallMarginEnd sapUiSmallMarginBottom"><layoutData><FlexItemData alignSelf="End" /></layoutData></Button></VBox></f:content><f:layoutData><f:GridContainerItemLayoutData columns="6" minRows="3"/></f:layoutData></f:Card><f:Card><f:header><card:Header title="{i18n>getEntryTitle}" subtitle="{i18n>getEntrySubtitle}" /></f:header><f:content><VBox width="100%"><form:SimpleForm width="100%" editable="true" labelSpanL="2" labelSpanM="2" labelSpanS="2" layout="ResponsiveGridLayout"><form:content><Label text="{i18n>labelKey}"/><Input id="getKeyInput" value="{ui>/getKey}" width="100%" /><Label text="{i18n>labelValue}"/><TextArea id="getValueOutput" rows="10" editable="false" width="100%" value="{ui>/getValue}" /></form:content></form:SimpleForm><Button text="{i18n>btnGetEntry}" type="Emphasized" press="onGetKey" class="sapUiSmallMarginEnd sapUiSmallMarginBottom"><layoutData><FlexItemData alignSelf="End" /></layoutData></Button></VBox></f:content><f:layoutData><f:GridContainerItemLayoutData columns="6" minRows="3"/></f:layoutData></f:Card><f:Card><f:header><card:Header title="{i18n>deleteEntryTitle}" subtitle="{i18n>deleteEntrySubtitle}" /></f:header><f:content><VBox width="100%"><form:SimpleForm width="100%" editable="true" labelSpanL="2" labelSpanM="2" labelSpanS="2" layout="ResponsiveGridLayout"><form:content><Label text="{i18n>labelKey}" class=""/><Input id="deleteKeyInput" value="{ui>/deleteKey}" width="100%" /></form:content></form:SimpleForm><Button text="{i18n>btnDeleteEntry}" type="Emphasized" press="onDeleteKey" class="sapUiSmallMarginEnd sapUiSmallMarginBottom"><layoutData><FlexItemData alignSelf="End" /></layoutData></Button></VBox></f:content><f:layoutData><f:GridContainerItemLayoutData columns="6" minRows="3"/></f:layoutData></f:Card></f:GridContainer></IconTabFilter><IconTabSeparator /><IconTabFilter text="{i18n>tabMetrics}" key="metrics"><Toolbar class="sapUiTinyMarginBottom" design="Transparent" style="Clear"><Title text="{i18n>aggregatedMetricsByHour}" /><ToolbarSpacer /><Button icon="sap-icon://refresh" text="{i18n>refreshButton}" press="onRefreshMetricsData" type="Transparent" class="sapUiTinyMarginEnd" /><Button type="Transparent" text="{i18n>btnClearMetrics}" press="onClearMetrics" class="sapUiTinyMarginEnd" /></Toolbar><ui:Table id="metricsTable" rows="{\n\t\t\t\t\t\t\t\t \tpath: \'/Metrics\',\n\t\t\t\t\t\t\t\t\tsuspended: true,\n\t\t\t\t\t\t\t\t\tfilters: [{\n\t\t\t\t\t\t\t\t\t\tpath: \'cache\',\n\t\t\t\t\t\t\t\t\t\toperator: \'EQ\',\n\t\t\t\t\t\t\t\t\t\tvalue1: \'{app>/selectedCache}\'\n\t\t\t\t\t\t\t\t\t}],\n\t\t\t\t\t\t\t\t\tsorter: {\n\t\t\t\t\t\t\t\t\t\tpath: \'timestamp\',\n\t\t\t\t\t\t\t\t\t\tdescending: true\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t }" rowMode="Auto" selectionMode="Single" selectionBehavior="RowOnly" rowSelectionChange=".onMetricsRowSelect" enableColumnReordering="true"><ui:columns><ui:Column width="150px" sortProperty="timestamp" filterProperty="timestamp"><ui:label><Text text="{i18n>colTimestamp}" /></ui:label><ui:template><Text text="{ path: \'timestamp\'}" /></ui:template></ui:Column><ui:Column width="80px" sortProperty="hits" filterProperty="hits" headerSpan="15,1"><ui:multiLabels><Text text="{i18n>groupReadThrough}" /><Text text="{i18n>colHits}" /></ui:multiLabels><ui:template><Text text="{path: \'hits\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="80px" sortProperty="misses" filterProperty="misses"><ui:multiLabels><Text text="{i18n>groupReadThrough}" /><Text text="{i18n>colMisses}" /></ui:multiLabels><ui:template><Text text="{path: \'misses\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="80px" sortProperty="errors" filterProperty="errors"><ui:multiLabels><Text text="{i18n>groupReadThrough}" /><Text text="{i18n>colErrors}" /></ui:multiLabels><ui:template><Text text="{path: \'errors\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="80px" sortProperty="totalRequests" filterProperty="totalRequests"><ui:multiLabels><Text text="{i18n>groupReadThrough}" /><Text text="{i18n>colTotalRequests}" /></ui:multiLabels><ui:template><Text text="{path: \'totalRequests\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="100px" sortProperty="hitRatio" filterProperty="hitRatio"><ui:multiLabels><Text text="{i18n>groupReadThroughPerformance}" /><Text text="{i18n>colHitRatioPct}" /></ui:multiLabels><ui:template><Text text="{path: \'hitRatio\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="100px" sortProperty="throughput" filterProperty="throughput"><ui:multiLabels><Text text="{i18n>groupReadThroughPerformance}" /><Text text="{i18n>throughput}" /></ui:multiLabels><ui:template><Text text="{path: \'throughput\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="100px" sortProperty="errorRate" filterProperty="errorRate"><ui:multiLabels><Text text="{i18n>groupReadThroughPerformance}" /><Text text="{i18n>colErrorRatePct}" /></ui:multiLabels><ui:template><Text text="{path: \'errorRate\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="cacheEfficiency" filterProperty="cacheEfficiency"><ui:multiLabels><Text text="{i18n>groupReadThroughPerformance}" /><Text text="{i18n>colCacheEfficiency}" /></ui:multiLabels><ui:template><Text text="{path: \'cacheEfficiency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="avgReadThroughLatency" filterProperty="avgReadThroughLatency" headerSpan="8,1"><ui:multiLabels><Text text="{i18n>groupReadThroughLatencies}" /><Text text="{i18n>colAvgLatencyMs}" /></ui:multiLabels><ui:template><Text text="{path: \'avgReadThroughLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}ms" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="avgHitLatency" filterProperty="avgHitLatency" headerSpan="8,1"><ui:multiLabels><Text text="{i18n>groupReadThroughHitLatencies}" /><Text text="{i18n>colHitAvgMs}" /></ui:multiLabels><ui:template><Text text="{path: \'avgHitLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}ms" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="minHitLatency" filterProperty="minHitLatency"><ui:multiLabels><Text text="{i18n>groupReadThroughHitLatencies}" /><Text text="{i18n>colHitMinMs}" /></ui:multiLabels><ui:template><Text text="{path: \'minHitLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}ms" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="maxHitLatency" filterProperty="maxHitLatency"><ui:multiLabels><Text text="{i18n>groupReadThroughHitLatencies}" /><Text text="{i18n>colHitMaxMs}" /></ui:multiLabels><ui:template><Text text="{path: \'maxHitLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}ms" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="avgMissLatency" filterProperty="avgMissLatency" headerSpan="5,1"><ui:multiLabels><Text text="{i18n>groupReadThroughMissLatencies}" /><Text text="{i18n>colMissAvgMs}" /></ui:multiLabels><ui:template><Text text="{path: \'avgMissLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}ms" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="minMissLatency" filterProperty="minMissLatency"><ui:multiLabels><Text text="{i18n>groupReadThroughMissLatencies}" /><Text text="{i18n>colMissMinMs}" /></ui:multiLabels><ui:template><Text text="{path: \'minMissLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}ms" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="maxMissLatency" filterProperty="maxMissLatency"><ui:multiLabels><Text text="{i18n>groupReadThroughMissLatencies}" /><Text text="{i18n>colMissMaxMs}" /></ui:multiLabels><ui:template><Text text="{path: \'maxMissLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}ms" /></ui:template></ui:Column><ui:Column width="80px" sortProperty="nativeSets" filterProperty="nativeSets" headerSpan="9,1"><ui:multiLabels><Text text="{i18n>groupNativeFunction}" /><Text text="{i18n>colSets}" /></ui:multiLabels><ui:template><Text text="{path: \'nativeSets\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="80px" sortProperty="nativeGets" filterProperty="nativeGets"><ui:multiLabels><Text text="{i18n>groupNativeFunctionOps}" /><Text text="{i18n>colGets}" /></ui:multiLabels><ui:template><Text text="{path: \'nativeGets\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="80px" sortProperty="nativeDeletes" filterProperty="nativeDeletes"><ui:multiLabels><Text text="{i18n>groupNativeFunctionOps}" /><Text text="{i18n>colDeletes}" /></ui:multiLabels><ui:template><Text text="{path: \'nativeDeletes\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="80px" sortProperty="nativeClears" filterProperty="nativeClears"><ui:multiLabels><Text text="{i18n>groupNativeFunctionOps}" /><Text text="{i18n>colClears}" /></ui:multiLabels><ui:template><Text text="{path: \'nativeClears\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="80px" sortProperty="nativeDeleteByTags" filterProperty="nativeDeleteByTags"><ui:multiLabels><Text text="{i18n>groupNativeFunctionOps}" /><Text text="{i18n>colDeleteByTags}" /></ui:multiLabels><ui:template><Text text="{path: \'nativeDeleteByTags\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="80px" sortProperty="nativeErrors" filterProperty="nativeErrors"><ui:multiLabels><Text text="{i18n>groupNativeFunctionOps}" /><Text text="{i18n>colErrors}" /></ui:multiLabels><ui:template><Text text="{path: \'nativeErrors\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="80px" sortProperty="totalNativeOperations" filterProperty="totalNativeOperations"><ui:multiLabels><Text text="{i18n>groupNativeFunctionOps}" /><Text text="{i18n>colTotal}" /></ui:multiLabels><ui:template><Text text="{path: \'totalNativeOperations\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="100px" sortProperty="nativeThroughput" filterProperty="nativeThroughput" headerSpan="2,1"><ui:multiLabels><Text text="{i18n>groupNativeFunctionPerformance}" /><Text text="{i18n>throughput}" /></ui:multiLabels><ui:template><Text text="{path: \'nativeThroughput\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="100px" sortProperty="nativeErrorRate" filterProperty="nativeErrorRate"><ui:multiLabels><Text text="{i18n>groupNativeFunctionPerformance}" /><Text text="{i18n>colErrorRatePct}" /></ui:multiLabels><ui:template><Text text="{path: \'nativeErrorRate\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column></ui:columns></ui:Table><f:Card class="sapUiTinyMarginBottom" visible="false"><f:header><card:Header title="{i18n>statisticsTrends}" subtitle="{i18n>statisticsTrendsSubtitle}" /></f:header><f:content><l:VerticalLayout class="sapUiTinyMargin"><l:HorizontalLayout class="sapUiTinyMarginBottom"><Select id="cacheChartMetric" selectedKey="{ui>/chartMetric}" change=".onChartMetricChange" class="sapUiTinyMarginEnd"><core:Item key="hitRatio" text="{i18n>hitRatio}" /><core:Item key="avgLatency" text="{i18n>avgLatency}" /><core:Item key="avgHitLatency" text="{i18n>selectChartHitLatency}" /><core:Item key="avgMissLatency" text="{i18n>selectChartMissLatency}" /><core:Item key="cacheEfficiency" text="{i18n>colCacheEfficiency}" /><core:Item key="throughput" text="{i18n>throughput}" /><core:Item key="errorRate" text="{i18n>errorRate}" /><core:Item key="memoryUsage" text="{i18n>memoryUsage}" /></Select></l:HorizontalLayout><Text text="{i18n>chartPlaceholder}" /></l:VerticalLayout></f:content></f:Card></IconTabFilter><IconTabFilter text="{i18n>keyMetricsToolbarTitle}" key="keymetrics"><Toolbar class="sapUiTinyMarginBottom" design="Transparent" style="Clear"><Title text="{i18n>keyMetricsToolbarTitle}" /><ToolbarSpacer /><Button icon="sap-icon://refresh" text="{i18n>refreshButton}" press="onRefreshKeyMetricsData" type="Transparent" class="sapUiTinyMarginEnd" /><Button type="Transparent" text="{i18n>btnClearMetrics}" press="onClearKeyMetrics" class="sapUiTinyMarginEnd" /></Toolbar><ui:Table id="keyMetricsTable" rows="{\n\t\t\t\t\t\t\t\t \tpath: \'/KeyMetrics\',\n\t\t\t\t\t\t\t\t\tsuspended: true,\n\t\t\t\t\t\t\t\t\tfilters: [{\n\t\t\t\t\t\t\t\t\t\tpath: \'cache\',\n\t\t\t\t\t\t\t\t\t\toperator: \'EQ\',\n\t\t\t\t\t\t\t\t\t\tvalue1: \'{app>/selectedCache}\'\n\t\t\t\t\t\t\t\t\t}]\n\t\t\t\t\t\t\t\t }" \n\t\t\t\t\t\t\t\t rowMode="Auto" \n\t\t\t\t\t\t\t\t selectionMode="Single"\n\t\t\t\t\t\t\t\t selectionBehavior="RowOnly"\n\t\t\t\t\t\t\t\t rowSelectionChange=".onKeyMetricsRowSelect"\n\t\t\t\t\t\t\t\t enableColumnReordering="true"><ui:columns><ui:Column minWidth="200px" sortProperty="keyName" filterProperty="keyName"><ui:multiLabels><Text text="{i18n>colKeyName}" /></ui:multiLabels><ui:template><VBox width="100%"><Text text="{ path: \'keyName\'}" tooltip="{keyName}" wrapping="false" wrappingType="Normal" /><Text visible="false" text="{query}" /><Text visible="false" text="{metadata}" /><Text visible="false" text="{subject}" /><Text visible="false" text="{cacheOptions}" /></VBox></ui:template></ui:Column><ui:Column width="100px" sortProperty="operation" filterProperty="operation" headerSpan="5,1"><ui:multiLabels><Text text="{i18n>ctxGroup}" /><Text text="{i18n>colOperation}" /></ui:multiLabels><ui:template><Text text="{operation}" /></ui:template></ui:Column><ui:Column width="150px" sortProperty="dataType" filterProperty="dataType" ><ui:multiLabels><Text text="{i18n>ctxGroup}" /><Text text="{i18n>colType}" /></ui:multiLabels><ui:template><Text text="{dataType}" /></ui:template></ui:Column><ui:Column width="150px" sortProperty="operationType" filterProperty="operationType"><ui:multiLabels><Text text="{i18n>ctxGroup}" /><Text text="{i18n>colOperationType}" /></ui:multiLabels><ui:template><Text text="{operationType}" /></ui:template></ui:Column><ui:Column width="200px" sortProperty="target" filterProperty="target"><ui:multiLabels><Text text="{i18n>ctxGroup}" /><Text text="{i18n>colTarget}" /></ui:multiLabels><ui:template><Text text="{target}" /></ui:template></ui:Column><ui:Column width="180px" ><ui:multiLabels><Text text="{i18n>ctxGroup}" /><Text text="{i18n>colMetadata}" /></ui:multiLabels><ui:template><Button text="{i18n>btnShowMetadata}" type="Transparent" press="onShowKeyMetricsMetadata" /></ui:template></ui:Column><ui:Column width="60px" sortProperty="hits" filterProperty="hits" headerSpan="11,1"><ui:multiLabels><Text text="{i18n>groupReadThrough}" /><Text text="{i18n>colHits}" /></ui:multiLabels><ui:template><Text text="{path: \'hits\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="60px" sortProperty="misses" filterProperty="misses"><ui:multiLabels><Text text="{i18n>groupReadThroughOps}" /><Text text="{i18n>colMisses}" /></ui:multiLabels><ui:template><Text text="{path: \'misses\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="60px" sortProperty="total" filterProperty="total"><ui:multiLabels><Text text="{i18n>groupReadThroughOps}" /><Text text="{i18n>colTotal}" /></ui:multiLabels><ui:template><Text text="{path: \'totalRequests\', type: \'sap.ui.model.type.Integer\'}" /></ui:template></ui:Column><ui:Column width="100px" sortProperty="hitRatio" filterProperty="hitRatio" headerSpan="2,1"><ui:multiLabels><Text text="{i18n>groupReadThroughPerformance}" /><Text text="{i18n>colHitRatioPct}" /></ui:multiLabels><ui:template><Text text="{path: \'hitRatio\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="cacheEfficiency" filterProperty="cacheEfficiency"><ui:multiLabels><Text text="{i18n>groupReadThroughPerformance}" /><Text text="{i18n>colCacheEfficiency}" /></ui:multiLabels><ui:template><Text text="{path: \'cacheEfficiency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="avgHitLatency" filterProperty="avgHitLatency" headerSpan="5,1"><ui:multiLabels><Text text="{i18n>groupReadThroughHitLatencies}" /><Text text="{i18n>colAvgHitLatencyMs}" /></ui:multiLabels><ui:template><Text text="{path: \'avgHitLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="minHitLatency" filterProperty="minHitLatency"><ui:multiLabels><Text text="{i18n>groupReadThroughHitLatencies}" /><Text text="{i18n>colMinHitLatencyMs}" /></ui:multiLabels><ui:template><Text text="{path: \'minHitLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="maxHitLatency" filterProperty="maxHitLatency"><ui:multiLabels><Text text="{i18n>groupReadThroughHitLatencies}" /><Text text="{i18n>colMaxHitLatencyMs}" /></ui:multiLabels><ui:template><Text text="{path: \'maxHitLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="avgMissLatency" filterProperty="avgMissLatency" headerSpan="5,1"><ui:multiLabels><Text text="{i18n>groupReadThroughMissLatencies}" /><Text text="{i18n>colAvgMissLatencyMs}" /></ui:multiLabels><ui:template><Text text="{path: \'avgMissLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="minMissLatency" filterProperty="minMissLatency"><ui:multiLabels><Text text="{i18n>groupReadThroughMissLatencies}" /><Text text="{i18n>colMinMissLatencyMs}" /></ui:multiLabels><ui:template><Text text="{path: \'minMissLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="120px" sortProperty="maxMissLatency" filterProperty="maxMissLatency"><ui:multiLabels><Text text="{i18n>groupReadThroughMissLatencies}" /><Text text="{i18n>colMaxMissLatencyMs}" /></ui:multiLabels><ui:template><Text text="{path: \'maxMissLatency\', type: \'sap.ui.model.type.Float\', formatOptions: {style: \'short\', decimals: 2}}" /></ui:template></ui:Column><ui:Column width="70px" sortProperty="nativeHits" filterProperty="nativeHits" headerSpan="4,1"><ui:multiLabels><Text text="{i18n>groupNativeFunctionOps}" /><Text text="{i18n>colHits}" /></ui:multiLabels><ui:template><Text text="{nativeHits}" /></ui:template></ui:Column><ui:Column width="70px" sortProperty="nativeMisses" filterProperty="nativeMisses"><ui:multiLabels><Text text="{i18n>groupNativeFunctionOps}" /><Text text="{i18n>colMisses}" /></ui:multiLabels><ui:template><Text text="{nativeMisses}" /></ui:template></ui:Column><ui:Column width="70px" sortProperty="nativeSets" filterProperty="nativeSets"><ui:multiLabels><Text text="{i18n>groupNativeFunctionOps}" /><Text text="{i18n>colSets}" /></ui:multiLabels><ui:template><Text text="{nativeSets}" /></ui:template></ui:Column><ui:Column width="70px" sortProperty="nativeDeletes" filterProperty="nativeDeletes"><ui:multiLabels><Text text="{i18n>groupNativeFunctionOps}" /><Text text="{i18n>colDeletes}" /></ui:multiLabels><ui:template><Text text="{nativeDeletes}" /></ui:template></ui:Column><ui:Column width="100px" sortProperty="tenant" filterProperty="tenant" headerSpan="5,1"><ui:multiLabels><Text text="{i18n>infoAdditional}" /><Text text="{i18n>colTenant}" /></ui:multiLabels><ui:template><Text text="{tenant}" /></ui:template></ui:Column><ui:Column width="100px" sortProperty="user" filterProperty="user"><ui:multiLabels><Text text="{i18n>infoAdditional}" /><Text text="{i18n>colUser}" /></ui:multiLabels><ui:template><Text text="{user}" /></ui:template></ui:Column><ui:Column width="80px" sortProperty="locale" filterProperty="locale"><ui:multiLabels><Text text="{i18n>infoAdditional}" /><Text text="{i18n>colLocale}" /></ui:multiLabels><ui:template><Text text="{locale}" /></ui:template></ui:Column><ui:Column width="150px" sortProperty="lastAccess" filterProperty="lastAccess" ><ui:multiLabels><Text text="{i18n>infoAdditional}" /><Text text="{i18n>colLastAccess}" /></ui:multiLabels><ui:template><Text text="{ path: \'lastAccess\'}" /></ui:template></ui:Column><ui:Column width="150px" sortProperty="timestamp" filterProperty="timestamp"><ui:multiLabels><Text text="{i18n>infoAdditional}" /><Text text="{i18n>colFirstAccess}" /></ui:multiLabels><ui:template><Text text="{ path: \'timestamp\'}" /></ui:template></ui:Column></ui:columns></ui:Table></IconTabFilter><IconTabSeparator ></IconTabSeparator><IconTabFilter text="{i18n>tabBrowseCacheEntries}" key="entries" icon="sap-icon://warning" iconColor="Critical"><l:VerticalLayout width="100%"><f:Card class="sapUiTinyMargin"><f:header><card:Header title="{i18n>cacheEntriesTitle}" subtitle="{i18n>cacheEntriesSubtitle}" /></f:header><f:content><l:VerticalLayout class="sapUiTinyMargin"><MessageStrip text="{i18n>messageStripLoadEntriesWarning}" type="Warning" showIcon="true" class="sapUiTinyMarginBottom" /><Button text="{i18n>btnLoadCacheEntries}" icon="sap-icon://download" press="onLoadCacheEntries" type="Emphasized" class="sapUiTinyMarginBottom" /><Table id="cacheEntriesTable" items="{ui>/cacheEntries}" busyIndicatorDelay="0" busy="{ui>/loadingEntries}" visible="{ui>/showEntriesTable}"><columns><Column width="200px"><Text text="{i18n>labelKey}" /></Column><Column width="300px"><Text text="{i18n>labelValue}" /></Column><Column width="100px"><Text text="{i18n>colTags}" /></Column><Column width="150px"><Text text="{i18n>colTimestamp}" /></Column></columns><items><ColumnListItem><cells><Text text="{ui>entryKey}" tooltip="{ui>entryKey}" /><Text text="{ui>value}" tooltip="{ui>value}" /><Text text="{ui>tags}" /><Text text="{ path: \'ui>timestamp\'}" /></cells></ColumnListItem></items></Table></l:VerticalLayout></f:content></f:Card></l:VerticalLayout></IconTabFilter></items></IconTabBar></f:content></f:DynamicPage></mvc:View> ',
|
|
20
20
|
"cds/plugin/caching/dashboard/view/KeyMetricsMetadata.fragment.xml":'<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:form="sap.ui.layout.form"><Popover title="{localData>/keyName}" placement="Bottom" contentWidth="30rem"><content><IconTabBar><items><IconTabFilter text="{i18n>keyTabMetadata}"><content><TextArea value="{localData>/metadata}" rows="20" width="100%" editable="false" /></content></IconTabFilter><IconTabFilter text="{i18n>keyTabSubject}"><content><TextArea value="{localData>/subject}" rows="20" width="100%" editable="false" /></content></IconTabFilter><IconTabFilter text="{i18n>keyTabQuery}"><content><TextArea value="{localData>/query}" rows="20" width="100%" editable="false" /></content></IconTabFilter><IconTabFilter text="{i18n>keyTabCacheOptions}"><content><TextArea value="{localData>/cacheOptions}" rows="20" width="100%" editable="false" /></content></IconTabFilter></items></IconTabBar></content></Popover></core:FragmentDefinition>\n',
|
|
@@ -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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,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,YAA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KwC,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,KA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C,cAAcD,YAAY,UAAW,sBAC9C,EAEO6D,qBAAoB,SAAAC,IACvBxG,KAAK2C,cAAcD,YAAY,UAAW,0BAC9C,EAEO+D,YAAW,SAAAC,IACd1G,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,KAAK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/B,EAAK+B,UACpC,MAAMC,EAAc9C,KAAKC,MAAM2C,EAAS,KACxC,MAAMG,EAAc/C,KAAKC,MAAM6C,EAAc,IAC7C,MAAME,EAAYhD,KAAKC,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/\",\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,W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OAAO,IACX,CACJ,CAEA,uBAAM2D,CAAkB1E,EAAmB2E,GACvC,IACI,MAAM1C,EAAUxC,KAAKD,MAAM0C,YAAY,2BACvCD,EAAQ2C,aAAa,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":""}}]}
|
|
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,eAAc,SAAAC,EAACC,GAClB,MAAMC,MAAEA,GAAUD,EAAME,aAAa,aACrC1B,KAAK2B,cAAcC,YAAY,iBAAkBH,GACjDzB,KAAK2B,cAAcC,YAAY,UAAW,yBAE1C5B,KAAKiB,UAAUY,YAAY,CACvBC,KAAM,YAAYL,EAAMM,QAAQ,KAAM,UACtCC,OAAQ,CACJC,OAAQA,KACJ,MAAMC,EAAUlC,KAAKiB,UAAUkB,qBAAqBC,kBACpD,GAAIF,EAAS,CACTlC,KAAKC,QAAQ2B,YAAY,UAAWM,EAAQG,YAAY,kBACxDrC,KAAKsC,iBACLtC,KAAKuC,oBACT,KAIhB,EAEQD,eAAc,SAAAE,EAACC,EAAU,OAC7B,MAAMC,EAAQ1C,KAAKiB,UAAU0B,KAAK,gBAClC,MAAMC,EAAUF,EAAMG,WAAW,QACjC,GAAID,EAAQE,cAAe,CACvBF,EAAQG,QACZ,CACA,GAAIN,EAAS,CACTG,EAAQH,SACZ,CACJ,EAEQF,mBAAkB,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AKgB,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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QkE,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,EACVC,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,GACtCH,KAAK2C,cAAcD,YAAY,UAAW,2BAE1C1C,KAAK4C,WAAWJ,EAAOrC,GACvBH,KAAK6C,aACT,EAEQC,kBAAiB,SAAAC,EAACC,GACtB,OAAOA,EAAMC,QAAQ,KAAM,KAC/B,EAEcL,WAAUM,eAAAC,EAACC,EAAmBjD,GACxC,IACI,MAAMkD,EAAQrD,KAAKsD,gBACnB,MAAMC,QAAWvD,KAAKwD,oBAEtB,MAAMC,EAAUJ,EAAMK,YAClB,gBAAgB1D,KAAK8C,kBAAkB3C,cAAqB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CAAET,QAAS,QAE1B,CACJ,EAEOc,UAAS,SAAAC,IACZ,MAAM/C,EAAYpD,KAAK2C,cAAcyD,YAAY,kBACjD,MAAMjG,EAAWH,KAAKC,QAAQmG,YAAY,aAE1C,GAAIhD,GAAajD,EAAU,CACvBH,KAAK4C,WAAWQ,EAAWjD,EAC/B,CACJ,EAEOkG,iBAAgB,SAAAC,IACnBtG,KAAK2C,cAAcD,YAAY,UAAW,sBAC9C,EAEO6D,qBAAoB,SAAAC,IACvBxG,KAAK2C,cAAcD,YAAY,UAAW,0BAC9C,EAEO+D,YAAW,SAAAC,IACd1G,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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CACA,GAAIA,EAAQE,QAAUD,EAAW,CAChC,OAAOD,CACR,CACA,OAAOA,EAAQG,UAAU,EAAGF,EAAY,GAAK,KAC9C,EAKAG,gBAAgB7B,GACf,IAAKA,EAAY,CAChB,MAAO,OACR,CACA,MAAMC,EAAO,IAAIC,KAAKF,GACtB,MAAM8B,EAAM,IAAI5B,KAChB,MAAM6B,EAASD,EAAIE,UAAY/B,EAAK+B,UACpC,MAAMC,EAAc9C,KAAKC,MAAM2C,EAAS,KACxC,MAAMG,EAAc/C,KAAKC,MAAM6C,EAAc,IAC7C,MAAME,EAAYhD,KAAKC,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,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,KAAKqB,oBAAoBL,EAAQ,GAC5C,CACA,OAAO,IACX,CAAE,MAAOM,GACLC,QAAQD,MAAM,kCAAmCA,GACjDE,EAAWF,MAAM,kCACjB,OAAO,IACX,CACJ,CAEA,0BAAMG,CAAqBlB,EAAmBmB,EAAiB,SAAUC,EAAeC,GACpF,IACI,MAAMC,EAAoB,CAACjC,EAAa8B,GAAS/B,EAAgBY,IACjE,GAAIoB,EAAM,CACNE,EAAQC,KAAK,IAAIC,EAAO,CAAEnB,KAAM,YAAaoB,SAAUC,EAAeC,GAAIC,OAAQR,IACtF,CACA,GAAIC,EAAI,CACJC,EAAQC,KAAK,IAAIC,EAAO,CAAEnB,KAAM,YAAaoB,SAAUC,EAAeG,GAAID,OAAQP,IACtF,CAEA,MAAMpB,EAAUR,KAAKD,MAAMU,SACvB,WACAC,UACA,CAAC,IAAIC,EAAO,CAAEC,KAAM,YAAaC,WAAY,QAC7CgB,GAGJ,MAAMf,QAAaN,EAAQO,kBAC3B,OAAO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,IAGhC,MAAMlE,QAAaN,EAAQO,kBAC3B,MAAMC,EAAUF,EAAKG,IAAKC,GAAkBA,EAAKC,aAEjD,GAAIH,EAAQI,OAAS,EAAG,CACpB,OAAOpB,KAAKqB,oBAAoBL,EAAQ,GAC5C,CACA,OAAO,IACX,CAAE,MAAOM,GACLC,QAAQD,MAAM,+BAAgCA,GAC9CE,EAAWF,MAAM,yBACjB,OAAO,IACX,CACJ,CAEA,uBAAM2D,CAAkB1E,EAAmB2E,GACvC,IACI,MAAM1C,EAAUxC,KAAKD,MAAM0C,YAAY,2BACvCD,EAAQ2C,aAAa,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":""}}]}
|
package/app/dashboard/index.html
CHANGED
|
@@ -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.
|
|
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
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CacheStatisticsService-dbg.js","names":["cacheAndIdFilter","___model_filters","cacheNameFilter","periodFilter","CacheStatisticsService","constructor","model","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":";;;QAMSA,gBAAgB,GAAAC,gBAAA;EAAA,MAAEC,eAAe,GAAAD,gBAAA;EAAA,MAAEE,YAAY,GAAAF,gBAAA;EA8GxD;AACA;AACA;EACe,MAAMG,sBAAsB,CAAC;IAGxCC,WAAWA,CAACC,KAAkB,EAAE;MAC5B,IAAI,CAACA,KAAK,GAAGA,KAAK,IAAI,IAAIC,UAAU,CAAC;QACjCC,UAAU,EAAE,oBAAoB;QAChCC,gBAAgB,EAAE,IAAI;QACtBC,OAAO,EAAE;MACb,CAAC,CAAC;IACN;IAEAC,QAAQA,CAAA,EAAe;MACnB,OAAO,IAAI,CAACL,KAAK;IACrB;IAEA,MAAMM,iBAAiBA,CAACC,SAAiB,EAAmC;MACxE,IAAI;QACA,MAAMC,OAAO,GAAG,IAAI,CAACR,KAAK,CAACS,QAAQ,CAC/B,UAAU,EACVC,SAAS,EACT,CAAC,IAAIC,MAAM,CAAC;UAAEC,IAAI,EAAE,WAAW;UAAEC,UAAU,EAAE;QAAK,CAAC,CAAC,CAAC,EACrD,CAAChB,YAAY,CAAC,QAAQ,CAAC,EAAED,eAAe,CAACW,SAAS,CAAC,CACvD,CAAC;QAED,MAAMO,IAAI,GAAG,MAAMN,OAAO,CAACO,eAAe,CAAC,C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model_filters","cacheNameFilter","periodFilter","CacheStatisticsService","constructor","model","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":";;;QAMSA,gBAAgB,GAAAC,gBAAA;EAAA,MAAEC,eAAe,GAAAD,gBAAA;EAAA,MAAEE,YAAY,GAAAF,gBAAA;EA8GxD;AACA;AACA;EACe,MAAMG,sBAAsB,CAAC;IAGxCC,WAAWA,CAACC,KAAkB,EAAE;MAC5B,IAAI,CAACA,KAAK,GAAGA,KAAK,IAAI,IAAIC,UAAU,CAAC;QACjCC,UAAU,EAAE,wBAAwB;QACpCC,gBAAgB,EAAE,IAAI;QACtBC,OAAO,EAAE;MACb,CAAC,CAAC;IACN;IAEAC,QAAQA,CAAA,EAAe;MACnB,OAAO,IAAI,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O,CAAC2C,YAAY,CAAC,SAAS,EAAED,OAAO,CAAC;QACxC,MAAM1C,OAAO,CAACE,MAAM,CAAC,CAAC;QACtB,OAAO,IAAI;MACf,CAAC,CAAC,OAAOpB,KAAK,EAAE;QACZC,OAAO,CAACD,KAAK,CAAC,oCAAoC,EAAEA,KAAK,CAAC;QAC1DE,UAAU,CAACF,KAAK,CAAC,4CAA4C,CAAC;QAC9D,OAAO,KAAK;MAChB;IACJ;EACJ;EAAC,OAAAxB,sBAAA;AAAA","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
sap.ui.define(["sap/m/MessageBox","sap/ui/model/odata/v4/ODataModel","sap/ui/model/Filter","sap/ui/model/FilterOperator","sap/ui/model/Sorter","../model/filters"],function(e,t,r,s,a,n){"use strict";const i=n["cacheAndIdFilter"];const c=n["cacheNameFilter"];const o=n["periodFilter"];class l{constructor(e){this.model=e||new t({serviceUrl:"/odata/v4/caching/",autoExpandSelect:true,groupId:"$auto"})}getModel(){return this.model}async getCurrentMetrics(t){try{const e=this.model.bindList("/Metrics",undefined,[new a({path:"timestamp",descending:true})],[o("hourly"),c(t)]);const r=await e.requestContexts();const s=r.map(e=>e.getObject());if(s.length>0){return this.transformStatistics(s[0])}return null}catch(t){console.error("Error fetching current metrics:",t);e.error("Failed to load current metrics");return null}}async getHistoricalMetrics(t,n="hourly",i,l){try{const e=[o(n),c(t)];if(i){e.push(new r({path:"timestamp",operator:s.GE,value1:i}))}if(l){e.push(new r({path:"timestamp",operator:s.LE,value1:l}))}const d=this.model.bindList("/Metrics",undefined,[new a({path:"timestamp",descending:true})],e);const u=await d.requestContexts();return u.map(e=>e.getObject())}catch(t){console.error("Error fetching historical metrics:",t);e.error("Failed to load historical metrics");return[]}}async getTopKeys(t){try{const e=this.model.bindList("/KeyMetrics",undefined,[new a({path:"totalRequests",descending:true})],[o("current"),c(t)]);const r=await e.requestContexts();return r.map(e=>e.getObject())}catch(t){console.error("Error fetching top keys:",t);e.error("Failed to load top keys");return[]}}async getColdKeys(t){try{const e=this.model.bindList("/KeyMetrics",undefined,[new a({path:"lastAccess",descending:false})],[o("current"),c(t)]);const r=await e.requestContexts();return r.map(e=>e.getObject())}catch(t){console.error("Error fetching cold keys:",t);e.error("Failed to load cold keys");return[]}}async persistStatistics(){try{const e=this.model.bindContext("/persistStatistics(...)");await e.invoke();return true}catch(t){console.error("Error persisting statistics:",t);e.error("Failed to persist statistics");return false}}transformStatistics(e){return{hits:e.hits||0,misses:e.misses||0,sets:e.sets||0,deletes:e.deletes||0,errors:e.errors||0,avgLatency:e.avgLatency||0,p95Latency:e.p95Latency||0,p99Latency:e.p99Latency||0,minLatency:e.minLatency||0,maxLatency:e.maxLatency||0,avgHitLatency:e.avgHitLatency||0,p95HitLatency:e.p95HitLatency||0,p99HitLatency:e.p99HitLatency||0,minHitLatency:e.minHitLatency||0,maxHitLatency:e.maxHitLatency||0,avgMissLatency:e.avgMissLatency||0,p95MissLatency:e.p95MissLatency||0,p99MissLatency:e.p99MissLatency||0,minMissLatency:e.minMissLatency||0,maxMissLatency:e.maxMissLatency||0,avgSetLatency:e.avgSetLatency||0,avgDeleteLatency:e.avgDeleteLatency||0,memoryUsage:e.memoryUsage||0,itemCount:e.itemCount||0,hitRatio:e.hitRatio||0,throughput:e.throughput||0,errorRate:e.errorRate||0,cacheEfficiency:e.cacheEfficiency||0,uptimeMs:e.uptimeMs||0,uniqueKeys:0,topKeys:[],coldKeys:[],lastPersisted:e.lastPersisted||(new Date).toISOString()}}async getAvailableMetrics(t){try{const e=this.model.bindList("/Metrics",undefined,[new a({path:"timestamp",descending:true})],[c(t)]);const r=await e.requestContexts();return r.map(e=>e.getObject())}catch(t){console.error("Error fetching available metrics:",t);e.error("Failed to load available metrics");return[]}}async getMetricById(t,r){try{const e=this.model.bindList("/Metrics",undefined,undefined,i(t,r));const s=await e.requestContexts();const a=s.map(e=>e.getObject());if(a.length>0){return this.transformStatistics(a[0])}return null}catch(t){console.error("Error fetching metric by ID:",t);e.error("Failed to load metric");return null}}async setMetricsEnabled(t,r){try{const e=this.model.bindContext("/setMetricsEnabled(...)");e.setParameter("cache",t);e.setParameter("enabled",r);await e.invoke();return true}catch(t){console.error("Error setting metrics enabled:",t);e.error("Failed to update metrics configuration");return false}}async setKeyMetricsEnabled(t,r){try{const e=this.model.bindContext("/setKeyMetricsEnabled(...)");e.setParameter("cache",t);e.setParameter("enabled",r);await e.invoke();return true}catch(t){console.error("Error setting key metrics enabled:",t);e.error("Failed to update key metrics configuration");return false}}}return l});
|
|
1
|
+
sap.ui.define(["sap/m/MessageBox","sap/ui/model/odata/v4/ODataModel","sap/ui/model/Filter","sap/ui/model/FilterOperator","sap/ui/model/Sorter","../model/filters"],function(e,t,r,s,a,n){"use strict";const i=n["cacheAndIdFilter"];const c=n["cacheNameFilter"];const o=n["periodFilter"];class l{constructor(e){this.model=e||new t({serviceUrl:"/odata/v4/caching-api/",autoExpandSelect:true,groupId:"$auto"})}getModel(){return this.model}async getCurrentMetrics(t){try{const e=this.model.bindList("/Metrics",undefined,[new a({path:"timestamp",descending:true})],[o("hourly"),c(t)]);const r=await e.requestContexts();const s=r.map(e=>e.getObject());if(s.length>0){return this.transformStatistics(s[0])}return null}catch(t){console.error("Error fetching current metrics:",t);e.error("Failed to load current metrics");return null}}async getHistoricalMetrics(t,n="hourly",i,l){try{const e=[o(n),c(t)];if(i){e.push(new r({path:"timestamp",operator:s.GE,value1:i}))}if(l){e.push(new r({path:"timestamp",operator:s.LE,value1:l}))}const d=this.model.bindList("/Metrics",undefined,[new a({path:"timestamp",descending:true})],e);const u=await d.requestContexts();return u.map(e=>e.getObject())}catch(t){console.error("Error fetching historical metrics:",t);e.error("Failed to load historical metrics");return[]}}async getTopKeys(t){try{const e=this.model.bindList("/KeyMetrics",undefined,[new a({path:"totalRequests",descending:true})],[o("current"),c(t)]);const r=await e.requestContexts();return r.map(e=>e.getObject())}catch(t){console.error("Error fetching top keys:",t);e.error("Failed to load top keys");return[]}}async getColdKeys(t){try{const e=this.model.bindList("/KeyMetrics",undefined,[new a({path:"lastAccess",descending:false})],[o("current"),c(t)]);const r=await e.requestContexts();return r.map(e=>e.getObject())}catch(t){console.error("Error fetching cold keys:",t);e.error("Failed to load cold keys");return[]}}async persistStatistics(){try{const e=this.model.bindContext("/persistStatistics(...)");await e.invoke();return true}catch(t){console.error("Error persisting statistics:",t);e.error("Failed to persist statistics");return false}}transformStatistics(e){return{hits:e.hits||0,misses:e.misses||0,sets:e.sets||0,deletes:e.deletes||0,errors:e.errors||0,avgLatency:e.avgLatency||0,p95Latency:e.p95Latency||0,p99Latency:e.p99Latency||0,minLatency:e.minLatency||0,maxLatency:e.maxLatency||0,avgHitLatency:e.avgHitLatency||0,p95HitLatency:e.p95HitLatency||0,p99HitLatency:e.p99HitLatency||0,minHitLatency:e.minHitLatency||0,maxHitLatency:e.maxHitLatency||0,avgMissLatency:e.avgMissLatency||0,p95MissLatency:e.p95MissLatency||0,p99MissLatency:e.p99MissLatency||0,minMissLatency:e.minMissLatency||0,maxMissLatency:e.maxMissLatency||0,avgSetLatency:e.avgSetLatency||0,avgDeleteLatency:e.avgDeleteLatency||0,memoryUsage:e.memoryUsage||0,itemCount:e.itemCount||0,hitRatio:e.hitRatio||0,throughput:e.throughput||0,errorRate:e.errorRate||0,cacheEfficiency:e.cacheEfficiency||0,uptimeMs:e.uptimeMs||0,uniqueKeys:0,topKeys:[],coldKeys:[],lastPersisted:e.lastPersisted||(new Date).toISOString()}}async getAvailableMetrics(t){try{const e=this.model.bindList("/Metrics",undefined,[new a({path:"timestamp",descending:true})],[c(t)]);const r=await e.requestContexts();return r.map(e=>e.getObject())}catch(t){console.error("Error fetching available metrics:",t);e.error("Failed to load available metrics");return[]}}async getMetricById(t,r){try{const e=this.model.bindList("/Metrics",undefined,undefined,i(t,r));const s=await e.requestContexts();const a=s.map(e=>e.getObject());if(a.length>0){return this.transformStatistics(a[0])}return null}catch(t){console.error("Error fetching metric by ID:",t);e.error("Failed to load metric");return null}}async setMetricsEnabled(t,r){try{const e=this.model.bindContext("/setMetricsEnabled(...)");e.setParameter("cache",t);e.setParameter("enabled",r);await e.invoke();return true}catch(t){console.error("Error setting metrics enabled:",t);e.error("Failed to update metrics configuration");return false}}async setKeyMetricsEnabled(t,r){try{const e=this.model.bindContext("/setKeyMetricsEnabled(...)");e.setParameter("cache",t);e.setParameter("enabled",r);await e.invoke();return true}catch(t){console.error("Error setting key metrics enabled:",t);e.error("Failed to update key metrics configuration");return false}}}return l});
|
|
2
2
|
//# sourceMappingURL=CacheStatisticsService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CacheStatisticsService.js","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(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AKG,IAAKC,GAAkBA,EAAKC,aAEjD,GAAIH,EAAQI,OAAS,EAAG,CACpB,OAAOpB,KAAKqB,oBAAoBL,EAAQ,GAC5C,CACA,OAAO,IACX,CAAE,MAAOM,GACLC,QAAQD,MAAM,+BAAgCA,GAC9CE,EAAWF,MAAM,yBACjB,OAAO,IACX,CACJ,CAEA,uBAAM2D,CAAkB1E,EAAmB2E,GACvC,IACI,MAAM1C,EAAUxC,KAAKD,MAAM0C,YAAY,2BACvCD,EAAQ2C,aAAa,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":[]}
|
|
1
|
+
{"version":3,"file":"CacheStatisticsService.js","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":"4MAMSA,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,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,KAAKqB,oBAAoBL,EAAQ,GAC5C,CACA,OAAO,IACX,CAAE,MAAOM,GACLC,QAAQD,MAAM,kCAAmCA,GACjDE,EAAWF,MAAM,kCACjB,OAAO,IACX,CACJ,CAEA,0BAAMG,CAAqBlB,EAAmBmB,EAAiB,SAAUC,EAAeC,GACpF,IACI,MAAMC,EAAoB,CAACjC,EAAa8B,GAAS/B,EAAgBY,IACjE,GAAIoB,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},
|
|
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.
|
|
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"
|
|
@@ -122,7 +122,7 @@ export default class CacheStatisticsService {
|
|
|
122
122
|
|
|
123
123
|
constructor(model?: ODataModel) {
|
|
124
124
|
this.model = model || new ODataModel({
|
|
125
|
-
serviceUrl: "/odata/v4/caching/",
|
|
125
|
+
serviceUrl: "/odata/v4/caching-api/",
|
|
126
126
|
autoExpandSelect: true,
|
|
127
127
|
groupId: "$auto"
|
|
128
128
|
});
|
package/lib/add.js
CHANGED
|
@@ -12,7 +12,7 @@ const path = require('path')
|
|
|
12
12
|
* the runtime under a released dashboard, so a UI5 regression would surface as a
|
|
13
13
|
* broken dashboard in deployments that changed nothing.
|
|
14
14
|
*/
|
|
15
|
-
const DEFAULT_UI5_VERSION = '1.
|
|
15
|
+
const DEFAULT_UI5_VERSION = '1.148.10'
|
|
16
16
|
const DEFAULT_UI5_URL = `https://ui5.sap.com/${DEFAULT_UI5_VERSION}/resources/sap-ui-core.js`
|
|
17
17
|
|
|
18
18
|
/** Matches the bootstrap script tag, whatever order its attributes are in. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cds-caching",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "A caching plugin for SAP CAP applications",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"@opentelemetry/sdk-metrics": "^1.30.1",
|
|
108
108
|
"@opentelemetry/sdk-trace-base": "^1.30.1",
|
|
109
109
|
"@opentelemetry/sdk-trace-node": "^1.30.1",
|
|
110
|
-
"@openui5/types": "
|
|
110
|
+
"@openui5/types": "1.148.8",
|
|
111
111
|
"@release-it/conventional-changelog": "^10.0.5",
|
|
112
112
|
"@resolid/keyv-sqlite": "~5.0.1",
|
|
113
113
|
"@sap/cds": "^10",
|