overhaul cleanups

This commit is contained in:
Peter Olu 2022-05-04 13:45:29 +01:00
parent 101b0f5b9b
commit 8a66987f5f
5 changed files with 9 additions and 39 deletions

View File

@ -29,9 +29,6 @@ limitations under the License. -->
<span>{{ t("delete") }}</span> <span>{{ t("delete") }}</span>
</div> </div>
</el-popover> </el-popover>
<!-- filter was here -->
<!-- <div class="header">
</div> -->
<div class="trace flex-h"> <div class="trace flex-h">
<TraceList @show:trace="showTraceDetails" v-if="traceListActive" /> <TraceList @show:trace="showTraceDetails" v-if="traceListActive" />
<TraceDetail <TraceDetail
@ -43,7 +40,6 @@ limitations under the License. -->
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import type { PropType, ref } from "vue"; import type { PropType, ref } from "vue";
// import Filter from "../related/trace/Filter.vue";
import TraceList from "../related/trace/TraceList.vue"; import TraceList from "../related/trace/TraceList.vue";
import TraceDetail from "../related/trace/Detail.vue"; import TraceDetail from "../related/trace/Detail.vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";

View File

@ -32,10 +32,9 @@ limitations under the License. -->
<Icon size="sm" iconName="playlist_add" /> <Icon size="sm" iconName="playlist_add" />
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<!-- <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"
@ -56,7 +55,7 @@ limitations under the License. -->
</div> </div>
<div class="selectors-item" v-if="key === 3 || key === 4"> <div class="selectors-item" v-if="key === 3 || key === 4">
<el-tooltip <el-tooltip
v-if="!selectedSelector.length || selectedSelector === '$endpoint'" v-if="!selectedSelector.length || selectedSelector === '$endpoint'"
class="box-item" class="box-item"
effect="dark" effect="dark"
content="Endpoint" content="Endpoint"
@ -70,16 +69,9 @@ limitations under the License. -->
<Icon size="sm" iconName="view" /> <Icon size="sm" iconName="view" />
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<!-- <span class="label">
{{
["EndpointRelation", "Endpoint"].includes(dashboardStore.entity)
? "$Endpoint"
: "$ServiceInstance"
}}
</span> -->
<Selector <Selector
v-if="selectedSelector === '$endpoint'" v-if="selectedSelector === '$endpoint'"
style="margin-left: 20px;" style="margin-left: 20px"
v-model="states.currentPod" v-model="states.currentPod"
:options="selectorStore.pods" :options="selectorStore.pods"
size="small" size="small"
@ -434,7 +426,7 @@ async function getServices() {
} }
async function changeService(service: any) { async function changeService(service: any) {
selectedSelector.value = "" selectedSelector.value = "";
if (service[0]) { if (service[0]) {
states.currentService = service[0].value; states.currentService = service[0].value;
selectorStore.setCurrentService(service[0]); selectorStore.setCurrentService(service[0]);
@ -454,7 +446,7 @@ function changeDestService(service: any) {
} }
function changePods(pod: any) { function changePods(pod: any) {
selectedSelector.value = "" selectedSelector.value = "";
if (pod[0]) { if (pod[0]) {
selectorStore.setCurrentPod(pod[0]); selectorStore.setCurrentPod(pod[0]);
} else { } else {
@ -758,10 +750,10 @@ watch(
width: 300px; width: 300px;
} }
.tool-btn{ .tool-btn {
height: 18px; height: 18px;
} }
.el-input__wrapper{ .el-input__wrapper {
height: 18px !important; height: 18px !important;
} }
</style> </style>

View File

@ -181,9 +181,7 @@ export default defineComponent({
const pageSize = 10; const pageSize = 10;
const dateFormat = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") => const dateFormat = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") =>
dayjs(date).format(pattern); dayjs(date).format(pattern);
const showTraceLogs = ref<boolean>(false); const showTraceLogs = ref<boolean>(false);
// const emit = defineEmits(["show:list"])
function showTraceList() { function showTraceList() {
ctx.emit("show:list"); ctx.emit("show:list");

View File

@ -158,7 +158,6 @@ limitations under the License. -->
type="primary" type="primary"
@click="searchTraces" @click="searchTraces"
> >
<!-- {{ t("search") }} -->
<Icon iconSize="sm" iconName="search" /> <Icon iconSize="sm" iconName="search" />
</el-button> </el-button>
<el-button <el-button
@ -192,7 +191,6 @@ const selectorStore = useSelectorStore();
const dashboardStore = useDashboardStore(); const dashboardStore = useDashboardStore();
const activeFilter = ref<string>(""); const activeFilter = ref<string>("");
// const showAllBtns = ref<boolean>(true);
function setFilter(filter: string) { function setFilter(filter: string) {
activeFilter.value = filter; activeFilter.value = filter;
} }
@ -363,7 +361,6 @@ watch(
padding: 0 10px; padding: 0 10px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
// flex-direction: column;
align-items: center; align-items: center;
.filter { .filter {
margin: 0; margin: 0;
@ -374,14 +371,3 @@ watch(
} }
</style> </style>
//
<div class="flex-h">
// <div class="filter">
// <span class="grey mr-5">{{ t("timeRange") }}:</span>
// <TimePicker
// :value="dateTime"
// position="bottom"
// format="YYYY-MM-DD HH:mm"
// @input="changeTimeRange"
// />
// </div>

View File

@ -166,12 +166,10 @@ async function queryTraces() {
} }
.trace-t { .trace-t {
width: 100%; width: 100%;
// width: 420px;
} }
.list { .list {
// width: 400px;
width: 100%; width: 100%;
} }