UNPKG

graphdb-workbench

Version:
2 lines 3.98 kB
export const __webpack_id__=69112;export const __webpack_ids__=[46570,69112];export const __webpack_modules__={46570:(e,t,n)=>{function r(e,t,n,r,s){e.supportsStatistics=!0,e.settings={statistics:!1},e.getSettings=function(){e.loader=!0,r.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,s.instant("error.getting.settings"))}})},e.getSettings(),e.setSettings=function(){e.loader=!0,r.toggleStatistics(e.settings.statistics).then(function(){n.close(),t.success(s.instant("saving.settings.success"))},function(e){const n=getError(e.data);t.error(n,s.instant("saving.settings.error"))})},e.submitForm=function(){e.setSettings()},e.cancel=function(){n.dismiss("cancel")}}function s(e,t,n,r,s,i,o,c){e.loadingLicense=function(){return n.loadingLicense()},n.checkLicenseStatus(),e.removeLicense=function(){i.openSimpleModal({title:o.instant("confirm.operation"),message:o.instant("remove.license.warning.msg"),warning:!0}).result.then(function(){t.unregisterLicense().success(function(){n.checkLicenseStatus().then(()=>c.applyTrackingConsent()).catch(e=>{const t=getError(e.data,e.status);r.error(t,o.instant("common.error"))})})})}}function i(e,t,n,r,s,i,o,c){e.$on("securityInit",function(){o.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){r.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(){i.history.back()}).error(function(e){s.error(e,c.instant("license.register.error"))})}else s.error(c.instant("no.license.code.error"))}(n)})}(n,e)):(a.val(""),s.error(n.message))}).error(function(){s.error(c.instant("invalid.license"))})}e.$watch("currentFile",function(){if(e.currentFile){const n=e.currentFile;t.extractFromLicenseFile(n).success(function(e){l(e)}).error(function(){s.error(c.instant("could.not.upload.file.error"))})}}),e.getBackToPreviousPage=function(){i.history.back()}}function o(e,t,n){e.ok=function(){t.close()},e.cancel=function(){t.dismiss("cancel")},e.license=n}function c(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",r).controller("ValidateLicenseModalCtrl",o).controller("LicenseCtrl",s).controller("RegisterLicenseCtrl",i).controller("LoaderSamplesCtrl",c),r.$inject=["$scope","toastr","$uibModalInstance","LicenseRestService","$translate"],s.$inject=["$scope","LicenseRestService","$licenseService","toastr","$rootScope","ModalService","$translate","TrackingService"],i.$inject=["$scope","LicenseRestService","$location","$uibModal","toastr","$window","$jwtAuth","$translate"],o.$inject=["$scope","$uibModalInstance","license"],c.$inject=["$scope"]},69112:(e,t,n)=>{function r(e){e.interceptors.push("$authenticationInterceptor")}function s(e,t,n){e.$on("$locationChangeStart",function(){n.isLicenseHardcoded()&&"/license/register"===t.url()&&t.path("license")})}n.r(t),n(82493),n(5687),n(21774),n(46570),n(9619),n(35805),n(98599),n(47195),n(56669),angular.module("graphdb.framework.settings",["toastr","ui.bootstrap","graphdb.framework.rest.license.service","graphdb.framework.settings.controllers","graphdb.framework.core.interceptors.unauthorized","graphdb.framework.core.interceptors.authentication","graphdb.framework.core.services.jwtauth"]).config(r).run(s),r.$inject=["$httpProvider","$routeProvider"],s.$inject=["$rootScope","$location","$licenseService"]}}; //# sourceMappingURL=69112.82e4d57df53e40b54050.bundle.js.map