Merge branch 'dev-3.7' of git.mesalab.cn:nezha/nezha-fronted into dev-3.7

This commit is contained in:
zyh
2023-04-06 17:48:45 +08:00
5 changed files with 80 additions and 46 deletions

View File

@@ -14340,7 +14340,7 @@
}, },
"node-sass": { "node-sass": {
"version": "4.14.1", "version": "4.14.1",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz", "resolved": "https://registry.npmmirror.com/node-sass/-/node-sass-4.14.1.tgz",
"integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==", "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -14851,7 +14851,7 @@
}, },
"pace-js": { "pace-js": {
"version": "1.2.4", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/pace-js/-/pace-js-1.2.4.tgz", "resolved": "https://registry.npmmirror.com/pace-js/-/pace-js-1.2.4.tgz",
"integrity": "sha512-qnCxtvUoY9yHId0AwMQCVmWltb698GiuVArmDbQzonTu9QCo0SgWUVnX9jB9mi+/FUSWvQULBPxUAAo/kLrh1A==" "integrity": "sha512-qnCxtvUoY9yHId0AwMQCVmWltb698GiuVArmDbQzonTu9QCo0SgWUVnX9jB9mi+/FUSWvQULBPxUAAo/kLrh1A=="
}, },
"pako": { "pako": {
@@ -17233,7 +17233,7 @@
}, },
"sass-loader": { "sass-loader": {
"version": "8.0.2", "version": "8.0.2",
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.2.tgz", "resolved": "https://registry.npmmirror.com/sass-loader/-/sass-loader-8.0.2.tgz",
"integrity": "sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==", "integrity": "sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -17659,7 +17659,7 @@
}, },
"showdown": { "showdown": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/showdown/-/showdown-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/showdown/-/showdown-2.1.0.tgz",
"integrity": "sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==", "integrity": "sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==",
"requires": { "requires": {
"commander": "^9.0.0" "commander": "^9.0.0"
@@ -17667,7 +17667,7 @@
"dependencies": { "dependencies": {
"commander": { "commander": {
"version": "9.5.0", "version": "9.5.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", "resolved": "https://registry.npmmirror.com/commander/-/commander-9.5.0.tgz",
"integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==" "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ=="
} }
} }
@@ -20727,7 +20727,7 @@
}, },
"webpack-bundle-analyzer": { "webpack-bundle-analyzer": {
"version": "2.13.1", "version": "2.13.1",
"resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.1.tgz", "resolved": "https://registry.npmmirror.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.1.tgz",
"integrity": "sha512-rwxyfecTAxoarCC9VlHlIpfQCmmJ/qWD5bpbjkof+7HrNhTNZIwZITxN6CdlYL2axGmwNUQ+tFgcSOiNXMf/sQ==", "integrity": "sha512-rwxyfecTAxoarCC9VlHlIpfQCmmJ/qWD5bpbjkof+7HrNhTNZIwZITxN6CdlYL2axGmwNUQ+tFgcSOiNXMf/sQ==",
"dev": true, "dev": true,
"requires": { "requires": {

View File

@@ -114,13 +114,14 @@
.integration-dialog-top{ .integration-dialog-top{
display: flex; display: flex;
align-items: center; align-items: center;
padding-bottom: 20px; padding-bottom: 21px;
margin: 0 30px; margin: 0 30px;
.integration-dialog-top-logo{ .integration-dialog-top-logo{
line-height: 0; line-height: 0;
img{ img{
width: 72px; width: 72px;
height: auto; height: auto;
padding-left: 10px;
} }
} }
.integration-dialog-introduce{ .integration-dialog-introduce{
@@ -160,7 +161,7 @@
.integration-tabs-nav{ .integration-tabs-nav{
margin:0 30px; margin:0 30px;
height: 42px; height: 42px;
box-sizing: border-box; box-sizing: content-box !important;
border-bottom: 1px solid $--border-color-light; border-bottom: 1px solid $--border-color-light;
display: flex; display: flex;
.integration-tabs-nav-item{ .integration-tabs-nav-item{
@@ -170,8 +171,10 @@
font-family: Roboto-Regular; font-family: Roboto-Regular;
font-size: 14px; font-size: 14px;
color: $--color-text-regular; color: $--color-text-regular;
font-weight: 400; font-weight: 600;
line-height: 42px; line-height: 42px;
padding-left: 7px;
padding-right: 7px;
position: relative; position: relative;
} }
.integration-tabs-nav-item.active{ .integration-tabs-nav-item.active{
@@ -203,14 +206,16 @@
font-weight: 600; font-weight: 600;
} }
.nz-btn{ .nz-btn{
width: 80px; width: 82px;
height: 30px; height: 32px;
line-height: 32px;
padding: 0 10px; padding: 0 10px;
border-radius: 4px; border-radius: 4px;
background-color: $--color-primary; background-color: $--color-primary;
border: none !important; border: none !important;
i{ i.nz-icon{
font-size: 16px; font-size: 14px;
padding-right: 6px;
} }
span{ span{
font-size: 14px; font-size: 14px;
@@ -346,46 +351,45 @@
} }
.integration-manual,.integration-automatic{ .integration-manual,.integration-automatic{
padding: 30px; padding: 30px;
padding-top: 15px; padding-top: 23px;
padding-right: 10px; padding-right: 10px;
margin-right: 20px; margin-right: 20px;
box-sizing: border-box; box-sizing: border-box;
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
.integration-install{ .integration-install{
font-size: 16px; font-size: 14px;
color: $--color-text-primary; color: $--color-text-primary;
font-weight: 600; font-weight: 400;
} }
.install-step{ .install-step{
padding-top: 15px; padding-top: 20px;
width: 100%; width: 100%;
display: flex; display: flex;
.step-num{ .step-num{
width: 20px; width: 20px;
height: 20px; height: 20px;
box-sizing: border-box; border-radius: 50%;
border: 1px solid $--border-color-light; margin-right: 8px;
border-radius: 2px; color: #FFFFFF;
background: $--color-primary;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
line-height: 20px; line-height: 20px;
color: $--color-text-primary;
margin-right: 12px;
} }
.step-right{ .step-right{
flex: 1; flex: 1;
h4{ h4{
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
margin-bottom: 12px; margin-bottom: 10px;
color: $--color-text-regular; color: $--color-text-primary;
font-weight: normal; font-weight: normal;
} }
p{ p{
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
margin-bottom: 8px; margin-bottom: 10px;
color: $--color-text-regular; color: $--color-text-regular;
display: flex; display: flex;
align-items: center; align-items: center;
@@ -394,31 +398,48 @@
width: 6px; width: 6px;
height: 6px; height: 6px;
border-radius: 50%; border-radius: 50%;
background: $--color-text-primary; background: $--color-text-regular;
margin-right: 6px; margin-right: 6px;
} }
&>span{
color: $--color-text-regular;
}
} }
.talon-select{ .talon-select{
color: $--color-text-regular; color: $--color-text-regular;
display: flex; display: flex;
align-items: center; align-items: center;
&>span{ &>span{
margin-right: 8px; margin-right: 10px;
} }
.el-select{ .el-select{
width: 220px; width: 310px;
.el-input__inner{
color: $--color-text-primary;
}
} }
.v-selectpage{ .v-selectpage{
width: 640px; width: 310px;
.sp-base.sp-input{ .sp-base.sp-input{
height: 32px; height: 32px;
&>span{
color: $--color-text-primary;
}
} }
.sp-icon-close{ .sp-icon-close{
display: none; display: none;
} }
} }
.nz-btn{ .nz-btn{
margin-left: 18px; width: 106px;
height: 32px;
margin-left: 10px;
line-height: 32px;
i.nz-icon{
font-size: 14px;
padding-right: 6px;
vertical-align: baseline;
}
} }
} }
.command-box{ .command-box{
@@ -426,14 +447,21 @@
width: 100%; width: 100%;
line-height: 32px; line-height: 32px;
.el-input__inner{ .el-input__inner{
color: $--color-text-primary; height: 36px !important;
line-height: 36px !important;
padding-left: 12px;
color: $--color-text-regular;
border-color: $--border-color-light; border-color: $--border-color-light;
background: $--select-page-hover-background-color !important;
cursor: text; cursor: text;
} }
.el-input__suffix{ .el-input__suffix{
top: 2px;
right: 13px;
.el-input__suffix-inner{ .el-input__suffix-inner{
cursor: pointer; cursor: pointer;
i{ i.nz-icon{
font-size: 14px;
color: $--color-text-regular; color: $--color-text-regular;
} }
} }

View File

@@ -33,7 +33,7 @@
<i slot="suffix" class="nz-icon nz-icon-override" @click="copyUrl(curlUrl)" :title="$t('overall.copyText')"></i> <i slot="suffix" class="nz-icon nz-icon-override" @click="copyUrl(curlUrl)" :title="$t('overall.copyText')"></i>
</el-input> </el-input>
</div> </div>
<h4 style="margin-top:15px">{{$t('integration.autoRemark')}}</h4> <h4 style="margin-top:10px">{{$t('integration.autoRemark')}}</h4>
</div> </div>
</div> </div>
</div> </div>
@@ -83,7 +83,9 @@ export default {
} }
}, },
created () { created () {
this.$nextTick(() => {
this.getAssetList() this.getAssetList()
})
this.token = localStorage.getItem('nz-token') this.token = localStorage.getItem('nz-token')
axios.get('/healthy').then(response => { axios.get('/healthy').then(response => {
const url = response.request.responseURL const url = response.request.responseURL
@@ -105,10 +107,10 @@ export default {
if (response.code === 200) { if (response.code === 200) {
this.assetList = response.data.list this.assetList = response.data.list
if (this.assetList && this.assetList.length > 0) { if (this.assetList && this.assetList.length > 0) {
setTimeout(() => { // setTimeout(() => {
this.assetId = String(this.assetList[0].id) this.assetId = String(this.assetList[0].id)
this.loadFinish = true this.loadFinish = true
}, 100) // }, 100)
} }
} }
}) })

View File

@@ -5,8 +5,8 @@
</ul> </ul>
<div class="integration-tabs-content"> <div class="integration-tabs-content">
<!-- internal --> <!-- internal -->
<manual v-if="tabId==='manual'"></manual>
<automatic v-if="tabId==='automatic'"></automatic> <automatic v-if="tabId==='automatic'"></automatic>
<manual v-if="tabId==='manual'"></manual>
<!-- module --> <!-- module -->
<configuration v-if="tabId==='configuration'" :configuration="detailsObj.configuration"></configuration> <configuration v-if="tabId==='configuration'" :configuration="detailsObj.configuration"></configuration>
<dashboard v-if="tabId==='dashboard'" :tempId="detailsObj.tempId"></dashboard> <dashboard v-if="tabId==='dashboard'" :tempId="detailsObj.tempId"></dashboard>
@@ -54,10 +54,10 @@ export default {
immediate: true, immediate: true,
handler (val) { handler (val) {
if (val === 'internal') { if (val === 'internal') {
this.tabId = 'manual' this.tabId = 'automatic'
this.tabs = [ this.tabs = [
{ id: 'manual', name: this.$t('integration.manualInstallation') }, { id: 'automatic', name: this.$t('integration.automaticInstallation') },
{ id: 'automatic', name: this.$t('integration.automaticInstallation') } { id: 'manual', name: this.$t('integration.manualInstallation') }
] ]
} else if (val === 'module') { } else if (val === 'module') {
this.tabId = 'configuration' this.tabId = 'configuration'

View File

@@ -13,7 +13,9 @@
<span class="panel-dropdown-label-txt" >{{item.label}}</span> <span class="panel-dropdown-label-txt" >{{item.label}}</span>
</el-option> </el-option>
</el-select> </el-select>
<button :class="{'nz-btn-disabled':newDownloadFlag}" :disabled="newDownloadFlag" class="nz-btn nz-btn-size-normal nz-btn-style-normal" type="button" @click="newDownload">{{$t('overall.download')}}</button> <button :class="{'nz-btn-disabled':newDownloadFlag}" :disabled="newDownloadFlag" class="nz-btn nz-btn-size-normal nz-btn-style-normal" type="button" @click="newDownload">
<i class="nz-icon nz-icon-download"></i>{{$t('overall.download')}}
</button>
</div> </div>
</div> </div>
</div> </div>
@@ -26,7 +28,7 @@
<i slot="suffix" class="nz-icon nz-icon-override" @click="copyUrl(newCommand)" :title="$t('overall.copyText')"></i> <i slot="suffix" class="nz-icon nz-icon-override" @click="copyUrl(newCommand)" :title="$t('overall.copyText')"></i>
</el-input> </el-input>
</div> </div>
<h4 style="margin-top:15px">{{$t('integration.installed')}}</h4> <h4 style="margin-top:20px">{{$t('integration.installed')}}</h4>
<div class="command-box"> <div class="command-box">
<el-input :disabled="true" :value="tokenCommand" size="small"> <el-input :disabled="true" :value="tokenCommand" size="small">
<i slot="suffix" class="nz-icon nz-icon-override" @click="copyUrl(tokenCommand)" :title="$t('overall.copyText')"></i> <i slot="suffix" class="nz-icon nz-icon-override" @click="copyUrl(tokenCommand)" :title="$t('overall.copyText')"></i>
@@ -54,7 +56,7 @@
</div> </div>
<!-- Upgrade installation --> <!-- Upgrade installation -->
<h3 class="integration-install" style="margin-top:3px;">{{$t('integration.upgradeInstallation')}}</h3> <h3 class="integration-install" style="margin-top:20px;">{{$t('integration.upgradeInstallation')}}</h3>
<div class="install-step"> <div class="install-step">
<div class="step-num">1</div> <div class="step-num">1</div>
<div class="step-right"> <div class="step-right">
@@ -66,7 +68,9 @@
<span class="panel-dropdown-label-txt" >{{item.label}}</span> <span class="panel-dropdown-label-txt" >{{item.label}}</span>
</el-option> </el-option>
</el-select> </el-select>
<button :class="{'nz-btn-disabled':upDownloadFlag}" :disabled="upDownloadFlag" class="nz-btn nz-btn-size-normal nz-btn-style-normal" type="button" @click="upDownload">{{$t('overall.download')}}</button> <button :class="{'nz-btn-disabled':upDownloadFlag}" :disabled="upDownloadFlag" class="nz-btn nz-btn-size-normal nz-btn-style-normal" type="button" @click="upDownload">
<i class="nz-icon nz-icon-download"></i>{{$t('overall.download')}}
</button>
</div> </div>
</div> </div>
</div> </div>