D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
psa
/
admin
/
cp
/
public
/
javascript
/
app
/
Filename :
dns-helper.js
back
Copy
(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["app/dns-helper"],{2301:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>v});var a=i(285),s=i(286),d=i(89),t=i(2302),r=i(596),l=i.n(r),o=i(586),c=i(2304),m=i.n(c);const u=d.Locale.getTranslate("smb.components.dns-helper"),k=({id:e,isAlias:n=!1,...i})=>{const[d,r]=(0,a.useState)(!1),{loading:l,data:c,error:k}=(0,o.useQuery)(m(),{variables:{id:btoa(`${n?"DomainAlias":"Domain"}:${e}`)}});return l||k||c.node.isResolvable?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.StatusMessage,{intent:"warning",children:[(0,a.jsx)(s.Paragraph,{children:(0,a.jsx)(u,{content:"domainUnresolvedMessage"})}),(0,a.jsx)(s.Paragraph,{children:(0,a.jsx)(u,{content:"warningActionMessage",params:{warningActionLink:(0,a.jsx)(s.Text,{bold:!0,children:(0,a.jsx)(s.Link,{onClick:()=>r(!0),children:(0,a.jsx)(u,{content:"warningActionLink"})})})}})}),(0,a.jsx)("br",{}),(0,a.jsx)(s.Text,{italic:!0,children:(0,a.jsx)(u,{content:"changesLagWarning"})})]}),(0,a.jsx)(t.default,{isOpen:d,onClose:()=>r(!1),id:e,isAlias:n,...i})]})};k.propTypes={id:l().number.isRequired,isAlias:l().bool};const v=k},2302:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>v});var a=i(286),s=i(285),d=i(596),t=i.n(d),r=i(89),l=i(586),o=i(536),c=i(2303),m=i.n(c);const u=r.Locale.getTranslate("smb.components.dns-helper"),k=({isOpen:e,onClose:n,id:i,howToVideoUrl:d,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:f},dns:{registrars:S,extensions:x},config:{dns:{enableResolveChecking:j}},mode:{isDnsServiceSupported:N}}=c,{ipv4:F,ipv6:b}=(t?g.ipAddresses:h).reduce(((e,{publicIpAddress:n,ipAddress:i})=>{const a=n||i;return e[a.includes(":")?"ipv6":"ipv4"]=a,e}),{}),D=j&&N;return(0,s.jsxs)(a.Drawer,{title:(0,s.jsx)(u,{content:"drawerTitle",params:{name:p}}),size:"sm",isOpen:e,onClose:n,"data-type":"dns-helper",children:[D?(0,s.jsxs)(s.Fragment,{children:[(()=>{if(!f)return null;const{nsRecords:e,aRecords:n}=f,i=e.map((e=>n.find((n=>n.host===e.value)))).filter((e=>!!e));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:(0,s.jsx)(u,{content:"pleskResolve"})}),(0,s.jsx)("p",{children:(0,s.jsx)(a.Link,{"data-action":"openHowToVideo",href:d,target:"_blank",children:(0,s.jsx)(u,{content:"howToVideoLink"})})}),(0,s.jsx)("p",{children:(0,s.jsx)(u,{content:"domainSetup0"})}),(0,s.jsxs)("ol",{children:[(0,s.jsx)("li",{children:(0,s.jsx)(u,{content:"domainSetup1"})}),i.length>0&&(0,s.jsxs)("li",{children:[(0,s.jsx)(u,{content:"domainSetup2",params:{glueLink:(0,s.jsx)(a.Link,{"data-action":"glueLink",href:"https://en.wikipedia.org/wiki/Domain_Name_System#Circular_dependencies_and_glue_records",target:"_blank",children:(0,s.jsx)("b",{children:(0,s.jsx)(u,{content:"glueRecords"})})})}}),(0,s.jsx)(a.Alert,{children:i.map((({host:e,value:n})=>(0,s.jsxs)("div",{children:[e," ",n]},e)))})]}),(0,s.jsxs)("li",{children:[(0,s.jsx)("p",{children:(0,s.jsx)(u,{content:"domainSetup3"})}),(0,s.jsx)(a.Alert,{children:e.map((({value:e})=>(0,s.jsxs)("div",{children:["NS"," ",e]},e)))})]})]})]})})(),(0,s.jsx)("p",{children:(0,s.jsx)(u,{content:"primaryDNS"})}),(0,s.jsx)("p",{children:(0,s.jsx)(u,{content:"forExample"})}),F?(0,s.jsxs)(a.Alert,{children:[`A @ ${F}`,(0,s.jsx)("br",{}),`A www ${F}`]}):null,b?(0,s.jsxs)(a.Alert,{children:[`AAAA @ ${b}`,(0,s.jsx)("br",{}),`AAAA www ${b}`]}):null]}):null,(0,s.jsx)(a.Paragraph,{children:(0,s.jsx)(u,{content:"chooseRegistrar"})}),(0,s.jsx)(a.Text,{italic:!0,bold:!0,children:(0,s.jsx)(a.Link,{"data-action":"chooseRegistrar",href:"https://www.icann.org/resources/pages/who-2013-05-03-en",target:"_blank",children:(0,s.jsx)(u,{content:"chooseRegistrarLink"})})}),(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),(0,s.jsx)(a.Cuttable,{maxHeight:160,children:(0,s.jsxs)(a.ItemList,{minColumnWidth:250,gap:"xs",children:[S.map((({name:e,url:n})=>(0,s.jsx)(a.Item,{"data-action":e,icon:(0,s.jsx)(a.Icon,{name:"chevron-right",size:"12"}),title:(0,s.jsx)(a.Link,{href:n,target:"_blank",children:e})},e))),(0,s.jsx)(a.Item,{icon:(0,s.jsx)(a.Icon,{name:"chevron-right",size:"12"}),title:(0,s.jsx)(a.Link,{href:"https://pt-research.typeform.com/to/FkcDot10",target:"_blank",children:(0,s.jsx)(u,{content:"registrarSurveyLink"})})})]})}),"ADMIN"===v.type&&D?(0,s.jsx)(a.Alert,{intent:"default",children:(0,s.jsxs)(a.Status,{intent:"warning",children:[(0,s.jsx)(u,{content:"adminHintTitle"}),(0,s.jsxs)("ol",{children:[(0,s.jsxs)("li",{children:[(0,s.jsx)(u,{content:"addIpOption",params:{useIpLink:(0,s.jsx)(a.Text,{bold:!0,children:(0,s.jsx)(a.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,s.jsx)(u,{content:"useIpLink"})})})}}),(0,s.jsx)(a.Text,{bold:!0,children:(0,s.jsx)(u,{content:"example"})}),(0,s.jsxs)("ul",{children:[(0,s.jsx)("li",{children:(0,s.jsx)(a.Text,{italic:!0,children:"ns1.example.com 123.123.123.123"})}),(0,s.jsx)("li",{children:(0,s.jsx)(a.Text,{italic:!0,children:"ns2.example.com 124.124.124.124"})})]})]}),(0,s.jsx)("li",{children:(0,s.jsx)(u,{content:"slaveDnsOption",params:{slaveExtensionLink:(0,s.jsx)(a.Text,{bold:!0,children:(0,s.jsx)(a.Link,{"data-action":"slaveDnsExtension",href:"https://www.plesk.com/extensions/slave-dns-manager/",target:"_blank",children:(0,s.jsx)(u,{content:"slaveExtensionLink"})})})}})}),(0,s.jsx)("li",{children:(0,s.jsx)(u,{content:"extensionOption",params:{extensions:(0,s.jsx)(s.Fragment,{children:x.map((({name:e,url:n},i)=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.Link,{href:n,target:"_blank","data-action":e,children:e}),i<x.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},2300:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>a.default});var a=i(2301)},2304:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DnsHelper"},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:"isResolvable"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DomainAlias"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isResolvable"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:190}};n.loc.source={body:"query DnsHelper($id: ID!) {\n node(id: $id) {\n id\n ... on Domain {\n isResolvable\n }\n ... on DomainAlias {\n isResolvable\n }\n }\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 a=e.type;"NamedType"===a.kind&&n.add(a.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 a={};function s(e,n){for(var i=0;i<e.definitions.length;i++){var a=e.definitions[i];if(a.name&&a.name.value==n)return a}}n.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}})),e.exports=n,e.exports.DnsHelper=function(e,n){var i={kind:e.kind,definitions:[s(e,n)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var d=a[n]||new Set,t=new Set,r=new Set;for(d.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),(a[e]||new Set).forEach((function(e){r.add(e)})))}))}return t.forEach((function(n){var a=s(e,n);a&&i.definitions.push(a)})),i}(n,"DnsHelper")},2303: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 a=e.type;"NamedType"===a.kind&&n.add(a.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 a={};function s(e,n){for(var i=0;i<e.definitions.length;i++){var a=e.definitions[i];if(a.name&&a.name.value==n)return a}}function d(e,n){var i={kind:e.kind,definitions:[s(e,n)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var d=a[n]||new Set,t=new Set,r=new Set;for(d.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),(a[e]||new Set).forEach((function(e){r.add(e)})))}))}return t.forEach((function(n){var a=s(e,n);a&&i.definitions.push(a)})),i}n.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),a[e.name.value]=n}})),e.exports=n,e.exports.DnsSettingsDrawer=d(n,"DnsSettingsDrawer"),e.exports.ipAddressesFields=d(n,"ipAddressesFields"),e.exports.recordsFields=d(n,"recordsFields"),e.exports.recordFields=d(n,"recordFields")}}]); //# sourceMappingURL=dns-helper.js.map?476d77f13221d03a4a56