UNPKG

graphdb-workbench

Version:
2 lines 1.44 kB
export const __webpack_id__=98248;export const __webpack_ids__=[98248];export const __webpack_modules__={98248:(t,r,e)=>{function n(t,r,e,n,o){return{addLocationHttp:function(t){let e;return n.addLocation(t).catch(t=>{const e=getError(t.data,t.status);return r.error(e,o.instant("common.error")),!1}).then(t=>!!t&&a()).then(r=>{if(!1!==r)return e=r.find(r=>r.endpoint===t.uri),e})},getLocationsWithRpcAddresses:a,createNewLocation:function(t){return{uri:t,authType:"signature",username:"",password:"",active:!1,clusterMode:!0,isLocal:!1}},isInCluster:function(t,r){return t.some(t=>r.rpcAddress===t.address)}};function a(){return n.getLocations().then(function(t){return t.data.map(t=>({isLocal:t.local,endpoint:t.uri,rpcAddress:t.rpcAddress||"",error:t.errorMsg}))}).catch(function(t){const e=getError(t.data,t.status);r.error(e,o.instant("common.error"))}).then(t=>{if(t)return function(t){const r=t.filter(t=>!t.isLocal&&!t.error).map(t=>function(t){return n.getLocationRpcAddress(t.endpoint)}(t).then(r=>(t.rpcAddress=r.data,t.isAvailable=!0,t)).catch(r=>{t.isAvailable=!1,t.error=getError(r.data,r.status)}));return Promise.allSettled(r).then(()=>t)}(t)})}}e.r(r),e(807),angular.module("graphdb.framework.clustermanagement.services.remote-locations",[]).factory("RemoteLocationsService",n),n.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"]}}; //# sourceMappingURL=98248.1b16b4b6568ddc7b66bd.bundle.js.map