diff --git a/.beagle-arm.yml b/.beagle-arm.yml index ba8c8f93c5dc41e55d11ed8f53aeb5cbe105c19c..5bf291d70b99893814c7573267fa44cdea12b6d6 100644 --- a/.beagle-arm.yml +++ b/.beagle-arm.yml @@ -27,12 +27,12 @@ pipeline: - ./yarn.lock volumes: - /data/cache:/cache - docker-dev: + docker: image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-arm64:1.0 volumes: - /var/run/docker.sock:/var/run/docker.sock base: registry.cn-qingdao.aliyuncs.com/wod-k8s/node-arm64:14.5.0-buster-slim - repo: wod/apaas/apaas-ui-arm64 + repo: wod/apaas-ui-arm64 version: "v3.0.0" channel: alpha registry: registry.cn-qingdao.aliyuncs.com @@ -43,12 +43,12 @@ pipeline: target: REGISTRY_PASSWORD when: branch: dev - docker-master: + harbor: image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-arm64:1.0 volumes: - /var/run/docker.sock:/var/run/docker.sock base: registry.cn-qingdao.aliyuncs.com/wod-k8s/node-arm64:14.5.0-buster-slim - repo: wod/apaas/apaas-ui-arm64 + repo: wod/apaas-ui-arm64 version: "v3.0.0" registry: registry.cn-qingdao.aliyuncs.com secrets: @@ -58,5 +58,20 @@ pipeline: target: REGISTRY_PASSWORD when: branch: master + latest: + image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker-arm64:1.0 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + base: registry.cn-qingdao.aliyuncs.com/wod-k8s/node-arm64:14.5.0-buster-slim + repo: wod/apaas-ui-arm64 + version: "v3.0" + registry: registry.cn-qingdao.aliyuncs.com + secrets: + - source: REGISTRY_USER_ALIYUN + target: REGISTRY_USER + - source: REGISTRY_PASSWORD_ALIYUN + target: REGISTRY_PASSWORD + when: + branch: master branches: [master,dev] diff --git a/.beagle.yml b/.beagle.yml index c58d19f52814c22050b9386d55b854026120e839..313b1bb68fda0bede67befd45d9ec8fadd1973e1 100644 --- a/.beagle.yml +++ b/.beagle.yml @@ -30,25 +30,50 @@ pipeline: - ./yarn.lock volumes: - /data/cache:/cache - docker-dev: + docker: image: registry.cn-qingdao.aliyuncs.com/wod-devops/docker:1.0 volumes: - /var/run/docker.sock:/var/run/docker.sock base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0.0 - repo: apaas/apaas-ui + repo: wod/apaas-ui version: "v3.0.0" channel: alpha - registry: hub.wodcloud.com + registry: registry.cn-qingdao.aliyuncs.com + secrets: + - source: REGISTRY_USER_ALIYUN + target: REGISTRY_USER + - source: REGISTRY_PASSWORD_ALIYUN + target: REGISTRY_PASSWORD when: branch: dev - docker-master: + harbor: image: registry.cn-qingdao.aliyuncs.com/wod-devops/docker:1.0 volumes: - /var/run/docker.sock:/var/run/docker.sock base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0.0 - repo: apaas/apaas-ui + repo: wod/apaas-ui version: "v3.0.0" - registry: hub.wodcloud.com + registry: registry.cn-qingdao.aliyuncs.com + secrets: + - source: REGISTRY_USER_ALIYUN + target: REGISTRY_USER + - source: REGISTRY_PASSWORD_ALIYUN + target: REGISTRY_PASSWORD + when: + branch: master + latest: + image: registry.cn-qingdao.aliyuncs.com/wod-devops/docker:1.0 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + base: registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0.0 + repo: wod/apaas-ui + version: "v3.0" + registry: registry.cn-qingdao.aliyuncs.com + secrets: + - source: REGISTRY_USER_ALIYUN + target: REGISTRY_USER + - source: REGISTRY_PASSWORD_ALIYUN + target: REGISTRY_PASSWORD when: branch: master deploy: @@ -56,6 +81,9 @@ pipeline: namespace: apaas-v3 deployment: apaas-ui container: apaas-ui - registry: hub.wodcloud.com - + secrets: + - source: REGISTRY_USER_ALIYUN + target: REGISTRY_USER + - source: REGISTRY_PASSWORD_ALIYUN + target: REGISTRY_PASSWORD branches: [master,dev] diff --git a/src/components/e-charts/graph.vue b/src/components/e-charts/graph.vue index b6a2f95ae61699e3cec8b162574bd3132e8455a4..6f22286ef5a2c7943d4281cb6e400d58a587aff0 100644 --- a/src/components/e-charts/graph.vue +++ b/src/components/e-charts/graph.vue @@ -38,8 +38,8 @@ export default { backgroundColor: "#f4f7fc" }, grid: { - left: 10, - right: 10, + left: 20, + right: 32, bottom: 25, top: 25, containLabel: true @@ -91,7 +91,7 @@ export default { ], series: [ { - name: self.data.legend.data[0], + name: self.data.series[0].name, type: "line", data: self.data.series[0].data, symbolSize: 1, @@ -108,7 +108,7 @@ export default { } }, { - name: self.data.legend.data[1], + name: self.data.series[1].name, type: "line", data: self.data.series[1].data, symbolSize: 1, diff --git a/src/components/e-charts/line_chart.vue b/src/components/e-charts/line_chart.vue index 49fdbbdfba334e48914e882ac3e1e5600cf964e4..f6d852c9aeacd3bcdb801070f343418ec4ccb1c4 100644 --- a/src/components/e-charts/line_chart.vue +++ b/src/components/e-charts/line_chart.vue @@ -142,7 +142,7 @@ export default { }, grid: { top: 10, - left: 10, + left: 15, right: 30, bottom: 30, containLabel: true diff --git a/src/pages/data-analysis/my-application.vue b/src/pages/data-analysis/my-application.vue index ee3b9c325215f8b68e2e3fed6a338c956f87a7d8..2cf34d42eeb740031c7b90c56e06117268ca2392 100644 --- a/src/pages/data-analysis/my-application.vue +++ b/src/pages/data-analysis/my-application.vue @@ -16,7 +16,7 @@
应用总数
-
4
+
{{overview.total}}
@@ -40,7 +40,7 @@
日均被部署次数 - 12432(次) + {{overview.day_count}}(次)
@@ -80,7 +80,7 @@ :show_header="true" title="应用使用领域统计" :buttons_arr="['构建的应用', '申请的应用']" - @changeButton="changeServiceTypeBtn" + @changeButton="changeAppAreaTypeBtn" class="block" > @@ -249,16 +249,19 @@ export default { WaterPolo }, data: () => ({ - water_polo: [75, 25], + water_polo: [0, 0], overview: { - month_chain: 14.5, - week_chain: -14.2 + month_chain: 0, + week_chain: 0, + total:0, + day_count:0 }, - mult_data: [ - { name: "基础工具", value: 2 }, - { name: "通用应用", value: 1 }, - { name: "业务应用", value: 1 } - ], + now_used_count_day:7, + now_app_type:1, + now_app_used_area:1, + now_app_count:14, + now_app_deploy:1, + mult_data: [], text: "应用总数", spIndicatorStyles1: false, spRefLineStyles3: { @@ -294,110 +297,11 @@ export default { color: "#e56600", text: "开发者应用" }, - line_data: { - xaxis: [ - "07/03", - "07/04", - "07/05", - "07/06", - "07/07", - "07/08", - "07/09", - "07/10", - "07/11", - "07/12", - "07/13", - "07/14", - "07/15", - "07/16" - ], - data: [ - { - name: "开发者应用", - arr: [4, 3, 2, 1, 0, 0, 2, 3,2,4,0,3,2,1] - }, - { - name: "平台应用", - arr: [0, 2, 3, 4, 6, 3, 2, 1,2,5,3,0,3,1] - }, - { - name: "未上架", - arr: [2, 3, 0, 1, 0, 0, 2, 1,1,2,2,3,3,2] - } - ] - }, - bar_data_org: { - xaxis: [ - "省公安厅", - "省发改委", - "贵州省公安厅", - "大数据中心", - "省资源局", - "js机构", - ], - data: [2, 1, 2, 1, 1, 1] - }, - bar_data_area: { - xaxis: [ - "经济建设", - "环境资源", - "道路交通", - "教育科技", - "文化休闲", - "城市管理", - "机构团体", - "民生服务", - "其他", - ], - data: [1, 0, 0, 1, 0, 2, 0, 0, 0] - }, - graph_arr: { - xaxis: [ - "07/09", - "07/10", - "07/11", - "07/12", - "07/13", - "07/14", - "07/15", - "07/16" - ], - data: [ - [1, 1, 0, 1, 0, 2, 1, 2], - [0, 1, 1, 2, 1, 1, 0, 2], - ], - legend: ["被调用次数", "调用次数"] - }, - toplistData: [ - { - name: "mapvideos", - value: 13, - logo: - "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg", - unit: "次" - }, - { - name: "语音识别", - value: 12, - logo: - "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg", - unit: "次" - }, - { - name: "轨迹绘制", - value: 9, - logo: - "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg", - unit: "次" - }, - { - name: "postgresql", - value: 5, - logo: - "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg", - unit: "次" - } - ], // 应用部署排名分析 + line_data: {}, + bar_data_org: {}, + bar_data_area: {}, + graph_arr: {}, + toplistData: [], // 应用部署排名分析 toplistTargetValue: 150, // 应用部署排名分析 目标值 appInfoBtnIndex: 0, commentlistData: [ @@ -499,6 +403,13 @@ export default { ] // 热门搜索 数据 }), mounted() { + this.getAppOverview() + this.getAppUsedCount() + this.getAppType() + this.getAppSourceOri() + this.getAppUsedArea() + this.getAppCount() + this.getAppDeployRank() this.hotSearchHeader = [ { label: "排名", @@ -523,12 +434,95 @@ export default { prop: "increases", width: 100, sortType: "0", // 0:升序 1:降序 - sortable: true, align: "center" } ]; }, methods: { + getAppOverview(){ + this.$api.dataAnalysis.getAppOverview().then(response => { + if (response.data.success == 1) { + let data = response.data.data + this.overview= { + month_chain: parseFloat(data.month_lr), + week_chain: parseFloat(data.week_lr), + total:data.total, + day_count:data.ave_deploy_count + } + this.water_polo = [parseFloat(data.developable_ratio),parseFloat(data.un_developable_ratio)] + } + }) + }, + getAppUsedCount(){ + this.$api.dataAnalysis.getAppUsedCount({day:this.now_used_count_day}).then(response => { + if (response.data.success == 1) { + let data = response.data.data + this.graph_arr= data + } + }) + }, + getAppType(){ + this.$api.dataAnalysis.getAppType({type:this.now_app_type}).then(response => { + if (response.data.success == 1) { + let data = response.data.data + this.mult_data= data.series[0].data + } + }) + }, + getAppSourceOri(){ + this.$api.dataAnalysis.getAppSourceOri().then(response => { + if (response.data.success == 1) { + let data = response.data.data + this.bar_data_org= { + legendData: data.xAxis.data, + seriesData: data.series[0].data + } + } + }) + }, + getAppUsedArea(){ + this.$api.dataAnalysis.getAppUsedArea({type:this.now_app_used_area}).then(response => { + if (response.data.success == 1) { + let data = response.data.data + this.bar_data_area= { + legendData: data.xAxis.data, + seriesData: data.series[0].data + } + } + }) + }, + getAppCount(){ + this.$api.dataAnalysis.getAppCount({day:this.now_app_count}).then(response => { + if (response.data.success == 1) { + let data = response.data.data + this.line_data= { + xAxisData: data.data, + seriesData: data.series + } + } + }) + }, + getAppDeployRank(){ + this.$api.dataAnalysis.getAppDeployRank({type:this.now_app_deploy}).then(response => { + if (response.data.success == 1) { + let data = response.data.data + this.toplistData = [] + if(data&&data.length){ + this.toplistTargetValue =data[0].num + data.forEach(e => { + this.toplistData.push({ + service_name: e.name, + request_count: e.num, + cover:e.logo, + service_id:e.id, + data_service_type:e.type, + data_service_type1:124 + }) + }); + } + } + }) + }, detailHotSearch(item) { console.log("查看热搜详情"); }, @@ -536,16 +530,36 @@ export default { console.log("应用热门搜索: " + sortInfo); }, changeServiceTypeBtn(index) { - console.log("应用类型分析: " + index); + if(index == 0){ + this.now_app_type = 1 + }else{ + this.now_app_type = 2 + } + this.getAppType() + }, + changeAppAreaTypeBtn(index) { + if(index == 0){ + this.now_app_used_area = 1 + }else{ + this.now_app_used_area = 2 + } + this.getAppUsedArea() }, changeApplicationFieldBtn(index) { console.log("xxx: " + index); }, changeServiceCellBtn(index) { - console.log("应用调用次数分析: " + index); + if(index==0){ + this.now_used_count_day = 7 + }else{ + this.now_used_count_day = 30 + } + this.getAppUsedCount() }, changeServeiceApplyCountBtn(index) { console.log("应用部署排名分析: " + index); + this.now_app_deploy = index+1 + this.getAppDeployRank() }, changeAppInfoBtn(index) { this.appInfoBtnIndex = index; @@ -553,7 +567,12 @@ export default { console.log("应用评价及评分: " + index); }, changeAppTotalChangeBtn(index) { - console.log("应用总数变化趋势: " + index); + if(index == 0){ + this.now_app_count = 14 + }else{ + this.now_app_count = 30 + } + this.getAppCount() } } }; diff --git a/src/pages/data-analysis/my-service.vue b/src/pages/data-analysis/my-service.vue index e2def35d9fd2df3fb7858f572c543c93881f333c..91d9e612f60a52766154a8d2c16e994d23f68a89 100644 --- a/src/pages/data-analysis/my-service.vue +++ b/src/pages/data-analysis/my-service.vue @@ -152,7 +152,6 @@ :header="hotSearchHeader" :data="hotSearchData" :padding-left="0" - @sort-change="hotSearchSortChange" >
@@ -309,14 +308,14 @@ export default { fill: "#e56600" }, sparkline1: { - arr: [1, 2, 3, 4, 8, 9, 10, 21], - num: 12, - up: 15.3 + num:0, + up:0, + arr:[] }, sparkline2: { - arr: [1, 2, 3, 4, 8, 9, 10, 21], - num: 6, - up: -19.3 + num:0, + up:0, + arr:[] }, text: "服务总数", single_data: { @@ -423,38 +422,7 @@ export default { ], // 服务评分 starlistTotal: 15, hotSearchHeader: [], // 热门搜索 表头 - hotSearchData: [ - { - hotIndex: 1, - name: "数据服务", - count: 6, - increases: 0.28 - }, - { - hotIndex: 2, - name: "消息队列服务", - count: 5, - increases: 0.15 - }, - { - hotIndex: 3, - name: "按键中心服务", - count: 5, - increases: 0.03 - }, - { - hotIndex: 4, - name: "案件中心服务", - count: 3, - increases: -0.08 - }, - { - hotIndex: 5, - name: "数据中心服务", - count: 1, - increases: -0.18 - } - ], // 热门搜索 数据 + hotSearchData: [], // 热门搜索 数据 graph_arr: { legend: { data: [] @@ -475,6 +443,7 @@ export default { this.getServiceRequest(); this.getServiceOnlineState(); this.getServiceEstimated(); + this.getServiceHotSearch(); this.hotSearchHeader = [ { label: "服务排名", @@ -499,13 +468,44 @@ export default { prop: "increases", width: 100, sortType: "0", // 0:升序 1:降序 - sortable: true, align: "center" } ]; this.getTopologyData(); }, methods: { + getServiceHotSearch(){ + this.$api.dataAnalysis.getServiceHotSearch().then(response => { + if (response.data.success == 1) { + let data = response.data.data + this.sparkline1 = { + num:data.search_user.count, + up:data.trend=='up'?data.search_user.per:data.trend=='down'?0-data.search_user.per:data.search_user.per, + arr:data.search_user_trend.seriesData + } + this.sparkline2 = { + num:data.search_user_avg.count, + up:data.trend=='up'?data.search_user_avg.per:data.trend=='down'?0-data.search_user_avg.per:data.search_user_avg.per, + arr:data.search_user_avg_trend.seriesData + } + // top5_rank + this.hotSearchData = [] + if(data.top5_rank&&data.top5_rank.length){ + data.top5_rank.forEach((e,idx) => { + this.hotSearchData.push( + { + id:e.service_id, + hotIndex: top_rank, + name: e.service_name, + count: e.search_count, + increases: e.trend=='up'?e.search_user.per:e.trend=='down'?0-e.search_user.per:e.search_user.per + } + ) + }); + } + } + }); + }, getServiceOverview() { this.$api.dataAnalysis.getServiceOverview().then(response => { if (response.data.success == 1) { @@ -611,10 +611,7 @@ export default { }); }, detailHotSearch(item) { - console.log("查看热搜详情"); - }, - hotSearchSortChange(sortInfo) { - console.log("服务热门搜索: " + sortInfo); + this.$router.push('/fwgl/0/0/servicedetail/'+item.id) }, changeServiceTypeBtn(index) { this.left_2_state = index; @@ -767,7 +764,7 @@ export default { } .sparkline-text span:nth-of-type(2) { font-size: 12px; - width: 62px; + padding: 0 10px; float: right; text-align: center; line-height: 20px; diff --git a/src/request/api/data-analysis.js b/src/request/api/data-analysis.js index 62a42a1641e717f415d5dd386e01a8d8e1e427e1..32168e063ab6051f88b003484b6130fa2800d1cf 100644 --- a/src/request/api/data-analysis.js +++ b/src/request/api/data-analysis.js @@ -34,6 +34,32 @@ const dataAnalysis = { getServiceEstimated(params) { return axios.get(`/apaas/service/v3/statistics/normal/service/estimated/${params.type == 0 ? 'all' : 'scoremap'}?last_id=${params.last_id}`); }, + getServiceHotSearch() { + return axios.get(`/apaas/service/v3/statistics/normal/service/search`); + }, + + //app + getAppOverview(){ + return axios.get(`/apaas/hubApi/analysis/overview`); + }, + getAppUsedCount(params){ + return axios.get(`/apaas/hubApi/analysis/deployCount?day=${params.day}`); + }, + getAppType(params){ + return axios.get(`/apaas/hubApi/analysis/typesAnalysis?style=${params.type}`); + }, + getAppSourceOri(){ + return axios.get(`/apaas/hubApi/analysis/appSource`); + }, + getAppUsedArea(params){ + return axios.get(`/apaas/hubApi/analysis/areasAnalysis?style=${params.type}`); + }, + getAppCount(params){ + return axios.get(`/apaas/hubApi/analysis/numTrend?day=${params.day}`); + }, + getAppDeployRank(params){ + return axios.get(`/apaas/hubApi/analysis/deployRank?style=${params.type}`); + }, } export default dataAnalysis;