diff --git a/src/web/aprsc.js b/src/web/aprsc.js index fa83e58..21f8194 100644 --- a/src/web/aprsc.js +++ b/src/web/aprsc.js @@ -93,7 +93,13 @@ var key_tooltips = { -/* ******** NEW angular.js ********* */ +/* filters */ + +/* return only port of an addr:port string */ +function onlyport(s) +{ + return s.substr(s.lastIndexOf(':') + 1); +} function ratestr(rate) { @@ -359,6 +365,7 @@ var app = angular.module('aprsc', [ 'pascalprecht.translate', 'graph', 'ngDialog app.filter('duration', function() { return dur_str; }); app.filter('datetime', function() { return timestr; }); app.filter('ratestr', function() { return ratestr; }); +app.filter('onlyport', function() { return onlyport; }); app.controller('aprscc', [ '$scope', '$http', 'graphs', 'ngDialog', '$sce', function($scope, $http, graphs, ngDialog, $sce) { console.log('aprsc init'); diff --git a/src/web/index.html b/src/web/index.html index b746d1f..31d2ee6 100644 --- a/src/web/index.html +++ b/src/web/index.html @@ -207,7 +207,7 @@ ng-click="changeSorting(clients_sort, k)">{{ 'TH_' + k | translate }}