Remove unused v1beta2 references from web ui

This commit is contained in:
BC Broussard
2015-06-04 00:19:06 -07:00
parent 1590403949
commit 0ec8b9b665
16 changed files with 76 additions and 218 deletions

View File

@@ -1,49 +1,4 @@
app.provider('k8sApi',
function() {
var urlBase = '';
this.setUrlBase = function(value) { urlBase = value; };
var _get = function($http, baseUrl, query) {
var _fullUrl = baseUrl;
if (query !== undefined) {
_fullUrl += '/' + query;
}
return $http.get(_fullUrl);
};
this.$get = function($http, $q) {
var api = {};
api.getUrlBase = function() { return urlBase; };
api.getPods = function(query) { return _get($http, urlBase + '/pods', query); };
api.getMinions = function(query) { return _get($http, urlBase + '/nodes', query); };
api.getNodes = api.getMinions;
api.getServices = function(query) { return _get($http, urlBase + '/services', query); };
api.getReplicationControllers = function(query) {
return _get($http, urlBase + '/replicationControllers', query)
};
api.getEvents = function(query) { return _get($http, urlBase + '/events', query); };
return api;
};
})
.config(function(k8sApiProvider, ENV) {
if (ENV && ENV['/'] && ENV['/']['k8sApiServer']) {
var proxy = ENV['/']['cAdvisorProxy'] || '';
k8sApiProvider.setUrlBase(proxy + ENV['/']['k8sApiServer']);
}
});
app.provider('k8sv1Beta3Api',
function() {
var urlBase = '';
@@ -86,9 +41,8 @@ app.provider('k8sv1Beta3Api',
return api;
};
})
.config(function(k8sv1Beta3ApiProvider, ENV) {
if (ENV && ENV['/'] && ENV['/']['k8sApiv1beta3Server']) {
var proxy = ENV['/']['cAdvisorProxy'] || '';
k8sv1Beta3ApiProvider.setUrlBase(proxy + ENV['/']['k8sApiv1beta3Server']);
.config(function(k8sApiProvider, ENV) {
if (ENV && ENV['/'] && ENV['/']['k8sApiServer']) {
k8sApiProvider.setUrlBase(ENV['/']['k8sApiServer']);
}
});