@@ -2,15 +2,13 @@ import React from 'react';
2
2
import { Typography , Paper , Box } from '@material-ui/core' ;
3
3
import { ResponsiveBar } from '@nivo/bar' ;
4
4
5
- export default class ReplicaDisplay extends React . Component < { scaledObjectName : string , namespace :string } , { currentReplicas : number ,
6
- dataset : { [ key : string ] : any } [ ] , logs : string } > {
5
+ export default class ReplicaDisplay extends React . Component < { scaledObjectName : string , namespace :string } , { dataset : { [ key : string ] : any } [ ] , logs : string } > {
7
6
private numBarsInGraph :number = 100 ;
8
7
9
8
constructor ( props : { scaledObjectName : string , namespace :string } ) {
10
9
super ( props ) ;
11
10
12
11
this . state = {
13
- currentReplicas : 0 ,
14
12
dataset : [ ] ,
15
13
logs : ""
16
14
}
@@ -74,15 +72,6 @@ export default class ReplicaDisplay extends React.Component<{scaledObjectName: s
74
72
75
73
componentWillUnmount ( ) {
76
74
}
77
-
78
- async getCurrentReplicaCount ( ) {
79
- await fetch ( `/api/namespace/${ this . props . namespace } /deployment/${ this . props . scaledObjectName } ` )
80
- . then ( res => res . json ( ) )
81
- . then ( ( data ) => {
82
- let currentReplicas = ( data . spec ! . replicas === undefined ) ? 0 :data . spec ! . replicas ;
83
- this . setState ( { currentReplicas : currentReplicas } ) ;
84
- } ) ;
85
- }
86
75
87
76
render ( ) {
88
77
@@ -95,20 +84,23 @@ export default class ReplicaDisplay extends React.Component<{scaledObjectName: s
95
84
data = { this . state . dataset }
96
85
keys = { [ this . props . scaledObjectName ] }
97
86
indexBy = "timestamp"
98
- margin = { { top : 20 , right : 0 , bottom : 120 , left : 20 } }
87
+ margin = { { top : 20 , right : 0 , bottom : 20 , left : 20 } }
99
88
padding = { 0.3 }
100
89
colors = { { scheme : 'paired' } }
101
90
axisTop = { null }
102
91
axisRight = { null }
103
- axisBottom = { {
104
- tickSize : 5 ,
105
- tickPadding : 5 ,
106
- tickRotation : 32 ,
107
- tickValues : 1 ,
108
- legend : 'timestamp' ,
109
- legendPosition : 'middle' ,
110
- legendOffset : 92.
111
- } }
92
+ axisBottom = {
93
+ // {
94
+ // tickSize: 5,
95
+ // tickPadding: 5,
96
+ // tickRotation: 32,
97
+ // tickValues: 10,
98
+ // legend: 'timestamp',
99
+ // legendPosition: 'middle',
100
+ // legendOffset: 92
101
+ // }
102
+ null
103
+ }
112
104
axisLeft = { {
113
105
tickSize : 5 ,
114
106
tickPadding : 0 ,
0 commit comments