Skip to content

Commit

Permalink
fix(SiteChangeRegion): inform user to update custom domain on changin…
Browse files Browse the repository at this point in the history
…g region

fix #1092
  • Loading branch information
BreadGenie committed Oct 1, 2024
1 parent ae9799f commit 67c0e70
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions dashboard/src2/components/site/SiteChangeRegionDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@
If the region you're looking for isn't available, please add from the
Bench Group dashboard.
</p>
<div
class="rounded border border-gray-200 bg-gray-100 p-2"
v-if="$resources.ARecords.data?.length == 0"
>
<p class="text-sm text-gray-700">
<strong>Note</strong>: This site seem to have custom domains with
<strong>A record</strong>. Please update the same after migration to
avoid downtime. To know more, refer
<a
href="https://frappecloud.com/docs/sites/custom-domains"
target="_blank"
class="underline"
>the documentation.</a
>
</p>
</div>
</div>
<ErrorMessage class="mt-3" :message="$resources.changeRegion.error" />
</template>
Expand Down Expand Up @@ -100,6 +116,19 @@ export default {
}
},
resources: {
ARecords() {
return {
type: 'list',
doctype: 'Site Domain',
filters: {
site: this.site,
dns_type: 'A',
domain: ['!=', this.site]
},
limit: 1,
auto: true
};
},
changeRegionOptions() {
return {
url: 'press.api.site.change_region_options',
Expand Down

0 comments on commit 67c0e70

Please sign in to comment.