Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Templated Countdown Target Date / Time #98

Merged
merged 7 commits into from Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -60,6 +60,7 @@ Using Docker:
1. install project dependencies: `yarn install --pure-lockfile`
1. Start the "watch" task: `yarn watch`
1. Run a local Grafana instance with the development version of the plugin: `docker run -p 3000:3000 -d --name grafana-plugin-dev --volume $(pwd)/dist:/var/lib/grafana/plugins/clock-panel grafana/grafana`
- In the development environment, it might be necessary to disable plugin signature checking for the plugin being developed (see [here](https://grafana.com/docs/grafana/latest/administration/configuration/#allow_loading_unsigned_plugins)). Otherwise, by design, Grafana will not load the plugin.
1. Check the logs to see that Grafana has started up: `docker logs -f grafana-plugin-dev`
1. Open Grafana at http://localhost:3000/
1. Log in with username "admin" and password "admin"
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "clock-panel",
"version": "1.2.0",
"version": "1.2.1",
zuchka marked this conversation as resolved.
Show resolved Hide resolved
"description": "Clock Panel Plugin for Grafana",
"scripts": {
"build": "grafana-toolkit plugin:build",
Expand Down
2 changes: 1 addition & 1 deletion src/ClockPanel.tsx
Expand Up @@ -109,7 +109,7 @@ class UnthemedClockPanel extends PureComponent<Props, State> {
}

const timeLeft = moment.duration(
moment(countdownSettings.endCountdownTime).utcOffset(this.getTZ(timezone).format('Z'), true).diff(now)
moment(this.props.replaceVariables(countdownSettings.endCountdownTime)).utcOffset(this.getTZ(timezone).format('Z'), true).diff(now)
KMurphs marked this conversation as resolved.
Show resolved Hide resolved
);
let formattedTimeLeft = '';

Expand Down