aboutsummaryrefslogtreecommitdiffstats
path: root/config/openbgpd/openbgpd_status.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-07-25 16:24:04 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-07-25 16:24:04 -0300
commit470c09da6f4bac6a82168b19adac7c40c2206f72 (patch)
treeb97270736e734aa6d8be80a416e025f68b137d3f /config/openbgpd/openbgpd_status.php
parent1c0e77d3c6f080d5a96ca0f29faee5de40680144 (diff)
downloadpfsense-packages-470c09da6f4bac6a82168b19adac7c40c2206f72.tar.gz
pfsense-packages-470c09da6f4bac6a82168b19adac7c40c2206f72.tar.bz2
pfsense-packages-470c09da6f4bac6a82168b19adac7c40c2206f72.zip
Simplify a bit logic
Diffstat (limited to 'config/openbgpd/openbgpd_status.php')
-rw-r--r--config/openbgpd/openbgpd_status.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/config/openbgpd/openbgpd_status.php b/config/openbgpd/openbgpd_status.php
index 1eaee2ea..4ed644bd 100644
--- a/config/openbgpd/openbgpd_status.php
+++ b/config/openbgpd/openbgpd_status.php
@@ -200,16 +200,10 @@ function execCmds() {
function update_filter_callback(transport) {
// First line contain field id to be updated
var responseTextArr = transport.responseText.split("\n");
- var result = "";
- var i;
+ var id = responseTextArr.shift();
+ var result = responseTextArr.join("\n");
- for (i = 1; i < responseTextArr.length; i++) {
- result += responseTextArr[i];
- if (i < responseTextArr.length - 1)
- result += "\n";
- }
-
- document.getElementById(responseTextArr[0]).textContent = result;
+ document.getElementById(id).textContent = result;
}
//]]>