Skip to content

Commit

Permalink
Merge pull request #2996 from SEED-platform/2702-refactor/sample-data…
Browse files Browse the repository at this point in the history
…-for-better

2702 refactor/sample data for better
  • Loading branch information
macintoshpie committed Nov 10, 2021
2 parents 2f2d19a + e2c89c6 commit 1911cbf
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 2 deletions.
10 changes: 9 additions & 1 deletion seed/static/seed/partials/sample_data_modal.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="modal-header">
<h4 class="modal-title" translate>Auto-Populate Data</h4>
</div>
<div class="modal-body">
<div class="modal-body" id="auto-populate-body">
<h5><em>Auto-Populate Data</em> will insert sample records in your organization viewable from the Inventory Tab. The provided data demonstrates the following advanced capabilities of the SEED Platform:</h5>
<ul class="auto-populate-list">
<li><strong>Meter Data</strong>
Expand Down Expand Up @@ -52,9 +52,17 @@ <h5><em>Auto-Populate Data</em> will insert sample records in your organization
<li><em>Go To Detail Page</em> [<i class="ui-grid-icon-info-circled" style="color: #337ab7"></i>]. Click the <em>Actions</em> drop down box at the top left of the screen. Click <em>Run Analysis</em> in the drop down menu. <em>Name</em> your analysis and enter <em>Type</em> as <em>BSyncr</em>. <em>Create Analysis</em></li>
</ul>
</li>
<li><strong>BETTER Analysis</strong>
<ul>
<li>PM Property ID: <code>5766981</code></li>
<li><em>Go To Detail Page</em> [<i class="ui-grid-icon-info-circled" style="color: #337ab7"></i>]. Click the <em>Actions</em> drop down box at the top left of the screen. Click <em>Run Analysis</em> in the drop down menu. <em>Name</em> your analysis and enter <em>Type</em> as <em>BETTER</em>. <em>Create Analysis</em></li>
</ul>
</li>
</ul>
<div ng-if="hasData" uib-alert class="alert-danger">Auto-Populate is only intended for organizations with no properties or tax lots. To continue you must first remove pre-existing data</div>
<uib-progressbar ng-if="inProgress" class="progress-striped active" value="100" type="info" style="margin-top: 30px;"></uib-progressbar>
<div class='gradient-height'></div>
<div class='scroll-indicator'></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-click="cancel()" ng-disabled="inProgress">Cancel</button>
Expand Down
18 changes: 18 additions & 0 deletions seed/static/seed/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1800,6 +1800,24 @@ a:not([href]) {
}
}

#auto-populate-body {
overflow: scroll;
height: 70vh;
position: relative;
}
.scroll-indicator {
width: calc(100% - 30px);
height: 100px;
background-image: linear-gradient(transparent, #fff);
position: fixed;
bottom: 66px;
}
.gradient-height {
width:calc(100% - 30px);
height:60px;
background: transparent;
}

#newCustomViewModal {
.modal-body {
padding-bottom: 0;
Expand Down
23 changes: 23 additions & 0 deletions seed/tests/data/property_sample_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,29 @@
"extra_data": {
"Note": "Residential"
}
}, {
"jurisdiction_property_id": 123481,
"pm_parent_property_id": "5766981",
"pm_property_id": "5766981",
"property_type": "Office",
"property_name": "Campus Building 2",
"lot_number": "H-12351",
"address_line_1": "12535 S Campus Way",
"city": "Boring",
"state": "Oregon",
"postal_code": 80401,
"year_built": 1975,
"latitude": 45.4441146,
"longitude": -122.383320,
"site_eui": 82.3,
"gross_floor_area": 296432,
"owner": "Campus",
"owner_email": "campus2@gmail.com",
"owner_telephone": "555-555-5560",
"owner_address": "44166 S Campus Ave",
"owner_city_state": "Colorado",
"owner_postal_code": 80202,
"organization_id": -1
}, {
"jurisdiction_property_id": 123465,
"pm_parent_property_id": "5766979",
Expand Down
Binary file removed seed/views/v3/data/PM Meter Data 12.xlsx
Binary file not shown.
Binary file added seed/views/v3/data/PM Meter Data.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion seed/views/v3/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ def insert_sample_data(self, request, pk=None):
import_record = ImportRecord.objects.create(name='Auto-Populate', super_organization=org)

# Interval Data
filename = 'PM Meter Data 12.xlsx'
filename = 'PM Meter Data.xlsx' # contians meter data for bsyncr and BETTER
filepath = f"{Path(__file__).parent.absolute()}/data/{filename}"

import_meterdata = ImportFile.objects.create(
Expand Down

0 comments on commit 1911cbf

Please sign in to comment.