UNPKG

graphdb-workbench

Version:
2 lines 3.26 kB
export const __webpack_id__=46570;export const __webpack_ids__=[46570];export const __webpack_modules__={46570:(e,t,n)=>{function s(e,t,n,s,i){e.supportsStatistics=!0,e.settings={statistics:!1},e.getSettings=function(){e.loader=!0,s.getStatistics().then(function(t){e.settings.statistics="true"===t.data,e.supportsStatistics=!0},function(n){if(404===n.status)e.supportsStatistics=!1;else{const e=getError(n.data);t.error(e,i.instant("error.getting.settings"))}})},e.getSettings(),e.setSettings=function(){e.loader=!0,s.toggleStatistics(e.settings.statistics).then(function(){n.close(),t.success(i.instant("saving.settings.success"))},function(e){const n=getError(e.data);t.error(n,i.instant("saving.settings.error"))})},e.submitForm=function(){e.setSettings()},e.cancel=function(){n.dismiss("cancel")}}function i(e,t,n,s,i,c,r,o){e.loadingLicense=function(){return n.loadingLicense()},n.checkLicenseStatus(),e.removeLicense=function(){c.openSimpleModal({title:r.instant("confirm.operation"),message:r.instant("remove.license.warning.msg"),warning:!0}).result.then(function(){t.unregisterLicense().success(function(){n.checkLicenseStatus().then(()=>o.applyTrackingConsent()).catch(e=>{const t=getError(e.data,e.status);s.error(t,r.instant("common.error"))})})})}}function c(e,t,n,s,i,c,r,o){e.$on("securityInit",function(){r.isAdmin()||n.path("/license")}),e.sendLicenseToValidateAndActivate=l;const a=$(".license-textarea");function l(e){t.sendLicenseToValidate(e).success(function(n){n.present?(a.val(e),function(e,n){s.open({templateUrl:"js/angular/settings/modal/validate-license.html",controller:"ValidateLicenseModalCtrl",size:"lg",resolve:{license:function(){return e}}}).result.then(function(){!function(e){if(e||(e=a.val()),e){const n=atob(e.replace(/\s/g,""));t.registerLicense(n).success(function(){c.history.back()}).error(function(e){i.error(e,o.instant("license.register.error"))})}else i.error(o.instant("no.license.code.error"))}(n)})}(n,e)):(a.val(""),i.error(n.message))}).error(function(){i.error(o.instant("invalid.license"))})}e.$watch("currentFile",function(){if(e.currentFile){const n=e.currentFile;t.extractFromLicenseFile(n).success(function(e){l(e)}).error(function(){i.error(o.instant("could.not.upload.file.error"))})}}),e.getBackToPreviousPage=function(){c.history.back()}}function r(e,t,n){e.ok=function(){t.close()},e.cancel=function(){t.dismiss("cancel")},e.license=n}function o(e){e.loader=!0,e.setLoader=function(t){e.loader=t}}n.r(t),n(82493),n(98599),angular.module("graphdb.framework.settings.controllers",["ngCookies","ui.bootstrap","graphdb.framework.core.services.jwtauth","toastr"]).controller("ActiveLocationSettingsCtrl",s).controller("ValidateLicenseModalCtrl",r).controller("LicenseCtrl",i).controller("RegisterLicenseCtrl",c).controller("LoaderSamplesCtrl",o),s.$inject=["$scope","toastr","$uibModalInstance","LicenseRestService","$translate"],i.$inject=["$scope","LicenseRestService","$licenseService","toastr","$rootScope","ModalService","$translate","TrackingService"],c.$inject=["$scope","LicenseRestService","$location","$uibModal","toastr","$window","$jwtAuth","$translate"],r.$inject=["$scope","$uibModalInstance","license"],o.$inject=["$scope"]}}; //# sourceMappingURL=46570.5fd16032b79cc7a4a8cb.bundle.js.map