Skip to content

Commit

Permalink
Merge branch 'master' into ask-ai-in-scene
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles authored Oct 14, 2024
2 parents 2555931 + f77c5d5 commit 558adf9
Show file tree
Hide file tree
Showing 16 changed files with 129 additions and 209 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
platforms:
description: 'Docker platform to build'
required: true
default: 'linux/amd64,linux/arm/v7,linux/arm64/v8'
default: 'linux/amd64,linux/arm64/v8'

jobs:
build-front:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
with:
context: .
file: ./docker/Dockerfile.buildx
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
platforms: linux/amd64,linux/arm64/v8
push: true
pull: true
tags: ${{ steps.docker_meta.outputs.tags }}
Expand Down
62 changes: 31 additions & 31 deletions front/package-lock.json

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

2 changes: 1 addition & 1 deletion front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"prettier": "^1.17.1"
},
"dependencies": {
"@gladysassistant/gladys-gateway-js": "4.16.2",
"@gladysassistant/gladys-gateway-js": "4.15.0",
"@gladysassistant/theme-optimized": "^1.0.3",
"@jaames/iro": "^5.5.2",
"@yaireo/tagify": "4.5.0",
Expand Down
12 changes: 7 additions & 5 deletions front/src/components/boxs/chart/EditChart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import get from 'get-value';
import BaseEditBox from '../baseEditBox';
import Chart from './Chart';
import { getDeviceFeatureName } from '../../../utils/device';
import { DeviceListWithDragAndDrop } from './DeviceListWithDragAndDrop';
import { DeviceListWithDragAndDrop } from '../../drag-and-drop/DeviceListWithDragAndDrop';
import { DEVICE_FEATURE_TYPES } from '../../../../../server/utils/constants';
import withIntlAsProp from '../../../utils/withIntlAsProp';
import { DEFAULT_COLORS, DEFAULT_COLORS_NAME } from './ApexChartComponent';
Expand Down Expand Up @@ -129,9 +129,8 @@ class EditChart extends Component {

refreshDeviceFeaturesNames = () => {
const newDeviceFeatureNames = this.state.selectedDeviceFeaturesOptions.map(o => {
return o.new_label !== undefined ? o.new_label : o.label;
return o.new_label !== undefined && o.new_label !== '' ? o.new_label : o.label;
});

const newDeviceFeature = this.state.selectedDeviceFeaturesOptions.map(o => {
return o.value;
});
Expand Down Expand Up @@ -213,7 +212,10 @@ class EditChart extends Component {
}
});
await this.setState(newState);
this.refreshDeviceFeaturesNames();

if (name !== '') {
this.refreshDeviceFeaturesNames();
}
};

getSelectedDeviceFeaturesAndOptions = (devices, chartType = this.state.chart_type) => {
Expand Down Expand Up @@ -342,7 +344,7 @@ class EditChart extends Component {
}
});
await this.setState(newStateWithoutElement);
this.refreshDeviceFeaturesNames();
await this.refreshDeviceFeaturesNames();
this.refreshDeviceUnitAndChartType(this.state.selectedDeviceFeaturesOptions);
};

Expand Down
16 changes: 0 additions & 16 deletions front/src/components/boxs/chart/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,4 @@
padding-left: 1.5rem;
padding-right: 1.5rem;
text-align: justify;
}
.deviceListDragAndDrop {
cursor: 'pointer';
user-select: 'none';
}

.deviceListDragAndDropDragging {
opacity: 0.5;
}

.deviceListDragAndDropActive {
background-color: #ecf0f1;
}

.deviceListRemoveButton {
z-index: 0;
}

This file was deleted.

9 changes: 6 additions & 3 deletions front/src/components/boxs/device-in-room/EditDevices.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Select from 'react-select';
import update from 'immutability-helper';
import BaseEditBox from '../baseEditBox';
import { getDeviceFeatureName } from '../../../utils/device';
import { DeviceListWithDragAndDrop } from './DeviceListWithDragAndDrop';
import { DeviceListWithDragAndDrop } from '../../drag-and-drop/DeviceListWithDragAndDrop';
import withIntlAsProp from '../../../utils/withIntlAsProp';
import SUPPORTED_FEATURE_TYPES from './SupportedFeatureTypes';

Expand All @@ -24,7 +24,7 @@ class EditDevices extends Component {

refreshDeviceFeaturesNames = () => {
const newDeviceFeatureNames = this.state.selectedDeviceFeaturesOptions.map(o => {
return o.new_label !== undefined ? o.new_label : o.label;
return o.new_label !== undefined && o.new_label !== '' ? o.new_label : o.label;
});
const newDeviceFeature = this.state.selectedDeviceFeaturesOptions.map(o => {
return o.value;
Expand Down Expand Up @@ -62,7 +62,10 @@ class EditDevices extends Component {
}
});
await this.setState(newState);
this.refreshDeviceFeaturesNames();

if (name !== '') {
this.refreshDeviceFeaturesNames();
}
};

getSelectedDeviceFeaturesAndOptions = devices => {
Expand Down
12 changes: 0 additions & 12 deletions front/src/components/boxs/device-in-room/style.css

This file was deleted.

Loading

0 comments on commit 558adf9

Please sign in to comment.