Comments (4)
Hey,
Admittedly I'm not much into DevOps so I'm not familiar with the different use cases for Docker labels. Could you provide some examples of how they could be used by Glance? Is it just to specify different properties of the config from within your docker compose file?
from glance.
Great question. I should have been more specific with an example. The example below automatically adds Gitea to the Plugsy dashboard:
labels:
- plugsy.name=Gitea
- plugsy.category=CI/CD Pipeline
- plugsy.link=http://local.gitea:3069/
- plugsy.icon=https://docs.gitea.io/images/gitea.png
A similiar approach could be used to automatically add things to a Glance page with either a bookmark or a monitor:
labels:
- galnce.page.name=Links
- glance.widget.type=monitor
- glance.widget.name=CI/CD Pipeline
- glance.widget.sites.title=Gitea
- glance.widget.sites.url=http://local.gitea:3069/
- glance.widget.sites.icon=https://docs.gitea.io/images/gitea.png
Glance then monitors docker.sock, detects the new labels when the container is created, and automatically add Gitea to the Links page under the sites for the CI/CD Pipeline monitor.
from glance.
Thanks for providing some examples!
I'm not sure whether doing this in Glance is very practical as the configuration is fairly deep in terms of nesting and position dependent. With your example from above it's not easy to derive where the widget should get placed - which page, column, order, etc. It would probably have to look more like this, which is quite verbose and ugly:
glance.page[0].name=Links
glance.page[0].columns[0].widgets[0].type=monitor
glance.page[0].columns[0].widgets[0].sites[0].title=Gitea
glance.page[0].columns[0].widgets[0].sites[0].url=http://local.gitea:3069/
glance.page[0].columns[0].widgets[0].sites[0].icon=https://docs.gitea.io/images/gitea.png
from glance.
When I have seen this implemented with other apps, there would still be a glance.yml file where the "stub" and manual entries would be added. You would use the labels to determine where the stub is and add them there. You would know which page and widget to add them to from the labels. Order would have to be worked out. Do you just add them at the end, sort alphabetically by default (my preference), add a property to monitor and bookmarks so users can specify order manually themselves, give multiple sorting options, etc.
In the example below, a container would just be added right after the Router entry below with the labels I suggested above.
pages:
- name: Home
columns:
- size: small
widgets:
- type: search
search-engine: google
bangs:
- title: YouTube
shortcut: "!yt"
url: https://www.youtube.com/results?search_query={QUERY}
- type: clock
hour-format: 24h
timezones:
- timezone: America/New_York
label: Eastern
- timezone: America/Denver
label: Mountain
- timezone: America/Los_Angeles
label: Pacific
- type: calendar
- size: full
widgets:
- type: rss
limit: 10
collapse-after: 3
cache: 3h
feeds:
- url: https://lifehacker.com/rss
title: Lifehacker
- url: http://feeds.wired.com/wired/index
title: Wired
- type: videos
channels:
- UCVy16RS5eEDh8anP8j94G2A # DB Tech
- type: reddit
subreddit: selfhosted
- size: small
widgets:
- type: weather
units: imperial
hour-format: 12h
location: Chicago, United States
- type: markets
markets:
- symbol: NDAQ
name: NASDAQ
- symbol: ICE
name: NYSE
- symbol: SPY
name: S&P 500
- symbol: DIA
name: DJIA
- name: Links
columns:
- size: small
widgets:
- type: monitor
style: dynamic-columns-experimental
cache: 1m
title: CI/CD Pipeline
sites:
- title: Router
url: http://192.168.1.1
from glance.
Related Issues (20)
- Iframe not loading HOT 5
- [FEATURE REQUEST] Ability to Edit CSS HOT 4
- Change Search bar behaviour (ENTER vs. CTRL + ENTER) HOT 1
- Feature Request: Monitor Site Property Timeout & Retry HOT 2
- Alternate RSS Feed Titles HOT 2
- [Request] Custom CSS Class as a property in widgets HOT 1
- [Request] Youtube filter for playlists HOT 4
- Feature Request - Change bookmark to an authorized link from red to yellow HOT 4
- [BUG] Releases widget not show repository by contain dot HOT 1
- Provide Extension Example? HOT 4
- Feature Request - Different URLs for monitor widget
- RSS - Message when RSS feed is empty
- [Bug] iOS no save space HOT 3
- [Bug] Fetching feeds timeout when used in a podman root-less container
- Feature Request - Scratch Pad w/ Markdown Preview
- Access columns via URL? HOT 2
- Allow custom bangs with no queries on search widget
- How to delete a footer HOT 1
- [Feature Request] Widget groups HOT 4
- [Feature Request] Autofocus search widget HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glance.