Skip to content

Commit

Permalink
Too much time to debug Windows issues on Mac. Deployed full js files …
Browse files Browse the repository at this point in the history
…to minimize such efforts.
  • Loading branch information
hlngo committed Jul 6, 2017
1 parent a8600e9 commit 8c88849
Show file tree
Hide file tree
Showing 58 changed files with 60,166 additions and 506 deletions.
55 changes: 46 additions & 9 deletions lib/openeis-ui/openeis/ui/static/openeis-ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,54 @@ <h1><a href="projects">OpenEIS</a></h1><!-- comment to remove whitespace between
<div ng-view></div>
<div class="footer" ng-if="account && version" ng-bind="'OpenEIS ' + version"></div>
<script type="text/javascript" src="settings.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/d3.min.js"></script>
<script type="text/javascript" src="js/d3-tip.min.js"></script>
<script type="text/javascript" src="js/jstz.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/d3.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/jstz.js"></script>
<script type="text/javascript" src="js/angular.js"></script>
<script type="text/javascript" src="js/angular-animate.js"></script>
<script type="text/javascript" src="js/angular-cookies.js"></script>
<script type="text/javascript" src="js/angular-file-upload.js"></script>
<script type="text/javascript" src="js/angular-mocks.js"></script>
<script type="text/javascript" src="js/angular-recursion.js"></script>
<script type="text/javascript" src="js/angular-resource.js"></script>
<script type="text/javascript" src="js/angular-route.js"></script>
<script type="text/javascript" src="js/angular-sanitize.js"></script>
<script type="text/javascript" src="js/autofill-event.js"></script>
<script type="text/javascript" src="js/tv4.js"></script>
<script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" src="js/AccountCtrl.js"></script>
<script type="text/javascript" src="js/Analyses.js"></script>
<script type="text/javascript" src="js/Applications.js"></script>
<script type="text/javascript" src="js/Auth.js"></script>
<script type="text/javascript" src="js/ConfigureTimestampCtrl.js"></script>
<script type="text/javascript" src="js/DataFiles.js"></script>
<script type="text/javascript" src="js/DataMapCtrl.js"></script>
<script type="text/javascript" src="js/DataMaps.js"></script>
<script type="text/javascript" src="js/DataSetCtrl.js"></script>
<script type="text/javascript" src="js/DataSetFilters.js"></script>
<script type="text/javascript" src="js/DataSetManipulateCtrl.js"></script>
<script type="text/javascript" src="js/DataSets.js"></script>
<script type="text/javascript" src="js/LoginCtrl.js"></script>
<script type="text/javascript" src="js/NewAnalysisCtrl.js"></script>
<script type="text/javascript" src="js/NewDataMapCtrl.js"></script>
<script type="text/javascript" src="js/NewDataSetCtrl.js"></script>
<script type="text/javascript" src="js/ProjectCtrl.js"></script>
<script type="text/javascript" src="js/Projects.js"></script>
<script type="text/javascript" src="js/ProjectsCtrl.js"></script>
<script type="text/javascript" src="js/RecoveryCtrl.js"></script>
<script type="text/javascript" src="js/SharedAnalyses.js"></script>
<script type="text/javascript" src="js/SharedAnalysesCtrl.js"></script>
<script type="text/javascript" src="js/SignUpCtrl.js"></script>
<script type="text/javascript" src="js/analysisReport.js"></script>
<script type="text/javascript" src="js/app.templates.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/fileUpload.js"></script>
<script type="text/javascript" src="js/filters.js"></script>
<script type="text/javascript" src="js/modals.js"></script>
<script type="text/javascript" src="js/rickshaw.js"></script>
<script type="text/javascript" src="js/rickshaw_ex.js"></script>
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript" src="js/angular-file-upload.min.js"></script>
<script type="text/javascript" src="js/angular-recursion.min.js"></script>
<script type="text/javascript" src="js/app.min.js"></script>
<script type="text/javascript" src="js/sensorContainer.js"></script>
</body>

</html>
134 changes: 134 additions & 0 deletions lib/openeis-ui/openeis/ui/static/openeis-ui/js/AccountCtrl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
// Copyright (c) 2014, Battelle Memorial Institute
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The views and conclusions contained in the software and documentation are those
// of the authors and should not be interpreted as representing official policies,
// either expressed or implied, of the FreeBSD Project.
//
//
// This material was prepared as an account of work sponsored by an
// agency of the United States Government. Neither the United States
// Government nor the United States Department of Energy, nor Battelle,
// nor any of their employees, nor any jurisdiction or organization
// that has cooperated in the development of these materials, makes
// any warranty, express or implied, or assumes any legal liability
// or responsibility for the accuracy, completeness, or usefulness or
// any information, apparatus, product, software, or process disclosed,
// or represents that its use would not infringe privately owned rights.
//
// Reference herein to any specific commercial product, process, or
// service by trade name, trademark, manufacturer, or otherwise does
// not necessarily constitute or imply its endorsement, recommendation,
// or favoring by the United States Government or any agency thereof,
// or Battelle Memorial Institute. The views and opinions of authors
// expressed herein do not necessarily state or reflect those of the
// United States Government or any agency thereof.
//
// PACIFIC NORTHWEST NATIONAL LABORATORY
// operated by BATTELLE for the UNITED STATES DEPARTMENT OF ENERGY
// under Contract DE-AC05-76RL01830

angular.module('openeis-ui')
.controller('AccountCtrl', function ($scope, Auth, $timeout) {
var accountOrig;

Auth.account().then(function (account) {
$scope.account = account;
accountOrig = angular.copy(account);
});

$scope.$watchCollection('account', function (newValue) {
if (newValue.first_name !== accountOrig.first_name ||
newValue.email != accountOrig.email) {
$scope.profile.changed = true;
} else {
$scope.profile.changed = false;
}
});

$scope.profile = {
clearAlerts: function () {
$scope.profile.success = false;
$scope.profile.error = false;
},
update: function () {
$scope.profile.clearAlerts();

Auth.accountUpdate({
first_name: $scope.account.first_name,
email: $scope.account.email,
}).then(function (response) {
$scope.profile.success = true;
$scope.profile.changed = false;
accountOrig = angular.copy($scope.account);
$timeout($scope.profile.clearAlerts, 2000);
}, function (rejection) {
if (rejection.status === 400) {
angular.forEach(rejection.data, function (v, k) {
if (angular.isArray(v)) {
rejection.data[k] = v.join('<br>');
}
});
}

$scope.profile.error = rejection;
});
},
};

$scope.password = {
clearAlerts: function () {
$scope.password.mismatch = false;
$scope.password.success = false;
$scope.password.error = false;
},
update: function () {
$scope.password.clearAlerts();

if ($scope.password.new !== $scope.password.newConfirm) {
$scope.password.mismatch = true;
return;
}

Auth.accountPassword({
old_password: $scope.password.current,
new_password: $scope.password.new,
}).then(function (response) {
$scope.password.success = true;
$scope.password.current = '';
$scope.password.new = '';
$scope.password.newConfirm = '';
$timeout($scope.password.clearAlerts, 2000);
}, function (rejection) {
if (rejection.status === 400) {
angular.forEach(rejection.data, function (v, k) {
if (angular.isArray(v)) {
rejection.data[k] = v.join('<br>');
}
});
}
$scope.password.error = rejection;
});
},
};
});
89 changes: 89 additions & 0 deletions lib/openeis-ui/openeis/ui/static/openeis-ui/js/Analyses.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// Copyright (c) 2014, Battelle Memorial Institute
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The views and conclusions contained in the software and documentation are those
// of the authors and should not be interpreted as representing official policies,
// either expressed or implied, of the FreeBSD Project.
//
//
// This material was prepared as an account of work sponsored by an
// agency of the United States Government. Neither the United States
// Government nor the United States Department of Energy, nor Battelle,
// nor any of their employees, nor any jurisdiction or organization
// that has cooperated in the development of these materials, makes
// any warranty, express or implied, or assumes any legal liability
// or responsibility for the accuracy, completeness, or usefulness or
// any information, apparatus, product, software, or process disclosed,
// or represents that its use would not infringe privately owned rights.
//
// Reference herein to any specific commercial product, process, or
// service by trade name, trademark, manufacturer, or otherwise does
// not necessarily constitute or imply its endorsement, recommendation,
// or favoring by the United States Government or any agency thereof,
// or Battelle Memorial Institute. The views and opinions of authors
// expressed herein do not necessarily state or reflect those of the
// United States Government or any agency thereof.
//
// PACIFIC NORTHWEST NATIONAL LABORATORY
// operated by BATTELLE for the UNITED STATES DEPARTMENT OF ENERGY
// under Contract DE-AC05-76RL01830

angular.module('openeis-ui.services.analyses', ['ngResource'])
.service('Analyses', function ($resource, $q) {
var Analyses = this,
resource = $resource(settings.API_URL + 'analyses/:analysisId', { analysisId: '@id' }, {
create: { method: 'POST' },
save: { method: 'PUT' },
}),
dataResource = $resource(settings.API_URL + 'analyses/:analysisId/data');

Analyses.get = function (analysisId) {
return resource.get({ analysisId: analysisId });
};

Analyses.query = function (projectId) {
return resource.query({ project: projectId });
};

Analyses.create = function(report) {
return resource.create(report);
};

Analyses.getData = function (analysisId) {
return dataResource.get({ analysisId: analysisId }).$promise.then(function (outputs) {
outputData = {};
dataPromises = [];

angular.forEach(outputs, function (output, name) {
if (name === '$promise' || name === '$resolved') { return; }
dataPromises.push(dataResource.query({ analysisId: analysisId, output: name }).$promise.then(function (data) {
outputData[name] = data;
}));
});

return $q.all(dataPromises).then(function () {
return outputData;
});
});
};
});
60 changes: 60 additions & 0 deletions lib/openeis-ui/openeis/ui/static/openeis-ui/js/Applications.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Copyright (c) 2014, Battelle Memorial Institute
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The views and conclusions contained in the software and documentation are those
// of the authors and should not be interpreted as representing official policies,
// either expressed or implied, of the FreeBSD Project.
//
//
// This material was prepared as an account of work sponsored by an
// agency of the United States Government. Neither the United States
// Government nor the United States Department of Energy, nor Battelle,
// nor any of their employees, nor any jurisdiction or organization
// that has cooperated in the development of these materials, makes
// any warranty, express or implied, or assumes any legal liability
// or responsibility for the accuracy, completeness, or usefulness or
// any information, apparatus, product, software, or process disclosed,
// or represents that its use would not infringe privately owned rights.
//
// Reference herein to any specific commercial product, process, or
// service by trade name, trademark, manufacturer, or otherwise does
// not necessarily constitute or imply its endorsement, recommendation,
// or favoring by the United States Government or any agency thereof,
// or Battelle Memorial Institute. The views and opinions of authors
// expressed herein do not necessarily state or reflect those of the
// United States Government or any agency thereof.
//
// PACIFIC NORTHWEST NATIONAL LABORATORY
// operated by BATTELLE for the UNITED STATES DEPARTMENT OF ENERGY
// under Contract DE-AC05-76RL01830

angular.module('openeis-ui.services.applications', ['ngResource'])
.service('Applications', function ($resource) {
var Applications = this,
resource = $resource(settings.API_URL + 'applications');

Applications.query = function () {
return resource.query();
};
});

Loading

0 comments on commit 8c88849

Please sign in to comment.