mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-05 06:04:35 +08:00
fix: Remove deprecated google drive connection information
This commit is contained in:
parent
5a34e2d380
commit
f3d401ea4c
18 changed files with 38 additions and 75 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -32,7 +32,6 @@ const (
|
|||
GoogleDrive = "GoogleDrive"
|
||||
|
||||
OneDriveRedirectURI = "http://localhost/login/authorized"
|
||||
GoogleRedirectURI = "https://localhost:8080"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -1636,6 +1636,8 @@ const message = {
|
|||
code: '認証コード',
|
||||
codeHelper:
|
||||
'[取得]ボタンをクリックしてから、リダイレクトリンクの「コード」の後にコンテンツをログインしてコピーします。この入力ボックスに貼り付けます。特定の手順については、公式のドキュメントを参照してください。',
|
||||
googleHelper:
|
||||
'まずGoogleアプリケーションを作成し、クライアント情報を取得してフォームに記入し、取得ボタンをクリックしてください。具体的な操作は公式ドキュメントを参照してください。',
|
||||
loadCode: '取得する',
|
||||
COS: 'tencent cos',
|
||||
ap_beijing_1: '北京ゾーン1',
|
||||
|
|
|
@ -1619,6 +1619,8 @@ const message = {
|
|||
code: '인증 코드',
|
||||
codeHelper:
|
||||
'"획득" 버튼을 클릭한 다음 OneDrive 에 로그인하여 리디렉션된 링크에서 "code" 이후의 내용을 복사하십시오. 이 입력 상자에 붙여넣으십시오. 자세한 지침은 공식 문서를 참조하십시오.',
|
||||
googleHelper:
|
||||
'먼저 Google 애플리케이션을 생성하고 클라이언트 정보를 획득한 후 양식을 작성하고 획득 버튼을 클릭하세요. 구체적인 작업은 공식 문서를 참조하십시오.',
|
||||
loadCode: '획득',
|
||||
COS: 'Tencent COS',
|
||||
ap_beijing_1: '베이징 지역 1',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -1677,6 +1677,8 @@ const message = {
|
|||
code: 'Код авторизации',
|
||||
codeHelper:
|
||||
'Пожалуйста, нажмите кнопку "Получить", затем войдите в OneDrive и скопируйте содержимое после "code" в перенаправленной ссылке. Вставьте его в это поле ввода. Подробные инструкции смотрите в официальной документации.',
|
||||
googleHelper:
|
||||
'Сначала создайте приложение Google и получите информацию о клиенте, заполните форму и нажмите кнопку получения. Конкретные операции см. в официальной документации.',
|
||||
loadCode: 'Получить',
|
||||
COS: 'Tencent COS',
|
||||
ap_beijing_1: 'Пекин Зона 1',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -1618,6 +1618,7 @@ const message = {
|
|||
code: '授權碼',
|
||||
codeHelper:
|
||||
'請點擊獲取按鈕,然後登錄 {0} 復製跳轉鏈接中 code 後面的內容,粘貼到該輸入框中,具體操作可參考官方文檔。',
|
||||
googleHelper: '請先創建Google應用並獲取客戶端信息,填寫表單後點擊獲取按鈕,具體操作可參考官方文檔。',
|
||||
loadCode: '獲取',
|
||||
COS: '騰訊雲 COS',
|
||||
ap_beijing_1: '北京一區',
|
||||
|
|
|
@ -1613,6 +1613,7 @@ const message = {
|
|||
code: '授权码',
|
||||
codeHelper:
|
||||
'请点击获取按钮,然后登录 {0} 复制跳转链接中 code 后面的内容,粘贴到该输入框中,具体操作可参考官方文档。',
|
||||
googleHelper: '请先在创建 google 应用并获取客户端信息,写入表单后点击获取按钮,具体操作可参考官方文档。',
|
||||
loadCode: '获取',
|
||||
COS: '腾讯云 COS',
|
||||
ap_beijing_1: '北京一区',
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'"
|
||||
|
@ -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">
|
||||
|
@ -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';
|
||||
|
|
Loading…
Add table
Reference in a new issue