Compare commits

...
9 Commits
6 changed files with 16 additions and 8 deletions

No files matched your search

+2 -2
View File
@@ -54,11 +54,11 @@ You may now proceed with installing [GenieACS GUI front end](https://github.com/
## Support ## Support
Documentation is still work in progress. Feel free to contact me if you require any assistance in installation, configuration, or using the APIs. Documentation is work in progress. Contact <support@genieacs.com> for any inquiry about installation, configuration, or using the API.
You may submit bug reports or feature requests [here](https://github.com/zaidka/genieacs/issues). You may submit bug reports or feature requests [here](https://github.com/zaidka/genieacs/issues).
For commercial support options, please contact me. For commercial support options, please visit [genieacs.com](http://genieacs.com).
## Contributing ## Contributing
+1 -1
View File
@@ -244,7 +244,7 @@ listener = (request, response) ->
else if TASKS_REGEX.test(urlParts.pathname) else if TASKS_REGEX.test(urlParts.pathname)
r = TASKS_REGEX.exec(urlParts.pathname) r = TASKS_REGEX.exec(urlParts.pathname)
taskId = mongodb.ObjectID(querystring.unescape(r[1])) taskId = mongodb.ObjectID(querystring.unescape(r[1]))
action = try querystring.unescape(r[2]) action = r[2]
if not action? or action is '/' if not action? or action is '/'
if request.method == 'DELETE' if request.method == 'DELETE'
db.tasksCollection.remove({'_id' : taskId}, (err, removedCount) -> db.tasksCollection.remove({'_id' : taskId}, (err, removedCount) ->
+1 -1
View File
@@ -232,7 +232,7 @@ acsInform = (xml) ->
parameterList : parameterValueList(xml.get('ParameterList')), parameterList : parameterValueList(xml.get('ParameterList')),
deviceId : traverseXml(xml.get('DeviceId')), deviceId : traverseXml(xml.get('DeviceId')),
event : event(xml.get('Event')), event : event(xml.get('Event')),
retryCount : JSON.parse(xml.get('RetryCount').text()) retryCount : parseInt(xml.get('RetryCount').text())
} }
+9 -1
View File
@@ -43,6 +43,7 @@ common = require './common'
db = require './db' db = require './db'
mongodb = require 'mongodb' mongodb = require 'mongodb'
customCommands = require './custom-commands' customCommands = require './custom-commands'
url = require 'url'
exports.STATUS_OK = STATUS_OK = 1 exports.STATUS_OK = STATUS_OK = 1
exports.STATUS_FAULT = STATUS_FAULT = 2 exports.STATUS_FAULT = STATUS_FAULT = 2
@@ -330,11 +331,18 @@ this.download = (task, methodResponse, callback) ->
callback(err) callback(err)
return return
l = {
protocol : if config.get('FS_SSL') then 'https' else 'http',
hostname : config.get('FS_IP'),
port : config.get('FS_PORT'),
pathname : encodeURIComponent(file.filename)
}
methodRequest = { methodRequest = {
type : 'Download', type : 'Download',
fileType : file.metadata.fileType, fileType : file.metadata.fileType,
fileSize : file.length, fileSize : file.length,
url : "http://#{config.get('FS_IP')}:#{config.get('FS_PORT')}/#{encodeURIComponent(file.filename)}", url : url.format(l),
successUrl : task.successUrl, successUrl : task.successUrl,
failureUrl : task.failureUrl failureUrl : task.failureUrl
} }
+2 -2
View File
@@ -187,7 +187,7 @@ commitUpdates = (deviceId, deviceUpdates, commitQueue, callback) ->
if presentPaths[p] if presentPaths[p]
recursive(v, "#{p}.") recursive(v, "#{p}.")
else else
update['$unset'][p] = 1 update['$unset'][p] = 2
# Scan the DB object and remove parameters that no longer exists in device # Scan the DB object and remove parameters that no longer exists in device
for path of projection for path of projection
@@ -202,7 +202,7 @@ commitUpdates = (deviceId, deviceUpdates, commitQueue, callback) ->
recursive(root, rootPath) recursive(root, rootPath)
else else
if not presentPaths[rootPath.slice(0, -1)]? if not presentPaths[rootPath.slice(0, -1)]?
update['$unset'][rootPath.slice(0, -1)] = 1 update['$unset'][rootPath.slice(0, -1)] = 2
# Remove unnecessary unset updates # Remove unnecessary unset updates
for k, v of update['$unset'] for k, v of update['$unset']
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "genieacs", "name": "genieacs",
"version": "1.0.0", "version": "1.0.3",
"description": "A blazing fast TR-069 auto configuration server (ACS) built with Node.js, Redis, and MongoDB", "description": "A blazing fast TR-069 auto configuration server (ACS) built with Node.js, Redis, and MongoDB",
"repository": { "repository": {
"type": "git", "type": "git",