diff --git a/docs/README.md b/docs/README.md index 05d5d8f..d7edeb9 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,7 +14,7 @@ Filter and view energy data in charts and tables. [**Assets**](assets.md)
Manage tracked assets. Create groups of assets for easier reporting. -[**Data**](data.md)
+[**Data Sources**](data.md)
Add new energy data from supporting input files. [**Reports**](reports.md)
diff --git a/docs/assets.md b/docs/assets.md index fd486f1..cc347f6 100644 --- a/docs/assets.md +++ b/docs/assets.md @@ -4,4 +4,11 @@ # Assets -![Assets](images/assets.png) \ No newline at end of file +![Assets](images/assets.png) + +**Assets** describe any entity that consumes energy. Arenas, administrative buildings, +and parks are all assets that may consume multiple energy types, +like electricity, natural gas, and water. EMILE can track multiple energy types +on each of the assets it tracks. + +**Asset Groups** are a way to group together assets for the purpose of reporting on them together. diff --git a/docs/dashboard.md b/docs/dashboard.md index f0040cb..96ac42a 100644 --- a/docs/dashboard.md +++ b/docs/dashboard.md @@ -4,4 +4,16 @@ # EMILE Dashboard -![Dashboard](images/dashboard.png) \ No newline at end of file +![Dashboard](images/dashboard.png) + +EMILE provides limited charting options, filtered by: + +- Asset, Asset Category, or Asset Group. +- Start Date. +- End Date. + +The data for each chart can be exported using the corresponding "Export" button. + +Note that selecting a large number of assets and a large time range +can cause performance issues. For more complex reporting, it is recommended to export the data +into a reporting application like Microsoft Excel or Microsoft Power BI. diff --git a/docs/dataSources.md b/docs/dataSources.md index 5ca5baf..3600473 100644 --- a/docs/dataSources.md +++ b/docs/dataSources.md @@ -4,4 +4,36 @@ # Data Sources -![Data](images/data-pendingFiles.png) \ No newline at end of file +![Data Sources](images/data-pendingFiles.png) + +**Data Sources** are the places where energy data comes from. + +Uploaded data files can be the following types. + +- CSV files. +- Microsoft Excel files. +- [Green Button Download My Data® (DMD)](https://www.greenbuttonalliance.org/green-button-download-my-data-dmd) XML files. + +Only files with defined parsers can be uploaded. +In the case of CSV and Excel files, those parsers are defined in EMILE's config file. + +![Data Subscriptions](images/data-subscriptions.png) + +EMILE also has the ability to receive data automatically using the +[Green Button Connect My Data® (CMD)](https://www.greenbuttonalliance.org/green-button-connect-my-data-cmd) standard. + +⭐ Note that before EMILE can connect to your utility's servers, +you need to go through a third party application registration process +with the utility. Each utility provider has a unique registration +process, but once registered, should function similarly. + +Tested Green Button® CMD implementations include: + +- [PUC Services provided through Utility API](https://greenbutton.ssmpuc.com/). + +For more information on tested implementations, see the +[Green Button® Subscriber for Node repository](https://github.com/cityssm/node-green-button-subscriber). + +## Trademarks + +® GREEN BUTTON is a registered trademark owned by Departments of the U.S. Government. diff --git a/docs/images/data-pendingFiles.png b/docs/images/data-pendingFiles.png index b7207de..b316e70 100644 Binary files a/docs/images/data-pendingFiles.png and b/docs/images/data-pendingFiles.png differ diff --git a/docs/images/data-subscriptions.png b/docs/images/data-subscriptions.png new file mode 100644 index 0000000..f40f4f4 Binary files /dev/null and b/docs/images/data-subscriptions.png differ diff --git a/public-typescript/adminDatabase.js b/public-typescript/adminDatabase.js index f8a110c..1cb732d 100644 --- a/public-typescript/adminDatabase.js +++ b/public-typescript/adminDatabase.js @@ -68,7 +68,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); rowElement.dataset.fileName = backupFile.fileName; rowElement.innerHTML = `${backupFile.fileName} ${backupFile.lastModifiedTime} - ${backupFile.sizeInMegabytes} MB + ${backupFile.sizeInMegabytes.toFixed(2)} MB
diff --git a/public-typescript/adminDatabase.ts b/public-typescript/adminDatabase.ts index 6856254..cc19498 100644 --- a/public-typescript/adminDatabase.ts +++ b/public-typescript/adminDatabase.ts @@ -98,7 +98,7 @@ declare const cityssm: cityssmGlobal rowElement.innerHTML = `${backupFile.fileName} ${backupFile.lastModifiedTime} - ${backupFile.sizeInMegabytes} MB + ${backupFile.sizeInMegabytes.toFixed(2)} MB
diff --git a/public/javascripts/adminDatabase.min.js b/public/javascripts/adminDatabase.min.js index 16af063..a6ad991 100644 --- a/public/javascripts/adminDatabase.min.js +++ b/public/javascripts/adminDatabase.min.js @@ -1 +1 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{var e,a;const t=exports.Emile;let s=exports.backupFiles;function n(e){var a,n;const o=null!==(n=null===(a=e.currentTarget.closest("tr"))||void 0===a?void 0:a.dataset.fileName)&&void 0!==n?n:"";bulmaJS.confirm({title:"Delete Backup File",message:"Are you sure you want to delete this backed up database file?",contextualColorName:"warning",okButton:{text:"Yes, Delete Backup File",callbackFunction:function(){cityssm.postJSON(`${t.urlPrefix}/admin/doDeleteBackupFile`,{fileName:o},e=>{const a=e;a.success?(s=a.backupFiles,bulmaJS.alert({message:"Database backup deleted up successfully.",contextualColorName:"success"}),l()):bulmaJS.alert({title:"Error Deleting Backup File",message:"Please try again.",contextualColorName:"danger"})})}}})}function l(){var e,a;const l=document.querySelector("#container--backupFiles");if(0!==s.length){l.innerHTML='\n \n \n \n \n \n \n
Backup File NameLast ModifiedFile SizeOptions\n
';for(const o of s){const s=document.createElement("tr");s.dataset.fileName=o.fileName,s.innerHTML=`${o.fileName}\n ${o.lastModifiedTime}\n ${o.sizeInMegabytes} MB\n \n
\n \n
\n \n
\n
\n `,null===(e=s.querySelector(".is-delete-button"))||void 0===e||e.addEventListener("click",n),null===(a=l.querySelector("tbody"))||void 0===a||a.append(s)}}else l.innerHTML='
\n

\n There are no backup files in the application\'s backup folder.
\n Note that your systems administrator may be backing up the database in another way.\n

\n
'}function o(){cityssm.postJSON(`${t.urlPrefix}/admin/doBackupDatabase`,{},e=>{const a=e;a.success?(s=a.backupFiles,bulmaJS.alert({message:"Database backed up successfully.",contextualColorName:"success"}),l()):bulmaJS.alert({title:"Error Backing Up Database",message:"Please try again.",contextualColorName:"danger"})})}function i(){cityssm.postJSON(`${t.urlPrefix}/admin/doCleanupDatabase`,{},e=>{const a=e;a.success?bulmaJS.alert({title:"Database Cleaned Up Successfully.",message:`${a.deleteCount} record(s) permanently deleted.`,contextualColorName:"success"}):bulmaJS.alert({title:"Error Cleaning Up Database",message:"Please try again.",contextualColorName:"danger"})})}null===(e=document.querySelector(".is-backup-button"))||void 0===e||e.addEventListener("click",()=>{bulmaJS.confirm({title:"Backup Database",message:"Are you sure you want to backup the application's database?",contextualColorName:"info",okButton:{text:"Yes, Backup Database",callbackFunction:o}})}),null===(a=document.querySelector(".is-cleanup-button"))||void 0===a||a.addEventListener("click",()=>{bulmaJS.confirm({title:"Cleanup Database",message:"Are you sure you want to cleanup the database?
\n The cleanup process may speed up the application by purging previously deleted records.",messageIsHtml:!0,contextualColorName:"warning",okButton:{text:"Yes, Cleanup Database",callbackFunction:i}})}),l()})(); \ No newline at end of file +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),(()=>{var e,a;const t=exports.Emile;let s=exports.backupFiles;function n(e){var a,n;const o=null!==(n=null===(a=e.currentTarget.closest("tr"))||void 0===a?void 0:a.dataset.fileName)&&void 0!==n?n:"";bulmaJS.confirm({title:"Delete Backup File",message:"Are you sure you want to delete this backed up database file?",contextualColorName:"warning",okButton:{text:"Yes, Delete Backup File",callbackFunction:function(){cityssm.postJSON(`${t.urlPrefix}/admin/doDeleteBackupFile`,{fileName:o},e=>{const a=e;a.success?(s=a.backupFiles,bulmaJS.alert({message:"Database backup deleted up successfully.",contextualColorName:"success"}),l()):bulmaJS.alert({title:"Error Deleting Backup File",message:"Please try again.",contextualColorName:"danger"})})}}})}function l(){var e,a;const l=document.querySelector("#container--backupFiles");if(0!==s.length){l.innerHTML='\n \n \n \n \n \n \n
Backup File NameLast ModifiedFile SizeOptions\n
';for(const o of s){const s=document.createElement("tr");s.dataset.fileName=o.fileName,s.innerHTML=`${o.fileName}\n ${o.lastModifiedTime}\n ${o.sizeInMegabytes.toFixed(2)} MB\n \n
\n \n
\n \n
\n
\n `,null===(e=s.querySelector(".is-delete-button"))||void 0===e||e.addEventListener("click",n),null===(a=l.querySelector("tbody"))||void 0===a||a.append(s)}}else l.innerHTML='
\n

\n There are no backup files in the application\'s backup folder.
\n Note that your systems administrator may be backing up the database in another way.\n

\n
'}function o(){cityssm.postJSON(`${t.urlPrefix}/admin/doBackupDatabase`,{},e=>{const a=e;a.success?(s=a.backupFiles,bulmaJS.alert({message:"Database backed up successfully.",contextualColorName:"success"}),l()):bulmaJS.alert({title:"Error Backing Up Database",message:"Please try again.",contextualColorName:"danger"})})}function i(){cityssm.postJSON(`${t.urlPrefix}/admin/doCleanupDatabase`,{},e=>{const a=e;a.success?bulmaJS.alert({title:"Database Cleaned Up Successfully.",message:`${a.deleteCount} record(s) permanently deleted.`,contextualColorName:"success"}):bulmaJS.alert({title:"Error Cleaning Up Database",message:"Please try again.",contextualColorName:"danger"})})}null===(e=document.querySelector(".is-backup-button"))||void 0===e||e.addEventListener("click",()=>{bulmaJS.confirm({title:"Backup Database",message:"Are you sure you want to backup the application's database?",contextualColorName:"info",okButton:{text:"Yes, Backup Database",callbackFunction:o}})}),null===(a=document.querySelector(".is-cleanup-button"))||void 0===a||a.addEventListener("click",()=>{bulmaJS.confirm({title:"Cleanup Database",message:"Are you sure you want to cleanup the database?
\n The cleanup process may speed up the application by purging previously deleted records.",messageIsHtml:!0,contextualColorName:"warning",okButton:{text:"Yes, Cleanup Database",callbackFunction:i}})}),l()})(); \ No newline at end of file diff --git a/views/data.ejs b/views/data.ejs index f0e8e9a..00e873c 100644 --- a/views/data.ejs +++ b/views/data.ejs @@ -90,7 +90,7 @@
<% if (Object.keys(greenButtonSubscriptions).length > 0) { %>