Skip to content

Commit

Permalink
Updated scroll-table.css to have dynamic max-height, cleaned up
Browse files Browse the repository at this point in the history
warnings, removed order by name.
  • Loading branch information
bwssytems committed Aug 3, 2017
1 parent 5ea14f9 commit 60e8855
Show file tree
Hide file tree
Showing 25 changed files with 13 additions and 39 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.bwssystems.HABridge</groupId>
<artifactId>ha-bridge</artifactId>
<version>4.5.6a</version>
<version>4.5.6b</version>
<packaging>jar</packaging>

<name>HA Bridge</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
package com.bwssystems.HABridge.api.hue;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;


import com.bwssystems.HABridge.dao.DeviceDescriptor;
import com.bwssystems.HABridge.dao.GroupDescriptor;
import com.google.gson.annotations.SerializedName;

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/bwssystems/HABridge/api/hue/GroupState.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.bwssystems.HABridge.api.hue;

import java.util.ArrayList;
import java.util.List;

/**
* Created by Florian Foerderreuther on 07/23/17
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.Collection;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/*
* This is an in memory list to manage the configured devices and saves the list as a JSON string to a file for later
* loading.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.bwssystems.HABridge.api.hue.GroupState;
import com.bwssystems.HABridge.dao.DeviceDescriptor;

/*
* Object to handle the device configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


import java.io.IOException;
import java.math.BigInteger;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
Expand All @@ -13,8 +12,6 @@
import java.util.Iterator;
import java.util.Map;

import javax.xml.bind.DatatypeConverter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.bwssystems.HABridge.dao.BackupFilename;
import com.bwssystems.HABridge.dao.DeviceDescriptor;
import com.bwssystems.HABridge.dao.DeviceRepository;
import com.bwssystems.HABridge.dao.GroupDescriptor;
import com.bwssystems.HABridge.dao.GroupRepository;
import com.bwssystems.HABridge.dao.ErrorMessage;
import com.bwssystems.HABridge.util.JsonTransformer;
Expand Down Expand Up @@ -92,6 +91,7 @@ private void setupEndpoints() {
else {
devices = new Gson().fromJson("[" + request.body() + "]", DeviceDescriptor[].class);
}
@SuppressWarnings("unused")
CallItem[] callItems = null;
String errorMessage = null;
for(int i = 0; i < devices.length; i++) {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/bwssystems/HABridge/hue/ColorData.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.bwssystems.HABridge.hue;

import java.util.List;

public class ColorData {
public enum ColorMode { XY, CT, HS}

Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/bwssystems/HABridge/hue/ColorDecode.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ private static double assureBounds(double value) {
return value;
}

@SuppressWarnings("unchecked")
public static String replaceColorData(String request, ColorData colorData, int setIntensity, boolean isHex) {
if (request == null) {
return null;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/bwssystems/HABridge/hue/HueMulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,6 @@ private Object modifyGroup(String userId, String groupId, String ip, String body
"invalid/missing parameters in body", null, null, null).getTheErrors(), HueError[].class);
}

String type = theGroup.getType();
String groupClass = theGroup.getClass_name();
String name = theGroup.getName();
if (!(name == null || name.trim().equals(""))) {
Expand Down Expand Up @@ -831,6 +830,7 @@ private Object groupsIdHandler(String groupId, String userId, String requestIp)
bridgeSettingMaster.updateConfigFile();

if (groupId.equalsIgnoreCase("0")) {
@SuppressWarnings("unchecked")
GroupResponse theResponse = GroupResponse.createDefaultGroupResponse((Map<String, DeviceResponse>)lightsListHandler(userId, requestIp));
return theResponse;
} else {
Expand Down Expand Up @@ -1257,6 +1257,7 @@ else if(validMapTypes.validateType(device.getDeviceType()))
}


@SuppressWarnings("unchecked")
private String changeGroupState(String userId, String groupId, String body, String ipAddress, boolean fakeLightResponse) {
log.debug("PUT action to group " + groupId + " from " + ipAddress + " user " + userId + " with body " + body);
HueError[] theErrors = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
import com.bwssystems.HABridge.dao.DeviceDescriptor;
import com.bwssystems.HABridge.hue.ColorData;

import java.util.List;


public interface HueMulatorHandler {
public String deviceHandler(CallItem anItem, MultiCommandUtil aMultiUtil, String lightId, int intensity, Integer targetBri, Integer targetBriInc, ColorData colorData, DeviceDescriptor device, String body);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.bwssystems.HABridge.plugins.NestBridge;

import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.bwssystems.HABridge.plugins.exec;

import java.io.IOException;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.bwssystems.HABridge.plugins.http;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public Object getItems(String type) {
return deviceList;
}

@SuppressWarnings("unused")
private Boolean addLifxLights(LFXLightCollection theDeviceList) {
if(!validLifx)
return false;
Expand All @@ -143,6 +144,7 @@ private Boolean addLifxLights(LFXLightCollection theDeviceList) {
return true;
}

@SuppressWarnings("unused")
private Boolean addLifxGroups(LFXGroupCollection theDeviceList) {
if(!validLifx)
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.eclipse.paho.client.mqttv3.MqttPersistenceException;
import org.eclipse.paho.client.mqttv3.MqttSecurityException;
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

package com.bwssystems.HABridge.plugins.somfy.jsonschema2pojo.getsetup;

import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

package com.bwssystems.HABridge.plugins.somfy.jsonschema2pojo.getsetup;

import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import javax.xml.bind.DatatypeConverter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.DatatypeConverter;

Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/public/css/scrollable-table.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.scrollableContainer {
/* height: 310px;*/
/* height: 310px; */
position: relative;
padding-top: 35px;
overflow: hidden;
Expand Down Expand Up @@ -29,6 +29,7 @@

.scrollArea {
height: 100%;
max-height: 800px;
overflow-x: auto;
overflow-y: auto;
border: 1px solid #d5d5d5;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/public/views/configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h1 class="panel-title">Current devices ({{bridge.devices.length}})</h1>
<th>Actions</th>
</tr>
</thead>
<tr ng-repeat="device in bridge.devices | orderBy:'name' | filterDevicesByRequester:bridge.state.filterDevicesByIpAddress:bridge.state.filterDevicesOnlyFiltered:bridge.state.filterDeviceType" row-id="{{device.id}}" ng-class="{info: bridge.viewDevId == device.id}" >
<tr ng-repeat="device in bridge.devices | filterDevicesByRequester:bridge.state.filterDevicesByIpAddress:bridge.state.filterDevicesOnlyFiltered:bridge.state.filterDeviceType" row-id="{{device.id}}" ng-class="{info: bridge.viewDevId == device.id}" >
<td>{{$index+1}}</td>
<td>{{device.id}}</td>
<td>{{device.name}}</td>
Expand Down
5 changes: 2 additions & 3 deletions src/main/resources/public/views/editdevice.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ <h2 class="panel-title">Edit/Copy a device</h2>
Bridge Device</button>
<button type="submit" class="col-xs-4 col-sm-2 btn btn-success"
ng-click="editDevice(false)">Update Bridge Device</button>
<button class="btn btn-danger" ng-click="clearDevice()">Clear
Device</button>
<button class="btn" ng-click="changeEditmode()">Change Editmode</button>
<button class="btn btn-danger" ng-click="clearDevice()">Clear</button>
<button class="btn" ng-click="changeEditmode()">Change Edit Mode</button>
</p>
<table class="table table-bordered table-striped table-hover">

Expand Down

0 comments on commit 60e8855

Please sign in to comment.