Skip to content

Commit

Permalink
Merge pull request #6721 from lockiechen/release-1.8_6691
Browse files Browse the repository at this point in the history
feat: 升级存在漏洞的开源依赖组件 issue #6691
  • Loading branch information
irwinsun authored May 10, 2022
2 parents c5c59a3 + 0c51401 commit 74c0035
Show file tree
Hide file tree
Showing 21 changed files with 185 additions and 660 deletions.
12 changes: 6 additions & 6 deletions src/app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ dependencies:
flutter_swiper: ^1.1.6
dio: ^4.0.0
shared_preferences: ^2.0.5
provider: ^5.0.0
provider: ^6.0.2
json_annotation: ^4.0.1
intl: ^0.17.0
package_info: ^2.0.0
qr_flutter: ^4.0.0

fluttertoast: ^8.0.3
permission_handler: ^6.1.3
permission_handler: ^9.2.0
image_gallery_saver: ^1.6.5
url_launcher: ^6.0.2
path_provider: ^2.0.1
Expand All @@ -48,20 +48,20 @@ dependencies:
device_apps: ^2.0.1
minimize_app: ^0.1.1
connectivity: ^3.0.3
webview_flutter: ^2.0.2
webview_flutter: ^3.0.2
version: ^2.0.0
badges: ^2.0.1
quick_actions: ^0.6.0+3

qr_code_scanner: ^0.5.1
qr_code_scanner: ^0.7.0
# qr_code_scanner:
# git:
# url: git://github.com/juliuscanute/qr_code_scanner.git
ansi_up: ^1.0.0
bk_tencent_share: ^0.0.5
# bk_tencent_share:
# path: /Users/roychen/Desktop/bk_tencent_share
flutter_slidable: ^0.6.0
flutter_slidable: ^1.2.0
cupertino_icons: ^1.0.0
hashids2: ^2.0.0
cached_network_image: ^3.0.0
Expand All @@ -70,7 +70,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^2.0.6
json_serializable: ^4.1.0
json_serializable: ^6.2.0


# For information on the generic Dart part of this file, see the
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/bk-pipeline/src/Atom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
isQualityCheckAtom () {
return Array.isArray(this.matchRules)
&& this.matchRules.some(rule => rule.taskId === this.atom.atomCode
&& rule.ruleList.every(val => this.atom.name.indexOf(val.gatewayId) < 0 || !val.gatewayId)
&& (rule.ruleList.some(val => this.atom.name.indexOf(val.gatewayId) > -1) || rule.ruleList.every(val => !val.gatewayId))
)
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/devops-atomstore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"clipboard": "^2.0.4",
"codemirror": "5.61.0",
"core-js": "3.10.0",
"mavon-editor": "2.7.7",
"moment": "^2.18.1"
"mavon-editor": "^2.10.4",
"moment": "^2.29.2"
},
"devDependencies": {
"@babel/core": "^7.15.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@
},
urlPlaceholder () {
return (
this.placeholders['url'][this.codelibConfig.label]
|| this.placeholders['url'][this.codelib.authType]
this.placeholders.url[this.codelibConfig.label]
|| this.placeholders.url[this.codelib.authType]
)
},
credentialPlaceholder () {
Expand Down
6 changes: 4 additions & 2 deletions src/frontend/devops-environment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
"version": "1.0.0",
"description": "",
"dependencies": {
"@vue/composition-api": "^1.6.1",
"clipboard": "^1.7.1",
"echarts": "^5.3.2",
"vee-validate": "^2.0.3",
"vue-echarts": "^3.0.9",
"vue-echarts": "^6.0.2",
"vue-file-upload": "^0.1.12",
"vuex-class": "^0.3.0"
},
Expand Down Expand Up @@ -62,4 +64,4 @@
"url": ""
},
"license": "ISC"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</bk-dropdown-menu>
</div>
</div>
<chart :options="cpuLine" ref="cpuLine1" auto-resize v-show="!isEmptyCpu"></chart>
<chart :option="cpuLine" ref="cpuLine1" autoresize :loading="cpuChartLoading" :loading-options="chartLoadingOption" v-show="!isEmptyCpu"></chart>
<div class="paas-ci-empty" v-show="isEmptyCpu">
<img :src="calcSrc" :alt="$t('environment.noData')" class="empty-pic">
</div>
Expand Down Expand Up @@ -56,7 +56,7 @@
</bk-dropdown-menu>
</div>
</div>
<chart :options="memoryLine" ref="memoryLine1" auto-resize v-show="!isEmptyMemory"></chart>
<chart :option="memoryLine" ref="memoryLine1" :loading="memChartLoading" :loading-options="chartLoadingOption" autoresize v-show="!isEmptyMemory"></chart>
<div class="paas-ci-empty" v-show="isEmptyMemory">
<img :src="calcSrc" :alt="$t('environment.noData')" class="empty-pic">
</div>
Expand Down Expand Up @@ -88,7 +88,7 @@
</bk-dropdown-menu>
</div>
</div>
<chart :options="networkLine" ref="networkLine1" auto-resize v-show="!isEmptyNetwork"></chart>
<chart :option="networkLine" ref="networkLine1" :loading="netChartLoading" :loading-options="chartLoadingOption" autoresize v-show="!isEmptyNetwork"></chart>
<div class="paas-ci-empty" v-show="isEmptyNetwork">
<img :src="calcSrc" :alt="$t('environment.noData')" class="empty-pic">
</div>
Expand Down Expand Up @@ -118,7 +118,7 @@
</bk-dropdown-menu>
</div>
</div>
<chart :options="storageLine" ref="storageLine1" auto-resize v-show="!isEmptyDiskio"></chart>
<chart :option="storageLine" ref="storageLine1" :loading="ioChartLoading" :loading-options="chartLoadingOption" autoresize v-show="!isEmptyDiskio"></chart>
<div class="paas-ci-empty" v-show="isEmptyDiskio">
<img :src="calcSrc" :alt="$t('environment.noData')" class="empty-pic">
</div>
Expand All @@ -128,16 +128,29 @@
</template>

<script>
import ECharts from 'vue-echarts/components/ECharts.vue'
import 'echarts/lib/chart/line'
import 'echarts/lib/component/tooltip'
import 'echarts/lib/component/legend'
import { use } from 'echarts/core'
import VChart from 'vue-echarts'
import { CanvasRenderer } from 'echarts/renderers'
import { LineChart } from 'echarts/charts'
import {
GridComponent,
TooltipComponent,
LegendComponent
} from 'echarts/components'
import { nodeOverview } from '@/utils/chart-option'
import { bus } from '@/utils/bus'
use([
CanvasRenderer,
LineChart,
GridComponent,
TooltipComponent,
LegendComponent
])
export default {
components: {
chart: ECharts
chart: VChart
},
data () {
return {
Expand All @@ -153,7 +166,11 @@
memoryLine: nodeOverview.memory,
networkLine: nodeOverview.network,
storageLine: nodeOverview.storage,
calcSrc: require('@/images/no_data.png')
calcSrc: require('@/images/no_data.png'),
cpuChartLoading: false,
memChartLoading: false,
netChartLoading: false,
ioChartLoading: false
}
},
computed: {
Expand All @@ -162,6 +179,13 @@
},
nodeHashId () {
return this.$route.params.nodeHashId
},
chartLoadingOption () {
return {
text: this.$t('environment.loading'),
color: '#30d878',
maskColor: 'rgba(255, 255, 255, 0.8)'
}
}
},
created () {
Expand Down Expand Up @@ -199,43 +223,33 @@
timeRange: range === '1' ? 'HOUR' : range === '2' ? 'DAY' : 'WEEK'
}
// 图表组件 ref
let ref
// 设置图表数据的方法名
let hookFuncName
if (idx === 'cpu_summary') {
ref = this.$refs.cpuLine1
hookFuncName = 'setCpuData'
this.cpuChartLoading = true
} else if (idx === 'mem') {
ref = this.$refs.memoryLine1
hookFuncName = 'setMemData'
this.memChartLoading = true
} else if (idx === 'io') {
ref = this.$refs.storageLine1
hookFuncName = 'setStorageData'
this.ioChartLoading = true
} else if (idx === 'net') {
ref = this.$refs.networkLine1
hookFuncName = 'setNetworkData'
this.netChartLoading = true
}
ref && ref.showLoading({
text: this.$t('environment.loading'),
color: '#30d878',
maskColor: 'rgba(255, 255, 255, 0.8)'
})
if (hookFuncName) {
this[hookFuncName](ref, params)
this[hookFuncName](params)
}
},
async setCpuData (ref, params) {
if (!ref) {
return
}
async setCpuData (params) {
const chartData = []
const emptyData = []
try {
const res = await this.$store.dispatch('environment/getNodeCpuMetrics', { params })
console.log(res)
if (res.usage_user.length) {
this.isEmptyCpu = false
res.usage_user.forEach(item => {
Expand All @@ -245,9 +259,10 @@
emptyData.push(0)
})
this.cpuLine.series[0].data.splice(0, this.cpuLine.series[0].data.length, ...chartData)
ref.hideLoading()
this.$nextTick(() => {
this.cpuLine.series[0].data.splice(0, this.cpuLine.series[0].data.length, ...chartData)
this.cpuChartLoading = false
})
} else {
this.isEmptyCpu = true
}
Expand All @@ -261,10 +276,7 @@
})
}
},
async setMemData (ref, params) {
if (!ref) {
return
}
async setMemData (params) {
const chartData = []
const emptyData = []
Expand All @@ -278,8 +290,10 @@
})
emptyData.push(0)
})
this.memoryLine.series[0].data.splice(0, this.memoryLine.series[0].data.length, ...chartData)
ref.hideLoading()
this.$nextTick(() => {
this.memoryLine.series[0].data.splice(0, this.memoryLine.series[0].data.length, ...chartData)
this.memChartLoading = false
})
} else {
this.isEmptyMemory = true
}
Expand All @@ -293,11 +307,7 @@
})
}
},
async setNetworkData (ref, params) {
if (!ref) {
return
}
async setNetworkData (params) {
try {
const res = await this.$store.dispatch('environment/getNodeNetworkMetrics', { params })
if (JSON.stringify(res) === '{}') {
Expand Down Expand Up @@ -328,8 +338,11 @@
}
)
})
this.networkLine.series.splice(0, this.networkLine.series.length, ...readChartData || [])
this.$refs.networkLine1.hideLoading()
this.$nextTick(() => {
this.networkLine.series.splice(0, this.networkLine.series.length, ...readChartData || [])
this.netChartLoading = false
})
}
} catch (err) {
const message = err.message ? err.message : err
Expand All @@ -341,10 +354,7 @@
})
}
},
async setStorageData (ref, params) {
if (!ref) {
return
}
async setStorageData (params) {
try {
const res = await this.$store.dispatch('environment/getNodeDiskioMetrics', { params })
Expand Down Expand Up @@ -376,8 +386,10 @@
}
)
})
this.storageLine.series.splice(0, this.storageLine.series.length, ...readChartData || [])
this.$refs.storageLine1.hideLoading()
this.$nextTick(() => {
this.storageLine.series.splice(0, this.storageLine.series.length, ...readChartData || [])
this.ioChartLoading = false
})
}
} catch (err) {
const message = err.message ? err.message : err
Expand Down
9 changes: 0 additions & 9 deletions src/frontend/devops-gitci/.gitignore

This file was deleted.

6 changes: 3 additions & 3 deletions src/frontend/devops-nav/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@typescript-eslint/eslint-plugin": "^1.9.0",
"@typescript-eslint/parser": "^1.9.0",
"@vue/babel-preset-jsx": "^1.2.4",
"add-asset-html-webpack-plugin": "^3.2.0",
"add-asset-html-webpack-plugin": "^5.0.2",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^8.2.2",
"babel-plugin-transform-vue-jsx": "^4.0.1",
Expand Down Expand Up @@ -65,7 +65,7 @@
"dependencies": {
"@icon-cool/bk-icon-devops": "^0.1.13",
"@types/webpack-env": "^1.15.2",
"axios": "^0.21.1",
"axios": "^0.27.2",
"bk-magic-vue": "2.3.0",
"bluebird": "^3.5.1",
"js-cookie": "^3.0.1",
Expand All @@ -78,4 +78,4 @@
"vuex-class": "^0.3.0",
"vuex-typescript-interface": "^1.0.3"
}
}
}
Loading

0 comments on commit 74c0035

Please sign in to comment.