Get rid of grunt, fix users routing issues

This commit is contained in:
Matej Kramny 2015-03-09 12:17:34 +00:00
parent 50d60df7c4
commit f09478ec58
4 changed files with 31 additions and 10 deletions

2
.gitignore vendored
View File

@ -5,6 +5,8 @@ dist/
.vagrant
bin/setup.js
public/css/semaphore.css
# Logs
logs
*.log

View File

@ -1,11 +1,12 @@
var util = require('../util')
, auth = require('./auth')
, playbooks = require('./playbook/playbooks')
, profile = require('./profile')
, identities = require('./identity/identities')
, jobs = require('./job/jobs')
, hosts = require('./host/hosts')
, tasks = require('./task/tasks')
auth = require('./auth'),
playbooks = require('./playbook/playbooks'),
profile = require('./profile'),
identities = require('./identity/identities'),
jobs = require('./job/jobs'),
hosts = require('./host/hosts'),
tasks = require('./task/tasks'),
users = require('./user/users')
exports.router = function(app) {
var templates = require('../templates')(app);
@ -15,7 +16,8 @@ exports.router = function(app) {
identities,
jobs,
hosts,
tasks
tasks,
users
]);
templates.add('homepage')
@ -31,6 +33,7 @@ exports.router = function(app) {
jobs.httpRouter(app);
hosts.httpRouter(app);
tasks.httpRouter(app);
users.httpRouter(app);
// only json beyond this point
app.get('*', function(req, res, next) {
@ -51,6 +54,7 @@ exports.router = function(app) {
jobs.router(app);
hosts.router(app);
tasks.router(app);
users.router(app);
}
function layout (req, res) {

View File

@ -1,7 +1,7 @@
var models = require('../../models')
var mongoose = require('mongoose')
var identity = require('./user')
var user = require('./user')
var validator = require('validator')

View File

@ -0,0 +1,15 @@
define([
'app'
], function(app) {
app.registerService('users', function($http, $rootScope) {
var self = this;
self.getUsers = function(cb) {
$http.get('/users').success(function(data) {
self.users = data;
cb();
});
}
});
});