[TASK] Replace site with domain

This commit is contained in:
Geno 2018-10-07 15:04:12 +02:00 committed by Xaver Maierhofer
parent fd9eab724b
commit bc82e07354
10 changed files with 23 additions and 24 deletions

View File

@ -81,8 +81,8 @@ module.exports = function () {
'value': 'Autoupdate'
},
{
'name': 'node.site',
'value': 'Site'
'name': 'node.domain',
'value': 'Domain'
},
{
'name': 'node.clients',

View File

@ -109,13 +109,13 @@ module.exports = function () {
12.8917
]
],
'siteNames': [
'domainNames': [
{
'site': 'ffrgb-bat15',
'domain': 'ffrgb-bat15',
'name': 'Regensburg'
},
{
'site': 'ffrgb',
'domain': 'ffrgb',
'name': 'Regensburg'
}
],
@ -131,4 +131,3 @@ module.exports = function () {
]
};
};

View File

@ -15,7 +15,7 @@ define(['d3-interpolate', 'snabbdom', 'utils/version', 'filters/genericnode', 'h
var autoTable;
var gatewayTable;
var gateway6Table;
var siteTable;
var domainTable;
function count(nodes, key, f) {
var dict = {};
@ -108,10 +108,10 @@ define(['d3-interpolate', 'snabbdom', 'utils/version', 'filters/genericnode', 'h
return _.t('node.deactivated');
});
var siteDict = count(nodes, ['site_code'], function (d) {
if (config.siteNames) {
config.siteNames.forEach(function (t) {
if (d === t.site) {
var domainDict = count(nodes, ['domain'], function (d) {
if (config.domainNames) {
config.domainNames.forEach(function (t) {
if (d === t.domain) {
d = t.name;
}
});
@ -138,7 +138,7 @@ define(['d3-interpolate', 'snabbdom', 'utils/version', 'filters/genericnode', 'h
gateway6Table = fillTable('node.selectedGatewayIPv6', gateway6Table, gateway6Dict.sort(function (a, b) {
return b[1] - a[1];
}));
siteTable = fillTable('node.site', siteTable, siteDict.sort(function (a, b) {
domainTable = fillTable('node.domain', domainTable, domainDict.sort(function (a, b) {
return b[1] - a[1];
}));
};
@ -151,7 +151,7 @@ define(['d3-interpolate', 'snabbdom', 'utils/version', 'filters/genericnode', 'h
self.renderSingle(el, 'node.update', autoTable);
self.renderSingle(el, 'node.selectedGatewayIPv4', gatewayTable);
self.renderSingle(el, 'node.selectedGatewayIPv6', gateway6Table);
self.renderSingle(el, 'node.site', siteTable);
self.renderSingle(el, 'node.domain', domainTable);
if (config.globalInfos) {
var images = document.createElement('div');

View File

@ -68,11 +68,11 @@ define(['snabbdom', 'helper', 'moment'], function (V, helper, moment) {
return showBar(Math.round(d.memory_usage * 100) + ' %', d.memory_usage, d.memory_usage >= 0.8);
};
self.showSite = function showSite(d) {
var rt = d.site_code;
if (config.siteNames) {
config.siteNames.forEach(function (t) {
if (d.site_code === t.site) {
self.showDomain = function showDomain(d) {
var rt = d.domain;
if (config.domainNames) {
config.domainNames.forEach(function (t) {
if (d.domain === t.domain) {
rt = t.name;
}
});

View File

@ -17,7 +17,7 @@
"hardware": "Model hardwaru",
"visible": "Visible on the map",
"update": "Automatický update",
"site": "Site",
"domain": "Domain",
"gateway": "Brána",
"coordinates": "Souřadnice",
"contact": "Kontakt",

View File

@ -17,7 +17,7 @@
"hardware": "Geräte-Modell",
"visible": "Auf der Karte sichtbar",
"update": "Auto-Update",
"site": "Site",
"domain": "Domain",
"gateway": "Gateway",
"coordinates": "Koordinaten",
"contact": "Kontakt",

View File

@ -17,7 +17,7 @@
"hardware": "Hardware model",
"visible": "Visible on the map",
"update": "Auto update",
"site": "Site",
"domain": "Domain",
"gateway": "Gateway",
"coordinates": "Coordinates",
"contact": "Contact",

View File

@ -17,7 +17,7 @@
"hardware": "Modèle matériel",
"visible": "Visible sur la carte",
"update": "Mise à jour automatique",
"site": "Site",
"domain": "Domain",
"gateway": "Passerelle",
"coordinates": "Coordonnées",
"contact": "Contact",

View File

@ -17,7 +17,7 @@
"hardware": "Тип оборудования",
"visible": "Видно на карте",
"update": "Автообновление",
"site": "Сайт",
"domain": "Сайт",
"gateway": "Шлюз",
"coordinates": "Координаты",
"contact": "Контакты",

View File

@ -17,7 +17,7 @@
"hardware": "Donanım modeli",
"visible": "Harita üzerinde görünür",
"update": "Otomatik güncelleme",
"site": "Site",
"domain": "Domain",
"gateway": "Geçit",
"coordinates": "Koordinatlar",
"contact": "İlişki",