Skip to content

Commit

Permalink
feat: add DNS records page (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanoScarpetta authored Mar 14, 2024
1 parent 748ba78 commit a42d2b2
Show file tree
Hide file tree
Showing 4 changed files with 444 additions and 3 deletions.
34 changes: 31 additions & 3 deletions ui/public/i18n/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
"common": {
"required": "Required",
"work_in_progress": "Work in progress",
"processing": "Processing..."
"processing": "Processing...",
"cancel": "Cancel",
"edit": "Edit",
"delete": "Delete",
"close": "Close",
"clear_search": "Clear search",
"no_search_results": "No results",
"no_search_results_description": "Try changing your search query"
},
"status": {
"title": "Status",
Expand All @@ -26,9 +33,27 @@
"save": "Save",
"test_field": "Test field"
},
"dns_records": {
"title": "DNS records",
"add_dns_record": "Add DNS record",
"delete_dns_record": "Delete DNS record",
"domain": "Hostname",
"address": "IP address",
"search_record": "Search record",
"no_records": "No DNS records",
"no_records_description": "There is no DNS record"
},
"about": {
"title": "About"
},
"pagination": {
"items_per_page": "Items per page:",
"range_of_total_items": "{range} of {total} items",
"of_total_pages": "of {total} pages",
"previous_page": "Previous page",
"next_page": "Next page",
"page_number": "Page number"
},
"task": {
"cannot_create_task": "Cannot create task {action}"
},
Expand All @@ -40,7 +65,9 @@
"get-name": "Get name",
"list-backup-repositories": "List backup repositories",
"list-backups": "List backups",
"list-installed-modules": "List installed modules"
"list-installed-modules": "List installed modules",
"get-dns-records": "Get DNS records",
"set-dns-records": "Set DNS records"
},
"error": {
"error": "Error",
Expand All @@ -52,6 +79,7 @@
"403": "Operation not authorized",
"404": "Resource not found",
"cannot_retrieve_module_info": "Cannot retrieve module info",
"cannot_retrieve_installed_modules": "Cannot retrieve installed modules"
"cannot_retrieve_installed_modules": "Cannot retrieve installed modules",
"records_format": "Invalid format"
}
}
9 changes: 9 additions & 0 deletions ui/src/components/AppSideMenuContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
<template v-slot:nav-icon><Settings20 /></template>
<span>{{ $t("settings.title") }}</span>
</cv-side-nav-link>
<cv-side-nav-link
@click="goToAppPage(instanceName, 'dnsrecords')"
:class="{ 'current-page': isLinkActive('dnsrecords') }"
>
<template v-slot:nav-icon><List20 /></template>
<span>{{ $t("dns_records.title") }}</span>
</cv-side-nav-link>
<cv-side-nav-link
@click="goToAppPage(instanceName, 'about')"
:class="{ 'current-page': isLinkActive('about') }"
Expand All @@ -43,6 +50,7 @@
import Settings20 from "@carbon/icons-vue/es/settings/20";
import Information20 from "@carbon/icons-vue/es/information/20";
import Activity20 from "@carbon/icons-vue/es/activity/20";
import List20 from "@carbon/icons-vue/es/list/20";
import { mapState } from "vuex";
import { QueryParamService, UtilService } from "@nethserver/ns8-ui-lib";

Expand All @@ -52,6 +60,7 @@ export default {
Settings20,
Information20,
Activity20,
List20,
},
mixins: [QueryParamService, UtilService],
data() {
Expand Down
6 changes: 6 additions & 0 deletions ui/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Vue from "vue";
import VueRouter from "vue-router";
import Status from "../views/Status.vue";
import Settings from "../views/Settings.vue";
import DNSRecords from "../views/DNSRecords.vue";

Vue.use(VueRouter);

Expand All @@ -21,6 +22,11 @@ const routes = [
name: "Settings",
component: Settings,
},
{
path: "/dnsrecords",
name: "DNS records",
component: DNSRecords,
},
{
path: "/about",
name: "About",
Expand Down
Loading

0 comments on commit a42d2b2

Please sign in to comment.