- graphs in project - updated over period of time
(graphs are big again)
This commit is contained in:
parent
bddee44648
commit
bb3f56bb44
2 changed files with 45 additions and 57 deletions
|
@ -15,12 +15,10 @@ angular.module('SeHub')
|
||||||
$scope.editProject = function(ev)
|
$scope.editProject = function(ev)
|
||||||
{
|
{
|
||||||
$scope.isEditPressed = true;
|
$scope.isEditPressed = true;
|
||||||
console.log("EditPressed " + $scope.isEditPressed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.removeProject = function(ev)
|
$scope.removeProject = function(ev)
|
||||||
{
|
{
|
||||||
console.log("Project has been removed!");
|
|
||||||
$mdDialog.show($mdDialog.alert().title('Remove Project').content('Are you sure you want to remove the project ?')
|
$mdDialog.show($mdDialog.alert().title('Remove Project').content('Are you sure you want to remove the project ?')
|
||||||
.ariaLabel('Removing project alert dialog').ok('Yes').targetEvent(ev));
|
.ariaLabel('Removing project alert dialog').ok('Yes').targetEvent(ev));
|
||||||
// .then(function() {
|
// .then(function() {
|
||||||
|
@ -28,15 +26,27 @@ angular.module('SeHub')
|
||||||
// }); // Pop-up alert
|
// }); // Pop-up alert
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.getProfileRoute = function(assigneeName)
|
||||||
|
{
|
||||||
|
for(var i = 0; i < $scope.project.members.length; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(assigneeName === $scope.project.members[i].name)
|
||||||
|
{
|
||||||
|
console.log(assigneeName);
|
||||||
|
console.log($scope.project.members[i].name);
|
||||||
|
return '#/profile/' + $scope.project.members[i].id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$scope.getProjectInfo = function()
|
$scope.getProjectInfo = function()
|
||||||
{
|
{
|
||||||
apiService.getProjectsById(token, projectId).success(function(data)
|
apiService.getProjectsById(token, projectId).success(function(data)
|
||||||
{
|
{
|
||||||
$scope.project = data;
|
$scope.project = data;
|
||||||
console.log($scope.project);
|
|
||||||
$scope.init_line_lables();
|
|
||||||
// if($scope.user === $scope.project.info.master_id)
|
// if($scope.user === $scope.project.info.master_id)
|
||||||
// {
|
// {
|
||||||
// $scope.isMasterOrLecturer = true;
|
// $scope.isMasterOrLecturer = true;
|
||||||
|
@ -45,20 +55,11 @@ angular.module('SeHub')
|
||||||
// {
|
// {
|
||||||
$scope.loadingData = false;
|
$scope.loadingData = false;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
console.log($scope.project);
|
|
||||||
}).error(function(err)
|
}).error(function(err)
|
||||||
{
|
{
|
||||||
console.log("Error: " + err.message);
|
console.log("Error: " + err.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.init_line_lables = function(){
|
|
||||||
$scope.project.weekly_labels = [];
|
|
||||||
for(var i = 0 ; i < $scope.project.info.stats.weekly_commits[0].length; i++)
|
|
||||||
$scope.project.weekly_labels.push('w '+i.toString());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.getProjectInfo(); // Get all this project data
|
$scope.getProjectInfo(); // Get all this project data
|
||||||
}]);
|
}]);
|
|
@ -1,45 +1,35 @@
|
||||||
<div class = "project">
|
<div class = "project">
|
||||||
<md-content layout-padding layout-margin>
|
<md-content layout-padding layout-margin>
|
||||||
<div layout = "row">
|
<div layout = "row">
|
||||||
<div layout = "column">
|
|
||||||
<div>
|
<div>
|
||||||
<h1 layout-margin style="margin-left:15px"><i class="fa fa-cube"></i> Project '{{project.projectName}}'</h1>
|
<h1 layout-margin style="margin-left:15px"><i class="fa fa-cube"></i> Project '{{project.projectName}}'</h1>
|
||||||
</div>
|
</div>
|
||||||
<div> <!-- ng-if = "{{project.logo_url}}"> -->
|
<div> <!-- ng-if = "{{project.logo_url}}"> -->
|
||||||
<div flex = "25">
|
<div flex = "10">
|
||||||
<img ng-src="{{project.logo_url}}" class = "md-avatar">
|
<img ng-src="{{project.logo_url}}" class = "md-avatar">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div>
|
||||||
<div>
|
<div layout = "row" flex = "45">
|
||||||
<div layout = "row" flex = "45">
|
<!-- <div ng-if = "isMasterOrLecturer"> -->
|
||||||
<!-- <div ng-if = "isMasterOrLecturer"> -->
|
<md-card layout = "row">
|
||||||
<md-card layout = "row">
|
<div layout-padding>
|
||||||
<div layout-padding>
|
<md-button ng-click="editProject($event)" ng class="md-raised md-primary">
|
||||||
<md-button ng-click="editProject($event)" ng class="md-raised md-primary">
|
<i class="fa fa-pencil-square-o"></i>
|
||||||
<i class="fa fa-pencil-square-o"></i>
|
</md-button>
|
||||||
</md-button>
|
</div>
|
||||||
</div>
|
<div layout-padding>
|
||||||
<div layout-padding>
|
<md-button ng-click="removeProject($event)" ng class="md-raised md-primary">
|
||||||
<md-button ng-click="removeProject($event)" ng class="md-raised md-primary">
|
<i class="fa fa-times"></i>
|
||||||
<i class="fa fa-times"></i>
|
</md-button>
|
||||||
</md-button>
|
</div>
|
||||||
</div>
|
</md-card>
|
||||||
</md-card>
|
<!-- </div> -->
|
||||||
<!-- </div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <div flex = "99" layout = "row" layout-padding>
|
|
||||||
|
|
||||||
<div flex = "20">
|
|
||||||
Project Name: {{project.projectName}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
<md-card>
|
<md-card>
|
||||||
<div flex = "99" layout = "row">
|
<div flex = "80" layout = "row" style="height:40%;" layout-margin>
|
||||||
<div flex = "10" layout-padding layout-margin border = "1">
|
<div flex = "10" layout-padding layout-margin border = "1">
|
||||||
Team Members:
|
Team Members:
|
||||||
<ul layout-padding>
|
<ul layout-padding>
|
||||||
|
@ -48,16 +38,16 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div flex = "45">
|
<div flex = "40">
|
||||||
<!-- Graph -->
|
<!-- Graph -->
|
||||||
<div ng-if="loadingData" layout-paddig layout-margin class="loader">
|
<div ng-if="loadingData" layout-paddig layout-margin class="loader">
|
||||||
<md-progress-circular md-mode="indeterminate"></md-progress-circular>
|
<md-progress-circular md-mode="indeterminate"></md-progress-circular>
|
||||||
</div>
|
</div>
|
||||||
<md-card>
|
<md-card>
|
||||||
<canvas layout-padding layout-margin ng-if = "!loadingData" id="line" class="chart chart-line" data="project.info.stats.weekly_commits" labels="project.weekly_labels" legend="true" ></canvas>
|
<canvas layout-padding layout-margin ng-if = "!loadingData" id="line" class="chart chart-line" data="project.info.stats.weekly_commits.data" labels="project.info.stats.weekly_commits.labels" legend="true" ></canvas>
|
||||||
</md-card>
|
</md-card>
|
||||||
</div>
|
</div>
|
||||||
<div flex = "40">
|
<div flex = "35">
|
||||||
<md-card>
|
<md-card>
|
||||||
<canvas layout-padding layout-margin ng-if = "!loadingData" id="project.projectName" class="chart chart-bar" data="project.info.stats.micro.data" labels="project.info.stats.micro.labels" series="project.info.stats.micro.series"></canvas>
|
<canvas layout-padding layout-margin ng-if = "!loadingData" id="project.projectName" class="chart chart-bar" data="project.info.stats.micro.data" labels="project.info.stats.micro.labels" series="project.info.stats.micro.series"></canvas>
|
||||||
</md-card>
|
</md-card>
|
||||||
|
@ -82,8 +72,8 @@
|
||||||
<table style="width:100%;" border = "1">
|
<table style="width:100%;" border = "1">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Number</th>
|
<th>Title</th>
|
||||||
<th>url</th>
|
<th>Url</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr ng-repeat = "member in project.members">
|
<tr ng-repeat = "member in project.members">
|
||||||
<td>
|
<td>
|
||||||
|
@ -128,21 +118,18 @@
|
||||||
{{issue.milestone.title}}
|
{{issue.milestone.title}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a ng-href="#/profile/{{issue.user.id}}" style="text-decoration:none; color:black;">
|
<span ng-repeat = "member in project.members">
|
||||||
{{issue.user.login}}
|
<a ng-href = "{{getProfileRoute(issue.assignee.login)}}" style="text-decoration:none; color:black;">
|
||||||
</a>
|
{{issue.assignee.login}}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</md-content>
|
</md-content>
|
||||||
</md-tab>
|
</md-tab>
|
||||||
<md-tab label="Bugs">
|
|
||||||
<md-content class="md-padding">
|
|
||||||
<h1 class="md-display-2">Bugs</h1>
|
|
||||||
<p> Bugs ..</p>
|
|
||||||
</md-content>
|
|
||||||
</md-tab>
|
|
||||||
<md-tab label="tasks">
|
<md-tab label="tasks">
|
||||||
<md-content class="md-padding">
|
<md-content class="md-padding">
|
||||||
<h1 class="md-display-2">tasks</h1>
|
<h1 class="md-display-2">tasks</h1>
|
||||||
|
|
Loading…
Reference in a new issue