<commit_before><!DOCTYPE html>
<!--
Copyright 2015 Space Dynamics Laboratory - Utah State University Research Foundation.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div ng-controller="AdminEditcomponentCtrl" style="padding-left: 20px; padding-right: 20px;">
	
	<loader trigger="componentLoader"></loader>
  <stickydiv fixed-offset-top=".top" fixed-offset-left="" element-id="editComponentToolbar">
    <div>
      <span>
        <button class="btn btn-default" ng-click="addComponent()" title="Add Component"><i class="fa fa-plus"></i>&nbsp;Add</button>
        <button class="btn btn-default" ng-click="exportAll()" ng-disabled="selectedComponents.length === 0" title="Export Selected Components"><i class="fa fa-sign-out"></i>&nbsp;Export</button>
        <button class="btn btn-default" ng-click="flags.showUpload=!flags.showUpload;" title="Import Components"><i class="fa fa-sign-in"></i>&nbsp;Import</button>      
        &nbsp;Show: &nbsp;
        <span class="btn-group">
         <label class="btn btn-default" ng-model="pagination.control.approvalState" ng-change="refreshComponents()" btn-radio="'ALL'">All</label>
         <label class="btn btn-default" ng-model="pagination.control.approvalState" ng-change="refreshComponents()" btn-radio="'A'">Approved</label>
         <label class="btn btn-default" ng-model="pagination.control.approvalState" ng-change="refreshComponents()" btn-radio="'P'">Pending</label>
         <label class="btn btn-default" ng-model="pagination.control.approvalState" ng-change="refreshComponents()" btn-radio="'N'">Not Submitted</label>				
       </span>		
     </span>
     <filterquery data="allComponentsWatch.data" url="api/v1/resource/components/filterable" sort-by="name" sort-order="ASC" type="default" set-features="pagination.features" control="pagination.control"></filterquery>
     <div ng-show="flags.showUpload" style="border: 2px rgb(103, 103, 103) solid; padding: 20px;" > 
      <div class="form-group">
        <label>File Input</label>
        <input type="file" nv-file-select onchange="utils.handleFileQueue(angular.element(this).scope().componentUploader, this)" uploader="componentUploader" name="uploadFile" width="100" />
        <p class="help-block">JSON of full component model; or zip containing components, media and resources.  (see export for format)</p>  
        <input type="checkbox" ng-model="componentUploadOptions.uploadReviews" /> Upload Reviews<br>
        <input type="checkbox" ng-model="componentUploadOptions.uploadQuestions" /> Upload Questions<br>
        <input type="checkbox" ng-model="componentUploadOptions.uploadTags" /> Upload Tags<br>
      </div>
      <button ng-click="componentUploader.uploadAll()" class="btn btn-primary">Upload</button>      
    </div>  
    <form name="exportForm" action="api/v1/resource/components/export" method="POST" >
      <p ng-repeat="id in selectedComponents">
        <input type="hidden" name="id" value="{{id}}" />
      </p>      
    </form>
  </div>
  <div style="clear:both" id="endOfComponentToolbar"></div>
</stickydiv>
<table class="table table-striped table-bordered admin-table stickytable">
  <thead>
    <tr>
      <th style="width: 25px;"><input type="checkbox" ng-click="selectAllComponents();" ng-model="selectAllComps.flag" /></th>
      <th><a href="" ng-click="setPredicate('name', 'components');">Name <span ng-show="predicate['components']  === 'name'"><i ng-show="!reverse['components'] " class="fa fa-sort-alpha-asc"></i><i ng-show="reverse['components']" class="fa fa-sort-alpha-desc"></i></span></a></th>
      <th>Description</th>
      <th><a href="" ng-click="setPredicate('lastActivityDts', 'components');" title="Last time the component of any component date was updated">Last Activity Date <span ng-show="predicate['components']  === 'lastActivityDts'"><i ng-show="!reverse['components'] " class="fa fa-sort-alpha-asc"></i><i ng-show="reverse['components']" class="fa fa-sort-alpha-desc"></i></span></a></th>
      <th><a href="" ng-click="setPredicate('approvedDts', 'components');">Approval Date<span ng-show="predicate['components']  === 'approvedDts'"><i ng-show="!reverse['components'] " class="fa fa-sort-alpha-asc"></i><i ng-show="reverse['components']" class="fa fa-sort-alpha-desc"></i></span></a></th>
      <th align="center"><a href="" ng-click="setPredicate('approvalState', 'components');">Approval State<span ng-show="predicate['components']  === 'approvalState'"><i ng-show="!reverse['components'] " class="fa fa-sort-alpha-asc"></i><i ng-show="reverse['components']" class="fa fa-sort-alpha-desc"></i></span></a></th>
      <th><a href="" ng-click="setPredicate('submittedDts', 'components');">Submitted Date<span ng-show="predicate['components']  === 'submittedDts'"><i ng-show="!reverse['components'] " class="fa fa-sort-alpha-asc"></i><i ng-show="reverse['components']" class="fa fa-sort-alpha-desc"></i></span></a></th>
      <th><a href="" ng-click="setPredicate('integrationManagement', 'components');"  title="Shows if the component's data is being patially managed by an external system ">Integration Management<span ng-show="predicate['components']  === 'integrationManagement'"><i ng-show="!reverse['components'] " class="fa fa-sort-alpha-asc"></i><i ng-show="reverse['components']" class="fa fa-sort-alpha-desc"></i></span></a></th>				
      <th style="min-width: 170px;">Action</th>
    </tr>	
  </thead>
  <tbody>
    <tr ng-repeat="component in filteredComponents" >
      <td><input type="checkbox" ng-click="selectComponent(component);" ng-model="component.selected"  /></td>
      <td>{{component.component.name}}</td>
      <td>{{component.component.description | limitTo: 100}}</td>
      <td>{{component.component.lastActivityDts | date:'MM/dd/yyyy h:mm a'}}</td>
      <td>{{component.component.approvedDts | date:'MM/dd/yyyy h:mm a'}}</td>
      <td align="center">{{component.component.approvalState}}<br>{{component.component.submittedDts | date:'MM/dd/yyyy h:mm a'}}</td>
      <td>{{component.component.submittedDts | date:'MM/dd/yyyy h:mm a'}}</td>		
      <td>{{component.integrationManagement}}</td>
      <td style="padding:0px 3px !important; vertical-align: middle;">&nbsp;	 	
        <button class="btn btn-default btn-sm" ng-click="editComponent(component);"  title="Edit Component"><i class="fa fa-edit"></i></button>
        <button class="btn btn-info btn-sm" ng-click="preview(component);"  title="Preview Component"><i class="fa fa-binoculars"></i></button>
        <button class="btn btn-warning btn-sm" ng-click="toggleStatus(component)"  title="Activate/Inactivate" ng-class="component.component.activeStatus === 'I' ? 'inverted':'' "><i class="fa fa-power-off"></i></button>                    
        <button class="btn btn-danger btn-sm" ng-click="deleteComponent(component.component)"  title="Delete"><i class="fa fa-trash"></i></button>
      </td>
    </tr>         
  </tbody>
</table>

</div><commit_msg>quick fix for a missing sort.<commit_after><!DOCTYPE html>
<!--
Copyright 2015 Space Dynamics Laboratory - Utah State University Research Foundation.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div ng-controller="AdminEditcomponentCtrl" style="padding-left: 20px; padding-right: 20px;">
	
	<loader trigger="componentLoader"></loader>
  <stickydiv fixed-offset-top=".top" fixed-offset-left="" element-id="editComponentToolbar">
    <div>
      <span>
        <button class="btn btn-default" ng-click="addComponent()" title="Add Component"><i class="fa fa-plus"></i>&nbsp;Add</button>
        <button class="btn btn-default" ng-click="exportAll()" ng-disabled="selectedComponents.length === 0" title="Export Selected Components"><i class="fa fa-sign-out"></i>&nbsp;Export</button>
        <button class="btn btn-default" ng-click="flags.showUpload=!flags.showUpload;" title="Import Components"><i class="fa fa-sign-in"></i>&nbsp;Import</button>      
        &nbsp;Show: &nbsp;
        <span class="btn-group">
         <label class="btn btn-default" ng-model="pagination.control.approvalState" ng-change="refreshComponents()" btn-radio="'ALL'">All</label>
         <label class="btn btn-default" ng-model="pagination.control.approvalState" ng-change="refreshComponents()" btn-radio="'A'">Approved</label>
         <label class="btn btn-default" ng-model="pagination.control.approvalState" ng-change="refreshComponents()" btn-radio="'P'">Pending</label>
         <label class="btn btn-default" ng-model="pagination.control.approvalState" ng-change="refreshComponents()" btn-radio="'N'">Not Submitted</label>				
       </span>		
     </span>
     <filterquery data="allComponentsWatch.data" url="api/v1/resource/components/filterable" sort-by="name" sort-order="ASC" type="default" set-features="pagination.features" control="pagination.control"></filterquery>
     <div ng-show="flags.showUpload" style="border: 2px rgb(103, 103, 103) solid; padding: 20px;" > 
      <div class="form-group">
        <label>File Input</label>
        <input type="file" nv-file-select onchange="utils.handleFileQueue(angular.element(this).scope().componentUploader, this)" uploader="componentUploader" name="uploadFile" width="100" />
        <p class="help-block">JSON of full component model; or zip containing components, media and resources.  (see export for format)</p>  
        <input type="checkbox" ng-model="componentUploadOptions.uploadReviews" /> Upload Reviews<br>
        <input type="checkbox" ng-model="componentUploadOptions.uploadQuestions" /> Upload Questions<br>
        <input type="checkbox" ng-model="componentUploadOptions.uploadTags" /> Upload Tags<br>
      </div>
      <button ng-click="componentUploader.uploadAll()" class="btn btn-primary">Upload</button>      
    </div>  
    <form name="exportForm" action="api/v1/resource/components/export" method="POST" >
      <p ng-repeat="id in selectedComponents">
        <input type="hidden" name="id" value="{{id}}" />
      </p>      
    </form>
  </div>
  <div style="clear:both" id="endOfComponentToolbar"></div>
</stickydiv>
<table class="table table-striped table-bordered admin-table stickytable">
  <thead>
    <tr>
      <th style="width: 25px;"><input type="checkbox" ng-click="selectAllComponents();" ng-model="selectAllComps.flag" /></th>
      <th><a href="" ng-click="setPredicate('name', 'components');">Name <span ng-show="predicate['components']  === 'name'"><i ng-show="!reverse['components'] " class="fa fa-sort-alpha-asc"></i><i ng-show="reverse['components']" class="fa fa-sort-alpha-desc"></i></span></a></th>
      <th>Description</th>
      <th><a href="" ng-click="setPredicate('lastActivityDts', 'components');" title="Last time the component of any component date was updated">Last Activity Date <span ng-show="predicate['components']  === 'lastActivityDts'"><i ng-show="!reverse['components'] " class="fa fa-sort-alpha-asc"></i><i ng-show="reverse['components']" class="fa fa-sort-alpha-desc"></i></span></a></th>
      <th><a href="" ng-click="setPredicate('approvedDts', 'components');">Approval Date<span ng-show="predicate['components']  === 'approvedDts'"><i ng-show="!reverse['components'] " class="fa fa-sort-alpha-asc"></i><i ng-show="reverse['components']" class="fa fa-sort-alpha-desc"></i></span></a></th>
      <th align="center"><a href="" ng-click="setPredicate('approvalState', 'components');">Approval State<span ng-show="predicate['components']  === 'approvalState'"><i ng-show="!reverse['components'] " class="fa fa-sort-alpha-asc"></i><i ng-show="reverse['components']" class="fa fa-sort-alpha-desc"></i></span></a></th>
      <th><a href="" ng-click="setPredicate('submittedDts', 'components');">Submitted Date<span ng-show="predicate['components']  === 'submittedDts'"><i ng-show="!reverse['components'] " class="fa fa-sort-alpha-asc"></i><i ng-show="reverse['components']" class="fa fa-sort-alpha-desc"></i></span></a></th>
      <th><a href="" ng-click="setPredicate('integrationManagement', 'components');"  title="Shows if the component's data is being patially managed by an external system ">Integration Management<span ng-show="predicate['components']  === 'integrationManagement'"><i ng-show="!reverse['components'] " class="fa fa-sort-alpha-asc"></i><i ng-show="reverse['components']" class="fa fa-sort-alpha-desc"></i></span></a></th>				
      <th style="min-width: 170px;">Action</th>
    </tr>	
  </thead>
  <tbody>
    <tr ng-repeat="component in filteredComponents" >
      <td><input type="checkbox" ng-click="selectComponent(component);" ng-model="component.selected"  /></td>
      <td>{{component.component.name}}</td>
      <td>{{component.component.description | limitTo: 100}}</td>
      <td>{{component.component.lastActivityDts | date:'MM/dd/yyyy h:mm a'}}</td>
      <td>{{component.component.approvedDts | date:'MM/dd/yyyy h:mm a'}}</td>
      <td align="center">{{component.component.approvalState}}<br>{{component.component.submittedDts | date:'MM/dd/yyyy h:mm a'}}</td>
      <td>{{component.component.submittedDts | date:'MM/dd/yyyy h:mm a'}}</td>		
      <td>{{component.component.integrationManagement}}</td>
      <td style="padding:0px 3px !important; vertical-align: middle;">&nbsp;	 	
        <button class="btn btn-default btn-sm" ng-click="editComponent(component);"  title="Edit Component"><i class="fa fa-edit"></i></button>
        <button class="btn btn-info btn-sm" ng-click="preview(component);"  title="Preview Component"><i class="fa fa-binoculars"></i></button>
        <button class="btn btn-warning btn-sm" ng-click="toggleStatus(component)"  title="Activate/Inactivate" ng-class="component.component.activeStatus === 'I' ? 'inverted':'' "><i class="fa fa-power-off"></i></button>                    
        <button class="btn btn-danger btn-sm" ng-click="deleteComponent(component.component)"  title="Delete"><i class="fa fa-trash"></i></button>
      </td>
    </tr>         
  </tbody>
</table>

</div>
{'fraction_non_alphanumeric': 0.19026489175742908, 'fraction_numerical': 0.005378512841199408, 'mean_word_length': 4.851691581431943, 'pattern_counts': {'":': 0, '<': 349, '<?xml version=': 0, '>': 349, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3747073', 'n_tokens_mistral': 4621, 'n_tokens_neox': 4408, 'n_words': 916}