Skip to content

Commit

Permalink
Update repository for openHAB fork of Eclipse SmartHome (#11)
Browse files Browse the repository at this point in the history
* Because Eclipse SmartHome (ESH) continues as openHAB Core all references to ESH have been updated for this change:
  * File renames:
    * smarthome-grafana.js -> openhab-grafana.js
    * smarthome-grafana-user-defaults.js -> openhab-grafana-user-defaults.js
  * Code changes:
    * SmartHomeSubscriber -> OHSubscriber
    * SMARTHOME_GRAFANA_DEFAULTS -> OHG_DEFAULTS
* The project itself has also been renamed from smarthome-grafana to openhab-grafana
* The README.md has been updated to allow for easier code diffs by starting each sentence on a new line
* Since this is a major change the version is update from 0.1.0 to 1.0.0.
  The code before all these changes is available in the 0.1.0 release, see:
  https://github.com/wborn/openhab-grafana/releases/tag/0.1.0

Signed-off-by: Wouter Born <[email protected]>
  • Loading branch information
wborn authored Jun 1, 2019
1 parent 270f45a commit f93e685
Show file tree
Hide file tree
Showing 14 changed files with 138 additions and 101 deletions.
10 changes: 5 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ module.exports = function(grunt) {

clean: {
all: [
"example/html/smarthome-grafana.js",
"web/smarthome-grafana.js",
"example/html/openhab-grafana.js",
"web/openhab-grafana.js",
]
},

eslint: {
options: {
configFile: "eslint.json"
},
target: ["web-src/smarthome-grafana.js"]
target: ["web-src/openhab-grafana.js"]
},

uglify: {
all: {
files: {
"example/html/smarthome-grafana.js": ["web-src/smarthome-grafana.js"],
"web/smarthome-grafana.js": ["web-src/smarthome-grafana.js"]
"example/html/openhab-grafana.js": ["web-src/openhab-grafana.js"],
"web/openhab-grafana.js": ["web-src/openhab-grafana.js"]
}
}
}
Expand Down
149 changes: 93 additions & 56 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions example/html/demo-combo1.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta http-equiv="Content-type" CONTENT="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="panel-300px.css" />
<script src="smarthome-grafana.js"></script>
<script src="smarthome-grafana-user-defaults.js"></script>
<script src="openhab-grafana.js"></script>
<script src="openhab-grafana-user-defaults.js"></script>
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions example/html/demo-combo2.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta http-equiv="Content-type" CONTENT="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="panel-300px.css" />
<script src="smarthome-grafana.js"></script>
<script src="smarthome-grafana-user-defaults.js"></script>
<script src="openhab-grafana.js"></script>
<script src="openhab-grafana-user-defaults.js"></script>
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions example/html/demo-multi1.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta http-equiv="Content-type" CONTENT="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="panel-75px.css" />
<script src="smarthome-grafana.js"></script>
<script src="smarthome-grafana-user-defaults.js"></script>
<script src="openhab-grafana.js"></script>
<script src="openhab-grafana-user-defaults.js"></script>
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions example/html/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta http-equiv="Content-type" CONTENT="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="panel-300px.css" />
<script src="smarthome-grafana.js"></script>
<script src="smarthome-grafana-user-defaults.js"></script>
<script src="openhab-grafana.js"></script>
<script src="openhab-grafana-user-defaults.js"></script>
</head>

<body>
Expand Down
13 changes: 13 additions & 0 deletions example/html/openhab-grafana-user-defaults.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

// the prefix that is used for each Grafana panel URL
OHG_DEFAULTS["urlPrefix"] = "http://grafana:3000";

// use "false" so actual pages are loaded (or comment the line)
OHG_DEFAULTS["debug"] = "true";

// use "default" for the default openHAB sitemap (or comment the line)
OHG_DEFAULTS["sitemap"] = "grafana";

if (OHG_DEFAULTS["debug"] === "true") {
console.log("Using OHG_DEFAULTS = " + JSON.stringify(OHG_DEFAULTS));
}
1 change: 1 addition & 0 deletions example/html/openhab-grafana.js

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

13 changes: 0 additions & 13 deletions example/html/smarthome-grafana-user-defaults.js

This file was deleted.

1 change: 0 additions & 1 deletion example/html/smarthome-grafana.js

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "smarthome-grafana",
"version": "0.1.0",
"description": "Eclipse SmartHome Grafana",
"name": "openhab-grafana",
"version": "1.0.0",
"description": "openHAB Grafana",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down
Loading

0 comments on commit f93e685

Please sign in to comment.