Skip to content

Commit

Permalink
Merge branch 'master' into fix-1281
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles authored Sep 13, 2021
2 parents 6256be7 + 26e780c commit fc2e1b6
Show file tree
Hide file tree
Showing 229 changed files with 25,770 additions and 16,361 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/docker-dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ jobs:
with:
node-version: '14'
- name: 📇 Use npm cache
uses: c-hive/gha-npm-cache@v1
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 📦 Install NPM front packages
working-directory: ./front
run: |
Expand Down
53 changes: 50 additions & 3 deletions .github/workflows/docker-master-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ jobs:
with:
node-version: '14'
- name: 📇 Use npm cache
uses: c-hive/gha-npm-cache@v1
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 📦 Install Global NPM Packages
run: |
sudo npm install typescript node-gyp npm@latest -g
Expand All @@ -36,6 +41,43 @@ jobs:
working-directory: ./front
run: |
npm run compare-translations
build-front:
name: Front build
needs:
- test-front
runs-on: ubuntu-20.04
steps:
- name: ⬇️ Checkout code
uses: actions/checkout@v2
- name: 💽 Setup nodejs
uses: actions/setup-node@v2
with:
node-version: '14'
- name: 📇 Use npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 📦 Install NPM front packages
working-directory: ./front
run: |
npm ci
- name: 🏗️ Build front
working-directory: ./front
run: |
npm run build-with-stats
- name: Upload bundle ci
working-directory: ./front
run: npx relative-ci-agent
env:
RELATIVE_CI_KEY: ${{ secrets.RELATIVE_CI_KEY }}
- name: ↗️ Upload build artifact
uses: actions/upload-artifact@v2
with:
name: static
path: front/build
test-server:
name: Server test
runs-on: ubuntu-20.04
Expand All @@ -49,7 +91,12 @@ jobs:
with:
node-version: '14'
- name: 📇 Use npm cache
uses: c-hive/gha-npm-cache@v1
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 🖥️ Setup OZW
run: |
docker create -ti --name dummy chrisns/openzwave:ubuntu-1.6.1714 bash
Expand Down Expand Up @@ -84,6 +131,6 @@ jobs:
npm run coverage
- name: 🔐 Dependencies security audit
working-directory: ./server
run: npm audit --production --audit-level=high
run: npm audit --production --audit-level=critical
- name: 📄 Codecov report upload
uses: codecov/codecov-action@v1
39 changes: 32 additions & 7 deletions .github/workflows/docker-pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ jobs:
with:
node-version: '14'
- name: 📇 Use npm cache
uses: c-hive/gha-npm-cache@v1
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 📦 Install Global NPM Packages
run: |
sudo npm install typescript node-gyp npm@latest -g
Expand Down Expand Up @@ -50,7 +55,12 @@ jobs:
with:
node-version: '14'
- name: 📇 Use npm cache
uses: c-hive/gha-npm-cache@v1
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 🖥️ Setup OZW
run: |
docker create -ti --name dummy chrisns/openzwave:ubuntu-1.6.1714 bash
Expand Down Expand Up @@ -85,7 +95,7 @@ jobs:
npm run coverage
- name: 🔐 Dependencies security audit
working-directory: ./server
run: npm audit --production --audit-level=high
run: npm audit --production --audit-level=critical
- name: 📄 Codecov report upload
uses: codecov/codecov-action@v1
cypress-run:
Expand All @@ -97,9 +107,14 @@ jobs:
- name: 💽 Setup nodejs
uses: actions/setup-node@v2
with:
node-version: '12'
node-version: '14'
- name: 📇 Use npm cache
uses: c-hive/gha-npm-cache@v1
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 📦 Install NPM packages
run: |
npm ci
Expand All @@ -126,15 +141,25 @@ jobs:
with:
node-version: '14'
- name: 📇 Use npm cache
uses: c-hive/gha-npm-cache@v1
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 📦 Install NPM front packages
working-directory: ./front
run: |
npm ci
- name: 🏗️ Build front
working-directory: ./front
run: |
npm run build
npm run build-with-stats
- name: Upload bundle ci
working-directory: ./front
run: npx relative-ci-agent
env:
RELATIVE_CI_KEY: ${{ secrets.RELATIVE_CI_KEY }}
- name: ↗️ Upload build artifact
uses: actions/upload-artifact@v2
with:
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/docker-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ jobs:
with:
node-version: '14'
- name: 📇 Use npm cache
uses: c-hive/gha-npm-cache@v1
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 📦 Install Global NPM Packages
run: |
sudo npm install typescript node-gyp npm@latest -g
Expand Down Expand Up @@ -50,7 +55,12 @@ jobs:
with:
node-version: '14'
- name: 📇 Use npm cache
uses: c-hive/gha-npm-cache@v1
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 🖥️ Setup OZW
run: |
docker create -ti --name dummy chrisns/openzwave:ubuntu-1.6.1714 bash
Expand Down Expand Up @@ -85,7 +95,7 @@ jobs:
npm run coverage
- name: 🔐 Dependencies security audit
working-directory: ./server
run: npm audit --production --audit-level=high
run: npm audit --production --audit-level=critical
- name: 📄 Codecov report upload
uses: codecov/codecov-action@v1
build-front:
Expand All @@ -102,7 +112,12 @@ jobs:
with:
node-version: '14'
- name: 📇 Use npm cache
uses: c-hive/gha-npm-cache@v1
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 📦 Install NPM front packages
working-directory: ./front
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ static
gladys-backups
qemu-*
coverage

stats.json
size-plugin.json
# VSCode
.vscode
.tmp
Expand Down
80 changes: 80 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,86 @@ 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.5.2](https://github.com/GladysAssistant/Gladys/compare/v4.5.1...v4.5.2)

> 13 September 2021
- Google Home: Should not forward empty reportState [`#1286`](https://github.com/GladysAssistant/Gladys/pull/1286)
- Fix #1211: In Caldav integration, events should support timezone [`#1231`](https://github.com/GladysAssistant/Gladys/pull/1231)
- Fix #1267: New scene should not have the previous scene name prefilled [`#1285`](https://github.com/GladysAssistant/Gladys/pull/1285)
- Fix #1277: Should be able to slide brightness on a touchscreen [`#1284`](https://github.com/GladysAssistant/Gladys/pull/1284)
- Fix #1279: Fix Gladys Plus backup restore process [`#1282`](https://github.com/GladysAssistant/Gladys/pull/1282)
- Fix #1280: When switching dashboard, similar box should be refreshed [`#1283`](https://github.com/GladysAssistant/Gladys/pull/1283)
- Add more Zigbee2mqtt devices [`#1275`](https://github.com/GladysAssistant/Gladys/pull/1275)
- Fix #1211: In Caldav integration, events should support timezone (#1231) [`#1211`](https://github.com/GladysAssistant/Gladys/issues/1211)
- Fix #1163: In scene, when deleting a trigger, it should not mix device feature data [`#1163`](https://github.com/GladysAssistant/Gladys/issues/1163)
- Fix #1267: New scene should not have the previous scene name prefilled (#1285) [`#1267`](https://github.com/GladysAssistant/Gladys/issues/1267)
- Fix #1277: Should be able to slide brightness on a touchscreen (#1284) [`#1277`](https://github.com/GladysAssistant/Gladys/issues/1277)
- Fix #1279: Fix Gladys Plus backup restore process (#1282) [`#1279`](https://github.com/GladysAssistant/Gladys/issues/1279)
- Fix #1280: When switching dashboard, similar box should be refreshed (#1283) [`#1280`](https://github.com/GladysAssistant/Gladys/issues/1280)
- Upgrade CHANGELOG [`3cb07f3`](https://github.com/GladysAssistant/Gladys/commit/3cb07f3753b277a3ac2331327889d919e28efe5b)

#### [v4.5.1](https://github.com/GladysAssistant/Gladys/compare/v4.5.0...v4.5.1)

> 6 September 2021
- In scene, trigger device state change should parse number as float [`#1276`](https://github.com/GladysAssistant/Gladys/pull/1276)
- Upgrade CHANGELOG [`7ab2115`](https://github.com/GladysAssistant/Gladys/commit/7ab2115542a87643a53d2cde06c4ae3885c9bf13)

#### [v4.5.0](https://github.com/GladysAssistant/Gladys/compare/v4.4.1...v4.5.0)

> 3 September 2021
- Add get parameters to return_url in login [`#1273`](https://github.com/GladysAssistant/Gladys/pull/1273)
- Fix #1250: Dashboard should change fullscreen mode even when the change is triggered by the browser [`#1272`](https://github.com/GladysAssistant/Gladys/pull/1272)
- Update Gladys Plus page on local instance [`#1271`](https://github.com/GladysAssistant/Gladys/pull/1271)
- Gladys Plus: Add account expired banner on dashboard [`#1270`](https://github.com/GladysAssistant/Gladys/pull/1270)
- Add Philips Hue 929002241201 to Zigbee2mqtt integration [`#1259`](https://github.com/GladysAssistant/Gladys/pull/1259)
- Google Home Integration with Gladys Plus [`#1215`](https://github.com/GladysAssistant/Gladys/pull/1215)
- Zigbee2mqtt: Add TuYa TS0601_air_quality_sensor and CO2 feature [`#1247`](https://github.com/GladysAssistant/Gladys/pull/1247)
- Bluetooth check state before scan + stop presence scanner [`#1194`](https://github.com/GladysAssistant/Gladys/pull/1194)
- Fix dashboard responsive [`#1243`](https://github.com/GladysAssistant/Gladys/pull/1243)
- Upgrade preact-cli to major version 3 [`#1242`](https://github.com/GladysAssistant/Gladys/pull/1242)
- Stop using vis-network library in Z-Wave network tab to reduce bundle size [`#1241`](https://github.com/GladysAssistant/Gladys/pull/1241)
- Fix bug when light color has no initial state and is displayed black [`#1235`](https://github.com/GladysAssistant/Gladys/pull/1235)
- Configure Webpack stats file to calculate bundle evolution [`#1240`](https://github.com/GladysAssistant/Gladys/pull/1240)
- Add device.setValue action in scene [`#1239`](https://github.com/GladysAssistant/Gladys/pull/1239)
- In user presence dashboard box, it's possible to select the users displayed [`#1238`](https://github.com/GladysAssistant/Gladys/pull/1238)
- Multiple dashboard feature [`#1230`](https://github.com/GladysAssistant/Gladys/pull/1230)
- Be able to disable a scene [`#1229`](https://github.com/GladysAssistant/Gladys/pull/1229)
- Zigbee2mqtt: Add light color feature [`#1203`](https://github.com/GladysAssistant/Gladys/pull/1203)
- Fix #1250: Dashboard should change fullscreen mode even when the change is triggered by the browser (#1272) [`#1250`](https://github.com/GladysAssistant/Gladys/issues/1250)
- Zigbee2mqtt: Add light color feature (#1203) [`#1156`](https://github.com/GladysAssistant/Gladys/issues/1156)
- Generate CHANGELOG [`38043f6`](https://github.com/GladysAssistant/Gladys/commit/38043f69b2950686f57134a182441934e936b0f3)

#### [v4.4.1](https://github.com/GladysAssistant/Gladys/compare/v4.4.0...v4.4.1)

> 5 July 2021
- fix(zigbee2mqtt): Add Philips 9290022166 [`#1219`](https://github.com/GladysAssistant/Gladys/pull/1219)
- Fix #1220: Add IKEA LED1836G9 [`#1224`](https://github.com/GladysAssistant/Gladys/pull/1224)
- Fix bugs in scene, dashboard & settings [`#1228`](https://github.com/GladysAssistant/Gladys/pull/1228)
- Fix #1197: Fix Websocket bug when accessToken is expired [`#1227`](https://github.com/GladysAssistant/Gladys/pull/1227)
- Fit map only on users [`#1223`](https://github.com/GladysAssistant/Gladys/pull/1223)
- fix(zigbee2mqtt): Add Philips 9290022166 (#1219) [`#1209`](https://github.com/GladysAssistant/Gladys/issues/1209)
- Fix #1220: Add IKEA LED1836G9 (#1224) [`#1220`](https://github.com/GladysAssistant/Gladys/issues/1220)
- Fix bugs in scene, dashboard & settings (#1228) [`#1225`](https://github.com/GladysAssistant/Gladys/issues/1225) [`#1207`](https://github.com/GladysAssistant/Gladys/issues/1207) [`#1222`](https://github.com/GladysAssistant/Gladys/issues/1222) [`#1106`](https://github.com/GladysAssistant/Gladys/issues/1106) [`#1055`](https://github.com/GladysAssistant/Gladys/issues/1055)
- Fix #1197: Fix Websocket bug when accessToken is expired (#1227) [`#1197`](https://github.com/GladysAssistant/Gladys/issues/1197)
- Update CHANGELOG [`2cb79bd`](https://github.com/GladysAssistant/Gladys/commit/2cb79bdfc6fe3f511f6530550230534df956a6fb)

#### [v4.4.0](https://github.com/GladysAssistant/Gladys/compare/v4.3.1...v4.4.0)

> 14 June 2021
- Add house empty/not empty condition in scene [`#1212`](https://github.com/GladysAssistant/Gladys/pull/1212)
- Multiple fixes on zone creation flow + map view [`#1210`](https://github.com/GladysAssistant/Gladys/pull/1210)
- Add the ability to create a zone in the map + create scene based on zone change [`#1208`](https://github.com/GladysAssistant/Gladys/pull/1208)
- Fix #1200: calling a scene from a scene should duplicate the scope object to avoid context pollution [`#1205`](https://github.com/GladysAssistant/Gladys/pull/1205)
- Fix log in scene continue-only-if action [`#1201`](https://github.com/GladysAssistant/Gladys/pull/1201)
- Update jsdoc/underscore to latest version [`#1195`](https://github.com/GladysAssistant/Gladys/pull/1195)
- Fix #1200: calling a scene from a scene should duplicate the scope object to avoid context pollution (#1205) [`#1200`](https://github.com/GladysAssistant/Gladys/issues/1200)
- Update CHANGELOG [`a837a6e`](https://github.com/GladysAssistant/Gladys/commit/a837a6e29c9ce1a1add495718aae0d5aa6a3a20d)

#### [v4.3.1](https://github.com/GladysAssistant/Gladys/compare/v4.3.0...v4.3.1)

> 13 May 2021
Expand Down
2 changes: 1 addition & 1 deletion front/cypress/cypress.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"video": false,
"screenshotOnRunFailure": false,
"defaultCommandTimeout": 15000,
"defaultCommandTimeout": 30000,
"pageLoadTimeout": 120000,
"baseUrl": "http://localhost:1444",
"env": {
Expand Down
50 changes: 50 additions & 0 deletions front/cypress/integration/routes/dashboard/Dashboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
describe('Dashboard', () => {
beforeEach(() => {
cy.login();
});
it('Should create new dashboard', () => {
cy.visit('/dashboard');
cy.contains('dashboard.newDashboardButton')
.should('have.class', 'btn-outline-success')
.click();

cy.url().should('eq', `${Cypress.config().baseUrl}/dashboard/create/new`);

cy.get('input:visible').then(inputs => {
// dashboard name
cy.wrap(inputs[0]).type('My new dashboard');
});

cy.get('button')
.contains('newDashboard.createDashboardButton')
.should('have.class', 'btn-primary')
.click();

cy.url().should('eq', `${Cypress.config().baseUrl}/dashboard/my-new-dashboard`);
});
it('Should add new boxes', () => {
cy.contains('dashboard.editDashboardButton')
.should('have.class', 'btn-outline-primary')
.click();
cy.get('select').then(inputs => {
cy.wrap(inputs[0]).select('user-presence');
cy.get('button').then(inputs => {
cy.wrap(inputs[0]).click();
});
});
cy.get('.choose-dashboard-user-presence-users')
.click()
.type(`Tony{enter}`);
cy.contains('dashboard.editDashboardSaveButton')
.should('have.class', 'btn-outline-primary')
.click();
});
it('Should delete dashboard', () => {
cy.contains('dashboard.editDashboardButton')
.should('have.class', 'btn-outline-primary')
.click();
cy.contains('dashboard.editDashboardDeleteButton')
.should('have.class', 'btn-outline-danger')
.click();
});
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe('Bluetooth device list', () => {
describe.skip('Bluetooth device list', () => {
const device = {
name: 'Bluetooth Device',
external_id: 'bluetooth:5544332211',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe('Bluetooth device list', () => {
describe.skip('Bluetooth device list', () => {
const device = {
name: 'Bluetooth Device',
external_id: 'bluetooth:5544332211',
Expand Down
Loading

0 comments on commit fc2e1b6

Please sign in to comment.