From bc38b15cfe8376c29da68cda79bc794909cec224 Mon Sep 17 00:00:00 2001 From: jeremy Date: Mon, 17 Apr 2017 20:53:59 -0500 Subject: [PATCH 1/7] Removed dynamic option for probes --- .gitignore | 4 +- dist/components/endpoint/endpoint_details.js | 2 +- dist/components/endpoint/endpoint_list.js | 2 +- dist/directives/all.js | 92 +++---------------- dist/directives/all.js.map | 2 +- .../partials/endpointCollectorSelect.html | 37 -------- dist/panels/endpoint-list/module.js | 2 +- dist/panels/nav-panel/module.js | 2 +- src/directives/all.js | 92 +++---------------- .../partials/endpointCollectorSelect.html | 37 -------- 10 files changed, 34 insertions(+), 238 deletions(-) diff --git a/.gitignore b/.gitignore index 79eb783..519a603 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules -tmp \ No newline at end of file +tmp +/.project +/.settings/ diff --git a/dist/components/endpoint/endpoint_details.js b/dist/components/endpoint/endpoint_details.js index 9103d70..5d57c4c 100644 --- a/dist/components/endpoint/endpoint_details.js +++ b/dist/components/endpoint/endpoint_details.js @@ -19,7 +19,7 @@ System.register(["lodash"], function (_export, _context) { _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; _createClass = function () { diff --git a/dist/components/endpoint/endpoint_list.js b/dist/components/endpoint/endpoint_list.js index c7093db..b5f0fd4 100644 --- a/dist/components/endpoint/endpoint_list.js +++ b/dist/components/endpoint/endpoint_list.js @@ -21,7 +21,7 @@ System.register(['lodash', 'jquery'], function (_export, _context) { _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; _createClass = function () { diff --git a/dist/directives/all.js b/dist/directives/all.js index 94bb701..a5dd341 100644 --- a/dist/directives/all.js +++ b/dist/directives/all.js @@ -134,24 +134,16 @@ System.register(['angular', 'lodash'], function (_export, _context) { var selectedTags = []; scope.init = function () { - if (scope.model.route.type === 'byIds') { - selectedIds = scope.model.route.config.ids; - scope.footprint = { value: "static" }; - } else { - selectedTags = scope.model.route.config.tags; - scope.footprint = { value: "dynamic" }; - } + selectedIds = scope.model.route.config.ids; + scope.footprint = { value: "static" }; scope.error = false; - scope.reset(); }; scope.reset = function () { scope.error = false; scope.ids = []; - scope.tags = []; - //build out our list of collectorIds and tags - var seenTags = {}; + //build out our list of collectorIds var sortedProbes = _.sortBy(scope.probes, function (o) { return o.name.toLowerCase(); }); @@ -160,27 +152,8 @@ System.register(['angular', 'lodash'], function (_export, _context) { if (_.indexOf(selectedIds, c.id) >= 0) { option.selected = true; } - _.forEach(c.tags.sort(), function (t) { - if (!(t in seenTags)) { - seenTags[t] = true; - var o = { selected: false, text: t }; - if (_.indexOf(selectedTags, t) >= 0) { - o.selected = true; - } - scope.tags.push(o); - } - }); scope.ids.push(option); }); - if (scope.footprint.value === 'dynamic') { - _.forEach(scope.ids, function (i) { - i.selected = false; - }); - } else { - _.forEach(scope.tags, function (t) { - t.selected = false; - }); - } }; scope.show = function () { @@ -257,56 +230,17 @@ System.register(['angular', 'lodash'], function (_export, _context) { return _.map(_.filter(scope.ids, { selected: true }), "text").slice(0, 2).join(", ") + " and " + (selectedIds.length - 2) + " more"; }; - scope.routeTypeChange = function () { - if (scope.footprint.value === 'dynamic') { - selectedTags = _.map(_.filter(scope.tags, { selected: true }), "text"); - scope.model.route = { - type: "byTags", - config: { - tags: [] - } - }; - _.forEach(selectedTags, function (t) { - scope.model.route.config.tags.push(t.text); - }); - } else { - selectedIds = _.map(_.filter(scope.ids, { selected: true }), "id"); - scope.model.route = { - type: "byIds", - config: { - ids: [] - } - }; - _.forEach(selectedIds, function (c) { - scope.model.route.config.ids.push(c.id); - }); - } - }; - scope.hide = function () { - if (scope.footprint.value === 'dynamic') { - scope.model.route = { - type: "byTags", - config: { - tags: [] - } - }; - selectedTags = _.map(_.filter(scope.tags, { selected: true }), "text"); - _.forEach(selectedTags, function (t) { - scope.model.route.config.tags.push(t); - }); - } else { - scope.model.route = { - type: "byIds", - config: { - ids: [] - } - }; - selectedIds = _.map(_.filter(scope.ids, { selected: true }), "id"); - _.forEach(selectedIds, function (c) { - scope.model.route.config.ids.push(c); - }); - } + scope.model.route = { + type: "byIds", + config: { + ids: [] + } + }; + selectedIds = _.map(_.filter(scope.ids, { selected: true }), "id"); + _.forEach(selectedIds, function (c) { + scope.model.route.config.ids.push(c); + }); scope.selectorOpen = false; bodyEl.off('click', scope.bodyOnClick); }; diff --git a/dist/directives/all.js.map b/dist/directives/all.js.map index c4e1c40..85a76ca 100644 --- a/dist/directives/all.js.map +++ b/dist/directives/all.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/directives/all.js"],"names":["angular","_","module","directive","templateUrl","scope","ctrl","endpoint","$compile","datasourceSrv","timeSrv","check","link","init","time","from","frequency","to","metricsQuery","range","timeRange","rangeRaw","interval","targets","target","slug","type","toLowerCase","format","maxDataPoints","datasource","get","then","ds","query","results","showHealth","data","metrics","okCount","errorCount","unknownCount","collectorResults","forEach","result","parts","split","stateStr","collector","ts","state","i","datapoints","length","point","isNaN","console","log","col","unknowns","getProbesForCheck","Object","keys","eventReady","$window","$timeout","probes","model","elem","bodyEl","element","document","body","selectedIds","selectedTags","route","config","ids","footprint","value","tags","error","reset","seenTags","sortedProbes","sortBy","o","name","c","option","id","selected","text","indexOf","sort","t","push","show","selectorOpen","giveFocus","on","bodyOnClick","idSelected","selectAll","select","map","filter","tagSelected","probesWithTags","probeList","join","probeCount","tag","count","selectTagTitle","slice","selectIdTitle","routeTypeChange","hide","off","e","dropdown","find","has","$apply","$watch"],"mappings":";;;;;;;;;AAAOA,a;;AACAC,O;;;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from 'angular';\nimport _ from 'lodash';\n\nangular.module('grafana.directives').directive(\"rtEndpointHealthDashboard\", function() {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointHealthDashboard.html',\n scope: {\n ctrl: \"=\",\n endpoint: \"=\"\n }\n };\n});\n\nangular.module('grafana.directives').directive(\"rtCheckHealth\", function($compile, datasourceSrv, timeSrv) {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/checkHealth.html',\n scope: {\n check: \"=\",\n ctrl: \"=\"\n },\n link: function(scope) {\n timeSrv.init({\n time: {from: \"now-\"+(scope.check.frequency + 30)+ 's', to: \"now\"}\n });\n var metricsQuery = {\n range: timeSrv.timeRange(),\n rangeRaw: timeSrv.timeRange(true),\n interval: scope.check.frequency + 's',\n targets: [\n {target: \"worldping.\"+scope.ctrl.endpoint.slug + \".*.\" +\n scope.check.type.toLowerCase()+\".{ok_state,error_state}\"}\n ],\n format: 'json',\n maxDataPoints: 10,\n };\n\n var datasource = datasourceSrv.get('raintank');\n datasource.then(function(ds) {\n ds.query(metricsQuery).then(function(results) {\n showHealth(results);\n }, function() {\n showHealth({data: []});\n });\n });\n\n function showHealth(metrics) {\n var okCount = 0;\n var errorCount = 0;\n var unknownCount = 0;\n var collectorResults = {};\n _.forEach(metrics.data, function(result) {\n var parts = result.target.split('.');\n var stateStr = parts[4];\n var collector = parts[2];\n if (!(collector in collectorResults)) {\n collectorResults[collector] = {ts: -1, state: -1};\n }\n\n //start with the last point and work backwards till we find a non-null value.\n for (var i = result.datapoints.length - 1 ; i >= 0; i--) {\n var point = result.datapoints[i];\n if (!isNaN(point[0])) {\n if ((point[0] === 1) && (point[1] > collectorResults[collector].ts)) {\n collectorResults[collector].ts = point[1];\n switch (stateStr) {\n case 'ok_state':\n collectorResults[collector].state = 0;\n break;\n case 'error_state':\n collectorResults[collector].state = 2;\n break;\n default:\n collectorResults[collector].state = -1;\n console.log(\"unknown state returned. this shouldnt happen :(\");\n }\n break;\n }\n }\n }\n });\n for (var col in collectorResults) {\n switch (collectorResults[col].state) {\n case 0:\n okCount++;\n break;\n case 2:\n errorCount++;\n break;\n default:\n unknownCount++;\n }\n }\n var unknowns = scope.ctrl.getProbesForCheck(scope.check.type).length - Object.keys(collectorResults).length;\n unknownCount += unknowns;\n\n scope.okCount = okCount;\n scope.errorCount = errorCount;\n scope.unknownCount = unknownCount;\n scope.eventReady = true;\n }\n }\n };\n});\n\nangular.module('grafana.directives').directive(\"rtEndpointHealth\", function() {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointHealth.html',\n scope: {\n endpoint: \"=\",\n ctrl: \"=\"\n }\n };\n});\n\nangular.module('grafana.directives').directive('endpointProbeSelect', function($compile, $window, $timeout) {\n return {\n scope: {\n probes: \"=\",\n model: \"=\",\n },\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointCollectorSelect.html',\n link: function(scope, elem) {\n var bodyEl = angular.element($window.document.body);\n var selectedIds = [];\n var selectedTags = [];\n\n scope.init = function() {\n if (scope.model.route.type === 'byIds') {\n selectedIds = scope.model.route.config.ids;\n scope.footprint = {value: \"static\"};\n } else {\n selectedTags = scope.model.route.config.tags;\n scope.footprint = {value: \"dynamic\"};\n }\n scope.error = false;\n\n scope.reset();\n };\n\n scope.reset = function() {\n scope.error = false;\n scope.ids = [];\n scope.tags = [];\n //build out our list of collectorIds and tags\n var seenTags = {};\n var sortedProbes = _.sortBy(scope.probes, function(o) {\n return o.name.toLowerCase();\n });\n _.forEach(sortedProbes, function(c) {\n var option = {id: c.id, selected: false, text: c.name};\n if (_.indexOf(selectedIds, c.id) >= 0) {\n option.selected = true;\n }\n _.forEach(c.tags.sort(), function(t) {\n if (!(t in seenTags)) {\n seenTags[t] = true;\n var o = {selected: false, text: t};\n if (_.indexOf(selectedTags, t) >= 0) {\n o.selected = true;\n }\n scope.tags.push(o);\n }\n });\n scope.ids.push(option);\n });\n if (scope.footprint.value === 'dynamic') {\n _.forEach(scope.ids, function(i) {\n i.selected = false;\n });\n } else {\n _.forEach(scope.tags, function(t) {\n t.selected = false;\n });\n }\n };\n\n scope.show = function() {\n scope.reset();\n scope.selectorOpen = true;\n scope.giveFocus = 1;\n\n $timeout(function() {\n bodyEl.on('click', scope.bodyOnClick);\n }, 0, false);\n };\n\n scope.idSelected = function(option) {\n option.selected = !option.selected;\n };\n\n scope.selectAll = function() {\n var select = true;\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n\n if (selectedIds.length === scope.ids.length) {\n select = false;\n }\n _.forEach(scope.ids, function(option) {\n option.selected = select;\n });\n };\n\n scope.tagSelected = function(option) {\n option.selected = !option.selected;\n };\n\n scope.probesWithTags = function() {\n var probeList = {};\n _.forEach(scope.probes, function(c) {\n _.forEach(_.filter(scope.tags, {selected: true}), function(t) {\n if (_.indexOf(c.tags, t.text) !== -1) {\n probeList[c.name] = true;\n }\n });\n });\n return Object.keys(probeList).join(', ');\n };\n\n scope.probeCount = function(tag) {\n var count = 0;\n _.forEach(scope.probes, function(c) {\n if (_.indexOf(c.tags, tag.text) !== -1) {\n count++;\n }\n });\n return count;\n };\n\n scope.selectTagTitle = function() {\n selectedTags = _.map(_.filter(scope.tags, {selected: true}), \"text\");\n if (selectedTags.length === 0) {\n return \"Select Tags\";\n }\n if (selectedTags.length <= 2) {\n return selectedTags.join(\", \");\n }\n return selectedTags.slice(0, 2).join(\", \") + \" and \" + (selectedTags.length - 2) + \" more\";\n };\n\n scope.selectIdTitle = function() {\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n if (selectedIds.length === 0) {\n return \"Select Probes\";\n }\n if (selectedIds.length <= 2) {\n return _.map(_.filter(scope.ids, {selected: true}), \"text\").join(\", \");\n }\n return _.map(_.filter(scope.ids, {selected: true}), \"text\").slice(0, 2).join(\", \") + \" and \" + (selectedIds.length - 2) + \" more\";\n };\n\n scope.routeTypeChange = function() {\n if (scope.footprint.value === 'dynamic') {\n selectedTags = _.map(_.filter(scope.tags, {selected: true}), \"text\");\n scope.model.route = {\n type: \"byTags\",\n config: {\n tags: []\n }\n };\n _.forEach(selectedTags, function(t) {\n scope.model.route.config.tags.push(t.text);\n });\n } else {\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n scope.model.route = {\n type: \"byIds\",\n config: {\n ids: []\n }\n };\n _.forEach(selectedIds, function(c) {\n scope.model.route.config.ids.push(c.id);\n });\n }\n };\n\n scope.hide = function() {\n if (scope.footprint.value === 'dynamic') {\n scope.model.route = {\n type: \"byTags\",\n config: {\n tags: []\n }\n };\n selectedTags = _.map(_.filter(scope.tags, {selected: true}), \"text\");\n _.forEach(selectedTags, function(t) {\n scope.model.route.config.tags.push(t);\n });\n } else {\n scope.model.route = {\n type: \"byIds\",\n config: {\n ids: []\n }\n };\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n _.forEach(selectedIds, function(c) {\n scope.model.route.config.ids.push(c);\n });\n }\n scope.selectorOpen = false;\n bodyEl.off('click', scope.bodyOnClick);\n };\n\n scope.bodyOnClick = function(e) {\n var dropdown = elem.find('.variable-value-dropdown');\n if (dropdown.has(e.target).length === 0) {\n scope.$apply(scope.hide);\n }\n };\n\n scope.$watch('model.id', function() {\n scope.init();\n });\n },\n };\n});\n"]} \ No newline at end of file +{"version":3,"sources":["../../src/directives/all.js"],"names":["angular","_","module","directive","templateUrl","scope","ctrl","endpoint","$compile","datasourceSrv","timeSrv","check","link","init","time","from","frequency","to","metricsQuery","range","timeRange","rangeRaw","interval","targets","target","slug","type","toLowerCase","format","maxDataPoints","datasource","get","then","ds","query","results","showHealth","data","metrics","okCount","errorCount","unknownCount","collectorResults","forEach","result","parts","split","stateStr","collector","ts","state","i","datapoints","length","point","isNaN","console","log","col","unknowns","getProbesForCheck","Object","keys","eventReady","$window","$timeout","probes","model","elem","bodyEl","element","document","body","selectedIds","selectedTags","route","config","ids","footprint","value","error","reset","sortedProbes","sortBy","o","name","c","option","id","selected","text","indexOf","push","show","selectorOpen","giveFocus","on","bodyOnClick","idSelected","selectAll","select","map","filter","tagSelected","probesWithTags","probeList","tags","t","join","probeCount","tag","count","selectTagTitle","slice","selectIdTitle","hide","off","e","dropdown","find","has","$apply","$watch"],"mappings":";;;;;;;;;AAAOA,a;;AACAC,O;;;;AAEPD,cAAQE,MAAR,CAAe,oBAAf,EAAqCC,SAArC,CAA+C,2BAA/C,EAA4E,YAAW;AACrF,eAAO;AACLC,uBAAa,wFADR;AAELC,iBAAO;AACLC,kBAAM,GADD;AAELC,sBAAU;AAFL;AAFF,SAAP;AAOD,OARD;;AAUAP,cAAQE,MAAR,CAAe,oBAAf,EAAqCC,SAArC,CAA+C,eAA/C,EAAgE,UAASK,QAAT,EAAmBC,aAAnB,EAAkCC,OAAlC,EAA2C;AACzG,eAAO;AACLN,uBAAa,4EADR;AAELC,iBAAO;AACLM,mBAAO,GADF;AAELL,kBAAM;AAFD,WAFF;AAMLM,gBAAM,cAASP,KAAT,EAAgB;AACpBK,oBAAQG,IAAR,CAAa;AACXC,oBAAM,EAACC,MAAM,UAAQV,MAAMM,KAAN,CAAYK,SAAZ,GAAwB,EAAhC,IAAqC,GAA5C,EAAiDC,IAAI,KAArD;AADK,aAAb;AAGA,gBAAIC,eAAe;AACjBC,qBAAOT,QAAQU,SAAR,EADU;AAEjBC,wBAAUX,QAAQU,SAAR,CAAkB,IAAlB,CAFO;AAGjBE,wBAAUjB,MAAMM,KAAN,CAAYK,SAAZ,GAAwB,GAHjB;AAIjBO,uBAAS,CACP,EAACC,QAAQ,eAAanB,MAAMC,IAAN,CAAWC,QAAX,CAAoBkB,IAAjC,GAAwC,KAAxC,GACPpB,MAAMM,KAAN,CAAYe,IAAZ,CAAiBC,WAAjB,EADO,GACwB,yBADjC,EADO,CAJQ;AAQjBC,sBAAQ,MARS;AASjBC,6BAAe;AATE,aAAnB;;AAYA,gBAAIC,aAAarB,cAAcsB,GAAd,CAAkB,UAAlB,CAAjB;AACAD,uBAAWE,IAAX,CAAgB,UAASC,EAAT,EA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AAuID,OAxID","file":"all.js","sourcesContent":["import angular from 'angular';\nimport _ from 'lodash';\n\nangular.module('grafana.directives').directive(\"rtEndpointHealthDashboard\", function() {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointHealthDashboard.html',\n scope: {\n ctrl: \"=\",\n endpoint: \"=\"\n }\n };\n});\n\nangular.module('grafana.directives').directive(\"rtCheckHealth\", function($compile, datasourceSrv, timeSrv) {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/checkHealth.html',\n scope: {\n check: \"=\",\n ctrl: \"=\"\n },\n link: function(scope) {\n timeSrv.init({\n time: {from: \"now-\"+(scope.check.frequency + 30)+ 's', to: \"now\"}\n });\n var metricsQuery = {\n range: timeSrv.timeRange(),\n rangeRaw: timeSrv.timeRange(true),\n interval: scope.check.frequency + 's',\n targets: [\n {target: \"worldping.\"+scope.ctrl.endpoint.slug + \".*.\" +\n scope.check.type.toLowerCase()+\".{ok_state,error_state}\"}\n ],\n format: 'json',\n maxDataPoints: 10,\n };\n\n var datasource = datasourceSrv.get('raintank');\n datasource.then(function(ds) {\n ds.query(metricsQuery).then(function(results) {\n showHealth(results);\n }, function() {\n showHealth({data: []});\n });\n });\n\n function showHealth(metrics) {\n var okCount = 0;\n var errorCount = 0;\n var unknownCount = 0;\n var collectorResults = {};\n _.forEach(metrics.data, function(result) {\n var parts = result.target.split('.');\n var stateStr = parts[4];\n var collector = parts[2];\n if (!(collector in collectorResults)) {\n collectorResults[collector] = {ts: -1, state: -1};\n }\n\n //start with the last point and work backwards till we find a non-null value.\n for (var i = result.datapoints.length - 1 ; i >= 0; i--) {\n var point = result.datapoints[i];\n if (!isNaN(point[0])) {\n if ((point[0] === 1) && (point[1] > collectorResults[collector].ts)) {\n collectorResults[collector].ts = point[1];\n switch (stateStr) {\n case 'ok_state':\n collectorResults[collector].state = 0;\n break;\n case 'error_state':\n collectorResults[collector].state = 2;\n break;\n default:\n collectorResults[collector].state = -1;\n console.log(\"unknown state returned. this shouldnt happen :(\");\n }\n break;\n }\n }\n }\n });\n for (var col in collectorResults) {\n switch (collectorResults[col].state) {\n case 0:\n okCount++;\n break;\n case 2:\n errorCount++;\n break;\n default:\n unknownCount++;\n }\n }\n var unknowns = scope.ctrl.getProbesForCheck(scope.check.type).length - Object.keys(collectorResults).length;\n unknownCount += unknowns;\n\n scope.okCount = okCount;\n scope.errorCount = errorCount;\n scope.unknownCount = unknownCount;\n scope.eventReady = true;\n }\n }\n };\n});\n\nangular.module('grafana.directives').directive(\"rtEndpointHealth\", function() {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointHealth.html',\n scope: {\n endpoint: \"=\",\n ctrl: \"=\"\n }\n };\n});\n\nangular.module('grafana.directives').directive('endpointProbeSelect', function($compile, $window, $timeout) {\n return {\n scope: {\n probes: \"=\",\n model: \"=\",\n },\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointCollectorSelect.html',\n link: function(scope, elem) {\n var bodyEl = angular.element($window.document.body);\n var selectedIds = [];\n var selectedTags = [];\n\n scope.init = function() {\n selectedIds = scope.model.route.config.ids;\n scope.footprint = {value: \"static\"};\n scope.error = false;\n scope.reset();\n };\n\n scope.reset = function() {\n scope.error = false;\n scope.ids = [];\n //build out our list of collectorIds\n var sortedProbes = _.sortBy(scope.probes, function(o) {\n return o.name.toLowerCase();\n });\n _.forEach(sortedProbes, function(c) {\n var option = {id: c.id, selected: false, text: c.name};\n if (_.indexOf(selectedIds, c.id) >= 0) {\n option.selected = true;\n }\n scope.ids.push(option);\n });\n };\n\n scope.show = function() {\n scope.reset();\n scope.selectorOpen = true;\n scope.giveFocus = 1;\n\n $timeout(function() {\n bodyEl.on('click', scope.bodyOnClick);\n }, 0, false);\n };\n\n scope.idSelected = function(option) {\n option.selected = !option.selected;\n };\n\n scope.selectAll = function() {\n var select = true;\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n\n if (selectedIds.length === scope.ids.length) {\n select = false;\n }\n _.forEach(scope.ids, function(option) {\n option.selected = select;\n });\n };\n\n scope.tagSelected = function(option) {\n option.selected = !option.selected;\n };\n\n scope.probesWithTags = function() {\n var probeList = {};\n _.forEach(scope.probes, function(c) {\n _.forEach(_.filter(scope.tags, {selected: true}), function(t) {\n if (_.indexOf(c.tags, t.text) !== -1) {\n probeList[c.name] = true;\n }\n });\n });\n return Object.keys(probeList).join(', ');\n };\n\n scope.probeCount = function(tag) {\n var count = 0;\n _.forEach(scope.probes, function(c) {\n if (_.indexOf(c.tags, tag.text) !== -1) {\n count++;\n }\n });\n return count;\n };\n\n scope.selectTagTitle = function() {\n selectedTags = _.map(_.filter(scope.tags, {selected: true}), \"text\");\n if (selectedTags.length === 0) {\n return \"Select Tags\";\n }\n if (selectedTags.length <= 2) {\n return selectedTags.join(\", \");\n }\n return selectedTags.slice(0, 2).join(\", \") + \" and \" + (selectedTags.length - 2) + \" more\";\n };\n\n scope.selectIdTitle = function() {\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n if (selectedIds.length === 0) {\n return \"Select Probes\";\n }\n if (selectedIds.length <= 2) {\n return _.map(_.filter(scope.ids, {selected: true}), \"text\").join(\", \");\n }\n return _.map(_.filter(scope.ids, {selected: true}), \"text\").slice(0, 2).join(\", \") + \" and \" + (selectedIds.length - 2) + \" more\";\n };\n\n scope.hide = function() {\n scope.model.route = {\n type: \"byIds\",\n config: {\n ids: []\n }\n };\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n _.forEach(selectedIds, function(c) {\n scope.model.route.config.ids.push(c);\n });\n scope.selectorOpen = false;\n bodyEl.off('click', scope.bodyOnClick);\n };\n\n scope.bodyOnClick = function(e) {\n var dropdown = elem.find('.variable-value-dropdown');\n if (dropdown.has(e.target).length === 0) {\n scope.$apply(scope.hide);\n }\n };\n\n scope.$watch('model.id', function() {\n scope.init();\n });\n },\n };\n});\n"]} \ No newline at end of file diff --git a/dist/directives/partials/endpointCollectorSelect.html b/dist/directives/partials/endpointCollectorSelect.html index 647c329..de4e9ce 100644 --- a/dist/directives/partials/endpointCollectorSelect.html +++ b/dist/directives/partials/endpointCollectorSelect.html @@ -1,43 +1,6 @@
-
- -
- - -
- {{selectTagTitle()}} -
-
- -
- -
-

Tags allow you to create a dynamic set of probes which will update as you add and remove probes from tag groups.

-
-
- -
-
-
diff --git a/dist/panels/endpoint-list/module.js b/dist/panels/endpoint-list/module.js index 175a43d..0866853 100644 --- a/dist/panels/endpoint-list/module.js +++ b/dist/panels/endpoint-list/module.js @@ -46,7 +46,7 @@ System.register(['../../filters/all', '../../directives/all', 'lodash', 'app/plu _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; _createClass = function () { diff --git a/dist/panels/nav-panel/module.js b/dist/panels/nav-panel/module.js index e553078..261dac7 100644 --- a/dist/panels/nav-panel/module.js +++ b/dist/panels/nav-panel/module.js @@ -48,7 +48,7 @@ System.register(['lodash', '../../filters/all', '../../directives/all', 'app/plu _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; _createClass = function () { diff --git a/src/directives/all.js b/src/directives/all.js index a579018..bdcb287 100644 --- a/src/directives/all.js +++ b/src/directives/all.js @@ -125,24 +125,16 @@ angular.module('grafana.directives').directive('endpointProbeSelect', function($ var selectedTags = []; scope.init = function() { - if (scope.model.route.type === 'byIds') { - selectedIds = scope.model.route.config.ids; - scope.footprint = {value: "static"}; - } else { - selectedTags = scope.model.route.config.tags; - scope.footprint = {value: "dynamic"}; - } + selectedIds = scope.model.route.config.ids; + scope.footprint = {value: "static"}; scope.error = false; - scope.reset(); }; scope.reset = function() { scope.error = false; scope.ids = []; - scope.tags = []; - //build out our list of collectorIds and tags - var seenTags = {}; + //build out our list of collectorIds var sortedProbes = _.sortBy(scope.probes, function(o) { return o.name.toLowerCase(); }); @@ -151,27 +143,8 @@ angular.module('grafana.directives').directive('endpointProbeSelect', function($ if (_.indexOf(selectedIds, c.id) >= 0) { option.selected = true; } - _.forEach(c.tags.sort(), function(t) { - if (!(t in seenTags)) { - seenTags[t] = true; - var o = {selected: false, text: t}; - if (_.indexOf(selectedTags, t) >= 0) { - o.selected = true; - } - scope.tags.push(o); - } - }); scope.ids.push(option); }); - if (scope.footprint.value === 'dynamic') { - _.forEach(scope.ids, function(i) { - i.selected = false; - }); - } else { - _.forEach(scope.tags, function(t) { - t.selected = false; - }); - } }; scope.show = function() { @@ -248,56 +221,17 @@ angular.module('grafana.directives').directive('endpointProbeSelect', function($ return _.map(_.filter(scope.ids, {selected: true}), "text").slice(0, 2).join(", ") + " and " + (selectedIds.length - 2) + " more"; }; - scope.routeTypeChange = function() { - if (scope.footprint.value === 'dynamic') { - selectedTags = _.map(_.filter(scope.tags, {selected: true}), "text"); - scope.model.route = { - type: "byTags", - config: { - tags: [] - } - }; - _.forEach(selectedTags, function(t) { - scope.model.route.config.tags.push(t.text); - }); - } else { - selectedIds = _.map(_.filter(scope.ids, {selected: true}), "id"); - scope.model.route = { - type: "byIds", - config: { - ids: [] - } - }; - _.forEach(selectedIds, function(c) { - scope.model.route.config.ids.push(c.id); - }); - } - }; - scope.hide = function() { - if (scope.footprint.value === 'dynamic') { - scope.model.route = { - type: "byTags", - config: { - tags: [] - } - }; - selectedTags = _.map(_.filter(scope.tags, {selected: true}), "text"); - _.forEach(selectedTags, function(t) { - scope.model.route.config.tags.push(t); - }); - } else { - scope.model.route = { - type: "byIds", - config: { - ids: [] - } - }; - selectedIds = _.map(_.filter(scope.ids, {selected: true}), "id"); - _.forEach(selectedIds, function(c) { - scope.model.route.config.ids.push(c); - }); - } + scope.model.route = { + type: "byIds", + config: { + ids: [] + } + }; + selectedIds = _.map(_.filter(scope.ids, {selected: true}), "id"); + _.forEach(selectedIds, function(c) { + scope.model.route.config.ids.push(c); + }); scope.selectorOpen = false; bodyEl.off('click', scope.bodyOnClick); }; diff --git a/src/directives/partials/endpointCollectorSelect.html b/src/directives/partials/endpointCollectorSelect.html index 647c329..de4e9ce 100644 --- a/src/directives/partials/endpointCollectorSelect.html +++ b/src/directives/partials/endpointCollectorSelect.html @@ -1,43 +1,6 @@
-
- -
- - -
- {{selectTagTitle()}} -
-
- -
- -
-

Tags allow you to create a dynamic set of probes which will update as you add and remove probes from tag groups.

-
-
- -
-
-
From 6850aa54a0554a082872153822474f64c8004a77 Mon Sep 17 00:00:00 2001 From: jeremy Date: Mon, 17 Apr 2017 23:02:48 -0500 Subject: [PATCH 2/7] Adding endpoint default probes --- dist/components/endpoint/endpoint_config.js | 21 ++---------- .../endpoint/endpoint_config.js.map | 2 +- .../endpoint/partials/endpoint_config.html | 7 ++++ dist/directives/all.js | 32 ++++++++++--------- dist/directives/all.js.map | 2 +- src/components/endpoint/endpoint_config.js | 21 ++---------- .../endpoint/partials/endpoint_config.html | 7 ++++ src/directives/all.js | 30 +++++++++-------- 8 files changed, 53 insertions(+), 69 deletions(-) diff --git a/dist/components/endpoint/endpoint_config.js b/dist/components/endpoint/endpoint_config.js index d7a5d68..2fe6c79 100644 --- a/dist/components/endpoint/endpoint_config.js +++ b/dist/components/endpoint/endpoint_config.js @@ -136,7 +136,7 @@ System.register(['lodash', 'angular'], function (_export, _context) { this.checks = {}; this.endpoint = {}; this.probes = []; - this.probesByTag = {}; + this.defaultFootprint = []; this.org = null; this.quotas = {}; @@ -327,24 +327,7 @@ System.register(['lodash', 'angular'], function (_export, _context) { }, { key: 'getProbesForCheck', value: function getProbesForCheck(check) { - if (check.route.type === "byIds") { - return check.route.config.ids || []; - } - - if (check.route.type === "byTags") { - var probeList = {}; - _.forEach(this.probes, function (p) { - _.forEach(check.route.config.tags, function (t) { - if (_.indexOf(p.tags, t) !== -1) { - probeList[p.id] = true; - } - }); - }); - return _.keys(probeList); - } - - this.alertSrv("check has unknown routing type.", "unknown route type.", "error", 5000); - return []; + return check.route.config.ids || []; } }, { key: 'totalChecks', diff --git a/dist/components/endpoint/endpoint_config.js.map b/dist/components/endpoint/endpoint_config.js.map index a961511..043f26b 100644 --- a/dist/components/endpoint/endpoint_config.js.map +++ b/dist/components/endpoint/endpoint_config.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/components/endpoint/endpoint_config.js"],"names":["defaultCheck","checkType","check","_","cloneDeep","_defaultCheck","type","settings","timeout","port","path","headers","body","method","host","downloadLimit","frequency","validateCert","hostname","name","protocol","server","angular","healthSettings","notifications","num_collectors","steps","route","config","EndpointConfigCtrl","$scope","$injector","$rootScope","$location","$modal","$anchorScroll","$timeout","$window","$q","backendSrv","alertSrv","self","pageReady","showCreating","insufficientQuota","frequencyOpts","freqOpt","forEach","push","value","f","label","newEndpointName","checks","endpoint","probes","probesByTag","org","quotas","ignoreChanges","promises","reset","search","getEndpoint","getQuotas","checkQuota","getProbes","getOrgDetails","all","then","err","set","showPing","showDNS","showHTTP","showHTTPS","onbeforeunload","changesPending","$on","event","next","preventDefault","baseLen","absUrl","length","url","console","log","nextUrl","substring","modalScope","$new","ignore","save","savePending","appEvent","src","modalClass","scope","idString","id","parseInt","get","resp","meta","code","message","reject","definedChecks","keys","indexOf","q","target","limit","used","probe","tags","t","statusText","getProbesForCheck","ids","probeList","p","undefined","reduce","total","enabled","totalChecks","probeCount","size","toFixed","wpPlan","checksPerMonth","discovered","discoveryInProgress","discoveryError","showConfig","history","back","delete","saveEndpoint","i","put","numProbes","num_collector","found","c","finally","delay","newChecks","post","slug","endpointReadyDelay","endpointReady","changes","seenCheckTypes","equals","templateUrl"],"mappings":";;;;;;;;;;;;;AAkBA,WAASA,YAAT,CAAsBC,SAAtB,EAAiC;AAC/B,QAAIC,QAAQC,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AApB,EAA4DoD,MAA5D,CAAmEA,MAAnE;AACA;AACF,mBAAK,OAAL;AACEA,uBAAO,cAAP,IAAyB,OAAzB;AACA,qBAAK7B,SAAL,CAAevB,IAAf,CAAoB,sCAApB,EAA4DoD,MAA5D,CAAmEA,MAAnE;AACA;AACF;AACE,qBAAK7B,SAAL,CAAevB,IAAf,CAAoB,0CAApB,EAAgEoD,MAAhE,CAAuEA,MAAvE;AACA;AApBJ;AAsBD;;;;;;AAGHjC,yBAAmBgI,WAAnB,GAAiC,yFAAjC;;oCAEQhI,kB","file":"endpoint_config.js","sourcesContent":["import _ from 'lodash';\nimport angular from 'angular';\n\nvar _defaultCheck = {\n settings: {},\n healthSettings: {\n notifications: {},\n num_collectors: 3,\n steps: 3\n },\n route: {\n type: \"byIds\",\n config: {\n \"ids\": []\n }\n }\n};\n\nfunction defaultCheck(checkType) {\n var check = _.cloneDeep(_defaultCheck);\n switch (checkType) {\n case \"http\":\n check.type = \"http\";\n check.settings = {\n timeout: 5,\n port: 80,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"https\":\n check.type = \"https\";\n check.settings = {\n timeout: 5,\n port: 443,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n validateCert: true,\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"ping\":\n check.type = \"ping\";\n check.settings = {\n timeout: 5,\n hostname: \"\"\n };\n check.frequency = 60;\n break;\n case \"dns\":\n check.type = \"dns\";\n check.settings = {\n timeout: 5,\n name: \"\",\n port: 53,\n protocol: \"udp\",\n server: \"\",\n type: \"A\"\n };\n check.frequency = 120;\n break;\n }\n return check;\n}\n\nclass EndpointConfigCtrl {\n /** @ngInject */\n constructor($scope, $injector, $rootScope, $location, $modal, $anchorScroll, $timeout, $window, $q, backendSrv, alertSrv) {\n var self = this;\n this.backendSrv = backendSrv;\n this.$location = $location;\n this.$timeout = $timeout;\n this.$q = $q;\n this.alertSrv = alertSrv;\n this.$window = $window;\n\n this.pageReady = false;\n this.showCreating = false;\n this.insufficientQuota = false;\n\n this.frequencyOpts = [];\n var freqOpt = [10, 30, 60, 120];\n _.forEach(freqOpt, f => {\n this.frequencyOpts.push({value: f, label: \"Every \"+f+\"s\"});\n });\n\n this.newEndpointName = \"\";\n this.checks = {};\n this.endpoint = {};\n this.probes = [];\n this.probesByTag = {};\n this.org = null;\n this.quotas = {};\n\n this.ignoreChanges = false;\n\n var promises = [];\n this.reset();\n if (\"endpoint\" in $location.search()) {\n promises.push(this.getEndpoint($location.search().endpoint));\n promises.push(this.getQuotas());\n } else {\n // make sure we have sufficient quota.\n promises.push(this.checkQuota());\n this.endpoint = {name: \"\"};\n }\n\n promises.push(this.getProbes());\n promises.push(this.getOrgDetails());\n\n $q.all(promises).then(() => {\n this.pageReady = true;\n $timeout(function() {\n $anchorScroll();\n }, 0, false);\n }, function(err) {\n alertSrv.set(\"endpoint config init failed\", err, 'error', 10000);\n });\n\n if ($location.search().check) {\n switch($location.search().check) {\n case \"ping\":\n this.showPing = true;\n break;\n case \"dns\":\n this.showDNS = true;\n break;\n case \"http\":\n this.showHTTP = true;\n break;\n case \"https\":\n this.showHTTPS = true;\n break;\n }\n }\n\n $window.onbeforeunload = function() {\n if (self.ignoreChanges) { return; }\n if (self.changesPending()) {\n return \"There are unsaved changes to this dashboard\";\n }\n };\n\n $scope.$on('$locationChangeStart', function(event, next) {\n if ((!self.ignoreChanges) && (self.changesPending())) {\n event.preventDefault();\n var baseLen = $location.absUrl().length - $location.url().length;\n console.log(\"next: \", next);\n console.log(\"baseLen: \", baseLen);\n var nextUrl = next.substring(baseLen);\n console.log(\"nexUrl: \", nextUrl);\n var modalScope = $scope.$new();\n modalScope.ignore = function() {\n self.ignoreChanges = true;\n $location.url(nextUrl);\n return;\n };\n\n modalScope.save = function() {\n self.savePending(nextUrl);\n };\n\n $rootScope.appEvent('show-modal', {\n src: 'public/app/partials/unsaved-changes.html',\n modalClass: 'confirm-modal',\n scope: modalScope,\n });\n }\n });\n }\n\n getEndpoint(idString) {\n var id = parseInt(idString);\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/'+id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n this.newEndpointName = this.endpoint.name;\n _.forEach(resp.body.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] = defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n });\n }\n\n getQuotas() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/quotas').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get quotas.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n _.forEach(resp.body, q => {\n this.quotas[q.target] = q;\n });\n return this.quotas;\n });\n }\n\n checkQuota() {\n return this.getQuotas().then(quotas => {\n if (quotas.endpoint) {\n const q = quotas.endpoint;\n this.insufficientQuota = q.limit > 0 && q.used >= q.limit;\n }\n if (this.insufficientQuota) {\n return this.$q.reject(\"Endpoint quota reached.\");\n }\n return true;\n });\n }\n\n getProbes() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/probes').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get getProbes.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.probes = resp.body;\n _.forEach(this.probes, probe => {\n _.forEach(probe.tags, t => {\n if (!(t in this.probesByTag)) {\n this.probesByTag[t] = [];\n }\n this.probesByTag[t].push(probe);\n });\n });\n });\n }\n\n getOrgDetails() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/grafana-net/profile/org').then(\n resp => {\n this.org = resp;\n },\n resp => {\n this.alertSrv.set(\"failed to get Org Details\", resp.statusText, 'error', 10000);\n }\n );\n }\n\n probeCount(check) {\n if (!check) {\n return 0;\n }\n return this.getProbesForCheck(check).length;\n }\n\n getProbesForCheck(check) {\n if (check.route.type === \"byIds\") {\n return check.route.config.ids || [];\n }\n\n if (check.route.type === \"byTags\") {\n var probeList = {};\n _.forEach(this.probes, p => {\n _.forEach(check.route.config.tags, t => {\n if (_.indexOf(p.tags, t) !== -1) {\n probeList[p.id] = true;\n }\n });\n });\n return _.keys(probeList);\n }\n\n this.alertSrv(\"check has unknown routing type.\", \"unknown route type.\", \"error\", 5000);\n return [];\n }\n\n totalChecks(check) {\n if (check === undefined) {\n return _.reduce(this.checks, (total, value) => {\n if (!value.enabled) {\n return total;\n }\n\n return total + this.totalChecks(value);\n }, 0);\n }\n\n var probeCount = this.probeCount(check);\n if (probeCount < 1 || check.frequency < 1) {\n return 0;\n }\n\n return (30.4375 * 24 * (3600/check.frequency) * probeCount / 1000000);\n }\n\n formatSize(size) {\n if (size > 1024 * 1024) {\n return (size / 1024 / 1024).toFixed(2) + ' MB';\n }\n if (size > 1024) {\n return (size / 1024).toFixed(2) + ' KB';\n }\n return size;\n }\n\n currentlyTrial() {\n if (!this.org) {\n return false;\n }\n\n if (this.org.wpPlan === 'trial') {\n return true;\n }\n\n return false;\n }\n\n requiresUpgrade() {\n if (!this.org) {\n return true;\n }\n\n if (this.org.wpPlan !== '' && this.org.wpPlan !== 'free' && this.org.wpPlan !== 'trial') {\n return false;\n }\n\n if (this.org.checksPerMonth / 1000000 + this.totalChecks() > 1) {\n return true;\n }\n\n return false;\n }\n\n reset() {\n this.discovered = false;\n this.discoveryInProgress = false;\n this.discoveryError = false;\n this.showConfig = false;\n this.showCreating = false;\n this.endpoint = {};\n this.checks = {};\n }\n\n cancel() {\n this.reset();\n this.ignoreChanges = true;\n this.$window.history.back();\n }\n\n remove(endpoint) {\n return this.backendSrv.delete('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/' + endpoint.id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to delete endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.$location.path('plugins/raintank-worldping-app/page/endpoints');\n });\n }\n\n updateEndpoint() {\n this.endpoint.name = this.newEndpointName;\n this.saveEndpoint();\n }\n\n tagsUpdated() {\n this.saveEndpoint();\n }\n\n savePending(nextUrl) {\n _.forEach(this.checks, check => {\n if (!check.id && check.enabled) {\n //add the check\n this.endpoint.checks.push(check);\n return;\n }\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].id === check.id) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n }\n }\n });\n return this.saveEndpoint().then(() => {\n this.ignoreChanges = true;\n if (nextUrl) {\n this.$location.url(nextUrl);\n } else {\n this.$location.path(\"plugins/raintank-worldping-app/page/endpoints\");\n }\n });\n }\n\n saveEndpoint() {\n return this.backendSrv.put('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n });\n }\n\n updateCheck(check) {\n if (check.enabled) {\n var numProbes = this.probeCount(check);\n if (numProbes < check.healthSettings.num_collector) {\n check.healthSettings.num_collectors = numProbes;\n }\n if (check.type === \"http\" || check.type === \"https\") {\n if (['PUT', 'POST', 'DELETE', 'PATCH'].indexOf(check.settings.method) < 0) {\n check.settings.body = \"\";\n }\n }\n }\n var found = false;\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].type === check.type) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n found = true;\n break;\n }\n }\n if (!found) {\n this.endpoint.checks.push(check);\n }\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(check.type + \" check updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, c => {\n if (c.type === check.type) {\n this.checks[check.type] = _.cloneDeep(c);\n }\n });\n });\n }\n\n skipDiscovery() {\n this.discoveryInProgress = false;\n this.showConfig = true;\n this.discoveryError = false;\n }\n\n discover(endpoint) {\n if (!endpoint.name){\n return;\n }\n this.discoveryInProgress = true;\n this.discoveryError = false;\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/discover', endpoint).then(\n resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n this.discoveryError = \"Failed to discover endpoint.\";\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] =defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n this.showConfig = true;\n this.discovered = true;\n },\n () => {\n this.discoveryError = \"Failed to discover endpoint.\";\n }\n ).finally(() => {\n this.discoveryInProgress = false;\n });\n }\n\n addEndpoint() {\n var self = this;\n var delay = 120;\n var newChecks = [];\n _.forEach(this.checks, check => {\n if (check.enabled) {\n if (check.frequency < delay) {\n delay = check.frequency;\n }\n var numProbes = this.probeCount(check);\n if (numProbes < 3) {\n check.healthSettings.num_collectors = numProbes;\n }\n newChecks.push(check);\n }\n });\n this.endpoint.checks = newChecks;\n return this.backendSrv.post('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to add endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint.id = resp.body.id;\n this.endpoint.slug = resp.body.slug;\n this.ignoreChanges = true;\n this.alertSrv.set(\"endpoint added\", '', 'success', 3000);\n this.showCreating = true;\n this.endpointReadyDelay = delay;\n this.endpointReady = false;\n this.$timeout(function() {\n self.endpointReady = true;\n }, delay * 1000);\n });\n }\n\n changesPending() {\n var changes = false;\n var seenCheckTypes = {};\n\n //check if any existing checks have changed\n _.forEach(this.endpoint.checks, check => {\n seenCheckTypes[check.type] = true;\n if (!angular.equals(check, this.checks[check.type])) {\n changes = true;\n }\n });\n\n //check if any new checks added.\n _.forEach(this.checks, check => {\n if (!(check.type in seenCheckTypes) && (\"frequency\" in check) && check.enabled) {\n changes = true;\n }\n });\n\n return changes;\n }\n\n gotoDashboard(endpoint, type) {\n if (!type) {\n type = 'summary';\n }\n var search = {\n \"var-collector\": \"All\",\n \"var-endpoint\": this.endpoint.slug\n };\n switch(type) {\n case \"summary\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n case \"ping\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-ping\").search(search);\n break;\n case \"dns\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-dns\").search(search);\n break;\n case \"http\":\n search['var-protocol'] = \"http\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n case \"https\":\n search['var-protocol'] = \"https\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n default:\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n }\n }\n}\n\nEndpointConfigCtrl.templateUrl = 'public/plugins/raintank-worldping-app/components/endpoint/partials/endpoint_config.html';\n\nexport {EndpointConfigCtrl};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/components/endpoint/endpoint_config.js"],"names":["defaultCheck","checkType","check","_","cloneDeep","_defaultCheck","type","settings","timeout","port","path","headers","body","method","host","downloadLimit","frequency","validateCert","hostname","name","protocol","server","angular","healthSettings","notifications","num_collectors","steps","route","config","EndpointConfigCtrl","$scope","$injector","$rootScope","$location","$modal","$anchorScroll","$timeout","$window","$q","backendSrv","alertSrv","self","pageReady","showCreating","insufficientQuota","frequencyOpts","freqOpt","forEach","push","value","f","label","newEndpointName","checks","endpoint","probes","defaultFootprint","org","quotas","ignoreChanges","promises","reset","search","getEndpoint","getQuotas","checkQuota","getProbes","getOrgDetails","all","then","err","set","showPing","showDNS","showHTTP","showHTTPS","onbeforeunload","changesPending","$on","event","next","preventDefault","baseLen","absUrl","length","url","console","log","nextUrl","substring","modalScope","$new","ignore","save","savePending","appEvent","src","modalClass","scope","idString","id","parseInt","get","resp","meta","code","message","reject","definedChecks","keys","indexOf","q","target","limit","used","probe","tags","t","probesByTag","statusText","getProbesForCheck","ids","undefined","reduce","total","enabled","totalChecks","probeCount","size","toFixed","wpPlan","checksPerMonth","discovered","discoveryInProgress","discoveryError","showConfig","history","back","delete","saveEndpoint","i","put","numProbes","num_collector","found","c","finally","delay","newChecks","post","slug","endpointReadyDelay","endpointReady","changes","seenCheckTypes","equals","templateUrl"],"mappings":";;;;;;;;;;;;;AAkBA,WAASA,YAAT,CAAsBC,SAAtB,EAAiC;AAC/B,QAAIC,QAAQC,EAAEC,SAAF,CAAYC,aAAZ,CAAZ;AACA,YAAQJ,SAAR;AACA,WAAK,MAAL;AACEC,cAAMI,IAAN,GAAa,MAAb;AACAJ,cAAMK,QAAN,GA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gB,KAAKR,QAAL,CAAcgG;AAFnB,aAAb;AAIA,oBAAOhJ,IAAP;AACE,mBAAK,SAAL;AACE,qBAAK2B,SAAL,CAAevB,IAAf,CAAoB,0CAApB,EAAgEoD,MAAhE,CAAuEA,MAAvE;AACA;AACF,mBAAK,MAAL;AACE,qBAAK7B,SAAL,CAAevB,IAAf,CAAoB,uCAApB,EAA6DoD,MAA7D,CAAoEA,MAApE;AACA;AACF,mBAAK,KAAL;AACE,qBAAK7B,SAAL,CAAevB,IAAf,CAAoB,sCAApB,EAA4DoD,MAA5D,CAAmEA,MAAnE;AACA;AACF,mBAAK,MAAL;AACEA,uBAAO,cAAP,IAAyB,MAAzB;AACA,qBAAK7B,SAAL,CAAevB,IAAf,CAAoB,sCAApB,EAA4DoD,MAA5D,CAAmEA,MAAnE;AACA;AACF,mBAAK,OAAL;AACEA,uBAAO,cAAP,IAAyB,OAAzB;AACA,qBAAK7B,SAAL,CAAevB,IAAf,CAAoB,sCAApB,EAA4DoD,MAA5D,CAAmEA,MAAnE;AACA;AACF;AACE,qBAAK7B,SAAL,CAAevB,IAAf,CAAoB,0CAApB,EAAgEoD,MAAhE,CAAuEA,MAAvE;AACA;AApBJ;AAsBD;;;;;;AAGHjC,yBAAmB+H,WAAnB,GAAiC,yFAAjC;;oCAEQ/H,kB","file":"endpoint_config.js","sourcesContent":["import _ from 'lodash';\nimport angular from 'angular';\n\nvar _defaultCheck = {\n settings: {},\n healthSettings: {\n notifications: {},\n num_collectors: 3,\n steps: 3\n },\n route: {\n type: \"byIds\",\n config: {\n \"ids\": []\n }\n }\n};\n\nfunction defaultCheck(checkType) {\n var check = _.cloneDeep(_defaultCheck);\n switch (checkType) {\n case \"http\":\n check.type = \"http\";\n check.settings = {\n timeout: 5,\n port: 80,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"https\":\n check.type = \"https\";\n check.settings = {\n timeout: 5,\n port: 443,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n validateCert: true,\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"ping\":\n check.type = \"ping\";\n check.settings = {\n timeout: 5,\n hostname: \"\"\n };\n check.frequency = 60;\n break;\n case \"dns\":\n check.type = \"dns\";\n check.settings = {\n timeout: 5,\n name: \"\",\n port: 53,\n protocol: \"udp\",\n server: \"\",\n type: \"A\"\n };\n check.frequency = 120;\n break;\n }\n return check;\n}\n\nclass EndpointConfigCtrl {\n /** @ngInject */\n constructor($scope, $injector, $rootScope, $location, $modal, $anchorScroll, $timeout, $window, $q, backendSrv, alertSrv) {\n var self = this;\n this.backendSrv = backendSrv;\n this.$location = $location;\n this.$timeout = $timeout;\n this.$q = $q;\n this.alertSrv = alertSrv;\n this.$window = $window;\n\n this.pageReady = false;\n this.showCreating = false;\n this.insufficientQuota = false;\n\n this.frequencyOpts = [];\n var freqOpt = [10, 30, 60, 120];\n _.forEach(freqOpt, f => {\n this.frequencyOpts.push({value: f, label: \"Every \"+f+\"s\"});\n });\n\n this.newEndpointName = \"\";\n this.checks = {};\n this.endpoint = {};\n this.probes = [];\n this.defaultFootprint = [];\n this.org = null;\n this.quotas = {};\n\n this.ignoreChanges = false;\n\n var promises = [];\n this.reset();\n if (\"endpoint\" in $location.search()) {\n promises.push(this.getEndpoint($location.search().endpoint));\n promises.push(this.getQuotas());\n } else {\n // make sure we have sufficient quota.\n promises.push(this.checkQuota());\n this.endpoint = {name: \"\"};\n }\n\n promises.push(this.getProbes());\n promises.push(this.getOrgDetails());\n\n $q.all(promises).then(() => {\n this.pageReady = true;\n $timeout(function() {\n $anchorScroll();\n }, 0, false);\n }, function(err) {\n alertSrv.set(\"endpoint config init failed\", err, 'error', 10000);\n });\n\n if ($location.search().check) {\n switch($location.search().check) {\n case \"ping\":\n this.showPing = true;\n break;\n case \"dns\":\n this.showDNS = true;\n break;\n case \"http\":\n this.showHTTP = true;\n break;\n case \"https\":\n this.showHTTPS = true;\n break;\n }\n }\n\n $window.onbeforeunload = function() {\n if (self.ignoreChanges) { return; }\n if (self.changesPending()) {\n return \"There are unsaved changes to this dashboard\";\n }\n };\n\n $scope.$on('$locationChangeStart', function(event, next) {\n if ((!self.ignoreChanges) && (self.changesPending())) {\n event.preventDefault();\n var baseLen = $location.absUrl().length - $location.url().length;\n console.log(\"next: \", next);\n console.log(\"baseLen: \", baseLen);\n var nextUrl = next.substring(baseLen);\n console.log(\"nexUrl: \", nextUrl);\n var modalScope = $scope.$new();\n modalScope.ignore = function() {\n self.ignoreChanges = true;\n $location.url(nextUrl);\n return;\n };\n\n modalScope.save = function() {\n self.savePending(nextUrl);\n };\n\n $rootScope.appEvent('show-modal', {\n src: 'public/app/partials/unsaved-changes.html',\n modalClass: 'confirm-modal',\n scope: modalScope,\n });\n }\n });\n }\n\n getEndpoint(idString) {\n var id = parseInt(idString);\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/'+id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n this.newEndpointName = this.endpoint.name;\n _.forEach(resp.body.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] = defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n });\n }\n\n getQuotas() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/quotas').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get quotas.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n _.forEach(resp.body, q => {\n this.quotas[q.target] = q;\n });\n return this.quotas;\n });\n }\n\n checkQuota() {\n return this.getQuotas().then(quotas => {\n if (quotas.endpoint) {\n const q = quotas.endpoint;\n this.insufficientQuota = q.limit > 0 && q.used >= q.limit;\n }\n if (this.insufficientQuota) {\n return this.$q.reject(\"Endpoint quota reached.\");\n }\n return true;\n });\n }\n\n getProbes() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/probes').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get getProbes.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.probes = resp.body;\n _.forEach(this.probes, probe => {\n _.forEach(probe.tags, t => {\n if (!(t in this.probesByTag)) {\n this.probesByTag[t] = [];\n }\n this.probesByTag[t].push(probe);\n });\n });\n });\n }\n\n getOrgDetails() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/grafana-net/profile/org').then(\n resp => {\n this.org = resp;\n },\n resp => {\n this.alertSrv.set(\"failed to get Org Details\", resp.statusText, 'error', 10000);\n }\n );\n }\n\n probeCount(check) {\n if (!check) {\n return 0;\n }\n return this.getProbesForCheck(check).length;\n }\n\n getProbesForCheck(check) {\n return check.route.config.ids || [];\n }\n\n totalChecks(check) {\n if (check === undefined) {\n return _.reduce(this.checks, (total, value) => {\n if (!value.enabled) {\n return total;\n }\n\n return total + this.totalChecks(value);\n }, 0);\n }\n\n var probeCount = this.probeCount(check);\n if (probeCount < 1 || check.frequency < 1) {\n return 0;\n }\n\n return (30.4375 * 24 * (3600/check.frequency) * probeCount / 1000000);\n }\n\n formatSize(size) {\n if (size > 1024 * 1024) {\n return (size / 1024 / 1024).toFixed(2) + ' MB';\n }\n if (size > 1024) {\n return (size / 1024).toFixed(2) + ' KB';\n }\n return size;\n }\n\n currentlyTrial() {\n if (!this.org) {\n return false;\n }\n\n if (this.org.wpPlan === 'trial') {\n return true;\n }\n\n return false;\n }\n\n requiresUpgrade() {\n if (!this.org) {\n return true;\n }\n\n if (this.org.wpPlan !== '' && this.org.wpPlan !== 'free' && this.org.wpPlan !== 'trial') {\n return false;\n }\n\n if (this.org.checksPerMonth / 1000000 + this.totalChecks() > 1) {\n return true;\n }\n\n return false;\n }\n\n reset() {\n this.discovered = false;\n this.discoveryInProgress = false;\n this.discoveryError = false;\n this.showConfig = false;\n this.showCreating = false;\n this.endpoint = {};\n this.checks = {};\n }\n\n cancel() {\n this.reset();\n this.ignoreChanges = true;\n this.$window.history.back();\n }\n\n remove(endpoint) {\n return this.backendSrv.delete('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/' + endpoint.id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to delete endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.$location.path('plugins/raintank-worldping-app/page/endpoints');\n });\n }\n\n updateEndpoint() {\n this.endpoint.name = this.newEndpointName;\n this.saveEndpoint();\n }\n\n tagsUpdated() {\n this.saveEndpoint();\n }\n\n savePending(nextUrl) {\n _.forEach(this.checks, check => {\n if (!check.id && check.enabled) {\n //add the check\n this.endpoint.checks.push(check);\n return;\n }\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].id === check.id) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n }\n }\n });\n return this.saveEndpoint().then(() => {\n this.ignoreChanges = true;\n if (nextUrl) {\n this.$location.url(nextUrl);\n } else {\n this.$location.path(\"plugins/raintank-worldping-app/page/endpoints\");\n }\n });\n }\n\n saveEndpoint() {\n return this.backendSrv.put('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n });\n }\n\n updateCheck(check) {\n if (check.enabled) {\n var numProbes = this.probeCount(check);\n if (numProbes < check.healthSettings.num_collector) {\n check.healthSettings.num_collectors = numProbes;\n }\n if (check.type === \"http\" || check.type === \"https\") {\n if (['PUT', 'POST', 'DELETE', 'PATCH'].indexOf(check.settings.method) < 0) {\n check.settings.body = \"\";\n }\n }\n }\n var found = false;\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].type === check.type) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n found = true;\n break;\n }\n }\n if (!found) {\n this.endpoint.checks.push(check);\n }\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(check.type + \" check updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, c => {\n if (c.type === check.type) {\n this.checks[check.type] = _.cloneDeep(c);\n }\n });\n });\n }\n\n skipDiscovery() {\n this.discoveryInProgress = false;\n this.showConfig = true;\n this.discoveryError = false;\n }\n\n discover(endpoint) {\n if (!endpoint.name){\n return;\n }\n this.discoveryInProgress = true;\n this.discoveryError = false;\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/discover', endpoint).then(\n resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n this.discoveryError = \"Failed to discover endpoint.\";\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] =defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n this.showConfig = true;\n this.discovered = true;\n },\n () => {\n this.discoveryError = \"Failed to discover endpoint.\";\n }\n ).finally(() => {\n this.discoveryInProgress = false;\n });\n }\n\n addEndpoint() {\n var self = this;\n var delay = 120;\n var newChecks = [];\n _.forEach(this.checks, check => {\n if (check.enabled) {\n if (check.frequency < delay) {\n delay = check.frequency;\n }\n var numProbes = this.probeCount(check);\n if (numProbes < 3) {\n check.healthSettings.num_collectors = numProbes;\n }\n newChecks.push(check);\n }\n });\n this.endpoint.checks = newChecks;\n return this.backendSrv.post('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to add endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint.id = resp.body.id;\n this.endpoint.slug = resp.body.slug;\n this.ignoreChanges = true;\n this.alertSrv.set(\"endpoint added\", '', 'success', 3000);\n this.showCreating = true;\n this.endpointReadyDelay = delay;\n this.endpointReady = false;\n this.$timeout(function() {\n self.endpointReady = true;\n }, delay * 1000);\n });\n }\n\n changesPending() {\n var changes = false;\n var seenCheckTypes = {};\n\n //check if any existing checks have changed\n _.forEach(this.endpoint.checks, check => {\n seenCheckTypes[check.type] = true;\n if (!angular.equals(check, this.checks[check.type])) {\n changes = true;\n }\n });\n\n //check if any new checks added.\n _.forEach(this.checks, check => {\n if (!(check.type in seenCheckTypes) && (\"frequency\" in check) && check.enabled) {\n changes = true;\n }\n });\n\n return changes;\n }\n\n gotoDashboard(endpoint, type) {\n if (!type) {\n type = 'summary';\n }\n var search = {\n \"var-collector\": \"All\",\n \"var-endpoint\": this.endpoint.slug\n };\n switch(type) {\n case \"summary\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n case \"ping\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-ping\").search(search);\n break;\n case \"dns\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-dns\").search(search);\n break;\n case \"http\":\n search['var-protocol'] = \"http\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n case \"https\":\n search['var-protocol'] = \"https\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n default:\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n }\n }\n}\n\nEndpointConfigCtrl.templateUrl = 'public/plugins/raintank-worldping-app/components/endpoint/partials/endpoint_config.html';\n\nexport {EndpointConfigCtrl};\n"]} \ No newline at end of file diff --git a/dist/components/endpoint/partials/endpoint_config.html b/dist/components/endpoint/partials/endpoint_config.html index af6f2e1..120c58e 100644 --- a/dist/components/endpoint/partials/endpoint_config.html +++ b/dist/components/endpoint/partials/endpoint_config.html @@ -49,6 +49,13 @@

{{ctrl.endpoint.name}}


+
+
+ + Default + +
+
diff --git a/dist/directives/all.js b/dist/directives/all.js index a5dd341..45b97f0 100644 --- a/dist/directives/all.js +++ b/dist/directives/all.js @@ -125,16 +125,23 @@ System.register(['angular', 'lodash'], function (_export, _context) { return { scope: { probes: "=", - model: "=" + model: "=", + defaultFootprint: "=?" }, templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointCollectorSelect.html', link: function link(scope, elem) { var bodyEl = angular.element($window.document.body); - var selectedIds = []; - var selectedTags = []; + var selectedIds; + + scope.defaultFootprint = scope.defaultFootprint || []; scope.init = function () { - selectedIds = scope.model.route.config.ids; + if (scope.model.route && scope.model.route.config) { + selectedIds = scope.model.route.config.ids; + } else { + selectedIds = scope.model; + } + scope.footprint = { value: "static" }; scope.error = false; scope.reset(); @@ -170,6 +177,12 @@ System.register(['angular', 'lodash'], function (_export, _context) { option.selected = !option.selected; }; + scope.selectDefaultFootprint = function () { + _.forEach(scope.defaultFootprint, function (option) { + option.selected = true; + }); + }; + scope.selectAll = function () { var select = true; selectedIds = _.map(_.filter(scope.ids, { selected: true }), "id"); @@ -208,17 +221,6 @@ System.register(['angular', 'lodash'], function (_export, _context) { return count; }; - scope.selectTagTitle = function () { - selectedTags = _.map(_.filter(scope.tags, { selected: true }), "text"); - if (selectedTags.length === 0) { - return "Select Tags"; - } - if (selectedTags.length <= 2) { - return selectedTags.join(", "); - } - return selectedTags.slice(0, 2).join(", ") + " and " + (selectedTags.length - 2) + " more"; - }; - scope.selectIdTitle = function () { selectedIds = _.map(_.filter(scope.ids, { selected: true }), "id"); if (selectedIds.length === 0) { diff --git a/dist/directives/all.js.map b/dist/directives/all.js.map index 85a76ca..646b999 100644 --- a/dist/directives/all.js.map +++ b/dist/directives/all.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/directives/all.js"],"names":["angular","_","module","directive","templateUrl","scope","ctrl","endpoint","$compile","datasourceSrv","timeSrv","check","link","init","time","from","frequency","to","metricsQuery","range","timeRange","rangeRaw","interval","targets","target","slug","type","toLowerCase","format","maxDataPoints","datasource","get","then","ds","query","results","showHealth","data","metrics","okCount","errorCount","unknownCount","collectorResults","forEach","result","parts","split","stateStr","collector","ts","state","i","datapoints","length","point","isNaN","console","log","col","unknowns","getProbesForCheck","Object","keys","eventReady","$window","$timeout","probes","model","elem","bodyEl","element","document","body","selectedIds","selectedTags","route","config","ids","footprint","value","error","reset","sortedProbes","sortBy","o","name","c","option","id","selected","text","indexOf","push","show","selectorOpen","giveFocus","on","bodyOnClick","idSelected","selectAll","select","map","filter","tagSelected","probesWithTags","probeList","tags","t","join","probeCount","tag","count","selectTagTitle","slice","selectIdTitle","hide","off","e","dropdown","find","has","$apply","$watch"],"mappings":";;;;;;;;;AAAOA,a;;AACAC,O;;;;AAEPD,cAAQE,MAAR,CAAe,oBAAf,EAAqCC,SAArC,CAA+C,2BAA/C,EAA4E,YAAW;AACrF,eAAO;AACLC,uBAAa,wFADR;AAELC,iBAAO;AACLC,kBAAM,GADD;AAELC,sBAAU;AAF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G,IAAN,GAAa,YAAW;AACtB9G,oBAAM8D,KAAN,CAAYQ,KAAZ,GAAoB;AAClBjD,sBAAM,OADY;AAElBkD,wBAAQ;AACNC,uBAAK;AADC;AAFU,eAApB;AAMAJ,4BAAcxE,EAAEoG,GAAF,CAAMpG,EAAEqG,MAAF,CAASjG,MAAMwE,GAAf,EAAoB,EAACY,UAAU,IAAX,EAApB,CAAN,EAA6C,IAA7C,CAAd;AACAxF,gBAAE0C,OAAF,CAAU8B,WAAV,EAAuB,UAASa,CAAT,EAAY;AACjCjF,sBAAM8D,KAAN,CAAYQ,KAAZ,CAAkBC,MAAlB,CAAyBC,GAAzB,CAA6Be,IAA7B,CAAkCN,CAAlC;AACD,eAFD;AAGAjF,oBAAMyF,YAAN,GAAqB,KAArB;AACAzB,qBAAO+C,GAAP,CAAW,OAAX,EAAoB/G,MAAM4F,WAA1B;AACD,aAbD;;AAeA5F,kBAAM4F,WAAN,GAAoB,UAASoB,CAAT,EAAY;AAC9B,kBAAIC,WAAWlD,KAAKmD,IAAL,CAAU,0BAAV,CAAf;AACA,kBAAID,SAASE,GAAT,CAAaH,EAAE7F,MAAf,EAAuB6B,MAAvB,KAAkC,CAAtC,EAAyC;AACvChD,sBAAMoH,MAAN,CAAapH,MAAM8G,IAAnB;AACD;AACF,aALD;;AAOA9G,kBAAMqH,MAAN,CAAa,UAAb,EAAyB,YAAW;AAClCrH,oBAAMQ,IAAN;AACD,aAFD;AAGD;AArII,SAAP;AAuID,OAxID","file":"all.js","sourcesContent":["import angular from 'angular';\nimport _ from 'lodash';\n\nangular.module('grafana.directives').directive(\"rtEndpointHealthDashboard\", function() {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointHealthDashboard.html',\n scope: {\n ctrl: \"=\",\n endpoint: \"=\"\n }\n };\n});\n\nangular.module('grafana.directives').directive(\"rtCheckHealth\", function($compile, datasourceSrv, timeSrv) {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/checkHealth.html',\n scope: {\n check: \"=\",\n ctrl: \"=\"\n },\n link: function(scope) {\n timeSrv.init({\n time: {from: \"now-\"+(scope.check.frequency + 30)+ 's', to: \"now\"}\n });\n var metricsQuery = {\n range: timeSrv.timeRange(),\n rangeRaw: timeSrv.timeRange(true),\n interval: scope.check.frequency + 's',\n targets: [\n {target: \"worldping.\"+scope.ctrl.endpoint.slug + \".*.\" +\n scope.check.type.toLowerCase()+\".{ok_state,error_state}\"}\n ],\n format: 'json',\n maxDataPoints: 10,\n };\n\n var datasource = datasourceSrv.get('raintank');\n datasource.then(function(ds) {\n ds.query(metricsQuery).then(function(results) {\n showHealth(results);\n }, function() {\n showHealth({data: []});\n });\n });\n\n function showHealth(metrics) {\n var okCount = 0;\n var errorCount = 0;\n var unknownCount = 0;\n var collectorResults = {};\n _.forEach(metrics.data, function(result) {\n var parts = result.target.split('.');\n var stateStr = parts[4];\n var collector = parts[2];\n if (!(collector in collectorResults)) {\n collectorResults[collector] = {ts: -1, state: -1};\n }\n\n //start with the last point and work backwards till we find a non-null value.\n for (var i = result.datapoints.length - 1 ; i >= 0; i--) {\n var point = result.datapoints[i];\n if (!isNaN(point[0])) {\n if ((point[0] === 1) && (point[1] > collectorResults[collector].ts)) {\n collectorResults[collector].ts = point[1];\n switch (stateStr) {\n case 'ok_state':\n collectorResults[collector].state = 0;\n break;\n case 'error_state':\n collectorResults[collector].state = 2;\n break;\n default:\n collectorResults[collector].state = -1;\n console.log(\"unknown state returned. this shouldnt happen :(\");\n }\n break;\n }\n }\n }\n });\n for (var col in collectorResults) {\n switch (collectorResults[col].state) {\n case 0:\n okCount++;\n break;\n case 2:\n errorCount++;\n break;\n default:\n unknownCount++;\n }\n }\n var unknowns = scope.ctrl.getProbesForCheck(scope.check.type).length - Object.keys(collectorResults).length;\n unknownCount += unknowns;\n\n scope.okCount = okCount;\n scope.errorCount = errorCount;\n scope.unknownCount = unknownCount;\n scope.eventReady = true;\n }\n }\n };\n});\n\nangular.module('grafana.directives').directive(\"rtEndpointHealth\", function() {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointHealth.html',\n scope: {\n endpoint: \"=\",\n ctrl: \"=\"\n }\n };\n});\n\nangular.module('grafana.directives').directive('endpointProbeSelect', function($compile, $window, $timeout) {\n return {\n scope: {\n probes: \"=\",\n model: \"=\",\n },\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointCollectorSelect.html',\n link: function(scope, elem) {\n var bodyEl = angular.element($window.document.body);\n var selectedIds = [];\n var selectedTags = [];\n\n scope.init = function() {\n selectedIds = scope.model.route.config.ids;\n scope.footprint = {value: \"static\"};\n scope.error = false;\n scope.reset();\n };\n\n scope.reset = function() {\n scope.error = false;\n scope.ids = [];\n //build out our list of collectorIds\n var sortedProbes = _.sortBy(scope.probes, function(o) {\n return o.name.toLowerCase();\n });\n _.forEach(sortedProbes, function(c) {\n var option = {id: c.id, selected: false, text: c.name};\n if (_.indexOf(selectedIds, c.id) >= 0) {\n option.selected = true;\n }\n scope.ids.push(option);\n });\n };\n\n scope.show = function() {\n scope.reset();\n scope.selectorOpen = true;\n scope.giveFocus = 1;\n\n $timeout(function() {\n bodyEl.on('click', scope.bodyOnClick);\n }, 0, false);\n };\n\n scope.idSelected = function(option) {\n option.selected = !option.selected;\n };\n\n scope.selectAll = function() {\n var select = true;\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n\n if (selectedIds.length === scope.ids.length) {\n select = false;\n }\n _.forEach(scope.ids, function(option) {\n option.selected = select;\n });\n };\n\n scope.tagSelected = function(option) {\n option.selected = !option.selected;\n };\n\n scope.probesWithTags = function() {\n var probeList = {};\n _.forEach(scope.probes, function(c) {\n _.forEach(_.filter(scope.tags, {selected: true}), function(t) {\n if (_.indexOf(c.tags, t.text) !== -1) {\n probeList[c.name] = true;\n }\n });\n });\n return Object.keys(probeList).join(', ');\n };\n\n scope.probeCount = function(tag) {\n var count = 0;\n _.forEach(scope.probes, function(c) {\n if (_.indexOf(c.tags, tag.text) !== -1) {\n count++;\n }\n });\n return count;\n };\n\n scope.selectTagTitle = function() {\n selectedTags = _.map(_.filter(scope.tags, {selected: true}), \"text\");\n if (selectedTags.length === 0) {\n return \"Select Tags\";\n }\n if (selectedTags.length <= 2) {\n return selectedTags.join(\", \");\n }\n return selectedTags.slice(0, 2).join(\", \") + \" and \" + (selectedTags.length - 2) + \" more\";\n };\n\n scope.selectIdTitle = function() {\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n if (selectedIds.length === 0) {\n return \"Select Probes\";\n }\n if (selectedIds.length <= 2) {\n return _.map(_.filter(scope.ids, {selected: true}), \"text\").join(\", \");\n }\n return _.map(_.filter(scope.ids, {selected: true}), \"text\").slice(0, 2).join(\", \") + \" and \" + (selectedIds.length - 2) + \" more\";\n };\n\n scope.hide = function() {\n scope.model.route = {\n type: \"byIds\",\n config: {\n ids: []\n }\n };\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n _.forEach(selectedIds, function(c) {\n scope.model.route.config.ids.push(c);\n });\n scope.selectorOpen = false;\n bodyEl.off('click', scope.bodyOnClick);\n };\n\n scope.bodyOnClick = function(e) {\n var dropdown = elem.find('.variable-value-dropdown');\n if (dropdown.has(e.target).length === 0) {\n scope.$apply(scope.hide);\n }\n };\n\n scope.$watch('model.id', function() {\n scope.init();\n });\n },\n };\n});\n"]} \ No newline at end of file +{"version":3,"sources":["../../src/directives/all.js"],"names":["angular","_","module","directive","templateUrl","scope","ctrl","endpoint","$compile","datasourceSrv","timeSrv","check","link","init","time","from","frequency","to","metricsQuery","range","timeRange","rangeRaw","interval","targets","target","slug","type","toLowerCase","format","maxDataPoints","datasource","get","then","ds","query","results","showHealth","data","metrics","okCount","errorCount","unknownCount","collectorResults","forEach","result","parts","split","stateStr","collector","ts","state","i","datapoints","length","point","isNaN","console","log","col","unknowns","getProbesForCheck","Object","keys","eventReady","$window","$timeout","probes","model","defaultFootprint","elem","bodyEl","element","document","body","selectedIds","route","config","ids","footprint","value","error","reset","sortedProbes","sortBy","o","name","c","option","id","selected","text","indexOf","push","show","selectorOpen","giveFocus","on","bodyOnClick","idSelected","selectDefaultFootprint","selectAll","select","map","filter","tagSelected","probesWithTags","probeList","tags","t","join","probeCount","tag","count","selectIdTitle","slice","hide","off","e","dropdown","find","has","$apply","$watch"],"mappings":";;;;;;;;;AAAOA,a;;AACAC,O;;;;AAEPD,cAAQE,MAAR,CAAe,oBAAf,EAAqCC,SAArC,CAA+C,2BAA/C,EAA4E,YAAW;AACrF,eAAO;AACLC,uBAAa,wFADR;AAELC,iBAAO;AACLC,kBAAM,GADD;AAELC,sBAAU;AAFL;AAFF,SAAP;AAOD,OARD;;AAUAP,cAAQE,MAAR,CAAe,oBAAf,EAAqCC,SAArC,CAA+C,eAA/C,EAAgE,UAASK,QAAT,EAAmBC,aAAnB,EAAkCC,OAAlC,EAA2C;AACzG,eAAO;AACLN,uBAAa,4EADR;AAELC,iBAAO;AACLM,mBAAO,GADF;AAELL,kBAAM;AAFD,WAFF;AAMLM,gBAAM,cAASP,KAAT,EAAgB;AACpBK,oBAAQG,IAAR,CAAa;AACXC,oBAAM,EAACC,MAAM,UAAQV,MAAMM,KAAN,CAAYK,SAAZ,GAAwB,EAAhC,IAAqC,GAA5C,EAAiDC,IAAI,KAArD;AADK,aAAb;AAGA,gBAAIC,eAAe;AACjBC,qBAAOT,QAAQU,SAAR,EADU;AAEjBC,wBAAUX,QAAQU,SAAR,CAAkB,IAAlB,CAFO;AAGjBE,wBAAUjB,MAAMM,KAAN,CAAYK,SAAZ,GAAwB,GAHjB;AAIjBO,uBAAS,CACP,EAACC,QAAQ,eAAanB,MAAMC,IAAN,CAAWC,QAAX,CAAoBkB,IAAjC,GAAwC,KAAxC,GACPpB,MAAMM,KAAN,CAAYe,IAAZ,CAAiBC,WAAjB,EADO,GACwB,yBADjC,EADO,CAJQ;AAQjBC,sBAAQ,MARS;AASjBC,6BAAe;AATE,aAAnB;;AAYA,gBAAIC,aAAarB,cA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lodash';\n\nangular.module('grafana.directives').directive(\"rtEndpointHealthDashboard\", function() {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointHealthDashboard.html',\n scope: {\n ctrl: \"=\",\n endpoint: \"=\"\n }\n };\n});\n\nangular.module('grafana.directives').directive(\"rtCheckHealth\", function($compile, datasourceSrv, timeSrv) {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/checkHealth.html',\n scope: {\n check: \"=\",\n ctrl: \"=\"\n },\n link: function(scope) {\n timeSrv.init({\n time: {from: \"now-\"+(scope.check.frequency + 30)+ 's', to: \"now\"}\n });\n var metricsQuery = {\n range: timeSrv.timeRange(),\n rangeRaw: timeSrv.timeRange(true),\n interval: scope.check.frequency + 's',\n targets: [\n {target: \"worldping.\"+scope.ctrl.endpoint.slug + \".*.\" +\n scope.check.type.toLowerCase()+\".{ok_state,error_state}\"}\n ],\n format: 'json',\n maxDataPoints: 10,\n };\n\n var datasource = datasourceSrv.get('raintank');\n datasource.then(function(ds) {\n ds.query(metricsQuery).then(function(results) {\n showHealth(results);\n }, function() {\n showHealth({data: []});\n });\n });\n\n function showHealth(metrics) {\n var okCount = 0;\n var errorCount = 0;\n var unknownCount = 0;\n var collectorResults = {};\n _.forEach(metrics.data, function(result) {\n var parts = result.target.split('.');\n var stateStr = parts[4];\n var collector = parts[2];\n if (!(collector in collectorResults)) {\n collectorResults[collector] = {ts: -1, state: -1};\n }\n\n //start with the last point and work backwards till we find a non-null value.\n for (var i = result.datapoints.length - 1 ; i >= 0; i--) {\n var point = result.datapoints[i];\n if (!isNaN(point[0])) {\n if ((point[0] === 1) && (point[1] > collectorResults[collector].ts)) {\n collectorResults[collector].ts = point[1];\n switch (stateStr) {\n case 'ok_state':\n collectorResults[collector].state = 0;\n break;\n case 'error_state':\n collectorResults[collector].state = 2;\n break;\n default:\n collectorResults[collector].state = -1;\n console.log(\"unknown state returned. this shouldnt happen :(\");\n }\n break;\n }\n }\n }\n });\n for (var col in collectorResults) {\n switch (collectorResults[col].state) {\n case 0:\n okCount++;\n break;\n case 2:\n errorCount++;\n break;\n default:\n unknownCount++;\n }\n }\n var unknowns = scope.ctrl.getProbesForCheck(scope.check.type).length - Object.keys(collectorResults).length;\n unknownCount += unknowns;\n\n scope.okCount = okCount;\n scope.errorCount = errorCount;\n scope.unknownCount = unknownCount;\n scope.eventReady = true;\n }\n }\n };\n});\n\nangular.module('grafana.directives').directive(\"rtEndpointHealth\", function() {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointHealth.html',\n scope: {\n endpoint: \"=\",\n ctrl: \"=\"\n }\n };\n});\n\nangular.module('grafana.directives').directive('endpointProbeSelect', function($compile, $window, $timeout) {\n return {\n scope: {\n probes: \"=\",\n model: \"=\",\n defaultFootprint: \"=?\"\n },\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointCollectorSelect.html',\n link: function(scope, elem) {\n var bodyEl = angular.element($window.document.body);\n var selectedIds;\n\n scope.defaultFootprint = scope.defaultFootprint || [];\n\n scope.init = function() {\n if(scope.model.route && scope.model.route.config){\n selectedIds = scope.model.route.config.ids;\n } else {\n selectedIds = scope.model;\n }\n\n scope.footprint = {value: \"static\"};\n scope.error = false;\n scope.reset();\n };\n\n scope.reset = function() {\n scope.error = false;\n scope.ids = [];\n //build out our list of collectorIds\n var sortedProbes = _.sortBy(scope.probes, function(o) {\n return o.name.toLowerCase();\n });\n _.forEach(sortedProbes, function(c) {\n var option = {id: c.id, selected: false, text: c.name};\n if (_.indexOf(selectedIds, c.id) >= 0) {\n option.selected = true;\n }\n scope.ids.push(option);\n });\n };\n\n scope.show = function() {\n scope.reset();\n scope.selectorOpen = true;\n scope.giveFocus = 1;\n\n $timeout(function() {\n bodyEl.on('click', scope.bodyOnClick);\n }, 0, false);\n };\n\n scope.idSelected = function(option) {\n option.selected = !option.selected;\n };\n\n scope.selectDefaultFootprint = function() {\n _.forEach(scope.defaultFootprint, function(option) {\n option.selected = true;\n });\n };\n\n scope.selectAll = function() {\n var select = true;\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n\n if (selectedIds.length === scope.ids.length) {\n select = false;\n }\n _.forEach(scope.ids, function(option) {\n option.selected = select;\n });\n };\n\n scope.tagSelected = function(option) {\n option.selected = !option.selected;\n };\n\n scope.probesWithTags = function() {\n var probeList = {};\n _.forEach(scope.probes, function(c) {\n _.forEach(_.filter(scope.tags, {selected: true}), function(t) {\n if (_.indexOf(c.tags, t.text) !== -1) {\n probeList[c.name] = true;\n }\n });\n });\n return Object.keys(probeList).join(', ');\n };\n\n scope.probeCount = function(tag) {\n var count = 0;\n _.forEach(scope.probes, function(c) {\n if (_.indexOf(c.tags, tag.text) !== -1) {\n count++;\n }\n });\n return count;\n };\n\n scope.selectIdTitle = function() {\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n if (selectedIds.length === 0) {\n return \"Select Probes\";\n }\n if (selectedIds.length <= 2) {\n return _.map(_.filter(scope.ids, {selected: true}), \"text\").join(\", \");\n }\n return _.map(_.filter(scope.ids, {selected: true}), \"text\").slice(0, 2).join(\", \") + \" and \" + (selectedIds.length - 2) + \" more\";\n };\n\n scope.hide = function() {\n scope.model.route = {\n type: \"byIds\",\n config: {\n ids: []\n }\n };\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n _.forEach(selectedIds, function(c) {\n scope.model.route.config.ids.push(c);\n });\n scope.selectorOpen = false;\n bodyEl.off('click', scope.bodyOnClick);\n };\n\n scope.bodyOnClick = function(e) {\n var dropdown = elem.find('.variable-value-dropdown');\n if (dropdown.has(e.target).length === 0) {\n scope.$apply(scope.hide);\n }\n };\n\n scope.$watch('model.id', function() {\n scope.init();\n });\n },\n };\n});\n"]} \ No newline at end of file diff --git a/src/components/endpoint/endpoint_config.js b/src/components/endpoint/endpoint_config.js index 1379429..2ba3948 100644 --- a/src/components/endpoint/endpoint_config.js +++ b/src/components/endpoint/endpoint_config.js @@ -97,7 +97,7 @@ class EndpointConfigCtrl { this.checks = {}; this.endpoint = {}; this.probes = []; - this.probesByTag = {}; + this.defaultFootprint = []; this.org = null; this.quotas = {}; @@ -271,24 +271,7 @@ class EndpointConfigCtrl { } getProbesForCheck(check) { - if (check.route.type === "byIds") { - return check.route.config.ids || []; - } - - if (check.route.type === "byTags") { - var probeList = {}; - _.forEach(this.probes, p => { - _.forEach(check.route.config.tags, t => { - if (_.indexOf(p.tags, t) !== -1) { - probeList[p.id] = true; - } - }); - }); - return _.keys(probeList); - } - - this.alertSrv("check has unknown routing type.", "unknown route type.", "error", 5000); - return []; + return check.route.config.ids || []; } totalChecks(check) { diff --git a/src/components/endpoint/partials/endpoint_config.html b/src/components/endpoint/partials/endpoint_config.html index af6f2e1..120c58e 100644 --- a/src/components/endpoint/partials/endpoint_config.html +++ b/src/components/endpoint/partials/endpoint_config.html @@ -49,6 +49,13 @@

{{ctrl.endpoint.name}}


+
+
+ + Default + +
+
diff --git a/src/directives/all.js b/src/directives/all.js index bdcb287..46d23c2 100644 --- a/src/directives/all.js +++ b/src/directives/all.js @@ -117,15 +117,22 @@ angular.module('grafana.directives').directive('endpointProbeSelect', function($ scope: { probes: "=", model: "=", + defaultFootprint: "=?" }, templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointCollectorSelect.html', link: function(scope, elem) { var bodyEl = angular.element($window.document.body); - var selectedIds = []; - var selectedTags = []; + var selectedIds; + + scope.defaultFootprint = scope.defaultFootprint || []; scope.init = function() { - selectedIds = scope.model.route.config.ids; + if(scope.model.route && scope.model.route.config){ + selectedIds = scope.model.route.config.ids; + } else { + selectedIds = scope.model; + } + scope.footprint = {value: "static"}; scope.error = false; scope.reset(); @@ -161,6 +168,12 @@ angular.module('grafana.directives').directive('endpointProbeSelect', function($ option.selected = !option.selected; }; + scope.selectDefaultFootprint = function() { + _.forEach(scope.defaultFootprint, function(option) { + option.selected = true; + }); + }; + scope.selectAll = function() { var select = true; selectedIds = _.map(_.filter(scope.ids, {selected: true}), "id"); @@ -199,17 +212,6 @@ angular.module('grafana.directives').directive('endpointProbeSelect', function($ return count; }; - scope.selectTagTitle = function() { - selectedTags = _.map(_.filter(scope.tags, {selected: true}), "text"); - if (selectedTags.length === 0) { - return "Select Tags"; - } - if (selectedTags.length <= 2) { - return selectedTags.join(", "); - } - return selectedTags.slice(0, 2).join(", ") + " and " + (selectedTags.length - 2) + " more"; - }; - scope.selectIdTitle = function() { selectedIds = _.map(_.filter(scope.ids, {selected: true}), "id"); if (selectedIds.length === 0) { From c4a445522352746b514057db71a995447b598ed3 Mon Sep 17 00:00:00 2001 From: Jeremy Branham Date: Fri, 28 Apr 2017 09:55:48 -0500 Subject: [PATCH 3/7] added bulk update of endpoint probes --- dist/components/endpoint/endpoint_config.js | 17 ++++++++++++++++- dist/components/endpoint/endpoint_config.js.map | 2 +- .../endpoint/partials/endpoint_config.html | 6 +++--- src/components/endpoint/endpoint_config.js | 14 +++++++++++++- .../endpoint/partials/endpoint_config.html | 6 +++--- 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/dist/components/endpoint/endpoint_config.js b/dist/components/endpoint/endpoint_config.js index 2fe6c79..034726f 100644 --- a/dist/components/endpoint/endpoint_config.js +++ b/dist/components/endpoint/endpoint_config.js @@ -136,7 +136,7 @@ System.register(['lodash', 'angular'], function (_export, _context) { this.checks = {}; this.endpoint = {}; this.probes = []; - this.defaultFootprint = []; + this.selectedFootprint = []; this.org = null; this.quotas = {}; @@ -655,6 +655,21 @@ System.register(['lodash', 'angular'], function (_export, _context) { break; } } + }, { + key: 'updateAllEndpointChecks', + value: function updateAllEndpointChecks(footprint) { + var _this15 = this; + + _.forEach(this.endpoint.checks, function (check) { + check.route = footprint.route; + }); + return this.saveEndpoint().then(function () { + _this15.alertSrv.set("All checks updated.", "", "success", 2000); + _.forEach(_this15.endpoint.checks, function (check) { + _this15.checks[check.type] = _.cloneDeep(check); + }); + }); + } }]); return EndpointConfigCtrl; diff --git a/dist/components/endpoint/endpoint_config.js.map b/dist/components/endpoint/endpoint_config.js.map index 043f26b..c36551f 100644 --- a/dist/components/endpoint/endpoint_config.js.map +++ b/dist/components/endpoint/endpoint_config.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/components/endpoint/endpoint_config.js"],"names":["defaultCheck","checkType","check","_","cloneDeep","_defaultCheck","type","settings","timeout","port","path","headers","body","method","host","downloadLimit","frequency","validateCert","hostname","name","protocol","server","angular","healthSettings","notifications","num_collectors","steps","route","config","EndpointConfigCtrl","$scope","$injector","$rootScope","$location","$modal","$anchorScroll","$timeout","$window","$q","backendSrv","alertSrv","self","pageReady","showCreating","insufficientQuota","frequencyOpts","freqOpt","forEach","push","value","f","label","newEndpointName","checks","endpoint","probes","defaultFootprint","org","quotas","ignoreChanges","promises","reset","search","getEndpoint","getQuotas","checkQuota","getProbes","getOrgDetails","all","then","err","set","showPing","showDNS","showHTTP","showHTTPS","onbeforeunload","changesPending","$on","event","next","preventDefault","baseLen","absUrl","length","url","console","log","nextUrl","substring","modalScope","$new","ignore","save","savePending","appEvent","src","modalClass","scope","idString","id","parseInt","get","resp","meta","code","message","reject","definedChecks","keys","indexOf","q","target","limit","used","probe","tags","t","probesByTag","statusText","getProbesForCheck","ids","undefined","reduce","total","enabled","totalChecks","probeCount","size","toFixed","wpPlan","checksPerMonth","discovered","discoveryInProgress","discoveryError","showConfig","history","back","delete","saveEndpoint","i","put","numProbes","num_collector","found","c","finally","delay","newChecks","post","slug","endpointReadyDelay","endpointReady","changes","seenCheckTypes","equals","templateUrl"],"mappings":";;;;;;;;;;;;;AAkBA,WAASA,YAAT,CAAsBC,SAAtB,EAAiC;AAC/B,QAAIC,QAAQC,EAAEC,SAAF,CAAYC,aAAZ,CAAZ;AACA,YAAQJ,SAAR;AACA,WAAK,MAAL;AACEC,cAAMI,IAAN,GAAa,MAAb;AACAJ,cAAMK,QAAN,GAAiB;AACfC,mBAAS,CADM;AAEfC,gBAAM,EAFS;AAGfC,gBAAM,GAHS;AAIfC,mBAAS,oDAJM;AAK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K2B,SAAL,CAAevB,IAAf,CAAoB,0CAApB,EAAgEoD,MAAhE,CAAuEA,MAAvE;AACA;AACF,mBAAK,MAAL;AACE,qBAAK7B,SAAL,CAAevB,IAAf,CAAoB,uCAApB,EAA6DoD,MAA7D,CAAoEA,MAApE;AACA;AACF,mBAAK,KAAL;AACE,qBAAK7B,SAAL,CAAevB,IAAf,CAAoB,sCAApB,EAA4DoD,MAA5D,CAAmEA,MAAnE;AACA;AACF,mBAAK,MAAL;AACEA,uBAAO,cAAP,IAAyB,MAAzB;AACA,qBAAK7B,SAAL,CAAevB,IAAf,CAAoB,sCAApB,EAA4DoD,MAA5D,CAAmEA,MAAnE;AACA;AACF,mBAAK,OAAL;AACEA,uBAAO,cAAP,IAAyB,OAAzB;AACA,qBAAK7B,SAAL,CAAevB,IAAf,CAAoB,sCAApB,EAA4DoD,MAA5D,CAAmEA,MAAnE;AACA;AACF;AACE,qBAAK7B,SAAL,CAAevB,IAAf,CAAoB,0CAApB,EAAgEoD,MAAhE,CAAuEA,MAAvE;AACA;AApBJ;AAsBD;;;;;;AAGHjC,yBAAmB+H,WAAnB,GAAiC,yFAAjC;;oCAEQ/H,kB","file":"endpoint_config.js","sourcesContent":["import _ from 'lodash';\nimport angular from 'angular';\n\nvar _defaultCheck = {\n settings: {},\n healthSettings: {\n notifications: {},\n num_collectors: 3,\n steps: 3\n },\n route: {\n type: \"byIds\",\n config: {\n \"ids\": []\n }\n }\n};\n\nfunction defaultCheck(checkType) {\n var check = _.cloneDeep(_defaultCheck);\n switch (checkType) {\n case \"http\":\n check.type = \"http\";\n check.settings = {\n timeout: 5,\n port: 80,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"https\":\n check.type = \"https\";\n check.settings = {\n timeout: 5,\n port: 443,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n validateCert: true,\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"ping\":\n check.type = \"ping\";\n check.settings = {\n timeout: 5,\n hostname: \"\"\n };\n check.frequency = 60;\n break;\n case \"dns\":\n check.type = \"dns\";\n check.settings = {\n timeout: 5,\n name: \"\",\n port: 53,\n protocol: \"udp\",\n server: \"\",\n type: \"A\"\n };\n check.frequency = 120;\n break;\n }\n return check;\n}\n\nclass EndpointConfigCtrl {\n /** @ngInject */\n constructor($scope, $injector, $rootScope, $location, $modal, $anchorScroll, $timeout, $window, $q, backendSrv, alertSrv) {\n var self = this;\n this.backendSrv = backendSrv;\n this.$location = $location;\n this.$timeout = $timeout;\n this.$q = $q;\n this.alertSrv = alertSrv;\n this.$window = $window;\n\n this.pageReady = false;\n this.showCreating = false;\n this.insufficientQuota = false;\n\n this.frequencyOpts = [];\n var freqOpt = [10, 30, 60, 120];\n _.forEach(freqOpt, f => {\n this.frequencyOpts.push({value: f, label: \"Every \"+f+\"s\"});\n });\n\n this.newEndpointName = \"\";\n this.checks = {};\n this.endpoint = {};\n this.probes = [];\n this.defaultFootprint = [];\n this.org = null;\n this.quotas = {};\n\n this.ignoreChanges = false;\n\n var promises = [];\n this.reset();\n if (\"endpoint\" in $location.search()) {\n promises.push(this.getEndpoint($location.search().endpoint));\n promises.push(this.getQuotas());\n } else {\n // make sure we have sufficient quota.\n promises.push(this.checkQuota());\n this.endpoint = {name: \"\"};\n }\n\n promises.push(this.getProbes());\n promises.push(this.getOrgDetails());\n\n $q.all(promises).then(() => {\n this.pageReady = true;\n $timeout(function() {\n $anchorScroll();\n }, 0, false);\n }, function(err) {\n alertSrv.set(\"endpoint config init failed\", err, 'error', 10000);\n });\n\n if ($location.search().check) {\n switch($location.search().check) {\n case \"ping\":\n this.showPing = true;\n break;\n case \"dns\":\n this.showDNS = true;\n break;\n case \"http\":\n this.showHTTP = true;\n break;\n case \"https\":\n this.showHTTPS = true;\n break;\n }\n }\n\n $window.onbeforeunload = function() {\n if (self.ignoreChanges) { return; }\n if (self.changesPending()) {\n return \"There are unsaved changes to this dashboard\";\n }\n };\n\n $scope.$on('$locationChangeStart', function(event, next) {\n if ((!self.ignoreChanges) && (self.changesPending())) {\n event.preventDefault();\n var baseLen = $location.absUrl().length - $location.url().length;\n console.log(\"next: \", next);\n console.log(\"baseLen: \", baseLen);\n var nextUrl = next.substring(baseLen);\n console.log(\"nexUrl: \", nextUrl);\n var modalScope = $scope.$new();\n modalScope.ignore = function() {\n self.ignoreChanges = true;\n $location.url(nextUrl);\n return;\n };\n\n modalScope.save = function() {\n self.savePending(nextUrl);\n };\n\n $rootScope.appEvent('show-modal', {\n src: 'public/app/partials/unsaved-changes.html',\n modalClass: 'confirm-modal',\n scope: modalScope,\n });\n }\n });\n }\n\n getEndpoint(idString) {\n var id = parseInt(idString);\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/'+id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n this.newEndpointName = this.endpoint.name;\n _.forEach(resp.body.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] = defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n });\n }\n\n getQuotas() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/quotas').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get quotas.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n _.forEach(resp.body, q => {\n this.quotas[q.target] = q;\n });\n return this.quotas;\n });\n }\n\n checkQuota() {\n return this.getQuotas().then(quotas => {\n if (quotas.endpoint) {\n const q = quotas.endpoint;\n this.insufficientQuota = q.limit > 0 && q.used >= q.limit;\n }\n if (this.insufficientQuota) {\n return this.$q.reject(\"Endpoint quota reached.\");\n }\n return true;\n });\n }\n\n getProbes() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/probes').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get getProbes.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.probes = resp.body;\n _.forEach(this.probes, probe => {\n _.forEach(probe.tags, t => {\n if (!(t in this.probesByTag)) {\n this.probesByTag[t] = [];\n }\n this.probesByTag[t].push(probe);\n });\n });\n });\n }\n\n getOrgDetails() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/grafana-net/profile/org').then(\n resp => {\n this.org = resp;\n },\n resp => {\n this.alertSrv.set(\"failed to get Org Details\", resp.statusText, 'error', 10000);\n }\n );\n }\n\n probeCount(check) {\n if (!check) {\n return 0;\n }\n return this.getProbesForCheck(check).length;\n }\n\n getProbesForCheck(check) {\n return check.route.config.ids || [];\n }\n\n totalChecks(check) {\n if (check === undefined) {\n return _.reduce(this.checks, (total, value) => {\n if (!value.enabled) {\n return total;\n }\n\n return total + this.totalChecks(value);\n }, 0);\n }\n\n var probeCount = this.probeCount(check);\n if (probeCount < 1 || check.frequency < 1) {\n return 0;\n }\n\n return (30.4375 * 24 * (3600/check.frequency) * probeCount / 1000000);\n }\n\n formatSize(size) {\n if (size > 1024 * 1024) {\n return (size / 1024 / 1024).toFixed(2) + ' MB';\n }\n if (size > 1024) {\n return (size / 1024).toFixed(2) + ' KB';\n }\n return size;\n }\n\n currentlyTrial() {\n if (!this.org) {\n return false;\n }\n\n if (this.org.wpPlan === 'trial') {\n return true;\n }\n\n return false;\n }\n\n requiresUpgrade() {\n if (!this.org) {\n return true;\n }\n\n if (this.org.wpPlan !== '' && this.org.wpPlan !== 'free' && this.org.wpPlan !== 'trial') {\n return false;\n }\n\n if (this.org.checksPerMonth / 1000000 + this.totalChecks() > 1) {\n return true;\n }\n\n return false;\n }\n\n reset() {\n this.discovered = false;\n this.discoveryInProgress = false;\n this.discoveryError = false;\n this.showConfig = false;\n this.showCreating = false;\n this.endpoint = {};\n this.checks = {};\n }\n\n cancel() {\n this.reset();\n this.ignoreChanges = true;\n this.$window.history.back();\n }\n\n remove(endpoint) {\n return this.backendSrv.delete('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/' + endpoint.id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to delete endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.$location.path('plugins/raintank-worldping-app/page/endpoints');\n });\n }\n\n updateEndpoint() {\n this.endpoint.name = this.newEndpointName;\n this.saveEndpoint();\n }\n\n tagsUpdated() {\n this.saveEndpoint();\n }\n\n savePending(nextUrl) {\n _.forEach(this.checks, check => {\n if (!check.id && check.enabled) {\n //add the check\n this.endpoint.checks.push(check);\n return;\n }\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].id === check.id) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n }\n }\n });\n return this.saveEndpoint().then(() => {\n this.ignoreChanges = true;\n if (nextUrl) {\n this.$location.url(nextUrl);\n } else {\n this.$location.path(\"plugins/raintank-worldping-app/page/endpoints\");\n }\n });\n }\n\n saveEndpoint() {\n return this.backendSrv.put('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n });\n }\n\n updateCheck(check) {\n if (check.enabled) {\n var numProbes = this.probeCount(check);\n if (numProbes < check.healthSettings.num_collector) {\n check.healthSettings.num_collectors = numProbes;\n }\n if (check.type === \"http\" || check.type === \"https\") {\n if (['PUT', 'POST', 'DELETE', 'PATCH'].indexOf(check.settings.method) < 0) {\n check.settings.body = \"\";\n }\n }\n }\n var found = false;\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].type === check.type) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n found = true;\n break;\n }\n }\n if (!found) {\n this.endpoint.checks.push(check);\n }\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(check.type + \" check updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, c => {\n if (c.type === check.type) {\n this.checks[check.type] = _.cloneDeep(c);\n }\n });\n });\n }\n\n skipDiscovery() {\n this.discoveryInProgress = false;\n this.showConfig = true;\n this.discoveryError = false;\n }\n\n discover(endpoint) {\n if (!endpoint.name){\n return;\n }\n this.discoveryInProgress = true;\n this.discoveryError = false;\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/discover', endpoint).then(\n resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n this.discoveryError = \"Failed to discover endpoint.\";\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] =defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n this.showConfig = true;\n this.discovered = true;\n },\n () => {\n this.discoveryError = \"Failed to discover endpoint.\";\n }\n ).finally(() => {\n this.discoveryInProgress = false;\n });\n }\n\n addEndpoint() {\n var self = this;\n var delay = 120;\n var newChecks = [];\n _.forEach(this.checks, check => {\n if (check.enabled) {\n if (check.frequency < delay) {\n delay = check.frequency;\n }\n var numProbes = this.probeCount(check);\n if (numProbes < 3) {\n check.healthSettings.num_collectors = numProbes;\n }\n newChecks.push(check);\n }\n });\n this.endpoint.checks = newChecks;\n return this.backendSrv.post('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to add endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint.id = resp.body.id;\n this.endpoint.slug = resp.body.slug;\n this.ignoreChanges = true;\n this.alertSrv.set(\"endpoint added\", '', 'success', 3000);\n this.showCreating = true;\n this.endpointReadyDelay = delay;\n this.endpointReady = false;\n this.$timeout(function() {\n self.endpointReady = true;\n }, delay * 1000);\n });\n }\n\n changesPending() {\n var changes = false;\n var seenCheckTypes = {};\n\n //check if any existing checks have changed\n _.forEach(this.endpoint.checks, check => {\n seenCheckTypes[check.type] = true;\n if (!angular.equals(check, this.checks[check.type])) {\n changes = true;\n }\n });\n\n //check if any new checks added.\n _.forEach(this.checks, check => {\n if (!(check.type in seenCheckTypes) && (\"frequency\" in check) && check.enabled) {\n changes = true;\n }\n });\n\n return changes;\n }\n\n gotoDashboard(endpoint, type) {\n if (!type) {\n type = 'summary';\n }\n var search = {\n \"var-collector\": \"All\",\n \"var-endpoint\": this.endpoint.slug\n };\n switch(type) {\n case \"summary\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n case \"ping\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-ping\").search(search);\n break;\n case \"dns\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-dns\").search(search);\n break;\n case \"http\":\n search['var-protocol'] = \"http\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n case \"https\":\n search['var-protocol'] = \"https\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n default:\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n }\n }\n}\n\nEndpointConfigCtrl.templateUrl = 'public/plugins/raintank-worldping-app/components/endpoint/partials/endpoint_config.html';\n\nexport {EndpointConfigCtrl};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/components/endpoint/endpoint_config.js"],"names":["defaultCheck","checkType","check","_","cloneDeep","_defaultCheck","type","settings","timeout","port","path","headers","body","method","host","downloadLimit","frequency","validateCert","hostname","name","protocol","server","angular","healthSettings","notifications","num_collectors","steps","route","config","EndpointConfigCtrl","$scope","$injector","$rootScope","$location","$modal","$anchorScroll","$timeout","$window","$q","backendSrv","alertSrv","self","pageReady","showCreating","insufficientQuota","frequencyOpts","freqOpt","forEach","push","value","f","label","newEndpointName","checks","endpoint","probes","selectedFootprint","org","quotas","ignoreChanges","promises","reset","search","getEndpoint","getQuotas","checkQuota","getProbes","getOrgDetails","all","then","err","set","showPing","showDNS","showHTTP","showHTTPS","onbeforeunload","changesPending","$on","event","next","preventDefault","baseLen","absUrl","length","url","console","log","nextUrl","substring","modalScope","$new","ignore","save","savePending","appEvent","src","modalClass","scope","idString","id","parseInt","get","resp","meta","code","message","reject","definedChecks","keys","indexOf","q","target","limit","used","probe","tags","t","probesByTag","statusText","getProbesForCheck","ids","undefined","reduce","total","enabled","totalChecks","probeCount","size","toFixed","wpPlan","checksPerMonth","discovered","discoveryInProgress","discoveryError","showConfig","history","back","delete","saveEndpoint","i","put","numProbes","num_collector","found","c","finally","delay","newChecks","post","slug","endpointReadyDelay","endpointReady","changes","seenCheckTypes","equals","footprint","templateUrl"],"mappings":";;;;;;;;;;;;;AAkBA,WAASA,YAAT,CAAsBC,SAAtB,EAAi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AAU,QAAKO,QAAL,CAAcD,MAAxB,EAAgC,iBAAS;AACvC,wBAAKA,MAAL,CAAYnD,MAAMI,IAAlB,IAA0BH,EAAEC,SAAF,CAAYF,KAAZ,CAA1B;AACD,eAFD;AAGD,aALM,CAAP;AAMD;;;;;;AAGH2B,yBAAmBgI,WAAnB,GAAiC,yFAAjC;;oCAEQhI,kB","file":"endpoint_config.js","sourcesContent":["import _ from 'lodash';\nimport angular from 'angular';\n\nvar _defaultCheck = {\n settings: {},\n healthSettings: {\n notifications: {},\n num_collectors: 3,\n steps: 3\n },\n route: {\n type: \"byIds\",\n config: {\n \"ids\": []\n }\n }\n};\n\nfunction defaultCheck(checkType) {\n var check = _.cloneDeep(_defaultCheck);\n switch (checkType) {\n case \"http\":\n check.type = \"http\";\n check.settings = {\n timeout: 5,\n port: 80,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"https\":\n check.type = \"https\";\n check.settings = {\n timeout: 5,\n port: 443,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n validateCert: true,\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"ping\":\n check.type = \"ping\";\n check.settings = {\n timeout: 5,\n hostname: \"\"\n };\n check.frequency = 60;\n break;\n case \"dns\":\n check.type = \"dns\";\n check.settings = {\n timeout: 5,\n name: \"\",\n port: 53,\n protocol: \"udp\",\n server: \"\",\n type: \"A\"\n };\n check.frequency = 120;\n break;\n }\n return check;\n}\n\nclass EndpointConfigCtrl {\n /** @ngInject */\n constructor($scope, $injector, $rootScope, $location, $modal, $anchorScroll, $timeout, $window, $q, backendSrv, alertSrv) {\n var self = this;\n this.backendSrv = backendSrv;\n this.$location = $location;\n this.$timeout = $timeout;\n this.$q = $q;\n this.alertSrv = alertSrv;\n this.$window = $window;\n\n this.pageReady = false;\n this.showCreating = false;\n this.insufficientQuota = false;\n\n this.frequencyOpts = [];\n var freqOpt = [10, 30, 60, 120];\n _.forEach(freqOpt, f => {\n this.frequencyOpts.push({value: f, label: \"Every \"+f+\"s\"});\n });\n\n this.newEndpointName = \"\";\n this.checks = {};\n this.endpoint = {};\n this.probes = [];\n this.selectedFootprint = [];\n this.org = null;\n this.quotas = {};\n\n this.ignoreChanges = false;\n\n var promises = [];\n this.reset();\n if (\"endpoint\" in $location.search()) {\n promises.push(this.getEndpoint($location.search().endpoint));\n promises.push(this.getQuotas());\n } else {\n // make sure we have sufficient quota.\n promises.push(this.checkQuota());\n this.endpoint = {name: \"\"};\n }\n\n promises.push(this.getProbes());\n promises.push(this.getOrgDetails());\n\n $q.all(promises).then(() => {\n this.pageReady = true;\n $timeout(function() {\n $anchorScroll();\n }, 0, false);\n }, function(err) {\n alertSrv.set(\"endpoint config init failed\", err, 'error', 10000);\n });\n\n if ($location.search().check) {\n switch($location.search().check) {\n case \"ping\":\n this.showPing = true;\n break;\n case \"dns\":\n this.showDNS = true;\n break;\n case \"http\":\n this.showHTTP = true;\n break;\n case \"https\":\n this.showHTTPS = true;\n break;\n }\n }\n\n $window.onbeforeunload = function() {\n if (self.ignoreChanges) { return; }\n if (self.changesPending()) {\n return \"There are unsaved changes to this dashboard\";\n }\n };\n\n $scope.$on('$locationChangeStart', function(event, next) {\n if ((!self.ignoreChanges) && (self.changesPending())) {\n event.preventDefault();\n var baseLen = $location.absUrl().length - $location.url().length;\n console.log(\"next: \", next);\n console.log(\"baseLen: \", baseLen);\n var nextUrl = next.substring(baseLen);\n console.log(\"nexUrl: \", nextUrl);\n var modalScope = $scope.$new();\n modalScope.ignore = function() {\n self.ignoreChanges = true;\n $location.url(nextUrl);\n return;\n };\n\n modalScope.save = function() {\n self.savePending(nextUrl);\n };\n\n $rootScope.appEvent('show-modal', {\n src: 'public/app/partials/unsaved-changes.html',\n modalClass: 'confirm-modal',\n scope: modalScope,\n });\n }\n });\n }\n\n getEndpoint(idString) {\n var id = parseInt(idString);\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/'+id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n this.newEndpointName = this.endpoint.name;\n _.forEach(resp.body.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] = defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n });\n }\n\n getQuotas() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/quotas').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get quotas.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n _.forEach(resp.body, q => {\n this.quotas[q.target] = q;\n });\n return this.quotas;\n });\n }\n\n checkQuota() {\n return this.getQuotas().then(quotas => {\n if (quotas.endpoint) {\n const q = quotas.endpoint;\n this.insufficientQuota = q.limit > 0 && q.used >= q.limit;\n }\n if (this.insufficientQuota) {\n return this.$q.reject(\"Endpoint quota reached.\");\n }\n return true;\n });\n }\n\n getProbes() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/probes').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get getProbes.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.probes = resp.body;\n _.forEach(this.probes, probe => {\n _.forEach(probe.tags, t => {\n if (!(t in this.probesByTag)) {\n this.probesByTag[t] = [];\n }\n this.probesByTag[t].push(probe);\n });\n });\n });\n }\n\n getOrgDetails() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/grafana-net/profile/org').then(\n resp => {\n this.org = resp;\n },\n resp => {\n this.alertSrv.set(\"failed to get Org Details\", resp.statusText, 'error', 10000);\n }\n );\n }\n\n probeCount(check) {\n if (!check) {\n return 0;\n }\n return this.getProbesForCheck(check).length;\n }\n\n getProbesForCheck(check) {\n return check.route.config.ids || [];\n }\n\n totalChecks(check) {\n if (check === undefined) {\n return _.reduce(this.checks, (total, value) => {\n if (!value.enabled) {\n return total;\n }\n\n return total + this.totalChecks(value);\n }, 0);\n }\n\n var probeCount = this.probeCount(check);\n if (probeCount < 1 || check.frequency < 1) {\n return 0;\n }\n\n return (30.4375 * 24 * (3600/check.frequency) * probeCount / 1000000);\n }\n\n formatSize(size) {\n if (size > 1024 * 1024) {\n return (size / 1024 / 1024).toFixed(2) + ' MB';\n }\n if (size > 1024) {\n return (size / 1024).toFixed(2) + ' KB';\n }\n return size;\n }\n\n currentlyTrial() {\n if (!this.org) {\n return false;\n }\n\n if (this.org.wpPlan === 'trial') {\n return true;\n }\n\n return false;\n }\n\n requiresUpgrade() {\n if (!this.org) {\n return true;\n }\n\n if (this.org.wpPlan !== '' && this.org.wpPlan !== 'free' && this.org.wpPlan !== 'trial') {\n return false;\n }\n\n if (this.org.checksPerMonth / 1000000 + this.totalChecks() > 1) {\n return true;\n }\n\n return false;\n }\n\n reset() {\n this.discovered = false;\n this.discoveryInProgress = false;\n this.discoveryError = false;\n this.showConfig = false;\n this.showCreating = false;\n this.endpoint = {};\n this.checks = {};\n }\n\n cancel() {\n this.reset();\n this.ignoreChanges = true;\n this.$window.history.back();\n }\n\n remove(endpoint) {\n return this.backendSrv.delete('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/' + endpoint.id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to delete endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.$location.path('plugins/raintank-worldping-app/page/endpoints');\n });\n }\n\n updateEndpoint() {\n this.endpoint.name = this.newEndpointName;\n this.saveEndpoint();\n }\n\n tagsUpdated() {\n this.saveEndpoint();\n }\n\n savePending(nextUrl) {\n _.forEach(this.checks, check => {\n if (!check.id && check.enabled) {\n //add the check\n this.endpoint.checks.push(check);\n return;\n }\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].id === check.id) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n }\n }\n });\n return this.saveEndpoint().then(() => {\n this.ignoreChanges = true;\n if (nextUrl) {\n this.$location.url(nextUrl);\n } else {\n this.$location.path(\"plugins/raintank-worldping-app/page/endpoints\");\n }\n });\n }\n\n saveEndpoint() {\n return this.backendSrv.put('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n });\n }\n\n updateCheck(check) {\n if (check.enabled) {\n var numProbes = this.probeCount(check);\n if (numProbes < check.healthSettings.num_collector) {\n check.healthSettings.num_collectors = numProbes;\n }\n if (check.type === \"http\" || check.type === \"https\") {\n if (['PUT', 'POST', 'DELETE', 'PATCH'].indexOf(check.settings.method) < 0) {\n check.settings.body = \"\";\n }\n }\n }\n var found = false;\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].type === check.type) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n found = true;\n break;\n }\n }\n if (!found) {\n this.endpoint.checks.push(check);\n }\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(check.type + \" check updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, c => {\n if (c.type === check.type) {\n this.checks[check.type] = _.cloneDeep(c);\n }\n });\n });\n }\n\n skipDiscovery() {\n this.discoveryInProgress = false;\n this.showConfig = true;\n this.discoveryError = false;\n }\n\n discover(endpoint) {\n if (!endpoint.name){\n return;\n }\n this.discoveryInProgress = true;\n this.discoveryError = false;\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/discover', endpoint).then(\n resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n this.discoveryError = \"Failed to discover endpoint.\";\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] =defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n this.showConfig = true;\n this.discovered = true;\n },\n () => {\n this.discoveryError = \"Failed to discover endpoint.\";\n }\n ).finally(() => {\n this.discoveryInProgress = false;\n });\n }\n\n addEndpoint() {\n var self = this;\n var delay = 120;\n var newChecks = [];\n _.forEach(this.checks, check => {\n if (check.enabled) {\n if (check.frequency < delay) {\n delay = check.frequency;\n }\n var numProbes = this.probeCount(check);\n if (numProbes < 3) {\n check.healthSettings.num_collectors = numProbes;\n }\n newChecks.push(check);\n }\n });\n this.endpoint.checks = newChecks;\n return this.backendSrv.post('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to add endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint.id = resp.body.id;\n this.endpoint.slug = resp.body.slug;\n this.ignoreChanges = true;\n this.alertSrv.set(\"endpoint added\", '', 'success', 3000);\n this.showCreating = true;\n this.endpointReadyDelay = delay;\n this.endpointReady = false;\n this.$timeout(function() {\n self.endpointReady = true;\n }, delay * 1000);\n });\n }\n\n changesPending() {\n var changes = false;\n var seenCheckTypes = {};\n\n //check if any existing checks have changed\n _.forEach(this.endpoint.checks, check => {\n seenCheckTypes[check.type] = true;\n if (!angular.equals(check, this.checks[check.type])) {\n changes = true;\n }\n });\n\n //check if any new checks added.\n _.forEach(this.checks, check => {\n if (!(check.type in seenCheckTypes) && (\"frequency\" in check) && check.enabled) {\n changes = true;\n }\n });\n\n return changes;\n }\n\n gotoDashboard(endpoint, type) {\n if (!type) {\n type = 'summary';\n }\n var search = {\n \"var-collector\": \"All\",\n \"var-endpoint\": this.endpoint.slug\n };\n switch(type) {\n case \"summary\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n case \"ping\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-ping\").search(search);\n break;\n case \"dns\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-dns\").search(search);\n break;\n case \"http\":\n search['var-protocol'] = \"http\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n case \"https\":\n search['var-protocol'] = \"https\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n default:\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n }\n }\n\n updateAllEndpointChecks(footprint) {\n _.forEach(this.endpoint.checks, check => {\n check.route = footprint.route;\n });\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(\"All checks updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n });\n }\n}\n\nEndpointConfigCtrl.templateUrl = 'public/plugins/raintank-worldping-app/components/endpoint/partials/endpoint_config.html';\n\nexport {EndpointConfigCtrl};\n"]} \ No newline at end of file diff --git a/dist/components/endpoint/partials/endpoint_config.html b/dist/components/endpoint/partials/endpoint_config.html index 120c58e..33ddfab 100644 --- a/dist/components/endpoint/partials/endpoint_config.html +++ b/dist/components/endpoint/partials/endpoint_config.html @@ -49,11 +49,11 @@

{{ctrl.endpoint.name}}
+
- - Default - + +

+
- - Default - + +
From c6d48ff6618495e5771e2f978a67282f56114fa8 Mon Sep 17 00:00:00 2001 From: Jeremy Branham Date: Sat, 29 Apr 2017 18:08:51 -0500 Subject: [PATCH 4/7] refs issue #22 Change-Id: I9fcc3f51514d32624373ff2ebbc6d9cadd4ec8bd --- .../endpoint/partials/pingForm.html | 29 +++++++++++-------- .../endpoint/partials/pingForm.html | 29 +++++++++++-------- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/dist/components/endpoint/partials/pingForm.html b/dist/components/endpoint/partials/pingForm.html index 64f95e0..cda1f87 100644 --- a/dist/components/endpoint/partials/pingForm.html +++ b/dist/components/endpoint/partials/pingForm.html @@ -1,18 +1,23 @@ -
+

Ping

- - - Every {{ctrl.checks['ping'].frequency}}s from {{ctrl.probeCount(ctrl.checks['ping'])}} {{ctrl.probeCount(ctrl.checks['ping']) == 1 ? "Probe" : "Probes"}} | - - Not enabled | - Not Discovered | - - - {{ctrl.totalChecks(ctrl.checks['ping'])| number:1}}M/mo | + + + Every {{ctrl.checks['ping'].frequency}}s from {{ctrl.probeCount(ctrl.checks['ping'])}} {{ctrl.probeCount(ctrl.checks['ping']) == 1 ? "Probe" : "Probes"}} | + + + {{ctrl.totalChecks(ctrl.checks['ping'])| number:1}}M/mo | + + + + + Not enabled | + Not Discovered | + Configure @@ -27,7 +32,7 @@

Ping

Monitoring

- +

At the selected frequency, we'll send a burst of 10 ICMP echo ("ping") packets to the hostname.

@@ -103,7 +108,7 @@

Alerting

diff --git a/src/components/endpoint/partials/pingForm.html b/src/components/endpoint/partials/pingForm.html index 64f95e0..cda1f87 100644 --- a/src/components/endpoint/partials/pingForm.html +++ b/src/components/endpoint/partials/pingForm.html @@ -1,18 +1,23 @@ -
+

Ping

- - - Every {{ctrl.checks['ping'].frequency}}s from {{ctrl.probeCount(ctrl.checks['ping'])}} {{ctrl.probeCount(ctrl.checks['ping']) == 1 ? "Probe" : "Probes"}} | - - Not enabled | - Not Discovered | - - - {{ctrl.totalChecks(ctrl.checks['ping'])| number:1}}M/mo | + + + Every {{ctrl.checks['ping'].frequency}}s from {{ctrl.probeCount(ctrl.checks['ping'])}} {{ctrl.probeCount(ctrl.checks['ping']) == 1 ? "Probe" : "Probes"}} | + + + {{ctrl.totalChecks(ctrl.checks['ping'])| number:1}}M/mo | + + + + + Not enabled | + Not Discovered | + Configure @@ -27,7 +32,7 @@

Ping

Monitoring

- +

At the selected frequency, we'll send a burst of 10 ICMP echo ("ping") packets to the hostname.

@@ -103,7 +108,7 @@

Alerting

From ae43b31a13429131974366491e0efa395f0dc942 Mon Sep 17 00:00:00 2001 From: Jeremy Branham Date: Sat, 29 Apr 2017 19:52:31 -0500 Subject: [PATCH 5/7] refs issue #187 Change-Id: Ia9ebc02c3933dc7b1c63637d8fbdc4ef2dc85894 --- dist/components/endpoint/endpoint_config.js | 23 +++++++++++++++++-- .../endpoint/endpoint_config.js.map | 2 +- .../endpoint/partials/endpoint_config.html | 3 ++- src/components/endpoint/endpoint_config.js | 18 ++++++++++++++- .../endpoint/partials/endpoint_config.html | 3 ++- 5 files changed, 43 insertions(+), 6 deletions(-) diff --git a/dist/components/endpoint/endpoint_config.js b/dist/components/endpoint/endpoint_config.js index 034726f..811b5f9 100644 --- a/dist/components/endpoint/endpoint_config.js +++ b/dist/components/endpoint/endpoint_config.js @@ -656,8 +656,8 @@ System.register(['lodash', 'angular'], function (_export, _context) { } } }, { - key: 'updateAllEndpointChecks', - value: function updateAllEndpointChecks(footprint) { + key: 'replaceAllEndpointChecksFootprint', + value: function replaceAllEndpointChecksFootprint(footprint) { var _this15 = this; _.forEach(this.endpoint.checks, function (check) { @@ -670,6 +670,25 @@ System.register(['lodash', 'angular'], function (_export, _context) { }); }); } + }, { + key: 'appendAllEndpointChecksFootprint', + value: function appendAllEndpointChecksFootprint(footprint) { + var _this16 = this; + + _.forEach(this.endpoint.checks, function (check) { + _.forEach(footprint.route.config.ids, function (id) { + if (check.route.config.ids.indexOf(id) == -1) { + check.route.config.ids.push(id); + } + }); + }); + return this.saveEndpoint().then(function () { + _this16.alertSrv.set("All checks updated.", "", "success", 2000); + _.forEach(_this16.endpoint.checks, function (check) { + _this16.checks[check.type] = _.cloneDeep(check); + }); + }); + } }]); return EndpointConfigCtrl; diff --git a/dist/components/endpoint/endpoint_config.js.map b/dist/components/endpoint/endpoint_config.js.map index c36551f..3b32581 100644 --- a/dist/components/endpoint/endpoint_config.js.map +++ b/dist/components/endpoint/endpoint_config.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/components/endpoint/endpoint_config.js"],"names":["defaultCheck","checkType","check","_","cloneDeep","_defaultCheck","type","settings","timeout","port","path","headers","body","method","host","downloadLimit","frequency","validateCert","hostname","name","protocol","server","angular","healthSettings","notifications","num_collectors","steps","route","config","EndpointConfigCtrl","$scope","$injector","$rootScope","$location","$modal","$anchorScroll","$timeout","$window","$q","backendSrv","alertSrv","self","pageReady","showCreating","insufficientQuota","frequencyOpts","freqOpt","forEach","push","value","f","label","newEndpointName","checks","endpoint","probes","selectedFootprint","org","quotas","ignoreChanges","promises","reset","search","getEndpoint","getQuotas","checkQuota","getProbes","getOrgDetails","all","then","err","set","showPing","showDNS","showHTTP","showHTTPS","onbeforeunload","changesPending","$on","event","next","preventDefault","baseLen","absUrl","length","url","console","log","nextUrl","substring","modalScope","$new","ignore","save","savePending","appEvent","src","modalClass","scope","idString","id","parseInt","get","resp","meta","code","message","reject","definedChecks","keys","indexOf","q","target","limit","used","probe","tags","t","probesByTag","statusText","getProbesForCheck","ids","undefined","reduce","total","enabled","totalChecks","probeCount","size","toFixed","wpPlan","checksPerMonth","discovered","discoveryInProgress","discoveryError","showConfig","history","back","delete","saveEndpoint","i","put","numProbes","num_collector","found","c","finally","delay","newChecks","post","slug","endpointReadyDelay","endpointReady","changes","seenCheckTypes","equals","footprint","templateUrl"],"mappings":";;;;;;;;;;;;;AAkBA,WAASA,YAAT,CAAsBC,SAAtB,EAAiC;AAC/B,QAAIC,QAAQC,EAAEC,SAAF,CAAYC,aAAZ,CAAZ;AACA,YAAQJ,SAAR;AACA,WAAK,MAAL;AACEC,cAAMI,IAAN,GAAa,MAAb;AACAJ,cAAMK,QAAN,GAAiB;AACfC,mBAAS,CADM;AAEfC,gBAAM,EAFS;AAGfC,gBAAM,GAHS;AAIfC,mBAAS,oDAJM;AAKfC,gBAAM,EALS;AAMfC,kBAAQ,KANO;AAOfC,gBAAM,EAPS;AAQfC,yBAAe;AARA,SAAjB;AAUAb,cAAMc,SAAN,GAAkB,GAAlB;AACA;AACF,WAAK,OAAL;AACEd,cAAMI,IAAN,GAAa,OAAb;AACAJ,cAAMK,QAAN,GAAiB;AACfC,mBAAS,CADM;AAEfC,gBAAM,GAFS;AAGfC,gBAAM,GAHS;AAIfC,mBAAS,oDAJM;AAKfC,gBAAM,EALS;AAMfC,kBAAQ,KANO;AAOfC,gBAAM,EAPS;AAQfG,wBAAc,IARC;AASfF,yBAAe;AATA,SAAjB;AAWAb,cAAMc,SAAN,GAAkB,GAAlB;AACA;AACF,WAAK,MAAL;AACEd,cAAMI,IAAN,GAAa,MAAb;AACAJ,cAAMK,QAAN,GAAiB;AACfC,mBAAS,CADM;AAEfU,oBAAU;AAFK,SAAjB;AAIAhB,cAAMc,SAAN,GAAkB,EAAlB;AACA;AACF,WAAK,KAAL;AACEd,cAAMI,IAAN,GAAa,KAAb;AACAJ,cAAMK,QAAN,GAAiB;AACfC,mBAAS,CADM;AAEfW,gBAAM,EAFS;AAGfV,gBAAM,EAHS;AAIfW,oBAAU,KAJK;AAKfC,kBAAQ,EALO;AAMff,gBAAM;AANS,SAAjB;AAQAJ,cA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jI,KAAxB;AACD,aAFD;AAGA,mBAAO,KAAKgH,YAAL,GAAoBtE,IAApB,CAAyB,YAAM;AACpC,sBAAK7B,QAAL,CAAc+B,GAAd,CAAkB,qBAAlB,EAAyC,EAAzC,EAA6C,SAA7C,EAAwD,IAAxD;AACApE,gBAAE4C,OAAF,CAAU,QAAKO,QAAL,CAAcD,MAAxB,EAAgC,iBAAS;AACvC,wBAAKA,MAAL,CAAYnD,MAAMI,IAAlB,IAA0BH,EAAEC,SAAF,CAAYF,KAAZ,CAA1B;AACD,eAFD;AAGD,aALM,CAAP;AAMD;;;;;;AAGH2B,yBAAmBgI,WAAnB,GAAiC,yFAAjC;;oCAEQhI,kB","file":"endpoint_config.js","sourcesContent":["import _ from 'lodash';\nimport angular from 'angular';\n\nvar _defaultCheck = {\n settings: {},\n healthSettings: {\n notifications: {},\n num_collectors: 3,\n steps: 3\n },\n route: {\n type: \"byIds\",\n config: {\n \"ids\": []\n }\n }\n};\n\nfunction defaultCheck(checkType) {\n var check = _.cloneDeep(_defaultCheck);\n switch (checkType) {\n case \"http\":\n check.type = \"http\";\n check.settings = {\n timeout: 5,\n port: 80,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"https\":\n check.type = \"https\";\n check.settings = {\n timeout: 5,\n port: 443,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n validateCert: true,\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"ping\":\n check.type = \"ping\";\n check.settings = {\n timeout: 5,\n hostname: \"\"\n };\n check.frequency = 60;\n break;\n case \"dns\":\n check.type = \"dns\";\n check.settings = {\n timeout: 5,\n name: \"\",\n port: 53,\n protocol: \"udp\",\n server: \"\",\n type: \"A\"\n };\n check.frequency = 120;\n break;\n }\n return check;\n}\n\nclass EndpointConfigCtrl {\n /** @ngInject */\n constructor($scope, $injector, $rootScope, $location, $modal, $anchorScroll, $timeout, $window, $q, backendSrv, alertSrv) {\n var self = this;\n this.backendSrv = backendSrv;\n this.$location = $location;\n this.$timeout = $timeout;\n this.$q = $q;\n this.alertSrv = alertSrv;\n this.$window = $window;\n\n this.pageReady = false;\n this.showCreating = false;\n this.insufficientQuota = false;\n\n this.frequencyOpts = [];\n var freqOpt = [10, 30, 60, 120];\n _.forEach(freqOpt, f => {\n this.frequencyOpts.push({value: f, label: \"Every \"+f+\"s\"});\n });\n\n this.newEndpointName = \"\";\n this.checks = {};\n this.endpoint = {};\n this.probes = [];\n this.selectedFootprint = [];\n this.org = null;\n this.quotas = {};\n\n this.ignoreChanges = false;\n\n var promises = [];\n this.reset();\n if (\"endpoint\" in $location.search()) {\n promises.push(this.getEndpoint($location.search().endpoint));\n promises.push(this.getQuotas());\n } else {\n // make sure we have sufficient quota.\n promises.push(this.checkQuota());\n this.endpoint = {name: \"\"};\n }\n\n promises.push(this.getProbes());\n promises.push(this.getOrgDetails());\n\n $q.all(promises).then(() => {\n this.pageReady = true;\n $timeout(function() {\n $anchorScroll();\n }, 0, false);\n }, function(err) {\n alertSrv.set(\"endpoint config init failed\", err, 'error', 10000);\n });\n\n if ($location.search().check) {\n switch($location.search().check) {\n case \"ping\":\n this.showPing = true;\n break;\n case \"dns\":\n this.showDNS = true;\n break;\n case \"http\":\n this.showHTTP = true;\n break;\n case \"https\":\n this.showHTTPS = true;\n break;\n }\n }\n\n $window.onbeforeunload = function() {\n if (self.ignoreChanges) { return; }\n if (self.changesPending()) {\n return \"There are unsaved changes to this dashboard\";\n }\n };\n\n $scope.$on('$locationChangeStart', function(event, next) {\n if ((!self.ignoreChanges) && (self.changesPending())) {\n event.preventDefault();\n var baseLen = $location.absUrl().length - $location.url().length;\n console.log(\"next: \", next);\n console.log(\"baseLen: \", baseLen);\n var nextUrl = next.substring(baseLen);\n console.log(\"nexUrl: \", nextUrl);\n var modalScope = $scope.$new();\n modalScope.ignore = function() {\n self.ignoreChanges = true;\n $location.url(nextUrl);\n return;\n };\n\n modalScope.save = function() {\n self.savePending(nextUrl);\n };\n\n $rootScope.appEvent('show-modal', {\n src: 'public/app/partials/unsaved-changes.html',\n modalClass: 'confirm-modal',\n scope: modalScope,\n });\n }\n });\n }\n\n getEndpoint(idString) {\n var id = parseInt(idString);\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/'+id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n this.newEndpointName = this.endpoint.name;\n _.forEach(resp.body.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] = defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n });\n }\n\n getQuotas() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/quotas').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get quotas.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n _.forEach(resp.body, q => {\n this.quotas[q.target] = q;\n });\n return this.quotas;\n });\n }\n\n checkQuota() {\n return this.getQuotas().then(quotas => {\n if (quotas.endpoint) {\n const q = quotas.endpoint;\n this.insufficientQuota = q.limit > 0 && q.used >= q.limit;\n }\n if (this.insufficientQuota) {\n return this.$q.reject(\"Endpoint quota reached.\");\n }\n return true;\n });\n }\n\n getProbes() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/probes').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get getProbes.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.probes = resp.body;\n _.forEach(this.probes, probe => {\n _.forEach(probe.tags, t => {\n if (!(t in this.probesByTag)) {\n this.probesByTag[t] = [];\n }\n this.probesByTag[t].push(probe);\n });\n });\n });\n }\n\n getOrgDetails() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/grafana-net/profile/org').then(\n resp => {\n this.org = resp;\n },\n resp => {\n this.alertSrv.set(\"failed to get Org Details\", resp.statusText, 'error', 10000);\n }\n );\n }\n\n probeCount(check) {\n if (!check) {\n return 0;\n }\n return this.getProbesForCheck(check).length;\n }\n\n getProbesForCheck(check) {\n return check.route.config.ids || [];\n }\n\n totalChecks(check) {\n if (check === undefined) {\n return _.reduce(this.checks, (total, value) => {\n if (!value.enabled) {\n return total;\n }\n\n return total + this.totalChecks(value);\n }, 0);\n }\n\n var probeCount = this.probeCount(check);\n if (probeCount < 1 || check.frequency < 1) {\n return 0;\n }\n\n return (30.4375 * 24 * (3600/check.frequency) * probeCount / 1000000);\n }\n\n formatSize(size) {\n if (size > 1024 * 1024) {\n return (size / 1024 / 1024).toFixed(2) + ' MB';\n }\n if (size > 1024) {\n return (size / 1024).toFixed(2) + ' KB';\n }\n return size;\n }\n\n currentlyTrial() {\n if (!this.org) {\n return false;\n }\n\n if (this.org.wpPlan === 'trial') {\n return true;\n }\n\n return false;\n }\n\n requiresUpgrade() {\n if (!this.org) {\n return true;\n }\n\n if (this.org.wpPlan !== '' && this.org.wpPlan !== 'free' && this.org.wpPlan !== 'trial') {\n return false;\n }\n\n if (this.org.checksPerMonth / 1000000 + this.totalChecks() > 1) {\n return true;\n }\n\n return false;\n }\n\n reset() {\n this.discovered = false;\n this.discoveryInProgress = false;\n this.discoveryError = false;\n this.showConfig = false;\n this.showCreating = false;\n this.endpoint = {};\n this.checks = {};\n }\n\n cancel() {\n this.reset();\n this.ignoreChanges = true;\n this.$window.history.back();\n }\n\n remove(endpoint) {\n return this.backendSrv.delete('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/' + endpoint.id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to delete endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.$location.path('plugins/raintank-worldping-app/page/endpoints');\n });\n }\n\n updateEndpoint() {\n this.endpoint.name = this.newEndpointName;\n this.saveEndpoint();\n }\n\n tagsUpdated() {\n this.saveEndpoint();\n }\n\n savePending(nextUrl) {\n _.forEach(this.checks, check => {\n if (!check.id && check.enabled) {\n //add the check\n this.endpoint.checks.push(check);\n return;\n }\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].id === check.id) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n }\n }\n });\n return this.saveEndpoint().then(() => {\n this.ignoreChanges = true;\n if (nextUrl) {\n this.$location.url(nextUrl);\n } else {\n this.$location.path(\"plugins/raintank-worldping-app/page/endpoints\");\n }\n });\n }\n\n saveEndpoint() {\n return this.backendSrv.put('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n });\n }\n\n updateCheck(check) {\n if (check.enabled) {\n var numProbes = this.probeCount(check);\n if (numProbes < check.healthSettings.num_collector) {\n check.healthSettings.num_collectors = numProbes;\n }\n if (check.type === \"http\" || check.type === \"https\") {\n if (['PUT', 'POST', 'DELETE', 'PATCH'].indexOf(check.settings.method) < 0) {\n check.settings.body = \"\";\n }\n }\n }\n var found = false;\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].type === check.type) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n found = true;\n break;\n }\n }\n if (!found) {\n this.endpoint.checks.push(check);\n }\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(check.type + \" check updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, c => {\n if (c.type === check.type) {\n this.checks[check.type] = _.cloneDeep(c);\n }\n });\n });\n }\n\n skipDiscovery() {\n this.discoveryInProgress = false;\n this.showConfig = true;\n this.discoveryError = false;\n }\n\n discover(endpoint) {\n if (!endpoint.name){\n return;\n }\n this.discoveryInProgress = true;\n this.discoveryError = false;\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/discover', endpoint).then(\n resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n this.discoveryError = \"Failed to discover endpoint.\";\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] =defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n this.showConfig = true;\n this.discovered = true;\n },\n () => {\n this.discoveryError = \"Failed to discover endpoint.\";\n }\n ).finally(() => {\n this.discoveryInProgress = false;\n });\n }\n\n addEndpoint() {\n var self = this;\n var delay = 120;\n var newChecks = [];\n _.forEach(this.checks, check => {\n if (check.enabled) {\n if (check.frequency < delay) {\n delay = check.frequency;\n }\n var numProbes = this.probeCount(check);\n if (numProbes < 3) {\n check.healthSettings.num_collectors = numProbes;\n }\n newChecks.push(check);\n }\n });\n this.endpoint.checks = newChecks;\n return this.backendSrv.post('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to add endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint.id = resp.body.id;\n this.endpoint.slug = resp.body.slug;\n this.ignoreChanges = true;\n this.alertSrv.set(\"endpoint added\", '', 'success', 3000);\n this.showCreating = true;\n this.endpointReadyDelay = delay;\n this.endpointReady = false;\n this.$timeout(function() {\n self.endpointReady = true;\n }, delay * 1000);\n });\n }\n\n changesPending() {\n var changes = false;\n var seenCheckTypes = {};\n\n //check if any existing checks have changed\n _.forEach(this.endpoint.checks, check => {\n seenCheckTypes[check.type] = true;\n if (!angular.equals(check, this.checks[check.type])) {\n changes = true;\n }\n });\n\n //check if any new checks added.\n _.forEach(this.checks, check => {\n if (!(check.type in seenCheckTypes) && (\"frequency\" in check) && check.enabled) {\n changes = true;\n }\n });\n\n return changes;\n }\n\n gotoDashboard(endpoint, type) {\n if (!type) {\n type = 'summary';\n }\n var search = {\n \"var-collector\": \"All\",\n \"var-endpoint\": this.endpoint.slug\n };\n switch(type) {\n case \"summary\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n case \"ping\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-ping\").search(search);\n break;\n case \"dns\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-dns\").search(search);\n break;\n case \"http\":\n search['var-protocol'] = \"http\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n case \"https\":\n search['var-protocol'] = \"https\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n default:\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n }\n }\n\n updateAllEndpointChecks(footprint) {\n _.forEach(this.endpoint.checks, check => {\n check.route = footprint.route;\n });\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(\"All checks updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n });\n }\n}\n\nEndpointConfigCtrl.templateUrl = 'public/plugins/raintank-worldping-app/components/endpoint/partials/endpoint_config.html';\n\nexport {EndpointConfigCtrl};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/components/endpoint/endpoint_config.js"],"names":["defaultCheck","checkType","check","_","cloneDeep","_defaultCheck","type","settings","timeout","port","path","headers","body","method","host","downloadLimit","frequency","validateCert","hostname","name","protocol","server","angular","healthSettings","notifications","num_collectors","steps","route","config","EndpointConfigCtrl","$scope","$injector","$rootScope","$location","$modal","$anchorScroll","$timeout","$window","$q","backendSrv","alertSrv","self","pageReady","showCreating","insufficientQuota","frequencyOpts","freqOpt","forEach","push","value","f","label","newEndpointName","checks","endpoint","probes","selectedFootprint","org","quotas","ignoreChanges","promises","reset","search","getEndpoint","getQuotas","checkQuota","getProbes","getOrgDetails","all","then","err","set","showPing","showDNS","showHTTP","showHTTPS","onbeforeunload","changesPending","$on","event","next","preventDefault","baseLen","absUrl","length","url","console","log","nextUrl","substring","modalScope","$new","ignore","save","savePending","appEvent","src","modalClass","scope","idString","id","parseInt","get","resp","meta","code","message","reject","definedChecks","keys","indexOf","q","target","limit","used","probe","tags","t","probesByTag","statusText","getProbesForCheck","ids","undefined","reduce","total","enabled","totalChecks","probeCount","size","toFixed","wpPlan","checksPerMonth","discovered","discoveryInProgress","discoveryError","showConfig","history","back","delete","saveEndpoint","i","put","numProbes","num_collector","found","c","finally","delay","newChecks","post","slug","endpointReadyDelay","endpointReady","changes","seenCheckTypes","equals","footprint","templateUrl"],"mappings":";;;;;;;;;;;;;AAkBA,WAASA,YAAT,CAAsBC,SAAtB,EAAiC;AAC/B,QAAIC,QAAQC,EAAEC,SAAF,CAAYC,aAAZ,CAAZ;AACA,YAAQJ,SAAR;AACA,WAAK,MAAL;AACEC,c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AEC,SAAF,CAAYF,KAAZ,CAA1B;AACD,eAFD;AAGD,aALM,CAAP;AAMD;;;2DAEgC0J,S,EAAW;AAAA;;AAC1CzJ,cAAE4C,OAAF,CAAU,KAAKO,QAAL,CAAcD,MAAxB,EAAgC,iBAAS;AACvClD,gBAAE4C,OAAF,CAAU6G,UAAUjI,KAAV,CAAgBC,MAAhB,CAAuB6F,GAAjC,EAAsC,cAAM;AAC1C,oBAAIvH,MAAMyB,KAAN,CAAYC,MAAZ,CAAmB6F,GAAnB,CAAuBX,OAAvB,CAA+BV,EAA/B,KAAsC,CAAC,CAA3C,EAA6C;AAC3ClG,wBAAMyB,KAAN,CAAYC,MAAZ,CAAmB6F,GAAnB,CAAuBzE,IAAvB,CAA4BoD,EAA5B;AACD;AACF,eAJD;AAKD,aAND;AAOA,mBAAO,KAAKuC,YAAL,GAAoBtE,IAApB,CAAyB,YAAM;AACpC,sBAAK7B,QAAL,CAAc+B,GAAd,CAAkB,qBAAlB,EAAyC,EAAzC,EAA6C,SAA7C,EAAwD,IAAxD;AACApE,gBAAE4C,OAAF,CAAU,QAAKO,QAAL,CAAcD,MAAxB,EAAgC,iBAAS;AACvC,wBAAKA,MAAL,CAAYnD,MAAMI,IAAlB,IAA0BH,EAAEC,SAAF,CAAYF,KAAZ,CAA1B;AACD,eAFD;AAGD,aALM,CAAP;AAMD;;;;;;AAGH2B,yBAAmBgI,WAAnB,GAAiC,yFAAjC;;oCAEQhI,kB","file":"endpoint_config.js","sourcesContent":["import _ from 'lodash';\nimport angular from 'angular';\n\nvar _defaultCheck = {\n settings: {},\n healthSettings: {\n notifications: {},\n num_collectors: 3,\n steps: 3\n },\n route: {\n type: \"byIds\",\n config: {\n \"ids\": []\n }\n }\n};\n\nfunction defaultCheck(checkType) {\n var check = _.cloneDeep(_defaultCheck);\n switch (checkType) {\n case \"http\":\n check.type = \"http\";\n check.settings = {\n timeout: 5,\n port: 80,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"https\":\n check.type = \"https\";\n check.settings = {\n timeout: 5,\n port: 443,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n validateCert: true,\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"ping\":\n check.type = \"ping\";\n check.settings = {\n timeout: 5,\n hostname: \"\"\n };\n check.frequency = 60;\n break;\n case \"dns\":\n check.type = \"dns\";\n check.settings = {\n timeout: 5,\n name: \"\",\n port: 53,\n protocol: \"udp\",\n server: \"\",\n type: \"A\"\n };\n check.frequency = 120;\n break;\n }\n return check;\n}\n\nclass EndpointConfigCtrl {\n /** @ngInject */\n constructor($scope, $injector, $rootScope, $location, $modal, $anchorScroll, $timeout, $window, $q, backendSrv, alertSrv) {\n var self = this;\n this.backendSrv = backendSrv;\n this.$location = $location;\n this.$timeout = $timeout;\n this.$q = $q;\n this.alertSrv = alertSrv;\n this.$window = $window;\n\n this.pageReady = false;\n this.showCreating = false;\n this.insufficientQuota = false;\n\n this.frequencyOpts = [];\n var freqOpt = [10, 30, 60, 120];\n _.forEach(freqOpt, f => {\n this.frequencyOpts.push({value: f, label: \"Every \"+f+\"s\"});\n });\n\n this.newEndpointName = \"\";\n this.checks = {};\n this.endpoint = {};\n this.probes = [];\n this.selectedFootprint = [];\n this.org = null;\n this.quotas = {};\n\n this.ignoreChanges = false;\n\n var promises = [];\n this.reset();\n if (\"endpoint\" in $location.search()) {\n promises.push(this.getEndpoint($location.search().endpoint));\n promises.push(this.getQuotas());\n } else {\n // make sure we have sufficient quota.\n promises.push(this.checkQuota());\n this.endpoint = {name: \"\"};\n }\n\n promises.push(this.getProbes());\n promises.push(this.getOrgDetails());\n\n $q.all(promises).then(() => {\n this.pageReady = true;\n $timeout(function() {\n $anchorScroll();\n }, 0, false);\n }, function(err) {\n alertSrv.set(\"endpoint config init failed\", err, 'error', 10000);\n });\n\n if ($location.search().check) {\n switch($location.search().check) {\n case \"ping\":\n this.showPing = true;\n break;\n case \"dns\":\n this.showDNS = true;\n break;\n case \"http\":\n this.showHTTP = true;\n break;\n case \"https\":\n this.showHTTPS = true;\n break;\n }\n }\n\n $window.onbeforeunload = function() {\n if (self.ignoreChanges) { return; }\n if (self.changesPending()) {\n return \"There are unsaved changes to this dashboard\";\n }\n };\n\n $scope.$on('$locationChangeStart', function(event, next) {\n if ((!self.ignoreChanges) && (self.changesPending())) {\n event.preventDefault();\n var baseLen = $location.absUrl().length - $location.url().length;\n console.log(\"next: \", next);\n console.log(\"baseLen: \", baseLen);\n var nextUrl = next.substring(baseLen);\n console.log(\"nexUrl: \", nextUrl);\n var modalScope = $scope.$new();\n modalScope.ignore = function() {\n self.ignoreChanges = true;\n $location.url(nextUrl);\n return;\n };\n\n modalScope.save = function() {\n self.savePending(nextUrl);\n };\n\n $rootScope.appEvent('show-modal', {\n src: 'public/app/partials/unsaved-changes.html',\n modalClass: 'confirm-modal',\n scope: modalScope,\n });\n }\n });\n }\n\n getEndpoint(idString) {\n var id = parseInt(idString);\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/'+id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n this.newEndpointName = this.endpoint.name;\n _.forEach(resp.body.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] = defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n });\n }\n\n getQuotas() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/quotas').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get quotas.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n _.forEach(resp.body, q => {\n this.quotas[q.target] = q;\n });\n return this.quotas;\n });\n }\n\n checkQuota() {\n return this.getQuotas().then(quotas => {\n if (quotas.endpoint) {\n const q = quotas.endpoint;\n this.insufficientQuota = q.limit > 0 && q.used >= q.limit;\n }\n if (this.insufficientQuota) {\n return this.$q.reject(\"Endpoint quota reached.\");\n }\n return true;\n });\n }\n\n getProbes() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/probes').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get getProbes.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.probes = resp.body;\n _.forEach(this.probes, probe => {\n _.forEach(probe.tags, t => {\n if (!(t in this.probesByTag)) {\n this.probesByTag[t] = [];\n }\n this.probesByTag[t].push(probe);\n });\n });\n });\n }\n\n getOrgDetails() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/grafana-net/profile/org').then(\n resp => {\n this.org = resp;\n },\n resp => {\n this.alertSrv.set(\"failed to get Org Details\", resp.statusText, 'error', 10000);\n }\n );\n }\n\n probeCount(check) {\n if (!check) {\n return 0;\n }\n return this.getProbesForCheck(check).length;\n }\n\n getProbesForCheck(check) {\n return check.route.config.ids || [];\n }\n\n totalChecks(check) {\n if (check === undefined) {\n return _.reduce(this.checks, (total, value) => {\n if (!value.enabled) {\n return total;\n }\n\n return total + this.totalChecks(value);\n }, 0);\n }\n\n var probeCount = this.probeCount(check);\n if (probeCount < 1 || check.frequency < 1) {\n return 0;\n }\n\n return (30.4375 * 24 * (3600/check.frequency) * probeCount / 1000000);\n }\n\n formatSize(size) {\n if (size > 1024 * 1024) {\n return (size / 1024 / 1024).toFixed(2) + ' MB';\n }\n if (size > 1024) {\n return (size / 1024).toFixed(2) + ' KB';\n }\n return size;\n }\n\n currentlyTrial() {\n if (!this.org) {\n return false;\n }\n\n if (this.org.wpPlan === 'trial') {\n return true;\n }\n\n return false;\n }\n\n requiresUpgrade() {\n if (!this.org) {\n return true;\n }\n\n if (this.org.wpPlan !== '' && this.org.wpPlan !== 'free' && this.org.wpPlan !== 'trial') {\n return false;\n }\n\n if (this.org.checksPerMonth / 1000000 + this.totalChecks() > 1) {\n return true;\n }\n\n return false;\n }\n\n reset() {\n this.discovered = false;\n this.discoveryInProgress = false;\n this.discoveryError = false;\n this.showConfig = false;\n this.showCreating = false;\n this.endpoint = {};\n this.checks = {};\n }\n\n cancel() {\n this.reset();\n this.ignoreChanges = true;\n this.$window.history.back();\n }\n\n remove(endpoint) {\n return this.backendSrv.delete('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/' + endpoint.id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to delete endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.$location.path('plugins/raintank-worldping-app/page/endpoints');\n });\n }\n\n updateEndpoint() {\n this.endpoint.name = this.newEndpointName;\n this.saveEndpoint();\n }\n\n tagsUpdated() {\n this.saveEndpoint();\n }\n\n savePending(nextUrl) {\n _.forEach(this.checks, check => {\n if (!check.id && check.enabled) {\n //add the check\n this.endpoint.checks.push(check);\n return;\n }\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].id === check.id) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n }\n }\n });\n return this.saveEndpoint().then(() => {\n this.ignoreChanges = true;\n if (nextUrl) {\n this.$location.url(nextUrl);\n } else {\n this.$location.path(\"plugins/raintank-worldping-app/page/endpoints\");\n }\n });\n }\n\n saveEndpoint() {\n return this.backendSrv.put('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n });\n }\n\n updateCheck(check) {\n if (check.enabled) {\n var numProbes = this.probeCount(check);\n if (numProbes < check.healthSettings.num_collector) {\n check.healthSettings.num_collectors = numProbes;\n }\n if (check.type === \"http\" || check.type === \"https\") {\n if (['PUT', 'POST', 'DELETE', 'PATCH'].indexOf(check.settings.method) < 0) {\n check.settings.body = \"\";\n }\n }\n }\n var found = false;\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].type === check.type) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n found = true;\n break;\n }\n }\n if (!found) {\n this.endpoint.checks.push(check);\n }\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(check.type + \" check updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, c => {\n if (c.type === check.type) {\n this.checks[check.type] = _.cloneDeep(c);\n }\n });\n });\n }\n\n skipDiscovery() {\n this.discoveryInProgress = false;\n this.showConfig = true;\n this.discoveryError = false;\n }\n\n discover(endpoint) {\n if (!endpoint.name){\n return;\n }\n this.discoveryInProgress = true;\n this.discoveryError = false;\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/discover', endpoint).then(\n resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n this.discoveryError = \"Failed to discover endpoint.\";\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] =defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n this.showConfig = true;\n this.discovered = true;\n },\n () => {\n this.discoveryError = \"Failed to discover endpoint.\";\n }\n ).finally(() => {\n this.discoveryInProgress = false;\n });\n }\n\n addEndpoint() {\n var self = this;\n var delay = 120;\n var newChecks = [];\n _.forEach(this.checks, check => {\n if (check.enabled) {\n if (check.frequency < delay) {\n delay = check.frequency;\n }\n var numProbes = this.probeCount(check);\n if (numProbes < 3) {\n check.healthSettings.num_collectors = numProbes;\n }\n newChecks.push(check);\n }\n });\n this.endpoint.checks = newChecks;\n return this.backendSrv.post('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to add endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint.id = resp.body.id;\n this.endpoint.slug = resp.body.slug;\n this.ignoreChanges = true;\n this.alertSrv.set(\"endpoint added\", '', 'success', 3000);\n this.showCreating = true;\n this.endpointReadyDelay = delay;\n this.endpointReady = false;\n this.$timeout(function() {\n self.endpointReady = true;\n }, delay * 1000);\n });\n }\n\n changesPending() {\n var changes = false;\n var seenCheckTypes = {};\n\n //check if any existing checks have changed\n _.forEach(this.endpoint.checks, check => {\n seenCheckTypes[check.type] = true;\n if (!angular.equals(check, this.checks[check.type])) {\n changes = true;\n }\n });\n\n //check if any new checks added.\n _.forEach(this.checks, check => {\n if (!(check.type in seenCheckTypes) && (\"frequency\" in check) && check.enabled) {\n changes = true;\n }\n });\n\n return changes;\n }\n\n gotoDashboard(endpoint, type) {\n if (!type) {\n type = 'summary';\n }\n var search = {\n \"var-collector\": \"All\",\n \"var-endpoint\": this.endpoint.slug\n };\n switch(type) {\n case \"summary\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n case \"ping\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-ping\").search(search);\n break;\n case \"dns\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-dns\").search(search);\n break;\n case \"http\":\n search['var-protocol'] = \"http\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n case \"https\":\n search['var-protocol'] = \"https\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n default:\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n }\n }\n\n replaceAllEndpointChecksFootprint(footprint) {\n _.forEach(this.endpoint.checks, check => {\n check.route = footprint.route;\n });\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(\"All checks updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n });\n }\n \n appendAllEndpointChecksFootprint(footprint) {\n _.forEach(this.endpoint.checks, check => {\n _.forEach(footprint.route.config.ids, id => {\n if (check.route.config.ids.indexOf(id) == -1){\n check.route.config.ids.push(id);\n }\n });\n });\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(\"All checks updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n });\n }\n}\n\nEndpointConfigCtrl.templateUrl = 'public/plugins/raintank-worldping-app/components/endpoint/partials/endpoint_config.html';\n\nexport {EndpointConfigCtrl};\n"]} \ No newline at end of file diff --git a/dist/components/endpoint/partials/endpoint_config.html b/dist/components/endpoint/partials/endpoint_config.html index 33ddfab..30a036a 100644 --- a/dist/components/endpoint/partials/endpoint_config.html +++ b/dist/components/endpoint/partials/endpoint_config.html @@ -53,7 +53,8 @@

{{ctrl.endpoint.name}}
- + +

From 5c5e57146ed276ea3b2811cfb300bf2e584138b5 Mon Sep 17 00:00:00 2001 From: jdbranham Date: Wed, 3 May 2017 20:49:01 -0500 Subject: [PATCH 6/7] Updates default probes when adding a new endpoint --- dist/components/endpoint/endpoint_config.js | 28 +++++++++++++------ .../endpoint/endpoint_config.js.map | 2 +- .../endpoint/partials/endpoint_config.html | 7 +++++ dist/css/worldping.dark.css.map | 2 +- dist/css/worldping.light.css.map | 2 +- src/components/endpoint/endpoint_config.js | 11 ++++++-- .../endpoint/partials/endpoint_config.html | 7 +++++ 7 files changed, 45 insertions(+), 14 deletions(-) diff --git a/dist/components/endpoint/endpoint_config.js b/dist/components/endpoint/endpoint_config.js index 811b5f9..ac03264 100644 --- a/dist/components/endpoint/endpoint_config.js +++ b/dist/components/endpoint/endpoint_config.js @@ -655,37 +655,47 @@ System.register(['lodash', 'angular'], function (_export, _context) { break; } } + }, { + key: 'initialEndpointChecksFootprint', + value: function initialEndpointChecksFootprint(footprint) { + var _this15 = this; + + _.forEach(this.endpoint.checks, function (check) { + check.route = footprint.route; + _this15.checks[check.type].route = footprint.route; + }); + } }, { key: 'replaceAllEndpointChecksFootprint', value: function replaceAllEndpointChecksFootprint(footprint) { - var _this15 = this; + var _this16 = this; _.forEach(this.endpoint.checks, function (check) { check.route = footprint.route; }); return this.saveEndpoint().then(function () { - _this15.alertSrv.set("All checks updated.", "", "success", 2000); - _.forEach(_this15.endpoint.checks, function (check) { - _this15.checks[check.type] = _.cloneDeep(check); + _this16.alertSrv.set("All checks updated.", "", "success", 2000); + _.forEach(_this16.endpoint.checks, function (check) { + _this16.checks[check.type] = _.cloneDeep(check); }); }); } }, { key: 'appendAllEndpointChecksFootprint', value: function appendAllEndpointChecksFootprint(footprint) { - var _this16 = this; + var _this17 = this; _.forEach(this.endpoint.checks, function (check) { _.forEach(footprint.route.config.ids, function (id) { - if (check.route.config.ids.indexOf(id) == -1) { + if (check.route.config.ids.indexOf(id) === -1) { check.route.config.ids.push(id); } }); }); return this.saveEndpoint().then(function () { - _this16.alertSrv.set("All checks updated.", "", "success", 2000); - _.forEach(_this16.endpoint.checks, function (check) { - _this16.checks[check.type] = _.cloneDeep(check); + _this17.alertSrv.set("All checks updated.", "", "success", 2000); + _.forEach(_this17.endpoint.checks, function (check) { + _this17.checks[check.type] = _.cloneDeep(check); }); }); } diff --git a/dist/components/endpoint/endpoint_config.js.map b/dist/components/endpoint/endpoint_config.js.map index 3b32581..d7902a8 100644 --- a/dist/components/endpoint/endpoint_config.js.map +++ b/dist/components/endpoint/endpoint_config.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/components/endpoint/endpoint_config.js"],"names":["defaultCheck","checkType","check","_","cloneDeep","_defaultCheck","type","settings","timeout","port","path","headers","body","method","host","downloadLimit","frequency","validateCert","hostname","name","protocol","server","angular","healthSettings","notifications","num_collectors","steps","route","config","EndpointConfigCtrl","$scope","$injector","$rootScope","$location","$modal","$anchorScroll","$timeout","$window","$q","backendSrv","alertSrv","self","pageReady","showCreating","insufficientQuota","frequencyOpts","freqOpt","forEach","push","value","f","label","newEndpointName","checks","endpoint","probes","selectedFootprint","org","quotas","ignoreChanges","promises","reset","search","getEndpoint","getQuotas","checkQuota","getProbes","getOrgDetails","all","then","err","set","showPing","showDNS","showHTTP","showHTTPS","onbeforeunload","changesPending","$on","event","next","preventDefault","baseLen","absUrl","length","url","console","log","nextUrl","substring","modalScope","$new","ignore","save","savePending","appEvent","src","modalClass","scope","idString","id","parseInt","get","resp","meta","code","message","reject","definedChecks","keys","indexOf","q","target","limit","used","probe","tags","t","probesByTag","statusText","getProbesForCheck","ids","undefined","reduce","total","enabled","totalChecks","probeCount","size","toFixed","wpPlan","checksPerMonth","discovered","discoveryInProgress","discoveryError","showConfig","history","back","delete","saveEndpoint","i","put","numProbes","num_collector","found","c","finally","delay","newChecks","post","slug","endpointReadyDelay","endpointReady","changes","seenCheckTypes","equals","footprint","templateUrl"],"mappings":";;;;;;;;;;;;;AAkBA,WAASA,YAAT,CAAsBC,SAAtB,EAAiC;AAC/B,QAAIC,QAAQC,EAAEC,SAAF,CAAY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BAAS;AACvC,wBAAKA,MAAL,CAAYnD,MAAMI,IAAlB,IAA0BH,EAAEC,SAAF,CAAYF,KAAZ,CAA1B;AACD,eAFD;AAGD,aALM,CAAP;AAMD;;;2DAEgC0J,S,EAAW;AAAA;;AAC1CzJ,cAAE4C,OAAF,CAAU,KAAKO,QAAL,CAAcD,MAAxB,EAAgC,iBAAS;AACvClD,gBAAE4C,OAAF,CAAU6G,UAAUjI,KAAV,CAAgBC,MAAhB,CAAuB6F,GAAjC,EAAsC,cAAM;AAC1C,oBAAIvH,MAAMyB,KAAN,CAAYC,MAAZ,CAAmB6F,GAAnB,CAAuBX,OAAvB,CAA+BV,EAA/B,KAAsC,CAAC,CAA3C,EAA6C;AAC3ClG,wBAAMyB,KAAN,CAAYC,MAAZ,CAAmB6F,GAAnB,CAAuBzE,IAAvB,CAA4BoD,EAA5B;AACD;AACF,eAJD;AAKD,aAND;AAOA,mBAAO,KAAKuC,YAAL,GAAoBtE,IAApB,CAAyB,YAAM;AACpC,sBAAK7B,QAAL,CAAc+B,GAAd,CAAkB,qBAAlB,EAAyC,EAAzC,EAA6C,SAA7C,EAAwD,IAAxD;AACApE,gBAAE4C,OAAF,CAAU,QAAKO,QAAL,CAAcD,MAAxB,EAAgC,iBAAS;AACvC,wBAAKA,MAAL,CAAYnD,MAAMI,IAAlB,IAA0BH,EAAEC,SAAF,CAAYF,KAAZ,CAA1B;AACD,eAFD;AAGD,aALM,CAAP;AAMD;;;;;;AAGH2B,yBAAmBgI,WAAnB,GAAiC,yFAAjC;;oCAEQhI,kB","file":"endpoint_config.js","sourcesContent":["import _ from 'lodash';\nimport angular from 'angular';\n\nvar _defaultCheck = {\n settings: {},\n healthSettings: {\n notifications: {},\n num_collectors: 3,\n steps: 3\n },\n route: {\n type: \"byIds\",\n config: {\n \"ids\": []\n }\n }\n};\n\nfunction defaultCheck(checkType) {\n var check = _.cloneDeep(_defaultCheck);\n switch (checkType) {\n case \"http\":\n check.type = \"http\";\n check.settings = {\n timeout: 5,\n port: 80,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"https\":\n check.type = \"https\";\n check.settings = {\n timeout: 5,\n port: 443,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n validateCert: true,\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"ping\":\n check.type = \"ping\";\n check.settings = {\n timeout: 5,\n hostname: \"\"\n };\n check.frequency = 60;\n break;\n case \"dns\":\n check.type = \"dns\";\n check.settings = {\n timeout: 5,\n name: \"\",\n port: 53,\n protocol: \"udp\",\n server: \"\",\n type: \"A\"\n };\n check.frequency = 120;\n break;\n }\n return check;\n}\n\nclass EndpointConfigCtrl {\n /** @ngInject */\n constructor($scope, $injector, $rootScope, $location, $modal, $anchorScroll, $timeout, $window, $q, backendSrv, alertSrv) {\n var self = this;\n this.backendSrv = backendSrv;\n this.$location = $location;\n this.$timeout = $timeout;\n this.$q = $q;\n this.alertSrv = alertSrv;\n this.$window = $window;\n\n this.pageReady = false;\n this.showCreating = false;\n this.insufficientQuota = false;\n\n this.frequencyOpts = [];\n var freqOpt = [10, 30, 60, 120];\n _.forEach(freqOpt, f => {\n this.frequencyOpts.push({value: f, label: \"Every \"+f+\"s\"});\n });\n\n this.newEndpointName = \"\";\n this.checks = {};\n this.endpoint = {};\n this.probes = [];\n this.selectedFootprint = [];\n this.org = null;\n this.quotas = {};\n\n this.ignoreChanges = false;\n\n var promises = [];\n this.reset();\n if (\"endpoint\" in $location.search()) {\n promises.push(this.getEndpoint($location.search().endpoint));\n promises.push(this.getQuotas());\n } else {\n // make sure we have sufficient quota.\n promises.push(this.checkQuota());\n this.endpoint = {name: \"\"};\n }\n\n promises.push(this.getProbes());\n promises.push(this.getOrgDetails());\n\n $q.all(promises).then(() => {\n this.pageReady = true;\n $timeout(function() {\n $anchorScroll();\n }, 0, false);\n }, function(err) {\n alertSrv.set(\"endpoint config init failed\", err, 'error', 10000);\n });\n\n if ($location.search().check) {\n switch($location.search().check) {\n case \"ping\":\n this.showPing = true;\n break;\n case \"dns\":\n this.showDNS = true;\n break;\n case \"http\":\n this.showHTTP = true;\n break;\n case \"https\":\n this.showHTTPS = true;\n break;\n }\n }\n\n $window.onbeforeunload = function() {\n if (self.ignoreChanges) { return; }\n if (self.changesPending()) {\n return \"There are unsaved changes to this dashboard\";\n }\n };\n\n $scope.$on('$locationChangeStart', function(event, next) {\n if ((!self.ignoreChanges) && (self.changesPending())) {\n event.preventDefault();\n var baseLen = $location.absUrl().length - $location.url().length;\n console.log(\"next: \", next);\n console.log(\"baseLen: \", baseLen);\n var nextUrl = next.substring(baseLen);\n console.log(\"nexUrl: \", nextUrl);\n var modalScope = $scope.$new();\n modalScope.ignore = function() {\n self.ignoreChanges = true;\n $location.url(nextUrl);\n return;\n };\n\n modalScope.save = function() {\n self.savePending(nextUrl);\n };\n\n $rootScope.appEvent('show-modal', {\n src: 'public/app/partials/unsaved-changes.html',\n modalClass: 'confirm-modal',\n scope: modalScope,\n });\n }\n });\n }\n\n getEndpoint(idString) {\n var id = parseInt(idString);\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/'+id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n this.newEndpointName = this.endpoint.name;\n _.forEach(resp.body.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] = defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n });\n }\n\n getQuotas() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/quotas').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get quotas.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n _.forEach(resp.body, q => {\n this.quotas[q.target] = q;\n });\n return this.quotas;\n });\n }\n\n checkQuota() {\n return this.getQuotas().then(quotas => {\n if (quotas.endpoint) {\n const q = quotas.endpoint;\n this.insufficientQuota = q.limit > 0 && q.used >= q.limit;\n }\n if (this.insufficientQuota) {\n return this.$q.reject(\"Endpoint quota reached.\");\n }\n return true;\n });\n }\n\n getProbes() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/probes').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get getProbes.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.probes = resp.body;\n _.forEach(this.probes, probe => {\n _.forEach(probe.tags, t => {\n if (!(t in this.probesByTag)) {\n this.probesByTag[t] = [];\n }\n this.probesByTag[t].push(probe);\n });\n });\n });\n }\n\n getOrgDetails() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/grafana-net/profile/org').then(\n resp => {\n this.org = resp;\n },\n resp => {\n this.alertSrv.set(\"failed to get Org Details\", resp.statusText, 'error', 10000);\n }\n );\n }\n\n probeCount(check) {\n if (!check) {\n return 0;\n }\n return this.getProbesForCheck(check).length;\n }\n\n getProbesForCheck(check) {\n return check.route.config.ids || [];\n }\n\n totalChecks(check) {\n if (check === undefined) {\n return _.reduce(this.checks, (total, value) => {\n if (!value.enabled) {\n return total;\n }\n\n return total + this.totalChecks(value);\n }, 0);\n }\n\n var probeCount = this.probeCount(check);\n if (probeCount < 1 || check.frequency < 1) {\n return 0;\n }\n\n return (30.4375 * 24 * (3600/check.frequency) * probeCount / 1000000);\n }\n\n formatSize(size) {\n if (size > 1024 * 1024) {\n return (size / 1024 / 1024).toFixed(2) + ' MB';\n }\n if (size > 1024) {\n return (size / 1024).toFixed(2) + ' KB';\n }\n return size;\n }\n\n currentlyTrial() {\n if (!this.org) {\n return false;\n }\n\n if (this.org.wpPlan === 'trial') {\n return true;\n }\n\n return false;\n }\n\n requiresUpgrade() {\n if (!this.org) {\n return true;\n }\n\n if (this.org.wpPlan !== '' && this.org.wpPlan !== 'free' && this.org.wpPlan !== 'trial') {\n return false;\n }\n\n if (this.org.checksPerMonth / 1000000 + this.totalChecks() > 1) {\n return true;\n }\n\n return false;\n }\n\n reset() {\n this.discovered = false;\n this.discoveryInProgress = false;\n this.discoveryError = false;\n this.showConfig = false;\n this.showCreating = false;\n this.endpoint = {};\n this.checks = {};\n }\n\n cancel() {\n this.reset();\n this.ignoreChanges = true;\n this.$window.history.back();\n }\n\n remove(endpoint) {\n return this.backendSrv.delete('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/' + endpoint.id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to delete endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.$location.path('plugins/raintank-worldping-app/page/endpoints');\n });\n }\n\n updateEndpoint() {\n this.endpoint.name = this.newEndpointName;\n this.saveEndpoint();\n }\n\n tagsUpdated() {\n this.saveEndpoint();\n }\n\n savePending(nextUrl) {\n _.forEach(this.checks, check => {\n if (!check.id && check.enabled) {\n //add the check\n this.endpoint.checks.push(check);\n return;\n }\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].id === check.id) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n }\n }\n });\n return this.saveEndpoint().then(() => {\n this.ignoreChanges = true;\n if (nextUrl) {\n this.$location.url(nextUrl);\n } else {\n this.$location.path(\"plugins/raintank-worldping-app/page/endpoints\");\n }\n });\n }\n\n saveEndpoint() {\n return this.backendSrv.put('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n });\n }\n\n updateCheck(check) {\n if (check.enabled) {\n var numProbes = this.probeCount(check);\n if (numProbes < check.healthSettings.num_collector) {\n check.healthSettings.num_collectors = numProbes;\n }\n if (check.type === \"http\" || check.type === \"https\") {\n if (['PUT', 'POST', 'DELETE', 'PATCH'].indexOf(check.settings.method) < 0) {\n check.settings.body = \"\";\n }\n }\n }\n var found = false;\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].type === check.type) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n found = true;\n break;\n }\n }\n if (!found) {\n this.endpoint.checks.push(check);\n }\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(check.type + \" check updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, c => {\n if (c.type === check.type) {\n this.checks[check.type] = _.cloneDeep(c);\n }\n });\n });\n }\n\n skipDiscovery() {\n this.discoveryInProgress = false;\n this.showConfig = true;\n this.discoveryError = false;\n }\n\n discover(endpoint) {\n if (!endpoint.name){\n return;\n }\n this.discoveryInProgress = true;\n this.discoveryError = false;\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/discover', endpoint).then(\n resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n this.discoveryError = \"Failed to discover endpoint.\";\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] =defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n this.showConfig = true;\n this.discovered = true;\n },\n () => {\n this.discoveryError = \"Failed to discover endpoint.\";\n }\n ).finally(() => {\n this.discoveryInProgress = false;\n });\n }\n\n addEndpoint() {\n var self = this;\n var delay = 120;\n var newChecks = [];\n _.forEach(this.checks, check => {\n if (check.enabled) {\n if (check.frequency < delay) {\n delay = check.frequency;\n }\n var numProbes = this.probeCount(check);\n if (numProbes < 3) {\n check.healthSettings.num_collectors = numProbes;\n }\n newChecks.push(check);\n }\n });\n this.endpoint.checks = newChecks;\n return this.backendSrv.post('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to add endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint.id = resp.body.id;\n this.endpoint.slug = resp.body.slug;\n this.ignoreChanges = true;\n this.alertSrv.set(\"endpoint added\", '', 'success', 3000);\n this.showCreating = true;\n this.endpointReadyDelay = delay;\n this.endpointReady = false;\n this.$timeout(function() {\n self.endpointReady = true;\n }, delay * 1000);\n });\n }\n\n changesPending() {\n var changes = false;\n var seenCheckTypes = {};\n\n //check if any existing checks have changed\n _.forEach(this.endpoint.checks, check => {\n seenCheckTypes[check.type] = true;\n if (!angular.equals(check, this.checks[check.type])) {\n changes = true;\n }\n });\n\n //check if any new checks added.\n _.forEach(this.checks, check => {\n if (!(check.type in seenCheckTypes) && (\"frequency\" in check) && check.enabled) {\n changes = true;\n }\n });\n\n return changes;\n }\n\n gotoDashboard(endpoint, type) {\n if (!type) {\n type = 'summary';\n }\n var search = {\n \"var-collector\": \"All\",\n \"var-endpoint\": this.endpoint.slug\n };\n switch(type) {\n case \"summary\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n case \"ping\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-ping\").search(search);\n break;\n case \"dns\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-dns\").search(search);\n break;\n case \"http\":\n search['var-protocol'] = \"http\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n case \"https\":\n search['var-protocol'] = \"https\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n default:\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n }\n }\n\n replaceAllEndpointChecksFootprint(footprint) {\n _.forEach(this.endpoint.checks, check => {\n check.route = footprint.route;\n });\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(\"All checks updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n });\n }\n \n appendAllEndpointChecksFootprint(footprint) {\n _.forEach(this.endpoint.checks, check => {\n _.forEach(footprint.route.config.ids, id => {\n if (check.route.config.ids.indexOf(id) == -1){\n check.route.config.ids.push(id);\n }\n });\n });\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(\"All checks updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n });\n }\n}\n\nEndpointConfigCtrl.templateUrl = 'public/plugins/raintank-worldping-app/components/endpoint/partials/endpoint_config.html';\n\nexport {EndpointConfigCtrl};\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/components/endpoint/endpoint_config.js"],"names":["defaultCheck","checkType","check","_","cloneDeep","_defaultCheck","type","settings","timeout","port","path","headers","body","method","host","downloadLimit","frequency","validateCert","hostname","name","protocol","server","angular","healthSettings","notifications","num_collectors","steps","route","config","EndpointConfigCtrl","$scope","$injector","$rootScope","$location","$modal","$anchorScroll","$timeout","$window","$q","backendSrv","alertSrv","self","pageReady","showCreating","insufficientQuota","frequencyOpts","freqOpt","forEach","push","value","f","label","newEndpointName","checks","endpoint","probes","selectedFootprint","org","quotas","ignoreChanges","promises","reset","search","getEndpoint","getQuotas","checkQuota","getProbes","getOrgDetails","all","then","err","set","showPing","showDNS","showHTTP","showHTTPS","onbeforeunload","changesPending","$on","event","next","preventDefault","baseLen","absUrl","length","url","console","log","nextUrl","substring","modalScope","$new","ignore","save","savePending","appEvent","src","modalClass","scope","idString","id","parseInt","get","resp","meta","code","message","reject","definedChecks","keys","indexOf","q","target","limit","used","probe","tags","t","probesByTag","statusText","getProbesForCheck","ids","undefined","reduce","total","enabled","totalChecks","probeCount","size","toFixed","wpPlan","checksPerMonth","discovered","discoveryInProgress","discoveryError","showConfig","history","back","delete","saveEndpoint","i","put","numProbes","num_collector","found","c","finally","delay","newChecks","post","slug","endpointReadyDelay","endpointReady","changes","seenCheckTypes","equals","footprint","templateUrl"],"mappings":";;;;;;;;;;;;;AAkBA,WAASA,YAAT,CAAsBC,SAAtB,EAAiC;AAC/B,QAAIC,QAAQC,EAAEC,SAAF,CAAYC,aAAZ,CAAZ;AACA,YAAQJ,SAAR;AACA,WAAK,MAAL;AACEC,cAAMI,IAAN,GAAa,MAAb;AACAJ,cAAMK,QAAN,GAAiB;AACfC,mBAAS,CADM;AAEfC,gBAAM,EAFS;AAGfC,gBAAM,GAHS;AAIfC,mBAAS,oDAJM;AAKfC,gBAAM,EALS;AAMfC,kBAAQ,KANO;AAOfC,gBAAM,EAPS;AAQfC,yBAAe;AARA,SAAjB;AAUAb,cAAMc,SAAN,GAAkB,GAAlB;AACA;AACF,WAAK,OAAL;AACEd,cAAMI,IAAN,GAAa,OAAb;AACAJ,cAAMK,QAAN,GAAiB;AACfC,mBAAS,CADM;AAEfC,gBAAM,GAFS;AAGfC,gBAAM,GAHS;AAIfC,mBAAS,oDAJM;AAKfC,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D,gBAAE4C,OAAF,CAAU6G,UAAUjI,KAAV,CAAgBC,MAAhB,CAAuB6F,GAAjC,EAAsC,cAAM;AAC1C,oBAAIvH,MAAMyB,KAAN,CAAYC,MAAZ,CAAmB6F,GAAnB,CAAuBX,OAAvB,CAA+BV,EAA/B,MAAuC,CAAC,CAA5C,EAA8C;AAC5ClG,wBAAMyB,KAAN,CAAYC,MAAZ,CAAmB6F,GAAnB,CAAuBzE,IAAvB,CAA4BoD,EAA5B;AACD;AACF,eAJD;AAKD,aAND;AAOA,mBAAO,KAAKuC,YAAL,GAAoBtE,IAApB,CAAyB,YAAM;AACpC,sBAAK7B,QAAL,CAAc+B,GAAd,CAAkB,qBAAlB,EAAyC,EAAzC,EAA6C,SAA7C,EAAwD,IAAxD;AACApE,gBAAE4C,OAAF,CAAU,QAAKO,QAAL,CAAcD,MAAxB,EAAgC,iBAAS;AACvC,wBAAKA,MAAL,CAAYnD,MAAMI,IAAlB,IAA0BH,EAAEC,SAAF,CAAYF,KAAZ,CAA1B;AACD,eAFD;AAGD,aALM,CAAP;AAMD;;;;;;AAGH2B,yBAAmBgI,WAAnB,GAAiC,yFAAjC;;oCAEQhI,kB","file":"endpoint_config.js","sourcesContent":["import _ from 'lodash';\nimport angular from 'angular';\n\nvar _defaultCheck = {\n settings: {},\n healthSettings: {\n notifications: {},\n num_collectors: 3,\n steps: 3\n },\n route: {\n type: \"byIds\",\n config: {\n \"ids\": []\n }\n }\n};\n\nfunction defaultCheck(checkType) {\n var check = _.cloneDeep(_defaultCheck);\n switch (checkType) {\n case \"http\":\n check.type = \"http\";\n check.settings = {\n timeout: 5,\n port: 80,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"https\":\n check.type = \"https\";\n check.settings = {\n timeout: 5,\n port: 443,\n path: \"/\",\n headers: \"User-Agent: worldping-api\\nAccept-Encoding: gzip\\n\",\n body: '',\n method: \"GET\",\n host: \"\",\n validateCert: true,\n downloadLimit: '',\n };\n check.frequency = 120;\n break;\n case \"ping\":\n check.type = \"ping\";\n check.settings = {\n timeout: 5,\n hostname: \"\"\n };\n check.frequency = 60;\n break;\n case \"dns\":\n check.type = \"dns\";\n check.settings = {\n timeout: 5,\n name: \"\",\n port: 53,\n protocol: \"udp\",\n server: \"\",\n type: \"A\"\n };\n check.frequency = 120;\n break;\n }\n return check;\n}\n\nclass EndpointConfigCtrl {\n /** @ngInject */\n constructor($scope, $injector, $rootScope, $location, $modal, $anchorScroll, $timeout, $window, $q, backendSrv, alertSrv) {\n var self = this;\n this.backendSrv = backendSrv;\n this.$location = $location;\n this.$timeout = $timeout;\n this.$q = $q;\n this.alertSrv = alertSrv;\n this.$window = $window;\n\n this.pageReady = false;\n this.showCreating = false;\n this.insufficientQuota = false;\n\n this.frequencyOpts = [];\n var freqOpt = [10, 30, 60, 120];\n _.forEach(freqOpt, f => {\n this.frequencyOpts.push({value: f, label: \"Every \"+f+\"s\"});\n });\n\n this.newEndpointName = \"\";\n this.checks = {};\n this.endpoint = {};\n this.probes = [];\n this.selectedFootprint = [];\n this.org = null;\n this.quotas = {};\n\n this.ignoreChanges = false;\n\n var promises = [];\n this.reset();\n if (\"endpoint\" in $location.search()) {\n promises.push(this.getEndpoint($location.search().endpoint));\n promises.push(this.getQuotas());\n } else {\n // make sure we have sufficient quota.\n promises.push(this.checkQuota());\n this.endpoint = {name: \"\"};\n }\n\n promises.push(this.getProbes());\n promises.push(this.getOrgDetails());\n\n $q.all(promises).then(() => {\n this.pageReady = true;\n $timeout(function() {\n $anchorScroll();\n }, 0, false);\n }, function(err) {\n alertSrv.set(\"endpoint config init failed\", err, 'error', 10000);\n });\n\n if ($location.search().check) {\n switch($location.search().check) {\n case \"ping\":\n this.showPing = true;\n break;\n case \"dns\":\n this.showDNS = true;\n break;\n case \"http\":\n this.showHTTP = true;\n break;\n case \"https\":\n this.showHTTPS = true;\n break;\n }\n }\n\n $window.onbeforeunload = function() {\n if (self.ignoreChanges) { return; }\n if (self.changesPending()) {\n return \"There are unsaved changes to this dashboard\";\n }\n };\n\n $scope.$on('$locationChangeStart', function(event, next) {\n if ((!self.ignoreChanges) && (self.changesPending())) {\n event.preventDefault();\n var baseLen = $location.absUrl().length - $location.url().length;\n console.log(\"next: \", next);\n console.log(\"baseLen: \", baseLen);\n var nextUrl = next.substring(baseLen);\n console.log(\"nexUrl: \", nextUrl);\n var modalScope = $scope.$new();\n modalScope.ignore = function() {\n self.ignoreChanges = true;\n $location.url(nextUrl);\n return;\n };\n\n modalScope.save = function() {\n self.savePending(nextUrl);\n };\n\n $rootScope.appEvent('show-modal', {\n src: 'public/app/partials/unsaved-changes.html',\n modalClass: 'confirm-modal',\n scope: modalScope,\n });\n }\n });\n }\n\n getEndpoint(idString) {\n var id = parseInt(idString);\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/'+id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n this.newEndpointName = this.endpoint.name;\n _.forEach(resp.body.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] = defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n });\n }\n\n getQuotas() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/quotas').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get quotas.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n _.forEach(resp.body, q => {\n this.quotas[q.target] = q;\n });\n return this.quotas;\n });\n }\n\n checkQuota() {\n return this.getQuotas().then(quotas => {\n if (quotas.endpoint) {\n const q = quotas.endpoint;\n this.insufficientQuota = q.limit > 0 && q.used >= q.limit;\n }\n if (this.insufficientQuota) {\n return this.$q.reject(\"Endpoint quota reached.\");\n }\n return true;\n });\n }\n\n getProbes() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/probes').then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to get getProbes.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.probes = resp.body;\n _.forEach(this.probes, probe => {\n _.forEach(probe.tags, t => {\n if (!(t in this.probesByTag)) {\n this.probesByTag[t] = [];\n }\n this.probesByTag[t].push(probe);\n });\n });\n });\n }\n\n getOrgDetails() {\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/grafana-net/profile/org').then(\n resp => {\n this.org = resp;\n },\n resp => {\n this.alertSrv.set(\"failed to get Org Details\", resp.statusText, 'error', 10000);\n }\n );\n }\n\n probeCount(check) {\n if (!check) {\n return 0;\n }\n return this.getProbesForCheck(check).length;\n }\n\n getProbesForCheck(check) {\n return check.route.config.ids || [];\n }\n\n totalChecks(check) {\n if (check === undefined) {\n return _.reduce(this.checks, (total, value) => {\n if (!value.enabled) {\n return total;\n }\n\n return total + this.totalChecks(value);\n }, 0);\n }\n\n var probeCount = this.probeCount(check);\n if (probeCount < 1 || check.frequency < 1) {\n return 0;\n }\n\n return (30.4375 * 24 * (3600/check.frequency) * probeCount / 1000000);\n }\n\n formatSize(size) {\n if (size > 1024 * 1024) {\n return (size / 1024 / 1024).toFixed(2) + ' MB';\n }\n if (size > 1024) {\n return (size / 1024).toFixed(2) + ' KB';\n }\n return size;\n }\n\n currentlyTrial() {\n if (!this.org) {\n return false;\n }\n\n if (this.org.wpPlan === 'trial') {\n return true;\n }\n\n return false;\n }\n\n requiresUpgrade() {\n if (!this.org) {\n return true;\n }\n\n if (this.org.wpPlan !== '' && this.org.wpPlan !== 'free' && this.org.wpPlan !== 'trial') {\n return false;\n }\n\n if (this.org.checksPerMonth / 1000000 + this.totalChecks() > 1) {\n return true;\n }\n\n return false;\n }\n\n reset() {\n this.discovered = false;\n this.discoveryInProgress = false;\n this.discoveryError = false;\n this.showConfig = false;\n this.showCreating = false;\n this.endpoint = {};\n this.checks = {};\n }\n\n cancel() {\n this.reset();\n this.ignoreChanges = true;\n this.$window.history.back();\n }\n\n remove(endpoint) {\n return this.backendSrv.delete('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/' + endpoint.id).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to delete endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.$location.path('plugins/raintank-worldping-app/page/endpoints');\n });\n }\n\n updateEndpoint() {\n this.endpoint.name = this.newEndpointName;\n this.saveEndpoint();\n }\n\n tagsUpdated() {\n this.saveEndpoint();\n }\n\n savePending(nextUrl) {\n _.forEach(this.checks, check => {\n if (!check.id && check.enabled) {\n //add the check\n this.endpoint.checks.push(check);\n return;\n }\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].id === check.id) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n }\n }\n });\n return this.saveEndpoint().then(() => {\n this.ignoreChanges = true;\n if (nextUrl) {\n this.$location.url(nextUrl);\n } else {\n this.$location.path(\"plugins/raintank-worldping-app/page/endpoints\");\n }\n });\n }\n\n saveEndpoint() {\n return this.backendSrv.put('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n });\n }\n\n updateCheck(check) {\n if (check.enabled) {\n var numProbes = this.probeCount(check);\n if (numProbes < check.healthSettings.num_collector) {\n check.healthSettings.num_collectors = numProbes;\n }\n if (check.type === \"http\" || check.type === \"https\") {\n if (['PUT', 'POST', 'DELETE', 'PATCH'].indexOf(check.settings.method) < 0) {\n check.settings.body = \"\";\n }\n }\n }\n var found = false;\n for (var i=0; i < this.endpoint.checks.length; i++) {\n if (this.endpoint.checks[i].type === check.type) {\n this.endpoint.checks[i] = _.cloneDeep(check);\n found = true;\n break;\n }\n }\n if (!found) {\n this.endpoint.checks.push(check);\n }\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(check.type + \" check updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, c => {\n if (c.type === check.type) {\n this.checks[check.type] = _.cloneDeep(c);\n }\n });\n });\n }\n\n skipDiscovery() {\n this.discoveryInProgress = false;\n this.showConfig = true;\n this.discoveryError = false;\n }\n\n discover(endpoint) {\n if (!endpoint.name){\n return;\n }\n this.discoveryInProgress = true;\n this.discoveryError = false;\n return this.backendSrv.get('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints/discover', endpoint).then(\n resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to update endpoint.\", resp.meta.message, 'error', 10000);\n this.discoveryError = \"Failed to discover endpoint.\";\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint = resp.body;\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n var definedChecks = _.keys(this.checks);\n if (definedChecks.length < 4) {\n if (_.indexOf(definedChecks, \"http\") === -1) {\n this.checks[\"http\"] = defaultCheck(\"http\");\n }\n if (_.indexOf(definedChecks, \"https\") === -1) {\n this.checks[\"https\"] = defaultCheck(\"https\");\n }\n if (_.indexOf(definedChecks, \"ping\") === -1) {\n this.checks[\"ping\"] =defaultCheck(\"ping\");\n }\n if (_.indexOf(definedChecks, \"dns\") === -1) {\n this.checks[\"dns\"] = defaultCheck(\"dns\");\n }\n }\n this.showConfig = true;\n this.discovered = true;\n },\n () => {\n this.discoveryError = \"Failed to discover endpoint.\";\n }\n ).finally(() => {\n this.discoveryInProgress = false;\n });\n }\n\n addEndpoint() {\n var self = this;\n var delay = 120;\n var newChecks = [];\n _.forEach(this.checks, check => {\n if (check.enabled) {\n if (check.frequency < delay) {\n delay = check.frequency;\n }\n var numProbes = this.probeCount(check);\n if (numProbes < 3) {\n check.healthSettings.num_collectors = numProbes;\n }\n newChecks.push(check);\n }\n });\n this.endpoint.checks = newChecks;\n return this.backendSrv.post('api/plugin-proxy/raintank-worldping-app/api/v2/endpoints', this.endpoint).then(resp => {\n if (resp.meta.code !== 200) {\n this.alertSrv.set(\"failed to add endpoint.\", resp.meta.message, 'error', 10000);\n return this.$q.reject(resp.meta.message);\n }\n this.endpoint.id = resp.body.id;\n this.endpoint.slug = resp.body.slug;\n this.ignoreChanges = true;\n this.alertSrv.set(\"endpoint added\", '', 'success', 3000);\n this.showCreating = true;\n this.endpointReadyDelay = delay;\n this.endpointReady = false;\n this.$timeout(function() {\n self.endpointReady = true;\n }, delay * 1000);\n });\n }\n\n changesPending() {\n var changes = false;\n var seenCheckTypes = {};\n\n //check if any existing checks have changed\n _.forEach(this.endpoint.checks, check => {\n seenCheckTypes[check.type] = true;\n if (!angular.equals(check, this.checks[check.type])) {\n changes = true;\n }\n });\n\n //check if any new checks added.\n _.forEach(this.checks, check => {\n if (!(check.type in seenCheckTypes) && (\"frequency\" in check) && check.enabled) {\n changes = true;\n }\n });\n\n return changes;\n }\n\n gotoDashboard(endpoint, type) {\n if (!type) {\n type = 'summary';\n }\n var search = {\n \"var-collector\": \"All\",\n \"var-endpoint\": this.endpoint.slug\n };\n switch(type) {\n case \"summary\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n case \"ping\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-ping\").search(search);\n break;\n case \"dns\":\n this.$location.path(\"/dashboard/db/worldping-endpoint-dns\").search(search);\n break;\n case \"http\":\n search['var-protocol'] = \"http\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n case \"https\":\n search['var-protocol'] = \"https\";\n this.$location.path(\"/dashboard/db/worldping-endpoint-web\").search(search);\n break;\n default:\n this.$location.path(\"/dashboard/db/worldping-endpoint-summary\").search(search);\n break;\n }\n }\n\n initialEndpointChecksFootprint(footprint) {\n _.forEach(this.endpoint.checks, check => {\n check.route = footprint.route;\n this.checks[check.type].route = footprint.route;\n });\n }\n\n replaceAllEndpointChecksFootprint(footprint) {\n _.forEach(this.endpoint.checks, check => {\n check.route = footprint.route;\n });\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(\"All checks updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n });\n }\n\n appendAllEndpointChecksFootprint(footprint) {\n _.forEach(this.endpoint.checks, check => {\n _.forEach(footprint.route.config.ids, id => {\n if (check.route.config.ids.indexOf(id) === -1){\n check.route.config.ids.push(id);\n }\n });\n });\n return this.saveEndpoint().then(() => {\n this.alertSrv.set(\"All checks updated.\", \"\", \"success\", 2000);\n _.forEach(this.endpoint.checks, check => {\n this.checks[check.type] = _.cloneDeep(check);\n });\n });\n }\n}\n\nEndpointConfigCtrl.templateUrl = 'public/plugins/raintank-worldping-app/components/endpoint/partials/endpoint_config.html';\n\nexport {EndpointConfigCtrl};\n"]} \ No newline at end of file diff --git a/dist/components/endpoint/partials/endpoint_config.html b/dist/components/endpoint/partials/endpoint_config.html index 30a036a..413afe8 100644 --- a/dist/components/endpoint/partials/endpoint_config.html +++ b/dist/components/endpoint/partials/endpoint_config.html @@ -132,6 +132,13 @@

{{ctrl.endpoint.name }}

skip
+ +
+
+ + +
+
diff --git a/dist/css/worldping.dark.css.map b/dist/css/worldping.dark.css.map index 769766a..e0a61f2 100644 --- a/dist/css/worldping.dark.css.map +++ b/dist/css/worldping.dark.css.map @@ -18,6 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I,GACjB;;AAED,AAAoB,gBAAJ,GAAG,CAAC,AAAA,OAAO,CAAC;EACxB,OAAO,EAAE,EAAG;EACZ,UAAU,EAAE,WAAY;EACxB,MAAM,EAAE,GAAG,CAAC,KAAK,CZnqBF,OAAO;EYoqBtB,OAAO,EAAE,YAAa;EACtB,cAAc,EAAE,MAAO;EACvB,KAAK,EAAE,IAAK;EACZ,MAAM,EAAE,IAAK;EACb,OAAO,EAAE,GAAI;EACb,YAAY,EAAE,IAAK;EACnB,UAAU,EAAE,MAAO;EACnB,UAAU,EAAE,eAAgB,GAC/B;;AAGD,AAAoB,gBAAJ,GAAG,CAAC,AAAA,OAAO,CAAC;EACxB,aAAa,EAAE,GAAI,GACtB;;AAED,AAA4B,gBAAZ,AAAA,QAAQ,GAAG,CAAC,AAAA,OAAO,CAAC;EAChC,UAAU,EXjsBH,OAAO;EWksBd,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CZnpBf,OAAG,GYopBxB;;AAID,AAAA,QAAQ,CAAC;EACP,QAAQ,EAAE,mBAAoB;EAC9B,GAAG,EAAE,kBAAmB;EACxB,IAAI,EAAE,kBAAmB,GAC1B;;AAED,AAAA,sBAAsB,CAAC;EACtB,YAAY,EV5rBF,IAAI,GU6rBd;;AAED,AAAA,gCAAgC,CAAC;EAC/B,UAAU,EZncM,yCAAe;EYoc/B,OAAO,EAAC,IAAK;EACb,SAAS,EAAC,KAAM,GACjB;;AAED,AAAA,qBAAqB,CAAC;EACpB,SAAS,EAAC,IAAK;EACf,cAAc,EAAC,GAAI;EACnB,YAAY,EAAC,GAAI,GAClB", "names": [] } \ No newline at end of file diff --git a/dist/css/worldping.light.css.map b/dist/css/worldping.light.css.map index f512f82..81d44f5 100644 --- a/dist/css/worldping.light.css.map +++ b/dist/css/worldping.light.css.map @@ -18,6 +18,6 @@ "../../src/sass/rt.scss", "../../src/sass/components/collector-footprint-dropdown.scss" ], - "mappings": "AIAA,AAAA,U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,EAAE,GAAG,CAAC,KAAK,CZ7pBF,OAAO;EY8pBtB,OAAO,EAAE,YAAa;EACtB,cAAc,EAAE,MAAO;EACvB,KAAK,EAAE,IAAK;EACZ,MAAM,EAAE,IAAK;EACb,OAAO,EAAE,GAAI;EACb,YAAY,EAAE,IAAK;EACnB,UAAU,EAAE,MAAO;EACnB,UAAU,EAAE,eAAgB,GAC/B;;AAGD,AAAoB,gBAAJ,GAAG,CAAC,AAAA,OAAO,CAAC;EACxB,aAAa,EAAE,GAAI,GACtB;;AAED,AAA4B,gBAAZ,AAAA,QAAQ,GAAG,CAAC,AAAA,OAAO,CAAC;EAChC,UAAU,EXjsBH,OAAO;EWksBd,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CZzqBlB,IAAI,GY0qBtB;;AAID,AAAA,QAAQ,CAAC;EACP,QAAQ,EAAE,mBAAoB;EAC9B,GAAG,EAAE,kBAAmB;EACxB,IAAI,EAAE,kBAAmB,GAC1B;;AAED,AAAA,sBAAsB,CAAC;EACtB,YAAY,EV5rBF,IAAI,GU6rBd;;AAED,AAAA,gCAAgC,CAAC;EAC/B,UAAU,EZ3aM,yCAAe;EY4a/B,OAAO,EAAC,IAAK;EACb,SAAS,EAAC,KAAM,GACjB;;AAED,AAAA,qBAAqB,CAAC;EACpB,SAAS,EAAC,IAAK;EACf,cAAc,EAAC,GAAI;EACnB,YAAY,EAAC,GAAI,GAClB", "names": [] } \ No newline at end of file diff --git a/src/components/endpoint/endpoint_config.js b/src/components/endpoint/endpoint_config.js index c916baa..8b40da4 100644 --- a/src/components/endpoint/endpoint_config.js +++ b/src/components/endpoint/endpoint_config.js @@ -570,6 +570,13 @@ class EndpointConfigCtrl { } } + initialEndpointChecksFootprint(footprint) { + _.forEach(this.endpoint.checks, check => { + check.route = footprint.route; + this.checks[check.type].route = footprint.route; + }); + } + replaceAllEndpointChecksFootprint(footprint) { _.forEach(this.endpoint.checks, check => { check.route = footprint.route; @@ -581,11 +588,11 @@ class EndpointConfigCtrl { }); }); } - + appendAllEndpointChecksFootprint(footprint) { _.forEach(this.endpoint.checks, check => { _.forEach(footprint.route.config.ids, id => { - if (check.route.config.ids.indexOf(id) == -1){ + if (check.route.config.ids.indexOf(id) === -1){ check.route.config.ids.push(id); } }); diff --git a/src/components/endpoint/partials/endpoint_config.html b/src/components/endpoint/partials/endpoint_config.html index 30a036a..413afe8 100644 --- a/src/components/endpoint/partials/endpoint_config.html +++ b/src/components/endpoint/partials/endpoint_config.html @@ -132,6 +132,13 @@

{{ctrl.endpoint.name }}

skip
+ +
+
+ + +
+
From 155b325456b096a7750af4302eb99c11e69646e7 Mon Sep 17 00:00:00 2001 From: jdbranham Date: Sun, 4 Jun 2017 21:40:17 -0500 Subject: [PATCH 7/7] remove 'dynamic' footprint reference --- dist/directives/all.js | 55 ++++++++------------------------- dist/directives/all.js.map | 2 +- src/directives/all.js | 63 ++++++++++---------------------------- 3 files changed, 29 insertions(+), 91 deletions(-) diff --git a/dist/directives/all.js b/dist/directives/all.js index 45b97f0..9fede70 100644 --- a/dist/directives/all.js +++ b/dist/directives/all.js @@ -125,24 +125,25 @@ System.register(['angular', 'lodash'], function (_export, _context) { return { scope: { probes: "=", - model: "=", - defaultFootprint: "=?" + model: "=" }, templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointCollectorSelect.html', link: function link(scope, elem) { var bodyEl = angular.element($window.document.body); - var selectedIds; - - scope.defaultFootprint = scope.defaultFootprint || []; + var selectedIds = []; scope.init = function () { - if (scope.model.route && scope.model.route.config) { - selectedIds = scope.model.route.config.ids; - } else { - selectedIds = scope.model; + if (!scope.model) { + scope.model = { route: { config: { ids: [] } } }; + } else if (!scope.model.route) { + scope.model.route = { config: { ids: [] } }; + } else if (!scope.model.route.config) { + scope.model.route.config = { ids: [] }; + } else if (!scope.model.route.config.ids) { + scope.model.route.config.ids = []; } - - scope.footprint = { value: "static" }; + selectedIds = scope.model.route.config.ids; + scope.footprint = { value: 'static' }; scope.error = false; scope.reset(); }; @@ -177,12 +178,6 @@ System.register(['angular', 'lodash'], function (_export, _context) { option.selected = !option.selected; }; - scope.selectDefaultFootprint = function () { - _.forEach(scope.defaultFootprint, function (option) { - option.selected = true; - }); - }; - scope.selectAll = function () { var select = true; selectedIds = _.map(_.filter(scope.ids, { selected: true }), "id"); @@ -195,32 +190,6 @@ System.register(['angular', 'lodash'], function (_export, _context) { }); }; - scope.tagSelected = function (option) { - option.selected = !option.selected; - }; - - scope.probesWithTags = function () { - var probeList = {}; - _.forEach(scope.probes, function (c) { - _.forEach(_.filter(scope.tags, { selected: true }), function (t) { - if (_.indexOf(c.tags, t.text) !== -1) { - probeList[c.name] = true; - } - }); - }); - return Object.keys(probeList).join(', '); - }; - - scope.probeCount = function (tag) { - var count = 0; - _.forEach(scope.probes, function (c) { - if (_.indexOf(c.tags, tag.text) !== -1) { - count++; - } - }); - return count; - }; - scope.selectIdTitle = function () { selectedIds = _.map(_.filter(scope.ids, { selected: true }), "id"); if (selectedIds.length === 0) { diff --git a/dist/directives/all.js.map b/dist/directives/all.js.map index 646b999..5cf6f48 100644 --- a/dist/directives/all.js.map +++ b/dist/directives/all.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/directives/all.js"],"names":["angular","_","module","directive","templateUrl","scope","ctrl","endpoint","$compile","datasourceSrv","timeSrv","check","link","init","time","from","frequency","to","metricsQuery","range","timeRange","rangeRaw","interval","targets","target","slug","type","toLowerCase","format","maxDataPoints","datasource","get","then","ds","query","results","showHealth","data","metrics","okCount","errorCount","unknownCount","collectorResults","forEach","result","parts","split","stateStr","collector","ts","state","i","datapoints","length","point","isNaN","console","log","col","unknowns","getProbesForCheck","Object","keys","eventReady","$window","$timeout","probes","model","defaultFootprint","elem","bodyEl","element","document","body","selectedIds","route","config","ids","footprint","value","error","reset","sortedProbes","sortBy","o","name","c","option","id","selected","text","indexOf","push","show","selectorOpen","giveFocus","on","bodyOnClick","idSelected","selectDefaultFootprint","selectAll","select","map","filter","tagSelected","probesWithTags","probeList","tags","t","join","probeCount","tag","count","selectIdTitle","slice","hide","off","e","dropdown","find","has","$apply","$watch"],"mappings":";;;;;;;;;AAAOA,a;;AACAC,O;;;;AAEPD,cAAQE,MAAR,CAAe,oBAAf,EAAqCC,SAArC,CAA+C,2BAA/C,EAA4E,YAAW;AACrF,eAAO;AACLC,uBAAa,wFADR;AAELC,iBAAO;AACLC,kBAAM,GADD;AAELC,sBAAU;AAFL;AAFF,SAAP;AAOD,OARD;;AAUAP,cAAQE,MAAR,CAAe,oBAAf,EAAqCC,SAArC,CAA+C,eAA/C,EAAgE,UAASK,QAAT,EAAmBC,aAAnB,EAAkCC,OAAlC,EAA2C;AACzG,eAAO;AACLN,uBAAa,4EADR;AAELC,iBAAO;AACLM,mBAAO,GADF;AAELL,kBAAM;AAFD,WAFF;AAMLM,gBAAM,cAASP,KAAT,EAAgB;AACpBK,oBAAQG,IAAR,CAAa;AACXC,oBAAM,EAACC,MAAM,UAAQV,MAAMM,KAAN,CAAYK,SAAZ,GAAwB,EAAhC,IAAqC,GAA5C,EAAiDC,IAAI,KAArD;AADK,aAAb;AAGA,gBAAIC,eAAe;AACjBC,qBAAOT,QAAQU,SAAR,EADU;AAEjBC,wBAAUX,QAAQU,SAAR,CAAkB,IAAlB,CAFO;AAGjBE,wBAAUjB,MAAMM,KAAN,CAAYK,SAAZ,GAAwB,GAHjB;AAIjBO,uBAAS,CACP,EAACC,QAAQ,eAAanB,MAAMC,IAAN,CAAWC,QAAX,CAAoBkB,IAAjC,GAAwC,KAAxC,GACPpB,MAAMM,KAAN,CAAYe,IAAZ,CAAiBC,WAAjB,EADO,GACwB,yBADjC,EADO,CAJQ;AAQjBC,sBAAQ,MARS;AASjBC,6BAAe;AATE,aAAnB;;AAYA,gBAAIC,aAAarB,cAAcsB,GAAd,CAAkB,UAAlB,CAAjB;AACAD,uBAAWE,IAAX,CAAgB,UAASC,EAAT,EAAa;AAC3BA,iBAAGC,KAAH,CAAShB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B,KAArD,CAA2D,CAA3D,EAA8D,CAA9D,EAAiEL,IAAjE,CAAsE,IAAtE,IAA8E,OAA9E,IAAyFnC,YAAYrB,MAAZ,GAAqB,CAA9G,IAAmH,OAA1H;AACD,aATD;;AAWAhD,kBAAM8G,IAAN,GAAa,YAAW;AACtB9G,oBAAM8D,KAAN,CAAYQ,KAAZ,GAAoB;AAClBjD,sBAAM,OADY;AAElBkD,wBAAQ;AACNC,uBAAK;AADC;AAFU,eAApB;AAMAH,4BAAczE,EAAEqG,GAAF,CAAMrG,EAAEsG,MAAF,CAASlG,MAAMwE,GAAf,EAAoB,EAACY,UAAU,IAAX,EAApB,CAAN,EAA6C,IAA7C,CAAd;AACAxF,gBAAE0C,OAAF,CAAU+B,WAAV,EAAuB,UAASY,CAAT,EAAY;AACjCjF,sBAAM8D,KAAN,CAAYQ,KAAZ,CAAkBC,MAAlB,CAAyBC,GAAzB,CAA6Be,IAA7B,CAAkCN,CAAlC;AACD,eAFD;AAGAjF,oBAAMyF,YAAN,GAAqB,KAArB;AACAxB,qBAAO8C,GAAP,CAAW,OAAX,EAAoB/G,MAAM4F,WAA1B;AACD,aAbD;;AAeA5F,kBAAM4F,WAAN,GAAoB,UAASoB,CAAT,EAAY;AAC9B,kBAAIC,WAAWjD,KAAKkD,IAAL,CAAU,0BAAV,CAAf;AACA,kBAAID,SAASE,GAAT,CAAaH,EAAE7F,MAAf,EAAuB6B,MAAvB,KAAkC,CAAtC,EAAyC;AACvChD,sBAAMoH,MAAN,CAAapH,MAAM8G,IAAnB;AACD;AACF,aALD;;AAOA9G,kBAAMqH,MAAN,CAAa,UAAb,EAAyB,YAAW;AAClCrH,oBAAMQ,IAAN;AACD,aAFD;AAGD;AAvII,SAAP;AAyID,OA1ID","file":"all.js","sourcesContent":["import angular from 'angular';\nimport _ from 'lodash';\n\nangular.module('grafana.directives').directive(\"rtEndpointHealthDashboard\", function() {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointHealthDashboard.html',\n scope: {\n ctrl: \"=\",\n endpoint: \"=\"\n }\n };\n});\n\nangular.module('grafana.directives').directive(\"rtCheckHealth\", function($compile, datasourceSrv, timeSrv) {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/checkHealth.html',\n scope: {\n check: \"=\",\n ctrl: \"=\"\n },\n link: function(scope) {\n timeSrv.init({\n time: {from: \"now-\"+(scope.check.frequency + 30)+ 's', to: \"now\"}\n });\n var metricsQuery = {\n range: timeSrv.timeRange(),\n rangeRaw: timeSrv.timeRange(true),\n interval: scope.check.frequency + 's',\n targets: [\n {target: \"worldping.\"+scope.ctrl.endpoint.slug + \".*.\" +\n scope.check.type.toLowerCase()+\".{ok_state,error_state}\"}\n ],\n format: 'json',\n maxDataPoints: 10,\n };\n\n var datasource = datasourceSrv.get('raintank');\n datasource.then(function(ds) {\n ds.query(metricsQuery).then(function(results) {\n showHealth(results);\n }, function() {\n showHealth({data: []});\n });\n });\n\n function showHealth(metrics) {\n var okCount = 0;\n var errorCount = 0;\n var unknownCount = 0;\n var collectorResults = {};\n _.forEach(metrics.data, function(result) {\n var parts = result.target.split('.');\n var stateStr = parts[4];\n var collector = parts[2];\n if (!(collector in collectorResults)) {\n collectorResults[collector] = {ts: -1, state: -1};\n }\n\n //start with the last point and work backwards till we find a non-null value.\n for (var i = result.datapoints.length - 1 ; i >= 0; i--) {\n var point = result.datapoints[i];\n if (!isNaN(point[0])) {\n if ((point[0] === 1) && (point[1] > collectorResults[collector].ts)) {\n collectorResults[collector].ts = point[1];\n switch (stateStr) {\n case 'ok_state':\n collectorResults[collector].state = 0;\n break;\n case 'error_state':\n collectorResults[collector].state = 2;\n break;\n default:\n collectorResults[collector].state = -1;\n console.log(\"unknown state returned. this shouldnt happen :(\");\n }\n break;\n }\n }\n }\n });\n for (var col in collectorResults) {\n switch (collectorResults[col].state) {\n case 0:\n okCount++;\n break;\n case 2:\n errorCount++;\n break;\n default:\n unknownCount++;\n }\n }\n var unknowns = scope.ctrl.getProbesForCheck(scope.check.type).length - Object.keys(collectorResults).length;\n unknownCount += unknowns;\n\n scope.okCount = okCount;\n scope.errorCount = errorCount;\n scope.unknownCount = unknownCount;\n scope.eventReady = true;\n }\n }\n };\n});\n\nangular.module('grafana.directives').directive(\"rtEndpointHealth\", function() {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointHealth.html',\n scope: {\n endpoint: \"=\",\n ctrl: \"=\"\n }\n };\n});\n\nangular.module('grafana.directives').directive('endpointProbeSelect', function($compile, $window, $timeout) {\n return {\n scope: {\n probes: \"=\",\n model: \"=\",\n defaultFootprint: \"=?\"\n },\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointCollectorSelect.html',\n link: function(scope, elem) {\n var bodyEl = angular.element($window.document.body);\n var selectedIds;\n\n scope.defaultFootprint = scope.defaultFootprint || [];\n\n scope.init = function() {\n if(scope.model.route && scope.model.route.config){\n selectedIds = scope.model.route.config.ids;\n } else {\n selectedIds = scope.model;\n }\n\n scope.footprint = {value: \"static\"};\n scope.error = false;\n scope.reset();\n };\n\n scope.reset = function() {\n scope.error = false;\n scope.ids = [];\n //build out our list of collectorIds\n var sortedProbes = _.sortBy(scope.probes, function(o) {\n return o.name.toLowerCase();\n });\n _.forEach(sortedProbes, function(c) {\n var option = {id: c.id, selected: false, text: c.name};\n if (_.indexOf(selectedIds, c.id) >= 0) {\n option.selected = true;\n }\n scope.ids.push(option);\n });\n };\n\n scope.show = function() {\n scope.reset();\n scope.selectorOpen = true;\n scope.giveFocus = 1;\n\n $timeout(function() {\n bodyEl.on('click', scope.bodyOnClick);\n }, 0, false);\n };\n\n scope.idSelected = function(option) {\n option.selected = !option.selected;\n };\n\n scope.selectDefaultFootprint = function() {\n _.forEach(scope.defaultFootprint, function(option) {\n option.selected = true;\n });\n };\n\n scope.selectAll = function() {\n var select = true;\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n\n if (selectedIds.length === scope.ids.length) {\n select = false;\n }\n _.forEach(scope.ids, function(option) {\n option.selected = select;\n });\n };\n\n scope.tagSelected = function(option) {\n option.selected = !option.selected;\n };\n\n scope.probesWithTags = function() {\n var probeList = {};\n _.forEach(scope.probes, function(c) {\n _.forEach(_.filter(scope.tags, {selected: true}), function(t) {\n if (_.indexOf(c.tags, t.text) !== -1) {\n probeList[c.name] = true;\n }\n });\n });\n return Object.keys(probeList).join(', ');\n };\n\n scope.probeCount = function(tag) {\n var count = 0;\n _.forEach(scope.probes, function(c) {\n if (_.indexOf(c.tags, tag.text) !== -1) {\n count++;\n }\n });\n return count;\n };\n\n scope.selectIdTitle = function() {\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n if (selectedIds.length === 0) {\n return \"Select Probes\";\n }\n if (selectedIds.length <= 2) {\n return _.map(_.filter(scope.ids, {selected: true}), \"text\").join(\", \");\n }\n return _.map(_.filter(scope.ids, {selected: true}), \"text\").slice(0, 2).join(\", \") + \" and \" + (selectedIds.length - 2) + \" more\";\n };\n\n scope.hide = function() {\n scope.model.route = {\n type: \"byIds\",\n config: {\n ids: []\n }\n };\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n _.forEach(selectedIds, function(c) {\n scope.model.route.config.ids.push(c);\n });\n scope.selectorOpen = false;\n bodyEl.off('click', scope.bodyOnClick);\n };\n\n scope.bodyOnClick = function(e) {\n var dropdown = elem.find('.variable-value-dropdown');\n if (dropdown.has(e.target).length === 0) {\n scope.$apply(scope.hide);\n }\n };\n\n scope.$watch('model.id', function() {\n scope.init();\n });\n },\n };\n});\n"]} \ No newline at end of file +{"version":3,"sources":["../../src/directives/all.js"],"names":["angular","_","module","directive","templateUrl","scope","ctrl","endpoint","$compile","datasourceSrv","timeSrv","check","link","init","time","from","frequency","to","metricsQuery","range","timeRange","rangeRaw","interval","targets","target","slug","type","toLowerCase","format","maxDataPoints","datasource","get","then","ds","query","results","showHealth","data","metrics","okCount","errorCount","unknownCount","collectorResults","forEach","result","parts","split","stateStr","collector","ts","state","i","datapoints","length","point","isNaN","console","log","col","unknowns","getProbesForCheck","Object","keys","eventReady","$window","$timeout","probes","model","elem","bodyEl","element","document","body","selectedIds","route","config","ids","footprint","value","error","reset","sortedProbes","sortBy","o","name","c","option","id","selected","text","indexOf","push","show","selectorOpen","giveFocus","on","bodyOnClick","idSelected","selectAll","select","map","filter","selectIdTitle","join","slice","hide","off","e","dropdown","find","has","$apply","$watch"],"mappings":";;;;;;;;;AAAOA,a;;AACAC,O;;;;AAEPD,cAAQE,MAAR,CAAe,oBAAf,EAAqCC,SAArC,CAA+C,2BAA/C,EAA4E,YAAW;AACrF,eAAO;AACLC,uBAAa,wFADR;AAELC,iBAAO;AACLC,kBAAM,GADD;AAELC,sBAAU;AAFL;AAFF,SAAP;AAOD,OARD;;AAUAP,cAAQE,MAAR,CAAe,oBAAf,EAAqCC,SAArC,CAA+C,eAA/C,EAAgE,UAASK,QAAT,EAAmBC,aAAnB,EAAkCC,OAAlC,EAA2C;AACzG,eAAO;AACLN,uBAAa,4EADR;AAELC,iBAAO;AACLM,mBAAO,GADF;AAELL,kBAAM;AAFD,WAFF;AAMLM,gBAAM,cAASP,KAAT,EAAgB;AACpBK,oBAAQG,IAAR,CAAa;AACXC,oBAAM,EAACC,MAAM,UAAQV,MAAMM,KAAN,CAAYK,SAAZ,GAAwB,EAAhC,IAAqC,GAA5C,EAAiDC,IAAI,KAArD;AADK,aAAb;AAGA,gBAAIC,eAAe;AACjBC,qBAAOT,QAAQU,SAAR,EADU;AAEjBC,wBAAUX,QAAQU,SAAR,CAAkB,IAAlB,CAFO;AAGjBE,wBAAUjB,MAAMM,KAAN,CAAYK,SAAZ,GAAwB,GAHjB;AAIjBO,uBAAS,CACP,EAACC,QAAQ,eAAanB,MAAMC,IAAN,CAAWC,QAAX,CAAoBkB,IAAjC,GAAwC,KAAxC,GACPpB,MAAMM,KAAN,CAAYe,IAAZ,CAAiBC,WAAjB,EADO,GACwB,yBADjC,EADO,CAJQ;AAQjBC,sBAAQ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AA7B,CAAkCN,CAAlC;AACD,eAFD;AAGAhF,oBAAMwF,YAAN,GAAqB,KAArB;AACAxB,qBAAOqC,GAAP,CAAW,OAAX,EAAoBrG,MAAM2F,WAA1B;AACD,aAbD;;AAeA3F,kBAAM2F,WAAN,GAAoB,UAASW,CAAT,EAAY;AAC9B,kBAAIC,WAAWxC,KAAKyC,IAAL,CAAU,0BAAV,CAAf;AACA,kBAAID,SAASE,GAAT,CAAaH,EAAEnF,MAAf,EAAuB6B,MAAvB,KAAkC,CAAtC,EAAyC;AACvChD,sBAAM0G,MAAN,CAAa1G,MAAMoG,IAAnB;AACD;AACF,aALD;;AAOApG,kBAAM2G,MAAN,CAAa,UAAb,EAAyB,YAAW;AAClC3G,oBAAMQ,IAAN;AACD,aAFD;AAGD;AAxGI,SAAP;AA0GD,OA3GD","file":"all.js","sourcesContent":["import angular from 'angular';\nimport _ from 'lodash';\n\nangular.module('grafana.directives').directive(\"rtEndpointHealthDashboard\", function() {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointHealthDashboard.html',\n scope: {\n ctrl: \"=\",\n endpoint: \"=\"\n }\n };\n});\n\nangular.module('grafana.directives').directive(\"rtCheckHealth\", function($compile, datasourceSrv, timeSrv) {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/checkHealth.html',\n scope: {\n check: \"=\",\n ctrl: \"=\"\n },\n link: function(scope) {\n timeSrv.init({\n time: {from: \"now-\"+(scope.check.frequency + 30)+ 's', to: \"now\"}\n });\n var metricsQuery = {\n range: timeSrv.timeRange(),\n rangeRaw: timeSrv.timeRange(true),\n interval: scope.check.frequency + 's',\n targets: [\n {target: \"worldping.\"+scope.ctrl.endpoint.slug + \".*.\" +\n scope.check.type.toLowerCase()+\".{ok_state,error_state}\"}\n ],\n format: 'json',\n maxDataPoints: 10,\n };\n\n var datasource = datasourceSrv.get('raintank');\n datasource.then(function(ds) {\n ds.query(metricsQuery).then(function(results) {\n showHealth(results);\n }, function() {\n showHealth({data: []});\n });\n });\n\n function showHealth(metrics) {\n var okCount = 0;\n var errorCount = 0;\n var unknownCount = 0;\n var collectorResults = {};\n _.forEach(metrics.data, function(result) {\n var parts = result.target.split('.');\n var stateStr = parts[4];\n var collector = parts[2];\n if (!(collector in collectorResults)) {\n collectorResults[collector] = {ts: -1, state: -1};\n }\n\n //start with the last point and work backwards till we find a non-null value.\n for (var i = result.datapoints.length - 1 ; i >= 0; i--) {\n var point = result.datapoints[i];\n if (!isNaN(point[0])) {\n if ((point[0] === 1) && (point[1] > collectorResults[collector].ts)) {\n collectorResults[collector].ts = point[1];\n switch (stateStr) {\n case 'ok_state':\n collectorResults[collector].state = 0;\n break;\n case 'error_state':\n collectorResults[collector].state = 2;\n break;\n default:\n collectorResults[collector].state = -1;\n console.log(\"unknown state returned. this shouldnt happen :(\");\n }\n break;\n }\n }\n }\n });\n for (var col in collectorResults) {\n switch (collectorResults[col].state) {\n case 0:\n okCount++;\n break;\n case 2:\n errorCount++;\n break;\n default:\n unknownCount++;\n }\n }\n var unknowns = scope.ctrl.getProbesForCheck(scope.check.type).length - Object.keys(collectorResults).length;\n unknownCount += unknowns;\n\n scope.okCount = okCount;\n scope.errorCount = errorCount;\n scope.unknownCount = unknownCount;\n scope.eventReady = true;\n }\n }\n };\n});\n\nangular.module('grafana.directives').directive(\"rtEndpointHealth\", function() {\n return {\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointHealth.html',\n scope: {\n endpoint: \"=\",\n ctrl: \"=\"\n }\n };\n});\n\nangular.module('grafana.directives').directive('endpointProbeSelect', function($compile, $window, $timeout) {\n return {\n scope: {\n probes: \"=\",\n model: \"=\",\n },\n templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointCollectorSelect.html',\n link: function(scope, elem) {\n var bodyEl = angular.element($window.document.body);\n var selectedIds = [];\n\n scope.init = function() {\n if (!scope.model) {\n scope.model = {route: {config: {ids: []}}};\n } else if (!scope.model.route) {\n scope.model.route = {config: {ids: []}};\n } else if (!scope.model.route.config) {\n scope.model.route.config = {ids: []};\n } else if (!scope.model.route.config.ids){\n scope.model.route.config.ids = [];\n }\n selectedIds = scope.model.route.config.ids;\n scope.footprint = {value: 'static'};\n scope.error = false;\n scope.reset();\n };\n\n scope.reset = function() {\n scope.error = false;\n scope.ids = [];\n //build out our list of collectorIds\n var sortedProbes = _.sortBy(scope.probes, function(o) {\n return o.name.toLowerCase();\n });\n _.forEach(sortedProbes, function(c) {\n var option = {id: c.id, selected: false, text: c.name};\n if (_.indexOf(selectedIds, c.id) >= 0) {\n option.selected = true;\n }\n scope.ids.push(option);\n });\n };\n\n scope.show = function() {\n scope.reset();\n scope.selectorOpen = true;\n scope.giveFocus = 1;\n\n $timeout(function() {\n bodyEl.on('click', scope.bodyOnClick);\n }, 0, false);\n };\n\n scope.idSelected = function(option) {\n option.selected = !option.selected;\n };\n\n scope.selectAll = function() {\n var select = true;\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n\n if (selectedIds.length === scope.ids.length) {\n select = false;\n }\n _.forEach(scope.ids, function(option) {\n option.selected = select;\n });\n };\n\n scope.selectIdTitle = function() {\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n if (selectedIds.length === 0) {\n return \"Select Probes\";\n }\n if (selectedIds.length <= 2) {\n return _.map(_.filter(scope.ids, {selected: true}), \"text\").join(\", \");\n }\n return _.map(_.filter(scope.ids, {selected: true}), \"text\").slice(0, 2).join(\", \") + \" and \" + (selectedIds.length - 2) + \" more\";\n };\n\n scope.hide = function() {\n scope.model.route = {\n type: \"byIds\",\n config: {\n ids: []\n }\n };\n selectedIds = _.map(_.filter(scope.ids, {selected: true}), \"id\");\n _.forEach(selectedIds, function(c) {\n scope.model.route.config.ids.push(c);\n });\n scope.selectorOpen = false;\n bodyEl.off('click', scope.bodyOnClick);\n };\n\n scope.bodyOnClick = function(e) {\n var dropdown = elem.find('.variable-value-dropdown');\n if (dropdown.has(e.target).length === 0) {\n scope.$apply(scope.hide);\n }\n };\n\n scope.$watch('model.id', function() {\n scope.init();\n });\n },\n };\n});\n"]} \ No newline at end of file diff --git a/src/directives/all.js b/src/directives/all.js index 46d23c2..8d49150 100644 --- a/src/directives/all.js +++ b/src/directives/all.js @@ -117,23 +117,24 @@ angular.module('grafana.directives').directive('endpointProbeSelect', function($ scope: { probes: "=", model: "=", - defaultFootprint: "=?" }, templateUrl: 'public/plugins/raintank-worldping-app/directives/partials/endpointCollectorSelect.html', link: function(scope, elem) { var bodyEl = angular.element($window.document.body); - var selectedIds; - - scope.defaultFootprint = scope.defaultFootprint || []; + var selectedIds = []; scope.init = function() { - if(scope.model.route && scope.model.route.config){ - selectedIds = scope.model.route.config.ids; - } else { - selectedIds = scope.model; + if (!scope.model) { + scope.model = {route: {config: {ids: []}}}; + } else if (!scope.model.route) { + scope.model.route = {config: {ids: []}}; + } else if (!scope.model.route.config) { + scope.model.route.config = {ids: []}; + } else if (!scope.model.route.config.ids){ + scope.model.route.config.ids = []; } - - scope.footprint = {value: "static"}; + selectedIds = scope.model.route.config.ids; + scope.footprint = {value: 'static'}; scope.error = false; scope.reset(); }; @@ -168,12 +169,6 @@ angular.module('grafana.directives').directive('endpointProbeSelect', function($ option.selected = !option.selected; }; - scope.selectDefaultFootprint = function() { - _.forEach(scope.defaultFootprint, function(option) { - option.selected = true; - }); - }; - scope.selectAll = function() { var select = true; selectedIds = _.map(_.filter(scope.ids, {selected: true}), "id"); @@ -186,32 +181,6 @@ angular.module('grafana.directives').directive('endpointProbeSelect', function($ }); }; - scope.tagSelected = function(option) { - option.selected = !option.selected; - }; - - scope.probesWithTags = function() { - var probeList = {}; - _.forEach(scope.probes, function(c) { - _.forEach(_.filter(scope.tags, {selected: true}), function(t) { - if (_.indexOf(c.tags, t.text) !== -1) { - probeList[c.name] = true; - } - }); - }); - return Object.keys(probeList).join(', '); - }; - - scope.probeCount = function(tag) { - var count = 0; - _.forEach(scope.probes, function(c) { - if (_.indexOf(c.tags, tag.text) !== -1) { - count++; - } - }); - return count; - }; - scope.selectIdTitle = function() { selectedIds = _.map(_.filter(scope.ids, {selected: true}), "id"); if (selectedIds.length === 0) { @@ -225,11 +194,11 @@ angular.module('grafana.directives').directive('endpointProbeSelect', function($ scope.hide = function() { scope.model.route = { - type: "byIds", - config: { - ids: [] - } - }; + type: "byIds", + config: { + ids: [] + } + }; selectedIds = _.map(_.filter(scope.ids, {selected: true}), "id"); _.forEach(selectedIds, function(c) { scope.model.route.config.ids.push(c);