|
@@ -588,7 +588,14 @@ func DownloadCloudSnapshot(tag, id string) (err error) {
|
|
|
}
|
|
|
|
|
|
defer util.PushClearProgress()
|
|
|
- downloadFileCount, downloadChunkCount, downloadBytes, err := repo.DownloadTagIndex(tag, id, map[string]interface{}{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress})
|
|
|
+
|
|
|
+ var downloadFileCount, downloadChunkCount int
|
|
|
+ var downloadBytes int64
|
|
|
+ if "" == tag {
|
|
|
+ downloadFileCount, downloadChunkCount, downloadBytes, err = repo.DownloadIndex(id, map[string]interface{}{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress})
|
|
|
+ } else {
|
|
|
+ downloadFileCount, downloadChunkCount, downloadBytes, err = repo.DownloadTagIndex(tag, id, map[string]interface{}{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress})
|
|
|
+ }
|
|
|
if nil != err {
|
|
|
return
|
|
|
}
|
|
@@ -672,7 +679,7 @@ func GetCloudRepoTagSnapshots() (ret []*dejavu.Log, err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-func GetCloudRepoSnapshots(marker string) (ret []*dejavu.Log, nextMarker string, err error) {
|
|
|
+func GetCloudRepoSnapshots(page int) (ret []*dejavu.Log, pageCount, totalCount int, err error) {
|
|
|
ret = []*dejavu.Log{}
|
|
|
if 1 > len(Conf.Repo.Key) {
|
|
|
err = errors.New(Conf.Language(26))
|
|
@@ -684,7 +691,7 @@ func GetCloudRepoSnapshots(marker string) (ret []*dejavu.Log, nextMarker string,
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- logs, nextMarker, err := repo.GetCloudRepoLogs(marker)
|
|
|
+ logs, pageCount, totalCount, err := repo.GetCloudRepoLogs(page)
|
|
|
if nil != err {
|
|
|
return
|
|
|
}
|