diff --git a/agent/pkg/status/controller/event/local_root_policy_emitter.go b/agent/pkg/status/controller/event/local_root_policy_emitter.go index ba0d31cac..8e2e56bf5 100644 --- a/agent/pkg/status/controller/event/local_root_policy_emitter.go +++ b/agent/pkg/status/controller/event/local_root_policy_emitter.go @@ -82,7 +82,7 @@ func policyEventPredicate(ctx context.Context, obj client.Object, c client.Clien // get policy policy, err := getInvolvePolicy(ctx, c, evt) if err != nil { - log.Error(err, "failed to get involved policy", "event", evt.Namespace+"/"+evt.Name) + log.Info("failed to get involved policy", "event", evt.Namespace+"/"+evt.Name, "error", err.Error()) return nil, false } return policy, true diff --git a/manager/pkg/statussyncer/syncers/local_policy_compliance_handler.go b/manager/pkg/statussyncer/syncers/local_policy_compliance_handler.go index aa6e779d8..c06e89e78 100644 --- a/manager/pkg/statussyncer/syncers/local_policy_compliance_handler.go +++ b/manager/pkg/statussyncer/syncers/local_policy_compliance_handler.go @@ -92,7 +92,7 @@ func handleCompliance(log logr.Logger, ctx context.Context, evt *cloudevents.Eve // handle pending compliance clusters of the policy pendingCompliances := newLocalCompliances(leafHub, policyID, database.Pending, - eventCompliance.PendingComplianceClusters, complianceClustersFromDB.GetClusters(database.Pending)) + eventCompliance.PendingComplianceClusters, allClustersOnDB) batchLocalCompliances := []models.LocalStatusCompliance{} batchLocalCompliances = append(batchLocalCompliances, compliantCompliances...) diff --git a/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-adhoc-investigation.yaml b/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-adhoc-investigation.yaml index 5b9358283..b15f649b7 100644 --- a/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-adhoc-investigation.yaml +++ b/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-adhoc-investigation.yaml @@ -309,7 +309,7 @@ data: "mode": "absolute", "steps": [ { - "color": "yellow", + "color": "orange", "value": null } ] diff --git a/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-offending-clusters.yaml b/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-offending-clusters.yaml index 018344113..d3144da76 100644 --- a/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-offending-clusters.yaml +++ b/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-offending-clusters.yaml @@ -305,7 +305,7 @@ data: "mode": "absolute", "steps": [ { - "color": "yellow", + "color": "orange", "value": null } ] @@ -789,7 +789,7 @@ data: "type": "table" }, { - "collapsed": true, + "collapsed": false, "gridPos": { "h": 1, "w": 24, @@ -797,174 +797,173 @@ data: "y": 17 }, "id": 64, - "panels": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "P244538DD76A4C61D" + "panels": [], + "title": "Cluster Status > Pending", + "type": "row" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "P244538DD76A4C61D" + }, + "description": "List of pending managed clusters by label: $label.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "description": "List of pending managed clusters by label: $label.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": true, - "inspect": false - }, - "links": [], - "mappings": [], - "noValue": "No data in response", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "yellow", - "value": null - } - ] - }, - "unit": "percentunit", - "unitScale": true + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" }, - "overrides": [ + "filterable": true, + "inspect": false + }, + "links": [], + "mappings": [], + "noValue": "No data in response", + "thresholds": { + "mode": "absolute", + "steps": [ { - "matcher": { - "id": "byName", - "options": "Cluster" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "View What's Changed dashboard for cluster \"${__value.text}\"", - "url": "d/5a3a577af7894943aa6e7ca8408502fb/global-hub-whats-changed-clusters?orgId=1&from=${__value.time}&var-hub=${__data.fields.Hub}&var-cluster=${__value.text}" - } - ] - } - ] - }, + "color": "orange", + "value": null + } + ] + }, + "unit": "percentunit", + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Cluster" + }, + "properties": [ { - "matcher": { - "id": "byName", - "options": "value" - }, - "properties": [ + "id": "links", + "value": [ { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } + "targetBlank": true, + "title": "View What's Changed dashboard for cluster \"${__value.text}\"", + "url": "d/5a3a577af7894943aa6e7ca8408502fb/global-hub-whats-changed-clusters?orgId=1&from=${__value.time}&var-hub=${__data.fields.Hub}&var-cluster=${__value.text}" } ] } ] }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 18 - }, - "id": 56, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false + { + "matcher": { + "id": "byName", + "options": "value" }, - "showHeader": true, - "sortBy": [] + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 56, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "10.3.3", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "P244538DD76A4C61D" }, - "pluginVersion": "10.3.3", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "P244538DD76A4C61D" - }, - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n $__timeGroupAlias(ch.compliance_date, $__interval),\n mc.cluster_name as \"cluster\",\n mc.leaf_hub_name as \"hub\",\n mc.payload -> 'metadata' -> 'labels' ->> '$label' AS \"label\",\n COUNT(CASE WHEN ch.compliance = 'non_compliant' THEN 1 END) AS \"non_compliant\",\n COUNT(CASE WHEN ch.compliance = 'unknown' THEN 1 END) AS \"unknown\",\n COUNT(CASE WHEN ch.compliance = 'pending' THEN 1 END) AS \"pending\",\n COUNT(CASE WHEN ch.compliance = 'compliant' THEN 1 END) AS \"compliant\"\n FROM\n status.managed_clusters mc\n JOIN\n history.local_compliance ch ON mc.cluster_id = ch.cluster_id\n JOIN\n local_spec.policies p ON ch.policy_id = p.policy_id\n WHERE\n $__timeFilter(ch.compliance_date)\n AND\n mc.payload -> 'metadata' -> 'labels' ->> '$label' ${value_query:raw} \n AND\n p.policy_standard ${standard_query:raw} AND p.policy_category ${category_query:raw} AND p.policy_control ${control_query:raw}\n GROUP BY (ch.compliance_date, mc.cluster_name, mc.cluster_id, mc.leaf_hub_name, mc.payload)\n ORDER BY (ch.compliance_date) DESC\n),\nres AS (\n SELECT\n time,\n cluster,\n hub,\n label,\n pending::float / NULLIF((compliant::float + unknown + non_compliant + pending), 0) as \"value\" \n FROM\n data\n WHERE\n non_compliant = 0\n AND\n pending > 0\n)\nSELECT\n *\nFROM\n res\nORDER BY (value) DESC", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "WITH data AS (\n SELECT\n $__timeGroupAlias(ch.compliance_date, $__interval),\n mc.cluster_name as \"cluster\",\n mc.leaf_hub_name as \"hub\",\n mc.payload -> 'metadata' -> 'labels' ->> '$label' AS \"label\",\n COUNT(CASE WHEN ch.compliance = 'non_compliant' THEN 1 END) AS \"non_compliant\",\n COUNT(CASE WHEN ch.compliance = 'unknown' THEN 1 END) AS \"unknown\",\n COUNT(CASE WHEN ch.compliance = 'pending' THEN 1 END) AS \"pending\",\n COUNT(CASE WHEN ch.compliance = 'compliant' THEN 1 END) AS \"compliant\"\n FROM\n status.managed_clusters mc\n JOIN\n history.local_compliance ch ON mc.cluster_id = ch.cluster_id\n JOIN\n local_spec.policies p ON ch.policy_id = p.policy_id\n WHERE\n $__timeFilter(ch.compliance_date)\n AND\n mc.payload -> 'metadata' -> 'labels' ->> '$label' ${value_query:raw} \n AND\n p.policy_standard ${standard_query:raw} AND p.policy_category ${category_query:raw} AND p.policy_control ${control_query:raw}\n GROUP BY (ch.compliance_date, mc.cluster_name, mc.cluster_id, mc.leaf_hub_name, mc.payload)\n ORDER BY (ch.compliance_date) DESC\n),\nres AS (\n SELECT\n time,\n cluster,\n hub,\n label,\n pending::float / NULLIF((compliant::float + unknown + non_compliant + pending), 0) as \"value\" \n FROM\n data\n WHERE\n non_compliant = 0\n AND\n pending > 0\n)\nSELECT\n *\nFROM\n res\nORDER BY (value) DESC", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } + "type": "column" + } + ] ], - "title": "Pending Clusters (By $label)", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": {}, - "renameByName": { - "cluster": "Cluster", - "hub": "Hub", - "name": "Name", - "time": "Time", - "value": "Pending", - "vendor": "Vendor" - } + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" } + ], + "limit": 50 + }, + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" } - ], - "type": "table" + ] } ], - "title": "Cluster Status > Pending", - "type": "row" + "title": "Pending Clusters (By $label)", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "cluster": "Cluster", + "hub": "Hub", + "name": "Name", + "time": "Time", + "value": "Pending", + "vendor": "Vendor" + } + } + } + ], + "type": "table" }, { - "collapsed": true, + "collapsed": false, "datasource": { "type": "postgres", "uid": "P244538DD76A4C61D" @@ -973,199 +972,198 @@ data: "h": 1, "w": 24, "x": 0, - "y": 18 + "y": 26 }, "id": 55, - "panels": [ + "panels": [], + "targets": [ { "datasource": { - "type": "grafana-postgresql-datasource", + "type": "postgres", "uid": "P244538DD76A4C61D" }, - "description": "List of unknown managed clusters by label: $label.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": true, - "inspect": false - }, - "links": [], - "mappings": [], - "noValue": "No data in response", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "yellow", - "value": null - } - ] - }, - "unit": "percentunit", - "unitScale": true + "refId": "A" + } + ], + "title": "Cluster Status > Unknown", + "type": "row" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "P244538DD76A4C61D" + }, + "description": "List of unknown managed clusters by label: $label.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" }, - "overrides": [ + "filterable": true, + "inspect": false + }, + "links": [], + "mappings": [], + "noValue": "No data in response", + "thresholds": { + "mode": "absolute", + "steps": [ { - "matcher": { - "id": "byName", - "options": "Cluster" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "View What's Changed dashboard for cluster \"${__value.text}\"", - "url": "d/5a3a577af7894943aa6e7ca8408502fb/global-hub-whats-changed-clusters?orgId=1&from=${__value.time}&var-hub=${__data.fields.Hub}&var-cluster=${__value.text}" - } - ] - } - ] - }, + "color": "yellow", + "value": null + } + ] + }, + "unit": "percentunit", + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Cluster" + }, + "properties": [ { - "matcher": { - "id": "byName", - "options": "value" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, + "id": "links", + "value": [ { - "id": "mappings", - "value": [ - { - "options": { - "match": "null+nan", - "result": { - "color": "yellow", - "index": 0, - "text": "Unknown" - } - }, - "type": "special" - } - ] + "targetBlank": true, + "title": "View What's Changed dashboard for cluster \"${__value.text}\"", + "url": "d/5a3a577af7894943aa6e7ca8408502fb/global-hub-whats-changed-clusters?orgId=1&from=${__value.time}&var-hub=${__data.fields.Hub}&var-cluster=${__value.text}" } ] } ] }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 63, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false + { + "matcher": { + "id": "byName", + "options": "value" }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.3.3", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "P244538DD76A4C61D" + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n $__timeGroupAlias(ch.compliance_date, $__interval),\n mc.cluster_name as \"cluster\",\n mc.leaf_hub_name as \"hub\",\n mc.payload -> 'metadata' -> 'labels' ->> '$label' AS \"label\",\n COUNT(CASE WHEN ch.compliance = 'non_compliant' THEN 1 END) AS \"non_compliant\",\n COUNT(CASE WHEN ch.compliance = 'unknown' THEN 1 END) AS \"unknown\",\n COUNT(CASE WHEN ch.compliance = 'pending' THEN 1 END) AS \"pending\",\n COUNT(CASE WHEN ch.compliance = 'compliant' THEN 1 END) AS \"compliant\"\n FROM\n status.managed_clusters mc\n JOIN\n history.local_compliance ch ON mc.cluster_id = ch.cluster_id\n JOIN\n local_spec.policies p ON ch.policy_id = p.policy_id\n WHERE\n $__timeFilter(ch.compliance_date)\n AND\n mc.payload -> 'metadata' -> 'labels' ->> '$label' ${value_query:raw} \n AND\n p.policy_standard ${standard_query:raw} AND p.policy_category ${category_query:raw} AND p.policy_control ${control_query:raw}\n GROUP BY (ch.compliance_date, mc.cluster_name, mc.cluster_id, mc.leaf_hub_name, mc.payload)\n ORDER BY (ch.compliance_date) DESC\n),\nres AS (\n SELECT\n time,\n cluster,\n hub,\n label,\n unknown::float / NULLIF((compliant::float + unknown + non_compliant + pending), 0) as \"value\" \n FROM\n data\n WHERE\n non_compliant = 0\n AND \n pending = 0\n AND\n unknown > 0\n)\nSELECT\n *\nFROM\n res\nORDER BY (value) DESC", - "refId": "A", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ + { + "id": "mappings", + "value": [ { - "property": { - "type": "string" + "options": { + "match": "null+nan", + "result": { + "color": "yellow", + "index": 0, + "text": "Unknown" + } }, - "type": "groupBy" + "type": "special" } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Unknown Clusters (By $label)", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": {}, - "renameByName": { - "cluster": "Cluster", - "hub": "Hub", - "name": "Name", - "time": "Time", - "value": "Unknown", - "vendor": "Vendor" - } + ] } - } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 27 + }, + "id": 63, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" ], - "type": "table" - } - ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "10.3.3", "targets": [ { "datasource": { "type": "postgres", "uid": "P244538DD76A4C61D" }, - "refId": "A" + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "WITH data AS (\n SELECT\n $__timeGroupAlias(ch.compliance_date, $__interval),\n mc.cluster_name as \"cluster\",\n mc.leaf_hub_name as \"hub\",\n mc.payload -> 'metadata' -> 'labels' ->> '$label' AS \"label\",\n COUNT(CASE WHEN ch.compliance = 'non_compliant' THEN 1 END) AS \"non_compliant\",\n COUNT(CASE WHEN ch.compliance = 'unknown' THEN 1 END) AS \"unknown\",\n COUNT(CASE WHEN ch.compliance = 'pending' THEN 1 END) AS \"pending\",\n COUNT(CASE WHEN ch.compliance = 'compliant' THEN 1 END) AS \"compliant\"\n FROM\n status.managed_clusters mc\n JOIN\n history.local_compliance ch ON mc.cluster_id = ch.cluster_id\n JOIN\n local_spec.policies p ON ch.policy_id = p.policy_id\n WHERE\n $__timeFilter(ch.compliance_date)\n AND\n mc.payload -> 'metadata' -> 'labels' ->> '$label' ${value_query:raw} \n AND\n p.policy_standard ${standard_query:raw} AND p.policy_category ${category_query:raw} AND p.policy_control ${control_query:raw}\n GROUP BY (ch.compliance_date, mc.cluster_name, mc.cluster_id, mc.leaf_hub_name, mc.payload)\n ORDER BY (ch.compliance_date) DESC\n),\nres AS (\n SELECT\n time,\n cluster,\n hub,\n label,\n unknown::float / NULLIF((compliant::float + unknown + non_compliant + pending), 0) as \"value\" \n FROM\n data\n WHERE\n non_compliant = 0\n AND \n pending = 0\n AND\n unknown > 0\n)\nSELECT\n *\nFROM\n res\nORDER BY (value) DESC", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] } ], - "title": "Cluster Status > Unknown", - "type": "row" + "title": "Unknown Clusters (By $label)", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "cluster": "Cluster", + "hub": "Hub", + "name": "Name", + "time": "Time", + "value": "Unknown", + "vendor": "Vendor" + } + } + } + ], + "type": "table" } ], "refresh": "", diff --git a/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-offending-policies.yaml b/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-offending-policies.yaml index 8d09cd891..d0523bb9b 100644 --- a/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-offending-policies.yaml +++ b/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-offending-policies.yaml @@ -305,7 +305,7 @@ data: "mode": "absolute", "steps": [ { - "color": "yellow", + "color": "orange", "value": null } ] @@ -874,7 +874,7 @@ data: "type": "table" }, { - "collapsed": true, + "collapsed": false, "gridPos": { "h": 1, "w": 24, @@ -882,566 +882,564 @@ data: "y": 16 }, "id": 67, - "panels": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "${datasource}" + "panels": [], + "title": "Policy Status > Pending", + "type": "row" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "${datasource}" + }, + "description": "List of pending managed cluster policies by standard, category, and control.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "description": "List of pending managed cluster policies by standard, category, and control.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": true, - "inspect": false - }, - "links": [], - "mappings": [], - "noValue": "No data in response", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "yellow", - "value": null - } - ] - }, - "unit": "percentunit", - "unitScale": true + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" }, - "overrides": [ + "filterable": true, + "inspect": false + }, + "links": [], + "mappings": [], + "noValue": "No data in response", + "thresholds": { + "mode": "absolute", + "steps": [ { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "View What's Changed dashboard for policy \"${__value.text}\"", - "url": "d/5a3a577af7894943aa6e7ca8408502fa/global-hub-whats-changed-policies?orgId=1&from=${__value.time}&var-hub=${__data.fields.Hub}&var-namespace=${__data.fields.Namespace}&var-policy=${__value.text}" - } - ] - }, - { - "id": "custom.width", - "value": 142 - } - ] - }, + "color": "orange", + "value": null + } + ] + }, + "unit": "percentunit", + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ { - "matcher": { - "id": "byName", - "options": "value" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, + "id": "links", + "value": [ { - "id": "mappings", - "value": [ - { - "options": { - "match": "null+nan", - "result": { - "color": "yellow", - "index": 0, - "text": "Unknown" - } - }, - "type": "special" - } - ] + "targetBlank": true, + "title": "View What's Changed dashboard for policy \"${__value.text}\"", + "url": "d/5a3a577af7894943aa6e7ca8408502fa/global-hub-whats-changed-policies?orgId=1&from=${__value.time}&var-hub=${__data.fields.Hub}&var-namespace=${__data.fields.Namespace}&var-policy=${__value.text}" } ] }, { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "custom.width", - "value": 195 - } - ] - }, + "id": "custom.width", + "value": 142 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "value" + }, + "properties": [ { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 216 - } - ] + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { - "matcher": { - "id": "byName", - "options": "Hub" - }, - "properties": [ + "id": "mappings", + "value": [ { - "id": "custom.width", - "value": 115 + "options": { + "match": "null+nan", + "result": { + "color": "yellow", + "index": 0, + "text": "Unknown" + } + }, + "type": "special" } ] - }, + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ { - "matcher": { - "id": "byName", - "options": "Standard" - }, - "properties": [ - { - "id": "custom.width", - "value": 187 - } - ] - }, + "id": "custom.width", + "value": 195 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ { - "matcher": { - "id": "byName", - "options": "Category" - }, - "properties": [ - { - "id": "custom.width", - "value": 356 - } - ] - }, + "id": "custom.width", + "value": 216 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Hub" + }, + "properties": [ { - "matcher": { - "id": "byName", - "options": "Unknown" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Investigate policy ${__data.fields.Name}", - "url": "d/pAqtIGj4k/global-hub-investigation-help??orgId=1&from=${__value.time}&to=${__value.time}&var-hub=${__data.fields.Hub}&var-namespace=${__data.fields.Namespace}&var-policy=${__data.fields.Name}" - } - ] - } - ] + "id": "custom.width", + "value": 115 } ] }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 9 + { + "matcher": { + "id": "byName", + "options": "Standard" + }, + "properties": [ + { + "id": "custom.width", + "value": 187 + } + ] }, - "id": 57, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false + { + "matcher": { + "id": "byName", + "options": "Category" }, - "showHeader": true + "properties": [ + { + "id": "custom.width", + "value": 356 + } + ] }, - "pluginVersion": "10.3.3", - "targets": [ - { - "datasource": { - "uid": "${datasource}" + { + "matcher": { + "id": "byName", + "options": "Unknown" + }, + "properties": [ + { + "id": "custom.width", + "value": 150 }, - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n ch.compliance_date as \"time\",\n p.policy_name as \"policy\",\n p.payload -> 'metadata' ->> 'namespace' as \"namespace\",\n p.leaf_hub_name as \"hub\",\n p.policy_standard as \"standard\",\n p.policy_category as \"category\",\n p.policy_control as \"control\",\n COUNT(CASE WHEN ch.compliance = 'non_compliant' THEN 1 END) AS \"non_compliant\",\n COUNT(CASE WHEN ch.compliance = 'unknown' THEN 1 END) AS \"unknown\",\n COUNT(CASE WHEN ch.compliance = 'pending' THEN 1 END) AS \"pending\",\n COUNT(CASE WHEN ch.compliance = 'compliant' THEN 1 END) AS \"compliant\"\n FROM\n local_spec.policies p\n JOIN\n history.local_compliance ch ON p.policy_id = ch.policy_id\n WHERE\n $__timeFilter(ch.compliance_date)\n AND\n p.policy_standard ${standard_query:raw} AND p.policy_category ${category_query:raw} AND p.policy_control ${control_query:raw}\n AND\n ch.cluster_id IS NOT NULL\n GROUP BY (ch.compliance_date, p.policy_name, p.policy_id, p.payload -> 'metadata' ->> 'namespace', p.policy_standard, p.policy_category, p.policy_control, p.leaf_hub_name)\n),\nres as (\n SELECT\n time,\n policy,\n namespace,\n hub,\n standard,\n category,\n control,\n pending::float / NULLIF((compliant::float + unknown + non_compliant + pending), 0) as \"value\"\n FROM\n data\n WHERE\n non_compliant = 0 \n AND\n pending > 0\n)\nSELECT\n *\nFROM\n res\nORDER BY (time, value) DESC\n", - "refId": "A", - "select": [ - [ + { + "id": "links", + "value": [ { - "params": [ - "value" - ], - "type": "column" + "targetBlank": true, + "title": "Investigate policy ${__data.fields.Name}", + "url": "d/pAqtIGj4k/global-hub-investigation-help??orgId=1&from=${__value.time}&to=${__value.time}&var-hub=${__data.fields.Hub}&var-namespace=${__data.fields.Namespace}&var-policy=${__data.fields.Name}" } ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Pending Policies", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": {}, - "includeByName": {}, - "indexByName": {}, - "renameByName": { - "category": "Category", - "control": "Control", - "hub": "Hub", - "namespace": "Namespace", - "policy": "Name", - "severity": "Severity", - "standard": "Standard", - "time": "Time", - "value": "Pending" - } } - } - ], - "type": "table" - } - ], - "title": "Policy Status > Pending", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "type": "postgres", - "uid": "P244538DD76A4C61D" + ] + } + ] }, "gridPos": { - "h": 1, + "h": 8, "w": 24, "x": 0, "y": 17 }, - "id": 56, - "panels": [ + "id": 57, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.3.3", + "targets": [ { "datasource": { - "type": "grafana-postgresql-datasource", "uid": "${datasource}" }, - "description": "List of unknown managed cluster policies by standard, category, and control.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": true, - "inspect": false - }, - "links": [], - "mappings": [], - "noValue": "No data in response", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "yellow", - "value": null - } - ] - }, - "unit": "percentunit", - "unitScale": true - }, - "overrides": [ + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "WITH data AS (\n SELECT\n ch.compliance_date as \"time\",\n p.policy_name as \"policy\",\n p.payload -> 'metadata' ->> 'namespace' as \"namespace\",\n p.leaf_hub_name as \"hub\",\n p.policy_standard as \"standard\",\n p.policy_category as \"category\",\n p.policy_control as \"control\",\n COUNT(CASE WHEN ch.compliance = 'non_compliant' THEN 1 END) AS \"non_compliant\",\n COUNT(CASE WHEN ch.compliance = 'unknown' THEN 1 END) AS \"unknown\",\n COUNT(CASE WHEN ch.compliance = 'pending' THEN 1 END) AS \"pending\",\n COUNT(CASE WHEN ch.compliance = 'compliant' THEN 1 END) AS \"compliant\"\n FROM\n local_spec.policies p\n JOIN\n history.local_compliance ch ON p.policy_id = ch.policy_id\n WHERE\n $__timeFilter(ch.compliance_date)\n AND\n p.policy_standard ${standard_query:raw} AND p.policy_category ${category_query:raw} AND p.policy_control ${control_query:raw}\n AND\n ch.cluster_id IS NOT NULL\n GROUP BY (ch.compliance_date, p.policy_name, p.policy_id, p.payload -> 'metadata' ->> 'namespace', p.policy_standard, p.policy_category, p.policy_control, p.leaf_hub_name)\n),\nres as (\n SELECT\n time,\n policy,\n namespace,\n hub,\n standard,\n category,\n control,\n pending::float / NULLIF((compliant::float + unknown + non_compliant + pending), 0) as \"value\"\n FROM\n data\n WHERE\n non_compliant = 0 \n AND\n pending > 0\n)\nSELECT\n *\nFROM\n res\nORDER BY (time, value) DESC\n", + "refId": "A", + "select": [ + [ { - "matcher": { - "id": "byName", - "options": "Name" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "View What's Changed dashboard for policy \"${__value.text}\"", - "url": "d/5a3a577af7894943aa6e7ca8408502fa/global-hub-whats-changed-policies?orgId=1&from=${__value.time}&var-hub=${__data.fields.Hub}&var-namespace=${__data.fields.Namespace}&var-policy=${__value.text}" - } - ] - }, - { - "id": "custom.width", - "value": 142 - } - ] - }, + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ { - "matcher": { - "id": "byName", - "options": "value" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "color-background" - } - }, - { - "id": "mappings", - "value": [ - { - "options": { - "match": "null+nan", - "result": { - "color": "yellow", - "index": 0, - "text": "Unknown" - } - }, - "type": "special" - } - ] - } - ] - }, + "parameters": [], + "type": "function" + } + ], + "groupBy": [ { - "matcher": { - "id": "byName", - "options": "Time" + "property": { + "type": "string" }, - "properties": [ - { - "id": "custom.width", - "value": 195 - } - ] - }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Pending Policies", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": {}, + "includeByName": {}, + "indexByName": {}, + "renameByName": { + "category": "Category", + "control": "Control", + "hub": "Hub", + "namespace": "Namespace", + "policy": "Name", + "severity": "Severity", + "standard": "Standard", + "time": "Time", + "value": "Pending" + } + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": { + "type": "postgres", + "uid": "P244538DD76A4C61D" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 56, + "panels": [], + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "P244538DD76A4C61D" + }, + "refId": "A" + } + ], + "title": "Policy Status > Unknown", + "type": "row" + }, + { + "datasource": { + "type": "grafana-postgresql-datasource", + "uid": "${datasource}" + }, + "description": "List of unknown managed cluster policies by standard, category, and control.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "links": [], + "mappings": [], + "noValue": "No data in response", + "thresholds": { + "mode": "absolute", + "steps": [ { - "matcher": { - "id": "byName", - "options": "Namespace" - }, - "properties": [ - { - "id": "custom.width", - "value": 216 - } - ] - }, + "color": "yellow", + "value": null + } + ] + }, + "unit": "percentunit", + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Name" + }, + "properties": [ { - "matcher": { - "id": "byName", - "options": "Hub" - }, - "properties": [ + "id": "links", + "value": [ { - "id": "custom.width", - "value": 115 + "targetBlank": true, + "title": "View What's Changed dashboard for policy \"${__value.text}\"", + "url": "d/5a3a577af7894943aa6e7ca8408502fa/global-hub-whats-changed-policies?orgId=1&from=${__value.time}&var-hub=${__data.fields.Hub}&var-namespace=${__data.fields.Namespace}&var-policy=${__value.text}" } ] }, { - "matcher": { - "id": "byName", - "options": "Standard" - }, - "properties": [ - { - "id": "custom.width", - "value": 187 - } - ] - }, + "id": "custom.width", + "value": 142 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "value" + }, + "properties": [ { - "matcher": { - "id": "byName", - "options": "Category" - }, - "properties": [ - { - "id": "custom.width", - "value": 356 - } - ] + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { - "matcher": { - "id": "byName", - "options": "Unknown" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, + "id": "mappings", + "value": [ { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Investigate policy ${__data.fields.Name}", - "url": "d/pAqtIGj4k/global-hub-investigation-help??orgId=1&from=${__value.time}&to=${__value.time}&var-hub=${__data.fields.Hub}&var-namespace=${__data.fields.Namespace}&var-policy=${__data.fields.Name}" + "options": { + "match": "null+nan", + "result": { + "color": "yellow", + "index": 0, + "text": "Unknown" } - ] + }, + "type": "special" } ] } ] }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 10 + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.width", + "value": 195 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": 216 + } + ] }, - "id": 66, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false + { + "matcher": { + "id": "byName", + "options": "Hub" + }, + "properties": [ + { + "id": "custom.width", + "value": 115 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Standard" }, - "showHeader": true + "properties": [ + { + "id": "custom.width", + "value": 187 + } + ] }, - "pluginVersion": "10.3.3", - "targets": [ - { - "datasource": { - "uid": "${datasource}" + { + "matcher": { + "id": "byName", + "options": "Category" + }, + "properties": [ + { + "id": "custom.width", + "value": 356 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Unknown" + }, + "properties": [ + { + "id": "custom.width", + "value": 150 }, - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n ch.compliance_date as \"time\",\n p.policy_name as \"policy\",\n p.payload -> 'metadata' ->> 'namespace' as \"namespace\",\n p.leaf_hub_name as \"hub\",\n p.policy_standard as \"standard\",\n p.policy_category as \"category\",\n p.policy_control as \"control\",\n COUNT(CASE WHEN ch.compliance = 'non_compliant' THEN 1 END) AS \"non_compliant\",\n COUNT(CASE WHEN ch.compliance = 'unknown' THEN 1 END) AS \"unknown\",\n COUNT(CASE WHEN ch.compliance = 'pending' THEN 1 END) AS \"pending\",\n COUNT(CASE WHEN ch.compliance = 'compliant' THEN 1 END) AS \"compliant\"\n FROM\n local_spec.policies p\n JOIN\n history.local_compliance ch ON p.policy_id = ch.policy_id\n WHERE\n $__timeFilter(ch.compliance_date)\n AND\n p.policy_standard ${standard_query:raw} AND p.policy_category ${category_query:raw} AND p.policy_control ${control_query:raw}\n AND\n ch.cluster_id IS NOT NULL\n GROUP BY (ch.compliance_date, p.policy_name, p.policy_id, p.payload -> 'metadata' ->> 'namespace', p.policy_standard, p.policy_category, p.policy_control, p.leaf_hub_name)\n),\nres as (\n SELECT\n time,\n policy,\n namespace,\n hub,\n standard,\n category,\n control,\n unknown::float / NULLIF((compliant::float + unknown + non_compliant + pending), 0) as \"value\"\n FROM\n data\n WHERE\n non_compliant = 0 \n AND\n pending = 0\n AND\n unknown > 0\n)\nSELECT\n *\nFROM\n res\nORDER BY (time, value) DESC\n", - "refId": "A", - "select": [ - [ + { + "id": "links", + "value": [ { - "params": [ - "value" - ], - "type": "column" + "targetBlank": true, + "title": "Investigate policy ${__data.fields.Name}", + "url": "d/pAqtIGj4k/global-hub-investigation-help??orgId=1&from=${__value.time}&to=${__value.time}&var-hub=${__data.fields.Hub}&var-namespace=${__data.fields.Namespace}&var-policy=${__data.fields.Name}" } ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 66, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.3.3", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "WITH data AS (\n SELECT\n ch.compliance_date as \"time\",\n p.policy_name as \"policy\",\n p.payload -> 'metadata' ->> 'namespace' as \"namespace\",\n p.leaf_hub_name as \"hub\",\n p.policy_standard as \"standard\",\n p.policy_category as \"category\",\n p.policy_control as \"control\",\n COUNT(CASE WHEN ch.compliance = 'non_compliant' THEN 1 END) AS \"non_compliant\",\n COUNT(CASE WHEN ch.compliance = 'unknown' THEN 1 END) AS \"unknown\",\n COUNT(CASE WHEN ch.compliance = 'pending' THEN 1 END) AS \"pending\",\n COUNT(CASE WHEN ch.compliance = 'compliant' THEN 1 END) AS \"compliant\"\n FROM\n local_spec.policies p\n JOIN\n history.local_compliance ch ON p.policy_id = ch.policy_id\n WHERE\n $__timeFilter(ch.compliance_date)\n AND\n p.policy_standard ${standard_query:raw} AND p.policy_category ${category_query:raw} AND p.policy_control ${control_query:raw}\n AND\n ch.cluster_id IS NOT NULL\n GROUP BY (ch.compliance_date, p.policy_name, p.policy_id, p.payload -> 'metadata' ->> 'namespace', p.policy_standard, p.policy_category, p.policy_control, p.leaf_hub_name)\n),\nres as (\n SELECT\n time,\n policy,\n namespace,\n hub,\n standard,\n category,\n control,\n unknown::float / NULLIF((compliant::float + unknown + non_compliant + pending), 0) as \"value\"\n FROM\n data\n WHERE\n non_compliant = 0 \n AND\n pending = 0\n AND\n unknown > 0\n)\nSELECT\n *\nFROM\n res\nORDER BY (time, value) DESC\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } + "type": "column" + } + ] ], - "title": "Unknown Policies", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": {}, - "renameByName": { - "category": "Category", - "control": "Control", - "hub": "Hub", - "namespace": "Namespace", - "policy": "Name", - "severity": "Severity", - "standard": "Standard", - "time": "Time", - "value": "Unknown" - } + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" } + ], + "limit": 50 + }, + "timeColumn": "time", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" } - ], - "type": "table" + ] } ], - "targets": [ + "title": "Unknown Policies", + "transformations": [ { - "datasource": { - "type": "postgres", - "uid": "P244538DD76A4C61D" - }, - "refId": "A" + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "category": "Category", + "control": "Control", + "hub": "Hub", + "namespace": "Namespace", + "policy": "Name", + "severity": "Severity", + "standard": "Standard", + "time": "Time", + "value": "Unknown" + } + } } ], - "title": "Policy Status > Unknown", - "type": "row" + "type": "table" } ], "refresh": "", diff --git a/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-overview.yaml b/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-overview.yaml index c5a612df5..205a37963 100644 --- a/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-overview.yaml +++ b/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-overview.yaml @@ -260,7 +260,7 @@ data: "text": "Not Compliant" }, "pending": { - "color": "yellow", + "color": "orange", "index": 3, "text": "Pending" }, @@ -576,7 +576,7 @@ data: "text": "Not Compliant" }, "pending": { - "color": "yellow", + "color": "orange", "index": 3, "text": "Pending" }, diff --git a/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-whats-changed-clusters.yaml b/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-whats-changed-clusters.yaml index 422a980f1..aa666210a 100644 --- a/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-whats-changed-clusters.yaml +++ b/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-whats-changed-clusters.yaml @@ -70,15 +70,20 @@ data: "options": { "0": { "color": "green", - "index": 2, + "index": 3, "text": "Compliant" }, "1": { "color": "yellow", - "index": 1, + "index": 2, "text": "Unknown" }, "2": { + "color": "orange", + "index": 1, + "text": "Pending" + }, + "3": { "color": "red", "index": 0, "text": "NonCompliant" @@ -436,6 +441,11 @@ data: "color": "red", "index": 1, "text": "false" + }, + "pending": { + "color": "orange", + "index": 2, + "text": "pending" } }, "type": "value" @@ -750,9 +760,10 @@ data: }, { "current": { + "isNone": true, "selected": false, - "text": "managed-c1", - "value": "managed-c1" + "text": "None", + "value": "" }, "datasource": { "type": "postgres", @@ -846,8 +857,8 @@ data: { "current": { "selected": false, - "text": "5", - "value": "5" + "text": "0", + "value": "0" }, "datasource": { "type": "postgres", @@ -870,8 +881,8 @@ data: { "current": { "selected": false, - "text": "1", - "value": "1" + "text": "-4", + "value": "-4" }, "datasource": { "type": "postgres", @@ -892,9 +903,10 @@ data: }, { "current": { + "isNone": true, "selected": false, - "text": "https://console-openshift-console.apps.obs-hub-of-hubs-aws-414-sno-t55kq.scale.red-chesterfield.com", - "value": "https://console-openshift-console.apps.obs-hub-of-hubs-aws-414-sno-t55kq.scale.red-chesterfield.com" + "text": "None", + "value": "" }, "datasource": { "type": "postgres", @@ -972,8 +984,8 @@ data: { "current": { "selected": false, - "text": " in ('policy-1','te-un1','po-pending','po-pending-1','po-4') ", - "value": " in ('policy-1','te-un1','po-pending','po-pending-1','po-4') " + "text": " is null ", + "value": " is null " }, "datasource": { "type": "postgres", @@ -995,8 +1007,8 @@ data: { "current": { "selected": false, - "text": " in ('open-cluster-management-global-set') ", - "value": " in ('open-cluster-management-global-set') " + "text": " is null ", + "value": " is null " }, "datasource": { "type": "postgres", diff --git a/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-whats-changed-policies.yaml b/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-whats-changed-policies.yaml index 5de63a6d0..e16b5f476 100644 --- a/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-whats-changed-policies.yaml +++ b/operator/pkg/controllers/hubofhubs/manifests/grafana/acm-global-whats-changed-policies.yaml @@ -70,16 +70,21 @@ data: "options": { "0": { "color": "green", - "index": 2, + "index": 3, "text": "Compliant" }, "1": { "color": "yellow", - "index": 1, + "index": 2, "text": "Unknown" }, "2": { - "color": "semi-dark-red", + "color": "orange", + "index": 1, + "text": "Pending" + }, + "3": { + "color": "red", "index": 0, "text": "NonCompliant" } @@ -434,6 +439,11 @@ data: "color": "red", "index": 1, "text": "false" + }, + "pending": { + "color": "orange", + "index": 2, + "text": "pending" } }, "type": "value"