Skip to content

Commit

Permalink
Merge branch 'release/3.2.2'
Browse files Browse the repository at this point in the history
# Conflicts:
#	Gruntfile.js
  • Loading branch information
Shakeh Brys authored and Shakeh Brys committed Jan 12, 2018
2 parents 2aab824 + 0631983 commit 54e8e2d
Show file tree
Hide file tree
Showing 48 changed files with 2,586 additions and 331 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dockerfile
61 changes: 61 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
################################################################################
# Dockerfile
#
# Josh Kaplan
# [email protected]
#
# This is the Dockerfile for View Editor (VE).
# To build the container, run the following command: `docker build -t ve .`
# To run the container, run `docker run -it -p 80:9000 --name ve ve`
#
################################################################################
FROM node:8

MAINTAINER Josh Kaplan <[email protected]>

WORKDIR /opt/mbee/ve
COPY . /opt/mbee/ve

# Starts the .bowerrc file
RUN echo "{" > .bowerrc

############################## START PROXY CONFIG ##############################
# Uncomment this section to configure the proxy for this container.
# Be sure to also uncomment the proxy line in the bower config
#ENV HTTP_PROXY="http://<YOUR-PROXY-HOST>:<YOUR-PROXY-PORT>"
#ENV HTTPS_PROXY=$HTTP_PROXY
#ENV http_proxy=$HTTP_PROXY
#ENV https_proxy=$HTTPS_PROXY
#ENV NO_PROXY=127.0.0.1,localhost
#RUN npm config set proxy $HTTP_PROXY;
#RUN npm config set https-proxy $HTTPS_PROXY;
#RUN echo "\"https-proxy\": \"${HTTPS_PROXY}\"," >> .bowerrc
############################### END PROXY CONFIG ###############################

############################### START CA CONFIG ################################
# Uncomment this section to configure a Certificate Authority for this container
#ENV CAFILE_DST <YOUR-CA-FILE-DEST>
#ADD <YOUR-CA-FILE-SRC> $CAFILE_DST
#RUN git config --global http.sslCAInfo $CAFILE_DST;
#RUN npm config set cafile $CAFILE_DST;
#RUN echo "\"ca\": \"${CAFILE_DST}\"" >> .bowerrc
################################ END CA CONFIG #################################

# Ends the .bowerrc file
RUN echo "}" >> .bowerrc

# Configures git to use https:// instead of git://
RUN git config --global url."https://".insteadOf git://

# Install dependencies
RUN npm install -g grunt-cli
RUN npm install
RUN node ./node_modules/node-sass/scripts/install.js
RUN npm rebuild node-sass

# Expose ports
EXPOSE 9000

# When the container runs, we run grunt. The second argument should reference a
# server defined in the angular-mms-grunt-servers.json file.
CMD ["grunt", "server:dev"]
Binary file modified Documents/ViewEditorUserGuide-OpenMBEE.pdf
Binary file not shown.
8 changes: 4 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ module.exports = function(grunt) {
options: {
dest: 'build/docs',
html5Mode: false,
title: 'MMS',
title: 'View Editor',
startPage: '/api'
},
api: {
src: ['src/**/*.js'],
title: 'MMS API'
src: ['src/**/*.js', 'app/js/**/*.js'],
title: 'MMS/VE API'
}
},

Expand Down Expand Up @@ -296,7 +296,7 @@ module.exports = function(grunt) {
options: {
publish: [{
id: 'gov.nasa.jpl:evm:zip',
version: '3.2.1',
version: '3.2.2',
path: 'deploy/'
}]
}
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ https://github.com/Open-MBEE/EMS-Webapp/blob/opensource/Documents/ViewEditorUser
```
8. (optional) _grunt clean_ - deletes dist and build folders

## Building and Running with Docker
To build the container, run the following command: `docker build -t ve .`.
To run the container, run `docker run -it -p 80:9000 --name ve ve`.

## Problems?
If you see some error after updating, try cleaning out the bower_components and bower_components_target folders under /app and do a _grunt clean_

Expand Down
2 changes: 1 addition & 1 deletion app/assets/styles/ve/layout/_ve-footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ve-footer {
text-align: center;
z-index: -10;
cursor: default;
bottom: -12px;
bottom: 0px;
padding-top: 1px;
}
}
3 changes: 2 additions & 1 deletion app/assets/styles/ve/layout/_ve-table-filter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
1. Top Level Buttons
-------------------------------------------------------------------*/
.export-csv-button.btn,
.filter-table-button.btn{
.filter-table-button.btn,
.reset-sort-button.btn {
margin: 30px 0 6px;
font-weight:500;
}
Expand Down
5 changes: 5 additions & 0 deletions app/assets/styles/ve/thirdparty/_autosave-plugin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@
}
}

/* Set width to 100% when there is no initial content*/
table.diff{
width: 100%;
box-sizing: border-box;
}

/* Hide credits for plugin author*/
table.diff th.author{
Expand Down
70 changes: 69 additions & 1 deletion app/assets/styles/ve/ve-main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ div.tooltip-inner {
2.6.1 Light input
2.6.2 Minor dark input
2.7 Animation
2.8 Special Icons
2.8.1 Section
3. Table filtering
4. Search
5. Modal fixes
Expand Down Expand Up @@ -262,6 +264,7 @@ div.tooltip-inner {
min-height: 0;
overflow-y: auto;
max-height: 300px;
overflow-x:hidden;
}

button.dropdown-toggle {
Expand Down Expand Up @@ -728,6 +731,7 @@ span.fixed-content-dropdown{
border-radius: 3px;
margin: 2px 10px;
width: calc(100% - 20px);
font-weight: normal;
}

/*------------------------------------------------------------------
Expand Down Expand Up @@ -780,7 +784,27 @@ span.fixed-content-dropdown{
// }

/*------------------------------------------------------------------
3. Table Filtering
2.8 Special Icons
-------------------------------------------------------------------*/

/*------------------------------------------------------------------
2.8.1 Section icon
-------------------------------------------------------------------*/

/*set pseudoclass and reset italic from <i>*/
.section-icon::before{
content:"\00a7";
font-style: normal;
font-weight: bold;
}

/*display inline block to be same width in tree*/
.section-icon{
display:inline-block;
}

/*------------------------------------------------------------------
3. Table Filtering & Sorting
-------------------------------------------------------------------*/

.tableSearch > span {
Expand All @@ -793,6 +817,34 @@ table caption {
padding: 8px 0 14px;
}

.doc-table-header {
background-color:$ve-silver-lighter-1;
}

.filter-input {
margin: 0;
width: 100%
}

.sort-default {
color: $ve-silver-darker-3;
float: right;
}

.sort-activated {
color: $ve-slate-darker-2;
float: right;
}

.sort-default, .sort-activated {
margin: 5px;
}

.sort-default:hover,
.sort-activated:hover {
cursor: pointer;
}

.export-csv-button::before {
content: "\f045";
font-family: FontAwesome;
Expand All @@ -805,6 +857,22 @@ table caption {
padding: 2px 4px;
}

.reset-sort-button::before {
content: "\f0e2";
font-family: FontAwesome;
padding: 2px 4px;
}

.reset-sort-fade.ng-hide {
opacity: 0;
}

.reset-sort-fade.ng-hide-remove,
.reset-sort-fade.ng-hide-add {
display: inline-block !important;
transition: all linear 100ms;
}

.ve-filter-table-form .btn-sm {
margin: 0 4px;
}
Expand Down
40 changes: 34 additions & 6 deletions app/js/mms/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,23 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor
// Check if user is logged in, if so redirect to select page otherwise go to login if the url isn't mapped
$urlRouterProvider.otherwise(function($injector, $location) {
var $rootScope = $injector.get('$rootScope');
if ($location.url().includes('workspace')) {
$rootScope.redirect_from_old_site = true;
} else {
$rootScope.redirect_from_old_site = false;
}
var $state = $injector.get('$state');
var checkLogin = $injector.get('AuthService').checkLogin();
if (checkLogin) {
$state.go('login.select');
if ($location.url().includes('workspace')) {
$rootScope.redirect_from_old_site = true;
$rootScope.crush_url = $location.path();
$state.go('login.redirect');
} else {
$rootScope.redirect_from_old_site = false;
$state.go('login.select');
}
} else {
$state.go('login');
}
});


$stateProvider
.state('login', {
url: '/login',
Expand Down Expand Up @@ -68,6 +71,31 @@ angular.module('mmsApp', ['mms', 'mms.directives', 'app.tpls', 'fa.directive.bor
}
}
})
.state('login.redirect', {
url: '/redirect',
resolve: {
ticket: function($window, URLService, AuthService, $q, ApplicationService) {
var deferred = $q.defer();
AuthService.checkLogin().then(function(data) {
ApplicationService.setUserName(data);
URLService.setTicket($window.localStorage.getItem('ticket'));
deferred.resolve($window.localStorage.getItem('ticket'));
}, function(rejection) {
deferred.reject(rejection);
});
return deferred.promise;
},
projectObs: function(ProjectService) {
return ProjectService.getProjects();
}
},
views: {
'login@': {
templateUrl: 'partials/mms/redirect.html',
controller: 'RedirectCtrl'
}
}
})
.state('login.select', {
url: '/select',
resolve: {
Expand Down
Loading

0 comments on commit 54e8e2d

Please sign in to comment.