Skip to content

Commit

Permalink
Merge 8743b58 into 3c2db8d
Browse files Browse the repository at this point in the history
  • Loading branch information
wwelling committed Jul 25, 2018
2 parents 3c2db8d + 8743b58 commit 1340dd2
Show file tree
Hide file tree
Showing 80 changed files with 1,372 additions and 715 deletions.
Empty file modified app/.htaccess
100755 → 100644
Empty file.
Empty file modified app/app.js
100755 → 100644
Empty file.
69 changes: 56 additions & 13 deletions app/config/apiMapping.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -55,59 +55,102 @@ var apiMapping = {
'method': 'update'
}
},
VersionManagementSoftware: {
RemoteProjectManager: {
validations: true,
lazy: true,
channel: '/channel/version-management-software',
channel: '/channel/remote-project-manager',
all: {
'endpoint': '/private/queue',
'controller': 'version-management-software',
'controller': 'remote-project-manager',
'method': '',
'httpMethod': 'GET'
},
create: {
'endpoint': '/private/queue',
'controller': 'version-management-software',
'controller': 'remote-project-manager',
'method': '',
'httpMethod': 'POST'
},
update: {
'endpoint': '/private/queue',
'controller': 'version-management-software',
'controller': 'remote-project-manager',
'method': '',
'httpMethod': 'PUT'
},
remove: {
'endpoint': '/private/queue',
'controller': 'version-management-software',
'controller': 'remote-project-manager',
'method': '',
'httpMethod': 'DELETE'
},
listen: {
'endpoint': '/channel',
'controller': 'version-management-software'
'controller': 'remote-project-manager'
},
types: {
'endpoint': '/channel',
'controller': 'version-management-software',
'controller': 'remote-project-manager',
'method': 'types/',
'httpMethod': 'GET'
},
scaffolding: {
'endpoint': '/channel',
'controller': 'version-management-software',
'controller': 'remote-project-manager',
'method': 'scaffolding/:type/',
'httpMethod': 'GET'
}
},
VersionProject: {
Status: {
validations: true,
lazy: true,
channel: '/channel/status',
all: {
'endpoint': '/private/queue',
'controller': 'projects'
'controller': 'status',
'method': '',
'httpMethod': 'GET'
},
getByScopeId: {
create: {
'endpoint': '/private/queue',
'controller': 'projects'
'controller': 'status',
'method': '',
'httpMethod': 'POST'
},
update: {
'endpoint': '/private/queue',
'controller': 'status',
'method': '',
'httpMethod': 'PUT'
},
remove: {
'endpoint': '/private/queue',
'controller': 'status',
'method': '',
'httpMethod': 'DELETE'
},
listen: {
'endpoint': '/channel',
'controller': 'status'
}
},
RemoteProjects: {
all: {
'endpoint': '/private/queue',
'controller': 'remote-projects'
},
listen: {
'endpoint': '/channel',
'controller': 'remote-projects'
}
},
ActiveSprints: {
all: {
'endpoint': '/private/queue',
'controller': 'active-sprints'
},
listen: {
'endpoint': '/channel',
'controller': 'active-sprints'
}
}
};
17 changes: 9 additions & 8 deletions app/config/appConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var appConfig = {
// Set this to the webService if mocking AuthService

'authService': 'https://labs.library.tamu.edu/auth3',
'webService': 'http://localhost:9000',
'webService': 'http://localhost:9001',

'storageType': 'session',

Expand All @@ -23,16 +23,17 @@ var appConfig = {

'stompDebug': false,

/*
Determines the type of connection stomp will attempt to make with the service.
TYPES: websocket, xhr-streaming, xdr-streaming, eventsource, iframe-eventsource,
htmlfile, iframe-htmlfile, xhr-polling, xdr-polling, iframe-xhr-polling,
jsonp-polling
*/
/*
Determines the type of connection stomp will attempt to make with the service.
TYPES: websocket, xhr-streaming, xdr-streaming, eventsource, iframe-eventsource,
htmlfile, iframe-htmlfile, xhr-polling, xdr-polling, iframe-xhr-polling,
jsonp-polling
*/
'sockJsConnectionType': ['websocket', 'xhr-streaming', 'xhr-polling', 'xdr-streaming', 'xdr-polling', 'iframe-eventsource', 'iframe-htmlfile', 'jsonp-polling'],

// Set this to 'admin' or 'user' if using mock AuthService
// otherwise set to null or false

'mockRole': null
};

};
7 changes: 1 addition & 6 deletions app/config/routes.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
app.config(function ($routeProvider) {
$routeProvider.
when('/management', {
redirectTo: '/management/projects',
access: ["ROLE_ADMIN", "ROLE_MANGER"]
redirectTo: '/management/projects'
}).
when('/management/:tab', {
templateUrl: 'views/management.html',
access: ["ROLE_ADMIN", "ROLE_MANGER"]
}).
when('/projects', {
templateUrl: '/views/management/projects.html',
access: ["ROLE_ADMIN", "ROLE_MANGER"]
}).
when('/home', {
redirectTo: '/'
}).
Expand Down
Empty file modified app/config/runTime.js
100755 → 100644
Empty file.
68 changes: 68 additions & 0 deletions app/controllers/activeSprintsController.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
app.controller('ActiveSprintsController', function ($controller, $sce, $scope, ActiveSprintsService, StatusRepo) {

angular.extend(this, $controller('AbstractController', {
$scope: $scope
}));

if (sessionStorage.selected === undefined) {
sessionStorage.selected = 0;
}

var trusted = {};

$scope.statuses = StatusRepo.getAll();

$scope.activeSprints = ActiveSprintsService.getActiveSprints();

$scope.select = function (index) {
sessionStorage.selected = index;
};

$scope.kanbanHeader = function () {
return $scope.selectedSprint ? $scope.selectedSprint.project + ": " + $scope.selectedSprint.name : "Select Sprint Above";
};

$scope.getSprintEstimateTotal = function (sprint) {
var total = 0;
for (var i in sprint.cards) {
var card = sprint.cards[i];
if (card.estimate) {
total += card.estimate;
}
}
return total;
};

$scope.getStatusEstimateTotal = function (status) {
var total = 0;
for (var i in $scope.selectedSprint.cards) {
var card = $scope.selectedSprint.cards[i];
if (card.status === status && card.estimate) {
total += card.estimate;
}
}
return total;
};

$scope.getAvatarUrl = function (assignee) {
return appConfig.webService + "/images/" + assignee.avatar;
};

$scope.getHtmlContent = function (content) {
return trusted[content] || (trusted[content] = $sce.trustAsHtml(content));
};

$scope.getSelectedSprint = function () {
return $scope.activeSprints.length > 0 ? $scope.activeSprints[sessionStorage.selected] : undefined;
};

ActiveSprintsService.updated.then(null, null, function () {
if ($scope.activeSprints.length > 0) {
while (sessionStorage.selected >= $scope.activeSprints.length) {
sessionStorage.selected--;
}
$scope.select(sessionStorage.selected);
}
});

});
79 changes: 34 additions & 45 deletions app/controllers/projectController.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
app.controller('ProjectController', function ($controller, $scope, $rootScope, NgTableParams, ApiResponseActions, Project, ProjectRepo, VersionManagementSoftwareRepo, VersionProjectService) {
app.controller('ProjectController', function ($controller, $scope, NgTableParams, ApiResponseActions, ProjectRepo, RemoteProjectManagerRepo, RemoteProjectService, UserService) {

angular.extend(this, $controller('AbstractController', {
$scope: $scope
}));

$scope.vmses = VersionManagementSoftwareRepo.getAll();

$scope.projects = ProjectRepo.getAll();
var projects = ProjectRepo.getAll();

$scope.projectToCreate = ProjectRepo.getScaffold();

Expand All @@ -32,12 +30,12 @@ app.controller('ProjectController', function ($controller, $scope, $rootScope, N
$scope.createProject = function () {
ProjectRepo.create($scope.projectToCreate).then(function (res) {
if (angular.fromJson(res.body).meta.status === 'SUCCESS') {
$scope.cancelCreateProject();
$scope.resetCreateProject();
}
});
};

$scope.cancelCreateProject = function () {
$scope.resetCreateProject = function () {
angular.extend($scope.projectToCreate, ProjectRepo.getScaffold());
$scope.resetProjectForms();
};
Expand Down Expand Up @@ -78,58 +76,49 @@ app.controller('ProjectController', function ($controller, $scope, $rootScope, N
});
};

UserService.userEvents().then(null, null, function () {
$scope.remoteProjectManagers = RemoteProjectManagerRepo.getAll();

$scope.remoteProjects = {};

$scope.getRemoteProjectManagerRemoteProjects = function (remoteProjectManagerId) {
return $scope.remoteProjects[remoteProjectManagerId];
};

$scope.getRemoteProjectManagerRemoteProjects = function (remoteProjectManagerId) {
return $scope.remoteProjects[remoteProjectManagerId];
};

var getRemoteProjectManagerById = function (id) {
RemoteProjectService.getAll(id).then(function (remoteProjects) {
$scope.remoteProjects[id] = remoteProjects;
});
};

RemoteProjectManagerRepo.ready().then(function () {
for (var i in $scope.remoteProjectManagers) {
if (i !== 'visibleColumnCount') {
getRemoteProjectManagerById($scope.remoteProjectManagers[i].id);
}
}
});
});

var buildTable = function () {
var allProjects = ProjectRepo.getAll();
$scope.tableParams = new NgTableParams({
count: allProjects.length,
count: ProjectRepo.getAll().length,
sorting: {
name: 'asc'
}
}, {
counts: [],
total: 0,
getData: function (params) {
return $scope.projects;
return projects;
}
});
};

$scope.vmsVersionProjects = {};

var getVmsById = function (id) {
VersionProjectService.getAll(id).then(function (versionProjects) {
$scope.vmsVersionProjects[id] = versionProjects;
});
};

VersionManagementSoftwareRepo.ready().then(function () {
for (var i in $scope.vmses) {
if (i !== 'visibleColumnCount') {
getVmsById($scope.vmses[i].id);
}
}
});

$scope.getVmsVersionProjects = function (vmsId) {
return $scope.vmsVersionProjects[vmsId];
};

$scope.getVmsVersionProjects = function (vmsId) {
return $scope.vmsVersionProjects[vmsId];
};

$scope.getVersionProject = function (project) {
if (project.scopeId && project.versionManagementSoftware && !project.versionProject) {
project.versionProject = {};
VersionProjectService.getByScopeId(project.versionManagementSoftware.id, project.scopeId).then(function (versionProject) {
angular.extend(project, {
versionProject: versionProject
});
});
}
return project.versionProject;
};

ProjectRepo.ready().then(function () {
buildTable();
});
Expand Down

0 comments on commit 1340dd2

Please sign in to comment.