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