mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 12:30:41 +01:00
Get rid of grunt, fix users routing issues
This commit is contained in:
parent
50d60df7c4
commit
f09478ec58
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,6 +5,8 @@ dist/
|
||||
.vagrant
|
||||
bin/setup.js
|
||||
|
||||
public/css/semaphore.css
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
@ -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) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
var models = require('../../models')
|
||||
var mongoose = require('mongoose')
|
||||
|
||||
var identity = require('./user')
|
||||
var user = require('./user')
|
||||
|
||||
var validator = require('validator')
|
||||
|
||||
|
15
public/js/services/users.js
Normal file
15
public/js/services/users.js
Normal 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();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user