Allow to filter and sort by site.
This commit is contained in:
parent
3b78215b5d
commit
683937539b
|
@ -158,6 +158,7 @@ Dann die `config.json` anpassen nach belieben. Es gibt die folgenden Konfigurati
|
|||
* **`client.community.name`** Name der Freifunk-Community, z. B.: `"Freifunk Musterstadt"`
|
||||
* **`client.community.domain`** Domain der Freifunk-Community, z. B.: `"musterstadt.freifunk.net"`
|
||||
* **`client.community.contactEmail`** Kontakt-E-Mail-Adresse der Freifunk-Community, z. B.: `"kontakt@musterstadt.freifunk.net"`
|
||||
* **`client.community.sites`** Liste der gültige Site-Codes in der `nodes.json`, z. B.: `["ffms-domain1", "ffms-domain2"]`
|
||||
|
||||
* **`client.map.mapUrl`** URL der Knotenkarte, z. B.: `"http://map.musterstadt.freifunk.net"`
|
||||
|
||||
|
|
|
@ -46,6 +46,15 @@ angular.module('ffffngAdmin').config(function(NgAdminConfigurationProvider, Rest
|
|||
|
||||
var pathPrefix = config.rootPath === '/' ? '' : config.rootPath;
|
||||
|
||||
var siteChoices = [];
|
||||
for (var i = 0; i < config.community.sites.length; i++) {
|
||||
var site = config.community.sites[i];
|
||||
siteChoices.push({
|
||||
label: site,
|
||||
value: site
|
||||
});
|
||||
}
|
||||
|
||||
admin
|
||||
.header(
|
||||
'<div class="navbar-header">' +
|
||||
|
@ -90,7 +99,6 @@ angular.module('ffffngAdmin').config(function(NgAdminConfigurationProvider, Rest
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
var nodes = nga.entity('nodes').label('Nodes').identifier(nga.field('token'));
|
||||
nodes
|
||||
.listView()
|
||||
|
@ -140,6 +148,10 @@ angular.module('ffffngAdmin').config(function(NgAdminConfigurationProvider, Rest
|
|||
'<div class="input-group">' +
|
||||
'<input type="text" ng-model="value" placeholder="Search" class="form-control"></input>' +
|
||||
'<span class="input-group-addon"><i class="fa fa-search"></i></span></div>'),
|
||||
nga.field('site', 'choice')
|
||||
.label('Site')
|
||||
.pinned(false)
|
||||
.choices(siteChoices),
|
||||
nga.field('hasKey', 'choice')
|
||||
.label('VPN key')
|
||||
.pinned(false)
|
||||
|
|
|
@ -41,7 +41,8 @@
|
|||
"community": {
|
||||
"name": "Freifunk Musterstadt",
|
||||
"domain": "musterstadt.freifunk.net",
|
||||
"contactEmail": "kontakt@musterstadt.freifunk.net"
|
||||
"contactEmail": "kontakt@musterstadt.freifunk.net",
|
||||
"sites": ["ffms-domain1", "ffms-domain2"]
|
||||
},
|
||||
"map": {
|
||||
"mapUrl": "http://map.musterstadt.freifunk.net"
|
||||
|
|
|
@ -96,7 +96,8 @@ var defaultConfig = {
|
|||
community: {
|
||||
name: 'Freifunk Musterstadt',
|
||||
domain: 'musterstadt.freifunk.net',
|
||||
contactEmail: 'kontakt@musterstadt.freifunk.net'
|
||||
contactEmail: 'kontakt@musterstadt.freifunk.net',
|
||||
sites: []
|
||||
},
|
||||
map: {
|
||||
mapUrl: 'http://map.musterstadt.freifunk.net'
|
||||
|
|
|
@ -143,6 +143,7 @@ angular.module('ffffng').factory('NodeResource', function (
|
|||
'email',
|
||||
'token',
|
||||
'mac',
|
||||
'site',
|
||||
'key',
|
||||
'onlineState'
|
||||
],
|
||||
|
@ -159,6 +160,7 @@ angular.module('ffffng').factory('NodeResource', function (
|
|||
'token',
|
||||
'mac',
|
||||
'key',
|
||||
'site',
|
||||
'coords',
|
||||
'onlineState',
|
||||
'monitoringState'
|
||||
|
|
Loading…
Reference in a new issue