|
@@ -123,8 +123,11 @@ const Metrics: React.FC = () => {
|
|
|
}, []);
|
|
}, []);
|
|
|
|
|
|
|
|
const renderMetricsSettings = () => {
|
|
const renderMetricsSettings = () => {
|
|
|
- if (showMetricsSettings && true) {
|
|
|
|
|
- if (selectedMetric == "nginx:errors") {
|
|
|
|
|
|
|
+ if (showMetricsSettings) {
|
|
|
|
|
+ if (
|
|
|
|
|
+ selectedMetric == "nginx:errors" ||
|
|
|
|
|
+ selectedMetric == "nginx:latency"
|
|
|
|
|
+ ) {
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
|
<DropdownOverlay onClick={() => setShowMetricsSettings(false)} />
|
|
<DropdownOverlay onClick={() => setShowMetricsSettings(false)} />
|
|
@@ -193,11 +196,7 @@ const Metrics: React.FC = () => {
|
|
|
|
|
|
|
|
let podNames = [] as string[];
|
|
let podNames = [] as string[];
|
|
|
|
|
|
|
|
- if (selectedMetric == "nginx:errors") {
|
|
|
|
|
- podNames = [selectedIngress?.name];
|
|
|
|
|
- namespace = selectedIngress?.namespace || "default";
|
|
|
|
|
- shouldsum = false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ podNames = [selectedIngress?.name];
|
|
|
|
|
|
|
|
setIsLoading((prev) => prev + 1);
|
|
setIsLoading((prev) => prev + 1);
|
|
|
setData([]);
|
|
setData([]);
|
|
@@ -207,13 +206,14 @@ const Metrics: React.FC = () => {
|
|
|
{
|
|
{
|
|
|
cluster_id: currentCluster.id,
|
|
cluster_id: currentCluster.id,
|
|
|
metric: selectedMetric,
|
|
metric: selectedMetric,
|
|
|
- shouldsum: selectedMetric == "nginx:errors",
|
|
|
|
|
|
|
+ shouldsum: false,
|
|
|
kind: "Ingress",
|
|
kind: "Ingress",
|
|
|
- namespace: selectedIngress.namespace,
|
|
|
|
|
|
|
+ namespace: selectedIngress?.namespace || "default",
|
|
|
startrange: start,
|
|
startrange: start,
|
|
|
endrange: end,
|
|
endrange: end,
|
|
|
resolution: resolutions[selectedRange],
|
|
resolution: resolutions[selectedRange],
|
|
|
pods: podNames,
|
|
pods: podNames,
|
|
|
|
|
+ name: selectedIngress?.name,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
id: currentProject.id,
|
|
id: currentProject.id,
|