Skip to content

Commit

Permalink
Merge pull request #127 from Open-MBEE/release/3.5.2
Browse files Browse the repository at this point in the history
Release 3.5.2
  • Loading branch information
shakeh authored Apr 8, 2019
2 parents ff66ead + 6772d12 commit 9aefacc
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 6 deletions.
10 changes: 8 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ module.exports = function(grunt) {
host: 'mms-ts-uat.jpl.nasa.gov',//'localhost',//'100.64.243.161',
port: 8080
},
{
context: '/xlrapi',
https: serverHttps,
host: servers[key],
port: serverPort
},
{
context: '/alfresco', // '/api'
host: servers[key],
Expand Down Expand Up @@ -347,7 +353,7 @@ module.exports = function(grunt) {
artifactory: {
options: {
url: artifactoryUrl,
repository: releaseRepo, //snapshotRepo,
repository: releaseRepo,
username: artifactoryUser,
password: artifactoryPassword
},
Expand All @@ -358,7 +364,7 @@ module.exports = function(grunt) {
options: {
publish: [{
id: groupId + ':ve:zip',
version: '3.5.1',
version: '3.5.2',
path: 'deploy/'
}]
}
Expand Down
3 changes: 2 additions & 1 deletion app/js/mms/controllers/tree.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,8 @@ function($anchorScroll, $q, $filter, $location, $uibModal, $scope, $rootScope, $
$scope.searchOptions = {
callback: addExistingView,
itemsPerPage: 200,
filterQueryList: [queryFilter]
filterQueryList: [queryFilter],
hideFilterOptions: true
};

$scope.ok = function() {
Expand Down
92 changes: 92 additions & 0 deletions app/js/mms/directives/runXlr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
'use strict';

angular.module('mmsApp')
.directive('runXlr', ['$http', '$uibModal', '$window', 'growl', 'ApplicationService', runXlr]);

function runXlr($http, $uibModal, $window, growl, ApplicationService) {
return {
template: '<button class="btn btn-primary" ng-click="runXLR()">{{xlrTaskName}}</button>',
scope: {
templateId: '@',
xlrTaskName: '@'
},
controller: ['$scope', runXlrCtrl],
link: runXlrLink
};
function runXlrLink(scope, element, attrs, ctrls) {}

function runXlrCtrl($scope) {
var modalOpen = false;
$scope.xlrTaskName = $scope.xlrTaskName ? $scope.xlrTaskName : 'Sync FN to JPL Network';
$scope.runXLR = runXLR;
function runXLR() {

modalOpen = true;
$uibModal.open({
template: '<div class="modal-header"><h4>Please login to {{xlrTaskName}}.</h4></div><div class="modal-body"><form name="loginForm" ng-submit="login(credentials)">' +
'<input type="text" class="form-control" ng-model="credentials.username" placeholder="Username" style="margin-bottom: 1.5em;" autofocus>' +
'<input type="password" class="form-control" ng-model="credentials.password" placeholder="Password" style="margin-bottom: 1.5em;">' +
'<button class="btn btn-block btn-primary" type="submit">LOG IN <span ng-if="spin" ><i class="fa fa-spin fa-spinner"></i>' +
'</span></button></form></div>',
scope: $scope,
backdrop: 'static',
controller: ['$scope', '$uibModalInstance', function ($scope, $uibModalInstance) {
$scope.credentials = {
username: '',
password: ''
};
$scope.spin = false;

function make_base_auth(user, password) {
var tok = user + ':' + password;
var hash = $window.btoa(tok);
return "Basic " + hash;
}
$scope.login = function (credentials) {
$scope.spin = true;
var baseAuth = make_base_auth(credentials.username, credentials.password);
var email = credentials.username + '@jpl.nasa.gov';
var postBody = {
"releaseTitle": "CAE Portal Sync",
"releaseVariables": {
"contentEditor": credentials.username,
"editorEmail": email
},
"autoStart": true
};

var link = "/xlrapi/v1/templates/Applications/" + $scope.templateId + "/create";
var config = {
method: 'POST',
url: link,
headers: {
'Authorization': baseAuth,
"Content-Type": "application/json",
"cache-control": "no-cache",
},
"data": postBody,
"withCredentials": true,
"async": true,
"crossDomain": true,
"processData": false
};
$http(config).then(function() {
growl.success($scope.xlrTaskName + ' is running. You will receive a completion email');
}, function(error){
growl.error($scope.xlrTaskName + ' has failed.');
}).finally(function() {
$scope.spin = false;
modalOpen = false;
$uibModalInstance.dismiss();
});
};
}],
size: 'md'
}).result.finally(function(){
modalOpen = false;
});

}

}
}
2 changes: 1 addition & 1 deletion app/js/mms/directives/veNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function veNav($templateCache, $rootScope, $state, hotkeys, growl, $location, $u
hotkeys.toggleCheatSheet();
};
scope.toggleAbout = function() {
scope.veV = '3.5.1';
scope.veV = '3.5.2';
scope.mmsV = 'Loading...';
ApplicationService.getMmsVersion().then(function(data) {
scope.mmsV = data;
Expand Down
1 change: 1 addition & 0 deletions app/partials/mms/add-pe.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ <h4 class="pe-type-{{presentationElemType}}">Add {{presentationElemType | lowerc
</div>

<div ng-show="!createForm">
<p>Begin by searching for the {{presentationElemType | lowercase}}, then click its name or documentation to add the {{presentationElemType | lowercase}}.</p>
<mms-search mms-options="searchOptions" mms-project-id="{{viewOrSectionOb._projectId}}" mms-ref-id="{{viewOrSectionOb._refId}}"></mms-search>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions app/partials/mms/new-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ <h4 class="item-type-View"></i>Add view</h4>
</div>

<div ng-show="!createForm">
<p>Begin by searching for the view, then click its name or documentation to add the view.</p>
<div class="radio">
<label><input type="radio" ng-model="newViewAggr.type" value="shared">Add view and its children</label><br>
<label><input type="radio" ng-model="newViewAggr.type" value="none">Add view only</label>
Expand Down
2 changes: 1 addition & 1 deletion src/directives/mmsSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function mmsSearch($window, $anchorScroll, CacheService, ElementService, Project

scope.getTypeClass = function (element) {
// Get Type
scope.elementTypeClass = UtilsService.getElementTypeClass(element, ViewService.getElementType(element));
return UtilsService.getElementTypeClass(element, ViewService.getElementType(element));
};

// Set search options
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ckeditor/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CKEDITOR.editorConfig = function( config ) {
config.autoGrow_onStartup = true;
config.startupFocus = 'end';
config.mathJaxLib = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
config.allowedContent = true;
config.allowedContent = true;
config.specialChars = ['&euro;', '&lsquo;', '&rsquo;', '&ldquo;', '&rdquo;', '&ndash;', '&mdash;', '&iexcl;', '&cent;', '&pound;', '&curren;', '&yen;', '&brvbar;', '&sect;', '&uml;', '&copy;', '&ordf;', '&laquo;', '&not;', '&reg;', '&macr;', '&deg;', '&sup2;', '&sup3;', '&acute;', '&micro;', '&para;', '&middot;', '&cedil;', '&sup1;', '&ordm;', '&raquo;', '&frac14;', '&frac12;', '&frac34;', '&iquest;', '&Agrave;', '&Aacute;', '&Acirc;', '&Atilde;', '&Auml;', '&Aring;', '&AElig;', '&Ccedil;', '&Egrave;', '&Eacute;', '&Ecirc;', '&Euml;', '&Igrave;', '&Iacute;', '&Icirc;', '&Iuml;', '&ETH;', '&Ntilde;', '&Ograve;', '&Oacute;', '&Ocirc;', '&Otilde;', '&Ouml;', '&times;', '&Oslash;', '&Ugrave;', '&Uacute;', '&Ucirc;', '&Uuml;', '&Yacute;', '&THORN;', '&szlig;', '&agrave;', '&aacute;', '&acirc;', '&atilde;', '&auml;', '&aring;', '&aelig;', '&ccedil;', '&egrave;', '&eacute;', '&ecirc;', '&euml;', '&igrave;', '&iacute;', '&icirc;', '&iuml;', '&eth;', '&ntilde;', '&ograve;', '&oacute;', '&ocirc;', '&otilde;', '&ouml;', '&divide;', '&oslash;', '&ugrave;', '&uacute;', '&ucirc;', '&uuml;', '&yacute;', '&thorn;', '&yuml;', '&OElig;', '&oelig;', '&#372;', '&#374', '&#373', '&#375;', '&sbquo;', '&#8219;', '&bdquo;', '&hellip;', '&trade;', '&#9658;', '&bull;', '&rarr;', '&rArr;', '&hArr;', '&diams;', '&asymp;','&alpha;','&beta;','&gamma;','&delta;','&epsilon;','&zeta;','&eta;','&theta;','&iota;','&kappa;','&lambda;','&mu;','&nu;','&xi;','&omicron;','&pi;','&rho;','&sigma;','&tau;','&upsilon;','&phi;','&chi;','&psi;','&omega;','&Alpha;','&Beta;','&Gamma;','&Delta;','&Epsilon;','&Zeta;','&Eta;','&Theta;','&Iota;','&Kappa;','&Lambda;','&Mu;','&Nu;','&Xi;','&Omicron;','&Pi;','&Rho;','&Sigma;','&Tau;','&Upsilon;','&Phi;','&Chi;','&Psi;','&Omega;'];
//config.protectedSource.push( /<i[^>]*><\/i>/g );

Expand Down

0 comments on commit 9aefacc

Please sign in to comment.