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
9 changes: 8 additions & 1 deletion agent/app/service/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,18 @@ func (a AppService) GetApp(key string) (*response.AppDTO, error) {
return nil, err
}
var versionsRaw []string
hasLatest := false
for _, detail := range details {
if strings.Contains(detail.Version, "latest") {
hasLatest = true
continue
}
versionsRaw = append(versionsRaw, detail.Version)
}
appDTO.Versions = common.GetSortedVersions(versionsRaw)

if hasLatest {
appDTO.Versions = append([]string{"latest"}, appDTO.Versions...)
}
return &appDTO, nil
}

Expand Down
5 changes: 5 additions & 0 deletions agent/app/service/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ func (r *RuntimeService) Create(create request.RuntimeCreate) (*model.Runtime, e
if exist != nil {
return nil, buserr.New("ErrImageExist")
}
fpmPort, ok := create.Params["PANEL_APP_PORT_HTTP"]
if !ok {
return nil, buserr.New("ErrPortNotFound")
}
hostPorts = append(hostPorts, fmt.Sprintf("%.0f", fpmPort.(float64)))
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo, constant.RuntimePython, constant.RuntimeDotNet:
if !fileOp.Stat(create.CodeDir) {
return nil, buserr.New("ErrPathNotFound")
Expand Down
4 changes: 2 additions & 2 deletions agent/app/service/website.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error)
if !checkImageExist(nil, runtime.Image) {
return buserr.WithName("ErrImageNotExist", runtime.Name)
}
website.Proxy = fmt.Sprintf("127.0.0.1:%d", runtime.Port)
website.Proxy = fmt.Sprintf("127.0.0.1:%s", runtime.Port)
} else {
website.ProxyType = create.ProxyType
if website.ProxyType == constant.RuntimeProxyUnix {
Expand All @@ -396,7 +396,7 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error)
website.Proxy = proxy
}
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimeGo:
website.Proxy = fmt.Sprintf("127.0.0.1:%d", runtime.Port)
website.Proxy = fmt.Sprintf("127.0.0.1:%s", runtime.Port)
}
case constant.Subsite:
parentWebsite, err := websiteRepo.GetFirst(repo.WithByID(create.ParentWebsiteID))
Expand Down
1 change: 1 addition & 0 deletions agent/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ require (
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/volcengine/volc-sdk-golang v1.0.189 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
Expand Down
314 changes: 311 additions & 3 deletions agent/go.sum

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions agent/utils/ssl/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/json"
"github.com/go-acme/lego/v4/providers/dns/clouddns"
"github.com/go-acme/lego/v4/providers/dns/rainyun"
"github.com/go-acme/lego/v4/providers/dns/volcengine"
"os"
"strings"
"time"
Expand Down Expand Up @@ -76,6 +77,7 @@ const (
Godaddy DnsType = "Godaddy"
TencentCloud DnsType = "TencentCloud"
RainYun DnsType = "RainYun"
Volcengine DnsType = "Volcengine"
)

type DNSParam struct {
Expand Down Expand Up @@ -188,6 +190,14 @@ func (c *AcmeClient) UseDns(dnsType DnsType, params string, websiteSSL model.Web
rainyunConfig.PollingInterval = pollingInterval
rainyunConfig.TTL = ttl
p, err = rainyun.NewDNSProviderConfig(rainyunConfig)
case Volcengine:
volcConfig := volcengine.NewDefaultConfig()
volcConfig.SecretKey = param.SecretKey
volcConfig.AccessKey = param.AccessKey
volcConfig.PropagationTimeout = propagationTimeout
volcConfig.PollingInterval = pollingInterval
volcConfig.TTL = ttl
p, err = volcengine.NewDNSProviderConfig(volcConfig)
}
if err != nil {
return err
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be no noticeable difference between the commented lines you've provided.

As these aren't code diffs or optimizations, I can offer some general advice:

When working with APIs, it's recommended to document all parameters that a function takes in (like secret keys) and how they interact with other API endpoints. This helps maintain consistency across functions and ensures best practices are being followed for security and reliability.

This is particularly important when working on projects where version control systems might not fully capture what specific changes were made at which point during development.

Regarding the mentioned services ("Godaddy," "Tencent Cloud," "Rain Yun" ["Volcengine"]), without more details about each service itself, it would have been hard to compare their features directly within this context, but broadly they differ based solely on region-specific capabilities like pricing plans, data centers, support levels or geographical coverage. Always consider researching and comparing various provider offerings if necessary for particular use cases.

It could be worth exploring whether implementing custom configurations using environment variables (like GOACME_ACCESS_KEY, GOACME_REGION) outside of Go may improve flexibility and scalability when developing applications over time.

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/group/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<DrawerPro v-model="open" :header="$t('website.group')" size="large" :back="handleClose">
<DrawerPro v-model="open" :header="$t('commons.table.group')" size="large" :back="handleClose">
<template #content>
<ComplexTable :data="data" @search="search()">
<template #leftToolBar>
Expand Down
12 changes: 8 additions & 4 deletions frontend/src/global/mimetype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ export const DNSTypes = [
label: i18n.global.t('website.huaweicloud'),
value: 'HuaweiCloud',
},
{
label: i18n.global.t('website.volcengine'),
value: 'Volcengine',
},
{
label: 'DNSPod (' + i18n.global.t('ssl.deprecated') + ')',
value: 'DnsPod',
Expand All @@ -183,6 +187,10 @@ export const DNSTypes = [
label: 'Cloudflare',
value: 'CloudFlare',
},
{
label: 'CloudDNS',
value: 'CloudDns',
},
{
label: 'NameSilo',
value: 'NameSilo',
Expand All @@ -199,10 +207,6 @@ export const DNSTypes = [
label: 'GoDaddy',
value: 'Godaddy',
},
{
label: 'CloudDNS',
value: 'CloudDns',
},
{
label: i18n.global.t('website.rainyun'),
value: 'RainYun',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main difference between the two versions mentioned is:

  • In version 175, "Website VolcEngine" has been added instead of "Website CloudEngine" in the first object exports.DNSTypes.

This minor update improves the accuracy on Google translations. Please ensure that you have all these changes applied to the project before proceeding with deployment.

To suggest further optimizations, consider integrating more recent DNS provider information from official websites or APIs as well as maintaining an updated list according to current trends and services offered by different providers.

Expand Down
4 changes: 4 additions & 0 deletions frontend/src/lang/modules/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ const message = {
bind: 'Bind',
unbind: 'Unbind',
fix: 'Fix',
down: 'Stop',
up: 'Start',
},
search: {
timeStart: 'Time start',
Expand Down Expand Up @@ -291,6 +293,7 @@ const message = {
sending: 'Sending',
healthy: 'Normal',
executing: 'Executing',
installerr: 'Installation failed',
},
units: {
second: 'Second',
Expand All @@ -306,6 +309,7 @@ const message = {
minuteUnit: 'min',
hourUnit: 'h',
dayUnit: 'd',
millisecond: 'ms',
},
},
menu: {
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/lang/modules/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ const message = {
createNewFile: '新しいファイルを作成します',
helpDoc: '文書をヘルプします',
unbind: 'バインド',
fix: '修正',
down: '停止',
up: '起動',
},
search: {
timeStart: '時間開始',
Expand Down Expand Up @@ -284,6 +287,7 @@ const message = {
sending: '送信中',
healthy: '正常',
executing: '実行中',
installerr: 'インストールに失敗しました',
},
units: {
second: '2番目|2番目|秒',
Expand All @@ -299,6 +303,7 @@ const message = {
minuteUnit: 'min',
hourUnit: 'h',
dayUnit: 'd',
millisecond: 'ミリ秒',
},
},
menu: {
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/lang/modules/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ const message = {
createNewFile: '새 파일 생성',
helpDoc: '도움말 문서',
unbind: '연결 해제',
fix: '수정',
down: '중지',
up: '시작',
},
search: {
timeStart: '시작 시간',
Expand Down Expand Up @@ -285,6 +288,7 @@ const message = {
sending: '전송 중',
healthy: '정상',
executing: '실행 중',
installerr: '설치 실패',
},
units: {
second: '초 | 초 | 초',
Expand All @@ -300,6 +304,7 @@ const message = {
minuteUnit: '분',
hourUnit: '시간',
dayUnit: '일',
millisecond: '밀리초',
},
},
menu: {
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/lang/modules/ms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ const message = {
createNewFile: 'Cipta fail baru',
helpDoc: 'Dokumen Bantuan',
unbind: 'Nyahkaitkan',
fix: 'Betulkan',
down: 'Hentikan',
up: 'Mulakan',
},
search: {
timeStart: 'Masa mula',
Expand Down Expand Up @@ -291,6 +294,7 @@ const message = {
sending: 'Menghantar',
healthy: 'Sihat',
executing: 'Melaksanakan',
installerr: 'Pemasangan gagal',
},
units: {
second: 'saat | saat | saat',
Expand All @@ -306,6 +310,7 @@ const message = {
minuteUnit: 'min',
hourUnit: 'h',
dayUnit: 'd',
millisecond: 'Milisaat',
},
},
menu: {
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/lang/modules/pt-br.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ const message = {
createNewFile: 'Criar novo arquivo',
helpDoc: 'Documento de ajuda',
unbind: 'Desvincular',
fix: 'Corrigir',
down: 'Parar',
up: 'Iniciar',
},
search: {
timeStart: 'Hora inicial',
Expand Down Expand Up @@ -289,6 +292,7 @@ const message = {
sending: 'Enviando',
healthy: 'Saudável',
executing: 'Executando',
installerr: 'Falha na instalação',
},
units: {
second: 'segundo | segundos | segundos',
Expand All @@ -304,6 +308,7 @@ const message = {
minuteUnit: 'min',
hourUnit: 'h',
dayUnit: 'd',
millisecond: 'Milissegundo',
},
},
menu: {
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/lang/modules/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ const message = {
createNewFile: 'Создать новый файл',
helpDoc: 'Справка',
unbind: 'Отвязать',
fix: 'Исправить',
down: 'Остановить',
up: 'Запустить',
},
search: {
timeStart: 'Время начала',
Expand Down Expand Up @@ -285,6 +288,7 @@ const message = {
sending: 'Отправка',
healthy: 'Нормально',
executing: 'Выполнение',
installerr: 'Ошибка установки',
},
units: {
second: ' секунда | секунда | секунд',
Expand All @@ -300,6 +304,7 @@ const message = {
minuteUnit: 'мин',
hourUnit: 'ч',
dayUnit: 'д',
millisecond: 'Миллисекунда',
},
},
menu: {
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/lang/modules/tw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ const message = {
bind: '綁定',
unbind: '解綁',
fix: '修復',
down: '停止',
up: '啟動',
},
search: {
timeStart: '開始時間',
Expand Down Expand Up @@ -285,6 +287,7 @@ const message = {
sending: '下發中',
healthy: '正常',
executing: '執行中',
installerr: '安裝失敗',
},
units: {
second: '秒',
Expand All @@ -300,6 +303,7 @@ const message = {
minuteUnit: '分鐘',
hourUnit: '小時',
dayUnit: '天',
millisecond: '毫秒',
},
},
menu: {
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ const message = {
bind: '绑定',
unbind: '解绑',
fix: '修复',
down: '停止',
up: '启动',
},
search: {
timeStart: '开始时间',
Expand Down Expand Up @@ -283,6 +285,7 @@ const message = {
sending: '下发中',
healthy: '正常',
executing: '执行中',
installerr: '安装失败',
},
units: {
second: '秒',
Expand All @@ -298,6 +301,7 @@ const message = {
minuteUnit: '分钟',
hourUnit: '小时',
dayUnit: '天',
millisecond: '毫秒',
},
},
menu: {
Expand Down Expand Up @@ -2109,6 +2113,7 @@ const message = {
changeDatabaseHelper2: '切换其他数据库会导致以前的备份无法恢复',
saveCustom: '另存为模版',
rainyun: '雨云',
volcengine: '火山引擎',
},
php: {
short_open_tag: '短标签支持',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/app-store/apps/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ const sync = async () => {
} else {
res = await syncApp(syncReq);
}
if (res.message != '') {
if (res.message != '' && res.message != 'success') {
MsgSuccess(res.message);
} else {
openTaskLog(taskID);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/host/file-management/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ const openWithVSCode = (row: File.File) => {

const buttons = [
{
label: i18n.global.t('commons.button.opem'),
label: i18n.global.t('commons.button.open'),
click: open,
},
{
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/website/runtime/dotnet/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ const goDashboard = async (port: any, protocol: string) => {
const operateRuntime = async (operate: string, ID: number) => {
try {
const action = await ElMessageBox.confirm(
i18n.global.t('runtime.operatorHelper', [i18n.global.t('commons.operate.' + operate)]),
i18n.global.t('commons.operate.' + operate),
i18n.global.t('runtime.operatorHelper', [i18n.global.t('commons.button.' + operate)]),
i18n.global.t('commons.button.' + operate),
{
confirmButtonText: i18n.global.t('commons.button.confirm'),
cancelButtonText: i18n.global.t('commons.button.cancel'),
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/website/runtime/go/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ const goDashboard = async (port: any, protocol: string) => {
const operateRuntime = async (operate: string, ID: number) => {
try {
const action = await ElMessageBox.confirm(
i18n.global.t('runtime.operatorHelper', [i18n.global.t('commons.operate.' + operate)]),
i18n.global.t('commons.operate.' + operate),
i18n.global.t('runtime.operatorHelper', [i18n.global.t('commons.button.' + operate)]),
i18n.global.t('commons.button.' + operate),
{
confirmButtonText: i18n.global.t('commons.button.confirm'),
cancelButtonText: i18n.global.t('commons.button.cancel'),
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/website/runtime/java/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ const goDashboard = async (port: any, protocol: string) => {
const operateRuntime = async (operate: string, ID: number) => {
try {
const action = await ElMessageBox.confirm(
i18n.global.t('runtime.operatorHelper', [i18n.global.t('commons.operate.' + operate)]),
i18n.global.t('commons.operate.' + operate),
i18n.global.t('runtime.operatorHelper', [i18n.global.t('commons.button.' + operate)]),
i18n.global.t('commons.button.' + operate),
{
confirmButtonText: i18n.global.t('commons.button.confirm'),
cancelButtonText: i18n.global.t('commons.button.cancel'),
Expand Down
Loading
Loading