observe data

This commit is contained in:
Fine 2022-08-22 18:36:21 +08:00
parent e4a70fb14b
commit b3ae7a2c99

View File

@ -95,7 +95,7 @@ limitations under the License. -->
</el-dialog> </el-dialog>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from "vue"; import { ref, watch } from "vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { useNetworkProfilingStore } from "@/store/modules/network-profiling"; import { useNetworkProfilingStore } from "@/store/modules/network-profiling";
import { useSelectorStore } from "@/store/modules/selectors"; import { useSelectorStore } from "@/store/modules/selectors";
@ -209,6 +209,12 @@ async function fetchTasks() {
} }
await getTopology(); await getTopology();
} }
watch(
() => selectorStore.currentPod,
() => {
fetchTasks();
}
);
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.profile-task-list { .profile-task-list {