update (#127)

diff --git a/src/store/modules/dashboard/modules/dashboard-data.ts b/src/store/modules/dashboard/modules/dashboard-data.ts
index 2bd147f..be0d769 100644
--- a/src/store/modules/dashboard/modules/dashboard-data.ts
+++ b/src/store/modules/dashboard/modules/dashboard-data.ts
@@ -119,7 +119,7 @@
     if (rocketOption.currentDatabase) { temp.database = rocketOption.currentDatabase; }
     context.commit('SET_GROUP_QUERY', temp);
     context.commit('SET_CURRENT_GROUP', index);
-    context.dispatch('rocketOption/SET_CURRENT_STATE', context.state.tree[index].query);
+    context.dispatch('SET_CURRENT_STATE', context.state.tree[index].query);
     context.dispatch('RUN_EVENTS', {}, {root: true});
   },
 } ;
diff --git a/src/store/modules/dashboard/modules/dashboard-option.ts b/src/store/modules/dashboard/modules/dashboard-option.ts
index 3713383..51808cc 100644
--- a/src/store/modules/dashboard/modules/dashboard-option.ts
+++ b/src/store/modules/dashboard/modules/dashboard-option.ts
@@ -81,7 +81,7 @@
     if (!data.length) {
       return ;
     }
-    if ((!state.currentEndpoint.key && data.length) || state.endpoints.indexOf(state.currentEndpoint) === -1 ) {
+    if (!state.currentEndpoint.key && data.length) {
       state.currentEndpoint = data[0];
     }
   },
@@ -94,7 +94,7 @@
       state.currentInstance = {};
       return;
     }
-    if ((!state.currentInstance.key && data.length) || state.instances.indexOf(state.currentInstance) === -1 ) {
+    if (!state.currentInstance.key && data.length) {
       state.currentInstance = data[0];
     }
   },
@@ -180,19 +180,26 @@
       context.dispatch('RUN_EVENTS', {}, {root: true});
     });
   },
-  SELECT_ENDPOINT(context: { commit: Commit, dispatch: Dispatch }, params: any) {
+  SELECT_ENDPOINT(context: { commit: Commit, dispatch: Dispatch, state: any }, params: any) {
     context.commit('SET_CURRENT_ENDPOINT', params.endpoint);
-    context.dispatch('GET_ENDPOINT', {
-        duration: params.duration,
-        endpointId: params.endpoint.key,
-        endpointName: params.endpoint.label,
+    context.dispatch('GET_QUERY', {
+      serviceId: context.state.currentService.key || '',
+      endpointId: context.state.currentEndpoint.key || '',
+      endpointName: context.state.currentEndpoint.label || '',
+      instanceId: context.state.currentInstance.key || '',
+      databaseId: context.state.currentDatabase.key || '',
+      duration: params.duration,
     });
   },
-  SELECT_INSTANCE(context: { commit: Commit, dispatch: Dispatch }, params: any) {
+  SELECT_INSTANCE(context: { commit: Commit, dispatch: Dispatch, state: any }, params: any) {
     context.commit('SET_CURRENT_INSTANCE', params.instance);
-    context.dispatch('GET_INSTANCE', {
-        duration: params.duration,
-        serviceInstanceId: params.instance.key,
+    context.dispatch('GET_QUERY', {
+      serviceId: context.state.currentService.key || '',
+      endpointId: context.state.currentEndpoint.key || '',
+      endpointName: context.state.currentEndpoint.label || '',
+      instanceId: context.state.currentInstance.key || '',
+      databaseId: context.state.currentDatabase.key || '',
+      duration: params.duration,
     });
   },
   SELECT_DATABASE(context: { commit: Commit, dispatch: Dispatch }, params: any) {
@@ -220,7 +227,6 @@
 };
 
 export default {
-  namespaced: true,
   state: initState,
   getters,
   actions,
diff --git a/src/store/modules/dashboard/source/endpoint.ts b/src/store/modules/dashboard/source/endpoint.ts
index 5e50259..2c9014d 100644
--- a/src/store/modules/dashboard/source/endpoint.ts
+++ b/src/store/modules/dashboard/source/endpoint.ts
@@ -81,6 +81,7 @@
       key: i.key,
       label: i.endpointNames[0],
       value: i.duration,
+      traceIds: i.traceIds,
     }));
   }
 };
diff --git a/src/store/modules/dashboard/template/endpoint-template.ts b/src/store/modules/dashboard/template/endpoint-template.ts
index 9a973b1..9ab830a 100644
--- a/src/store/modules/dashboard/template/endpoint-template.ts
+++ b/src/store/modules/dashboard/template/endpoint-template.ts
@@ -107,7 +107,7 @@
   {
     o: 'ServiceEndpoint',
     d: 'endpointTraces',
-    c: 'ChartSlow',
+    c: 'ChartTrace',
     t: 'Endpoint Slow',
     w: 6,
     h: 250,
diff --git a/src/views/components/dashboard/charts/chart-trace.vue b/src/views/components/dashboard/charts/chart-trace.vue
index 5110c68..c09cae8 100644
--- a/src/views/components/dashboard/charts/chart-trace.vue
+++ b/src/views/components/dashboard/charts/chart-trace.vue
@@ -19,7 +19,7 @@
   <div style="overflow: auto;height: 100%;" class="scroll_hide">
   <div class="rk-chart-slow clear">
     <div class="rk-chart-slow-i" v-for="(i, index) in data" :key="index">
-      <svg class="icon vm r grey link-hover cp" @click="handleClick(i.label)">
+      <svg class="icon vm r grey link-hover cp" @click="handleClick(i.traceIds)">
         <use xlink:href="#review-list"></use>
       </svg>
       <div class="mb-5 ell" v-tooltip:top.ellipsis="i.label || ''">
diff --git a/src/views/components/dashboard/tool-bar-select-endpoint.vue b/src/views/components/dashboard/tool-bar-select-endpoint.vue
index 1686050..0a03c6c 100644
--- a/src/views/components/dashboard/tool-bar-select-endpoint.vue
+++ b/src/views/components/dashboard/tool-bar-select-endpoint.vue
@@ -49,7 +49,7 @@
 import EndpointOpt from './tool-bar-select-endpoint-opt.vue';
 @Component({components: {EndpointOpt}})
 export default class ToolBarSelect extends Vue {
-  @Action('rocketOption/SEARCH_ENDPOINTS') public SEARCH_ENDPOINTS: any;
+  @Action('SEARCH_ENDPOINTS') public SEARCH_ENDPOINTS: any;
   @Prop() public data!: any;
   @Prop() public current!: any;
   @Prop() public title!: string;
diff --git a/src/views/components/dashboard/tool-bar.vue b/src/views/components/dashboard/tool-bar.vue
index a67d0ed..330c36a 100644
--- a/src/views/components/dashboard/tool-bar.vue
+++ b/src/views/components/dashboard/tool-bar.vue
@@ -62,11 +62,11 @@
   @Prop() private durationTime!: any;
   @Mutation('ADD_COMP') private ADD_COMP: any;
   @Action('SET_EDIT') private SET_EDIT: any;
-  @Action('rocketOption/SELECT_SERVICE') private SELECT_SERVICE: any;
-  @Action('rocketOption/SELECT_DATABASE') private SELECT_DATABASE: any;
-  @Action('rocketOption/SELECT_ENDPOINT') private SELECT_ENDPOINT: any;
-  @Action('rocketOption/SELECT_INSTANCE') private SELECT_INSTANCE: any;
-  @Action('rocketOption/MIXHANDLE_GET_OPTION') private MIXHANDLE_GET_OPTION: any;
+  @Action('SELECT_SERVICE') private SELECT_SERVICE: any;
+  @Action('SELECT_DATABASE') private SELECT_DATABASE: any;
+  @Action('SELECT_ENDPOINT') private SELECT_ENDPOINT: any;
+  @Action('SELECT_INSTANCE') private SELECT_INSTANCE: any;
+  @Action('MIXHANDLE_GET_OPTION') private MIXHANDLE_GET_OPTION: any;
   get lastKey() {
     const current = this.rocketComps.tree[this.rocketComps.group]
     .children[this.rocketComps.current].children;
diff --git a/src/views/components/dashboard/tool-group.vue b/src/views/components/dashboard/tool-group.vue
index 01a1479..d57937b 100644
--- a/src/views/components/dashboard/tool-group.vue
+++ b/src/views/components/dashboard/tool-group.vue
@@ -56,7 +56,7 @@
   @Mutation('DELETE_COMPS_GROUP') private DELETE_COMPS_GROUP: any;
   @Mutation('ADD_COMPS_GROUP') private ADD_COMPS_GROUP: any;
   @Action('MIXHANDLE_CHANGE_GROUP') private MIXHANDLE_CHANGE_GROUP: any;
-  @Action('rocketOption/MIXHANDLE_GET_OPTION') private MIXHANDLE_GET_OPTION: any;
+  @Action('MIXHANDLE_GET_OPTION') private MIXHANDLE_GET_OPTION: any;
   @Getter('durationTime') private durationTime: any;
   private name: string = '';
   private type: string = 'service';
diff --git a/src/views/containers/dashboard.vue b/src/views/containers/dashboard.vue
index 06bb63d..bb280ab 100644
--- a/src/views/containers/dashboard.vue
+++ b/src/views/containers/dashboard.vue
@@ -57,7 +57,7 @@
   @Mutation('SET_EVENTS') private SET_EVENTS: any;
   @Mutation('SET_COMPS_TREE') private SET_COMPS_TREE: any;
   @Mutation('SET_CURRENT_COMPS') private SET_CURRENT_COMPS: any;
-  @Action('rocketOption/MIXHANDLE_GET_OPTION') private MIXHANDLE_GET_OPTION: any;
+  @Action('MIXHANDLE_GET_OPTION') private MIXHANDLE_GET_OPTION: any;
   @Action('GET_QUERY') private GET_QUERY: any;
   @Getter('durationTime') private durationTime: any;
   private isRouterAlive: boolean = true;
diff --git a/vue.config.js b/vue.config.js
index ce32da7..b79f6a9 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -18,12 +18,8 @@
 module.exports = {
   devServer: {
     proxy: {
-      '/api': {
-        target: 'http://localhost:12800',
-        changeOrigin: true,
-      },
       '/graphql': {
-        target: 'http://localhost:12800',
+        target: 'http://skywalking.daocloud.io:12800',
         changeOrigin: true,
       },
     },