Skip to content

Commit

Permalink
Merge branch 'master' into ewelink-discover-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles committed Oct 25, 2021
2 parents 725b6cb + 213ba3b commit 48cb671
Show file tree
Hide file tree
Showing 78 changed files with 6,047 additions and 2,123 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Expand Up @@ -39,7 +39,7 @@ We actively welcome your pull requests:
4. Ensure the test suite passes. (`npm test`)
5. Make sure your code lints. (`npm run eslint`)
6. Make sure your code is pretty (`npm run prettier`)
7. Make sure you add fake requests data for the demo mode (`front/src/config/demo.json`) so that the demo website is working without a backend. (if needed) See [https://demo.gladysassistant.com](https://demo.gladysassistant.com).
7. Make sure you add fake requests data for the demo mode (`front/src/config/demo.js`) so that the demo website is working without a backend. (if needed) See [https://demo.gladysassistant.com](https://demo.gladysassistant.com).
8. Issue that pull request!

## Any contributions you make will be under the Apache 2.0 License
Expand Down
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Expand Up @@ -3,4 +3,4 @@
#
# It's thanks to these contributions that this project can be sustainable, so thank you if you helped :)

custom: ['https://gladysassistant.com']
custom: ['https://gladysassistant.com/plus']
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -7,9 +7,10 @@ To ensure your Pull Request can be accepted as fast as possible, make sure to re
- [ ] Is the linter passing? (`npm run eslint` on both front/server)
- [ ] Did you run prettier? (`npm run prettier` on both front/server)
- [ ] If you are adding a new features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [ ] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to [the community](https://community.gladysassistant.com/) for testing before merging.
- [ ] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
- [ ] If you are adding a new features/services which needs explanation, did you modify the user documentation? See [the GitHub repo](https://github.com/GladysAssistant/v4-website) and the [website](https://gladysassistant.com).
- [ ] Did you add fake requests data for the demo mode (`front/src/config/demo.json`) so that the demo website is working without a backend? (if needed) See [https://demo.gladysassistant.com](https://demo.gladysassistant.com).
- [ ] Did you add fake requests data for the demo mode (`front/src/config/demo.js`) so that the demo website is working without a backend? (if needed) See [https://demo.gladysassistant.com](https://demo.gladysassistant.com).

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Expand Down
17 changes: 17 additions & 0 deletions .github/stale.yml
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
17 changes: 17 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v4.6.0](https://github.com/GladysAssistant/Gladys/compare/v4.5.3...v4.6.0)

> 25 October 2021
- Add Xiaomi GZCGQ01LM illuminance sensor [`#1329`](https://github.com/GladysAssistant/Gladys/pull/1329)
- Add device states chart box on dashboard [`#1248`](https://github.com/GladysAssistant/Gladys/pull/1248)
- Add stale bot + update funding.yml [`#1332`](https://github.com/GladysAssistant/Gladys/pull/1332)
- Add device temperature feature [`#1327`](https://github.com/GladysAssistant/Gladys/pull/1327)
- Revert change on device name displayed, only apply this to MQTT devices [`#1326`](https://github.com/GladysAssistant/Gladys/pull/1326)
- For some integrations, display the device feature name and not the device name in the UI [`#1322`](https://github.com/GladysAssistant/Gladys/pull/1322)
- Tasmota: Be able to change a switch to a light [`#1108`](https://github.com/GladysAssistant/Gladys/pull/1108)
- Fix #1310: In box "temperature in room" & "humidity in room", when value is 0, it should not display weird state [`#1317`](https://github.com/GladysAssistant/Gladys/pull/1317)
- Add signal quality feature [`#1315`](https://github.com/GladysAssistant/Gladys/pull/1315)
- Github Actions updates [`#1278`](https://github.com/GladysAssistant/Gladys/pull/1278)
- Fix #1310: In box "temperature in room" & "humidity in room", when value is 0, it should not display weird state (#1317) [`#1310`](https://github.com/GladysAssistant/Gladys/issues/1310)
- Upgrade CHANGELOG [`9193a42`](https://github.com/GladysAssistant/Gladys/commit/9193a42e89c76be4c25f35686d0567717e6ac233)

#### [v4.5.3](https://github.com/GladysAssistant/Gladys/compare/v4.5.2...v4.5.3)

> 11 October 2021
Expand Down
77 changes: 77 additions & 0 deletions front/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions front/package.json
Expand Up @@ -47,6 +47,7 @@
"@gladysassistant/theme-optimized": "^1.0.3",
"@jaames/iro": "^5.5.2",
"@yaireo/tagify": "^4.5.0",
"apexcharts": "^3.29.0",
"axios": "^0.21.1",
"classnames": "^2.3.1",
"cropperjs": "^1.5.12",
Expand Down
2 changes: 2 additions & 0 deletions front/src/components/app.jsx
Expand Up @@ -60,6 +60,7 @@ import SettingsBackup from '../routes/settings/settings-backup';
import SettingsBilling from '../routes/settings/settings-billing';
import SettingsGatewayUsers from '../routes/settings/settings-gateway-users';
import SettingsGatewayOpenApi from '../routes/settings/settings-gateway-open-api';
import SettingsBackgroundJobs from '../routes/settings/settings-background-jobs';

// Integrations
import TelegramPage from '../routes/integration/all/telegram';
Expand Down Expand Up @@ -252,6 +253,7 @@ const AppRouter = connect(
<SettingsGateway path="/dashboard/settings/gateway" />
<SettingsServicePage path="/dashboard/settings/service" />
<SettingsBackup path="/dashboard/settings/backup" />
<SettingsBackgroundJobs path="/dashboard/settings/jobs" />
<Error type="404" default />
</Router>
</Layout>
Expand Down
64 changes: 64 additions & 0 deletions front/src/components/boxs/chart/ApexChartAreaOptions.js
@@ -0,0 +1,64 @@
const getApexChartAreaOptions = ({ displayAxes, height, series, COLORS }) => {
const options = {
chart: {
type: 'area',
fontFamily: 'inherit',
height,
parentHeightOffset: 0,
sparkline: {
enabled: !displayAxes
},
toolbar: {
show: false
},
animations: {
enabled: false
}
},
dataLabels: {
enabled: false
},
fill: {
opacity: 0.16,
type: 'solid'
},
stroke: {
width: 2,
lineCap: 'round',
curve: 'smooth'
},
series,
grid: {
strokeDashArray: 4,
padding: {
left: -4
}
},
xaxis: {
labels: {
padding: 0,
datetimeUTC: false
},
tooltip: {
enabled: false
},
axisBorder: {
show: false
},
type: 'datetime'
},
yaxis: {
labels: {
padding: 4
}
},
colors: COLORS,
legend: {
show: displayAxes,
position: 'bottom'
}
};
return options;
};

export { getApexChartAreaOptions };
72 changes: 72 additions & 0 deletions front/src/components/boxs/chart/ApexChartBarOptions.js
@@ -0,0 +1,72 @@
const getApexChartBarOptions = ({ displayAxes, series, COLORS }) => {
const options = {
chart: {
type: 'bar',
fontFamily: 'inherit',
height: displayAxes ? 200 : 100,
parentHeightOffset: 0,
toolbar: {
show: false
},
sparkline: {
enabled: !displayAxes
},
animations: {
enabled: false
},
stacked: true
},
plotOptions: {
bar: {
columnWidth: '100%'
}
},
dataLabels: {
enabled: false
},
fill: {
opacity: 1
},
series,
grid: {
padding: {
top: -20,
right: 0,
left: -4,
bottom: -4
},
strokeDashArray: 4,
xaxis: {
lines: {
show: true
}
}
},
xaxis: {
labels: {
padding: 0,
datetimeUTC: false
},
tooltip: {
enabled: false
},
axisBorder: {
show: false
},
type: 'datetime'
},
yaxis: {
labels: {
padding: 4
}
},
colors: COLORS,
legend: {
show: displayAxes,
position: 'bottom'
}
};
return options;
};

export { getApexChartBarOptions };

0 comments on commit 48cb671

Please sign in to comment.