mirror of https://github.com/Lissy93/dashy.git
🔀 Merge branch 'master' of github.com:Lissy93/dashy into REFACTOR/2.1.2_unified-config
This commit is contained in:
commit
8588ba5772
|
@ -32,6 +32,7 @@
|
|||
- [Fixing Widget CORS Errors](#widget-cors-errors)
|
||||
- [Widget Shows Error Incorrectly](#widget-shows-error-incorrectly)
|
||||
- [Weather Forecast Widget 401](#weather-forecast-widget-401)
|
||||
- [Widget Displaying Inaccurate Data](#widget-displaying-inaccurate-data)
|
||||
- [Font Awesome Icons not Displaying](#font-awesome-icons-not-displaying)
|
||||
- [Copy to Clipboard not Working](#copy-to-clipboard-not-working)
|
||||
- [How to Reset Local Settings](#how-to-reset-local-settings)
|
||||
|
@ -447,7 +448,19 @@ Since the forecasting API requires an upgraded plan. ULPT: You can get a free, p
|
|||
|
||||
A future update will be pushed out, to use a free weather forecasting API.
|
||||
|
||||
See also: [#803](https://github.com/Lissy93/dashy/issues/803), [#789](https://github.com/Lissy93/dashy/issues/789), [#577](https://github.com/Lissy93/dashy/issues/577), [#621](https://github.com/Lissy93/dashy/issues/621), [#578](https://github.com/Lissy93/dashy/issues/578)
|
||||
See also: [#803](https://github.com/Lissy93/dashy/issues/803), [#789](https://github.com/Lissy93/dashy/issues/789), [#577](https://github.com/Lissy93/dashy/issues/577), [#621](https://github.com/Lissy93/dashy/issues/621), [#578](https://github.com/Lissy93/dashy/issues/578), [#806](https://github.com/Lissy93/dashy/discussions/806)
|
||||
|
||||
---
|
||||
|
||||
## Widget Displaying Inaccurate Data
|
||||
|
||||
If any widget is not displaying the data you expect, first confirm that your config is correct, then try manually calling the API endpoint.
|
||||
|
||||
If the raw API output is correct, yet the widget is rendering incorrect results, then it is likely a bug, and a ticket should be raised. You can start to debug the issue, by looking at the widget's code ([here](https://github.com/Lissy93/dashy/tree/master/src/components/Widgets)), and the browser console + networking tab.
|
||||
|
||||
If the API itself is returning incorrect, incomplete or inaccurate data then an issue needs to be raised **with the API provider** (not Dashy!). You can find the API provider included within the widget docs, or for a full list see the [Privacy Docs](https://github.com/Lissy93/dashy/blob/master/docs/privacy.md#widgets).
|
||||
|
||||
See also: [#807](https://github.com/Lissy93/dashy/issues/807) (re, domain monitor)
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -1838,7 +1838,7 @@ Display info from the Gluetun VPN container public IP API. This can show the IP
|
|||
|
||||
**Field** | **Type** | **Required** | **Description**
|
||||
--- | --- | --- | ---
|
||||
**`visibleFields`** | `string` | Required | A comma separated list of the fields you want visible in the widget. You can have any number of the following : `public_ip`, `region`, `country`, `city`, `location`, `organisation`, `postal_code`, `timezone`
|
||||
**`visibleFields`** | `string` | Required | A comma separated list of the fields you want visible in the widget. You can have any number of the following : `public_ip`, `region`, `country`, `city`, `location`, `organisation`, `postal_code`, `timezone`. Defaults to just `public_ip`
|
||||
**`host`** | `string` | Required | The url to the gluetun HTTP control server. E.g. `http://gluetun:8000`
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"simple-icons": "^6.9.0",
|
||||
"v-jsoneditor": "^1.4.5",
|
||||
"v-tooltip": "^2.1.3",
|
||||
"vue": "^2.6.14",
|
||||
"vue": "^2.7.0",
|
||||
"vue-i18n": "^8.27.2",
|
||||
"vue-js-modal": "^2.0.1",
|
||||
"vue-json-tree-view": "^2.1.6",
|
||||
|
@ -63,7 +63,7 @@
|
|||
"sass-loader": "^7.1.0",
|
||||
"vue-cli-plugin-yaml": "^1.0.2",
|
||||
"vue-svg-loader": "^0.16.0",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
"vue-template-compiler": "^2.7.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
|
|
|
@ -304,6 +304,16 @@
|
|||
"up": "Up",
|
||||
"down": "Down"
|
||||
},
|
||||
"gluetun-status": {
|
||||
"vpn-ip": "VPN IP",
|
||||
"country": "Country",
|
||||
"region": "Region",
|
||||
"city": "City",
|
||||
"post-code": "Post Code",
|
||||
"location": "Location",
|
||||
"timezone": "Timezone",
|
||||
"organization": "Organization"
|
||||
},
|
||||
"nextcloud": {
|
||||
"active": "active",
|
||||
"and": "and",
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
<template>
|
||||
<div class="vpn-ip-addr-wrapper">
|
||||
<div class="ip-row public-ip" v-if="public_ip">
|
||||
<span class="lbl">VPN IP</span>
|
||||
<span class="lbl">{{ $t('widgets.gluetun-status.vpn-ip') }}</span>
|
||||
<span class="val">{{ public_ip }}</span>
|
||||
</div>
|
||||
<div class="ip-row" v-if="country">
|
||||
<span class="lbl">Country</span>
|
||||
<span class="lbl">{{ $t('widgets.gluetun-status.country') }}</span>
|
||||
<span class="val">{{ country }}</span>
|
||||
</div>
|
||||
<div class="ip-row" v-if="region">
|
||||
<span class="lbl">Region</span>
|
||||
<span class="lbl">{{ $t('widgets.gluetun-status.region') }}</span>
|
||||
<span class="val">{{ region }}</span>
|
||||
</div>
|
||||
<div class="ip-row" v-if="city">
|
||||
<span class="lbl">City</span>
|
||||
<span class="lbl">{{ $t('widgets.gluetun-status.city') }}</span>
|
||||
<span class="val">{{ city }}</span>
|
||||
</div>
|
||||
<div class="ip-row" v-if="postal_code">
|
||||
<span class="lbl">Post Code</span>
|
||||
<span class="lbl">{{ $t('widgets.gluetun-status.post-code') }}</span>
|
||||
<span class="val">{{ postal_code }}</span>
|
||||
</div>
|
||||
<div class="ip-row" v-if="location">
|
||||
<span class="lbl">Location</span>
|
||||
<span class="lbl">{{ $t('widgets.gluetun-status.location') }}</span>
|
||||
<span class="val">{{ location }}</span>
|
||||
</div>
|
||||
<div class="ip-row" v-if="timezone">
|
||||
<span class="lbl">Timezone</span>
|
||||
<span class="lbl">{{ $t('widgets.gluetun-status.timezone') }}</span>
|
||||
<span class="val">{{ timezone }}</span>
|
||||
</div>
|
||||
<div class="ip-row" v-if="organization">
|
||||
<span class="lbl">Organization</span>
|
||||
<span class="lbl">{{ $t('widgets.gluetun-status.organization') }}</span>
|
||||
<span class="val">{{ organization }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -52,23 +52,32 @@ export default {
|
|||
timezone: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
visibleFields() {
|
||||
return this.options.visibleFields || 'public_ip';
|
||||
},
|
||||
hostname() {
|
||||
if (!this.options.hostname) this.error('`hostname` is required');
|
||||
return this.options.hostname;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/* Make GET request to Gluetun publicip API endpoint */
|
||||
fetchData() {
|
||||
this.makeRequest(this.options.hostname + "/v1/publicip/ip").then(this.processData);
|
||||
this.makeRequest(`${this.hostname}/v1/publicip/ip`).then(this.processData);
|
||||
},
|
||||
/* Assign data variables to the returned data */
|
||||
processData(ipInfo) {
|
||||
var fields = this.options.visibleFields.split(",");
|
||||
this.public_ip = fields.includes("public_ip") ? ipInfo.public_ip : null;
|
||||
this.country = fields.includes("country") ? ipInfo.country : null;
|
||||
this.region = fields.includes("region") ? ipInfo.region : null;
|
||||
this.city = fields.includes("city") ? ipInfo.city : null;
|
||||
this.location = fields.includes("location") ? ipInfo.location : null;
|
||||
this.organization = fields.includes("organization") ? ipInfo.organization : null;
|
||||
this.postal_code = fields.includes("postal_code") ? ipInfo.postal_code : null;
|
||||
this.timezone = fields.includes("timezone") ? ipInfo.timezone : null;
|
||||
}
|
||||
const fields = this.visibleFields.split(',');
|
||||
this.public_ip = fields.includes('public_ip') ? ipInfo.public_ip : null;
|
||||
this.country = fields.includes('country') ? ipInfo.country : null;
|
||||
this.region = fields.includes('region') ? ipInfo.region : null;
|
||||
this.city = fields.includes('city') ? ipInfo.city : null;
|
||||
this.location = fields.includes('location') ? ipInfo.location : null;
|
||||
this.organization = fields.includes('organization') ? ipInfo.organization : null;
|
||||
this.postal_code = fields.includes('postal_code') ? ipInfo.postal_code : null;
|
||||
this.timezone = fields.includes('timezone') ? ipInfo.timezone : null;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
57
yarn.lock
57
yarn.lock
|
@ -372,6 +372,11 @@
|
|||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef"
|
||||
integrity sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==
|
||||
|
||||
"@babel/parser@^7.18.4":
|
||||
version "7.18.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.9.tgz#f2dde0c682ccc264a9a8595efd030a5cc8fd2539"
|
||||
integrity sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg==
|
||||
|
||||
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.17.12":
|
||||
version "7.17.12"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.17.12.tgz#1dca338caaefca368639c9ffb095afbd4d420b1e"
|
||||
|
@ -1708,6 +1713,15 @@
|
|||
semver "^6.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
"@vue/compiler-sfc@2.7.8":
|
||||
version "2.7.8"
|
||||
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-2.7.8.tgz#731aadd6beafdb9c72fd8614ce189ac6cee87612"
|
||||
integrity sha512-2DK4YWKfgLnW9VDR9gnju1gcYRk3flKj8UNsms7fsRmFcg35slVTZEkqwBtX+wJBXaamFfn6NxSsZh3h12Ix/Q==
|
||||
dependencies:
|
||||
"@babel/parser" "^7.18.4"
|
||||
postcss "^8.4.14"
|
||||
source-map "^0.6.1"
|
||||
|
||||
"@vue/component-compiler-utils@^3.1.0", "@vue/component-compiler-utils@^3.1.2":
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@vue/component-compiler-utils/-/component-compiler-utils-3.3.0.tgz#f9f5fb53464b0c37b2c8d2f3fbfe44df60f61dc9"
|
||||
|
@ -3597,6 +3611,11 @@ csso@^4.0.2:
|
|||
dependencies:
|
||||
css-tree "^1.1.2"
|
||||
|
||||
csstype@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2"
|
||||
integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==
|
||||
|
||||
cyclist@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
|
||||
|
@ -5239,7 +5258,7 @@ hash.js@^1.0.0, hash.js@^1.0.3:
|
|||
inherits "^2.0.3"
|
||||
minimalistic-assert "^1.0.1"
|
||||
|
||||
he@1.2.x, he@^1.1.0:
|
||||
he@1.2.x, he@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
|
||||
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
|
||||
|
@ -6895,6 +6914,11 @@ nan@^2.12.1:
|
|||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916"
|
||||
integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==
|
||||
|
||||
nanoid@^3.3.4:
|
||||
version "3.3.4"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
|
||||
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
|
||||
|
||||
nanomatch@^1.2.9:
|
||||
version "1.2.13"
|
||||
resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
|
||||
|
@ -7967,6 +7991,15 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.27, postcss@^7.0.3
|
|||
picocolors "^0.2.1"
|
||||
source-map "^0.6.1"
|
||||
|
||||
postcss@^8.4.14:
|
||||
version "8.4.14"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf"
|
||||
integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
|
||||
dependencies:
|
||||
nanoid "^3.3.4"
|
||||
picocolors "^1.0.0"
|
||||
source-map-js "^1.0.2"
|
||||
|
||||
prelude-ls@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
|
||||
|
@ -8980,7 +9013,7 @@ source-list-map@^2.0.0:
|
|||
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
|
||||
integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==
|
||||
|
||||
"source-map-js@>=0.6.2 <2.0.0":
|
||||
"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
|
||||
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
|
||||
|
@ -10072,13 +10105,13 @@ vue-swatches@^2.1.1:
|
|||
resolved "https://registry.yarnpkg.com/vue-swatches/-/vue-swatches-2.1.1.tgz#26c467fb7648ff4ee0887aea36d1e03b15032b83"
|
||||
integrity sha512-YugkNbByxMz1dnx1nZyHSL3VSf/TnBH3/NQD+t8JKxPSqUmX87sVGBxjEaqH5IMraOLfVmU0pHCHl2BfXNypQg==
|
||||
|
||||
vue-template-compiler@^2.6.14:
|
||||
version "2.6.14"
|
||||
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.6.14.tgz#a2f0e7d985670d42c9c9ee0d044fed7690f4f763"
|
||||
integrity sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g==
|
||||
vue-template-compiler@^2.7.0:
|
||||
version "2.7.8"
|
||||
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.7.8.tgz#eadd54ed8fbff55b7deb07093a976c07f451a1dc"
|
||||
integrity sha512-eQqdcUpJKJpBRPDdxCNsqUoT0edNvdt1jFjtVnVS/LPPmr0BU2jWzXlrf6BVMeODtdLewB3j8j3WjNiB+V+giw==
|
||||
dependencies:
|
||||
de-indent "^1.0.2"
|
||||
he "^1.1.0"
|
||||
he "^1.2.0"
|
||||
|
||||
vue-template-es2015-compiler@^1.9.0:
|
||||
version "1.9.1"
|
||||
|
@ -10090,11 +10123,19 @@ vue-toasted@^1.1.28:
|
|||
resolved "https://registry.yarnpkg.com/vue-toasted/-/vue-toasted-1.1.28.tgz#dbabb83acc89f7a9e8765815e491d79f0dc65c26"
|
||||
integrity sha512-UUzr5LX51UbbiROSGZ49GOgSzFxaMHK6L00JV8fir/CYNJCpIIvNZ5YmS4Qc8Y2+Z/4VVYRpeQL2UO0G800Raw==
|
||||
|
||||
vue@^2.5.16, vue@^2.6.14:
|
||||
vue@^2.5.16:
|
||||
version "2.6.14"
|
||||
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.14.tgz#e51aa5250250d569a3fbad3a8a5a687d6036e235"
|
||||
integrity sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==
|
||||
|
||||
vue@^2.7.0:
|
||||
version "2.7.8"
|
||||
resolved "https://registry.yarnpkg.com/vue/-/vue-2.7.8.tgz#34e06553137611d8cecc4b0cd78b7a59f80b1299"
|
||||
integrity sha512-ncwlZx5qOcn754bCu5/tS/IWPhXHopfit79cx+uIlLMyt3vCMGcXai5yCG5y+I6cDmEj4ukRYyZail9FTQh7lQ==
|
||||
dependencies:
|
||||
"@vue/compiler-sfc" "2.7.8"
|
||||
csstype "^3.1.0"
|
||||
|
||||
vuex@^3.6.2:
|
||||
version "3.6.2"
|
||||
resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.6.2.tgz#236bc086a870c3ae79946f107f16de59d5895e71"
|
||||
|
|
Loading…
Reference in New Issue