Skip to content

Commit

Permalink
Merge pull request #5394 from vikram-raj/odc-3612
Browse files Browse the repository at this point in the history
Bug 1834455: match available queries on dashboards and metrics tabs
  • Loading branch information
openshift-merge-robot committed May 14, 2020
2 parents 21a1261 + 4ce5b65 commit ab09154
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions frontend/packages/dev-console/src/components/monitoring/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export const metricsQuery = {
PODS_BY_FILESYSTEM: 'Filesystem Usage',
PODS_BY_NETWORK_IN: 'Receive Bandwidth',
PODS_BY_NETWORK_OUT: 'Transmit Bandwidth',
RATE_OF_RECEIVED_PACKETS: 'Rate of Received Packets',
RATE_OF_TRANSMITTED_PACKETS: 'Rate of Transmitted Packets',
RATE_OF_RECEIVED_PACKETS_DROPPED: 'Rate of Received Packets Dropped',
RATE_OF_TRANSMITTED_PACKETS_DROPPED: 'Rate of Transmitted Packets Dropped',
};

export const monitoringDashboardQueries: MonitoringQuery[] = [
Expand Down Expand Up @@ -218,6 +222,10 @@ const topMetricsQueries = {
),
PODS_BY_NETWORK_IN: getMetricsQuery('Receive Bandwidth'),
PODS_BY_NETWORK_OUT: getMetricsQuery('Transmit Bandwidth'),
RATE_OF_RECEIVED_PACKETS: getMetricsQuery('Rate of Received Packets'),
RATE_OF_TRANSMITTED_PACKETS: getMetricsQuery('Rate of Transmitted Packets'),
RATE_OF_RECEIVED_PACKETS_DROPPED: getMetricsQuery('Rate of Received Packets Dropped'),
RATE_OF_TRANSMITTED_PACKETS_DROPPED: getMetricsQuery('Rate of Transmitted Packets Dropped'),
};

export const getTopMetricsQueries = (namespace: string) => ({
Expand All @@ -232,4 +240,20 @@ export const getTopMetricsQueries = (namespace: string) => ({
[metricsQuery.PODS_BY_NETWORK_OUT]: topMetricsQueries.PODS_BY_NETWORK_OUT({
namespace,
}),
[metricsQuery.RATE_OF_RECEIVED_PACKETS]: topMetricsQueries.RATE_OF_RECEIVED_PACKETS({
namespace,
}),
[metricsQuery.RATE_OF_TRANSMITTED_PACKETS]: topMetricsQueries.RATE_OF_TRANSMITTED_PACKETS({
namespace,
}),
[metricsQuery.RATE_OF_RECEIVED_PACKETS_DROPPED]: topMetricsQueries.RATE_OF_RECEIVED_PACKETS_DROPPED(
{
namespace,
},
),
[metricsQuery.RATE_OF_TRANSMITTED_PACKETS_DROPPED]: topMetricsQueries.RATE_OF_TRANSMITTED_PACKETS_DROPPED(
{
namespace,
},
),
});

0 comments on commit ab09154

Please sign in to comment.