From a52f1b4ff49e49e31e51ebb14182b1d696dfa5f1 Mon Sep 17 00:00:00 2001 From: Tan Jiang Date: Tue, 28 Jun 2016 14:17:28 +0800 Subject: [PATCH 01/17] return 5 repositories in top list --- .../js/components/top-repository/top-repository.directive.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/resources/js/components/top-repository/top-repository.directive.js b/static/resources/js/components/top-repository/top-repository.directive.js index 34896ddd4..549c967c3 100644 --- a/static/resources/js/components/top-repository/top-repository.directive.js +++ b/static/resources/js/components/top-repository/top-repository.directive.js @@ -11,7 +11,7 @@ function TopRepositoryController(ListTopRepositoryService) { var vm = this; - ListTopRepositoryService(10) + ListTopRepositoryService(5) .success(listTopRepositorySuccess) .error(listTopRepositoryFailed); @@ -38,4 +38,4 @@ return directive; } -})(); \ No newline at end of file +})(); From 39d56dd61ec99a08eeb48f911ad169be6deaee04 Mon Sep 17 00:00:00 2001 From: Tan Jiang Date: Tue, 28 Jun 2016 15:48:31 +0800 Subject: [PATCH 02/17] update README for data migration tool --- migration/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/migration/README.md b/migration/README.md index ee1b12dcb..186faa49e 100644 --- a/migration/README.md +++ b/migration/README.md @@ -6,11 +6,13 @@ 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 ###Installation -- step 1: change `db_username`, `db_password`, `db_port`, `db_name` in migration.cfg -- step 2: build image from dockerfile +- step 1: + ``` + cd migration + ``` +- step 2: change `db_username`, `db_password`, `db_port`, `db_name` in migration.cfg +- step 3: build image from dockerfile ``` - cd harbor-migration - docker build -t migrate-tool . ``` From 046a42f4271c56ffe642b7c60b8f37d0fdddab1b Mon Sep 17 00:00:00 2001 From: Tan Jiang Date: Tue, 28 Jun 2016 16:49:08 +0800 Subject: [PATCH 03/17] new line --- migration/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/README.md b/migration/README.md index 186faa49e..454642c05 100644 --- a/migration/README.md +++ b/migration/README.md @@ -7,11 +7,13 @@ This module is for those machine running Harbor's old version, such as 0.1.0. If ###Installation - step 1: + ``` 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 . ``` From c7ebce59fe9fbba0428c6d4ea78512f0369b04d9 Mon Sep 17 00:00:00 2001 From: Tan Jiang Date: Tue, 28 Jun 2016 17:05:38 +0800 Subject: [PATCH 04/17] mount job log directory to a volume --- Deploy/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Deploy/docker-compose.yml b/Deploy/docker-compose.yml index 5d2f359b4..69e027efc 100644 --- a/Deploy/docker-compose.yml +++ b/Deploy/docker-compose.yml @@ -61,6 +61,8 @@ services: dockerfile: Dockerfile.job env_file: - ./config/jobservice/env + volumes: + - /data/job_logs:/var/log/jobs depends_on: - ui logging: From 1aaae4b54df2af726d060bd2b7d41c4a2371fc59 Mon Sep 17 00:00:00 2001 From: yhua123 Date: Tue, 28 Jun 2016 17:43:05 +0800 Subject: [PATCH 05/17] Update list-log.directive.html fixed table title. --- .../js/components/log/list-log.directive.html | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/static/resources/js/components/log/list-log.directive.html b/static/resources/js/components/log/list-log.directive.html index 54a2f62a8..0df591220 100644 --- a/static/resources/js/components/log/list-log.directive.html +++ b/static/resources/js/components/log/list-log.directive.html @@ -12,19 +12,28 @@ -
-
- - - - - - - - - -
// 'username' | tr //// 'repository_name' | tr //// 'operation' | tr //// 'timestamp' | tr //
//log.username////log.repo_name////log.operation////log.op_time | dateL : 'YYYY-MM-DD HH:mm:ss'//
+
+
+
+ + + + + + + +
// 'username' | tr //// 'repository_name' | tr //// 'operation' | tr //// 'timestamp' | tr //
+
+
+ + + + + + +
//log.username////log.repo_name////log.operation////log.op_time | dateL : 'YYYY-MM-DD HH:mm:ss'//
+
-
\ No newline at end of file + From 949d10f2995199e549c6e5045266912f85b467d9 Mon Sep 17 00:00:00 2001 From: Tan Jiang Date: Tue, 28 Jun 2016 18:08:39 +0800 Subject: [PATCH 06/17] do not scan for tags while refreshing cache --- service/utils/cache.go | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/service/utils/cache.go b/service/utils/cache.go index a19753f59..27a8cc8b5 100644 --- a/service/utils/cache.go +++ b/service/utils/cache.go @@ -66,32 +66,33 @@ func RefreshCatalogCache() error { if err != nil { return err } + /* + repos := []string{} - repos := []string{} - - for _, repo := range rs { - rc, ok := repositoryClients[repo] - if !ok { - rc, err = registry.NewRepositoryWithUsername(repo, endpoint, username) + for _, repo := range rs { + rc, ok := repositoryClients[repo] + if !ok { + rc, err = registry.NewRepositoryWithUsername(repo, endpoint, username) + if err != nil { + log.Errorf("error occurred while initializing repository client used by cache: %s %v", repo, err) + continue + } + repositoryClients[repo] = rc + } + tags, err := rc.ListTag() if err != nil { - log.Errorf("error occurred while initializing repository client used by cache: %s %v", repo, err) + log.Errorf("error occurred while list tag for %s: %v", repo, err) continue } - repositoryClients[repo] = rc - } - tags, err := rc.ListTag() - if err != nil { - log.Errorf("error occurred while list tag for %s: %v", repo, err) - continue - } - if len(tags) != 0 { - repos = append(repos, repo) - log.Debugf("add %s to catalog cache", repo) + if len(tags) != 0 { + repos = append(repos, 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 } From 1c3de6bedcf98fdc4b6f2c6636f09c49265d3756 Mon Sep 17 00:00:00 2001 From: yhua123 Date: Tue, 28 Jun 2016 18:19:02 +0800 Subject: [PATCH 07/17] Update list-project-member.directive.html fixed table title --- .../list-project-member.directive.html | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/static/resources/js/components/project-member/list-project-member.directive.html b/static/resources/js/components/project-member/list-project-member.directive.html index 9fda56790..1ed56bf0e 100644 --- a/static/resources/js/components/project-member/list-project-member.directive.html +++ b/static/resources/js/components/project-member/list-project-member.directive.html @@ -13,16 +13,24 @@
-
- - - - - - - -
// 'username' | tr //// 'role' | tr //// 'operation' | tr //
+
+
+
+ + + + +
// 'username' | tr //// 'role' | tr //// 'operation' | tr //
+
+
+ + + + +
+
+
- \ No newline at end of file + From 6a7f5b418c16010c5ee1b610dea382ed8808e6f6 Mon Sep 17 00:00:00 2001 From: yhua123 Date: Tue, 28 Jun 2016 19:16:38 +0800 Subject: [PATCH 08/17] Update destination.directive.html fixed table title --- .../destination.directive.html | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/static/resources/js/components/system-management/destination.directive.html b/static/resources/js/components/system-management/destination.directive.html index aaafe23ef..371cc05c1 100644 --- a/static/resources/js/components/system-management/destination.directive.html +++ b/static/resources/js/components/system-management/destination.directive.html @@ -11,18 +11,24 @@ -
-
- - + +
+
+
+
+ - - + +
// 'name' | tr // // 'endpoint' | tr // // 'creation_time' | tr // // 'actions' | tr //
+
+
+ + - + @@ -35,9 +41,11 @@ -

// 'no_destinations' | tr //

// 'no_destinations' | tr //

//r.name//
+
-
//vm.destinations ? vm.destinations.length : 0// // 'items' | tr //
- - \ No newline at end of file + + +
//vm.destinations ? vm.destinations.length : 0// // 'items' | tr //
+
+ From 115947a61840f61b20d506fa431270d015cd5fc3 Mon Sep 17 00:00:00 2001 From: yhua123 Date: Tue, 28 Jun 2016 19:33:23 +0800 Subject: [PATCH 09/17] Update replication.directive.html fixed table title --- .../replication.directive.html | 91 ++++++++++--------- 1 file changed, 49 insertions(+), 42 deletions(-) diff --git a/static/resources/js/components/system-management/replication.directive.html b/static/resources/js/components/system-management/replication.directive.html index c020966c1..7333e3ffb 100644 --- a/static/resources/js/components/system-management/replication.directive.html +++ b/static/resources/js/components/system-management/replication.directive.html @@ -9,47 +9,54 @@ -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
// 'name' | tr //// 'description' | tr //// 'projects' | tr //// 'destination' | tr //// 'start_time' | tr //// 'activation' | tr //// 'actions' | tr //

// 'no_replications' | tr //

//r.name////r.description////r.project_name////r.target_name////r.start_time | dateL : 'YYYY-MM-DD HH:mm:ss'// - // 'enabled' | tr // - // 'disabled' | tr // - -
- - -
-   - -   - -
+
+
+
+ + + + + + + + + + +
// 'name' | tr //// 'description' | tr //// 'projects' | tr //// 'destination' | tr //// 'start_time' | tr //// 'activation' | tr //// 'actions' | tr //
+
+
+ + + + + + + + + + + + + + + +

// 'no_replications' | tr //

//r.name////r.description////r.project_name////r.target_name////r.start_time | dateL : 'YYYY-MM-DD HH:mm:ss'// + // 'enabled' | tr // + // 'disabled' | tr // + +
+ + +
+   + +   + +
+
-
-
//vm.replications ? vm.replications.length : 0// // 'items' | tr //
+
+
+
//vm.replications ? vm.replications.length : 0// // 'items' | tr //
- \ No newline at end of file + From 777755163bc415da13bb1069a18f0abd87ee2bef Mon Sep 17 00:00:00 2001 From: yhua123 Date: Tue, 28 Jun 2016 20:06:20 +0800 Subject: [PATCH 10/17] Update top-repository.directive.html fixed table title --- .../top-repository.directive.html | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/static/resources/js/components/top-repository/top-repository.directive.html b/static/resources/js/components/top-repository/top-repository.directive.html index 7693dc78f..740e01148 100644 --- a/static/resources/js/components/top-repository/top-repository.directive.html +++ b/static/resources/js/components/top-repository/top-repository.directive.html @@ -1,16 +1,28 @@ -
- - - - - - - - - - - - -
// 'repository_name' | tr //// 'count' | tr //// 'creator' | tr //

// 'no_top_repositories' | tr //

//t.name////t.count////t.creator === '' ? 'N/A' : t.creator //
-
\ No newline at end of file +
+
+
+
+ + + + + + +
// 'repository_name' | tr //// 'count' | tr //// 'creator' | tr //
+
+
+ + + + + + + + + +

// 'no_top_repositories' | tr //

//t.name////t.count////t.creator === '' ? 'N/A' : t.creator //
+
+
+
+
From 876c4de77e919dbf790018e43d58ebca4752f08b Mon Sep 17 00:00:00 2001 From: yhua123 Date: Tue, 28 Jun 2016 20:19:31 +0800 Subject: [PATCH 11/17] Update list-log.directive.html fixed table title --- static/resources/js/components/log/list-log.directive.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/resources/js/components/log/list-log.directive.html b/static/resources/js/components/log/list-log.directive.html index 0df591220..fae521674 100644 --- a/static/resources/js/components/log/list-log.directive.html +++ b/static/resources/js/components/log/list-log.directive.html @@ -12,8 +12,8 @@ -
-
+
+
From 2b732ee9cb7c38b6feaa3a3e9b3ba69f9d7e5dfd Mon Sep 17 00:00:00 2001 From: yhua123 Date: Tue, 28 Jun 2016 20:25:17 +0800 Subject: [PATCH 12/17] Update list-project-member.directive.html fixed table title --- .../project-member/list-project-member.directive.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/static/resources/js/components/project-member/list-project-member.directive.html b/static/resources/js/components/project-member/list-project-member.directive.html index 1ed56bf0e..b42b2e922 100644 --- a/static/resources/js/components/project-member/list-project-member.directive.html +++ b/static/resources/js/components/project-member/list-project-member.directive.html @@ -13,8 +13,7 @@
-
-
+
@@ -29,7 +28,6 @@
-
From 1b70c0f91497298508115dadb5df1f4914f90e68 Mon Sep 17 00:00:00 2001 From: yhua123 Date: Tue, 28 Jun 2016 20:27:58 +0800 Subject: [PATCH 13/17] Update destination.directive.html fixed table title --- .../components/system-management/destination.directive.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/resources/js/components/system-management/destination.directive.html b/static/resources/js/components/system-management/destination.directive.html index 371cc05c1..3cdbf9643 100644 --- a/static/resources/js/components/system-management/destination.directive.html +++ b/static/resources/js/components/system-management/destination.directive.html @@ -12,8 +12,8 @@ -
-
+
+
From 4a985c403ba2495dfdf14ad92f17c0cb00ecd18b Mon Sep 17 00:00:00 2001 From: yhua123 Date: Tue, 28 Jun 2016 20:29:43 +0800 Subject: [PATCH 14/17] Update replication.directive.html fixed table title --- .../components/system-management/replication.directive.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/resources/js/components/system-management/replication.directive.html b/static/resources/js/components/system-management/replication.directive.html index 7333e3ffb..18a68ffe0 100644 --- a/static/resources/js/components/system-management/replication.directive.html +++ b/static/resources/js/components/system-management/replication.directive.html @@ -9,8 +9,8 @@ -
-
+
+
From a747c274bc4408f501545610b65d56ca61689c45 Mon Sep 17 00:00:00 2001 From: yhua123 Date: Tue, 28 Jun 2016 20:35:52 +0800 Subject: [PATCH 15/17] Update top-repository.directive.html fixed table title --- .../top-repository.directive.html | 46 +++++++++---------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/static/resources/js/components/top-repository/top-repository.directive.html b/static/resources/js/components/top-repository/top-repository.directive.html index 740e01148..372aae120 100644 --- a/static/resources/js/components/top-repository/top-repository.directive.html +++ b/static/resources/js/components/top-repository/top-repository.directive.html @@ -1,28 +1,24 @@ -
-
-
-
-
- - - - - -
// 'repository_name' | tr //// 'count' | tr //// 'creator' | tr //
-
-
- - - - - - - - - -

// 'no_top_repositories' | tr //

//t.name////t.count////t.creator === '' ? 'N/A' : t.creator //
-
-
+
+
+ + + + + + +
// 'repository_name' | tr //// 'count' | tr //// 'creator' | tr //
+
+
+ + + + + + + + + +

// 'no_top_repositories' | tr //

//t.name////t.count////t.creator === '' ? 'N/A' : t.creator //
From b33224d2a66f75a64164bc9c38f047d4dc7a93c4 Mon Sep 17 00:00:00 2001 From: yhua123 Date: Tue, 28 Jun 2016 20:56:35 +0800 Subject: [PATCH 16/17] Update destination.directive.html fixed table title --- .../js/components/system-management/destination.directive.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/static/resources/js/components/system-management/destination.directive.html b/static/resources/js/components/system-management/destination.directive.html index 3cdbf9643..073dc8358 100644 --- a/static/resources/js/components/system-management/destination.directive.html +++ b/static/resources/js/components/system-management/destination.directive.html @@ -11,7 +11,6 @@
-
@@ -46,6 +45,6 @@
-
//vm.destinations ? vm.destinations.length : 0// // 'items' | tr //
+
//vm.destinations ? vm.destinations.length : 0// // 'items' | tr //
From 13efb67580feffa18259e8aa3fa4f5c20868f5ef Mon Sep 17 00:00:00 2001 From: yhua123 Date: Tue, 28 Jun 2016 21:00:35 +0800 Subject: [PATCH 17/17] Update destination.directive.html change table title position --- .../components/system-management/destination.directive.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/resources/js/components/system-management/destination.directive.html b/static/resources/js/components/system-management/destination.directive.html index 073dc8358..13b37b487 100644 --- a/static/resources/js/components/system-management/destination.directive.html +++ b/static/resources/js/components/system-management/destination.directive.html @@ -17,9 +17,9 @@ - - - + + +
// 'name' | tr //// 'endpoint' | tr //// 'creation_time' | tr //// 'actions' | tr //// 'endpoint' | tr //// 'creation_time' | tr //// 'actions' | tr //