|
@@ -64,7 +64,9 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
|
|
scope.refreshNamespace = refreshNamespace;
|
|
scope.refreshNamespace = refreshNamespace;
|
|
scope.switchView = switchView;
|
|
scope.switchView = switchView;
|
|
scope.toggleItemSearchInput = toggleItemSearchInput;
|
|
scope.toggleItemSearchInput = toggleItemSearchInput;
|
|
|
|
+ scope.toggleHistorySearchInput = toggleHistorySearchInput;
|
|
scope.searchItems = searchItems;
|
|
scope.searchItems = searchItems;
|
|
|
|
+ scope.searchHistory = searchHistory;
|
|
scope.loadCommitHistory = loadCommitHistory;
|
|
scope.loadCommitHistory = loadCommitHistory;
|
|
scope.toggleTextEditStatus = toggleTextEditStatus;
|
|
scope.toggleTextEditStatus = toggleTextEditStatus;
|
|
scope.goToSyncPage = goToSyncPage;
|
|
scope.goToSyncPage = goToSyncPage;
|
|
@@ -129,6 +131,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
|
|
namespace.displayControl = {
|
|
namespace.displayControl = {
|
|
currentOperateBranch: 'master',
|
|
currentOperateBranch: 'master',
|
|
showSearchInput: false,
|
|
showSearchInput: false,
|
|
|
|
+ showHistorySearchInput: false,
|
|
show: scope.showBody
|
|
show: scope.showBody
|
|
};
|
|
};
|
|
scope.showNamespaceBody = namespace.showNamespaceBody ? true : scope.showBody;
|
|
scope.showNamespaceBody = namespace.showNamespaceBody ? true : scope.showBody;
|
|
@@ -472,6 +475,7 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
|
|
scope.env,
|
|
scope.env,
|
|
namespace.baseInfo.clusterName,
|
|
namespace.baseInfo.clusterName,
|
|
namespace.baseInfo.namespaceName,
|
|
namespace.baseInfo.namespaceName,
|
|
|
|
+ namespace.HistorySearchKey,
|
|
namespace.commitPage,
|
|
namespace.commitPage,
|
|
size)
|
|
size)
|
|
.then(function (result) {
|
|
.then(function (result) {
|
|
@@ -859,6 +863,36 @@ function directive($window, $translate, toastr, AppUtil, EventManager, Permissio
|
|
namespace.viewItems = items;
|
|
namespace.viewItems = items;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function toggleHistorySearchInput(namespace) {
|
|
|
|
+ namespace.displayControl.showHistorySearchInput = !namespace.displayControl.showHistorySearchInput;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function searchHistory(namespace) {
|
|
|
|
+ namespace.commits = [];
|
|
|
|
+ namespace.commitPage = 0;
|
|
|
|
+ var size = 10;
|
|
|
|
+ CommitService.find_commits(scope.appId,
|
|
|
|
+ scope.env,
|
|
|
|
+ namespace.baseInfo.clusterName,
|
|
|
|
+ namespace.baseInfo.namespaceName,
|
|
|
|
+ namespace.HistorySearchKey,
|
|
|
|
+ namespace.commitPage,
|
|
|
|
+ size)
|
|
|
|
+ .then(function (result) {
|
|
|
|
+ if (result.length < size) {
|
|
|
|
+ namespace.hasLoadAllCommit = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for (var i = 0; i < result.length; i++) {
|
|
|
|
+ //to json
|
|
|
|
+ result[i].changeSets = JSON.parse(result[i].changeSets);
|
|
|
|
+ namespace.commits.push(result[i]);
|
|
|
|
+ }
|
|
|
|
+ }, function (result) {
|
|
|
|
+ toastr.error(AppUtil.errorMsg(result), $translate.instant('ApolloNsPanel.LoadingHistoryError'));
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
//normal release and gray release
|
|
//normal release and gray release
|
|
function publish(namespace) {
|
|
function publish(namespace) {
|
|
|
|
|