mirror of https://github.com/1Panel-dev/1Panel
feat: nginx 应用增加 disabled 项
parent
e44d325404
commit
cf934801c3
|
@ -6,7 +6,8 @@
|
|||
"labelEn": "Http Port",
|
||||
"required": true,
|
||||
"default": 80,
|
||||
"envKey": "PANEL_APP_PORT_HTTP"
|
||||
"envKey": "PANEL_APP_PORT_HTTP",
|
||||
"disabled": true,
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
|
@ -14,7 +15,8 @@
|
|||
"labelEn": "Https Port",
|
||||
"required": true,
|
||||
"default": 443,
|
||||
"envKey": "PANEL_APP_PORT_HTTPS"
|
||||
"envKey": "PANEL_APP_PORT_HTTPS",
|
||||
"disabled": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -123,7 +123,9 @@ func (a AppService) GetAppDetail(appId uint, version string) (response.AppDetail
|
|||
return appDetailDTO, err
|
||||
}
|
||||
paramMap := make(map[string]interface{})
|
||||
_ = json.Unmarshal([]byte(detail.Params), ¶mMap)
|
||||
if err := json.Unmarshal([]byte(detail.Params), ¶mMap); err != nil {
|
||||
return appDetailDTO, err
|
||||
}
|
||||
appDetailDTO.AppDetail = detail
|
||||
appDetailDTO.Params = paramMap
|
||||
appDetailDTO.Enable = true
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
v-if="p.type == 'number'"
|
||||
:type="p.type"
|
||||
@change="updateParam"
|
||||
:disabled="p.disabled"
|
||||
></el-input>
|
||||
<el-input
|
||||
v-model="form[p.envKey]"
|
||||
|
@ -41,6 +42,7 @@ import { App } from '@/api/interface/app';
|
|||
interface ParamObj extends App.FromField {
|
||||
services: App.AppService[];
|
||||
prop: string;
|
||||
disabled: false;
|
||||
}
|
||||
|
||||
const emit = defineEmits(['update:form', 'update:rules']);
|
||||
|
@ -96,6 +98,8 @@ const handleParams = () => {
|
|||
for (const p of params.value.formFields) {
|
||||
const pObj = p;
|
||||
pObj.prop = propStart.value + p.envKey;
|
||||
pObj.disabled = p.disabled;
|
||||
console.log(pObj);
|
||||
paramObjs.value.push(pObj);
|
||||
if (p.default == 'random') {
|
||||
form[p.envKey] = getRandomStr(6);
|
||||
|
|
Loading…
Reference in New Issue