Skip to content

Commit

Permalink
🎨 Automatically check cloud data integrity #8653
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jul 2, 2023
1 parent 5939593 commit 88cd5f0
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 11 deletions.
6 changes: 5 additions & 1 deletion app/appearance/langs/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,10 @@
"204": "The doc in the user guide does not support sharing to the community",
"205": "The plugin is not supported in the current environment",
"206": "Executing content replacement [%d/%d]",
"207": "Executing path replacement [%d/%d]"
"207": "Executing path replacement [%d/%d]",
"208": "Uploading index list...",
"209": "Uploading check index...",
"210": "Verifying cloud data...",
"211": "Cloud data verification complete"
}
}
6 changes: 5 additions & 1 deletion app/appearance/langs/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,10 @@
"204": "La documentación en la guía del usuario no permite compartir con la comunidad",
"205": "El complemento no es compatible con el entorno actual",
"206": "Ejecutando reemplazo de contenido [%d/%d]",
"207": "Ejecutando reemplazo de ruta [%d/%d]"
"207": "Ejecutando reemplazo de ruta [%d/%d]",
"208": "Cargando lista de índice...",
"209": "Cargando índice de verificación...",
"210": "Verificando datos en la nube...",
"211": "Verificaci\u00f3n de datos en la nube completada"
}
}
6 changes: 5 additions & 1 deletion app/appearance/langs/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,10 @@
"204": "La documentation du guide de l'utilisateur ne prend pas en charge le partage avec la communauté",
"205": "Le plugin n'est pas pris en charge dans l'environnement actuel",
"206": "Exécution du remplacement de contenu [%d/%d]",
"207": "Exécution du remplacement de chemin [%d/%d]"
"207": "Exécution du remplacement de chemin [%d/%d]",
"208": "Téléchargement de la liste d'index...",
"209": "Téléchargement de l'index de vérification...",
"210": "Vérification des données cloud...",
"211": "Vérification des données cloud terminée"
}
}
6 changes: 5 additions & 1 deletion app/appearance/langs/zh_CHT.json
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,10 @@
"204": "用戶指南中的文檔不支持分享到社區",
"205": "該插件不支持在當前環境下使用",
"206": "正在執行內容替換 [%d/%d]",
"207": "正在執行路徑替換 [%d/%d]"
"207": "正在執行路徑替換 [%d/%d]",
"208": "正在上傳索引列表...",
"209": "正在上傳校驗索引...",
"210": "正在校驗雲端數據...",
"211": "校驗雲端數據完畢"
}
}
6 changes: 5 additions & 1 deletion app/appearance/langs/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,10 @@
"204": "用户指南中的文档不支持分享到社区",
"205": "该插件不支持在当前环境下使用",
"206": "正在执行内容替换 [%d/%d]",
"207": "正在执行路径替换 [%d/%d]"
"207": "正在执行路径替换 [%d/%d]",
"208": "正在上传索引列表...",
"209": "正在上传校验索引...",
"210": "正在校验云端数据...",
"211": "校验云端数据完毕"
}
}
4 changes: 2 additions & 2 deletions kernel/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ require (
github.com/radovskyb/watcher v1.0.7
github.com/sashabaranov/go-openai v1.12.0
github.com/shirou/gopsutil/v3 v3.23.5
github.com/siyuan-note/dejavu v0.0.0-20230701164716-3bd946c2227d
github.com/siyuan-note/dejavu v0.0.0-20230702094059-ebefc7dc4498
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75
github.com/siyuan-note/eventbus v0.0.0-20230216103454-41885eac6c2b
github.com/siyuan-note/eventbus v0.0.0-20230702081350-6dde667e7112
github.com/siyuan-note/filelock v0.0.0-20230615140405-d05a21d49524
github.com/siyuan-note/httpclient v0.0.0-20230625034122-2e57d97ca444
github.com/siyuan-note/logging v0.0.0-20230327073243-ebe83aec1493
Expand Down
8 changes: 4 additions & 4 deletions kernel/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,12 @@ github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5g
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA=
github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=
github.com/siyuan-note/dejavu v0.0.0-20230701164716-3bd946c2227d h1:XCAqfdZLlkxMSFecf5mEQncKZri+fFBIPAbpq1K0+wI=
github.com/siyuan-note/dejavu v0.0.0-20230701164716-3bd946c2227d/go.mod h1:iR6kmFYS3jz/yuDFg6atb0yZdDs2RvS5gf3NzTL4frI=
github.com/siyuan-note/dejavu v0.0.0-20230702094059-ebefc7dc4498 h1:pdGacClM5a4nDD+OQ0+4lMN62k5xovhizABM3d4Nh4M=
github.com/siyuan-note/dejavu v0.0.0-20230702094059-ebefc7dc4498/go.mod h1:GxekubylJpkSt5Y29ecxNxjpKusPov+07mM1rsPtk+g=
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE=
github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw=
github.com/siyuan-note/eventbus v0.0.0-20230216103454-41885eac6c2b h1:828lTUW2C0uNiolODqoACu7J8sDUzswD4Xo04mUombg=
github.com/siyuan-note/eventbus v0.0.0-20230216103454-41885eac6c2b/go.mod h1:Sqo4FYX5lAXu7gWkbEdJF0e6P57tNNVV4WDKYDctokI=
github.com/siyuan-note/eventbus v0.0.0-20230702081350-6dde667e7112 h1:lb+8C+XEEEn/lcBtoXlrf5mZEoe0y0KlqiIGG93Gozc=
github.com/siyuan-note/eventbus v0.0.0-20230702081350-6dde667e7112/go.mod h1:Sqo4FYX5lAXu7gWkbEdJF0e6P57tNNVV4WDKYDctokI=
github.com/siyuan-note/filelock v0.0.0-20230615140405-d05a21d49524 h1:ZuxN5gwqtUOd1NkOkNhM4OlVWfjujY98zsR+zFi4x9g=
github.com/siyuan-note/filelock v0.0.0-20230615140405-d05a21d49524/go.mod h1:jK5lCYfPbFOrW23/HMeU7kmpLdEd5GkennF+kUpy7Vs=
github.com/siyuan-note/httpclient v0.0.0-20230625034122-2e57d97ca444 h1:AE9ggQ7Tg/iytE6Wq/auBc0uZ/G+hYSRWK23TeHeFmg=
Expand Down
20 changes: 20 additions & 0 deletions kernel/model/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -1647,6 +1647,26 @@ func subscribeRepoEvents() {
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
})
eventbus.Subscribe(eventbus.EvtCloudBeforeUploadIndexes, func(context map[string]interface{}) {
msg := fmt.Sprintf(Conf.Language(208))
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
})
eventbus.Subscribe(eventbus.EvtCloudBeforeUploadCheckIndex, func(context map[string]interface{}) {
msg := fmt.Sprintf(Conf.Language(209))
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
})
eventbus.Subscribe(eventbus.EvtCloudBeforeFixObjects, func(context map[string]interface{}) {
msg := fmt.Sprintf(Conf.Language(210))
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
})
eventbus.Subscribe(eventbus.EvtCloudAfterFixObjects, func(context map[string]interface{}) {
msg := fmt.Sprintf(Conf.Language(211))
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
})
}

func buildCloudConf() (ret *cloud.Conf, err error) {
Expand Down

0 comments on commit 88cd5f0

Please sign in to comment.