Compare commits

...

7 Commits

Author SHA1 Message Date
刘洪洪
12895e3589 fix: 修复npm-event单测id根据时间命名可能会导致报错的问题 2023-02-23 10:51:56 +08:00
刘洪洪
c2f318391b fix: 修复linkMonitor下一跳网格图排序错乱问题 2023-02-23 10:23:24 +08:00
李金洋
5ccb91ac24 Update .gitlab-ci.yml 2023-02-21 08:07:38 +00:00
李金洋
d4ce688a5f Update .gitlab-ci.yml 2023-02-21 07:59:43 +00:00
李金洋
88836a1932 Update .gitlab-ci.yml 2023-02-21 07:55:38 +00:00
李金洋
fec08141e5 Update .gitlab-ci.yml 2023-02-21 07:35:45 +00:00
李金洋
28092cc9ab Update .gitlab-ci.yml 2023-02-21 07:14:28 +00:00
4 changed files with 22 additions and 11 deletions

View File

@@ -2,6 +2,7 @@
stages: stages:
- gen_git-log - gen_git-log
- build_project - build_project
- test
- build_image - build_image
cache: cache:
@@ -29,7 +30,7 @@ generate_git-log:
- public/index.html - public/index.html
- public/git-log.html - public/git-log.html
only: only:
- dev - dev-test
tags: tags:
- galaxy - galaxy
@@ -47,11 +48,21 @@ build_project:
paths: paths:
- dist/ - dist/
only: only:
- dev - dev-test
- tags - tags
tags: tags:
- galaxy - galaxy
test:
stage: test
script:
- cnpm run test
when: on_success
only:
- dev-test
tags:
- galaxy
build_image: build_image:
dependencies: dependencies:
- build_project - build_project
@@ -65,7 +76,7 @@ build_image:
- sudo docker push 192.168.40.153:9080/cyber-narrator/cn-ui-$CI_COMMIT_REF_NAME:$CNUI_TAG - sudo docker push 192.168.40.153:9080/cyber-narrator/cn-ui-$CI_COMMIT_REF_NAME:$CNUI_TAG
when: on_success when: on_success
only: only:
- dev - dev-test
tags: tags:
- galaxy - galaxy

View File

@@ -146,9 +146,9 @@ export default {
// 接口数据乱序,根据出方向排序,再根据同个出方向下的入进行排序 // 接口数据乱序,根据出方向排序,再根据同个出方向下的入进行排序
nextLinkData.sort((a, b) => { nextLinkData.sort((a, b) => {
if (a.ingressLinkDirection !== b.ingressLinkDirection) { if (a.ingressLinkDirection !== b.ingressLinkDirection) {
return a.ingressLinkDirection.localeCompare(b.ingressLinkDirection) return a.ingressLinkDirection.localeCompare(b.ingressLinkDirection, 'zh')
} }
return a.egressLinkDirection.localeCompare(b.egressLinkDirection) return a.egressLinkDirection.localeCompare(b.egressLinkDirection, 'zh')
}) })
this.isNextNoData = nextLinkData.length === 0 this.isNextNoData = nextLinkData.length === 0

View File

@@ -29,7 +29,7 @@
<template v-else-if="item.prop === 'eventType'"> <template v-else-if="item.prop === 'eventType'">
<span class="data-recent-table-eventType" :test-id="`eventType-${scope.row.eventType}-${scope.$index}`">{{scope.row[item.prop]}}</span> <span class="data-recent-table-eventType" :test-id="`eventType-${scope.row.eventType}-${scope.$index}`">{{scope.row[item.prop]}}</span>
</template> </template>
<span v-else-if="scope.row[item.prop]" :test-id="`startTime-${scope.row.startTime}-${scope.$index}`">{{scope.row[item.prop]}}</span> <span v-else-if="scope.row[item.prop]" :test-id="`startTime-${scope.$index}`">{{scope.row[item.prop]}}</span>
<span v-else>-</span> <span v-else>-</span>
</div> </div>
</template> </template>

View File

@@ -144,11 +144,11 @@ describe('views/charts2/charts/npm/NpmRecentEvents.vue测试', () => {
expect(eventType3.text()).toEqual('http error') expect(eventType3.text()).toEqual('http error')
expect(eventType4.text()).toEqual('dns error') expect(eventType4.text()).toEqual('dns error')
const startTime0 = wrapper.get('[test-id="startTime-2023-01-04T11:25:00+08:00-0"]') const startTime0 = wrapper.get('[test-id="startTime-0"]')
const startTime1 = wrapper.get('[test-id="startTime-2023-01-04T00:30:00+08:00-1"]') const startTime1 = wrapper.get('[test-id="startTime-1"]')
const startTime2 = wrapper.get('[test-id="startTime-2023-01-03T13:05:00+08:00-2"]') const startTime2 = wrapper.get('[test-id="startTime-2"]')
const startTime3 = wrapper.get('[test-id="startTime-2023-01-03T12:35:00+08:00-3"]') const startTime3 = wrapper.get('[test-id="startTime-3"]')
const startTime4 = wrapper.get('[test-id="startTime-2023-01-03T12:15:00+08:00-4"]') const startTime4 = wrapper.get('[test-id="startTime-4"]')
expect(startTime0.text()).toEqual('2023-01-04T11:25:00+08:00') expect(startTime0.text()).toEqual('2023-01-04T11:25:00+08:00')
expect(startTime1.text()).toEqual('2023-01-04T00:30:00+08:00') expect(startTime1.text()).toEqual('2023-01-04T00:30:00+08:00')