sipcapture / homer-app Goto Github PK
View Code? Open in Web Editor NEWHOMER 7.x Front-End and API Server
Home Page: http://sipcapture.io
License: GNU Affero General Public License v3.0
HOMER 7.x Front-End and API Server
Home Page: http://sipcapture.io
License: GNU Affero General Public License v3.0
The last search parameters are not cached and reapplied on page refresh/reload as intended.
Edit: minimal feature as per ui-grid preferences
the last container for homer-app have an issue with the migration, see 929a045
It would be great if you could push an update!
Additionally it seems the latest
tag is missing on the last docker images, I'm getting an error when I try to pull homer-app
$docker pull sipcapture/homer-app
Using default tag: latest
Error response from daemon: manifest for sipcapture/homer-app:latest not found
Debug: internal, implementation, error
TypeError: Uncaught error: Cannot read property 'length' of undefined
at /media/trex/safe1/Development/qxip/homer-app/server/classes/searchdata.js:38:24
at /media/trex/safe1/Development/qxip/homer-app/node_modules/lodash/lodash.js:4887:15
at forEach (/media/trex/safe1/Development/qxip/homer-app/node_modules/lodash/lodash.js:9344:14)
at SearchData.getSearchData (/media/trex/safe1/Development/qxip/homer-app/server/classes/searchdata.js:37:9)
at handler (/media/trex/safe1/Development/qxip/homer-app/server/routes/search.js:30:18)
at Object.internals.handler (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/handler.js:101:51)
at request._protect.run (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/handler.js:32:23)
at module.exports.internals.Protect.internals.Protect.run (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/protect.js:60:12)
at exports.execute (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/handler.js:26:22)
at each (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/request.js:401:16)
at iterate (/media/trex/safe1/Development/qxip/homer-app/node_modules/items/lib/index.js:36:13)
at done (/media/trex/safe1/Development/qxip/homer-app/node_modules/items/lib/index.js:28:25)
at postValidate (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/validation.js:70:20)
at internals.Object._validateWithOptions (/media/trex/safe1/Development/qxip/homer-app/node_modules/joi/lib/types/any/index.js:671:20)
at module.exports.internals.Any.root.validate (/media/trex/safe1/Development/qxip/homer-app/node_modules/joi/lib/index.js:139:23)
at Object.internals.input (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/validation.js:144:20)
Like in homer5 so you can search for 0123 or +49123
bundle.js:61708 Transition Rejection($id: 37 type: 2, message: The transition has been superseded by a different transition, detail: Transition#58( 'hepic.search'{"protoID":"call","limit":200,"from":1548869533615,"to":1548870133616,"custom":"Last 10 Minutes","timezone":{"value":-60,"name":"Local"},"search":{"1_call":[]},"transaction":{}} -> 'hepic.search'{"protoID":"call","limit":200,"from":1548869982948,"to":1548870582950,"custom":"Last 10 Minutes","timezone":{"value":-60,"name":"Local"},"search":{"1_call":[]},"transaction":{}} ))
TODO:
The QOS Tab (RT*P Statistics) in Session Details is not hidden when there is no data available. The same logic works for Logs Tab.
LOGS in CFLOW are displayed out of sequence position, despite the correct timestamp
The ui-grid multi select feature is currently not resulting in multiple sessions displayed or aggregated when multiple rows are selected
The UI-Grid column preferences are not being saved / restored and do not persist across user sessions.
The UI-Grid results size not being expanded correctly to fill the page height
Hi,
I wanted to take a closer look at the performance and noticed this in the logs:
omer-webapp | FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
homer-webapp | 1: node::Abort() [node]
homer-webapp | 2: 0x8ccf9c [node]
homer-webapp | 3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
homer-webapp | 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
homer-webapp | 5: v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [node]
homer-webapp | 6: v8::internal::String::SlowFlatten(v8::internal::Handlev8::internal::ConsString, v8::internal::PretenureFlag) [node]
homer-webapp | 7: v8::internal::String::Flatten(v8::internal::Handlev8::internal::String, v8::internal::PretenureFlag) [node]
homer-webapp | 8: v8::String::WriteUtf8(char*, int, int*, int) const [node]
homer-webapp | 9: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Localv8::Value, node::encoding, int*) [node]
homer-webapp | 10: node::Buffer::New(v8::Isolate*, v8::Localv8::String, node::encoding) [node]
homer-webapp | 11: 0x8e9444 [node]
homer-webapp | 12: v8::internal::FunctionCallbackArguments::Call(void ()(v8::FunctionCallbackInfov8::Value const&)) [node]
homer-webapp | 13: 0xb0d72c [node]
homer-webapp | 14: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate) [node]
homer-webapp | 15: 0x3222ca0042fd
homer-webapp |
homer-webapp | <--- Last few GCs --->
homer-webapp |
homer-webapp | [48:0x31d2070] 2062045 ms: Mark-sweep 1237.1 (1448.2) -> 1237.0 (1460.2) MB, 900.9 / 0.0 ms allocation failure GC in old space requested
homer-webapp | [48:0x31d2070] 2063343 ms: Mark-sweep 1237.0 (1460.2) -> 1236.9 (1414.7) MB, 1296.6 / 0.0 ms last resort GC in old space requested
homer-webapp | [48:0x31d2070] 2064058 ms: Mark-sweep 1236.9 (1414.7) -> 1236.9 (1403.7) MB, 714.8 / 0.0 ms last resort GC in old space requested
homer-webapp |
homer-webapp |
homer-webapp | <--- JS stacktrace --->
homer-webapp |
homer-webapp | ==== JS stack trace =========================================
homer-webapp |
homer-webapp | Security context: 0x449c80a58b9
homer-webapp | 1: fromString(aka fromString) [buffer.js:314] [bytecode=0x3f3a7934bb59 offset=164](this=0x3fed53b022d1 ,string=0x127689b7e999 <Very long string[214953774]>,encoding=0x449c80b4e41 <String[4]: utf8>)
homer-webapp | 2: from [buffer.js:177] [bytecode=0x3f3a7934b661 offset=11](this=0x17df161b5de9 <JSFunction Buffer (sfi = 0x449c80fda69)>,value=0x127689b7e999 <Very long string[214953774]>,encodingO...
Traffic is quite decent and database has about 10M call rows. For me it's not so clear why JavaScript runs out of memory. I did nothing special just picked a 24h timeframe.
Maybe it would be good to show the user errors like the following in the ui and not only in console:
"fail to add user: child "email" fails because ["email" length must be at least 6 characters long]"
Hi,
I'm testing heplify-server with homer7 UI, and heplify-server writes register messages to hep_proto_1_register, but the UI tries to select from hep_proto_1_registration ("ERROR: relation "hep_proto_1_registration" does not exist").
How should I adjust the configuration, that heplify-server and the ui use the same table names?
Another issue I have, is that the A-Leg and B-Leg of a call are not connected in the UI ("Flow" only shows A-Leg or B-Leg separatly, not both together). This is working with the old Kamailio+homer5 setup, so I would expect that the pbx (FreeSwitch 1.9 with integrated HEP Capture Agent) sends the required information. I'm not sure whether this is an issue of my heplify-server or homer-app config.
From dev console. This is more cosmetic but still doesn't look good.
bundle.js:207152 TypeError: Cannot read property 'error' of undefined
at bundle.js:348938
at processQueue (bundle.js:209521)
at bundle.js:209569
at Scope.$digest (bundle.js:210704)
at Scope.$apply (bundle.js:211001)
at done (bundle.js:204979)
at completeRequest (bundle.js:205223)
at XMLHttpRequest.requestLoaded (bundle.js:205140) "Possibly unhandled rejection: {}"
(anonymous) @ bundle.js:207152
(anonymous) @ bundle.js:203570
processChecks @ bundle.js:209551
$digest @ bundle.js:210704
$apply @ bundle.js:211001
done @ bundle.js:204979
completeRequest @ bundle.js:205223
requestLoaded @ bundle.js:205140
load (async)
(anonymous) @ bundle.js:205123
sendReq @ bundle.js:204924
serverRequest @ bundle.js:204672
processQueue @ bundle.js:209521
(anonymous) @ bundle.js:209569
$digest @ bundle.js:210704
$apply @ bundle.js:211001
(anonymous) @ bundle.js:219832
dispatch @ bundle.js:168701
elemData.handle @ bundle.js:168509
bundle.js:348949 SELECTED PROTO
bundle.js:348963 LEN 3
bundle.js:348978 SELECTED PROFILE YES
bundle.js:207152 TypeError: Cannot read property 'value' of undefined
at ProtosearchWidgetSettings.onProfileSelect (bundle.js:348981)
at ProtosearchWidgetSettings.onProtoSelect (bundle.js:348965)
at fn (eval at compile (bundle.js:208003), :4:183)
at Scope.$eval (bundle.js:210894)
at bundle.js:218791
at Object. (bundle.js:221676)
at forEach (bundle.js:192760)
at Object.$$writeModelToScope (bundle.js:221674)
at writeToModelIfNeeded (bundle.js:221667)
at bundle.js:221661
at validationDone (bundle.js:221586)
at processAsyncValidators (bundle.js:221569)
at Object.$$runValidators (bundle.js:221513)
at Object.$$parseAndValidate (bundle.js:221654)
at Object.$commitViewValue (bundle.js:221620)
at Object.$$debounceViewValueCommit (bundle.js:221758)
(anonymous) @ bundle.js:207152
(anonymous) @ bundle.js:203570
(anonymous) @ bundle.js:221679
forEach @ bundle.js:192760
$$writeModelToScope @ bundle.js:221674
writeToModelIfNeeded @ bundle.js:221667
(anonymous) @ bundle.js:221661
validationDone @ bundle.js:221586
processAsyncValidators @ bundle.js:221569
$$runValidators @ bundle.js:221513
$$parseAndValidate @ bundle.js:221654
$commitViewValue @ bundle.js:221620
$$debounceViewValueCommit @ bundle.js:221758
$setViewValue @ bundle.js:221738
(anonymous) @ bundle.js:226052
$eval @ bundle.js:210894
$apply @ bundle.js:210993
(anonymous) @ bundle.js:226051
dispatch @ bundle.js:168701
elemData.handle @ bundle.js:168509
ListPicker._handleMouseUp
Feeding the system with JSON only events (Janus/MediaSoup) the CFLOW still looks up hep_proto_1_call
as opposed to the actual protocol type(s) selected and fails with:
error: "Service Unavailable"
message: "fail to get data main:Error: fail to get data fullerror: select "id", "sid", "protocol_header", "data_header", "raw", ROUND(EXTRACT(epoch FROM create_date)*1000) as create_date from "hep_proto_1_call" where "data_header"."callid" in ($1, $2) and "create_date" between $3 and $4 - relation "hep_proto_1_call" does not exist"
statusCode: 503
Opened a transaction and saw in dev console:
TypeError: data.map is not a function
bundle.js:360599 Uncaught (in promise) TypeError: Cannot read property 'values' of undefined
at CallDetailQos._configureChart (bundle.js:360599)
Without DB limits and decent datasets you will kill/eat your host memory pretty fast.
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0x12190dc [node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewStruct(v8::internal::InstanceType) [node]
Wanted to edit loki server but data field isn't populated
At the Search Results page in "settings" (upper left corner) drop down menu "Export visible data as excel" feature is broken
bundle.js:207225 ReferenceError: ExcelBuilder is not defined
at bundle.js:262583
at processQueue (bundle.js:209594)
at bundle.js:209642
at Scope.$digest (bundle.js:210777)
at Scope.$apply (bundle.js:211074)
at HTMLButtonElement. (bundle.js:219905)
at HTMLButtonElement.dispatch (bundle.js:168774)
at HTMLButtonElement.elemData.handle (bundle.js:168582) "Possibly unhandled rejection: {}"
(anonymous) @ bundle.js:207225
(anonymous) @ bundle.js:203643
processChecks @ bundle.js:209624
$digest @ bundle.js:210777
$apply @ bundle.js:211074
(anonymous) @ bundle.js:219905
dispatch @ bundle.js:168774
elemData.handle @ bundle.js:168582
Like RTCP
$ctrl.clearSearchForm()
)this is bug or feature?
Clicking from home dashboard preferences once will use route
preferences/users
clicking it again
/preferences
and you will see a empty page
I'm running the quick install Homer 7 and when attempting to login with admin/sipcapture i'm getting a 503 from the api service. I'm not able to connect to the running container to see what the logs look like. Any suggestions or known issues?
Now the minimum length is 8 chars. Original #55 (comment)
Without statistics widget there is still one call to
http://localhost:8880/api/v3/statistic/data
on timeframe change. This results in errors when influxdb isn't present.
I am unable to login using any known homer 7 frontend password combination with user "admin".
I am getting this in browser debug/developer tools: "[ "RequestResponseInterceptor" ]
Array [ "reponseError" ]
Unauthorized incorrect password"
I see users in homer_config database:
id | username | partid | email | firstname | lastname | department | usergroup | hash | guid | created_at
----+----------+--------+----------------+-----------+----------+------------+-----------+--------------------------------------------------------------+--------------------------------------+-------------------------------
1 | admin | 10 | root@localhost | Homer | Admin | NOC | admin | $2a$10$ae6Ljlb7nEsqUdQeN.Uztu1iAbx2VeEfgZQhVQgmIpdFA38OpbYui | 11111111-1111-1111-1111-111111111111 | 2018-08-15 18:54:47.721678+02
2 | support | 10 | root@localhost | Homer | Support | NOC | admin | $2a$10$ae6Ljlb7nEsqUdQeN.Uztu1iAbx2VeEfgZQhVQgmIpdFA38OpbYui | 22222222-2222-2222-2222-222222222222 | 2018-08-15 18:54:47.721678+02
(2 rows)
What am I missing and what is default admin password?
Thanks and kind regards,
Ivica
id column is ordered by word, not by numbers.
Implementing Loki Search using labels
FYI @negbie
Debug: internal, implementation, error
TypeError: Uncaught error: elems.forEach is not a function
at SearchData.getSearchData (/media/trex/safe1/Development/qxip/homer-app/server/classes/searchdata.js:36:15)
at handler (/media/trex/safe1/Development/qxip/homer-app/server/routes/search.js:30:18)
at Object.internals.handler (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/handler.js:101:51)
at request._protect.run (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/handler.js:32:23)
at module.exports.internals.Protect.internals.Protect.run (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/protect.js:60:12)
at exports.execute (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/handler.js:26:22)
at each (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/request.js:401:16)
at iterate (/media/trex/safe1/Development/qxip/homer-app/node_modules/items/lib/index.js:36:13)
at done (/media/trex/safe1/Development/qxip/homer-app/node_modules/items/lib/index.js:28:25)
at postValidate (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/validation.js:70:20)
at internals.Object._validateWithOptions (/media/trex/safe1/Development/qxip/homer-app/node_modules/joi/lib/types/any/index.js:671:20)
at module.exports.internals.Any.root.validate (/media/trex/safe1/Development/qxip/homer-app/node_modules/joi/lib/index.js:139:23)
at Object.internals.input (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/validation.js:144:20)
at exports.payload (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/validation.js:44:22)
at each (/media/trex/safe1/Development/qxip/homer-app/node_modules/hapi/lib/request.js:401:16)
at iterate (/media/trex/safe1/Development/qxip/homer-app/node_modules/items/lib/index.js:36:13)
Unfortunately the globalsettings should be loaded before results page will execute search request (SYNC vs ASYNC), because the parameteres are not availble in the scope
Homer UI use 'gid' field in requests, but it was deleted in heplify-server.
{"msec":13.167360999621451,"error":"select \"id\", \"sid\", \"gid\", \"protocol_header\", \"data_header\", ROUND(EXTRACT(epoch FROM create_date)*1000) as create_date from \"hep_proto_1_call\" where \"create_date\" between $1 and $2 - column \"gid\" does not exist","data":{"name":"error","length":206,"severity":"ERROR","code":"42703","hint":"Perhaps you meant to reference the column \"hep_proto_1_call.id\" or the column \"hep_proto_1_call.sid\".","position":"21","file":"parse_relation.c","line":"3311","routine":"errorMissingColumn","isBoom":true,"isServer":true,"output":{"statusCode":503,"payload":{"statusCode":503,"error":"Service Unavailable","message":"select \"id\", \"sid\", \"gid\", \"protocol_header\", \"data_header\", ROUND(EXTRACT(epoch FROM create_date)*1000) as create_date from \"hep_proto_1_call\" where \"create_date\" between $1 and $2 - column \"gid\" does not exist"},"headers":{}}}}
trex@cave:/media/trex/safe1/Development/qxip/homer-app$ grep -rn "new Buffer" server/
server/classes/pcap/index.js:30: this.buffer.write(new Buffer((new GlobalHeader(options)).toString(), Constants.HEADER_ENCODING));
server/classes/pcap/index.js:43: var ethernetBuffer = new Buffer([
server/classes/pcap/index.js:50: var ipBuffer = new Buffer([
server/classes/pcap/index.js:71: var tcpBuffer = new Buffer([
server/classes/pcap/index.js:98: var udpBuffer = new Buffer(8)
server/classes/pcap/index.js:115: this.buffer.write(new Buffer(ph.toString(), Constants.HEADER_ENCODING));
server/classes/pcap/textbuffer.js:33: this.buffer.write(new Buffer(packet.ts + " "+packet.sourceIp+":"+packet.sourcePort+" ---> "+packet.destinationIp + ":" + packet.destinationPort+"\r\n\r\n"));
Ref https://nodesource.com/blog/understanding-the-buffer-deprecation-in-node-js-10/
Preferences page suffers a provider bug in need of a check:
bundle.js:201129 Error: [$injector:unpr] Unknown provider: APP_PREF_SCHEMAProvider <- APP_PREF_SCHEMA <- UserService
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.