mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +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
|
.vagrant
|
||||||
bin/setup.js
|
bin/setup.js
|
||||||
|
|
||||||
|
public/css/semaphore.css
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
*.log
|
*.log
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
var util = require('../util')
|
var util = require('../util')
|
||||||
, auth = require('./auth')
|
auth = require('./auth'),
|
||||||
, playbooks = require('./playbook/playbooks')
|
playbooks = require('./playbook/playbooks'),
|
||||||
, profile = require('./profile')
|
profile = require('./profile'),
|
||||||
, identities = require('./identity/identities')
|
identities = require('./identity/identities'),
|
||||||
, jobs = require('./job/jobs')
|
jobs = require('./job/jobs'),
|
||||||
, hosts = require('./host/hosts')
|
hosts = require('./host/hosts'),
|
||||||
, tasks = require('./task/tasks')
|
tasks = require('./task/tasks'),
|
||||||
|
users = require('./user/users')
|
||||||
|
|
||||||
exports.router = function(app) {
|
exports.router = function(app) {
|
||||||
var templates = require('../templates')(app);
|
var templates = require('../templates')(app);
|
||||||
@ -15,7 +16,8 @@ exports.router = function(app) {
|
|||||||
identities,
|
identities,
|
||||||
jobs,
|
jobs,
|
||||||
hosts,
|
hosts,
|
||||||
tasks
|
tasks,
|
||||||
|
users
|
||||||
]);
|
]);
|
||||||
|
|
||||||
templates.add('homepage')
|
templates.add('homepage')
|
||||||
@ -31,6 +33,7 @@ exports.router = function(app) {
|
|||||||
jobs.httpRouter(app);
|
jobs.httpRouter(app);
|
||||||
hosts.httpRouter(app);
|
hosts.httpRouter(app);
|
||||||
tasks.httpRouter(app);
|
tasks.httpRouter(app);
|
||||||
|
users.httpRouter(app);
|
||||||
|
|
||||||
// only json beyond this point
|
// only json beyond this point
|
||||||
app.get('*', function(req, res, next) {
|
app.get('*', function(req, res, next) {
|
||||||
@ -51,6 +54,7 @@ exports.router = function(app) {
|
|||||||
jobs.router(app);
|
jobs.router(app);
|
||||||
hosts.router(app);
|
hosts.router(app);
|
||||||
tasks.router(app);
|
tasks.router(app);
|
||||||
|
users.router(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
function layout (req, res) {
|
function layout (req, res) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
var models = require('../../models')
|
var models = require('../../models')
|
||||||
var mongoose = require('mongoose')
|
var mongoose = require('mongoose')
|
||||||
|
|
||||||
var identity = require('./user')
|
var user = require('./user')
|
||||||
|
|
||||||
var validator = require('validator')
|
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