mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 08:17:33 +00:00
feat: select item
This commit is contained in:
parent
9533fe56b3
commit
c978da610b
@ -107,7 +107,7 @@ export const profileStore = defineStore({
|
|||||||
if (res.data.errors) {
|
if (res.data.errors) {
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
const list = res.data.data.taskList;
|
const list = res.data.data.taskList || [];
|
||||||
this.taskList = list;
|
this.taskList = list;
|
||||||
if (!list.length) {
|
if (!list.length) {
|
||||||
this.segmentList = [];
|
this.segmentList = [];
|
||||||
|
@ -24,7 +24,7 @@ limitations under the License. -->
|
|||||||
<td
|
<td
|
||||||
class="profile-td"
|
class="profile-td"
|
||||||
:class="{
|
:class="{
|
||||||
selected: selectedKey == i.segmentId,
|
selected: selectedKey === i.segmentId,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@ -55,7 +55,7 @@ limitations under the License. -->
|
|||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const profileStore = useProfileStore();
|
const profileStore = useProfileStore();
|
||||||
const selectedKey = ref<string>("");
|
const selectedKey = ref<string>(profileStore.currentSegment && profileStore.currentSegment.segmentId);
|
||||||
|
|
||||||
async function selectTrace(item: Trace) {
|
async function selectTrace(item: Trace) {
|
||||||
profileStore.setCurrentSegment(item);
|
profileStore.setCurrentSegment(item);
|
||||||
|
@ -115,7 +115,7 @@ limitations under the License. -->
|
|||||||
const selectorStore = useSelectorStore();
|
const selectorStore = useSelectorStore();
|
||||||
const viewDetail = ref<boolean>(false);
|
const viewDetail = ref<boolean>(false);
|
||||||
const service = ref<string>("");
|
const service = ref<string>("");
|
||||||
const selectedTask = ref<TaskListItem | Record<string, never>>({});
|
const selectedTask = ref<TaskListItem | Record<string, never>>(profileStore.taskList[0] || {});
|
||||||
const instanceLogs = ref<TaskLog | any>({});
|
const instanceLogs = ref<TaskLog | any>({});
|
||||||
|
|
||||||
async function changeTask(item: TaskListItem) {
|
async function changeTask(item: TaskListItem) {
|
||||||
|
Loading…
Reference in New Issue
Block a user