edgecommander / edge-commander Goto Github PK
View Code? Open in Web Editor NEWDevice Management & Monitoring Application
Device Management & Monitoring Application
/ - Dashboard
/nvrs
/nvrs/23323/
/sims/
/sims/23232
/status
/sites/
/sites/waxie
/routers/
/routers/32423
etc.
We discussed this for Evercam.
One of the reasons you're doing this is to learn how swagger (now OpenAPI) works and how it can be done really nicely...
The API endpoints will be api.edgecommander.com/v1/....
Think carefully about how you want them to look, this can easily be done badly.
A site is an aggregation of SIM, Router, NVR it has a name & location.
In the future this may be one to many, but I think the first version should be 1:1
It is optional to add SIM, Router, Name, Location. Name is not optional.
2 new columns:
Today our SIM DB is populated only from Three
I have a few Vodafone SIMS that we can add either:
a) manually
b) by there being correspondence via nexmo
This means also, I guess, that there will be a new field for SIMS such as "Provider" ... needs discussion.
i.e. MB should be in title, only.
Also, if .00 then do not show decimal places.
We check usage each day.
For each time SIM > 90%, send an email to user
Go through each of them and fix them.
05:08:06.301 [error] Task #PID<0.577.0> started from #PID<0.576.0> terminating
2018-01-31T05:08:06.301671+00:00 app[web.1]: ** (BadMapError) expected a map, got: nil
2018-01-31T05:08:06.301672+00:00 app[web.1]: (stdlib) :maps.remove("reason", nil)
2018-01-31T05:08:06.301674+00:00 app[web.1]: (edge_commander) lib/edge_commander/monitors/portable.ex:67: EdgeCommander.Portable.update_nvr_status/3
2018-01-31T05:08:06.301676+00:00 app[web.1]: (elixir) lib/enum.ex:675: Enum."-each/2-lists^foreach/1-0-"/2
2018-01-31T05:08:06.301678+00:00 app[web.1]: (elixir) lib/enum.ex:675: Enum.each/2
2018-01-31T05:08:06.301680+00:00 app[web.1]: (quantum) lib/quantum/executor.ex:98: Quantum.Executor.execute_task/1
2018-01-31T05:08:06.301681+00:00 app[web.1]: (elixir) lib/task/supervised.ex:85: Task.Supervised.do_apply/2
2018-01-31T05:08:06.301683+00:00 app[web.1]: (elixir) lib/task/supervised.ex:36: Task.Supervised.reply/5
2018-01-31T05:08:06.301685+00:00 app[web.1]: (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
2018-01-31T05:08:06.301687+00:00 app[web.1]: Function: #Function<6.79063667/0 in Quantum.Executor.run/3>
2018-01-31T05:08:06.301689+00:00 app[web.1]: Args: []
2018-01-31T05:08:18.959582+00:00 app[web.1]: 05:08:18.959 request_id=33dc4f54-77a2-4464-bebc-a7291c15d74f [info] GET /delivery_receipt
2018-01-31T05:08:18.963225+00:00 app[web.1]: 05:08:18.963 [error] #PID<0.582.0> running EdgeCommanderWeb.Endpoint terminated
2018-01-31T05:08:18.961736+00:00 app[web.1]: 05:08:18.961 request_id=33dc4f54-77a2-4464-bebc-a7291c15d74f [info] Sent 500 in 2ms
2018-01-31T05:08:18.963227+00:00 app[web.1]: Server: app.edgecommander.com:80 (http)
2018-01-31T05:08:18.963229+00:00 app[web.1]: Request: GET /delivery_receipt?msisdn=353867514314&to=353872705838&network-code=27202&messageId=0D0000007780398E&price=0.05850000&status=accepted&scts=1801301203&err-code=1&client-ref=SMe672cfdbf11d067f&message-timestamp=2018-01-30+12%3A03%3A37
2018-01-31T05:08:18.963230+00:00 app[web.1]: ** (exit) an exception was raised:
2018-01-31T05:08:18.963231+00:00 app[web.1]: ** (FunctionClauseError) no function clause matching in EdgeCommander.Nexmo.SimMessages.changeset/2
2018-01-31T05:08:18.963233+00:00 app[web.1]: (edge_commander) lib/edge_commander/nexmo/sim_messages.ex:20: EdgeCommander.Nexmo.SimMessages.changeset(nil, %{status: "accepted"})
2018-01-31T05:08:18.963236+00:00 app[web.1]: (edge_commander) lib/edge_commander_web/controllers/sims_controller.ex:1: EdgeCommanderWeb.SimsController.action/2
2018-01-31T05:08:18.963234+00:00 app[web.1]: (edge_commander) lib/edge_commander_web/controllers/sims_controller.ex:161: EdgeCommanderWeb.SimsController.delivery_receipt/2
2018-01-31T05:08:18.963237+00:00 app[web.1]: (edge_commander) lib/edge_commander_web/controllers/sims_controller.ex:1: EdgeCommanderWeb.SimsController.phoenix_controller_pipeline/2
2018-01-31T05:08:18.963238+00:00 app[web.1]: (edge_commander) lib/edge_commander_web/endpoint.ex:1: EdgeCommanderWeb.Endpoint.instrument/4
2018-01-31T05:08:18.963240+00:00 app[web.1]: (phoenix) lib/phoenix/router.ex:278: Phoenix.Router.__call__/1
2018-01-31T05:08:18.963241+00:00 app[web.1]: (edge_commander) lib/edge_commander_web/endpoint.ex:1: EdgeCommanderWeb.Endpoint.plug_builder_call/2
2018-01-31T05:08:18.967190+00:00 app[web.1]: 05:08:18.966 request_id=28944cf1-7582-479f-beb7-63bc76821bb6 [info] GET /delivery_receipt
2018-01-31T05:08:18.963243+00:00 app[web.1]: (edge_commander) lib/edge_commander_web/endpoint.ex:1: EdgeCommanderWeb.Endpoint.call/2
2018-01-31T05:08:18.968943+00:00 app[web.1]: 05:08:18.968 request_id=28944cf1-7582-479f-beb7-63bc76821bb6 [info] Sent 500 in 1ms
2018-01-31T05:08:18.970444+00:00 app[web.1]: 05:08:18.970 [error] #PID<0.583.0> running EdgeCommanderWeb.Endpoint terminated
2018-01-31T05:08:18.970449+00:00 app[web.1]: Request: GET /delivery_receipt?msisdn=353867514314&to=353872705838&network-code=27202&messageId=0D0000007780398E&price=0.05850000&status=delivered&scts=1801301203&err-code=0&client-ref=SMe672cfdbf11d067f&message-timestamp=2018-01-30+12%3A03%3A39
2018-01-31T05:08:18.970446+00:00 app[web.1]: Server: app.edgecommander.com:80 (http)
2018-01-31T05:08:18.970451+00:00 app[web.1]: ** (exit) an exception was raised:
2018-01-31T05:08:18.970453+00:00 app[web.1]: ** (FunctionClauseError) no function clause matching in EdgeCommander.Nexmo.SimMessages.changeset/2
2018-01-31T05:08:18.970457+00:00 app[web.1]: (edge_commander) lib/edge_commander_web/controllers/sims_controller.ex:161: EdgeCommanderWeb.SimsController.delivery_receipt/2
2018-01-31T05:08:18.970459+00:00 app[web.1]: (edge_commander) lib/edge_commander_web/controllers/sims_controller.ex:1: EdgeCommanderWeb.SimsController.action/2
2018-01-31T05:08:18.970455+00:00 app[web.1]: (edge_commander) lib/edge_commander/nexmo/sim_messages.ex:20: EdgeCommander.Nexmo.SimMessages.changeset(nil, %{status: "delivered"})
2018-01-31T05:08:18.970461+00:00 app[web.1]: (edge_commander) lib/edge_commander_web/controllers/sims_controller.ex:1: EdgeCommanderWeb.SimsController.phoenix_controller_pipeline/2
2018-01-31T05:08:18.970463+00:00 app[web.1]: (edge_commander) lib/edge_commander_web/endpoint.ex:1: EdgeCommanderWeb.Endpoint.instrument/4
2018-01-31T05:08:18.970465+00:00 app[web.1]: (phoenix) lib/phoenix/router.ex:278: Phoenix.Router.__call__/1
2018-01-31T05:08:18.970466+00:00 app[web.1]: (edge_commander) lib/edge_commander_web/endpoint.ex:1: EdgeCommanderWeb.Endpoint.plug_builder_call/2
2018-01-31T05:08:18.970468+00:00 app[web.1]: (edge_commander) lib/edge_commander_web/endpoint.ex:1: EdgeCommanderWeb.Endpoint.call/2
2018-01-31T05:08:18.963431+00:00 heroku[router]: at=info method=GET path="/delivery_receipt?msisdn=353867514314&to=353872705838&network-code=27202&messageId=0D0000007780398E&price=0.05850000&status=accept
Ability to add users who have access to your account
... This should avoid you having to have the "inbound" / "outbound" flag ... you wont need this if you do ALIGN RIGHT / ALIGN LEFT
My guess is that this would mean few DB rows with no loss of information.
Remove Left Nav: Dashboard & Password Generator
It seems that all pages have a title which repeats their name in the left nav. Remove that (and save vertical space).
Default to SIMS report.
Remove Footer
Users have rights on a device Read Only or Full (these are called Roles). It's the same as Evercam really.
We will also add Teams. See relevant issue.
ask @marcoherbst
When HTTP port is down, but SDK port is still working (consistently for more than, say, 2 mins), then send an SDK reboot command.
If one has been sent within last 6 hours, do not send another one.
This will need a demo from Faisal and then Wireshark to work out what the command is.
2 Conditions must be true:
My guess is that you will need us to find an example of one of these NVRs so we can do this test.
If this project ever gets legs, one way to make it more widely accessible to a technical / self-hosting community might be: https://devcenter.heroku.com/articles/heroku-button
Alternatively / Additionally we'll probably host it ourselves with the ability for users to sign in / sign up.
Ability to send SMS & read SMS from https://www.nexmo.com/pricing
List all SMS received from / sent to a SIM
... not to pop up.
New page has 2 Tabs: Graph & Table
Table is results of recent data readings.
Maybe this:
https://onepagelove.com/namari
If there are no better ideas, and this template etc. is suitable, then I'd suggest using Github pages static hosting for this. We'll need to configure domains etc.
It might be better to have this all in the same repo and all on Heroku, I don't know.
I think:
www.edgecommander.com is the public site by default and
app.edgecommander.com will be the dashboard (or use /app if you prefer).
Scan the QR code to add the device. See if you can do this. You'll need a QR code reading API and will also need to access the USB camera via browser.
Needs discussion. At the simplest level, it's just associating a site with a Zoho Account Name so that we can:
M
Really I don't know what will be on the / homepage, but it should not be NVRs.
It will be something. Maybe some kind of summary of activity or the first 10 rows from all tables in one view. Something like that.
Main point: The other reports (nvrs, status etc.) all are subheadings.
Key point here is to show the nature of the error, not just the status.
Green = online
All other status = red
The task is to either prove that it is an issue on the Three website or an issue with our software.
Create the possibility of adding a generic device.
This means user enters:
Username
Password
HTTP URL
(maybe) Auth Type:
and, whatever the response is gets formatted and displayed in a table under a left nav item "Other"
We may have to have a 2nd step where the user defines a new "Device Type" .....
This is not a small task, but a proof of concept would be very interesting to see, it makes EdgeComm universal
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.