Submit
Path:
~
/
/
usr
/
local
/
psa
/
admin
/
cp
/
public
/
javascript
/
app
/
dns-helper
/
File Content:
dns-settings.js
(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["app/dns-helper/dns-settings"],{2306:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>v});var s=i(286),d=i(285),a=i(591),t=i.n(a),r=i(89),l=i(581),o=i(536),c=i(2307),m=i.n(c);const u=r.Locale.getTranslate("smb.components.dns-helper"),k=({isOpen:e,onClose:n,id:i,howToVideoUrl:a,isAlias:t=!1})=>{const{loading:r,data:c,error:k}=(0,l.useQuery)(m(),{variables:{id:btoa(`${t?"DomainAlias":"Domain"}:${i}`)},onError:({message:e})=>{(0,o.addToast)({intent:"danger",message:e})}});if(r||k)return null;const{viewer:v,node:{name:p,domain:g,ipAddresses:h,dnsZone:x},dns:{registrars:S,extensions:j},config:{dns:{enableResolveChecking:f}},mode:{isDnsServiceSupported:F}}=c,{ipv4:N,ipv6:b}=(t?g.ipAddresses:h).reduce(((e,{publicIpAddress:n,ipAddress:i})=>{const s=n||i;return e[s.includes(":")?"ipv6":"ipv4"]=s,e}),{}),A=f&&F;return(0,d.jsxs)(s.Drawer,{title:(0,d.jsx)(u,{content:"drawerTitle",params:{name:p}}),size:"sm",isOpen:e,onClose:n,"data-type":"dns-helper",children:[A?(0,d.jsxs)(d.Fragment,{children:[(()=>{if(!x)return null;const{nsRecords:e,aRecords:n}=x,i=e.map((e=>n.find((n=>n.host===e.value)))).filter((e=>!!e));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{children:(0,d.jsx)(u,{content:"pleskResolve"})}),(0,d.jsx)("p",{children:(0,d.jsx)(s.Link,{"data-action":"openHowToVideo",href:a,target:"_blank",children:(0,d.jsx)(u,{content:"howToVideoLink"})})}),(0,d.jsx)("p",{children:(0,d.jsx)(u,{content:"domainSetup0"})}),(0,d.jsxs)("ol",{children:[(0,d.jsx)("li",{children:(0,d.jsx)(u,{content:"domainSetup1"})}),i.length>0&&(0,d.jsxs)("li",{children:[(0,d.jsx)(u,{content:"domainSetup2",params:{glueLink:(0,d.jsx)(s.Link,{"data-action":"glueLink",href:"https://en.wikipedia.org/wiki/Domain_Name_System#Circular_dependencies_and_glue_records",target:"_blank",children:(0,d.jsx)("b",{children:(0,d.jsx)(u,{content:"glueRecords"})})})}}),(0,d.jsx)(s.Alert,{children:i.map((({host:e,value:n})=>(0,d.jsxs)("div",{children:[e," ",n]},e)))})]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("p",{children:(0,d.jsx)(u,{content:"domainSetup3"})}),(0,d.jsx)(s.Alert,{children:e.map((({value:e})=>(0,d.jsxs)("div",{children:["NS"," ",e]},e)))})]})]})]})})(),(0,d.jsx)("p",{children:(0,d.jsx)(u,{content:"primaryDNS"})}),(0,d.jsx)("p",{children:(0,d.jsx)(u,{content:"forExample"})}),N?(0,d.jsxs)(s.Alert,{children:[`A @ ${N}`,(0,d.jsx)("br",{}),`A www ${N}`]}):null,b?(0,d.jsxs)(s.Alert,{children:[`AAAA @ ${b}`,(0,d.jsx)("br",{}),`AAAA www ${b}`]}):null]}):null,(0,d.jsx)(s.Paragraph,{children:(0,d.jsx)(u,{content:"chooseRegistrar"})}),(0,d.jsx)(s.Text,{italic:!0,bold:!0,children:(0,d.jsx)(s.Link,{"data-action":"chooseRegistrar",href:"https://www.icann.org/resources/pages/who-2013-05-03-en",target:"_blank",children:(0,d.jsx)(u,{content:"chooseRegistrarLink"})})}),(0,d.jsx)("br",{}),(0,d.jsx)("br",{}),(0,d.jsx)(s.Cuttable,{maxHeight:160,children:(0,d.jsxs)(s.ItemList,{minColumnWidth:250,gap:"xs",children:[S.map((({name:e,url:n})=>(0,d.jsx)(s.Item,{"data-action":e,icon:(0,d.jsx)(s.Icon,{name:"chevron-right",size:"12"}),title:(0,d.jsx)(s.Link,{href:n,target:"_blank",children:e})},e))),(0,d.jsx)(s.Item,{icon:(0,d.jsx)(s.Icon,{name:"chevron-right",size:"12"}),title:(0,d.jsx)(s.Link,{href:"https://pt-research.typeform.com/to/FkcDot10",target:"_blank",children:(0,d.jsx)(u,{content:"registrarSurveyLink"})})})]})}),"ADMIN"===v.type&&A?(0,d.jsx)(s.Alert,{intent:"default",children:(0,d.jsxs)(s.Status,{intent:"warning",children:[(0,d.jsx)(u,{content:"adminHintTitle"}),(0,d.jsxs)("ol",{children:[(0,d.jsxs)("li",{children:[(0,d.jsx)(u,{content:"addIpOption",params:{useIpLink:(0,d.jsx)(s.Text,{bold:!0,children:(0,d.jsx)(s.Link,{"data-action":"addSecondIpGuide",href:"http://docs.plesk.com/en-US/obsidian/administrator-guide/dns/providing-redundant-dns-servers.74239/#configure-at-least-two-ip-addresses-on-your-plesk-server",target:"_blank",children:(0,d.jsx)(u,{content:"useIpLink"})})})}}),(0,d.jsx)(s.Text,{bold:!0,children:(0,d.jsx)(u,{content:"example"})}),(0,d.jsxs)("ul",{children:[(0,d.jsx)("li",{children:(0,d.jsx)(s.Text,{italic:!0,children:"ns1.example.com 123.123.123.123"})}),(0,d.jsx)("li",{children:(0,d.jsx)(s.Text,{italic:!0,children:"ns2.example.com 124.124.124.124"})})]})]}),(0,d.jsx)("li",{children:(0,d.jsx)(u,{content:"slaveDnsOption",params:{slaveExtensionLink:(0,d.jsx)(s.Text,{bold:!0,children:(0,d.jsx)(s.Link,{"data-action":"slaveDnsExtension",href:"https://www.plesk.com/extensions/slave-dns-manager/",target:"_blank",children:(0,d.jsx)(u,{content:"slaveExtensionLink"})})})}})}),(0,d.jsx)("li",{children:(0,d.jsx)(u,{content:"extensionOption",params:{extensions:(0,d.jsx)(d.Fragment,{children:j.map((({name:e,url:n},i)=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.Link,{href:n,target:"_blank","data-action":e,children:e}),i<j.length-1?", ":""]},e)))})}})})]})]})}):null]})};k.propTypes={isOpen:t().bool.isRequired,onClose:t().func.isRequired,id:t().number.isRequired,howToVideoUrl:t().string.isRequired,isAlias:t().bool};const v=k},3008:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>l});var s=i(285),d=i(2306),a=i(591);let t;const r=e=>{const[n,i]=(0,s.useState)(!0),[a,r]=(0,s.useState)(e);return t=async e=>{var s;e.id!==a.id&&n&&(i(!1),await(s=300,new Promise((e=>setTimeout(e,s))))),r(e),i(!0)},(0,s.jsx)(d.default,{isOpen:n,onClose:()=>i(!1),...a})};r.propTypes={id:i.n(a)().string.isRequired};const l=e=>{t?t(e):Plesk.addWidget(r,e)}},2307:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DnsSettingsDrawer"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Domain"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[{kind:"Argument",name:{kind:"Name",value:"idn"},value:{kind:"BooleanValue",value:!1}}],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"ipAddressesFields"},directives:[]},{kind:"Field",name:{kind:"Name",value:"dnsZone"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"recordsFields"},directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DomainAlias"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[{kind:"Argument",name:{kind:"Name",value:"idn"},value:{kind:"BooleanValue",value:!1}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ipAddressesFields"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"dnsZone"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"recordsFields"},directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"viewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"config"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dns"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enableResolveChecking"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"dns"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"registrars"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"extensions"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"mode"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isDnsServiceSupported"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ipAddressesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Domain"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ipAddresses"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicIpAddress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ipAddress"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"recordsFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DnsZone"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"nsRecords"},name:{kind:"Name",value:"records"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filter"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"NS"}]}}]}},{kind:"Argument",name:{kind:"Name",value:"orderBy"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"EnumValue",value:"asc"}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"recordFields"},directives:[]}]}},{kind:"Field",alias:{kind:"Name",value:"aRecords"},name:{kind:"Name",value:"records"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filter"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"A"}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"recordFields"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"recordFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DnsRecord"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"host"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]}]}}],loc:{start:0,end:1159}};n.loc.source={body:"query DnsSettingsDrawer($id: ID!) {\n node(id: $id) {\n id\n ... on Domain {\n name(idn: false)\n ...ipAddressesFields\n dnsZone {\n ...recordsFields\n }\n }\n ... on DomainAlias {\n name(idn: false)\n domain {\n ...ipAddressesFields\n }\n dnsZone {\n ...recordsFields\n }\n }\n }\n viewer {\n login\n type\n }\n config {\n dns {\n enableResolveChecking\n }\n }\n dns {\n registrars {\n name\n url\n }\n extensions {\n name\n url\n }\n }\n mode {\n isDnsServiceSupported\n }\n}\n\nfragment ipAddressesFields on Domain {\n ipAddresses {\n publicIpAddress\n ipAddress\n }\n}\n\nfragment recordsFields on DnsZone {\n nsRecords: records(filter: { type: [NS] }, orderBy: { value: asc }) {\n ...recordFields\n }\n aRecords: records(filter: { type: [A] }) {\n ...recordFields\n }\n}\n\nfragment recordFields on DnsRecord {\n host\n value\n type\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var s=e.type;"NamedType"===s.kind&&n.add(s.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var s={};function d(e,n){for(var i=0;i<e.definitions.length;i++){var s=e.definitions[i];if(s.name&&s.name.value==n)return s}}function a(e,n){var i={kind:e.kind,definitions:[d(e,n)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var a=s[n]||new Set,t=new Set,r=new Set;for(a.forEach((function(e){r.add(e)}));r.size>0;){var l=r;r=new Set,l.forEach((function(e){t.has(e)||(t.add(e),(s[e]||new Set).forEach((function(e){r.add(e)})))}))}return t.forEach((function(n){var s=d(e,n);s&&i.definitions.push(s)})),i}n.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),s[e.name.value]=n}})),e.exports=n,e.exports.DnsSettingsDrawer=a(n,"DnsSettingsDrawer"),e.exports.ipAddressesFields=a(n,"ipAddressesFields"),e.exports.recordsFields=a(n,"recordsFields"),e.exports.recordFields=a(n,"recordFields")}}]); //# sourceMappingURL=dns-settings.js.map?0e9cebbd7448193fc0d7
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
dns-settings.js
13688 bytes
0644
dns-settings.js.map
37518 bytes
0644
N4ST4R_ID | Naxtarrr