build: upgrade packages

This commit is contained in:
Qiuxia Fan 2022-02-11 15:09:47 +08:00
parent f5228e86fe
commit 1f280cc47c
24 changed files with 225 additions and 99 deletions

3
dist/LICENSE vendored
View File

@ -18,7 +18,7 @@ three-orbit-controls 82.1.0: https://github.com/mattdesl/three-orbit-controls MI
vue-demi 0.12.1: https://github.com/antfu/vue-demi MIT
vueuse/core 6.8.0: https://github.com/vueuse/vueuse MIT
vue/devtools-api 6.0.0-beta.20.1: https://github.com/vuejs/vue-devtools MIT
element-plus 1.2.0-beta.3: https://github.com/element-plus/element-plus MIT
element-plus 2.0.1: https://github.com/element-plus/element-plus MIT
vue-types 4.1.1: https://github.com/dwightjack/vue-types MIT
is-plain-object 5.0.0: https://github.com/jonschlinkert/is-plain-object MIT
vue-grid-layout 3.0.0-beta1: https://github.com/jbaysolutions/vue-grid-layout MIT
@ -31,3 +31,4 @@ zrender 5.2.1: https://github.com/ecomfe/zrender BSD-3-Clause License
tslib 2.3.0: https://github.com/Microsoft/tslib 0BSD License
d3-tip 0.9.1: https: //github.com/Caged/d3-tip MIT Licensee
d3 7.3.0: https://github.com/d3/d3 ISC License
ctrl/tinycolor 3.4.0: https: //github.com/scttcper/tinycolor MIT Licensee

21
dist/licenses/LICENSE-ctrl-tinycolor vendored Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-present Evan You
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

81
package-lock.json generated
View File

@ -12,7 +12,7 @@
"d3": "^7.3.0",
"d3-tip": "^0.9.1",
"echarts": "^5.2.2",
"element-plus": "^1.2.0-beta.3",
"element-plus": "^2.0.1",
"pinia": "^2.0.5",
"three": "^0.131.3",
"three-orbit-controls": "^82.1.0",
@ -1702,6 +1702,14 @@
"node": ">=0.1.95"
}
},
"node_modules/@ctrl/tinycolor": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.4.0.tgz",
"integrity": "sha512-JZButFdZ1+/xAfpguQHoabIXkcqRRKpMrWKBkpEZZyxfY9C1DpADFB8PEqGSTeFr135SaTRfKqGKx5xSCLI7ZQ==",
"engines": {
"node": ">=10"
}
},
"node_modules/@cypress/listr-verbose-renderer": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@cypress/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz",
@ -1792,9 +1800,9 @@
}
},
"node_modules/@element-plus/icons-vue": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-0.2.4.tgz",
"integrity": "sha512-RsJNyL58rwxtsjeMy34o8txkL6UlME1stWsUlRpTac6UE9Bx9gdJvnDXbIKhOJqBLX17fBjmposdrn6VTqim2w==",
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-0.2.7.tgz",
"integrity": "sha512-S8kDbfVaWkQvbUYQE1ui448tzaHfUvyESCep9J6uPRlViyQPXjdIfwLBhV6AmQSOfFS8rL+xehJGhvzPXLrSBg==",
"peerDependencies": {
"vue": "^3.2.0"
}
@ -5278,11 +5286,11 @@
"dev": true
},
"node_modules/@vueuse/core": {
"version": "7.5.3",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-7.5.3.tgz",
"integrity": "sha512-D9j5ymHFMFRXQqCp0yZJkf/bvBGiz0MrKUa364p+L8dMyd5zyq2K1JmHyvoBd4xbTFRfmQ1h878u6YE5LCkDVQ==",
"version": "7.6.1",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-7.6.1.tgz",
"integrity": "sha512-492y7R9HRu6TXzcGBMVG5qg5o9CHjrWLfOHh+TEknJeLe3LIYHsIBi1IlUN5s/yP3OHlBynjrzMMUm4gEyBmQg==",
"dependencies": {
"@vueuse/shared": "7.5.3",
"@vueuse/shared": "7.6.1",
"vue-demi": "*"
},
"funding": {
@ -5302,9 +5310,9 @@
}
},
"node_modules/@vueuse/core/node_modules/@vueuse/shared": {
"version": "7.5.3",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-7.5.3.tgz",
"integrity": "sha512-BJ71cxHN5VByW1S58Gl85NFJaQu93F7Vs7K/MuAKsIIuHm9PBbkR5Vxkg9ko9cBdiKVt+FNoo13BhdbA+Vwycg==",
"version": "7.6.1",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-7.6.1.tgz",
"integrity": "sha512-VhURBjuyELYLW94TLqwyM+tUZ0uyWAOjp8zDnJts5wwyHZlGt/yabLbuEl70cKmt0zR9psVyAyHC+LTgRrA1Zw==",
"dependencies": {
"vue-demi": "*"
},
@ -10315,13 +10323,14 @@
}
},
"node_modules/element-plus": {
"version": "1.2.0-beta.6",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-1.2.0-beta.6.tgz",
"integrity": "sha512-8EdSIR/5/FHcSB8w1diAh+gJMHgxIvxuZoayY99k6taAR1QyEFHuPTgFccZLopJ1+iP4UEsZFz49l57qS08Utw==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.0.1.tgz",
"integrity": "sha512-Cdx3JhbMNGwVsU12DUewIltJ1hUYVSgx2iBB8AuNzzOxAqcxSA9e7p2lfNp8oCBQeh4ThRSaOkdLnJyO4mS3qQ==",
"dependencies": {
"@element-plus/icons-vue": "^0.2.2",
"@popperjs/core": "^2.10.2",
"@vueuse/core": "^7.0.0",
"@ctrl/tinycolor": "^3.4.0",
"@element-plus/icons-vue": "^0.2.6",
"@popperjs/core": "^2.11.2",
"@vueuse/core": "^7.5.5",
"async-validator": "^4.0.7",
"dayjs": "^1.10.7",
"lodash": "^4.17.21",
@ -29882,6 +29891,11 @@
"minimist": "^1.2.0"
}
},
"@ctrl/tinycolor": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.4.0.tgz",
"integrity": "sha512-JZButFdZ1+/xAfpguQHoabIXkcqRRKpMrWKBkpEZZyxfY9C1DpADFB8PEqGSTeFr135SaTRfKqGKx5xSCLI7ZQ=="
},
"@cypress/listr-verbose-renderer": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/@cypress/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz",
@ -29958,9 +29972,9 @@
}
},
"@element-plus/icons-vue": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-0.2.4.tgz",
"integrity": "sha512-RsJNyL58rwxtsjeMy34o8txkL6UlME1stWsUlRpTac6UE9Bx9gdJvnDXbIKhOJqBLX17fBjmposdrn6VTqim2w==",
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-0.2.7.tgz",
"integrity": "sha512-S8kDbfVaWkQvbUYQE1ui448tzaHfUvyESCep9J6uPRlViyQPXjdIfwLBhV6AmQSOfFS8rL+xehJGhvzPXLrSBg==",
"requires": {}
},
"@hapi/address": {
@ -32826,18 +32840,18 @@
"dev": true
},
"@vueuse/core": {
"version": "7.5.3",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-7.5.3.tgz",
"integrity": "sha512-D9j5ymHFMFRXQqCp0yZJkf/bvBGiz0MrKUa364p+L8dMyd5zyq2K1JmHyvoBd4xbTFRfmQ1h878u6YE5LCkDVQ==",
"version": "7.6.1",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-7.6.1.tgz",
"integrity": "sha512-492y7R9HRu6TXzcGBMVG5qg5o9CHjrWLfOHh+TEknJeLe3LIYHsIBi1IlUN5s/yP3OHlBynjrzMMUm4gEyBmQg==",
"requires": {
"@vueuse/shared": "7.5.3",
"@vueuse/shared": "7.6.1",
"vue-demi": "*"
},
"dependencies": {
"@vueuse/shared": {
"version": "7.5.3",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-7.5.3.tgz",
"integrity": "sha512-BJ71cxHN5VByW1S58Gl85NFJaQu93F7Vs7K/MuAKsIIuHm9PBbkR5Vxkg9ko9cBdiKVt+FNoo13BhdbA+Vwycg==",
"version": "7.6.1",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-7.6.1.tgz",
"integrity": "sha512-VhURBjuyELYLW94TLqwyM+tUZ0uyWAOjp8zDnJts5wwyHZlGt/yabLbuEl70cKmt0zR9psVyAyHC+LTgRrA1Zw==",
"requires": {
"vue-demi": "*"
}
@ -36863,13 +36877,14 @@
"dev": true
},
"element-plus": {
"version": "1.2.0-beta.6",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-1.2.0-beta.6.tgz",
"integrity": "sha512-8EdSIR/5/FHcSB8w1diAh+gJMHgxIvxuZoayY99k6taAR1QyEFHuPTgFccZLopJ1+iP4UEsZFz49l57qS08Utw==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.0.1.tgz",
"integrity": "sha512-Cdx3JhbMNGwVsU12DUewIltJ1hUYVSgx2iBB8AuNzzOxAqcxSA9e7p2lfNp8oCBQeh4ThRSaOkdLnJyO4mS3qQ==",
"requires": {
"@element-plus/icons-vue": "^0.2.2",
"@popperjs/core": "^2.10.2",
"@vueuse/core": "^7.0.0",
"@ctrl/tinycolor": "^3.4.0",
"@element-plus/icons-vue": "^0.2.6",
"@popperjs/core": "^2.11.2",
"@vueuse/core": "^7.5.5",
"async-validator": "^4.0.7",
"dayjs": "^1.10.7",
"lodash": "^4.17.21",

View File

@ -14,7 +14,7 @@
"d3": "^7.3.0",
"d3-tip": "^0.9.1",
"echarts": "^5.2.2",
"element-plus": "^1.2.0-beta.3",
"element-plus": "^2.0.1",
"pinia": "^2.0.5",
"three": "^0.131.3",
"three-orbit-controls": "^82.1.0",

View File

@ -13,6 +13,5 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<title>all_inbox</title>
<path d="M15 15.984h6v3q0 0.797-0.609 1.406t-1.406 0.609h-13.969q-0.797 0-1.406-0.609t-0.609-1.406v-3h6q0 1.219 0.891 2.109t2.109 0.891 2.109-0.891 0.891-2.109zM18.984 9v-3.984h-13.969v3.984h3.984q0 1.219 0.891 2.109t2.109 0.891 2.109-0.891 0.891-2.109h3.984zM18.984 3q0.797 0 1.406 0.609t0.609 1.406v6.984q0 0.797-0.609 1.406t-1.406 0.609h-13.969q-0.797 0-1.406-0.609t-0.609-1.406v-6.984q0-0.797 0.609-1.406t1.406-0.609h13.969z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -13,4 +13,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>icn/chevron-left</title><path d="M7.414 7.989l2.295 2.306a1 1 0 1 1-1.418 1.41l-3-3.015a1 1 0 0 1 .004-1.414l3-2.985a1 1 0 1 1 1.41 1.418l-2.29 2.28z" id="a"/></svg>
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M7.414 7.989l2.295 2.306a1 1 0 1 1-1.418 1.41l-3-3.015a1 1 0 0 1 .004-1.414l3-2.985a1 1 0 1 1 1.41 1.418l-2.29 2.28z" id="a"/></svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -13,6 +13,5 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<title>device_hub</title>
<path d="M17.016 15.984h3.984v5.016h-5.016v-3.047l-3.984-4.219-3.984 4.219v3.047h-5.016v-5.016h3.984l4.031-3.984v-3.188q-0.891-0.328-1.453-1.078t-0.563-1.734q0-1.219 0.891-2.109t2.109-0.891 2.109 0.891 0.891 2.109q0 0.984-0.563 1.734t-1.453 1.078v3.188z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -13,6 +13,5 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<title>folder_open</title>
<path d="M20.016 18v-9.984h-16.031v9.984h16.031zM20.016 6q0.797 0 1.383 0.609t0.586 1.406v9.984q0 0.797-0.586 1.406t-1.383 0.609h-16.031q-0.797 0-1.383-0.609t-0.586-1.406v-12q0-0.797 0.586-1.406t1.383-0.609h6l2.016 2.016h8.016z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -13,6 +13,5 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<title>insert_image</title>
<path d="M8.484 13.5l-3.469 4.5h13.969l-4.5-6-3.469 4.5zM21 18.984q0 0.797-0.609 1.406t-1.406 0.609h-13.969q-0.797 0-1.406-0.609t-0.609-1.406v-13.969q0-0.797 0.609-1.406t1.406-0.609h13.969q0.797 0 1.406 0.609t0.609 1.406v13.969z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -13,6 +13,5 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<title>playlist_add</title>
<path d="M2.016 15.984v-1.969h7.969v1.969h-7.969zM18 14.016h3.984v1.969h-3.984v4.031h-2.016v-4.031h-3.984v-1.969h3.984v-4.031h2.016v4.031zM14.016 6v2.016h-12v-2.016h12zM14.016 9.984v2.016h-12v-2.016h12z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -13,6 +13,5 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<title>save</title>
<path d="M15 9v-3.984h-9.984v3.984h9.984zM12 18.984q1.219 0 2.109-0.891t0.891-2.109-0.891-2.109-2.109-0.891-2.109 0.891-0.891 2.109 0.891 2.109 2.109 0.891zM17.016 3l3.984 3.984v12q0 0.797-0.609 1.406t-1.406 0.609h-13.969q-0.844 0-1.43-0.586t-0.586-1.43v-13.969q0-0.844 0.586-1.43t1.43-0.586h12z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -13,6 +13,5 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<title>save_alt</title>
<path d="M12.984 12.656l2.625-2.578 1.406 1.406-5.016 5.016-5.016-5.016 1.406-1.406 2.625 2.578v-9.656h1.969v9.656zM18.984 12h2.016v6.984q0 0.797-0.609 1.406t-1.406 0.609h-13.969q-0.797 0-1.406-0.609t-0.609-1.406v-6.984h2.016v6.984h13.969v-6.984z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -13,6 +13,5 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<title>settings</title>
<path d="M12 15.516q1.453 0 2.484-1.031t1.031-2.484-1.031-2.484-2.484-1.031-2.484 1.031-1.031 2.484 1.031 2.484 2.484 1.031zM19.453 12.984l2.109 1.641q0.328 0.234 0.094 0.656l-2.016 3.469q-0.188 0.328-0.609 0.188l-2.484-0.984q-0.984 0.703-1.688 0.984l-0.375 2.625q-0.094 0.422-0.469 0.422h-4.031q-0.375 0-0.469-0.422l-0.375-2.625q-0.891-0.375-1.688-0.984l-2.484 0.984q-0.422 0.141-0.609-0.188l-2.016-3.469q-0.234-0.422 0.094-0.656l2.109-1.641q-0.047-0.328-0.047-0.984t0.047-0.984l-2.109-1.641q-0.328-0.234-0.094-0.656l2.016-3.469q0.188-0.328 0.609-0.188l2.484 0.984q0.984-0.703 1.688-0.984l0.375-2.625q0.094-0.422 0.469-0.422h4.031q0.375 0 0.469 0.422l0.375 2.625q0.891 0.375 1.688 0.984l2.484-0.984q0.422-0.141 0.609 0.188l2.016 3.469q0.234 0.422-0.094 0.656l-2.109 1.641q0.047 0.328 0.047 0.984t-0.047 0.984z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -77,7 +77,7 @@ watch(
}
);
</script>
<style lang="scss" scope>
<style lang="scss" scoped>
.icon {
width: 16px;
height: 16px;

View File

@ -140,6 +140,7 @@
}
}
.topology-dialog {
background-color: #333840 !important;
.dark-dialog {
background-color: #333840;
color: #ddd;
}

View File

@ -30,7 +30,7 @@ limitations under the License. -->
:destroy-on-close="true"
fullscreen
@closed="dashboardStore.setTopology(false)"
custom-class="topology-dialog"
custom-class="dark-dialog"
>
<Graph />
</el-dialog>

View File

@ -20,6 +20,7 @@ limitations under the License. -->
placeholder="Please input dashboard name"
@change="changeDashboard"
class="selectors"
size="small"
/>
</div>
<div>{{ t("metrics") }}</div>
@ -31,7 +32,7 @@ limitations under the License. -->
<Selector
:value="metric"
:options="states.metricList"
size="mini"
size="small"
placeholder="Select a metric"
@change="changeMetrics(index, $event)"
class="selectors"
@ -39,7 +40,7 @@ limitations under the License. -->
<Selector
:value="states.metricTypes[index]"
:options="states.metricTypeList[index]"
size="mini"
size="small"
:disabled="
dashboardStore.selectedGrid.graph.type && !states.isTable && index !== 0
"

View File

@ -18,7 +18,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="state.unit"
size="mini"
size="small"
placeholder="Please input Unit"
@change="changeStandardOpt({ unit: state.unit })"
/>
@ -28,7 +28,7 @@ limitations under the License. -->
<Selector
:value="state.sortOrder"
:options="SortOrder"
size="mini"
size="small"
placeholder="Select a sort order"
class="selector"
@change="changeStandardOpt({ sortOrder: state.sortOrder })"
@ -39,7 +39,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="state.max"
size="mini"
size="small"
placeholder="auto"
@change="changeStandardOpt({ max: state.max })"
/>
@ -49,7 +49,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="state.min"
size="mini"
size="small"
placeholder="auto"
@change="changeStandardOpt({ min: state.min })"
/>
@ -59,7 +59,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="state.plus"
size="mini"
size="small"
placeholder="none"
@change="changeStandardOpt({ plus: state.plus })"
/>
@ -69,7 +69,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="state.minus"
size="mini"
size="small"
placeholder="none"
@change="changeStandardOpt({ minus: state.minus })"
/>
@ -79,7 +79,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="state.multiply"
size="mini"
size="small"
placeholder="none"
@change="changeStandardOpt({ multiply: state.multiply })"
/>
@ -89,7 +89,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="state.divide"
size="mini"
size="small"
placeholder="none"
@change="changeStandardOpt({ divide: state.divide })"
/>
@ -99,7 +99,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="state.milliseconds"
size="mini"
size="small"
placeholder="none"
@change="changeStandardOpt({ milliseconds: state.milliseconds })"
/>
@ -109,7 +109,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="state.seconds"
size="mini"
size="small"
placeholder="none"
@change="changeStandardOpt({ seconds: state.seconds })"
/>

View File

@ -18,7 +18,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="title"
size="mini"
size="small"
placeholder="Please input title"
@change="updateWidgetConfig({ title })"
/>
@ -28,7 +28,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="tips"
size="mini"
size="small"
placeholder="Please input tips"
@change="updateWidgetConfig({ tips })"
/>

View File

@ -27,7 +27,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="tableHeaderCol1"
size="mini"
size="small"
placeholder="none"
@change="updateConfig({ tableHeaderCol1 })"
/>
@ -37,7 +37,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="tableHeaderCol2"
size="mini"
size="small"
placeholder="none"
@change="updateConfig({ tableHeaderCol2 })"
/>

View File

@ -18,7 +18,7 @@ limitations under the License. -->
<el-input
class="input"
v-model="topN"
size="mini"
size="small"
placeholder="none"
type="number"
:min="1"

View File

@ -20,7 +20,7 @@ limitations under the License. -->
<Selector
v-model="states.currentService"
:options="selectorStore.services"
size="mini"
size="small"
placeholder="Select a service"
@change="changeService"
class="selectors"
@ -37,7 +37,7 @@ limitations under the License. -->
<Selector
v-model="states.currentPod"
:options="selectorStore.pods"
size="mini"
size="small"
placeholder="Select a data"
@change="changePods"
class="selectorPod"
@ -48,7 +48,7 @@ limitations under the License. -->
<Selector
v-model="selectorStore.currentDestService"
:options="selectorStore.services"
size="mini"
size="small"
placeholder="Select a service"
@change="changeService"
class="selectors"
@ -59,7 +59,7 @@ limitations under the License. -->
<Selector
v-model="states.currentPod"
:options="selectorStore.pods"
size="mini"
size="small"
placeholder="Select a data"
@change="changePods"
class="selectors"
@ -68,17 +68,15 @@ limitations under the License. -->
</div>
</div>
<div class="tool-icons">
<el-tooltip
<span
class="icon-btn"
@click="clickIcons(t)"
v-for="(t, index) in ToolIcons"
:key="index"
class="item"
:content="t.content"
placement="top"
:title="t.content"
>
<span class="icon-btn" @click="clickIcons(t)">
<Icon size="sm" :iconName="t.name" />
</span>
</el-tooltip>
<Icon size="sm" :iconName="t.name" />
</span>
</div>
</div>
</template>
@ -261,6 +259,10 @@ watch(
padding: 4px 2px;
}
.tool-icons {
margin-top: 2px;
}
.icon-btn {
display: inline-block;
padding: 0 5px;
@ -271,9 +273,6 @@ watch(
cursor: pointer;
background-color: #eee;
color: #666;
}
.item {
font-size: 12px;
}

View File

@ -13,7 +13,22 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<template>
<div ref="chart" class="micro-topo-chart"></div>
<div
ref="chart"
class="micro-topo-chart"
v-loading="loading"
:style="`height: ${height}`"
>
<div class="setting" v-show="showSetting">
<Settings />
</div>
<Icon
@click="setConfig"
class="switch-icon"
size="middle"
iconName="format_indent_decrease"
/>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted, onBeforeUnmount, watch } from "vue";
@ -31,6 +46,8 @@ import { useTopologyStore } from "@/store/modules/topology";
import { useDashboardStore } from "@/store/modules/dashboard";
import { EntityType } from "../../data";
import router from "@/router";
import { ElMessage } from "element-plus";
import Settings from "./Settings.vue";
/*global Nullable */
const { t } = useI18n();
@ -38,7 +55,8 @@ const topologyStore = useTopologyStore();
const dashboardStore = useDashboardStore();
const height = ref<number>(document.body.clientHeight - 90);
const width = ref<number>(document.body.clientWidth - 40);
const simulation = ref<any>("");
const loading = ref<boolean>(false);
const simulation = ref<any>(null);
const svg = ref<Nullable<any>>(null);
const chart = ref<Nullable<HTMLDivElement>>(null);
const tip = ref<any>(null);
@ -49,9 +67,15 @@ const anchor = ref<any>(null);
const arrow = ref<any>(null);
const tools = ref<any>(null);
const legend = ref<any>(null);
const showSetting = ref<boolean>(false);
onMounted(async () => {
await getTopology();
loading.value = true;
const resp = await getTopology();
loading.value = false;
if (resp && resp.errors) {
ElMessage.error(resp.errors);
}
window.addEventListener("resize", resize);
svg.value = d3
.select(chart.value)
@ -90,20 +114,25 @@ onMounted(async () => {
});
});
async function getTopology() {
let resp;
switch (dashboardStore.entity) {
case EntityType[0].value:
await topologyStore.getServiceTopology();
resp = await topologyStore.getServiceTopology();
break;
case EntityType[1].value:
await topologyStore.getGlobalTopology();
resp = await topologyStore.getGlobalTopology();
break;
case EntityType[2].value:
await topologyStore.getEndpointTopology();
resp = await topologyStore.getEndpointTopology();
break;
case EntityType[3].value:
await topologyStore.getInstanceTopology();
resp = await topologyStore.getInstanceTopology();
break;
}
return resp;
}
function setConfig() {
showSetting.value = !showSetting.value;
}
function resize() {
height.value = document.body.clientHeight - 90;
@ -151,7 +180,7 @@ function dragended(d: any) {
simulation.value.alphaTarget(0);
}
}
function handleNodeClick(d: any) {
function handleNodeClick(d: Node) {
topologyStore.setNode(d);
topologyStore.setLink({});
}
@ -164,7 +193,7 @@ function handleLinkClick(event: any, d: Call) {
}
function update() {
// node element
node.value = node.value.data(topologyStore.nodes, (d: any) => d.id);
node.value = node.value.data(topologyStore.nodes, (d: Node) => d.id);
node.value.exit().remove();
node.value = nodeElement(
d3,
@ -247,17 +276,32 @@ watch(
);
</script>
<style lang="scss">
@keyframes topo-dash {
from {
stroke-dashoffset: 20;
}
to {
stroke-dashoffset: 0;
}
}
.micro-topo-chart {
position: relative;
.setting {
position: absolute;
top: 20px;
right: 20px;
width: 350px;
height: 700px;
background-color: #2b3037;
overflow: auto;
padding: 10px;
border-radius: 4px;
color: #ddd;
transition: all 0.5ms linear;
}
.switch-icon {
position: absolute;
top: 22px;
right: 0;
color: #aaa;
cursor: pointer;
transition: all 0.5ms linear;
}
.topo-svg {
display: block;
width: 100%;
@ -331,4 +375,13 @@ watch(
top: 100%;
left: 0;
}
@keyframes topo-dash {
from {
stroke-dashoffset: 20;
}
to {
stroke-dashoffset: 0;
}
}
</style>

View File

@ -0,0 +1,43 @@
<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<template>
<div class="link-settings">
<div>{{ t("dashboards") }}</div>
<el-input
v-model="states.linkDashboard"
placeholder="Please input a dashboard name for calls"
@change="changeLinkDashboard"
size="small"
class="inputs"
/>
</div>
</template>
<script lang="ts" setup>
import { reactive } from "vue";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
const states = reactive<{ linkDashboard: string }>({
linkDashboard: "",
});
function changeLinkDashboard() {
console.log(states.linkDashboard);
}
</script>
<style lang="scss" scoped>
.inputs {
margin-top: 10px;
}
</style>