nubeio / grafana-schedule-panel Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
See the schema:
{
"yearly": {
"eae5e0c1-a5fd-4b93-8d4c-8af0355cead5": {
"id": "eae5e0c1-a5fd-4b93-8d4c-8af0355cead5",
"name": "Test",
"color": "",
"date": "01-02",
"value": 30
},
"e2ced422-001e-497a-bb51-777f591d7a96": {
"id": "e2ced422-001e-497a-bb51-777f591d7a96",
"name": "Test",
"color": "#6e4545",
"date": "03-03",
"value": 33
}
},
"weekly": {
"fe94fbc4-56a5-40f4-a3d2-3ffe3499341d": {
"name": "Test",
"days": [
"saturday"
],
"start": "18:15",
"end": "19:15",
"value": 27,
"color": "#5c4444"
}
},
"events": {
"57fc351b-7816-4cb7-8fdc-e79b9a7423d6": {
"name": "Test1",
"dates": [
{
"start": "2021-03-02T03:31",
"end": "2021-03-02T04:31"
}
],
"eventNames": [
{
}
],
"inputDates": [
{
"start": "2021-03-02T09:16",
"end": "2021-03-02T10:16"
}
],
"value": 22,
"color": "#682323"
}
}
}
Here, on events
we have keys eventNames
and inputDates
which is not suppose to be there. Use dates
instead of inputDates
as before.
Holiday
should no longer be used, it should be called Exception
Exception
creator popup should have ability to select dates and TIMES for the exception period. THE UI POPUP FOR Event
and Exception
SHOULD BE THE SAME (just a different title).Weekly
and Event
already are).For example: on a schedule topic we inserted a random value ('23.2')
and then we try to insert new schedule value. It shows error with following details:
Warning: An unhandled error was caught from submitForm() TypeError: Cannot create property 'weekly' on number '23.2'
const handleModalSubmit = (event: Weekly | Event, id: string) => {
let output: RawData = _cloneDeep(value) || {};
if (isWeekly) {
if (!output.weekly) {
output['weekly'] = {};
}
output.weekly[id] = event;
} else {
if (!output.events) {
output['events'] = {};
}
output.events[id] = event;
}
syncOnMqttServer(JSON.stringify(output));
};
Please update schedule json MQTT payload to use "
instead of '
. Currently parsing the Schedule JSON is JS produces the following error SyntaxError: Unexpected token ' in JSON at position 1
The Schedule JSON should always have at least these 3 properties: weekly
, events
, holiday
These properties always need to exist, even if they are empty {}
Old Schedule JSON: (note that the start
/end
timestamp strings have Z
at the end)
events:
25308195-6005-49fb-a648-031ea925b9e7:
color: "#4a90e2"
name: "Test run"
dates:
0:
start: "2020-11-25T17:00:00.000Z"
end: "2020-11-25T20:00:00.000Z"
id: "25308195-6005-49fb-a648-031ea925b9e7"
value: 12
New Schedule JSON:
events:
02374294-028b-47ce-af5e-17869ee1d760:
name: "TRAINING"
dates:
0:
start: "2021-06-24T22:00"
end: "2021-06-24T23:00"
value: 10
color: "#4a90e2"
Currently to add a schedule that runs everyday it takes significant time to select each day. Can we please add 2 additional options:
Weekdays
- This option would add Monday
Tuesday
Wednesday
Thursday
and Friday
Everyday
- This option would add Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
and Sunday
The Schedule Name selector currently allows the dashboard user to add Schedule Names. This should not be possible.
The Schedule Names should be configured only from the grafana panel edit
menu. Within the edit
menu, there should be a field to add to a list of pre-defined Schedule Names. The user should only be able to select from this list of pre-defined names.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.