瀏覽代碼

fix search history. (#3894)

* fix search history.

* add CHANGES.md
Zhuohao Li 3 年之前
父節點
當前提交
11c74af775
共有 2 個文件被更改,包括 3 次插入0 次删除
  1. 1 0
      CHANGES.md
  2. 2 0
      apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js

+ 1 - 0
CHANGES.md

@@ -76,6 +76,7 @@ Apollo 1.9.0
 * [fix apollo config data loader with profiles](https://github.com/ctripcorp/apollo/pull/3870)
 * [polish log](https://github.com/ctripcorp/apollo/pull/3882)
 * [add history query](https://github.com/ctripcorp/apollo/pull/3878)
+* [fix history query](https://github.com/ctripcorp/apollo/pull/3894)
 
 ------------------
 All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/6?closed=1)

+ 2 - 0
apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js

@@ -870,6 +870,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
             function searchHistory(namespace) {
                 namespace.commits = [];
                 namespace.commitPage = 0;
+                namespace.hasLoadAllCommit = false;
                 var size = 10;
                 CommitService.find_commits(scope.appId,
                     scope.env,
@@ -888,6 +889,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
                             result[i].changeSets = JSON.parse(result[i].changeSets);
                             namespace.commits.push(result[i]);
                         }
+                        namespace.commitPage++
                     }, function (result) {
                         toastr.error(AppUtil.errorMsg(result), $translate.instant('ApolloNsPanel.LoadingHistoryError'));
                     });