Skip to content

Commit

Permalink
Merge pull request #1 from MelvinTo/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
MelvinTo committed Aug 26, 2019
2 parents 0f2a17a + 06dbce5 commit 8a01179
Show file tree
Hide file tree
Showing 245 changed files with 11,044 additions and 9,051 deletions.
14 changes: 10 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"indent": [
"off",
Expand All @@ -12,8 +21,5 @@
"error",
"unix"
]
},
"parserOptions": {
"ecmaVersion": 2017
}
}
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,10 @@ api/db/token.json
/test
/.gitmodules
/extension/frp/frpc.ini

.tern-port
.tern-project

/bin/bitbridge7.rc
/extension/frp/frpc.support.ini
/extension/frp/frpc.support.service
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@

## Software Image
### Firewalla Blue
* Image in Beta Testing (invitation only)
* You can pre-order Firewalla Blue at https://www.indiegogo.com/projects/firewalla-blue-cybersecurity-for-home-business
* https://github.com/firewalla/firewalla/releases/download/v1.963/firewalla.blue.stable.0.28.img.gz
* sha256sum: 98e7110c26a9ff4b14eb2edb43aeffbcd1c058baef801d53799d64912202204b
* Flash image to micro sd card, and put into Firewalla Blue
* Guide: https://help.firewalla.com/hc/en-us/articles/115004796633-Tutorial-Flashing-Image
* You can order Firewalla Blue at https://firewalla.com
### Firewalla Red
* https://github.com/firewalla/firewalla/releases/download/v1.957/fos.release_6_14.armv7l.img.gz
* sha256sum: 896014e839a7198249b62b266664baaab529e1d8034261e1fa4a9599161288e4
* https://github.com/firewalla/firewalla/releases/download/v1.958/fos.release_6_16.armv7l.img.gz
* sha256sum: 7425195a1b04ff5fbe11910dc8cd31ceb8af0364e7cf0e5813dadc7ef8063273
* Flash image to micro sd card, and put into Firewalla Red
* Guide: https://help.firewalla.com/hc/en-us/articles/115004796633-Tutorial-Flashing-Image
* You can order Firewalla Red at https://firewalla.com
Expand Down
9 changes: 8 additions & 1 deletion alarm/Alarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const jsonfile = require('jsonfile');
const util = require('util');

const i18n = require('../util/i18n.js');
const fc = require('../net2/config.js')
const fc = require('../net2/config.js');
const moment = require('moment');

// let moment = require('moment');

Expand Down Expand Up @@ -200,6 +201,9 @@ class DeviceBackOnlineAlarm extends Alarm {
class DeviceOfflineAlarm extends Alarm {
constructor(timestamp, device, info) {
super("ALARM_DEVICE_OFFLINE", timestamp, device, info);
if (info && info["p.device.lastSeen"]) {
this['p.device.lastSeenTimezone'] = moment(info["p.device.lastSeen"]*1000).format('LT')
}
}

getManagementType() {
Expand Down Expand Up @@ -372,6 +376,9 @@ class OutboundAlarm extends Alarm {
constructor(type, timestamp, device, destinationID, info) {
super(type, timestamp ,device, info);
this["p.dest.id"] = destinationID;
if (this.timestamp) {
this["p.timestampTimezone"] = moment(this.timestamp*1000).format("LT")
}
}

requiredKeys() {
Expand Down
Loading

0 comments on commit 8a01179

Please sign in to comment.