Skip to content

Commit 81b1cc5

Browse files
ghyskaikreuzer
authored andcommitted
Remove all dependencies to the dashboard UI (openhab#175)
* Remove all dependencies to the dashboard UI Migrate all dashboard tiles to the core tile functionality (openhab/openhab-core#1329) Signed-off-by: Yannick Schaus <[email protected]>
1 parent 2dec14c commit 81b1cc5

File tree

15 files changed

+44
-40
lines changed

15 files changed

+44
-40
lines changed

bundles/org.openhab.ui.basic/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323
<artifactId>org.openhab.core.io.rest.sitemap</artifactId>
2424
<version>${project.version}</version>
2525
</dependency>
26-
<dependency>
27-
<groupId>org.openhab.ui.bundles</groupId>
28-
<artifactId>org.openhab.ui.dashboard</artifactId>
29-
<version>${project.version}</version>
30-
</dependency>
3126
</dependencies>
3227

3328
<build>

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/BasicUIDashboardTile.java bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/BasicUITile.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212
*/
1313
package org.openhab.ui.basic.internal;
1414

15-
import org.openhab.ui.dashboard.DashboardTile;
15+
import org.openhab.core.ui.tiles.Tile;
1616
import org.osgi.service.component.annotations.Component;
1717

1818
/**
19-
* The dashboard tile for the Basic UI
19+
* The tile for the Basic UI
2020
*
2121
* @author Kai Kreuzer
22+
* @author Yannick Schaus - remove dependency to dashboard
2223
*
2324
*/
2425
@Component
25-
public class BasicUIDashboardTile implements DashboardTile {
26+
public class BasicUITile implements Tile {
2627

2728
@Override
2829
public String getName() {

bundles/org.openhab.ui.cometvisu/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939
</dependency>
4040
<dependency>
4141
<groupId>org.openhab.core.bundles</groupId>
42-
<artifactId>org.openhab.core</artifactId>
42+
<artifactId>org.openhab.core.boot</artifactId>
4343
<version>${project.version}</version>
4444
</dependency>
4545
<dependency>
46-
<groupId>org.openhab.ui.bundles</groupId>
47-
<artifactId>org.openhab.ui.dashboard</artifactId>
46+
<groupId>org.openhab.core.bundles</groupId>
47+
<artifactId>org.openhab.core</artifactId>
4848
<version>${project.version}</version>
4949
</dependency>
5050
<dependency>

bundles/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/CometVisuDashboardTile.java bundles/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/CometVisuTile.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import java.util.Set;
1818

1919
import org.openhab.core.model.sitemap.SitemapProvider;
20-
import org.openhab.ui.dashboard.DashboardTile;
20+
import org.openhab.core.ui.tiles.Tile;
2121
import org.osgi.service.component.annotations.Component;
2222
import org.osgi.service.component.annotations.Reference;
2323
import org.osgi.service.component.annotations.ReferenceCardinality;
@@ -26,9 +26,10 @@
2626
/**
2727
*
2828
* @author Tobias Bräutigam - Initial contribution
29+
* @author Yannick Schaus - remove dependency to dashboard
2930
*/
3031
@Component
31-
public class CometVisuDashboardTile implements DashboardTile {
32+
public class CometVisuTile implements Tile {
3233
private Set<SitemapProvider> sitemapProviders = new HashSet<>();
3334

3435
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC)

bundles/org.openhab.ui.habot/pom.xml

+7-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@
2626
<version>0.6.3</version>
2727
</dependency>
2828
<dependency>
29-
<groupId>org.openhab.ui.bundles</groupId>
30-
<artifactId>org.openhab.ui.dashboard</artifactId>
29+
<groupId>org.openhab.core.bundles</groupId>
30+
<artifactId>org.openhab.core.boot</artifactId>
31+
<version>${project.version}</version>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.openhab.core.bundles</groupId>
35+
<artifactId>org.openhab.core.ui</artifactId>
3136
<version>${project.version}</version>
3237
</dependency>
3338
<dependency>

bundles/org.openhab.ui.habot/src/main/java/org/openhab/ui/habot/dashboard/internal/HABotHttpContext.java bundles/org.openhab.ui.habot/src/main/java/org/openhab/ui/habot/tile/internal/HABotHttpContext.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* SPDX-License-Identifier: EPL-2.0
1212
*/
13-
package org.openhab.ui.habot.dashboard.internal;
13+
package org.openhab.ui.habot.tile.internal;
1414

1515
import java.io.IOException;
1616
import java.net.MalformedURLException;

bundles/org.openhab.ui.habot/src/main/java/org/openhab/ui/habot/dashboard/internal/HABotDashboardTile.java bundles/org.openhab.ui.habot/src/main/java/org/openhab/ui/habot/tile/internal/HABotTile.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
*
1111
* SPDX-License-Identifier: EPL-2.0
1212
*/
13-
package org.openhab.ui.habot.dashboard.internal;
13+
package org.openhab.ui.habot.tile.internal;
1414

1515
import java.util.Map;
1616

17-
import org.openhab.ui.dashboard.DashboardTile;
17+
import org.openhab.core.ui.tiles.Tile;
1818
import org.osgi.framework.BundleContext;
1919
import org.osgi.service.component.annotations.Activate;
2020
import org.osgi.service.component.annotations.Component;
@@ -27,13 +27,13 @@
2727
import org.slf4j.LoggerFactory;
2828

2929
/**
30-
* The dashboard tile and resource registering for HABot
30+
* The tile and resource registering for HABot
3131
*
3232
* @author Yannick Schaus - Initial contribution
3333
*/
34-
@Component(service = DashboardTile.class, immediate = true, name = "org.openhab.habot", property = {
34+
@Component(service = Tile.class, immediate = true, name = "org.openhab.habot", property = {
3535
"service.config.description.uri=ui:habot", "service.config.label=HABot", "service.config.category=ui" })
36-
public class HABotDashboardTile implements DashboardTile {
36+
public class HABotTile implements Tile {
3737

3838
@Override
3939
public String getName() {
@@ -52,13 +52,13 @@ public String getOverlay() {
5252

5353
@Override
5454
public String getImageUrl() {
55-
return "../habot/statics/dashboardtile.png";
55+
return "../habot/statics/tile.png";
5656
}
5757

5858
public static final String HABOT_ALIAS = "/habot";
5959
public static final String RESOURCES_BASE = "web/dist/pwa-mat";
6060

61-
private final Logger logger = LoggerFactory.getLogger(HABotDashboardTile.class);
61+
private final Logger logger = LoggerFactory.getLogger(HABotTile.class);
6262

6363
protected HttpService httpService;
6464

bundles/org.openhab.ui.habpanel/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
<version>${project.version}</version>
2323
</dependency>
2424
<dependency>
25-
<groupId>org.openhab.ui.bundles</groupId>
26-
<artifactId>org.openhab.ui.dashboard</artifactId>
25+
<groupId>org.openhab.core.bundles</groupId>
26+
<artifactId>org.openhab.core.ui</artifactId>
2727
<version>${project.version}</version>
2828
</dependency>
2929
</dependencies>

bundles/org.openhab.ui.habpanel/src/main/java/org/openhab/ui/habpanel/internal/HABPanelDashboardTile.java bundles/org.openhab.ui.habpanel/src/main/java/org/openhab/ui/habpanel/internal/HABPanelTile.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212
*/
1313
package org.openhab.ui.habpanel.internal;
1414

15-
import org.openhab.ui.dashboard.DashboardTile;
15+
import org.openhab.core.ui.tiles.Tile;
1616
import org.osgi.service.http.HttpService;
1717
import org.osgi.service.http.NamespaceException;
1818
import org.slf4j.Logger;
1919
import org.slf4j.LoggerFactory;
2020

2121
/**
22-
* The dashboard tile and resource registering for HABPanel
22+
* The tile and resource registering for HABPanel
2323
*
2424
* @author Yannick Schaus - Initial contribution
2525
*
2626
*/
27-
public class HABPanelDashboardTile implements DashboardTile {
27+
public class HABPanelTile implements Tile {
2828

2929
@Override
3030
public String getName() {
@@ -48,7 +48,7 @@ public String getImageUrl() {
4848

4949
public static final String HABPANEL_ALIAS = "/habpanel";
5050

51-
private final Logger logger = LoggerFactory.getLogger(HABPanelDashboardTile.class);
51+
private final Logger logger = LoggerFactory.getLogger(HABPanelTile.class);
5252

5353
protected HttpService httpService;
5454

bundles/org.openhab.ui.homebuilder/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
<dependencies>
1616
<dependency>
17-
<groupId>org.openhab.ui.bundles</groupId>
18-
<artifactId>org.openhab.ui.dashboard</artifactId>
17+
<groupId>org.openhab.core.bundles</groupId>
18+
<artifactId>org.openhab.core.ui</artifactId>
1919
<version>${project.version}</version>
2020
</dependency>
2121
</dependencies>
+4-3
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212
*/
1313
package org.openhab.ui.homebuilder.internal;
1414

15-
import org.openhab.ui.dashboard.DashboardTile;
15+
import org.openhab.core.ui.tiles.Tile;
1616
import org.osgi.service.component.annotations.Component;
1717

1818
/**
19-
* The dashboard tile for Home Builder
19+
* The tile for Home Builder
2020
*
2121
* @author Kuba Wolanin - Initial contribution
22+
* @author Yannick Schaus - remove dependency to dashboard
2223
*
2324
*/
2425
@Component
25-
public class HomeBuilderDashboardTile implements DashboardTile {
26+
public class HomeBuilderTile implements Tile {
2627

2728
@Override
2829
public String getName() {

bundles/org.openhab.ui.restdocs/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
<dependencies>
1414
<dependency>
15-
<groupId>org.openhab.ui.bundles</groupId>
16-
<artifactId>org.openhab.ui.dashboard</artifactId>
15+
<groupId>org.openhab.core.bundles</groupId>
16+
<artifactId>org.openhab.core.ui</artifactId>
1717
<version>${project.version}</version>
1818
</dependency>
1919
</dependencies>

bundles/org.openhab.ui.restdocs/src/main/java/org/openhab/ui/restdocs/internal/RESTDashboardTile.java bundles/org.openhab.ui.restdocs/src/main/java/org/openhab/ui/restdocs/internal/RESTTile.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212
*/
1313
package org.openhab.ui.restdocs.internal;
1414

15-
import org.openhab.ui.dashboard.DashboardTile;
15+
import org.openhab.core.ui.tiles.Tile;
1616
import org.osgi.service.component.annotations.Component;
1717

1818
/**
19-
* The dashboard tile for the REST API,
19+
* The tile for the REST API,
2020
*
2121
* @author Kai Kreuzer - Initial contribution
22+
* @author Yannick Schaus - remove dependency to dashboard
2223
*
2324
*/
2425
@Component
25-
public class RESTDashboardTile implements DashboardTile {
26+
public class RESTTile implements Tile {
2627

2728
protected void activate() {
2829
}
@@ -47,7 +48,7 @@ public String getOverlay() {
4748

4849
@Override
4950
public String getImageUrl() {
50-
return "../doc/images/dashboardtile.png";
51+
return "../doc/images/tile.png";
5152
}
5253

5354
}

0 commit comments

Comments
 (0)