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

Cluster summary users #468

Merged
merged 16 commits into from
Jul 20, 2016
Prev Previous commit
Next Next commit
lint
  • Loading branch information
Julien Bramary committed Jul 13, 2016
commit a39cfd3314dd7321217eb5adc4d2c045af040fcd
2 changes: 2 additions & 0 deletions src/app/model/navigation/navigation.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* @param {app.event.eventService} eventService - the event bus service
* @param {object} $state - ui-router $state service
* @param {object} $rootScope - Angular rootScope object
* @param {object} $log - angular log service
* @property {app.event.eventService} eventService - the event bus service
* @property {object} $state - ui-router $state service
* @property {app.model.navigation} menu - the navigation model
Expand Down Expand Up @@ -110,6 +111,7 @@
* @namespace app.model.navigation.Menu
* @memberof app.model.navigation
* @name app.model.navigation.Menu
* @param {object} $log - angular log service
* @property {string} currentState - current ui-router state
*/
function Menu($log) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

ClusterUsersController.$inject = [
'app.model.modelManager',
'$stateParams'
'$stateParams',
'$log'
];

function ClusterUsersController(modelManager, $stateParams) {
var that = this;
function ClusterUsersController(modelManager, $stateParams, $log) {
this.guid = $stateParams.guid;
this.usersModel = modelManager.retrieve('cloud-foundry.model.users');
this.usersModel.listAllUsers(this.guid, {}).then(function (res) {
console.log('Received list of Users: ', res);
$log.debug('Received list of Users: ', res);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* @name OrganizationTileController
* @constructor
* @param {object} $state - the angular $state service
* @param {object} utils - our utils service
* @property {Array} actions - collection of relevant actions that can be executed against cluster
*/
function OrganizationTileController($state, utils) {
Expand Down Expand Up @@ -64,7 +65,7 @@
} else {
// If there are more than one role, don't show the user role
if (roles.length > 1) {
_.remove(roles, function(role) {
_.remove(roles, function (role) {
return role === 'org_user';
});
}
Expand Down
17 changes: 11 additions & 6 deletions src/plugins/cloud-foundry/model/organization/organization.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@
/**
* @memberof cloud-foundry.model
* @name Organization
* @param {app.api.apiManager} apiManager - the API manager
* @property {app.api.apiManager} apiManager - the API manager
* @param {app.api.apiManager} apiManager - the API manager
* @property {app.api.apiManager} apiManager - the API manager
* @param {object} apiManager - the API manager
* @property {object} apiManager - the API manager
* @param {object} utils - the utils service
* @property {object} utils - the utils service
* @param {object} userInfoService - the userInfoService service
* @property {object} userInfoService - the userInfoService service
* @param {object} $q - angular $q service
* @property {object} $q - angular $q service
* @param {object} $log - angular $log service
* @property {object} $log - angular $log service
* @class
*/
function Organization(apiManager, utils, userInfoService, $q, $log) {
Expand Down Expand Up @@ -117,7 +123,7 @@
var rolesP = orgsApi.RetrievingRolesOfAllUsersInOrganization(orgGuid, params, httpConfig);
var userInfoP = that.userInfoService.userInfo();

var orgRolesP = that.$q.all({roles: rolesP, userInfo: userInfoP}).then(function(values) {
var orgRolesP = that.$q.all({roles: rolesP, userInfo: userInfoP}).then(function (values) {
var i, userGuid, myRoles;

// Find our user's GUID
Expand Down Expand Up @@ -146,7 +152,6 @@
return myRoles;
});


var appCountsP = this.apiManager.retrieve('cloud-foundry.api.Organizations')
.ListAllSpacesForOrganization(orgGuid, params, httpConfig).then(function (res) {
var spaces = res.data.resources;
Expand Down