<commit_before><div class="page" ng-controller="SiteSensorsController" >
     <div class="row">
        <div class="col-sm-12">
            <h2 class="section-header">{{building.details.item.name}}</h2>
        </div>
    </div>
    <div class="row" style="margin-top: 10px"  ng-init="getInitAreas()">
            <div class="text-right" style="margin:10px">
                <a ui-wave href="javascript:;" ng-show="hasPermission('controlPermission')" ng-click="addVirtualSensor()" class="btn btn-sm btn-raised btn-primary"><span data-translate="ADD_A_VIRTUAL_SENSOR"></span></a>
                <a ui-wave href="javascript:;" ng-hide="view_general_resources" ng-click="viewGeneralResources()" class="btn btn-sm btn-raised btn-primary"><span data-translate="VIEW_GENERAL_RESOURCES"></span></a>
                <a ui-wave href="javascript:;" ng-show="view_general_resources" ng-click="hideGeneralResources()" class="btn btn-sm btn-raised btn-primary"><span data-translate="HIDE_GENERAL_RESOURCES"></span></a>
                
            </div>
        <div class="col-sm-12">

            <div class="panel panel-default panel-minimal" ng-show="add_a_virtual_sensor_form">
                <div class="divider divider-md"></div>
                <div class="panel-heading">
                    <span data-translate="DETAILS"></span>
                </div>
                <div class="panel-body">
                    
                    <div class="col-sm-6">
                        <div class="form-group">
                            <strong><span data-translate="Name"></span></strong>
                            <input class="form-control" type="text" name="" ng-model="new_virtual_sensor.name">
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <strong><span data-translate="observes"></span></strong>
                            <md-select ng-model="new_virtual_sensor.observes">
                                <md-option option disabled="disabled" selected><span data-translate="SELECT_OBSERVE"></span></md-option>
                                <md-option ng-repeat="observe in available_observes" value="{{observe.name}}">
                                    <span data-translate="{{observe.translated_name}}"></span>
                                </md-option>
                            </md-select>
                        </div>
                    </div>
                    
                        <md-button class="md-accent md-raised right" ng-click="save_new_virtual_sensor()"><span data-translate="SAVE_FORM"></span></md-button>
                        <md-button class="md-default md-raised right" ng-click="cancel_new_virtual_sensor()"><span data-translate="CANCEL"></span></md-button>
                </div>
            </div>
             

            <div class="row area_box" ng-show="view_general_resources">

                <h2 class="area_title"><span data-translate="GENERAL_RESOURCES"></span></h2>
                <div class="col-sm-10 col-sm-offset-1">
                <div class="table-responsive">
                    <table class="table table-hover">
                        <thead>
                        <tr>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="sensor in general_resources">
                            <td><span><i ng-show="hasPermission('modifyPermission')" class="fa fa-pencil-square" aria-hidden="true" ng-click="editSensorName(sensor)"></i> {{sensor.name}}</span>
                                <div class="input-group" ng-show="sensor.editing" >
                                    <input type="text" ng-model="sensor.name" class="form-control">
                                    <span class="input-group-btn">
                                        <button class="btn btn-secondary" type="button" ng-click="saveSensor(sensor)">Save</button>
                                    </span>
                                </div>
                            </td>
                            <td>
                                {{sensor.property}}
                            </td>
                            <td>{{sensor.metrics.latest+" "+sensor.uom}}</td>
                            <td>{{sensor.metrics.latestTime | date:'MMM d, y h:mm:ss'}}</td>
                            <td><span class="btn btn-primary" data-translate="view_sensor" ng-click="goToSensor(sensor.resourceId)"></span> </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                </div>
            </div>
                    <!--<div class="col-sm-6 col-md-3 col-lg-2" style="margin-bottom: 5px" ng-repeat="sensor in general_resources">-->
                        <!--<div class="sensorbox" style="min-height: 170px">-->
                        <!--<div class="panel-heading">-->
                                <!---->
                            <!---->
                            <!--<div class="panel-body" ng-click="goToSensor(sensor.resourceId)">-->
                                <!--<h5 class="latest_value"><span data-translate="Latestvalue"></span></h5>-->
                                <!--<h4></h4>-->
                                <!--<h5 class="latest_value" style="font-size:12px!important"></h5>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
            <!--</div>-->

            <div class="row area_box" ng-show="virtual_sensors.length" ng-init="getPSResources()">
                <h2 class="area_title"><span data-translate="VIRTUAL_SENSORS"></span></h2>
                    <div class="col-sm-6 col-md-3 col-lg-2" style="margin-bottom: 5px" ng-repeat="sensor in virtual_sensors">
                        <div class="sensorbox">
                        <div class="panel-heading">
                            <span>
                                <i ng-show="hasPermission('modifyPermission')" class="fa fa-trash" style="color:red;margin:10px" aria-hidden="true" ng-click="deleteSensor(sensor)"></i>
                                <i ng-show="hasPermission('modifyPermission')" class="fa fa-pencil-square" aria-hidden="true" ng-click="editSensorName(sensor)"></i>
                                <br/>
                                {{sensor.name}}</span>


                            <div class="input-group" ng-show="sensor.editing" >
                                    <input type="text" ng-model="sensor.name" class="form-control">
                                    <span class="input-group-btn">
                                        <button class="btn btn-secondary" type="button" ng-click="saveSensor(sensor)">Save</button>
                                    </span>                                                    
                                </div> - {{sensor.property}}</div>
                            <div class="panel-body" ng-click="goToSensor(sensor.resourceId)">
                                <h5 class="latest_value"><span data-translate="Latestvalue"></span></h5>
                                <h4>{{sensor.metrics.latest+" "+sensor.uom}}</h4>
                                <h5 class="latest_value" style="font-size:12px!important">{{sensor.metrics.latestTime | date:'MMM d, y h:mm:ss'}}</h5>
                            </div>
                        </div>
                    </div>
            </div>
            
            


            <div class="row area_box" ng-repeat="area in building.areas">
                <h2 class="area_title" ng-click="go_to_sensors(area)">
                    <span ng-show="area.subsites.length>0" class="blue-text">{{area.name}} </span>
                    <span ng-hide="area.subsites.length>0">{{area.name}} </span>
                </h2>
            <div style="text-align: center;margin-bottom: 10px" ng-show="area.resources==0">
                <span data-translate="Therearenoassignedsensors"></span>
            </div>
            <div class="col-sm-6 col-md-3 col-lg-2" style="margin-bottom: 5px" ng-repeat="sensor in area.site_resources">
                <div class="sensorbox">
                    <div class="panel-heading"> <span><i ng-show="hasPermission('modifyPermission')" class="fa fa-pencil-square" aria-hidden="true" ng-click="editSensorName(sensor)"></i> {{sensor.name}}</span>
                                <div class="input-group" ng-show="sensor.editing" >
                                    <input type="text" ng-model="sensor.name" class="form-control">
                                    <span class="input-group-btn">
                                        <button class="btn btn-secondary" type="button" ng-click="saveSensor(sensor)">Save</button>
                                    </span>                                                    
                                </div></div>
                        <div class="panel-body" ng-click="goToSensor(sensor.resourceId)">
                            <h5 class="latest_value"><span data-translate="Latestvalue"></span></h5>
                            <h4>{{sensor.metrics.latest+" "+sensor.uom}}</h4>
                           
                             <h5 class="latest_value" style="font-size:12px!important">{{sensor.metrics.latestTime | date:'MMM d, y h:mm:ss'}}</h5>
                                
                        </div>
                    </div>
                </div>
            </div>
            </div><commit_msg>change color in sensors page building title if they have subsites<commit_after><div class="page" ng-controller="SiteSensorsController" >
     <div class="row">
        <div class="col-sm-12">
            <h2 class="section-header">{{building.details.item.name}}</h2>
        </div>
    </div>
    <div class="row" style="margin-top: 10px"  ng-init="getInitAreas()">
            <div class="text-right" style="margin:10px">
                <a ui-wave href="javascript:;" ng-show="hasPermission('controlPermission')" ng-click="addVirtualSensor()" class="btn btn-sm btn-raised btn-primary"><span data-translate="ADD_A_VIRTUAL_SENSOR"></span></a>
                <a ui-wave href="javascript:;" ng-hide="view_general_resources" ng-click="viewGeneralResources()" class="btn btn-sm btn-raised btn-primary"><span data-translate="VIEW_GENERAL_RESOURCES"></span></a>
                <a ui-wave href="javascript:;" ng-show="view_general_resources" ng-click="hideGeneralResources()" class="btn btn-sm btn-raised btn-primary"><span data-translate="HIDE_GENERAL_RESOURCES"></span></a>
                
            </div>
        <div class="col-sm-12">

            <div class="panel panel-default panel-minimal" ng-show="add_a_virtual_sensor_form">
                <div class="divider divider-md"></div>
                <div class="panel-heading">
                    <span data-translate="DETAILS"></span>
                </div>
                <div class="panel-body">
                    
                    <div class="col-sm-6">
                        <div class="form-group">
                            <strong><span data-translate="Name"></span></strong>
                            <input class="form-control" type="text" name="" ng-model="new_virtual_sensor.name">
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <strong><span data-translate="observes"></span></strong>
                            <md-select ng-model="new_virtual_sensor.observes">
                                <md-option option disabled="disabled" selected><span data-translate="SELECT_OBSERVE"></span></md-option>
                                <md-option ng-repeat="observe in available_observes" value="{{observe.name}}">
                                    <span data-translate="{{observe.translated_name}}"></span>
                                </md-option>
                            </md-select>
                        </div>
                    </div>
                    
                        <md-button class="md-accent md-raised right" ng-click="save_new_virtual_sensor()"><span data-translate="SAVE_FORM"></span></md-button>
                        <md-button class="md-default md-raised right" ng-click="cancel_new_virtual_sensor()"><span data-translate="CANCEL"></span></md-button>
                </div>
            </div>
             

            <div class="row area_box" ng-show="view_general_resources">

                <h2 class="area_title"><span data-translate="GENERAL_RESOURCES"></span></h2>
                <div class="col-sm-10 col-sm-offset-1">
                <div class="table-responsive">
                    <table class="table table-hover">
                        <thead>
                        <tr>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr ng-repeat="sensor in general_resources">
                            <td><span><i ng-show="hasPermission('modifyPermission')" class="fa fa-pencil-square" aria-hidden="true" ng-click="editSensorName(sensor)"></i> {{sensor.name}}</span>
                                <div class="input-group" ng-show="sensor.editing" >
                                    <input type="text" ng-model="sensor.name" class="form-control">
                                    <span class="input-group-btn">
                                        <button class="btn btn-secondary" type="button" ng-click="saveSensor(sensor)">Save</button>
                                    </span>
                                </div>
                            </td>
                            <td>
                                {{sensor.property}}
                            </td>
                            <td>{{sensor.metrics.latest+" "+sensor.uom}}</td>
                            <td>{{sensor.metrics.latestTime | date:'MMM d, y h:mm:ss'}}</td>
                            <td><span class="btn btn-primary" data-translate="view_sensor" ng-click="goToSensor(sensor.resourceId)"></span> </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
                </div>
            </div>
                    <!--<div class="col-sm-6 col-md-3 col-lg-2" style="margin-bottom: 5px" ng-repeat="sensor in general_resources">-->
                        <!--<div class="sensorbox" style="min-height: 170px">-->
                        <!--<div class="panel-heading">-->
                                <!---->
                            <!---->
                            <!--<div class="panel-body" ng-click="goToSensor(sensor.resourceId)">-->
                                <!--<h5 class="latest_value"><span data-translate="Latestvalue"></span></h5>-->
                                <!--<h4></h4>-->
                                <!--<h5 class="latest_value" style="font-size:12px!important"></h5>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
            <!--</div>-->

            <div class="row area_box" ng-show="virtual_sensors.length" ng-init="getPSResources()">
                <h2 class="area_title"><span data-translate="VIRTUAL_SENSORS"></span></h2>
                    <div class="col-sm-6 col-md-3 col-lg-2" style="margin-bottom: 5px" ng-repeat="sensor in virtual_sensors">
                        <div class="sensorbox">
                        <div class="panel-heading">
                            <span>
                                <i ng-show="hasPermission('modifyPermission')" class="fa fa-trash" style="color:red;margin:10px" aria-hidden="true" ng-click="deleteSensor(sensor)"></i>
                                <i ng-show="hasPermission('modifyPermission')" class="fa fa-pencil-square" aria-hidden="true" ng-click="editSensorName(sensor)"></i>
                                <br/>
                                {{sensor.name}}</span>


                            <div class="input-group" ng-show="sensor.editing" >
                                    <input type="text" ng-model="sensor.name" class="form-control">
                                    <span class="input-group-btn">
                                        <button class="btn btn-secondary" type="button" ng-click="saveSensor(sensor)">Save</button>
                                    </span>                                                    
                                </div> - {{sensor.property}}</div>
                            <div class="panel-body" ng-click="goToSensor(sensor.resourceId)">
                                <h5 class="latest_value"><span data-translate="Latestvalue"></span></h5>
                                <h4>{{sensor.metrics.latest+" "+sensor.uom}}</h4>
                                <h5 class="latest_value" style="font-size:12px!important">{{sensor.metrics.latestTime | date:'MMM d, y h:mm:ss'}}</h5>
                            </div>
                        </div>
                    </div>
            </div>
            
            


            <div class="row area_box" ng-repeat="area in building.areas">
                <h2 class="area_title" ng-click="go_to_sensors(area)" style="cursor: default!important;">
                    <span ng-show="area.subsites.length>0" class="blue-text" style="cursor: pointer!important;">{{area.name}} </span>
                    <span ng-hide="area.subsites.length>0" style="cursor: default!important;">{{area.name}} </span>
                </h2>
            <div style="text-align: center;margin-bottom: 10px" ng-show="area.resources==0">
                <span data-translate="Therearenoassignedsensors"></span>
            </div>
            <div class="col-sm-6 col-md-3 col-lg-2" style="margin-bottom: 5px" ng-repeat="sensor in area.site_resources">
                <div class="sensorbox">
                    <div class="panel-heading"> <span><i ng-show="hasPermission('modifyPermission')" class="fa fa-pencil-square" aria-hidden="true" ng-click="editSensorName(sensor)"></i> {{sensor.name}}</span>
                                <div class="input-group" ng-show="sensor.editing" >
                                    <input type="text" ng-model="sensor.name" class="form-control">
                                    <span class="input-group-btn">
                                        <button class="btn btn-secondary" type="button" ng-click="saveSensor(sensor)">Save</button>
                                    </span>                                                    
                                </div></div>
                        <div class="panel-body" ng-click="goToSensor(sensor.resourceId)">
                            <h5 class="latest_value"><span data-translate="Latestvalue"></span></h5>
                            <h4>{{sensor.metrics.latest+" "+sensor.uom}}</h4>
                           
                             <h5 class="latest_value" style="font-size:12px!important">{{sensor.metrics.latestTime | date:'MMM d, y h:mm:ss'}}</h5>
                                
                        </div>
                    </div>
                </div>
            </div>
            </div>
{'fraction_non_alphanumeric': 0.15297622052809612, 'fraction_numerical': 0.006765285000252436, 'mean_word_length': 1.3110488857776221, 'pattern_counts': {'":': 0, '<': 455, '<?xml version=': 0, '>': 459, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 44, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4600837', 'n_tokens_mistral': 5261, 'n_tokens_neox': 4938, 'n_words': 767}