diff --git a/x-pack/legacy/plugins/code/model/repository.ts b/x-pack/legacy/plugins/code/model/repository.ts
index ec2777caf8584..c4469a7d593d7 100644
--- a/x-pack/legacy/plugins/code/model/repository.ts
+++ b/x-pack/legacy/plugins/code/model/repository.ts
@@ -171,6 +171,7 @@ export interface IndexWorkerProgress extends WorkerProgress {
export enum RepoState {
CLONING,
+ UPDATING,
DELETING,
INDEXING,
READY,
diff --git a/x-pack/legacy/plugins/code/public/components/admin_page/project_item.tsx b/x-pack/legacy/plugins/code/public/components/admin_page/project_item.tsx
index 48a6407b911c0..b3a2c49c08f51 100644
--- a/x-pack/legacy/plugins/code/public/components/admin_page/project_item.tsx
+++ b/x-pack/legacy/plugins/code/public/components/admin_page/project_item.tsx
@@ -30,6 +30,7 @@ import { RepoStatus } from '../../actions/status';
const stateColor = {
[RepoState.CLONING]: 'secondary',
+ [RepoState.UPDATING]: 'secondary',
[RepoState.DELETING]: 'accent',
[RepoState.INDEXING]: 'primary',
};
@@ -126,6 +127,12 @@ class CodeProjectItem extends React.PureComponent<
);
+ } else if (status.state === RepoState.UPDATING) {
+ footer = (
+
+
+
+ );
} else if (status.state === RepoState.DELETE_ERROR) {
footer = (
diff --git a/x-pack/legacy/plugins/code/public/reducers/status.ts b/x-pack/legacy/plugins/code/public/reducers/status.ts
index fe9e58ffcc488..4e57d5e7e7565 100644
--- a/x-pack/legacy/plugins/code/public/reducers/status.ts
+++ b/x-pack/legacy/plugins/code/public/reducers/status.ts
@@ -71,6 +71,9 @@ const getGitState = (gitStatus: CloneWorkerProgress) => {
) {
return RepoState.CLONE_ERROR;
} else if (progress < WorkerReservedProgress.COMPLETED) {
+ if (gitStatus.cloneProgress && gitStatus.cloneProgress.isCloned) {
+ return RepoState.UPDATING;
+ }
return RepoState.CLONING;
} else if (progress === WorkerReservedProgress.COMPLETED) {
return RepoState.READY;
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index 208bb36b58ac1..44a1009707d89 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -4306,6 +4306,7 @@
"xpack.code.repoItem.cancelButtonText": "否,取消",
"xpack.code.repoItem.cloneErrorText": "克隆错误",
"xpack.code.repoItem.cloningText": "克隆中...",
+ "xpack.code.repoItem.updatingText": "更新中...",
"xpack.code.repoItem.confirmButtonText": "是,继续",
"xpack.code.repoItem.deleteButtonLabel": "删除",
"xpack.code.repoItem.deleteConfirmTitle": "确认删除仓库?",