mirror of
				https://github.com/apache/skywalking-booster-ui.git
				synced 2025-10-31 01:14:09 +00:00 
			
		
		
		
	Added other log tools
This commit is contained in:
		| @@ -39,7 +39,6 @@ interface DashboardState { | |||||||
|   selectorStore: any; |   selectorStore: any; | ||||||
|   fullView: boolean; |   fullView: boolean; | ||||||
|   currentTabItems: LayoutConfig[]; |   currentTabItems: LayoutConfig[]; | ||||||
|   currentTabName: string; // TODO: remove before commit |  | ||||||
|   showTraceTools: boolean; |   showTraceTools: boolean; | ||||||
|   showLogTools: boolean; |   showLogTools: boolean; | ||||||
|   dashboards: DashboardItem[]; |   dashboards: DashboardItem[]; | ||||||
| @@ -62,7 +61,6 @@ export const dashboardStore = defineStore({ | |||||||
|     showTraceTools: false, |     showTraceTools: false, | ||||||
|     fullView: false, |     fullView: false, | ||||||
|     currentTabItems: [], |     currentTabItems: [], | ||||||
|     currentTabName: '', |  | ||||||
|     dashboards: [], |     dashboards: [], | ||||||
|     currentDashboard: null, |     currentDashboard: null, | ||||||
|     editMode: false, |     editMode: false, | ||||||
| @@ -214,9 +212,6 @@ export const dashboardStore = defineStore({ | |||||||
|     setCurrentTabItems(items: LayoutConfig[]) { |     setCurrentTabItems(items: LayoutConfig[]) { | ||||||
|       this.currentTabItems = items; |       this.currentTabItems = items; | ||||||
|     }, |     }, | ||||||
|     setCurrentTabType(name: string) { |  | ||||||
|       this.currentTabName = name |  | ||||||
|     }, |  | ||||||
|     removeTab(item: LayoutConfig) { |     removeTab(item: LayoutConfig) { | ||||||
|       if (this.selectedGrid && this.selectedGrid.i === item.i) { |       if (this.selectedGrid && this.selectedGrid.i === item.i) { | ||||||
|         this.selectedGrid = null; |         this.selectedGrid = null; | ||||||
|   | |||||||
| @@ -29,19 +29,17 @@ limitations under the License. --> | |||||||
|         <span>{{ t("delete") }}</span> |         <span>{{ t("delete") }}</span> | ||||||
|       </div> |       </div> | ||||||
|     </el-popover> |     </el-popover> | ||||||
|     <div class="header"> |     <!-- <div class="header"> | ||||||
|       <!-- <Header /> --> |     </div> --> | ||||||
|     </div> |  | ||||||
|     <div class="log"> |     <div class="log"> | ||||||
|       <List /> |       <List /> | ||||||
|     </div> |     </div> | ||||||
|   </div> |   </div> | ||||||
| </template> | </template> | ||||||
| <script lang="ts" setup> | <script lang="ts" setup> | ||||||
| import type { onBeforeUnmount, onMounted} from 'vue' | import type { onBeforeUnmount, onMounted } from "vue"; | ||||||
| import { useI18n } from "vue-i18n"; | import { useI18n } from "vue-i18n"; | ||||||
| import { useDashboardStore } from "@/store/modules/dashboard"; | import { useDashboardStore } from "@/store/modules/dashboard"; | ||||||
| // import Header from "../related/log/Header.vue"; |  | ||||||
| import List from "../related/log/List.vue"; | import List from "../related/log/List.vue"; | ||||||
|  |  | ||||||
| /*global defineProps */ | /*global defineProps */ | ||||||
| @@ -59,11 +57,11 @@ function removeWidget() { | |||||||
|   dashboardStore.removeControls(props.data); |   dashboardStore.removeControls(props.data); | ||||||
| } | } | ||||||
| onMounted(() => { | onMounted(() => { | ||||||
|   dashboardStore.setLogTools(true) |   dashboardStore.setLogTools(true); | ||||||
| }); | }); | ||||||
| onBeforeUnmount(() => { | onBeforeUnmount(() => { | ||||||
|   dashboardStore.setLogTools(false) |   dashboardStore.setLogTools(false); | ||||||
| }) | }); | ||||||
| </script> | </script> | ||||||
| <style lang="scss" scoped> | <style lang="scss" scoped> | ||||||
| .log-wrapper { | .log-wrapper { | ||||||
|   | |||||||
| @@ -19,7 +19,7 @@ limitations under the License. --> | |||||||
|         v-for="(child, idx) in data.children || []" |         v-for="(child, idx) in data.children || []" | ||||||
|         :key="idx" |         :key="idx" | ||||||
|         :class="{ active: activeTabIndex === idx }" |         :class="{ active: activeTabIndex === idx }" | ||||||
|         @click="clickTabs($event, idx, child)" |         @click="clickTabs($event, idx)" | ||||||
|       > |       > | ||||||
|         <input |         <input | ||||||
|           @click="editTabName($event, idx)" |           @click="editTabName($event, idx)" | ||||||
| @@ -161,10 +161,6 @@ import Text from "./Text.vue"; | |||||||
| import Ebpf from "./Ebpf.vue"; | import Ebpf from "./Ebpf.vue"; | ||||||
| import { dragIgnoreFrom } from "../data"; | import { dragIgnoreFrom } from "../data"; | ||||||
|  |  | ||||||
| interface TabChild { |  | ||||||
|   name: string; |  | ||||||
|   children: LayoutConfig[]; |  | ||||||
| } |  | ||||||
| const props = { | const props = { | ||||||
|   data: { |   data: { | ||||||
|     type: Object as PropType<LayoutConfig>, |     type: Object as PropType<LayoutConfig>, | ||||||
| @@ -261,7 +257,7 @@ export default defineComponent({ | |||||||
|       } |       } | ||||||
|     ); |     ); | ||||||
|  |  | ||||||
|     function clickTabs(e: Event, idx: number, extra: TabChild) { |     function clickTabs(e: Event, idx: number) { | ||||||
|       e.stopPropagation(); |       e.stopPropagation(); | ||||||
|       activeTabIndex.value = idx; |       activeTabIndex.value = idx; | ||||||
|       dashboardStore.activeGridItem(props.data.i); |       dashboardStore.activeGridItem(props.data.i); | ||||||
| @@ -273,7 +269,6 @@ export default defineComponent({ | |||||||
|       dashboardStore.setCurrentTabItems( |       dashboardStore.setCurrentTabItems( | ||||||
|         dashboardStore.layout[l].children[activeTabIndex.value].children |         dashboardStore.layout[l].children[activeTabIndex.value].children | ||||||
|       ); |       ); | ||||||
|       dashboardStore.setCurrentTabType(extra.children[0].type); |  | ||||||
|       needQuery.value = true; |       needQuery.value = true; | ||||||
|     } |     } | ||||||
|     function removeTab(e: Event) { |     function removeTab(e: Event) { | ||||||
|   | |||||||
| @@ -33,10 +33,10 @@ limitations under the License. --> | |||||||
|         </el-tooltip>  |         </el-tooltip>  | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|     <div class="flex-h row"> |     <div class="flex-h items-center row"> | ||||||
|       <!-- <div |       <div | ||||||
|         class="mr-5 flex-h" |         class="mr-5 flex-h items-center" | ||||||
|         v-if="dashboardStore.entity === EntityType[1].value" |         v-if="dashboardStore.entity === EntityType[1].value && currentSearchTerm === 'service' " | ||||||
|       > |       > | ||||||
|         <span class="grey mr-5">{{ t("service") }}:</span> |         <span class="grey mr-5">{{ t("service") }}:</span> | ||||||
|         <Selector |         <Selector | ||||||
| @@ -46,10 +46,10 @@ limitations under the License. --> | |||||||
|           placeholder="Select a service" |           placeholder="Select a service" | ||||||
|           @change="changeField('service', $event)" |           @change="changeField('service', $event)" | ||||||
|         /> |         /> | ||||||
|       </div> --> |       </div>       | ||||||
|       <!-- <div |       <div | ||||||
|         class="mr-5 flex-h" |         class="mr-5 flex-h" | ||||||
|         v-if="dashboardStore.entity !== EntityType[3].value" |         v-if="dashboardStore.entity !== EntityType[3].value && currentSearchTerm === 'instance'" | ||||||
|       > |       > | ||||||
|         <span class="grey mr-5"> |         <span class="grey mr-5"> | ||||||
|           {{ isBrowser ? t("version") : t("instance") }}: |           {{ isBrowser ? t("version") : t("instance") }}: | ||||||
| @@ -61,10 +61,10 @@ limitations under the License. --> | |||||||
|           placeholder="Select a instance" |           placeholder="Select a instance" | ||||||
|           @change="changeField('instance', $event)" |           @change="changeField('instance', $event)" | ||||||
|         /> |         /> | ||||||
|       </div> --> |       </div> | ||||||
|       <!-- <div |       <div | ||||||
|         class="mr-5 flex-h" |         class="mr-5 flex-h items-center" | ||||||
|         v-if="dashboardStore.entity !== EntityType[2].value" |         v-if="dashboardStore.entity !== EntityType[2].value  && currentSearchTerm === 'endpoint'" | ||||||
|       > |       > | ||||||
|         <span class="grey mr-5" |         <span class="grey mr-5" | ||||||
|           >{{ isBrowser ? t("page") : t("endpoint") }}:</span |           >{{ isBrowser ? t("page") : t("endpoint") }}:</span | ||||||
| @@ -78,7 +78,7 @@ limitations under the License. --> | |||||||
|           :isRemote="true" |           :isRemote="true" | ||||||
|           @query="searchEndpoints" |           @query="searchEndpoints" | ||||||
|         /> |         /> | ||||||
|       </div> --> |       </div> | ||||||
|     </div> |     </div> | ||||||
|     <!-- <div class="row tips"> |     <!-- <div class="row tips"> | ||||||
|       <b>{{ t("conditionNotice") }}</b> |       <b>{{ t("conditionNotice") }}</b> | ||||||
| @@ -238,16 +238,21 @@ const arrayOfFilters = ref<filtersObject[]>([ | |||||||
|     iconName: "issue-child", |     iconName: "issue-child", | ||||||
|     description: "Exclude keywords", |     description: "Exclude keywords", | ||||||
|   }, |   }, | ||||||
|   // { |   { | ||||||
|   //   name: "traceId", |     name: "instance", | ||||||
|   //   iconName: "timeline", |     iconName: "epic", | ||||||
|   //   description: "Trace ID", |     description: "Instance", | ||||||
|   // }, |   }, | ||||||
|   // { |   { | ||||||
|   //   name: "tags", |     name: "service", | ||||||
|   //   iconName: "epic", |     iconName: "settings", | ||||||
|   //   description: "Tags", |     description: "Service", | ||||||
|   // }, |   }, | ||||||
|  |   { | ||||||
|  |     name: "endpoints", | ||||||
|  |     iconName: "timeline", | ||||||
|  |     description: "Endpoints", | ||||||
|  |   }, | ||||||
| ]); | ]); | ||||||
| init(); | init(); | ||||||
| async function init() { | async function init() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Peter Olu
					Peter Olu