{"version":3,"sources":["webpack:///./src/components/Widgets/GlCpuHistory.vue","webpack:///src/components/Widgets/GlCpuHistory.vue","webpack:///./src/components/Widgets/GlCpuHistory.vue?3e12","webpack:///./src/components/Widgets/GlCpuHistory.vue?4ca1","webpack:///./src/mixins/GlancesMixin.js","webpack:///./src/components/Widgets/GlCpuHistory.vue?7f51"],"names":["render","_vm","this","_c","_self","staticClass","attrs","chartId","staticRenderFns","mixins","WidgetMixin","GlancesMixin","ChartingMixin","components","data","computed","limit","options","endpoint","makeGlancesUrl","concat","methods","processData","cpuData","system","user","labels","systemValues","userValues","forEach","dataPoint","push","timestampToTime","chartTitle","makeTitle","datasets","name","type","values","generateChart","getTimeAgo","replace","timeChartData","Chart","title","height","chartHeight","colors","truncateLegends","lineOptions","regionFill","hideDots","axisOptions","xIsSeries","xAxisMode","tooltipOptions","formatTooltipY","d","Math","round","created","overrideUpdateInterval","component","hostname","error","apiVersion","credentials","username","password","stringifiedUser","Authorization","window","btoa","fetchData","makeRequest","then","apiPath"],"mappings":"yHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,+BAA+B,CAACF,EAAG,MAAM,CAACE,YAAY,mBAAmBC,MAAM,CAAC,GAAKL,EAAIM,cAE9KC,EAAkB,G,oGCUP,GACfC,OAAA,CAAAC,OAAAC,OAAAC,QACAC,WAAA,GACAC,KAAA,WACA,UAEAC,SAAA,CACAC,MAAA,WACA,YAAAC,QAAAD,OAAA,KAEAE,SAAA,WACA,YAAAC,eAAA,eAAAC,OAAA,KAAAJ,UAGAK,QAAA,CACAC,YAAA,SAAAC,GACA,IAAAC,EAAAD,EAAAC,OAAAC,EAAAF,EAAAE,KACAC,EAAA,GACAC,EAAA,GACAC,EAAA,GACAJ,EAAAK,SAAA,SAAAC,GACAJ,EAAAK,KAAAC,eAAAF,EAAA,KACAH,EAAAI,KAAAD,EAAA,OAEAL,EAAAI,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SAACyD,GACb,MAAO,GAAPxD,OAAUlB,KAAK6D,SAAQ,SAAA3C,OAAQlB,KAAK+D,WAAU,KAAA7C,OAAIwD,O,yDC7BxD","file":"js/chunk-73f090a0.7cf568e3.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"glances-cpu-history-wrapper\"},[_c('div',{staticClass:\"gl-history-chart\",attrs:{\"id\":_vm.chartId}})])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GlCpuHistory.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GlCpuHistory.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./GlCpuHistory.vue?vue&type=template&id=6898bb58&scoped=true\"\nimport script from \"./GlCpuHistory.vue?vue&type=script&lang=js\"\nexport * from \"./GlCpuHistory.vue?vue&type=script&lang=js\"\nimport style0 from \"./GlCpuHistory.vue?vue&type=style&index=0&id=6898bb58&prod&scoped=true&lang=scss\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6898bb58\",\n null\n \n)\n\nexport default component.exports","/** Reusable mixin for all Glances widgets */\nexport default {\n computed: {\n /* Required, hostname (e.g. IP + port) for Glances instance */\n hostname() {\n if (!this.options.hostname) this.error('You must specify a \\'hostname\\' for Glances');\n return this.options.hostname;\n },\n /* Optionally specify the API version, defaults to V 3 */\n apiVersion() {\n return this.options.apiVersion || 3;\n },\n /* Optionally specify basic auth credentials for Glances instance */\n credentials() {\n if (this.options.username && this.options.password) {\n const stringifiedUser = `${this.options.username}:${this.options.password}`;\n return { Authorization: `Basic ${window.btoa(stringifiedUser)}` };\n }\n return null;\n },\n },\n methods: {\n /* Make the request to Glances API, and calls handler function with results\n * Requires endpoint attribute and processData method to be implemented by child */\n fetchData() {\n this.makeRequest(this.endpoint, this.credentials).then(this.processData);\n },\n /* Returns URL to Glances API endpoint */\n makeGlancesUrl(apiPath) {\n return `${this.hostname}/api/${this.apiVersion}/${apiPath}`;\n },\n },\n};\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GlCpuHistory.vue?vue&type=style&index=0&id=6898bb58&prod&scoped=true&lang=scss\""],"sourceRoot":""}