feat: set selectors

This commit is contained in:
Qiuxia Fan 2022-01-16 22:48:50 +08:00
parent 0a417b3665
commit ffe35b89f9
2 changed files with 7 additions and 3 deletions

View File

@ -28,6 +28,7 @@ interface SelectorState {
endpoints: Option[];
currentService: string;
currentPod: string;
currentDestService: string;
durationTime: any;
}
@ -40,6 +41,7 @@ export const selectorStore = defineStore({
endpoints: [],
currentService: "",
currentPod: "",
currentDestService: "",
durationTime: useAppStoreWithOut().durationTime,
}),
actions: {

View File

@ -28,9 +28,11 @@ limitations under the License. -->
/>
</div>
<div class="selectors-item" v-if="states.key === 3 || states.key === 4">
<span class="label">$ServiceInstance</span>
<span class="label">
{{ states.entity === "endpoint" ? "$Endpoint" : "$ServiceInstance" }}
</span>
<el-cascader
placeholder="Select a instance"
placeholder="Please Select data"
:options="SelectOpts"
size="mini"
filterable
@ -40,7 +42,7 @@ limitations under the License. -->
<div class="selectors-item" v-if="states.key === 2">
<span class="label">$DestinationService</span>
<Selector
:value="states.service"
:value="selectorStore.currentDestService"
:options="selectorStore.services"
size="mini"
placeholder="Select a service"