Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit bc82e07

Browse files
genofirexf-
authored andcommitted
[TASK] Replace site with domain
1 parent fd9eab7 commit bc82e07

File tree

10 files changed

+23
-24
lines changed

10 files changed

+23
-24
lines changed

config.default.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ module.exports = function () {
8181
'value': 'Autoupdate'
8282
},
8383
{
84-
'name': 'node.site',
85-
'value': 'Site'
84+
'name': 'node.domain',
85+
'value': 'Domain'
8686
},
8787
{
8888
'name': 'node.clients',

config.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ module.exports = function () {
109109
12.8917
110110
]
111111
],
112-
'siteNames': [
112+
'domainNames': [
113113
{
114-
'site': 'ffrgb-bat15',
114+
'domain': 'ffrgb-bat15',
115115
'name': 'Regensburg'
116116
},
117117
{
118-
'site': 'ffrgb',
118+
'domain': 'ffrgb',
119119
'name': 'Regensburg'
120120
}
121121
],
@@ -131,4 +131,3 @@ module.exports = function () {
131131
]
132132
};
133133
};
134-

lib/proportions.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ define(['d3-interpolate', 'snabbdom', 'utils/version', 'filters/genericnode', 'h
1515
var autoTable;
1616
var gatewayTable;
1717
var gateway6Table;
18-
var siteTable;
18+
var domainTable;
1919

2020
function count(nodes, key, f) {
2121
var dict = {};
@@ -108,10 +108,10 @@ define(['d3-interpolate', 'snabbdom', 'utils/version', 'filters/genericnode', 'h
108108
return _.t('node.deactivated');
109109
});
110110

111-
var siteDict = count(nodes, ['site_code'], function (d) {
112-
if (config.siteNames) {
113-
config.siteNames.forEach(function (t) {
114-
if (d === t.site) {
111+
var domainDict = count(nodes, ['domain'], function (d) {
112+
if (config.domainNames) {
113+
config.domainNames.forEach(function (t) {
114+
if (d === t.domain) {
115115
d = t.name;
116116
}
117117
});
@@ -138,7 +138,7 @@ define(['d3-interpolate', 'snabbdom', 'utils/version', 'filters/genericnode', 'h
138138
gateway6Table = fillTable('node.selectedGatewayIPv6', gateway6Table, gateway6Dict.sort(function (a, b) {
139139
return b[1] - a[1];
140140
}));
141-
siteTable = fillTable('node.site', siteTable, siteDict.sort(function (a, b) {
141+
domainTable = fillTable('node.domain', domainTable, domainDict.sort(function (a, b) {
142142
return b[1] - a[1];
143143
}));
144144
};
@@ -151,7 +151,7 @@ define(['d3-interpolate', 'snabbdom', 'utils/version', 'filters/genericnode', 'h
151151
self.renderSingle(el, 'node.update', autoTable);
152152
self.renderSingle(el, 'node.selectedGatewayIPv4', gatewayTable);
153153
self.renderSingle(el, 'node.selectedGatewayIPv6', gateway6Table);
154-
self.renderSingle(el, 'node.site', siteTable);
154+
self.renderSingle(el, 'node.domain', domainTable);
155155

156156
if (config.globalInfos) {
157157
var images = document.createElement('div');

lib/utils/node.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ define(['snabbdom', 'helper', 'moment'], function (V, helper, moment) {
6868
return showBar(Math.round(d.memory_usage * 100) + ' %', d.memory_usage, d.memory_usage >= 0.8);
6969
};
7070

71-
self.showSite = function showSite(d) {
72-
var rt = d.site_code;
73-
if (config.siteNames) {
74-
config.siteNames.forEach(function (t) {
75-
if (d.site_code === t.site) {
71+
self.showDomain = function showDomain(d) {
72+
var rt = d.domain;
73+
if (config.domainNames) {
74+
config.domainNames.forEach(function (t) {
75+
if (d.domain === t.domain) {
7676
rt = t.name;
7777
}
7878
});

locale/cz.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"hardware": "Model hardwaru",
1818
"visible": "Visible on the map",
1919
"update": "Automatický update",
20-
"site": "Site",
20+
"domain": "Domain",
2121
"gateway": "Brána",
2222
"coordinates": "Souřadnice",
2323
"contact": "Kontakt",

locale/de.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"hardware": "Geräte-Modell",
1818
"visible": "Auf der Karte sichtbar",
1919
"update": "Auto-Update",
20-
"site": "Site",
20+
"domain": "Domain",
2121
"gateway": "Gateway",
2222
"coordinates": "Koordinaten",
2323
"contact": "Kontakt",

locale/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"hardware": "Hardware model",
1818
"visible": "Visible on the map",
1919
"update": "Auto update",
20-
"site": "Site",
20+
"domain": "Domain",
2121
"gateway": "Gateway",
2222
"coordinates": "Coordinates",
2323
"contact": "Contact",

locale/fr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"hardware": "Modèle matériel",
1818
"visible": "Visible sur la carte",
1919
"update": "Mise à jour automatique",
20-
"site": "Site",
20+
"domain": "Domain",
2121
"gateway": "Passerelle",
2222
"coordinates": "Coordonnées",
2323
"contact": "Contact",

locale/ru.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"hardware": "Тип оборудования",
1818
"visible": "Видно на карте",
1919
"update": "Автообновление",
20-
"site": "Сайт",
20+
"domain": "Сайт",
2121
"gateway": "Шлюз",
2222
"coordinates": "Координаты",
2323
"contact": "Контакты",

locale/tr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"hardware": "Donanım modeli",
1818
"visible": "Harita üzerinde görünür",
1919
"update": "Otomatik güncelleme",
20-
"site": "Site",
20+
"domain": "Domain",
2121
"gateway": "Geçit",
2222
"coordinates": "Koordinatlar",
2323
"contact": "İlişki",

0 commit comments

Comments
 (0)