mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-19 08:45:27 +01:00
Merge pull request #627 from reasonerjt/master
remove creator field from top repos list
This commit is contained in:
commit
bb5bcd4da3
@ -184,7 +184,7 @@ func GetTopRepos(countNum int) ([]models.TopRepo, error) {
|
||||
for i := 0; i < len(list); i++ {
|
||||
for _, v := range usrnameList {
|
||||
if v.RepoName == list[i].RepoName {
|
||||
list[i].Creator = v.Creator
|
||||
// list[i].Creator = v.Creator
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -770,9 +770,11 @@ func TestGetTopRepos(t *testing.T) {
|
||||
if topRepos[0].AccessCount != 1 {
|
||||
t.Errorf("error occured in get top reop's access count, expected: %v, actual: %v", 1, topRepos[0].AccessCount)
|
||||
}
|
||||
if topRepos[0].Creator != currentUser.Username {
|
||||
t.Errorf("error occured in get top reop's creator, expected: %v, actual: %v", currentUser.Username, topRepos[0].Creator)
|
||||
}
|
||||
/*
|
||||
if topRepos[0].Creator != currentUser.Username {
|
||||
t.Errorf("error occured in get top reop's creator, expected: %v, actual: %v", currentUser.Username, topRepos[0].Creator)
|
||||
}
|
||||
*/
|
||||
err = ToggleProjectPublicity(currentProject.ProjectID, publicityOff)
|
||||
if err != nil {
|
||||
t.Errorf("Error occurred in ToggleProjectPublicity: %v", err)
|
||||
|
@ -19,5 +19,5 @@ package models
|
||||
type TopRepo struct {
|
||||
RepoName string `json:"name"`
|
||||
AccessCount int64 `json:"count"`
|
||||
Creator string `json:"creator"`
|
||||
// Creator string `json:"creator"`
|
||||
}
|
||||
|
@ -18,8 +18,7 @@
|
||||
<table class="table table-pane table-header">
|
||||
<thead>
|
||||
<th width="60%">// 'repository_name' | tr //</th>
|
||||
<th width="15%">// 'count' | tr //</th>
|
||||
<th width="25%">// 'creator' | tr //</th>
|
||||
<th width="40%">// 'count' | tr //</th>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
@ -30,7 +29,7 @@
|
||||
<td colspan="5" height="120px" class="empty-hint" ng-if="vm.top10Repositories.length === 0"><h4 class="text-muted">// 'no_top_repositories' | tr //</h4></td>
|
||||
</tr>
|
||||
<tr ng-if="vm.top10Repositories.length > 0" ng-repeat="t in vm.top10Repositories">
|
||||
<td width="60%">//t.name//</td><td width="15%">//t.count//</td><td width="25%">//t.creator === '' ? '-' : t.creator //</td>
|
||||
<td width="60%">//t.name//</td><td width="40%">//t.count//</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user