diff --git a/example/Nullify Demo Dashboard.json b/example/Nullify Demo Dashboard.json index dd6867c..0db28c0 100644 --- a/example/Nullify Demo Dashboard.json +++ b/example/Nullify Demo Dashboard.json @@ -299,14 +299,14 @@ "viz": false }, "insertNulls": false, - "lineInterpolation": "linear", + "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", - "spanNulls": false, + "spanNulls": true, "stacking": { "group": "A", "mode": "none" @@ -339,7 +339,7 @@ "x": 12, "y": 0 }, - "id": 4, + "id": 17, "options": { "legend": { "calcs": [], @@ -352,6 +352,7 @@ "sort": "none" } }, + "pluginVersion": "10.3.0", "targets": [ { "datasource": { @@ -374,6 +375,57 @@ } ], "title": "SAST - Findings over time", + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": false, + "field": "repository" + } + ] + } + }, + { + "id": "calculateField", + "options": { + "mode": "reduceRow", + "reduce": { + "include": [ + "numHigh", + "numMedium", + "numLow", + "numUnknown", + "numCritical" + ], + "reducer": "sum" + } + } + }, + { + "id": "groupingToMatrix", + "options": { + "columnField": "repository", + "emptyValue": "empty", + "rowField": "time", + "valueField": "Total" + } + }, + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "time\\repository" + } + ], + "fields": {} + } + } + ], "type": "timeseries" }, { @@ -665,14 +717,14 @@ "viz": false }, "insertNulls": false, - "lineInterpolation": "linear", + "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", - "spanNulls": false, + "spanNulls": true, "stacking": { "group": "A", "mode": "none" @@ -705,7 +757,7 @@ "x": 12, "y": 10 }, - "id": 11, + "id": 18, "options": { "legend": { "calcs": [], @@ -718,6 +770,7 @@ "sort": "none" } }, + "pluginVersion": "10.3.0", "targets": [ { "datasource": { @@ -740,6 +793,57 @@ } ], "title": "SCA - Findings over time", + "transformations": [ + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": false, + "field": "repository" + } + ] + } + }, + { + "id": "calculateField", + "options": { + "mode": "reduceRow", + "reduce": { + "include": [ + "numHigh", + "numMedium", + "numLow", + "numUnknown", + "numCritical" + ], + "reducer": "sum" + } + } + }, + { + "id": "groupingToMatrix", + "options": { + "columnField": "repository", + "emptyValue": "empty", + "rowField": "time", + "valueField": "Total" + } + }, + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "time\\repository" + } + ], + "fields": {} + } + } + ], "type": "timeseries" }, { @@ -994,14 +1098,14 @@ "viz": false }, "insertNulls": false, - "lineInterpolation": "linear", + "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", - "spanNulls": false, + "spanNulls": true, "stacking": { "group": "A", "mode": "none" @@ -1034,7 +1138,7 @@ "x": 12, "y": 20 }, - "id": 6, + "id": 19, "options": { "legend": { "calcs": [], @@ -1047,7 +1151,7 @@ "sort": "none" } }, - "pluginVersion": "10.3.1", + "pluginVersion": "10.3.0", "targets": [ { "datasource": { @@ -1066,45 +1170,60 @@ "refId": "A" } ], - "title": "Secrets Detection - First committed", + "title": "Secrets - Findings over time", "transformations": [ { - "id": "filterByValue", + "id": "sortBy", "options": { - "filters": [ + "fields": {}, + "sort": [ { - "config": { - "id": "greater", - "options": { - "value": 0 - } - }, - "fieldName": "finding_firstCommitTimestamp" + "desc": false, + "field": "repository" } - ], - "match": "any", - "type": "include" + ] } }, { "id": "groupBy", "options": { "fields": { - "finding_firstCommitTimestamp": { - "aggregations": [], - "operation": "groupby" - }, - "finding_timeStamp": { - "aggregations": [] - }, "id": { "aggregations": [ "count" ], "operation": "aggregate" + }, + "repository": { + "aggregations": [], + "operation": "groupby" + }, + "timestamp": { + "aggregations": [], + "operation": "groupby" } } } + }, + { + "id": "groupingToMatrix", + "options": { + "columnField": "repository", + "rowField": "timestamp", + "valueField": "id (count)" + } + }, + { + "id": "convertFieldType", + "options": { + "conversions": [ + { + "destinationType": "time", + "targetField": "timestamp\\repository" + } + ], + "fields": {} + } } ], "type": "timeseries" @@ -1401,142 +1520,6 @@ ], "type": "barchart" }, - { - "datasource": { - "type": "nullify-grafana-datasource", - "uid": "${DS_NULLIFY_DATASOURCE}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unitScale": true - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 12, - "x": 12, - "y": 30 - }, - "id": 8, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "10.3.1", - "targets": [ - { - "datasource": { - "type": "nullify-grafana-datasource", - "uid": "${DS_NULLIFY_DATASOURCE}" - }, - "endpoint": "secrets/events", - "queryParameters": { - "githubRepositoryIdsOrQueries": [ - "$repository" - ], - "ownerNamesOrQueries": [ - "$owner" - ] - }, - "refId": "A" - } - ], - "title": "Secrets Detection - Detections", - "transformations": [ - { - "id": "filterByValue", - "options": { - "filters": [ - { - "config": { - "id": "isNotNull", - "options": {} - }, - "fieldName": "timestamp" - } - ], - "match": "any", - "type": "include" - } - }, - { - "id": "groupBy", - "options": { - "fields": { - "id": { - "aggregations": [ - "count" - ], - "operation": "aggregate" - }, - "timestamp": { - "aggregations": [], - "operation": "groupby" - } - } - } - } - ], - "type": "timeseries" - }, { "datasource": { "type": "nullify-grafana-datasource", @@ -1606,8 +1589,8 @@ "gridPos": { "h": 10, "w": 12, - "x": 0, - "y": 40 + "x": 12, + "y": 30 }, "id": 16, "options": { @@ -1795,6 +1778,6 @@ "timezone": "", "title": "Nullify Demo Dashboard", "uid": "ecf0f5c8-bf81-479a-b72f-94b5c2855d04", - "version": 12, + "version": 18, "weekStart": "" } \ No newline at end of file