Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop Update #8

Merged
merged 37 commits into from Jul 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
16b3bec
Typo Fix
polonel Jun 21, 2016
fbcee64
Start of settings to DB
polonel Jun 28, 2016
3dd1f61
Settings saving to DB
polonel Jun 29, 2016
f52171b
Update nodemailer
polonel Jun 30, 2016
e14fc48
App API Fixes
polonel Jul 5, 2016
f929e6b
Fixes Heroku child process failure
polonel Jul 5, 2016
8f964a9
Updated NConf
polonel Jul 5, 2016
a3e19bf
Fixed issue with CORS loading
polonel Jul 8, 2016
d75298b
Fixed issue where mailer would still send mail even if mail was disabled
polonel Jul 9, 2016
ae318c8
Start of Installer
polonel Jul 12, 2016
f427d7b
Fixed issue is database test
polonel Jul 15, 2016
d2f7ea7
Package updates
polonel Jul 15, 2016
45979ba
Readme Updated
polonel Jul 15, 2016
6773f3e
Readme Updated
polonel Jul 15, 2016
34f2231
Readme Stuff
polonel Jul 15, 2016
ad6e717
Travis Fix and Update
polonel Jul 15, 2016
9d46404
Ton of fixes:
polonel Jul 18, 2016
da2e2cc
Install script restarter
polonel Jul 19, 2016
63f6695
Fixed bug where saving profile will remove user from all groups
polonel Jul 20, 2016
39c7e95
Fixed an issue with QueryString sometimes taking Ints as Strings
polonel Jul 20, 2016
dc695c7
Tags Settings Nav
polonel Jul 22, 2016
f7a9c0b
Server Logs
polonel Jul 23, 2016
701eb3f
Fixed issue with Heroku
polonel Jul 23, 2016
5de8934
Error handling when log file doesn't exists
polonel Jul 23, 2016
4ec8940
Fixed <pre> tag line spacing
polonel Jul 24, 2016
9897a23
CHANGELOG Added
polonel Jul 24, 2016
e2fc71f
Basic Tag updating / deleting
polonel Jul 26, 2016
cd62d75
Fixes #5
polonel Jul 26, 2016
887fa51
Fixes #6
polonel Jul 26, 2016
3337f03
minor performance enhancements
polonel Jul 27, 2016
80cf7a1
Fixes #3
polonel Jul 27, 2016
a33717f
Added Top Group and Top Tags to Dashboard
polonel Jul 27, 2016
fdb0797
Create ticket form now loads first values for select upon opening
polonel Jul 27, 2016
c37f24a
Changelog
polonel Jul 27, 2016
6a8c3d3
Disabled TPS by default
polonel Jul 27, 2016
eb3e9de
Updated Readme
polonel Jul 28, 2016
b8068ea
License File
polonel Jul 28, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions .travis.yml
Expand Up @@ -3,15 +3,14 @@ language: node_js
env:
- CXX=g++-4.8
node_js:
- 0.10
- 4
- 5
- 6
services:
- mongodb
addons:
apt:
sources:
- mongodb-3.0-precise
- mongodb-3.2-precise
- ubuntu-toolchain-r-test
packages:
- mongodb-org-server
Expand All @@ -21,7 +20,6 @@ addons:
before_install:
- npm install -g grunt
- npm install -g grunt-cli
- gem install sass

script:
- npm test
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,30 @@
# Change Log

## [Unreleased](https://github.com/polonel/trudesk/tree/HEAD)

[Full Changelog](https://github.com/polonel/trudesk/compare/0.1.6...HEAD)

**Fixed bugs:**

- Users still receive email after account disabled [\#6](https://github.com/polonel/trudesk/issues/6)
- Delete / Disable account fires twice [\#5](https://github.com/polonel/trudesk/issues/5)
- Set Assignee Permissions are incorrect [\#2](https://github.com/polonel/trudesk/issues/2)
- Crash when fails to connect to mail server [\#1](https://github.com/polonel/trudesk/issues/1)

**Merged pull requests:**

- Develop to Master [\#4](https://github.com/polonel/trudesk/pull/4) ([polonel](https://github.com/polonel))

## [0.1.6](https://github.com/polonel/trudesk/tree/0.1.6) (2016-01-25)
[Full Changelog](https://github.com/polonel/trudesk/compare/0.1.5...0.1.6)

## [0.1.5](https://github.com/polonel/trudesk/tree/0.1.5) (2015-12-28)
[Full Changelog](https://github.com/polonel/trudesk/compare/0.1.4...0.1.5)

## [0.1.4](https://github.com/polonel/trudesk/tree/0.1.4) (2015-11-07)
[Full Changelog](https://github.com/polonel/trudesk/compare/0.1.3...0.1.4)

## [0.1.3](https://github.com/polonel/trudesk/tree/0.1.3) (2015-10-28)
[Full Changelog](https://github.com/polonel/trudesk/compare/0.1.2...0.1.3)

## [0.1.2](https://github.com/polonel/trudesk/tree/0.1.2) (2015-08-24)
3 changes: 0 additions & 3 deletions Gemfile

This file was deleted.

10 changes: 0 additions & 10 deletions Gemfile.lock

This file was deleted.

13 changes: 13 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,13 @@
Copyright 2014-2016 Chris Brame

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
45 changes: 22 additions & 23 deletions README.md
@@ -1,4 +1,4 @@
[![Trudesk](http://trudesk.io/TD_Black.png)](http://trudesk.io/)
<a href="http://trudesk.io"><img src="http://trudesk.io/TD_Black.png" width="375" /></a>

<br/><br/>

Expand All @@ -7,31 +7,29 @@

[http://trudesk.io](http://trudesk.io/)

TruDesk is an open source help desk solution stil in active development.
TruDesk is an open source help desk solution still in active development.

Built on [Node.JS](http://nodejs.org) and [MongoDB](http://www.mongodb.org).

###Requirements
+ Node.JS v4.2.2 or later
+ MongoDB 2.6 or later
+ Ruby 2.0.0 or later
+ __Sass__ Gem Installed
### Requirements
+ Node.JS v6.3.0 or later
+ MongoDB 3.2 or later

###Install & Run
### Install & Run
1. Clone the repo using: ```git clone http://www.github.com/polonel/trudesk```
2. Install dependencies: ```npm install```
3. Run the install script: ```./trudesk setup```
4. Start the server: ```npm start```
5. Navigate to: ```http://localhost:8118```

###Documentation
### Documentation
To build the documentation run ```grunt builddocs```.

The documentation after build is located in:
- ```{repo folder}/docs```
- ```{repo folder}/apidocs```

###Help
### Help
if you like what you see here, and want to help support the work being done, you could:

+ Contribute code, issues and pull requests
Expand All @@ -40,17 +38,18 @@ if you like what you see here, and want to help support the work being done, you



###License
Copyright 2015 Chris Brame
### License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2014-2016 Chris Brame

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
97 changes: 58 additions & 39 deletions app.js
Expand Up @@ -13,10 +13,10 @@ var async = require('async'),
path = require('path'),
fs = require('fs'),
winston = require('winston'),
wConfig = require('winston/lib/winston/config'),
nconf = require('nconf'),
NodeCache = require('node-cache'),
pkg = require('./package.json');
pkg = require('./package.json'),
ws = require('./src/webserver');


global.forks = [];

Expand Down Expand Up @@ -45,6 +45,16 @@ winston.err = function (err) {
winston.error(err.stack);
};

process.on('message', function(msg) {
if (msg == 'shutdown') {
console.log('Closing all connections...');

if (ws.server)
ws.server.close();
process.exit(0);
}
});

if (!process.env.FORK) {
winston.info(' . .o8 oooo');
winston.info(' .o8 "888 `888');
Expand All @@ -60,29 +70,6 @@ if (!process.env.FORK) {
winston.info('Time: ' + new Date());
}

//CLUSTER STUFF
//var cluster = require('cluster');
//if (cluster.isMaster) {
// var numWorkers = require('os').cpus().length;
// winston.info('Master cluster setting up ' + numWorkers + ' workers...');
//
// for (var i = 0; i < numWorkers; i++) {
// cluster.fork({FORK: 1});
// }
//
// cluster.on('online', function(worker) {
// winston.debug('Worker ' + worker.process.pid + ' is online');
// });
//
// cluster.on('exit', function(worker, code, signal) {
// winston.warn('Worker ' + worker.process.pid + ' crashed with code: ' + code);
// winston.info('Starting a new worker');
// cluster.fork({FORK: 1});
// });
//} else {
//
//}

var configFile = path.join(__dirname, '/config.json'),
configExists;

Expand Down Expand Up @@ -116,6 +103,15 @@ if (process.env.HEROKU) {
start();
}

if (nconf.get('install') || !configExists && !process.env.HEROKU) {
var ws = require('./src/webserver');
ws.installServer(function() {
return winston.info('Trudesk Install Server Running...');
});

return;
}

if (!nconf.get('setup') && !nconf.get('install') && !nconf.get('upgrade') && !nconf.get('reset') && configExists) {
start();
} else if (nconf.get('setup') || nconf.get('install') || !configExists && !process.env.HEROKU) {
Expand Down Expand Up @@ -181,7 +177,6 @@ function dbCallback(err, db) {
if (err) {
return start();
}
var ws = require('./src/webserver');

ws.init(db, function(err) {
if (err) {
Expand Down Expand Up @@ -212,12 +207,46 @@ function dbCallback(err, db) {
},
function(next) {
//Start Task Runners
var taskrunner = require('./src/taskrunner');
require('./src/taskrunner');
next();
},
function(next) {
//var pm2 = require('pm2');
//pm2.connect(true, function(err) {
// if (err) throw err;
// pm2.start({
// script: path.join(__dirname, '/src/cache/index.js'),
// name: 'trudesk:cache',
// output: path.join(__dirname, '/logs/cache.log'),
// error: path.join(__dirname, '/logs/cache.log'),
// env: {
// FORK: 1,
// NODE_ENV: global.env
// }
// }, function(err) {
// pm2.disconnect();
// if (err) throw err;
//
// process.on('message', function(message) {
// if (message.data.cache) {
// var nodeCache = require('./src/cache/node-cache');
// global.cache = new nodeCache({
// data: message.data.cache.data,
// checkperiod: 0
// });
// }
// });
//
// next();
// });
//});

var fork = require('child_process').fork;
var n = fork(path.join(__dirname, '/src/cache/index.js'), { env: { FORK: 1, NODE_ENV: global.env } } );
var n;
if (process.env.MONGOHQ_URL)
n = fork(path.join(__dirname, '/src/cache/index.js'), { env: { FORK: 1, NODE_ENV: global.env, MONGOHQ_URL: process.env.MONGOHQ_URL } } );
else
n = fork(path.join(__dirname, '/src/cache/index.js'), { env: { FORK: 1, NODE_ENV: global.env } } );

global.forks.push({name: 'cache', fork: n});

Expand All @@ -231,17 +260,7 @@ function dbCallback(err, db) {
}
});

//
//n.on('exit', function (code, signal) {
// console.log('Child exited:', code, signal);
//});

next();
//winston.debug('Initializing Cache...');
//var cache = require('./src/cache');
//cache.init(function() {
// next();
//});
}
], function() {
winston.info("TruDesk Ready");
Expand Down