Create transient config provider, temp dir logic

Allows us to have a new config provider for each setup, with no overlap
of the directories used, and automatic cleanup of those directories.
This commit is contained in:
Sam Chow 2018-06-28 13:45:26 -04:00
parent 2d0a599aab
commit db757edcd2
9 changed files with 70 additions and 37 deletions

View file

@ -212,17 +212,17 @@ angular.module('quay-config').factory('ApiService', ['Restangular', '$q', 'UtilS
var urlPath = path['x-path'];
// Add the operation itself.
apiService[operationName] = function(opt_options, opt_parameters, opt_background, opt_forceget, opt_blobresp) {
apiService[operationName] = function(opt_options, opt_parameters, opt_background, opt_forceget, opt_responseType) {
var one = Restangular.one(buildUrl(urlPath, opt_parameters));
if (opt_background || opt_blobresp) {
if (opt_background || opt_responseType) {
let httpConfig = {};
if (opt_background) {
httpConfig['ignoreLoadingBar'] = true;
}
if (opt_blobresp) {
httpConfig['responseType'] = 'blob';
if (opt_responseType) {
httpConfig['responseType'] = opt_responseType;
}
one.withHttpConfig(httpConfig);