mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-11 02:17:42 +01:00
merge latest updates.
This commit is contained in:
commit
c819049479
@ -61,6 +61,8 @@ services:
|
|||||||
dockerfile: Dockerfile.job
|
dockerfile: Dockerfile.job
|
||||||
env_file:
|
env_file:
|
||||||
- ./config/jobservice/env
|
- ./config/jobservice/env
|
||||||
|
volumes:
|
||||||
|
- /data/job_logs:/var/log/jobs
|
||||||
depends_on:
|
depends_on:
|
||||||
- ui
|
- ui
|
||||||
logging:
|
logging:
|
||||||
|
@ -6,11 +6,15 @@ This module is for those machine running Harbor's old version, such as 0.1.0. If
|
|||||||
**WARNING!!** You must backup your data before migrating
|
**WARNING!!** You must backup your data before migrating
|
||||||
|
|
||||||
###Installation
|
###Installation
|
||||||
- step 1: change `db_username`, `db_password`, `db_port`, `db_name` in migration.cfg
|
- step 1:
|
||||||
- step 2: build image from dockerfile
|
|
||||||
```
|
|
||||||
cd harbor-migration
|
|
||||||
|
|
||||||
|
```
|
||||||
|
cd migration
|
||||||
|
```
|
||||||
|
- step 2: change `db_username`, `db_password`, `db_port`, `db_name` in migration.cfg
|
||||||
|
- step 3: build image from dockerfile
|
||||||
|
|
||||||
|
```
|
||||||
docker build -t migrate-tool .
|
docker build -t migrate-tool .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
13
service/cache/cache.go
vendored
13
service/cache/cache.go
vendored
@ -60,17 +60,19 @@ func RefreshCatalogCache() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
repos := []string{}
|
repos := []string{}
|
||||||
|
|
||||||
for _, repo := range rs {
|
for _, repo := range rs {
|
||||||
rc, err := NewRepositoryClient(endpoint, true, username,
|
rc, ok := repositoryClients[repo]
|
||||||
repo, "repository", repo, "pull", "push", "*")
|
if !ok {
|
||||||
|
rc, err = registry.NewRepositoryWithUsername(repo, endpoint, username)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("error occurred while initializing repository client used by cache: %s %v", repo, err)
|
log.Errorf("error occurred while initializing repository client used by cache: %s %v", repo, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
repositoryClients[repo] = rc
|
||||||
|
}
|
||||||
tags, err := rc.ListTag()
|
tags, err := rc.ListTag()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("error occurred while list tag for %s: %v", repo, err)
|
log.Errorf("error occurred while list tag for %s: %v", repo, err)
|
||||||
@ -82,8 +84,9 @@ func RefreshCatalogCache() error {
|
|||||||
log.Debugf("add %s to catalog cache", repo)
|
log.Debugf("add %s to catalog cache", repo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
Cache.Put(catalogKey, repos, 600*time.Second)
|
Cache.Put(catalogKey, rs, 600*time.Second)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
15
static/i18n/locale_en-US.ini
Normal file
15
static/i18n/locale_en-US.ini
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
reset_email_hint = Please click this link to reset your password
|
||||||
|
reset_email_subject = Reset your password
|
||||||
|
|
||||||
|
page_title_index = Harbor
|
||||||
|
page_title_dashboard = Dashboard - Harbor
|
||||||
|
page_title_account_setting = Account Settings - Harbor
|
||||||
|
page_title_reset_password = Reset Password - Harbor
|
||||||
|
page_title_change_password = Change Password - Harbor
|
||||||
|
page_title_forgot_password = Forgot Password - Harbor
|
||||||
|
page_title_project = Project - Harbor
|
||||||
|
page_title_repository = Details - Harbor
|
||||||
|
page_title_search = Search - Harbor
|
||||||
|
page_title_sign_up = Sign Up - Harbor
|
||||||
|
page_title_add_new = Add New - Harbor
|
||||||
|
page_title_admin_option = Admin Options - Harbor
|
15
static/i18n/locale_zh-CN.ini
Normal file
15
static/i18n/locale_zh-CN.ini
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
reset_email_hint = 请点击下面的链接进行重置密码操作
|
||||||
|
reset_email_subject = 重置您的密码
|
||||||
|
|
||||||
|
page_title_index = Harbor
|
||||||
|
page_title_dashboard = 消息中心 - Harbor
|
||||||
|
page_title_account_setting = 账户设置 - Harbor
|
||||||
|
page_title_reset_password = 重置密码 - Harbor
|
||||||
|
page_title_change_password = 修改密码 - Harbor
|
||||||
|
page_title_forgot_password = 忘记密码 - Harbor
|
||||||
|
page_title_project = 项目 - Harbor
|
||||||
|
page_title_repository = 明细信息 - Harbor
|
||||||
|
page_title_search = 搜索 - Harbor
|
||||||
|
page_title_sign_up = 注册 - Harbor
|
||||||
|
page_title_add_new = 增加用户 - Harbor
|
||||||
|
page_title_admin_option = 管理员选项 - Harbor
|
@ -14,10 +14,18 @@
|
|||||||
<advanced-search ng-show="vm.isOpen" is-open="vm.isOpen" op="vm.op" others="vm.others" search='vm.search({op: vm.op, username: vm.username})' from-date="vm.fromDate" to-date="vm.toDate"></advanced-search>
|
<advanced-search ng-show="vm.isOpen" is-open="vm.isOpen" op="vm.op" others="vm.others" search='vm.search({op: vm.op, username: vm.username})' from-date="vm.fromDate" to-date="vm.toDate"></advanced-search>
|
||||||
<div class="pane">
|
<div class="pane">
|
||||||
<div class="sub-pane">
|
<div class="sub-pane">
|
||||||
<table class="table table-pane">
|
<div class="table-head-container">
|
||||||
|
<table class="table table-pane table-header">
|
||||||
<thead>
|
<thead>
|
||||||
<th>// 'username' | tr //</th><th>// 'repository_name' | tr //</th><th>// 'operation' | tr //</th><th>// 'timestamp' | tr //</th>
|
<th width="14%">// 'username' | tr //</th>
|
||||||
|
<th width="32%">// 'repository_name' | tr //</th>
|
||||||
|
<th width="14%">// 'operation' | tr //</th>
|
||||||
|
<th width="40%">// 'timestamp' | tr //</th>
|
||||||
</thead>
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="table-body-container" style="height: 300px;">
|
||||||
|
<table class="table table-pane">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-repeat="log in vm.logs">
|
<tr ng-repeat="log in vm.logs">
|
||||||
<td>//log.username//</td><td>//log.repo_name//</td><td>//log.operation//</td><td>//log.op_time | dateL : 'YYYY-MM-DD HH:mm:ss'//</td>
|
<td>//log.username//</td><td>//log.repo_name//</td><td>//log.operation//</td><td>//log.op_time | dateL : 'YYYY-MM-DD HH:mm:ss'//</td>
|
||||||
@ -27,4 +35,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
@ -14,10 +14,15 @@
|
|||||||
<modal-dialog modal-title="// vm.modalTitle //" modal-message="// vm.modalMessage //" confirm-only="true"></modal-dialog>
|
<modal-dialog modal-title="// vm.modalTitle //" modal-message="// vm.modalMessage //" confirm-only="true"></modal-dialog>
|
||||||
<add-project-member ng-show="vm.isOpen" is-open="vm.isOpen" project-id="//vm.projectId//" reload='vm.search({projectId: vm.projectId, username: vm.username})'></add-project-member>
|
<add-project-member ng-show="vm.isOpen" is-open="vm.isOpen" project-id="//vm.projectId//" reload='vm.search({projectId: vm.projectId, username: vm.username})'></add-project-member>
|
||||||
<div class="sub-pane">
|
<div class="sub-pane">
|
||||||
<table class="table table-pane" >
|
<div class="table-head-container">
|
||||||
|
<table class="table table-pane table-header">
|
||||||
<thead>
|
<thead>
|
||||||
<th width="30%">// 'username' | tr //</th><th width="40%">// 'role' | tr //</th><th width="30%">// 'operation' | tr //</th>
|
<th width="30%">// 'username' | tr //</th><th width="45%">// 'role' | tr //</th><th width="25%">// 'operation' | tr //</th>
|
||||||
</thead>
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="table-body-container" style="height: 300px;">
|
||||||
|
<table class="table table-pane">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-repeat="pr in vm.projectMembers" edit-project-member username="pr.username" project-id="vm.projectId" user-id="pr.user_id" delete="vm.deleteProjectMember({projectId: vm.projectId, userId: pr.user_id})" current-user-id="vm.user.user_id" role-name="pr.role_name" reload='vm.search({projectId: vm.projectId, username: vm.username})'></tr>
|
<tr ng-repeat="pr in vm.projectMembers" edit-project-member username="pr.username" project-id="vm.projectId" user-id="pr.user_id" delete="vm.deleteProjectMember({projectId: vm.projectId, userId: pr.user_id})" current-user-id="vm.user.user_id" role-name="pr.role_name" reload='vm.search({projectId: vm.projectId, username: vm.username})'></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -25,4 +30,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
@ -13,13 +13,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pane">
|
<div class="pane">
|
||||||
<div class="sub-pane">
|
<div class="sub-pane">
|
||||||
<table class="table table-pane">
|
<div class="table-head-container">
|
||||||
|
<table class="table table-pane table-header">
|
||||||
<thead>
|
<thead>
|
||||||
<th width="20%">// 'name' | tr //</th>
|
<th width="20%">// 'name' | tr //</th>
|
||||||
<th width="40%">// 'endpoint' | tr //</th>
|
<th width="30%">// 'endpoint' | tr //</th>
|
||||||
<th width="20%">// 'creation_time' | tr //</th>
|
<th width="35%">// 'creation_time' | tr //</th>
|
||||||
<th width="20%">// 'actions' | tr //</th>
|
<th width="15%">// 'actions' | tr //</th>
|
||||||
</thead>
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="table-body-container" style="height: 200px;">
|
||||||
|
<table class="table table-pane">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-if="vm.destinations.length == 0">
|
<tr ng-if="vm.destinations.length == 0">
|
||||||
<td colspan="7" height="100%" class="empty-hint" ><h3 class="text-muted">// 'no_destinations' | tr //</h3></td>
|
<td colspan="7" height="100%" class="empty-hint" ><h3 class="text-muted">// 'no_destinations' | tr //</h3></td>
|
||||||
@ -38,6 +43,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-4 col-md-12 well well-sm well-custom"><div class="col-md-offset-10">//vm.destinations ? vm.destinations.length : 0// // 'items' | tr //</div></div>
|
<div class="col-xs-4 col-md-12 well well-sm well-custom"><div class="col-md-offset-10">//vm.destinations ? vm.destinations.length : 0// // 'items' | tr //</div></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -11,7 +11,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pane">
|
<div class="pane">
|
||||||
<div class="sub-pane">
|
<div class="sub-pane">
|
||||||
<table class="table table-pane">
|
<div class="table-head-container">
|
||||||
|
<table class="table table-pane table-header">
|
||||||
<thead>
|
<thead>
|
||||||
<th width="14%">// 'name' | tr //</th>
|
<th width="14%">// 'name' | tr //</th>
|
||||||
<th width="18%">// 'description' | tr //</th>
|
<th width="18%">// 'description' | tr //</th>
|
||||||
@ -21,6 +22,10 @@
|
|||||||
<th width="12%">// 'activation' | tr //</th>
|
<th width="12%">// 'activation' | tr //</th>
|
||||||
<th width="12%">// 'actions' | tr //</th>
|
<th width="12%">// 'actions' | tr //</th>
|
||||||
</thead>
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="table-body-container" style="height: 200px;">
|
||||||
|
<table class="table table-pane">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-if="vm.replications.length == 0">
|
<tr ng-if="vm.replications.length == 0">
|
||||||
<td colspan="7" height="100%" class="empty-hint" ><h3 class="text-muted">// 'no_replications' | tr //</h3></td>
|
<td colspan="7" height="100%" class="empty-hint" ><h3 class="text-muted">// 'no_replications' | tr //</h3></td>
|
||||||
@ -50,6 +55,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-xs-4 col-md-12 well well-sm well-custom"><div class="col-md-offset-10">//vm.replications ? vm.replications.length : 0// // 'items' | tr //</div></div>
|
<div class="col-xs-4 col-md-12 well well-sm well-custom"><div class="col-md-offset-10">//vm.replications ? vm.replications.length : 0// // 'items' | tr //</div></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -1,9 +1,16 @@
|
|||||||
<h4 class="page-header title-color underlined">// 'popular_repositories' | tr //</h4>
|
<h4 class="page-header title-color underlined">// 'popular_repositories' | tr //</h4>
|
||||||
<div class="col-xs-4 col-md-12 up-table-pane">
|
<div class="col-xs-4 col-md-12 up-table-pane">
|
||||||
<table class="table">
|
<div class="table-head-container" style="width: 650px">
|
||||||
|
<table class="table table-pane table-header">
|
||||||
<thead>
|
<thead>
|
||||||
<th>// 'repository_name' | tr //</th><th>// 'count' | tr //</th><th>// 'creator' | tr //</th>
|
<th width="60%">// 'repository_name' | tr //</th>
|
||||||
|
<th width="15%">// 'count' | tr //</th>
|
||||||
|
<th width="25%">// 'creator' | tr //</th>
|
||||||
</thead>
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="table-body-container" style="height: 120px; width: 650px">
|
||||||
|
<table class="table table-pane">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5" height="120px" class="empty-hint" ng-if="vm.top10Repositories.length === 0"><h3 class="text-muted">// 'no_top_repositories' | tr //</h3></td>
|
<td colspan="5" height="120px" class="empty-hint" ng-if="vm.top10Repositories.length === 0"><h3 class="text-muted">// 'no_top_repositories' | tr //</h3></td>
|
||||||
@ -13,4 +20,5 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
@ -11,7 +11,7 @@
|
|||||||
function TopRepositoryController(ListTopRepositoryService) {
|
function TopRepositoryController(ListTopRepositoryService) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
|
||||||
ListTopRepositoryService(10)
|
ListTopRepositoryService(5)
|
||||||
.success(listTopRepositorySuccess)
|
.success(listTopRepositorySuccess)
|
||||||
.error(listTopRepositoryFailed);
|
.error(listTopRepositoryFailed);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user