updated slignment of tools

This commit is contained in:
Peter Olu 2022-05-04 12:20:34 +01:00
parent 7708087180
commit 5ae494a554
3 changed files with 26 additions and 10 deletions

View File

@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. --> limitations under the License. -->
<template> <template>
<el-select <el-select
ref="customSelector"
:size="size" :size="size"
v-model="selected" v-model="selected"
:placeholder="placeholder" :placeholder="placeholder"
@ -37,7 +38,7 @@ limitations under the License. -->
</el-select> </el-select>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watch } from "vue"; import { ref, watch, onMounted } from "vue";
import type { PropType } from "vue"; import type { PropType } from "vue";
interface Option { interface Option {
@ -47,6 +48,7 @@ interface Option {
/*global defineProps, defineEmits*/ /*global defineProps, defineEmits*/
const emit = defineEmits(["change", "query"]); const emit = defineEmits(["change", "query"]);
const customSelector = ref<string>(null)
const props = defineProps({ const props = defineProps({
options: { options: {
type: Array as PropType<(Option & { disabled?: boolean })[]>, type: Array as PropType<(Option & { disabled?: boolean })[]>,
@ -84,6 +86,10 @@ function remoteMethod(query: string) {
} }
} }
onMounted(() => {
console.log(customSelector.value)
})
watch( watch(
() => props.value, () => props.value,
(data) => { (data) => {
@ -95,4 +101,7 @@ watch(
.el-input__inner { .el-input__inner {
border-radius: unset !important; border-radius: unset !important;
} }
.el-input.el-input--small.el-input--suffix{
height: 18px !important;
}
</style> </style>

View File

@ -36,7 +36,7 @@ limitations under the License. -->
<!-- <span class="label">$Service</span> --> <!-- <span class="label">$Service</span> -->
<Selector <Selector
v-if="selectedSelector === '$service'" v-if="selectedSelector === '$service'"
style="margin-left: 20px" style="margin-left: 20px;"
v-model="states.currentService" v-model="states.currentService"
:options="selectorStore.services" :options="selectorStore.services"
size="small" size="small"
@ -81,6 +81,7 @@ limitations under the License. -->
</span> --> </span> -->
<Selector <Selector
v-if="selectedSelector === '$endpoint'" v-if="selectedSelector === '$endpoint'"
style="margin-left: 20px;"
v-model="states.currentPod" v-model="states.currentPod"
:options="selectorStore.pods" :options="selectorStore.pods"
size="small" size="small"
@ -762,4 +763,7 @@ watch(
.tool-btn{ .tool-btn{
height: 18px; height: 18px;
} }
.el-input__wrapper{
height: 18px !important;
}
</style> </style>

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. --> limitations under the License. -->
<template> <template>
<div class="flex-h"> <div class="flex-h">
<div class="flex-h"> <div class="flex-h filter-container">
<el-tooltip <el-tooltip
v-if="!activeFilter.length || activeFilter === 'service'" v-if="!activeFilter.length || activeFilter === 'service'"
class="box-item" class="box-item"
@ -88,7 +88,7 @@ limitations under the License. -->
</el-tooltip> </el-tooltip>
</div> </div>
<div class="wrap-filters"> <div class="wrap-filters">
<div class="filter my-5" v-if="activeFilter === 'service'"> <div class="filter" v-if="activeFilter === 'service'">
<span class="grey mr-5">{{ t("service") }}:</span> <span class="grey mr-5">{{ t("service") }}:</span>
<Selector <Selector
size="small" size="small"
@ -99,7 +99,7 @@ limitations under the License. -->
/> />
</div> </div>
<div <div
class="filter my-5" class="filter"
v-if=" v-if="
activeFilter === 'instance' && dashboardStore.entity !== EntityType[3].value activeFilter === 'instance' && dashboardStore.entity !== EntityType[3].value
" "
@ -113,7 +113,7 @@ limitations under the License. -->
@change="changeField('instance', $event)" @change="changeField('instance', $event)"
/> />
</div> </div>
<div class="filter my-5" v-if="dashboardStore.entity !== EntityType[2].value"> <div class="filter" v-if="dashboardStore.entity !== EntityType[2].value">
<span class="grey mr-5">{{ t("endpoint") }}:</span> <span class="grey mr-5">{{ t("endpoint") }}:</span>
<Selector <Selector
size="small" size="small"
@ -125,7 +125,7 @@ limitations under the License. -->
@query="searchEndpoints" @query="searchEndpoints"
/> />
</div> </div>
<div v-if="activeFilter === 'status'" class="filter my-5"> <div v-if="activeFilter === 'status'" class="filter">
<span class="grey mr-5">{{ t("status") }}:</span> <span class="grey mr-5">{{ t("status") }}:</span>
<Selector <Selector
size="small" size="small"
@ -135,12 +135,12 @@ limitations under the License. -->
@change="changeField('status', $event)" @change="changeField('status', $event)"
/> />
</div> </div>
<div v-if="activeFilter === 'traceId'" class="filter my-5"> <div v-if="activeFilter === 'traceId'" class="filter">
<span class="grey mr-5">{{ t("traceID") }}:</span> <span class="grey mr-5">{{ t("traceID") }}:</span>
<el-input size="small" v-model="traceId" class="traceId" /> <el-input size="small" v-model="traceId" class="traceId" />
</div> </div>
<div v-if="activeFilter === 'duration'" class="filter my-5"> <div v-if="activeFilter === 'duration'" class="filter">
<span class="sm b grey mr-5">{{ t("duration") }}:</span> <span class="sm b grey mr-5">{{ t("duration") }}:</span>
<el-input size="small" class="inputs mr-5" v-model="minTraceDuration" /> <el-input size="small" class="inputs mr-5" v-model="minTraceDuration" />
<span class="grey mr-5">-</span> <span class="grey mr-5">-</span>
@ -355,6 +355,9 @@ watch(
margin-left: 20px; margin-left: 20px;
cursor: pointer; cursor: pointer;
} }
.filter-container{
align-items: center;
}
.wrap-filters { .wrap-filters {
padding: 0 10px; padding: 0 10px;
display: flex; display: flex;
@ -372,7 +375,7 @@ watch(
// //
<div class="flex-h"> <div class="flex-h">
// <div class="filter my-5"> // <div class="filter">
// <span class="grey mr-5">{{ t("timeRange") }}:</span> // <span class="grey mr-5">{{ t("timeRange") }}:</span>
// <TimePicker // <TimePicker
// :value="dateTime" // :value="dateTime"