feat: PHP 运行环境增加扩展列表提示 (#1500)

This commit is contained in:
zhengkunwang223 2023-06-30 23:26:12 +08:00 committed by GitHub
parent 5f750e6f49
commit 4662f4703c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 25 additions and 28 deletions

View file

@ -62,7 +62,7 @@ func handleParams(image, runtimeType, runtimeDir string, params map[string]inter
if extendsArray, ok := extends.([]interface{}); ok {
strArray := make([]string, len(extendsArray))
for i, v := range extendsArray {
strArray[i] = fmt.Sprintf("%v", v)
strArray[i] = strings.ToLower(fmt.Sprintf("%v", v))
}
params["PHP_EXTENSIONS"] = strings.Join(strArray, ",")
}

View file

@ -1558,9 +1558,11 @@ const message = {
toupgrade: 'To Upgrade',
edit: 'Edit runtime',
extendHelper:
'Extensions that do not exist in the list can be selected after manual input, for example: input sockets, and then select the first one in the drop-down list',
'Extensions that do not exist in the list can be selected after manual input, for example: input sockets, and then select the first one in the drop-down list,',
rebuildHelper:
'After editing the extension, you need to go to the [App Store-Installed] page to rebuild the PHP application to take effect',
phpPluginHelper:
'<a target="_blank" href="https://1panel.cn/docs/user_manual/websites/php/#php_1">View PHP extension list</a> ',
},
process: {
pid: 'Process ID',

View file

@ -1478,8 +1478,10 @@ const message = {
openrestryWarn: 'PHP 需要升级 OpenResty 1.21.4.1 版本以上才能使用',
toupgrade: '去升级',
edit: '编辑运行环境',
extendHelper: '列表中不存在的扩展可以手动输入之后选择:输入 sockets 然后在下拉列表中选择第一个',
extendHelper: '列表中不存在的扩展可以手动输入之后选择:输入 sockets 然后在下拉列表中选择第一个',
rebuildHelper: '编辑扩展后需要去应用商店-已安装页面重建PHP 应用之后才能生效',
phpPluginHelper:
"<a target=“_blank” href='https://1panel.cn/docs/user_manual/websites/php/#php_1'>查看 PHP 扩展列表</a> ",
},
process: {
pid: '进程ID',

View file

@ -334,3 +334,7 @@
background: none;
border: none;
}
.common-prompt {
margin-bottom: 20px !important;
}

View file

@ -11,12 +11,7 @@
</template>
<el-row v-loading="loading">
<el-col :span="22" :offset="1">
<el-alert
:title="$t('app.appInstallWarn')"
style="margin-bottom: 20px"
:closable="false"
type="error"
/>
<el-alert :title="$t('app.appInstallWarn')" class="common-prompt" :closable="false" type="error" />
<el-form
@submit.prevent
ref="paramForm"

View file

@ -20,12 +20,7 @@
</el-row>
<el-row v-else v-loading="loading">
<el-col :span="22" :offset="1">
<el-alert
:title="$t('app.updateHelper')"
type="warning"
:closable="false"
style="margin-bottom: 20px"
/>
<el-alert :title="$t('app.updateHelper')" type="warning" :closable="false" class="common-prompt" />
<el-form @submit.prevent ref="paramForm" :model="paramModel" label-position="top" :rules="rules">
<div v-for="(p, index) in params" :key="index">
<el-form-item :prop="p.key" :label="getLabel(p)">

View file

@ -9,7 +9,7 @@
<el-alert
v-if="form.fromApp"
:title="$t('container.appHelper')"
style="margin-bottom: 20px"
class="common-prompt"
:closable="false"
type="error"
/>

View file

@ -10,7 +10,7 @@
<template #header>
<DrawerHeader :header="$t('container.cutLog')" :back="handleClose" />
</template>
<el-alert style="margin-bottom: 20px" :closable="false" type="warning">
<el-alert class="common-prompt" :closable="false" type="warning">
<template #default>
<ul style="margin-left: -20px">
<li>{{ $t('container.cutLogHelper1') }}</li>

View file

@ -5,7 +5,7 @@
</template>
<el-row>
<el-col :span="22" :offset="1">
<el-alert :title="$t('file.ownerHelper')" type="info" :closable="false" style="margin-bottom: 20px" />
<el-alert :title="$t('file.ownerHelper')" type="info" :closable="false" class="common-prompt" />
<el-form
ref="fileForm"
label-position="top"

View file

@ -9,7 +9,7 @@
<el-col :span="22">
<el-alert
v-if="isLocal"
style="margin-bottom: 20px"
class="common-prompt"
center
:title="$t('terminal.connLocalErr')"
:closable="false"

View file

@ -9,7 +9,7 @@
<el-alert
v-if="canChangeZone()"
:title="$t('setting.timeZoneHelper')"
style="margin-bottom: 20px"
class="common-prompt"
:closable="false"
type="warning"
/>

View file

@ -10,7 +10,7 @@
<template #header>
<DrawerHeader :header="$t('setting.mfa')" :back="handleClose" />
</template>
<el-alert style="margin-bottom: 20px" :closable="false" type="warning">
<el-alert class="common-prompt" :closable="false" type="warning">
<template #default>
<span>
<span>{{ $t('setting.mfaAlert') }}</span>

View file

@ -83,13 +83,12 @@
v-model:rules="rules"
></EditParams>
<el-form-item v-if="runtime.type === 'php'">
<el-alert :title="$t('runtime.extendHelper')" type="info" :closable="false" />
<el-alert
v-if="mode == 'edit'"
:title="$t('runtime.rebuildHelper')"
type="info"
:closable="false"
/>
<el-alert type="info" :closable="false">
<span>{{ $t('runtime.extendHelper') }}</span>
<span v-html="$t('runtime.phpPluginHelper')"></span>
<br />
<span v-if="mode == 'edit'">{{ $t('runtime.rebuildHelper') }}</span>
</el-alert>
</el-form-item>
</div>
</div>