diff options
Diffstat (limited to 'ecomp-portal-FE-common/client/app/services/widgets-catalog')
-rw-r--r-- | ecomp-portal-FE-common/client/app/services/widgets-catalog/widgets-catalog.service.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ecomp-portal-FE-common/client/app/services/widgets-catalog/widgets-catalog.service.js b/ecomp-portal-FE-common/client/app/services/widgets-catalog/widgets-catalog.service.js index f7e5a476..0a3946bd 100644 --- a/ecomp-portal-FE-common/client/app/services/widgets-catalog/widgets-catalog.service.js +++ b/ecomp-portal-FE-common/client/app/services/widgets-catalog/widgets-catalog.service.js @@ -96,6 +96,29 @@ }); return deferred.promise; } + getUploadFlag() { + let deferred = this.$q.defer(); + let url = this.conf.api.widgetCommon + '/uploadFlag'; + this.$http({ + method: "GET", + url: url, + cache: false, + headers: { + 'X-Widgets-Type': 'all', + 'X-ECOMP-RequestID':this.uuid.generate() + } + }).then(res => { + if (res == null || res.data == null) { + deferred.reject("WidgetsCatalogService::getUploadFlag Failed"); + } else { + deferred.resolve(res.data); + } + }) + .catch(status => { + deferred.reject(status); + }); + return deferred.promise; + } createWidget(newWidget, file) { console.log(newWidget); |