@@ -21,15 +21,7 @@ limitations under the License. -->
2121 <span class =" remove-icon" @click =" removeTags(index)" >×</span >
2222 </span >
2323 </span >
24- <el-input
25- v-if =" type === 'ALARM'"
26- size =" small"
27- v-model =" tags"
28- class =" trace-new-tag"
29- @change =" addLabels"
30- :placeholder =" t('addTags')"
31- />
32- <el-popover v-else trigger =" click" :visible =" visible" width =" 300px" >
24+ <el-popover trigger =" click" :visible =" visible" width =" 300px" >
3325 <template #reference >
3426 <el-input
3527 size =" small"
@@ -47,7 +39,7 @@ limitations under the License. -->
4739 </span >
4840 </div >
4941 </el-popover >
50- <span class =" tags-tip" :class =" type !== 'ALARM' && tagArr.length ? 'link-tips' : ''" >
42+ <span class =" tags-tip" :class =" tagArr.length ? 'link-tips' : ''" >
5143 <a
5244 target =" blank"
5345 href =" https://github.com/apache/skywalking/blob/master/docs/en/setup/backend/configuration-vocabulary.md"
@@ -68,6 +60,7 @@ limitations under the License. -->
6860 import { useI18n } from " vue-i18n" ;
6961 import { useTraceStore } from " @/store/modules/trace" ;
7062 import { useLogStore } from " @/store/modules/log" ;
63+ import { useAlarmStore } from " @/store/modules/alarm" ;
7164 import { ElMessage } from " element-plus" ;
7265 import { useAppStoreWithOut } from " @/store/modules/app" ;
7366
@@ -79,6 +72,7 @@ limitations under the License. -->
7972 const traceStore = useTraceStore ();
8073 const logStore = useLogStore ();
8174 const appStore = useAppStoreWithOut ();
75+ const alarmStore = useAlarmStore ();
8276 const { t } = useI18n ();
8377 const tags = ref <string >(" " );
8478 const tagsList = ref <string []>([]);
@@ -121,10 +115,18 @@ limitations under the License. -->
121115 let resp: Recordable = {};
122116 if (props .type === " TRACE" ) {
123117 resp = await traceStore .getTagKeys ();
124- } else {
118+ }
119+ if (props .type === " LOG" ) {
125120 resp = await logStore .getLogTagKeys ();
126121 }
127122
123+ if (props .type === " ALARM" ) {
124+ resp = await alarmStore .getAlarmTagKeys ();
125+ }
126+
127+ if (! resp .data ) {
128+ return ;
129+ }
128130 if (resp .errors ) {
129131 ElMessage .error (resp .errors );
130132 return ;
@@ -140,10 +142,17 @@ limitations under the License. -->
140142 let resp: Recordable = {};
141143 if (props .type === " TRACE" ) {
142144 resp = await traceStore .getTagValues (param );
143- } else {
145+ }
146+ if (props .type === " LOG" ) {
144147 resp = await logStore .getLogTagValues (param );
145148 }
149+ if (props .type === " ALARM" ) {
150+ resp = await alarmStore .getAlarmTagValues (param );
151+ }
146152
153+ if (! resp .data ) {
154+ return ;
155+ }
147156 if (resp .errors ) {
148157 ElMessage .error (resp .errors );
149158 return ;
0 commit comments