You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by om...@apache.org on 2016/01/28 19:05:45 UTC

[1/2] climate git commit: CLIMATE-379 - Allows dataset customisation

Repository: climate
Updated Branches:
  refs/heads/master a9dab5b49 -> 474302106


CLIMATE-379 - Allows dataset customisation


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/aa9f832f
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/aa9f832f
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/aa9f832f

Branch: refs/heads/master
Commit: aa9f832f8828ee6addb2b14e3bec20a86911344f
Parents: 67189a7
Author: Omkar20895 <om...@Omkars-MacBook-Pro.local>
Authored: Wed Jan 20 19:26:59 2016 +0530
Committer: Omkar20895 <om...@Omkars-MacBook-Pro.local>
Committed: Wed Jan 20 19:26:59 2016 +0530

----------------------------------------------------------------------
 .../frontend/app/scripts/controllers/observationselect.js | 10 ++++++++--
 ocw-ui/frontend/app/views/selectobservation.html          |  8 ++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/aa9f832f/ocw-ui/frontend/app/scripts/controllers/observationselect.js
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/scripts/controllers/observationselect.js b/ocw-ui/frontend/app/scripts/controllers/observationselect.js
index 024b567..39d66b4 100644
--- a/ocw-ui/frontend/app/scripts/controllers/observationselect.js
+++ b/ocw-ui/frontend/app/scripts/controllers/observationselect.js
@@ -152,6 +152,7 @@ angular.module('ocwUiApp')
 
       var newDataset = {};
       var input = $('#observationFileInput').val();
+      var name = $('#customDatasetName').val();
 
       // If the backend is limiting directory access we need to add that leader to our path
       // so it remains valid!
@@ -163,8 +164,13 @@ angular.module('ocwUiApp')
       // Save the model path. Note that the path is effectively the "id" for the model.
       newDataset['id'] = input;
       // Grab the file name later for display purposes.
-      var splitFilePath = input.split('/');
-      newDataset['name'] = splitFilePath[splitFilePath.length - 1];
+      if(name == ""){
+        var splitFilePath = input.split('/');
+        newDataset['name'] = splitFilePath[splitFilePath.length - 1];  
+      }
+      else{
+        newDataset['name'] = name;
+      }
       // Save the model parameter variable. We save it twice for consistency and display convenience.
       newDataset['param'] = $scope.paramSelect;
       newDataset['paramName'] = newDataset['param'];

http://git-wip-us.apache.org/repos/asf/climate/blob/aa9f832f/ocw-ui/frontend/app/views/selectobservation.html
----------------------------------------------------------------------
diff --git a/ocw-ui/frontend/app/views/selectobservation.html b/ocw-ui/frontend/app/views/selectobservation.html
index 96a8054..3a93ab3 100644
--- a/ocw-ui/frontend/app/views/selectobservation.html
+++ b/ocw-ui/frontend/app/views/selectobservation.html
@@ -69,6 +69,14 @@ under the License.
           <select class="form-control" ng-model="timeSelect" ng-options="time for time in times"></select>
         </div>
       </div>
+      <div class="row top3">
+        <div class="col-md-5 text-center">
+          Custom Dataset Name
+        </div>
+        <div class="col-md-6">
+          <input id ="customDatasetName" placeHolder="This field is optional..." type="text" predictive-file-browser-input/>
+        </div>
+      </div>
     </div>
   </div>
   <div class="row top3">


[2/2] climate git commit: close #276

Posted by om...@apache.org.
close #276


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/47430210
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/47430210
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/47430210

Branch: refs/heads/master
Commit: 474302106e6788eba4e00d9c6bd09b7ec5cc4017
Parents: a9dab5b aa9f832
Author: Omkar20895 <om...@Omkars-MacBook-Pro.local>
Authored: Thu Jan 28 23:34:30 2016 +0530
Committer: Omkar20895 <om...@Omkars-MacBook-Pro.local>
Committed: Thu Jan 28 23:34:30 2016 +0530

----------------------------------------------------------------------
 .../frontend/app/scripts/controllers/observationselect.js | 10 ++++++++--
 ocw-ui/frontend/app/views/selectobservation.html          |  8 ++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------