diff --git a/public/js/pages/Radius/Radius.js b/public/js/pages/Radius/Radius.js
index 47c6c391b..3dc6126a1 100644
--- a/public/js/pages/Radius/Radius.js
+++ b/public/js/pages/Radius/Radius.js
@@ -29,75 +29,71 @@ function validateData(strasse, plz, stadt, info) {
Vue.component('radius-ont-parser', {
template: `
-
-
-
-
-
Schritt 1: Excel (XLSX) Upload
-
-
-
-
-
-
-
-
Schritt 2: Spaltenzuordnung
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Schritt 3: Ergebnisse
-
-
-
-
-
-
- | {{ header.label }} |
-
- ONT SN |
-
-
-
-
- | {{ row[selectedColumns.kundennummer] }} |
- {{ row[selectedColumns.anschlussstrasse] }} |
- {{ row[selectedColumns.anschlussplz] }} |
- {{ row[selectedColumns.anschlusscity] }} |
- {{ row.ont_sn }} |
-
-
-
-
-
-
-
-
-
-
-
-
- {{ Math.round(progress) }}%
-
-
-
Processing {{ currentRow + 1 }} of {{ totalRows }}
-
+
+
+
+
+
+
Schritt 2: Spaltenzuordnung
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Schritt 3: Ergebnisse
+
+
+
+
+
+
+ | {{ header.label }} |
+
+ ONT SN |
+
+
+
+
+ | {{ row[selectedColumns.kundennummer] }} |
+ {{ row[selectedColumns.anschlussstrasse] }} |
+ {{ row[selectedColumns.anschlussplz] }} |
+ {{ row[selectedColumns.anschlusscity] }} |
+ {{ row.ont_sn }} |
+
+
+
+
+
+
+
+
+
+
+
+ {{ Math.round(progress) }}%
+
+
+
Processing {{ currentRow + 1 }} of {{ totalRows }}
+
+
`,
data() {
@@ -207,55 +203,55 @@ Vue.component('radius-ont-parser', {
const processedRows = [];
mainLoop:
- for (let i = 0; i < this.parsedData.length; i++) {
- this.currentRow = i;
- this.progress = ((i + 1) / this.parsedData.length) * 100;
+ for (let i = 0; i < this.parsedData.length; i++) {
+ this.currentRow = i;
+ this.progress = ((i + 1) / this.parsedData.length) * 100;
- // Simulate processing
- await this.sleep(100);
+ // Simulate processing
+ await this.sleep(100);
- // Process row here
- const row = this.parsedData[i];
+ // Process row here
+ const row = this.parsedData[i];
- const findUserResponse = await fetch(window.TT_CONFIG['BASE_PATH'] + '/Radius/proxyUnsecureHTTPRequestToRadius?custnume=' + row[this.selectedColumns.kundennummer]);
- const findUserData = await findUserResponse.json();
+ const findUserResponse = await fetch(window.TT_CONFIG['BASE_PATH'] + '/Radius/proxyUnsecureHTTPRequestToRadius?custnume=' + row[this.selectedColumns.kundennummer]);
+ const findUserData = await findUserResponse.json();
- if (findUserData.length === 0) {
- row.ont_sn = 'N/A - Kein Benutzer mit dieser Kundennummer gefunden';
- processedRows.push(row);
- } else if (findUserData.length === 1) {
- const username = findUserData[0].username;
- const radacctResponse = await fetch(window.TT_CONFIG['BASE_PATH'] + '/Radius/proxyUnsecureHTTPRequestToRadius?skipAdditional=true&action2=fetchRadacct&username=' + username);
- const radacctData = await radacctResponse.json();
+ if (findUserData.length === 0) {
+ row.ont_sn = 'N/A - Kein Benutzer mit dieser Kundennummer gefunden';
+ processedRows.push(row);
+ } else if (findUserData.length === 1) {
+ const username = findUserData[0].username;
+ const radacctResponse = await fetch(window.TT_CONFIG['BASE_PATH'] + '/Radius/proxyUnsecureHTTPRequestToRadius?skipAdditional=true&action2=fetchRadacct&username=' + username);
+ const radacctData = await radacctResponse.json();
- row.ont_sn = radacctData.ont_sn || 'N/A - Keine ONT SN gefunden';
- processedRows.push(row);
+ row.ont_sn = radacctData.ont_sn || 'N/A - Keine ONT SN gefunden';
+ processedRows.push(row);
- } else if (findUserData.length > 1) {
- // check string simulairty of strasse, plz, stadt and atleast of 90% of each should be inside findUserData[].info
- // if not, ont_sn = N/A - Anschluss konnte nicht zugeordnet werden
+ } else if (findUserData.length > 1) {
+ // check string simulairty of strasse, plz, stadt and atleast of 90% of each should be inside findUserData[].info
+ // if not, ont_sn = N/A - Anschluss konnte nicht zugeordnet werden
- const strasse = row[this.selectedColumns.anschlussstrasse];
- const plz = row[this.selectedColumns.anschlussplz];
- const stadt = row[this.selectedColumns.anschlusscity];
- const info = findUserData[0].info;
+ const strasse = row[this.selectedColumns.anschlussstrasse];
+ const plz = row[this.selectedColumns.anschlussplz];
+ const stadt = row[this.selectedColumns.anschlusscity];
+ const info = findUserData[0].info;
- for (let user of findUserData) {
- if (validateData(strasse, plz, stadt, info)) {
- const username = user.username;
- const radacctResponse = await fetch(window.TT_CONFIG['BASE_PATH'] + '/Radius/proxyUnsecureHTTPRequestToRadius?skipAdditional=true&action2=fetchRadacct&username=' + username);
- const radacctData = await radacctResponse.json();
+ for (let user of findUserData) {
+ if (validateData(strasse, plz, stadt, info)) {
+ const username = user.username;
+ const radacctResponse = await fetch(window.TT_CONFIG['BASE_PATH'] + '/Radius/proxyUnsecureHTTPRequestToRadius?skipAdditional=true&action2=fetchRadacct&username=' + username);
+ const radacctData = await radacctResponse.json();
- row.ont_sn = radacctData.ont_sn || 'N/A - Keine ONT SN gefunden';
- processedRows.push(row);
- continue mainLoop;
+ row.ont_sn = radacctData.ont_sn || 'N/A - Keine ONT SN gefunden';
+ processedRows.push(row);
+ continue mainLoop;
+ }
}
- }
- row.ont_sn = 'N/A - Anschluss konnte nicht zugeordnet werden';
- processedRows.push(row);
+ row.ont_sn = 'N/A - Anschluss konnte nicht zugeordnet werden';
+ processedRows.push(row);
+ }
}
- }
this.loading = false;
this.processedData = processedRows;
@@ -321,150 +317,151 @@ Vue.component('radius-online-state', {
Vue.component('radius', {
template: `
-
-
- Radius
-
+
+
+ Radius
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
Freie NAT Benutzer ({{ freeNatUsers.length }})
-
-
-
-
Freie STF Benutzer ({{ freeStfUsers.length }})
-
-
-
-
-
-
-
-
-
-
-
+
+
+
Freie NAT Benutzer ({{ freeNatUsers.length }})
+
+
+
+
Freie STF Benutzer ({{ freeStfUsers.length }})
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
- | Status: |
- {{ radacctData.online ? 'Online' : 'Offline' }} |
-
-
- | IP: |
- {{ radacctData.ip }} |
-
-
- | Username: |
- {{ radacctData.username }} |
-
-
- | Customer Number: |
- {{ radacctData.customerNumber }} |
-
-
- | Customer Name: |
- {{ radacctData.customerName }} |
-
-
- | Info: |
- {{ radacctData.info }} |
-
-
- | WLAN Password: |
- {{ radacctData.wlanPassword }} |
-
-
- | Bandbreite: |
- {{ radacctData.actualBandwidth }} |
-
-
-
-
-
- `,
+
+
+
+
+ | Status: |
+ {{ radacctData.online ? 'Online' : 'Offline' }} |
+
+
+ | IP: |
+ {{ radacctData.ip }} |
+
+
+ | Username: |
+ {{ radacctData.username }} |
+
+
+ | Customer Number: |
+ {{ radacctData.customerNumber }} |
+
+
+ | Customer Name: |
+ {{ radacctData.customerName }} |
+
+
+ | Info: |
+ {{ radacctData.info }} |
+
+
+ | WLAN Password: |
+ {{ radacctData.wlanPassword }} |
+
+
+ | Bandbreite: |
+ {{ radacctData.actualBandwidth }} |
+
+
+
+
+
+ `,
data() {
return {
view: 'radius',
@@ -474,6 +471,7 @@ Vue.component('radius', {
freeStfUsers: [],
username: '',
info: '',
+ ip: '',
custnum: '',
window: window,
showRadacctModal: false,
@@ -503,6 +501,7 @@ Vue.component('radius', {
username: this.username,
info: this.info,
custnum: custnum,
+ ip: this.ip,
});
const response = await fetch(`${window.TT_CONFIG['BASE_PATH']}/Radius/proxyUnsecureHTTPRequestToRadius?${params.toString()}`);
if (response.ok) {
@@ -821,4 +820,4 @@ Vue.component('radius-ont-finder', {
console.warn(`Global TT_CONFIG.BASE_PATH not found. API calls will use fallback path: ${this.apiBasePath}`);
}
}
-});
+});
\ No newline at end of file