Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request v1beta1/PartialObjectMetadataList #322

Merged
merged 1 commit into from
Apr 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions dist/origin-web-common-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -1842,14 +1842,8 @@ angular.module('openshiftCommonServices')
angular.module('openshiftCommonServices')
.factory('DataService', function($cacheFactory, $http, $ws, $rootScope, $q, API_CFG, APIService, Logger, $timeout, base64, base64util) {

// Accept PartialObjectMetadataList. Unfortunately we can't use the Accept
// header to fallback to JSON due to an API server content negotiation bug.
// https://github.com/kubernetes/kubernetes/issues/50519
//
// This is a potential version skew issue for when the web console runs in
// a pod where we potentially need to support different server versions.
// https://trello.com/c/9oaUh8xP
var ACCEPT_PARTIAL_OBJECT_METADATA_LIST = 'application/json;as=PartialObjectMetadataList;v=v1alpha1;g=meta.k8s.io';
// This will request just a list of the object metadata, falling back to application/json if needed.
var ACCEPT_PARTIAL_OBJECT_METADATA_LIST = 'application/json;as=PartialObjectMetadataList;v=v1beta1;g=meta.k8s.io,application/json';

function Data(array) {
this._data = {};
Expand Down
10 changes: 2 additions & 8 deletions dist/origin-web-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -3160,14 +3160,8 @@ angular.module('openshiftCommonServices')
angular.module('openshiftCommonServices')
.factory('DataService', ["$cacheFactory", "$http", "$ws", "$rootScope", "$q", "API_CFG", "APIService", "Logger", "$timeout", "base64", "base64util", function($cacheFactory, $http, $ws, $rootScope, $q, API_CFG, APIService, Logger, $timeout, base64, base64util) {

// Accept PartialObjectMetadataList. Unfortunately we can't use the Accept
// header to fallback to JSON due to an API server content negotiation bug.
// https://github.com/kubernetes/kubernetes/issues/50519
//
// This is a potential version skew issue for when the web console runs in
// a pod where we potentially need to support different server versions.
// https://trello.com/c/9oaUh8xP
var ACCEPT_PARTIAL_OBJECT_METADATA_LIST = 'application/json;as=PartialObjectMetadataList;v=v1alpha1;g=meta.k8s.io';
// This will request just a list of the object metadata, falling back to application/json if needed.
var ACCEPT_PARTIAL_OBJECT_METADATA_LIST = 'application/json;as=PartialObjectMetadataList;v=v1beta1;g=meta.k8s.io,application/json';

function Data(array) {
this._data = {};
Expand Down
4 changes: 2 additions & 2 deletions dist/origin-web-common.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -1759,13 +1759,13 @@ f.prototype._uniqueKey = function(e, t, n, r) {
var o, i = n && n.namespace || _.get(n, "project.metadata.name") || n.projectName, a = _.get(r, "http.params"), s = this._urlForResource(e, t, n, null, angular.extend({}, {}, {
namespace: i
}));
return o = s ? s.toString() : e || "<unknown>", o += w(a || {}), _.get(r, "partialObjectMetadataList") ? o + "#application/json;as=PartialObjectMetadataList;v=v1alpha1;g=meta.k8s.io" : o;
return o = s ? s.toString() : e || "<unknown>", o += w(a || {}), _.get(r, "partialObjectMetadataList") ? o + "#application/json;as=PartialObjectMetadataList;v=v1beta1;g=meta.k8s.io,application/json" : o;
}, f.prototype._startListOp = function(e, n, r) {
r = r || {};
var o = _.get(r, "http.params") || {}, i = this._uniqueKey(e, null, n, r);
this._listInFlight(i, !0);
var a = {};
r.partialObjectMetadataList && (a.Accept = "application/json;as=PartialObjectMetadataList;v=v1alpha1;g=meta.k8s.io");
r.partialObjectMetadataList && (a.Accept = "application/json;as=PartialObjectMetadataList;v=v1beta1;g=meta.k8s.io,application/json");
var s, c = this;
if (n.projectPromise && !e.equals("projects")) n.projectPromise.done(function(l) {
if (!(s = c._urlForResource(e, null, n, !1, _.assign({}, o, {
Expand Down
10 changes: 2 additions & 8 deletions src/services/dataService.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,8 @@
angular.module('openshiftCommonServices')
.factory('DataService', function($cacheFactory, $http, $ws, $rootScope, $q, API_CFG, APIService, Logger, $timeout, base64, base64util) {

// Accept PartialObjectMetadataList. Unfortunately we can't use the Accept
// header to fallback to JSON due to an API server content negotiation bug.
// https://github.com/kubernetes/kubernetes/issues/50519
//
// This is a potential version skew issue for when the web console runs in
// a pod where we potentially need to support different server versions.
// https://trello.com/c/9oaUh8xP
var ACCEPT_PARTIAL_OBJECT_METADATA_LIST = 'application/json;as=PartialObjectMetadataList;v=v1alpha1;g=meta.k8s.io';
// This will request just a list of the object metadata, falling back to application/json if needed.
var ACCEPT_PARTIAL_OBJECT_METADATA_LIST = 'application/json;as=PartialObjectMetadataList;v=v1beta1;g=meta.k8s.io,application/json';

function Data(array) {
this._data = {};
Expand Down