Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions agent/app/service/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,6 @@ func (u *DashboardService) LoadAppLauncher(ctx *gin.Context) ([]dto.AppLauncher,
if data[i].IsInstall != data[j].IsInstall {
return data[i].IsInstall
}
if data[i].IsInstall && data[j].IsInstall {
return data[i].Name < data[j].Name
}
return data[i].Recommend < data[j].Recommend
})
return data, nil
Expand Down
8 changes: 1 addition & 7 deletions core/app/service/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,7 @@ func (u *BackupService) LoadBackupClientInfo(clientType string) (dto.BackupClien
var data dto.BackupClientInfo
clientIDKey := "OneDriveID"
clientIDSc := "OneDriveSc"
if clientType == constant.GoogleDrive {
clientIDKey = "GoogleID"
clientIDSc = "GoogleSc"
data.RedirectUri = constant.GoogleRedirectURI
} else {
data.RedirectUri = constant.OneDriveRedirectURI
}
data.RedirectUri = constant.OneDriveRedirectURI
clientID, err := settingRepo.Get(repo.WithByKey(clientIDKey))
if err != nil {
return data, err
Expand Down
1 change: 0 additions & 1 deletion core/constant/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const (
GoogleDrive = "GoogleDrive"

OneDriveRedirectURI = "http://localhost/login/authorized"
GoogleRedirectURI = "https://localhost:8080"
)

const (
Expand Down
2 changes: 0 additions & 2 deletions core/init/migration/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ func Init() {
migrations.InitOneDrive,
migrations.InitHost,
migrations.InitTerminalSetting,
migrations.InitGoogle,
migrations.AddTaskDB,
migrations.AddXpackHideMenu,
migrations.UpdateGoogle,
migrations.UpdateXpackHideMenu,
migrations.UpdateOnedrive,
migrations.AddClusterMenu,
Expand Down
30 changes: 0 additions & 30 deletions core/init/migration/migrations/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,19 +255,6 @@ var InitOneDrive = &gormigrate.Migration{
},
}

var InitGoogle = &gormigrate.Migration{
ID: "20241111-init-google",
Migrate: func(tx *gorm.DB) error {
if err := tx.Create(&model.Setting{Key: "GoogleID", Value: "NTU2NTQ3NDYwMTQtY2Q0bGR0dDk2aGNsNWcxYWtwdmJhZTFmcjJlZ2Y0MXAuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20K"}).Error; err != nil {
return err
}
if err := tx.Create(&model.Setting{Key: "GoogleSc", Value: "R09DU1BYLXRibXg0QVdVZ3d3Ykc2QW1XTHQ3YUdaZElVeE4K"}).Error; err != nil {
return err
}
return nil
},
}

var AddTaskDB = &gormigrate.Migration{
ID: "20241125-add-task-table",
Migrate: func(tx *gorm.DB) error {
Expand Down Expand Up @@ -456,23 +443,6 @@ var UpdateXpackHideMenu = &gormigrate.Migration{
},
}

var UpdateGoogle = &gormigrate.Migration{
ID: "20250616-update-google",
Migrate: func(tx *gorm.DB) error {
if err := tx.Model(&model.Setting{}).
Where("key = ?", "GoogleID").
Update("value", "NTU2NTQ3NDYwMTQtY2Q0bGR0dDk2aGNsNWcxYWtwdmJhZTFmcjJlZ2Y0MXAuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20=").Error; err != nil {
return err
}
if err := tx.Model(&model.Setting{}).
Where("key = ?", "GoogleSc").
Update("value", "R09DU1BYLXRibXg0QVdVZ3d3Ykc2QW1XTHQ3YUdaZElVeE4=").Error; err != nil {
return err
}
return nil
},
}

var UpdateOnedrive = &gormigrate.Migration{
ID: "20250704-update-onedrive",
Migrate: func(tx *gorm.DB) error {
Expand Down
9 changes: 2 additions & 7 deletions frontend/src/components/system-upgrade/releases/index.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<template>
<DrawerPro v-model="drawerVisible" :header="$t('setting.release')" @close="handleClose" size="large">
<div class="note">
<el-collapse
v-if="notes && notes.length !== 0"
v-model="currentVersion"
:accordion="true"
v-loading="loading"
>
<div class="note" v-loading="loading">
<el-collapse v-if="notes && notes.length !== 0" v-model="currentVersion" :accordion="true">
<div v-for="(item, index) in notes" :key="index">
<el-collapse-item :name="index">
<template #title>
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,8 @@ const message = {
code: 'Auth code',
codeHelper:
'Please click on the "Acquire" button, then login to {0} and copy the content after "code" in the redirected link. Paste it into this input box. For specific instructions, please refer to the official documentation.',
googleHelper:
'Please first create a Google application and obtain client information, fill in the form and click the get button. For specific operations, please refer to the official documentation.',
loadCode: 'Acquire',
COS: 'Tencent COS',
ap_beijing_1: 'Beijing Zone 1',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1636,6 +1636,8 @@ const message = {
code: '認証コード',
codeHelper:
'[取得]ボタンをクリックしてから、リダイレクトリンクの「コード」の後にコンテンツをログインしてコピーします。この入力ボックスに貼り付けます。特定の手順については、公式のドキュメントを参照してください。',
googleHelper:
'まずGoogleアプリケーションを作成し、クライアント情報を取得してフォームに記入し、取得ボタンをクリックしてください。具体的な操作は公式ドキュメントを参照してください。',
loadCode: '取得する',
COS: 'tencent cos',
ap_beijing_1: '北京ゾーン1',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1619,6 +1619,8 @@ const message = {
code: '인증 코드',
codeHelper:
'"획득" 버튼을 클릭한 다음 OneDrive 에 로그인하여 리디렉션된 링크에서 "code" 이후의 내용을 복사하십시오. 이 입력 상자에 붙여넣으십시오. 자세한 지침은 공식 문서를 참조하십시오.',
googleHelper:
'먼저 Google 애플리케이션을 생성하고 클라이언트 정보를 획득한 후 양식을 작성하고 획득 버튼을 클릭하세요. 구체적인 작업은 공식 문서를 참조하십시오.',
loadCode: '획득',
COS: 'Tencent COS',
ap_beijing_1: '베이징 지역 1',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/ms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1690,6 +1690,8 @@ const message = {
code: 'Kod Auth',
codeHelper:
'Sila klik butang "Peroleh", kemudian log masuk ke OneDrive dan salin kandungan selepas "code" dalam pautan yang telah diarahkan semula. Tampalkan kandungan tersebut ke dalam kotak input ini. Untuk arahan spesifik, sila rujuk dokumentasi rasmi.',
googleHelper:
'Sila buat aplikasi Google dan dapatkan maklumat klien terlebih dahulu, isi borang dan klik butang dapatkan. Untuk operasi khusus, sila rujuk dokumentasi rasmi.',
loadCode: 'Peroleh',
COS: 'Tencent COS',
ap_beijing_1: 'Beijing Zone 1',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/pt-br.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,8 @@ const message = {
code: 'Código de autorização',
codeHelper:
'Clique no botão "Adquirir", faça login no OneDrive e copie o conteúdo após "code" no link redirecionado. Cole-o neste campo. Para instruções específicas, consulte a documentação oficial.',
googleHelper:
'Por favor, primeiro crie um aplicativo Google e obtenha as informações do cliente, preencha o formulário e clique no botão obter. Para operações específicas, consulte a documentação oficial.',
loadCode: 'Obter',
COS: 'Tencent COS',
ap_beijing_1: 'Beijing Zona 1',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1677,6 +1677,8 @@ const message = {
code: 'Код авторизации',
codeHelper:
'Пожалуйста, нажмите кнопку "Получить", затем войдите в OneDrive и скопируйте содержимое после "code" в перенаправленной ссылке. Вставьте его в это поле ввода. Подробные инструкции смотрите в официальной документации.',
googleHelper:
'Сначала создайте приложение Google и получите информацию о клиенте, заполните форму и нажмите кнопку получения. Конкретные операции см. в официальной документации.',
loadCode: 'Получить',
COS: 'Tencent COS',
ap_beijing_1: 'Пекин Зона 1',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lang/modules/tr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1735,6 +1735,8 @@ const message = {
code: 'Yetki kodu',
codeHelper:
'"Edin" düğmesine tıklayın, ardından {0}’a giriş yapın ve yönlendirilen bağlantıdaki "code" sonrası içeriği kopyalayın. Bu içeriği giriş kutusuna yapıştırın. Özel talimatlar için lütfen resmi belgelere bakın.',
googleHelper:
'Lütfen önce bir Google uygulaması oluşturun ve istemci bilgilerini alın, formu doldurun ve al butonuna tıklayın. Belirli işlemler için lütfen resmi belgelere bakın.',
loadCode: 'Edin',
COS: 'Tencent COS',
ap_beijing_1: 'Pekin Bölgesi 1',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/zh-Hant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,7 @@ const message = {
code: '授權碼',
codeHelper:
'請點擊獲取按鈕,然後登錄 {0} 復製跳轉鏈接中 code 後面的內容,粘貼到該輸入框中,具體操作可參考官方文檔。',
googleHelper: '請先創建Google應用並獲取客戶端信息,填寫表單後點擊獲取按鈕,具體操作可參考官方文檔。',
loadCode: '獲取',
COS: '騰訊雲 COS',
ap_beijing_1: '北京一區',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1613,6 +1613,7 @@ const message = {
code: '授权码',
codeHelper:
'请点击获取按钮,然后登录 {0} 复制跳转链接中 code 后面的内容,粘贴到该输入框中,具体操作可参考官方文档。',
googleHelper: '请先在创建 google 应用并获取客户端信息,写入表单后点击获取按钮,具体操作可参考官方文档。',
loadCode: '获取',
COS: '腾讯云 COS',
ap_beijing_1: '北京一区',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/cronjob/cronjob/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
<template #default="{ row }">
<el-button v-if="row.lastRecordStatus === 'Success'" icon="Select" link type="success" />
<el-button v-if="row.lastRecordStatus === 'Failed'" icon="CloseBold" link type="danger" />
<el-button v-if="row.lastRecordStatus === 'Waiting'" icon="SemiSelect" link type="info" />
<el-button v-if="row.lastRecordStatus === 'Waiting'" :loading="true" link type="info" />
{{ row.lastRecordTime }}
</template>
</el-table-column>
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/views/cronjob/cronjob/record/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,15 @@
<template #label>
<span class="status-label">{{ $t('commons.table.interval') }}</span>
</template>
<el-button link v-if="!currentRecord?.interval" :loading="true" />
<el-button
link
v-if="currentRecord?.status === 'Waiting' && !currentRecord?.interval"
:loading="true"
/>
<span v-else>
<span class="status-count" v-if="currentRecord?.interval! <= 1000">
{{ currentRecord?.interval }} ms
{{ currentRecord?.interval === 0 ? '-' : currentRecord?.interval }}
ms
</span>
<span class="status-count" v-if="currentRecord?.interval! > 1000">
{{ currentRecord?.interval! / 1000 }} s
Expand Down
33 changes: 11 additions & 22 deletions frontend/src/views/setting/backup-account/operate/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@
<el-option :label="$t('setting.UPYUN')" value="UPYUN"></el-option>
</el-select>
<span v-if="isALIYUNYUN()" class="input-help">{{ $t('setting.ALIYUNHelper') }}</span>
<span v-if="dialogData.rowData?.type === 'GoogleDrive'" class="input-help">
{{ $t('setting.googleHelper', [$t('setting.' + dialogData.rowData?.type)]) }}
<el-link
style="font-size: 12px; margin-left: 5px"
icon="Position"
@click="toDoc('google-drive')"
type="primary"
>
{{ $t('firewall.quickJump') }}
</el-link>
</span>
</el-form-item>
<el-form-item
v-if="dialogData.rowData!.type === 'S3'"
Expand Down Expand Up @@ -349,17 +360,6 @@
{{ $t('setting.loadCode') }}
</el-button>
</div>
<span class="input-help">
{{ $t('setting.codeHelper', [$t('setting.' + dialogData.rowData?.type)]) }}
<el-link
style="font-size: 12px; margin-left: 5px"
icon="Position"
@click="toDoc(dialogData.rowData!.type === 'OneDrive' ? 'onedrive-bind' : 'google-drive')"
type="primary"
>
{{ $t('firewall.quickJump') }}
</el-link>
</span>
</el-form-item>
</div>
<el-form-item v-if="hasBackDir()" :label="$t('setting.backupDir')" prop="backupPath">
Expand Down Expand Up @@ -608,17 +608,6 @@ const changeType = async () => {
};
}
break;
case 'GoogleDrive':
const res2 = await getClientInfo('GoogleDrive');
clientInfo.value = res2.data;
if (!dialogData.value.rowData.id) {
dialogData.value.rowData.varsJson = {
client_id: res2.data.client_id,
client_secret: res2.data.client_secret,
redirect_uri: res2.data.redirect_uri,
};
}
break;
case 'SFTP':
dialogData.value.rowData.varsJson['port'] = 22;
dialogData.value.rowData.varsJson['authMode'] = 'password';
Expand Down
Loading