@@ -84,14 +84,26 @@ function OverviewController($scope,
84
84
var label = $filter ( 'label' ) ;
85
85
var getPodTemplate = $filter ( 'podTemplate' ) ;
86
86
87
+ var buildConfigsVersion = APIService . getPreferredVersion ( 'buildconfigs' ) ;
88
+ var buildsVersion = APIService . getPreferredVersion ( 'builds' ) ;
89
+ var clusterResourceQuotasVersion = APIService . getPreferredVersion ( 'appliedclusterresourcequotas' ) ;
90
+ var deploymentConfigsVersion = APIService . getPreferredVersion ( 'deploymentconfigs' ) ;
87
91
var deploymentsVersion = APIService . getPreferredVersion ( 'deployments' ) ;
88
92
var horizontalPodAutoscalersVersion = APIService . getPreferredVersion ( 'horizontalpodautoscalers' ) ;
93
+ var imageStreamsVersion = APIService . getPreferredVersion ( 'imagestreams' ) ;
94
+ var limitRangesVersion = APIService . getPreferredVersion ( 'limitranges' ) ;
95
+ var podsVersion = APIService . getPreferredVersion ( 'pods' ) ;
96
+ var replicaSetsVersion = APIService . getPreferredVersion ( 'replicasets' ) ;
97
+ var replicationControllersVersion = APIService . getPreferredVersion ( 'replicationcontrollers' ) ;
98
+ var resourceQuotasVersion = APIService . getPreferredVersion ( 'resourcequotas' ) ;
99
+ var routesVersion = APIService . getPreferredVersion ( 'routes' ) ;
89
100
var serviceBindingsVersion = APIService . getPreferredVersion ( 'servicebindings' ) ;
90
101
var serviceClassesVersion = APIService . getPreferredVersion ( 'clusterserviceclasses' ) ;
91
102
var serviceInstancesVersion = APIService . getPreferredVersion ( 'serviceinstances' ) ;
92
103
var servicePlansVersion = APIService . getPreferredVersion ( 'clusterserviceplans' ) ;
104
+ var servicesVersion = APIService . getPreferredVersion ( 'services' ) ;
93
105
var statefulSetsVersion = APIService . getPreferredVersion ( 'statefulsets' ) ;
94
- var replicaSetsVersion = APIService . getPreferredVersion ( 'replicasets ' ) ;
106
+ var templatesVersion = APIService . getPreferredVersion ( 'templates ' ) ;
95
107
overview . buildConfigsInstantiateVersion = APIService . getPreferredVersion ( 'buildconfigs/instantiate' ) ;
96
108
97
109
@@ -1206,7 +1218,7 @@ function OverviewController($scope,
1206
1218
context ) ;
1207
1219
} ;
1208
1220
1209
- watches . push ( DataService . watch ( "pods" , context , function ( podsData ) {
1221
+ watches . push ( DataService . watch ( podsVersion , context , function ( podsData ) {
1210
1222
overview . pods = podsData . by ( "metadata.name" ) ;
1211
1223
groupPods ( ) ;
1212
1224
updateReferencedImageStreams ( ) ;
@@ -1218,7 +1230,7 @@ function OverviewController($scope,
1218
1230
Logger . log ( "pods (subscribe)" , overview . pods ) ;
1219
1231
} ) ) ;
1220
1232
1221
- watches . push ( DataService . watch ( "replicationcontrollers" , context , function ( rcData ) {
1233
+ watches . push ( DataService . watch ( replicationControllersVersion , context , function ( rcData ) {
1222
1234
overview . replicationControllers = rcData . by ( "metadata.name" ) ;
1223
1235
groupReplicationControllers ( ) ;
1224
1236
updateServicesForObjects ( overview . vanillaReplicationControllers ) ;
@@ -1230,7 +1242,7 @@ function OverviewController($scope,
1230
1242
Logger . log ( "replicationcontrollers (subscribe)" , overview . replicationControllers ) ;
1231
1243
} ) ) ;
1232
1244
1233
- watches . push ( DataService . watch ( "deploymentconfigs" , context , function ( dcData ) {
1245
+ watches . push ( DataService . watch ( deploymentConfigsVersion , context , function ( dcData ) {
1234
1246
overview . deploymentConfigs = dcData . by ( "metadata.name" ) ;
1235
1247
groupReplicationControllers ( ) ;
1236
1248
updateServicesForObjects ( overview . deploymentConfigs ) ;
@@ -1271,7 +1283,7 @@ function OverviewController($scope,
1271
1283
Logger . log ( "deployments (subscribe)" , overview . deploymentsByUID ) ;
1272
1284
} ) ) ;
1273
1285
1274
- watches . push ( DataService . watch ( "builds" , context , function ( buildData ) {
1286
+ watches . push ( DataService . watch ( buildsVersion , context , function ( buildData ) {
1275
1287
state . builds = buildData . by ( "metadata.name" ) ;
1276
1288
groupBuilds ( ) ;
1277
1289
Logger . log ( "builds (subscribe)" , state . builds ) ;
@@ -1288,19 +1300,19 @@ function OverviewController($scope,
1288
1300
Logger . log ( "statefulsets (subscribe)" , overview . statefulSets ) ;
1289
1301
} , { poll : limitWatches , pollInterval : DEFAULT_POLL_INTERVAL } ) ) ;
1290
1302
1291
- watches . push ( DataService . watch ( "services" , context , function ( serviceData ) {
1303
+ watches . push ( DataService . watch ( servicesVersion , context , function ( serviceData ) {
1292
1304
state . allServices = serviceData . by ( "metadata.name" ) ;
1293
1305
groupServices ( ) ;
1294
1306
Logger . log ( "services (subscribe)" , state . allServices ) ;
1295
1307
} , { poll : limitWatches , pollInterval : DEFAULT_POLL_INTERVAL } ) ) ;
1296
1308
1297
- watches . push ( DataService . watch ( "routes" , context , function ( routesData ) {
1309
+ watches . push ( DataService . watch ( routesVersion , context , function ( routesData ) {
1298
1310
overview . routes = routesData . by ( "metadata.name" ) ;
1299
1311
groupRoutes ( ) ;
1300
1312
Logger . log ( "routes (subscribe)" , overview . routes ) ;
1301
1313
} , { poll : limitWatches , pollInterval : DEFAULT_POLL_INTERVAL } ) ) ;
1302
1314
1303
- watches . push ( DataService . watch ( "buildConfigs" , context , function ( buildConfigData ) {
1315
+ watches . push ( DataService . watch ( buildConfigsVersion , context , function ( buildConfigData ) {
1304
1316
overview . buildConfigs = buildConfigData . by ( "metadata.name" ) ;
1305
1317
groupBuildConfigsByOutputImage ( ) ;
1306
1318
groupBuildConfigsByDeploymentConfig ( ) ;
@@ -1315,7 +1327,7 @@ function OverviewController($scope,
1315
1327
Logger . log ( "autoscalers (subscribe)" , overview . horizontalPodAutoscalers ) ;
1316
1328
} , { poll : limitWatches , pollInterval : DEFAULT_POLL_INTERVAL } ) ) ;
1317
1329
1318
- watches . push ( DataService . watch ( "imagestreams" , context , function ( imageStreamData ) {
1330
+ watches . push ( DataService . watch ( imageStreamsVersion , context , function ( imageStreamData ) {
1319
1331
imageStreams = imageStreamData . by ( "metadata.name" ) ;
1320
1332
ImageStreamResolver . buildDockerRefMapForImageStreams ( imageStreams ,
1321
1333
state . imageStreamImageRefByDockerReference ) ;
@@ -1324,12 +1336,12 @@ function OverviewController($scope,
1324
1336
} , { poll : limitWatches , pollInterval : DEFAULT_POLL_INTERVAL } ) ) ;
1325
1337
1326
1338
// Always poll quotas instead of watching, its not worth the overhead of maintaining websocket connections
1327
- watches . push ( DataService . watch ( 'resourcequotas' , context , function ( quotaData ) {
1339
+ watches . push ( DataService . watch ( resourceQuotasVersion , context , function ( quotaData ) {
1328
1340
state . quotas = quotaData . by ( "metadata.name" ) ;
1329
1341
setQuotaNotifications ( ) ;
1330
1342
} , { poll : true , pollInterval : DEFAULT_POLL_INTERVAL } ) ) ;
1331
1343
1332
- watches . push ( DataService . watch ( 'appliedclusterresourcequotas' , context , function ( clusterQuotaData ) {
1344
+ watches . push ( DataService . watch ( clusterResourceQuotasVersion , context , function ( clusterQuotaData ) {
1333
1345
state . clusterQuotas = clusterQuotaData . by ( "metadata.name" ) ;
1334
1346
setQuotaNotifications ( ) ;
1335
1347
} , { poll : true , pollInterval : DEFAULT_POLL_INTERVAL } ) ) ;
@@ -1425,13 +1437,13 @@ function OverviewController($scope,
1425
1437
1426
1438
// List limit ranges in this project to determine if there is a default
1427
1439
// CPU request for autoscaling.
1428
- DataService . list ( "limitranges" , context , function ( response ) {
1440
+ DataService . list ( limitRangesVersion , context , function ( response ) {
1429
1441
state . limitRanges = response . by ( "metadata.name" ) ;
1430
1442
} ) ;
1431
1443
1432
1444
var samplePipelineTemplate = Constants . SAMPLE_PIPELINE_TEMPLATE ;
1433
1445
if ( samplePipelineTemplate ) {
1434
- DataService . get ( "templates" , samplePipelineTemplate . name , {
1446
+ DataService . get ( templatesVersion , samplePipelineTemplate . name , {
1435
1447
namespace : samplePipelineTemplate . namespace
1436
1448
} , {
1437
1449
errorNotification : false
0 commit comments