-
Notifications
You must be signed in to change notification settings - Fork 71.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plugin to show database size (% of available space or in MiB) (#5496)
* Database size plugin - pill that displays current mongoDB database size * Enabled dbsize by default * Fixed bug with dbsize not shownig when size is (rounded) 0% but real bytes > 0 * Cleanup & update to iconfont generation manual * Changed how warning/urgent levels are configured - from absolute MiB to percentage of DBSIZE_MAX
- Loading branch information
Showing
12 changed files
with
693 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{ | ||
"metadata": { | ||
"name": "Nightscout Plugin Icons", | ||
"lastOpened": 0, | ||
"created": 1580075608590 | ||
}, | ||
"iconSets": [ | ||
{ | ||
"selection": [ | ||
{ | ||
"order": 2, | ||
"id": 0, | ||
"name": "database", | ||
"prevSize": 32, | ||
"code": 59649, | ||
"tempChar": "" | ||
} | ||
], | ||
"id": 2, | ||
"metadata": { | ||
"name": "Plugin Icons", | ||
"importSize": { | ||
"width": 16, | ||
"height": 18 | ||
} | ||
}, | ||
"height": 1024, | ||
"prevSize": 32, | ||
"icons": [ | ||
{ | ||
"id": 0, | ||
"paths": [ | ||
"M455.111 0c-251.449 0-455.111 101.831-455.111 227.556s203.662 227.556 455.111 227.556 455.111-101.831 455.111-227.556-203.662-227.556-455.111-227.556zM0 341.333v170.667c0 125.724 203.662 227.556 455.111 227.556s455.111-101.831 455.111-227.556v-170.667c0 125.724-203.662 227.556-455.111 227.556s-455.111-101.831-455.111-227.556zM0 625.778v170.667c0 125.724 203.662 227.556 455.111 227.556s455.111-101.831 455.111-227.556v-170.667c0 125.724-203.662 227.556-455.111 227.556s-455.111-101.831-455.111-227.556z" | ||
], | ||
"attrs": [ | ||
{} | ||
], | ||
"width": 910, | ||
"isMulticolor": false, | ||
"isMulticolor2": false, | ||
"grid": 0, | ||
"tags": [ | ||
"plugins" | ||
] | ||
} | ||
], | ||
"invisible": false, | ||
"colorThemes": [] | ||
} | ||
], | ||
"preferences": { | ||
"showGlyphs": true, | ||
"showQuickUse": true, | ||
"showQuickUse2": true, | ||
"showSVGs": true, | ||
"fontPref": { | ||
"prefix": "plugicon-", | ||
"metadata": { | ||
"fontFamily": "pluginicons", | ||
"majorVersion": 1, | ||
"minorVersion": 0 | ||
}, | ||
"metrics": { | ||
"emSize": 1024, | ||
"baseline": 6.25, | ||
"whitespace": 50 | ||
}, | ||
"embed": false, | ||
"showSelector": false, | ||
"showMetrics": false, | ||
"showMetadata": false, | ||
"showVersion": false | ||
}, | ||
"imagePref": { | ||
"prefix": "icon-", | ||
"png": true, | ||
"useClassSelector": true, | ||
"color": 0, | ||
"bgColor": 16777215, | ||
"classSelector": ".icon" | ||
}, | ||
"historySize": 50, | ||
"showCodes": true, | ||
"gridSize": 16 | ||
}, | ||
"uid": -1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
How to upgrade icons in icon-fonts on Nightscout | ||
================================================ | ||
|
||
This guide is fol developers regarding how to add new icon to Nightscout. | ||
|
||
Nightscout use icon fonts to render icons. Each icon is glyph (like - letter, or more like emoji character) inside custom made font file. | ||
That way we have nice, vector icons, that are small, scalable, looks good on each platform, and are easy to embed inside CSS. | ||
|
||
To extend existing icon set.: | ||
|
||
1. Prepare minimalist, black & white icon in SVG tool of choice, and optimize it (you can use Inkscape) to be small in size and render good at small sizes. | ||
2. Use https://icomoon.io/app and import accompanied JSON project file (`Nightscout Plugin Icons.json`) | ||
3. Add SVG as new glyph. Remember to take care to set proper character code and CSS name | ||
4. Save new version of JSON project file and store in this folder | ||
5. Generate font, download zip file and unpack it to get `fonts/pluginicons.svg` and `fonts/pluginicons.woff` | ||
6. Update `statc/css/main.css` file | ||
* In section of `@font-face` with `font-family: 'pluginicons'` | ||
* update part after `data:application/font-woff;charset=utf-8;base64,` with Base64-encoded content of just generated `pluginicons.woff` font | ||
* update part after `data:application/font-svg;charset=utf-8;base64,` with Base64-encoded content of just generated `pluginicons.svg` font | ||
* copy/update all entries `.plugicon-****:before { content: "****"; }` from generated font `style.css` into `statc/css/main.css` | ||
7. Do not forget to update `Nightscout Plugin Icons.json` in this repo (´download updated project from icomoon.io) | ||
|
||
Hints | ||
----- | ||
|
||
* You can find many useful online tools to encode file into Base64, like: https://base64.guru/converter/encode/file | ||
* Do not split Base64 output - it should be one LONG line | ||
* Since update process is **manual** and generated fonts & updated CSS sections are **binary** - try to avoid **git merge conflicts** by speaking with other developers if you plan to add new icon | ||
* When in doubt - check `git log` and reach last contributor for guidelines :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.