Viewing File: /usr/local/cpanel/base/frontend/jupiter/zone_editor/services/domains.min.js

define(["angular","jquery","cjt/util/locale","cjt/io/api","cjt/io/api2-request","cjt/io/api2","cjt/util/httpStatus","cjt/core"],(function(t,e,n,o,a,i,r,s){"use strict";return t.module("cpanel.zoneEditor").factory("Domains",["$q","defaultInfo",function(t,e){var i={domains:[],fetch:function(e){if(0===i.domains.length||e){var u=new a.Class;return u.initialize("DomainLookup","getbasedomains"),t.when(o.promise(u.getRunArguments())).then((function(e){return(e=e.parsedResponse).status?(i.domains=e.data,i.domains):t.reject(e.error)})).catch((function(e){var o=n.maketext("The API request failed with the following error: [_1] - [_2].",e.status,r.convertHttpStatusToReadable(e.status));return 401!==e.status&&403!==e.status||(o+=" "+n.maketext("Your session may have expired or you logged out of the system. [output,url,_1,Login] again to continue.",s.getLoginPath())),t.reject(o)}))}return t.when(i.domains)},init:function(){i.domains=e.domains}};return i.init(),i}])}));
Back to Directory File Manager