|
|
@ -1,46 +1,12 @@ |
|
|
|
<template> |
|
|
|
<div class="h-full flex flex-col"> |
|
|
|
<a-row class="h-0 grow"> |
|
|
|
<a-col class="border-r h-full overflow-y-auto" :span="16"> |
|
|
|
<div class="flex-grow"> |
|
|
|
<service-configuration-status-viewer :service-key="props.serviceKey" /> |
|
|
|
|
|
|
|
<div class="p-5 border-t border-b" v-if="0 < params.length"> |
|
|
|
<div class="flex flex-row flex-wrap"> |
|
|
|
<div v-for="group in params" :key="group.name" class="p-1" style="min-width: 30%;"> |
|
|
|
<fieldset class="border h-full"> |
|
|
|
<legend class="px-3">{{ group.name }}</legend> |
|
|
|
<table class="w-full"> |
|
|
|
<tr v-for="item in group.items" :key="item.key"> |
|
|
|
<td class="py-1 px-2">{{ item.name }} : </td> |
|
|
|
<td class="py-1 px-2"> |
|
|
|
<service-configuration-param-value-edit |
|
|
|
:param="item" |
|
|
|
v-model:value="item.value" |
|
|
|
@save-request="actionServiceParamSave" |
|
|
|
></service-configuration-param-value-edit> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
</fieldset> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="p-1 text-right"> |
|
|
|
<a-button class="mr-1" @click="actionServiceParamReset">重置</a-button> |
|
|
|
<a-button class="mr-1" @click="actionServiceParamReload">刷新</a-button> |
|
|
|
<a-button @click="actionServiceParamSave">保存</a-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="p-3"> |
|
|
|
<service-configuration-actions v-model:actionLog="actionLog" :service-key="props.serviceKey" /> |
|
|
|
</div> |
|
|
|
</a-col> |
|
|
|
<a-col :span="8" class="h-full flex flex-col"> |
|
|
|
<div class="h-0 grow p-5"> |
|
|
|
<div class="flex-none" style="display: none;"> |
|
|
|
<service-configuration-action-log :log="actionLog" /> |
|
|
|
</div> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script setup> |
|
|
@ -91,27 +57,5 @@ async function actionServiceParamReload() { |
|
|
|
} catch (e) {/** nothing to do here */ } |
|
|
|
} |
|
|
|
|
|
|
|
// service param save |
|
|
|
async function actionServiceParamSave() { |
|
|
|
try { |
|
|
|
let values = {}; |
|
|
|
for ( let group of params.value ) { |
|
|
|
for ( let item of group.items ) { |
|
|
|
values[item.key] = item.value; |
|
|
|
} |
|
|
|
} |
|
|
|
let client = ApiClient.getClient(); |
|
|
|
await client.call('service-config/service-params-update', {serviceKey:props.serviceKey,params:values}); |
|
|
|
await actionServiceParamReload(); |
|
|
|
} catch ( e ) {/** nothing to do here */} |
|
|
|
} |
|
|
|
|
|
|
|
// service param reset |
|
|
|
async function actionServiceParamReset() { |
|
|
|
try { |
|
|
|
let client = ApiClient.getClient(); |
|
|
|
await client.call('service-config/service-params-reset', {serviceKey:props.serviceKey}); |
|
|
|
await actionServiceParamReload(); |
|
|
|
} catch ( e ) {/** nothing to do here */} |
|
|
|
} |
|
|
|
</script> |