diff --git a/source/app/mocks/api/axios/get/nightscout.mjs b/source/app/mocks/api/axios/get/nightscout.mjs index 560cdb64..d2e6fed6 100644 --- a/source/app/mocks/api/axios/get/nightscout.mjs +++ b/source/app/mocks/api/axios/get/nightscout.mjs @@ -5,7 +5,6 @@ export default function({faker, url}) { //Get Nightscout Data console.debug(`metrics/compute/mocks > mocking nightscout api result > ${url}`) const lastInterval = Math.floor(new Date() / 300000) * 300000 - const directionArray = ["SingleUp", "DoubleUp", "FortyFiveUp", "Flat", "FortyFiveDown", "SingleDown", "DoubleDown"] return ({ status:200, data:new Array(12).fill(null).map(_ => ({ @@ -15,7 +14,7 @@ export default function({faker, url}) { dateString:new Date(lastInterval).toISOString(), sgv:faker.random.number({min:40, max:400}), delta:faker.random.number({min:-10, max:10}), - direction:directionArray[Math.floor(Math.random() * directionArray.length)], + direction:faker.random.arrayElement(["SingleUp", "DoubleUp", "FortyFiveUp", "Flat", "FortyFiveDown", "SingleDown", "DoubleDown"]), type:"sgv", filtered:0, unfiltered:0, diff --git a/source/app/web/statics/app.js b/source/app/web/statics/app.js index d77b51c6..28ba9462 100644 --- a/source/app/web/statics/app.js +++ b/source/app/web/statics/app.js @@ -86,6 +86,7 @@ descriptions:{ classic:"Classic template", terminal:"Terminal template", + markdown:"(hidden)", repository:"(hidden)", }, }, @@ -97,6 +98,10 @@ }, //Computed data computed:{ + //Unusable plugins + unusable() { + return this.plugins.list.filter(({name}) => this.plugins.enabled[name]).filter(({enabled}) => !enabled).map(({name}) => name) + }, //User's avatar avatar() { return this.generated.content ? `https://github.com/${this.user}.png` : null diff --git a/source/app/web/statics/app.placeholder.js b/source/app/web/statics/app.placeholder.js index c4bdfc22..a9cbddf0 100644 --- a/source/app/web/statics/app.placeholder.js +++ b/source/app/web/statics/app.placeholder.js @@ -332,11 +332,15 @@ ...(set.plugins.enabled.nightscout ? ({ nightscout:{ url: options["nightscout.url"] != null && options["nightscout.url"] != "https://example.herokuapp.com" ? options["nightscout.url"]: "https://testapp.herokuapp.com/", - datapoints: faker.random.number({min: 8, max: 12}), - lowalert: faker.random.number({min: 60, max: 90}), - highalert: faker.random.number({min: 150, max: 200}), - urgentlowalert: faker.random.number({min: 40, max: 59}), - urgenthighalert: faker.random.number({min: 201, max: 300}) + data:new Array(12).fill(null).map(_ => ({ + timeUTCHumanReadable:`${new Date().getUTCHours()}:${new Date().getUTCMinutes()}`, + color:faker.random.arrayElement(["#9be9a8", "#40c463", "#30a14e", "#216e39"]), + sgv:faker.random.number({min:40, max:400}), + delta:faker.random.number({min:-10, max:10}), + direction:faker.random.arrayElement(["SingleUp", "DoubleUp", "FortyFiveUp", "Flat", "FortyFiveDown", "SingleDown", "DoubleDown"]), + alert:faker.random.arrayElement(["Normal", "Urgent High", "Urgent Low", "High", "Low"]), + arrowHumanReadable:faker.random.arrayElement(["↑↑", "↑", "↗", "→", "↘", "↓", "↓↓"]), + })), } }) : null), //Pagespeed diff --git a/source/app/web/statics/index.html b/source/app/web/statics/index.html index 2fc9dfa7..4aaef4fa 100644 --- a/source/app/web/statics/index.html +++ b/source/app/web/statics/index.html @@ -28,11 +28,11 @@ Overview -
+
Action code
-
+
Markdown code
@@ -46,10 +46,13 @@
- {{ requests.remaining }} GitHub requests remaining +
+ Metrics cannot be generated because the following plugins are not available on this web instance: {{ unusable.join(", ") }} +
🖼️ Template @@ -70,7 +73,7 @@
🧩 Additional plugins
diff --git a/source/app/web/statics/style.css b/source/app/web/statics/style.css index 553f82a2..31090a73 100644 --- a/source/app/web/statics/style.css +++ b/source/app/web/statics/style.css @@ -117,8 +117,7 @@ body { } .configuration .not-available { - cursor: not-allowed; - opacity: .5; + color: var(--color-text-secondary); } .option { @@ -252,6 +251,17 @@ body { border-radius: 6px; } +/* Warning */ + .warning { + padding: .5rem .75rem; + background-image: linear-gradient(var(--color-alert-warn-bg),var(--color-alert-warn-bg)); + color: var(--color-alert-warn-text); + border: 1px solid var(--color-alert-warn-border); + border-radius: 6px; + font-size: .8rem; + margin-top: .25rem; + } + /* Footer */ main > footer { margin: 1rem 0; diff --git a/source/plugins/achievements/metadata.yml b/source/plugins/achievements/metadata.yml index 0d01db13..64b4d7d0 100644 --- a/source/plugins/achievements/metadata.yml +++ b/source/plugins/achievements/metadata.yml @@ -44,6 +44,7 @@ inputs: type: array format: comma-separated default: "" + example: octonaut, automater, explorer # List of unlocked achievements to display # Names must be given in lower case, without rank adjective @@ -52,4 +53,5 @@ inputs: description: Unlocked achievements to display type: array format: comma-separated - default: "" \ No newline at end of file + default: "" + example: octonaut, automater, explorer \ No newline at end of file diff --git a/source/plugins/contributors/metadata.yml b/source/plugins/contributors/metadata.yml index 16333c8e..2a05be97 100644 --- a/source/plugins/contributors/metadata.yml +++ b/source/plugins/contributors/metadata.yml @@ -17,6 +17,7 @@ inputs: description: Base reference type: string default: "" + example: commit, tag or branch # Head reference (commit, tag, branch, etc.) plugin_contributors_head: diff --git a/source/plugins/people/metadata.yml b/source/plugins/people/metadata.yml index 0da16dd5..70d440a0 100644 --- a/source/plugins/people/metadata.yml +++ b/source/plugins/people/metadata.yml @@ -57,6 +57,7 @@ inputs: type: array format: comma-separated default: "" + example: octocat, hubot # Add specified users to GitHub sponsors ("sponsors" must be specified in "plugin_people_types") # This is useful to list sponsors from unsupported GitHub sponsors sources @@ -65,6 +66,7 @@ inputs: type: array format: comma-separated default: "" + example: octocat, hubot # Use GitHub identicons instead of users' avatar (for privacy purposes) plugin_people_identicons: diff --git a/source/plugins/rss/metadata.yml b/source/plugins/rss/metadata.yml index 2e058cd6..5ed866a0 100644 --- a/source/plugins/rss/metadata.yml +++ b/source/plugins/rss/metadata.yml @@ -19,6 +19,7 @@ inputs: description: RSS feed source type: string default: "" + example: https://news.ycombinator.com/rss # Number of items to display # Set to 0 to disable limitations diff --git a/source/plugins/stock/metadata.yml b/source/plugins/stock/metadata.yml index 0b544e4d..7b51a35f 100644 --- a/source/plugins/stock/metadata.yml +++ b/source/plugins/stock/metadata.yml @@ -25,6 +25,7 @@ inputs: description: Company stock symbol type: string default: "" + example: MSFT # Time range to display (relative to current date) plugin_stock_duration: