forked from JointCloud/JCC-RIP
Merge branch 'earth' of https://gitlink.org.cn/JCCE/kubeX-frontend into earth
This commit is contained in:
commit
b1566ba6ca
|
@ -0,0 +1,92 @@
|
|||
version: 2
|
||||
name: 腾讯云dev环境
|
||||
description: ""
|
||||
global:
|
||||
concurrent: 1
|
||||
param:
|
||||
- ref: secret_name
|
||||
name: ""
|
||||
value: '"jcce-aliyuncs"'
|
||||
required: false
|
||||
type: STRING
|
||||
hidden: false
|
||||
- ref: project_name
|
||||
name: ""
|
||||
value: '"kubex-frontend"'
|
||||
required: false
|
||||
type: STRING
|
||||
hidden: false
|
||||
trigger:
|
||||
webhook: gitlink@1.0.0
|
||||
event:
|
||||
- ref: create_tag
|
||||
ruleset:
|
||||
- param-ref: tag
|
||||
operator: EQ
|
||||
value: '""'
|
||||
ruleset-operator: AND
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.6
|
||||
input:
|
||||
ssh_key: ((test.gitlink_sshkey))
|
||||
remote_url: '"git@code.gitlink.org.cn:JCCE/kubex-frontend.git"'
|
||||
ref: '"refs/heads/earth"'
|
||||
commit_id: '""'
|
||||
depth: 1
|
||||
needs:
|
||||
- start
|
||||
- ref: docker_image_build_0
|
||||
name: docker镜像构建
|
||||
task: docker_image_build@1.6.0
|
||||
input:
|
||||
docker_username: ((test.docker_user))
|
||||
docker_password: ((test.docker_password))
|
||||
image_name: '"registry.cn-hangzhou.aliyuncs.com/jcce/kubex-frontend"'
|
||||
image_tag: git_clone_0.commit_time
|
||||
registry_address: '"registry.cn-hangzhou.aliyuncs.com"'
|
||||
docker_build_path: git_clone_0.git_path
|
||||
workspace: git_clone_0.git_path
|
||||
image_clean: true
|
||||
image_push: true
|
||||
build_args: '""'
|
||||
needs:
|
||||
- shell_0
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- kubectl_deploy_0
|
||||
- ref: kubectl_deploy_0
|
||||
name: kubectl部署资源
|
||||
task: kubectl_deploy@1.1.0
|
||||
input:
|
||||
command: '"apply"'
|
||||
resource_file_path: git_clone_0.git_path + '/deploy/k8s/kubex-frontend.yaml'
|
||||
certificate_authority_data: ((test.k8s_cad))
|
||||
server: '"https://119.45.100.73:6443"'
|
||||
client_certificate_data: ((test.k8s_ccd))
|
||||
client_key_data: ((test.k8s_ckd))
|
||||
hosts: '""'
|
||||
needs:
|
||||
- docker_image_build_0
|
||||
- ref: shell_0
|
||||
name: shell
|
||||
image: docker.jianmuhub.com/library/debian:buster-slim
|
||||
env:
|
||||
IMAGE_NAME: '"registry.cn-hangzhou.aliyuncs.com/jcce/kubex-frontend"'
|
||||
IMAGE_TAG: git_clone_0.commit_time
|
||||
SECRET_NAME: global.secret_name
|
||||
PROJECT_NAME: global.project_name
|
||||
PROJECT_PATH: git_clone_0.git_path + '/deploy/k8s/'
|
||||
script:
|
||||
- cd ${PROJECT_PATH}
|
||||
- sed -i "s#image_name#${IMAGE_NAME}:${IMAGE_TAG}#" ${PROJECT_NAME}.yaml
|
||||
- sed -i "s#secret_name#${SECRET_NAME}#" ${PROJECT_NAME}.yaml
|
||||
- cat ${PROJECT_NAME}.yaml
|
||||
needs:
|
||||
- git_clone_0
|
|
@ -0,0 +1,92 @@
|
|||
version: 2
|
||||
name: 阿里云test环境
|
||||
description: ""
|
||||
global:
|
||||
concurrent: 1
|
||||
param:
|
||||
- ref: secret_name
|
||||
name: ""
|
||||
value: '"jcce-aliyuncs"'
|
||||
required: false
|
||||
type: STRING
|
||||
hidden: false
|
||||
- ref: project_name
|
||||
name: ""
|
||||
value: '"kubex-frontend"'
|
||||
required: false
|
||||
type: STRING
|
||||
hidden: false
|
||||
trigger:
|
||||
webhook: gitlink@1.0.0
|
||||
event:
|
||||
- ref: create_tag
|
||||
ruleset:
|
||||
- param-ref: tag
|
||||
operator: EQ
|
||||
value: '""'
|
||||
ruleset-operator: AND
|
||||
workflow:
|
||||
- ref: start
|
||||
name: 开始
|
||||
task: start
|
||||
- ref: git_clone_0
|
||||
name: git clone
|
||||
task: git_clone@1.2.6
|
||||
input:
|
||||
ssh_key: ((test.gitlink_sshkey))
|
||||
remote_url: '"git@code.gitlink.org.cn:JCCE/kubex-frontend.git"'
|
||||
ref: '"refs/heads/earth"'
|
||||
commit_id: '""'
|
||||
depth: 1
|
||||
needs:
|
||||
- start
|
||||
- ref: docker_image_build_0
|
||||
name: docker镜像构建
|
||||
task: docker_image_build@1.6.0
|
||||
input:
|
||||
docker_username: ((test.docker_user))
|
||||
docker_password: ((test.docker_password))
|
||||
image_name: '"registry.cn-hangzhou.aliyuncs.com/jcce/kubex-frontend"'
|
||||
image_tag: git_clone_0.commit_time
|
||||
registry_address: '"registry.cn-hangzhou.aliyuncs.com"'
|
||||
docker_build_path: git_clone_0.git_path
|
||||
workspace: git_clone_0.git_path
|
||||
image_clean: true
|
||||
image_push: true
|
||||
build_args: '""'
|
||||
needs:
|
||||
- shell_0
|
||||
- ref: end
|
||||
name: 结束
|
||||
task: end
|
||||
needs:
|
||||
- kubectl_deploy_0
|
||||
- ref: kubectl_deploy_0
|
||||
name: kubectl部署资源
|
||||
task: kubectl_deploy@1.1.0
|
||||
input:
|
||||
command: '"apply"'
|
||||
resource_file_path: git_clone_0.git_path + '/deploy/k8s/kubex-frontend.yaml'
|
||||
certificate_authority_data: ((test.k8s_cad))
|
||||
server: '"https://47.92.39.128:6443"'
|
||||
client_certificate_data: ((test.k8s_ccd))
|
||||
client_key_data: ((test.k8s_ckd))
|
||||
hosts: '""'
|
||||
needs:
|
||||
- docker_image_build_0
|
||||
- ref: shell_0
|
||||
name: shell
|
||||
image: docker.jianmuhub.com/library/debian:buster-slim
|
||||
env:
|
||||
IMAGE_NAME: '"registry.cn-hangzhou.aliyuncs.com/jcce/kubex-frontend"'
|
||||
IMAGE_TAG: git_clone_0.commit_time
|
||||
SECRET_NAME: global.secret_name
|
||||
PROJECT_NAME: global.project_name
|
||||
PROJECT_PATH: git_clone_0.git_path + '/deploy/k8s/'
|
||||
script:
|
||||
- cd ${PROJECT_PATH}
|
||||
- sed -i "s#image_name#${IMAGE_NAME}:${IMAGE_TAG}#" ${PROJECT_NAME}.yaml
|
||||
- sed -i "s#secret_name#${SECRET_NAME}#" ${PROJECT_NAME}.yaml
|
||||
- cat ${PROJECT_NAME}.yaml
|
||||
needs:
|
||||
- git_clone_0
|
21
Dockerfile
21
Dockerfile
|
@ -1,5 +1,24 @@
|
|||
FROM node:16.20-alpine3.17 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
COPY deploy/nginx/ /app/
|
||||
RUN npm install --registry=https://registry.npmmirror.com &&\
|
||||
npm run build:prod
|
||||
|
||||
FROM nginx:stable-alpine
|
||||
COPY dist/ /usr/share/nginx/html/jcce
|
||||
WORKDIR /app
|
||||
|
||||
#修改alpine源为上海交通大学
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.sjtug.sjtu.edu.cn/g' /etc/apk/repositories && \
|
||||
apk update && \
|
||||
apk upgrade && \
|
||||
apk add --no-cache ca-certificates && update-ca-certificates && \
|
||||
apk add --update tzdata && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html/jcce
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
COPY deploy/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
|
|
|
@ -17,10 +17,10 @@ spec:
|
|||
k8s-app: kubex-frontend
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: SECRET_NAME
|
||||
- name: secret_name
|
||||
containers:
|
||||
- name: kubex-frontend
|
||||
image: IMAGE_NAME
|
||||
image: image_name
|
||||
resources: {}
|
||||
imagePullPolicy: Always
|
||||
securityContext:
|
||||
|
@ -42,3 +42,22 @@ spec:
|
|||
maxSurge: 25%
|
||||
revisionHistoryLimit: 10
|
||||
progressDeadlineSeconds: 600
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
namespace: jcce-system
|
||||
name: kubex-frontend-service
|
||||
labels:
|
||||
k8s-service: kubex-frontend
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: kubex-frontend
|
||||
ports:
|
||||
- name: web
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
type: ClusterIP
|
|
@ -1,16 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
namespace: jcce-system
|
||||
name: kubex-frontend-service
|
||||
labels:
|
||||
k8s-service: kubex-frontend
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: kubex-frontend
|
||||
ports:
|
||||
- name: web
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
type: ClusterIP
|
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
|
@ -1,13 +1,6 @@
|
|||
<template>
|
||||
<!-- 存储资源用量 -->
|
||||
<div>
|
||||
<div class="unUse use">
|
||||
<div class="data">
|
||||
<p class="num">{{ storageData.storageUsing }}TB</p>
|
||||
<p class="percent"> {{ Math.round(storageData.usingRate*10000) /100 }}%</p>
|
||||
</div>
|
||||
<span class="type">未使用 </span>
|
||||
</div>
|
||||
<div class="used use">
|
||||
<span class="type"> 已使用 </span>
|
||||
<div class="data">
|
||||
|
@ -15,6 +8,13 @@
|
|||
<p class="percent"> {{ Math.round(storageData.usageRate*10000) /100 }}%</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="unUse use">
|
||||
<div class="data">
|
||||
<p class="num">{{ storageData.storageUsing }}TB</p>
|
||||
<p class="percent"> {{ Math.round(storageData.usingRate*10000) /100 }}%</p>
|
||||
</div>
|
||||
<span class="type">未使用 </span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -24,6 +24,12 @@
|
|||
</div>
|
||||
<div class="left_2">
|
||||
<div class="title"><p>云际组件状态</p></div>
|
||||
<el-row class="taskDiv">
|
||||
<el-col v-for="(item,index) in taskDetail" :key="'task'+index" :span="12">
|
||||
<div class="num">{{ item.num }}</div>
|
||||
<div class="name">{{ item.name }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <ComputingPowerTrend id="ComputingPowerTrend" :data="tendData" :config="tendConfig" /> -->
|
||||
</div>
|
||||
<div class="left_3">
|
||||
|
@ -111,6 +117,24 @@ export default {
|
|||
'centerPosition': '',
|
||||
'provinceBgColor': ''
|
||||
},
|
||||
taskDetail: [
|
||||
{
|
||||
name: 'API每秒请求数 times/s',
|
||||
num: 119.083
|
||||
},
|
||||
{
|
||||
name: 'API请求延迟 ms',
|
||||
num: 2.71
|
||||
},
|
||||
{
|
||||
name: '调度器 调度次数',
|
||||
num: 5
|
||||
},
|
||||
{
|
||||
name: '调度失败的 容器节点',
|
||||
num: 1
|
||||
}
|
||||
],
|
||||
resizeKey: 0,
|
||||
dialogVisible: false,
|
||||
rs: new FormData(),
|
||||
|
@ -590,11 +614,46 @@ export default {
|
|||
overflow: hidden;
|
||||
}
|
||||
.left_2 {
|
||||
height: 30vh;
|
||||
height: 33vh;
|
||||
.taskDiv{
|
||||
// display: flex;
|
||||
// justify-content: space-between;
|
||||
text-align: center;
|
||||
margin-bottom: 1%;
|
||||
// height: calc(100% - 190px);
|
||||
>div{
|
||||
background: url('../../assets/images/monitorSelect/data-bg.png') no-repeat center;
|
||||
background-size: auto 100%;
|
||||
height: 11vh;
|
||||
margin-top: 2vh;
|
||||
// width: 25%;
|
||||
.num{
|
||||
font-size: 1.5rem;
|
||||
font-family: Impact;
|
||||
color: #FFFFFF;
|
||||
letter-spacing: 0.1rem;
|
||||
font-family: PangMenZhengDao;
|
||||
// height: 3vh;
|
||||
// line-height: 4vh;
|
||||
height: 3vh;
|
||||
line-height: 2rem;
|
||||
margin-bottom: 1vh;
|
||||
}
|
||||
.name{
|
||||
font-size: 0.8rem;
|
||||
letter-spacing: 0.1rem;
|
||||
width: 60%;
|
||||
margin: auto;
|
||||
// font-weight: bold;
|
||||
height: 70%;
|
||||
// line-height: 300%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.left_3 {
|
||||
width: 100%;
|
||||
height: 27vh;
|
||||
height: 15vh;
|
||||
}
|
||||
// .left_4{
|
||||
// height: 12vh;
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
"centerList": [{
|
||||
"name": "中国电信天翼云中南数字产业园",
|
||||
"address": "长沙市天心区中意二路25号",
|
||||
"longitude": 112.99449,
|
||||
"latitude": 28.009243
|
||||
|
||||
}, {
|
||||
"name": "长沙云谷数据中心",
|
||||
"address": "长沙市望城区金星北路证通云计算大数据产业园内",
|
||||
"longitude": 112.889616,
|
||||
"latitude": 28.321779
|
||||
|
||||
}, {
|
||||
"name": "中国联通湖南长沙云数据中心",
|
||||
"address": "长沙市岳麓区嘉运路",
|
||||
"longitude": 112.860612,
|
||||
"latitude": 28.228898
|
||||
|
||||
}, {
|
||||
"name": "中国电信云大数据中心(湖南)",
|
||||
"address": "长沙市岳麓区桐梓坡西路189号",
|
||||
"longitude": 112.902607,
|
||||
"latitude": 28.223713
|
||||
|
||||
}, {
|
||||
"name": "中国移动长沙数据中心",
|
||||
"address": "长沙市岳麓区麓景路与桐梓坡西路交叉路口西侧",
|
||||
"longitude": 112.899441,
|
||||
"latitude": 28.221986
|
||||
|
||||
}, {
|
||||
"name": "长沙磐云数据中心",
|
||||
"address": "长沙市岳麓区茯苓路31号",
|
||||
"longitude": 112.895346,
|
||||
"latitude": 28.120142
|
||||
|
||||
|
||||
}, {
|
||||
"name": "易信科技数据中心",
|
||||
"address": "郴州市资兴市东江街道沿江北路",
|
||||
"longitude": 113.25323,
|
||||
"latitude": 25.955507
|
||||
|
||||
}, {
|
||||
"name": "东江湖大数据中心",
|
||||
"address": "郴州市资兴市东江街道沿江北路",
|
||||
"longitude": 113.25323,
|
||||
"latitude": 25.955507
|
||||
|
||||
}, {
|
||||
"name": "中国电信郴州资兴东江湖数据中心",
|
||||
"address": "郴州市资兴市东江街道沿江北路",
|
||||
"longitude": 113.25323,
|
||||
"latitude": 25.955507
|
||||
|
||||
}, {
|
||||
"name": "中国移动湖南株洲数据中心",
|
||||
"address": "株洲市石峰区盘龙路",
|
||||
"longitude": 113.183145,
|
||||
"latitude": 27.972326
|
||||
|
||||
}, {
|
||||
"name": "湖南数据湖产业园数据中心",
|
||||
"address": "菖塘路",
|
||||
"longitude": 113.189571,
|
||||
"latitude": 27.971911
|
||||
|
||||
}, {
|
||||
"name": "大数据产业园(湘潭高新)",
|
||||
"address": "湖南湘潭市岳塘区晓塘路9号",
|
||||
"longitude": 112.946758,
|
||||
"latitude": 27.828805
|
||||
|
||||
}, {
|
||||
"name": "常德大数据中心",
|
||||
"address": "常德市澧县桃花滩路豪盛国际现代城",
|
||||
"longitude": 111.776166,
|
||||
"latitude": 29.655702
|
||||
|
||||
}, {
|
||||
"name": "芙蓉云大数据中心",
|
||||
"address": "益阳市赫山区高新大道10号",
|
||||
"longitude": 112.489535,
|
||||
"latitude": 28.453288
|
||||
|
||||
}, {
|
||||
"name": "华为永州云计算数据中心",
|
||||
"address": "永州市冷水滩区袁家路",
|
||||
"longitude": 111.591789,
|
||||
"latitude": 26.399643
|
||||
}]
|
||||
}
|
|
@ -8,7 +8,7 @@
|
|||
<div id="earth" />
|
||||
<transition name="el-zoom-in-center">
|
||||
<div v-if="third" class="transition-box province">
|
||||
<province v-model="third" :map-type="provinceType" :cluster="provinceClusters" />
|
||||
<province v-model="third" :map-type="provinceType" :cluster="provinceClusters" @selectedCity="selectCity" />
|
||||
</div>
|
||||
</transition>
|
||||
<transition name="el-zoom-in-bottom">
|
||||
|
@ -38,6 +38,7 @@ import { getEarthRegion, getProvinceDetail } from '@/api/top-menu/TotalNum'
|
|||
import chinaJson from './chinaProvince.json'
|
||||
import borderJson from './border.json'
|
||||
import continentsJson from './worldContinents.json'
|
||||
import dataCenter from './dataCenter.json'
|
||||
import province from './province.vue'
|
||||
import zone from './zone.vue'
|
||||
// import countingJson from './counting.json'
|
||||
|
@ -63,6 +64,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
dataCenter,
|
||||
loading: true,
|
||||
mapType: 5,
|
||||
provinceType: 5,
|
||||
|
@ -164,6 +166,9 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
selectCity(e) {
|
||||
console.log(e)
|
||||
},
|
||||
getEarth() {
|
||||
getEarthRegion().then(res => {
|
||||
const cs = []
|
||||
|
@ -969,10 +974,15 @@ export default {
|
|||
},
|
||||
// 获取省份数据
|
||||
getProvinceData(userData) {
|
||||
getProvinceDetail(userData.id || 9).then(e => {
|
||||
this.provinceClusters = e.data.clusters || []
|
||||
if (this.provinceType !== 9) {
|
||||
getProvinceDetail(userData.id || 9).then(e => {
|
||||
this.provinceClusters = e.data.clusters || []
|
||||
this.third = true
|
||||
})
|
||||
} else {
|
||||
this.provinceClusters = dataCenter.centerList
|
||||
this.third = true
|
||||
})
|
||||
}
|
||||
},
|
||||
// 设定区域标记框
|
||||
setAreaMark() {
|
||||
|
|
Loading…
Reference in New Issue