diff --git a/DnsServerCore/www/js/apps.js b/DnsServerCore/www/js/apps.js
index 5a11734c..a958e0fc 100644
--- a/DnsServerCore/www/js/apps.js
+++ b/DnsServerCore/www/js/apps.js
@@ -38,73 +38,43 @@ function refreshApps() {
var updateUrl = apps[i].updateUrl;
var updateAvailable = apps[i].updateAvailable;
- var appRecordRequestHandlersTable = null;
- var requestControllersTable = null;
- var authoritativeRequestHandlersTable = null;
- var loggersTable = null;
+ var dnsAppsTable = null;
- //AppRecordRequestHandlers
- if (apps[i].appRecordRequestHandlers.length > 0) {
- appRecordRequestHandlersTable = "
| Class Path | Description | Record Data Template | ";
+ //dnsApps
+ if (apps[i].dnsApps.length > 0) {
+ dnsAppsTable = "| Class Path | Description | ";
- for (var j = 0; j < apps[i].appRecordRequestHandlers.length; j++) {
- appRecordRequestHandlersTable += "| " + htmlEncode(apps[i].appRecordRequestHandlers[j].classPath) + " | " +
- htmlEncode(apps[i].appRecordRequestHandlers[j].description).replace(/\n/g, " ") + " | " +
- (apps[i].appRecordRequestHandlers[j].recordDataTemplate == null ? "" : "" + htmlEncode(apps[i].appRecordRequestHandlers[j].recordDataTemplate) + " ") + " |
";
+ for (var j = 0; j < apps[i].dnsApps.length; j++) {
+ var labels = "";
+ var description;
+
+ if (apps[i].dnsApps[j].isAppRecordRequestHandler) {
+ labels += "APP Record";
+ description = "" + htmlEncode(apps[i].dnsApps[j].description).replace(/\n/g, "
") + "
" + (apps[i].dnsApps[j].recordDataTemplate == null ? "" : "Record Data Template" + htmlEncode(apps[i].dnsApps[j].recordDataTemplate) + "
");
+ }
+
+ if (apps[i].dnsApps[j].isRequestController)
+ labels += "Request Controller";
+
+ if (apps[i].dnsApps[j].isAuthoritativeRequestHandler)
+ labels += "Authoritative";
+
+ if (apps[i].dnsApps[j].isQueryLogger)
+ labels += "Query Logger";
+
+ if (description == null)
+ description = htmlEncode(apps[i].dnsApps[j].description).replace(/\n/g, "
");
+
+ dnsAppsTable += "| " + htmlEncode(apps[i].dnsApps[j].classPath) + "" + labels + " | " + description + " |
";
}
- appRecordRequestHandlersTable += "
"
- }
-
- //RequestControllers
- if (apps[i].requestControllers.length > 0) {
- requestControllersTable = "| Class Path | Description | ";
-
- for (var j = 0; j < apps[i].requestControllers.length; j++) {
- requestControllersTable += "| " + htmlEncode(apps[i].requestControllers[j].classPath) + " | " +
- htmlEncode(apps[i].requestControllers[j].description).replace(/\n/g, " ") + " |
";
- }
-
- requestControllersTable += "
"
- }
-
- //AuthoritativeRequestHandler
- if (apps[i].authoritativeRequestHandlers.length > 0) {
- authoritativeRequestHandlersTable = "| Class Path | Description | ";
-
- for (var j = 0; j < apps[i].authoritativeRequestHandlers.length; j++) {
- authoritativeRequestHandlersTable += "| " + htmlEncode(apps[i].authoritativeRequestHandlers[j].classPath) + " | " +
- htmlEncode(apps[i].authoritativeRequestHandlers[j].description).replace(/\n/g, " ") + " |
";
- }
-
- authoritativeRequestHandlersTable += "
"
- }
-
- //Loggers
- if (apps[i].loggers.length > 0) {
- loggersTable = "| Class Path | Description | ";
-
- for (var j = 0; j < apps[i].loggers.length; j++) {
- loggersTable += "| " + htmlEncode(apps[i].loggers[j].classPath) + " | " +
- htmlEncode(apps[i].loggers[j].description).replace(/\n/g, " ") + " |
";
- }
-
- loggersTable += "
"
+ dnsAppsTable += "
"
}
tableHtmlRows += "" + htmlEncode(name) + " Version " + htmlEncode(version) + " Update " + htmlEncode(updateVersion) + " ";
- if (appRecordRequestHandlersTable != null)
- tableHtmlRows += "APP Record Request Handlers " + appRecordRequestHandlersTable + " ";
-
- if (requestControllersTable != null)
- tableHtmlRows += "Request Controllers " + requestControllersTable + " ";
-
- if (authoritativeRequestHandlersTable != null)
- tableHtmlRows += "Authoritative Request Handlers " + authoritativeRequestHandlersTable + " ";
-
- if (loggersTable != null)
- tableHtmlRows += "Query Loggers " + loggersTable + " ";
+ if (dnsAppsTable != null)
+ tableHtmlRows += dnsAppsTable;
tableHtmlRows += " | ";
tableHtmlRows += "";
diff --git a/DnsServerCore/www/js/logs.js b/DnsServerCore/www/js/logs.js
index 9e7e4fa1..5aaf8d69 100644
--- a/DnsServerCore/www/js/logs.js
+++ b/DnsServerCore/www/js/logs.js
@@ -30,9 +30,12 @@ $(function () {
for (var i = 0; i < appsList.length; i++) {
if (appsList[i].name == appName) {
- for (var j = 0; j < appsList[i].loggers.length; j++) {
- optClassPaths += "";
+ for (var j = 0; j < appsList[i].dnsApps.length; j++) {
+ if (appsList[i].dnsApps[j].isQueryLogger)
+ optClassPaths += "";
}
+
+ break;
}
}
@@ -218,19 +221,26 @@ function refreshQueryLogsTab() {
var optClassPaths = "";
for (var i = 0; i < apps.length; i++) {
- if (apps[i].loggers.length > 0) {
- optApps += "";
+ for (var j = 0; j < apps[i].dnsApps.length; j++) {
+ if (apps[i].dnsApps[j].isQueryLogger) {
+ optApps += "";
- if (currentAppName == null)
- currentAppName = apps[i].name;
+ if (currentAppName == null)
+ currentAppName = apps[i].name;
+
+ break;
+ }
}
}
for (var i = 0; i < apps.length; i++) {
if (apps[i].name == currentAppName) {
- for (var j = 0; j < apps[i].loggers.length; j++) {
- optClassPaths += "";
+ for (var j = 0; j < apps[i].dnsApps.length; j++) {
+ if (apps[i].dnsApps[j].isQueryLogger)
+ optClassPaths += "";
}
+
+ break;
}
}
diff --git a/DnsServerCore/www/js/zone.js b/DnsServerCore/www/js/zone.js
index f97d1837..472f5137 100644
--- a/DnsServerCore/www/js/zone.js
+++ b/DnsServerCore/www/js/zone.js
@@ -104,9 +104,12 @@ $(function () {
for (var i = 0; i < appsList.length; i++) {
if (appsList[i].name == appName) {
- for (var j = 0; j < appsList[i].appRecordRequestHandlers.length; j++) {
- optClassPaths += "";
+ for (var j = 0; j < appsList[i].dnsApps.length; j++) {
+ if (appsList[i].dnsApps[j].isAppRecordRequestHandler)
+ optClassPaths += "";
}
+
+ break;
}
}
@@ -123,9 +126,9 @@ $(function () {
for (var i = 0; i < appsList.length; i++) {
if (appsList[i].name == appName) {
- for (var j = 0; j < appsList[i].appRecordRequestHandlers.length; j++) {
- if (appsList[i].appRecordRequestHandlers[j].classPath == classPath) {
- $("#txtAddEditRecordDataData").val(appsList[i].appRecordRequestHandlers[j].recordDataTemplate);
+ for (var j = 0; j < appsList[i].dnsApps.length; j++) {
+ if (appsList[i].dnsApps[j].classPath == classPath) {
+ $("#txtAddEditRecordDataData").val(appsList[i].dnsApps[j].recordDataTemplate);
return;
}
}
@@ -1163,8 +1166,12 @@ function showAddRecordModalNow(apps) {
var optClassPaths = "";
for (var i = 0; i < apps.length; i++) {
- if (apps[i].appRecordRequestHandlers.length > 0)
- optApps += "";
+ for (var j = 0; j < apps[i].dnsApps.length; j++) {
+ if (apps[i].dnsApps[j].isAppRecordRequestHandler) {
+ optApps += "";
+ break;
+ }
+ }
}
$("#optAddEditRecordDataAppName").html(optApps);
|