delete chinese

This commit is contained in:
ann 2024-02-23 11:31:20 +08:00
parent f3d972ca90
commit 74f8768a35
9 changed files with 47 additions and 129 deletions

View File

@ -1,20 +1,20 @@
# JCCE
Thanks to KubeSphere and Harvester for providing back-end support for this system.
## 电脑需要安装 node 环境
## need node environment
## 安装依赖命令
## install dependencies
```
npm install
```
### 编译及热加载命令
### Commands for Compilation and Hot Reloading
```
npm run dev
```
### 生产环境打包命令
### Production Environment Build Commands
```
npm run build

View File

@ -2,6 +2,11 @@
"message": {
"hello": "中",
"back": "Back",
"cancel": "Cancel"
"cancel": "Cancel",
"to": "To",
"startDate": "Start Date",
"endDate": "End Date",
"search": "Search",
"reset": "Reset"
}
}

View File

@ -2,6 +2,11 @@
"message": {
"hello": "En",
"back": "返回",
"cancel": "取消"
"cancel": "取消",
"to": "至",
"startDate": "开始日期",
"endDate": "结束日期",
"search": "搜索",
"reset": "重置"
}
}

View File

@ -18,7 +18,7 @@ export default {
localStorage.setItem('jcceTheme', jcceTheme)
if (jcceTheme === 'jcceDark') {
console.log('深色系样式')
console.log('dark theme')
require('./styles/dark-theme/dark.scss')
document.body.className = jcceTheme
}

View File

@ -2,19 +2,19 @@ import request from '@/utils/request'
// import moment from 'moment'
export default {
// pod删除 工作负载删除
// pod delete
deleteCurrent(clusterName, namespace, name, classification) {
if (classification === 'userProject') { // 用户项目
if (classification === 'userProject') {
return request({
url: `/jcc-schedule/api/v1/namespace/delete/${clusterName}/${namespace}/false`,
method: 'delete'
})
} else if (classification === 'storage') { // 存储卷
} else if (classification === 'storage') {
return request({
url: `/jcc-schedule/api/v1/storage/pvc/${clusterName}/${namespace}/${name}/false`,
method: 'delete'
})
} else if (classification === 'pods') { // 容器节点
} else if (classification === 'pods') {
return request({
url: `/jcc-schedule/api/v1/pod/delete/${clusterName}/${namespace}/${name}/false`,
method: 'delete'
@ -25,7 +25,6 @@ export default {
method: 'delete'
})
} else {
// 工作负载 部署 有状态副本集 守护进程集
return request({
url: `/jcc-schedule/api/v1/${classification}/delete/${clusterName}/${namespace}/${name}/false`,
method: 'delete'
@ -46,9 +45,6 @@ export default {
})
},
// 区块链
// 鉴权
// 通道hash查询接口
getCurrentChannel() {
return request({

View File

@ -32,9 +32,9 @@
<el-date-picker
v-model="filterData[key]"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
:range-separator="$t('message.to')"
:start-placeholder="$t('message.startDate')"
:end-placeholder="$t('message.endDate')"
/>
<!-- <el-datepicker
v-model="filterData[item.key1]"
@ -64,13 +64,13 @@
type="info"
@click="onSearchClick"
>
查询
{{ $t('message.search') }}
</el-button>
<el-button
size="medium"
@click="resetSearch"
>
重置
{{ $t('message.reset') }}
</el-button>
</el-form-item>
</el-form>
@ -154,20 +154,20 @@ export default {
getListAction: {
type: Function,
default: undefined
}, // api
},
map: {
type: Object,
default: undefined
}, //
},
columns: {
type: Array,
default: () => []
}, //
pagination: { //
},
pagination: {
type: Boolean,
default: false
},
paginationAuto: { //
paginationAuto: {
type: Boolean,
default: false
},
@ -175,7 +175,7 @@ export default {
type: Object,
default: undefined
}, // api query
filterMap: { //
filterMap: {
type: Object,
default: () => {}
},
@ -184,11 +184,11 @@ export default {
default: () => {
}
},
funcName: { //
funcName: {
type: String,
default: ''
},
isRefresh: { //
isRefresh: {
type: Boolean,
default: false
},
@ -216,14 +216,14 @@ export default {
type: String,
default: 'limit'
},
small: { //
small: {
type: Boolean,
default: false
},
height: {
type: String,
default: 'auto'
}, //
},
border: {
type: Boolean,
default: false

View File

@ -6,7 +6,6 @@ import 'normalize.css/normalize.css' // a modern alternative to CSS resets
import Element from 'element-ui'
import './styles/element-variables.scss'
// import enLang from 'element-ui/lib/locale/lang/en'// 如果使用中文语言包请默认支持,无需额外引入,请删除该依赖
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import ElementLocale from 'element-ui/lib/locale'

View File

@ -38,7 +38,7 @@ router.beforeEach(async(to, from, next) => {
try {
store.dispatch('user/setRouteType', to.path.split('/')[1])
if (store.getters.routesType === 'cluster') {
// 获取集群列表并获取是否有边缘节点
// get cluster list to check is it an edge node
store.dispatch('cluster/setCluster', to.path.split('/')[2])
await store.dispatch('cluster/getClusterList')
}

View File

@ -40,18 +40,6 @@ module.exports = {
errors: true
},
proxy: {
// '^/login': {
// ws: false,
// target: 'https://10.101.15.6/prod-api/'/* 测试环境 */
// // target: 'https://jointcloud.net/prod-api/'/* 演示环境 */
// },
'^/dockerhub/api/': {
target: 'http://10.105.20.3:30880/'
// pathRewrite: {
// '^/dockerhub': '/api'
// },
// secure: false
},
'^/blockChain': {
ws: false,
target: 'https://10.101.15.6/apis',
@ -60,52 +48,28 @@ module.exports = {
},
'^/jcc-': {
ws: false,
target: 'https://dev.jointcloud.net/apis', /* 测试环境 */
// target: 'https://jointcloud.net/apis', /* 演示环境 */
target: 'https://dev.jointcloud.net/apis',
// target: 'https://jointcloud.net/apis',
changeOrigin: true,
secure: false
},
'^/pcm': {
ws: false,
// target: 'https://dev.jointcloud.net/apis', /* 测试环境 */
target: 'https://mock.apifox.com/m1/4000164-0-default/', /* 测试环境 */
// target: 'https://jointcloud.net/apis', /* 演示环境 */
target: 'https://mock.apifox.com/m1/4000164-0-default/',
// target: 'https://jointcloud.net/apis',
changeOrigin: true,
secure: false
},
// '/kapis/terminal.kubesphere.io': {
// ws: true,
// changeOrigin: true,
// target: 'ws://jointcloud.net/prod-api/' /* 测试环境 */
// // target: 'ws://jointcloud.net/prod-api/' /* 演示环境 */
// },
'/monitoringscreen/': {
ws: false,
target: 'https://10.101.15.6/apis',
// target: 'https://jointcloud.net/apis', /* 演示环境 */
changeOrigin: true
},
'/openapi': {
ws: false,
target: 'http://grampus.openi.org.cn/',
// target: 'https://10.101.15.6/apis',
changeOrigin: true
}
// '^/edgex': {
// ws: false,
// target: 'https://10.101.15.6/apis' /* 测试环境 */
// // target: 'https://jointcloud.net/prod-api/' /* 演示环境 */
// }
}
// before: require('./mock/mock-server.js')
},
chainWebpack: config => {
// hmr fix
config.resolve.symlinks(true)
// 添加别名
// add alias
config.resolve.alias.set('@', resolve('src'))
const cdn = {
// 访问https://unpkg.com/element-ui/lib/theme-chalk/index.css获取最新版本
// visit https://unpkg.com/element-ui/lib/theme-chalk/index.css to get new version
css: ['https://unpkg.com/element-ui@2.13.2/lib/theme-chalk/index.css'],
js: [
'https://cdn.staticfile.org/vue/2.6.10/vue.min.js',
@ -149,64 +113,13 @@ module.exports = {
})
.end()
// 如果使用多页面打包使用vue inspect --plugins查看html是否在结果数组中
config.plugin('html').tap(args => {
// html中添加cdn
// html add cdn
args[0].cdn = process.env.NODE_ENV === 'production' ? cdn : []
return args
})
// config
// .when(process.env.NODE_ENV !== 'development',
// config => {
// config
// .plugin('ScriptExtHtmlWebpackPlugin')
// .after('html')
// .use('script-ext-html-webpack-plugin', [{
// // `runtime` must same as runtimeChunk name. default is `runtime`
// inline: /runtime\..*\.js$/
// }])
// .end()
// config
// .optimization.splitChunks({
// chunks: 'all',
// cacheGroups: {
// libs: {
// name: 'chunk-libs',
// test: /[\\/]node_modules[\\/]/,
// priority: 10,
// chunks: 'initial' // only package third parties that are initially dependent
// },
// // elementUI: {
// // name: 'chunk-elementUI', // split elementUI into a single package
// // priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
// // test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
// // },
// commons: {
// name: 'chunk-commons',
// test: resolve('src/components'), // can customize your rules
// minChunks: 3, // minimum common number
// priority: 5,
// reuseExistingChunk: true
// }
// }
// })
// // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
// config.optimization.runtimeChunk('single')
// }
// )
},
configureWebpack: config => {
// config = {
// config.name = name
// config.resolve = {
// alias: {
// '@': resolve('src')
// }
// }
// config.module = {
// unknownContextCritical: false
// }
// }
config.name = name
if (process.env.NODE_ENV === 'production') {
config.externals = {
@ -217,18 +130,18 @@ module.exports = {
axios: 'axios',
echarts: 'echarts'
}
// 去掉注释
// delete comments
config.optimization.minimizer.push(
new UglifyJsPlugin({
uglifyOptions: {
output: {
comments: false // 去掉注释
comments: false
},
compress: {
// warnings: false,
drop_console: true,
drop_debugger: false,
pure_funcs: ['console.log'] // 移除console
pure_funcs: ['console.log'] // delete console
}
}
})