Skip to content

Commit

Permalink
Merged from master to resolve build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
akhenry committed Oct 5, 2016
2 parents f1d2072 + 8a00181 commit 3e9c0eb
Show file tree
Hide file tree
Showing 92 changed files with 622 additions and 289 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Differences between the two APIs include a move away from a declarative system o
## Building and Running Open MCT Locally

Building and running Open MCT in your local dev environment is very easy. Be sure you have [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/) installed, then follow the directions below. Need additional information? Check out the [Getting Started](https://nasa.github.io/openmct/getting-started/) page on our website.
(These instructions assume you are installing as a non-root user; developers have [reported issues](https://github.com/nasa/openmct/issues/1151) running these steps with root privileges.)

1. Clone the source code

Expand Down
10 changes: 3 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,10 @@
});

app.use('/proxyUrl', function proxyRequest(req, res, next) {
var targetUrl = req.query.url;
var queryParameters = req.query;
console.log('Proxying request to: ', targetUrl);
delete queryParameters['url'];
console.log('Proxying request to: ', req.query.url);
req.pipe(request({
url: targetUrl,
strictSSL: false,
qs: queryParameters
url: req.query.url,
strictSSL: false
}).on('error', next)).pipe(res);
});

Expand Down
3 changes: 1 addition & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"zepto": "^1.1.6",
"eventemitter3": "^1.2.0",
"d3": "~4.1.0",
"html2canvas": "^0.4.1",
"jspdf": "^1.2.61"
"html2canvas": "^0.4.1"
}
}
2 changes: 1 addition & 1 deletion build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ WEBSITE_DIRECTORY="website"
BUILD_SHA=`git rev-parse HEAD`

# A remote will be created for the git repository we are pushing to.
# Don't worry, as this entire directory will get trashed inbetween builds.
# Don't worry, as this entire directory will get trashed in between builds.
REMOTE_NAME="documentation"
WEBSITE_BRANCH="master"

Expand Down
2 changes: 1 addition & 1 deletion docs/src/architecture/platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ follows:
part of an action's extension definition.
* `CreateActionProvider` provides the various Create actions which
populate the Create menu. These are driven by the available types,
so do not map easily ot extension category `actions`; instead, these
so do not map easily to extension category `actions`; instead, these
are generated after looking up which actions are available from the
[`TypeService`](#type-service).
* `ActionAggregator` merges together actions from multiple providers.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/design/proposals/APIRedesign.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Worked on bug fixes in the platform and a plugin for search.
It is hard to figure out what the difference between the various ways of
dealing with telemetry are. e.g., what is the difference between just
"Telemetry" and the "Telemetry Service"? There are many
"Telemetry Thing"s which seem related, but in an unclear way.
"Telemetry Things" which seem related, but in an unclear way.

### Developer Intern 2

Expand Down Expand Up @@ -456,7 +456,7 @@ Instead, propose that:
For parity with actions, a `View` would be a constructor which
takes an `ActionContext` as a parameter (with similarly-defined
properties) and exposes a method to retrieve the HTML elements
associateed with it.
associated with it.

The platform would then additionally expose an `AngularView`
implementation to improve compatibility with existing
Expand Down
2 changes: 1 addition & 1 deletion docs/src/design/proposals/APIRedesign_PeteRichards.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ To reduce interface depth, we can replace our own provider and registry patterns

## More angular: for all services

Increasing our commitment to angular would mean using more of the angular factorys, services, etc, and less of our home grown tools. We'd implement our services and extension points as angular providers, and make them configurable via app.config.
Increasing our commitment to angular would mean using more of the angular factories, services, etc, and less of our home grown tools. We'd implement our services and extension points as angular providers, and make them configurable via app.config.

As an example, registering a specific type of model provider in angular would look like:

Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3238,7 +3238,7 @@ define(
__tutorials/telemetry/src/ExampleTelemetryServerAdapter.js__

Here, we have added `subscribe` and `unsubscribe` methods which issue the
corresponding requests to the server. Seperately, we introduce the ability to
corresponding requests to the server. Separately, we introduce the ability to
listen for `data` messages as they come in: These will contain the data associated
with these subscriptions.

Expand Down
2 changes: 1 addition & 1 deletion example/eventGenerator/data/transcript.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"LMP: 47 degrees.",
"CC: Eagle, looking great. You're GO.",
"CC: Roger. 1202. We copy it.",
"O1: LMP 35 degrees. 35 degrees. 750. Coming aown to 23.fl",
"O1: LMP 35 degrees. 35 degrees. 750. Coming down to 23.fl",
"LMP: 700 feet, 21 down, 33 degrees.",
"LMP: 600 feet, down at 19.",
"LMP: 540 feet, down at - 30. Down at 15.",
Expand Down
7 changes: 1 addition & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ gulp.task('stylesheets', function () {
.pipe(gulp.dest(__dirname));
});

gulp.task('nsp', function (done) {
var nsp = require('gulp-nsp');
nsp({package: __dirname + '/package.json'}, done);
});

gulp.task('lint', function () {
var nonspecs = paths.specs.map(function (glob) {
return "!" + glob;
Expand Down Expand Up @@ -157,6 +152,6 @@ gulp.task('develop', ['serve', 'stylesheets', 'watch']);

gulp.task('install', [ 'static', 'scripts' ]);

gulp.task('verify', [ 'lint', 'test', 'checkstyle', 'nsp' ]);
gulp.task('verify', [ 'lint', 'test', 'checkstyle' ]);

gulp.task('build', [ 'verify', 'install' ]);
4 changes: 0 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ requirejs.config({
"EventEmitter": "bower_components/eventemitter3/index",
"es6-promise": "bower_components/es6-promise/es6-promise.min",
"html2canvas": "bower_components/html2canvas/build/html2canvas.min",
"jsPDF": "bower_components/jspdf/dist/jspdf.min",
"moment": "bower_components/moment/moment",
"moment-duration-format": "bower_components/moment-duration-format/lib/moment-duration-format",
"saveAs": "bower_components/FileSaver.js/FileSaver.min",
Expand All @@ -50,9 +49,6 @@ requirejs.config({
"html2canvas": {
"exports": "html2canvas"
},
"jsPDF": {
"exports": "jsPDF"
},
"EventEmitter": {
"exports": "EventEmitter"
},
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openmct",
"version": "0.11.3-SNAPSHOT",
"version": "0.12.0-SNAPSHOT",
"description": "The Open MCT core platform",
"dependencies": {
"express": "^4.13.1",
Expand All @@ -15,7 +15,6 @@
"gulp-jscs": "^3.0.2",
"gulp-jshint": "^2.0.0",
"gulp-jshint-html-reporter": "^0.1.3",
"gulp-nsp": "^2.4.2",
"gulp-rename": "^1.2.2",
"gulp-replace-task": "^0.11.0",
"gulp-requirejs-optimize": "^0.3.1",
Expand Down
27 changes: 21 additions & 6 deletions platform/commonUI/browse/src/navigation/NavigateAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,35 @@ define(
*/
NavigateAction.prototype.perform = function () {
var self = this,
navigationAllowed = true;
navigateTo = this.domainObject,
currentObject = self.navigationService.getNavigation();

function allow() {
self.policyService.allow("navigation", self.navigationService.getNavigation(), self.domainObject, function (message) {
var navigationAllowed = true;
self.policyService.allow("navigation", currentObject, navigateTo, function (message) {
navigationAllowed = self.$window.confirm(message + "\r\n\r\n" +
" Are you sure you want to continue?");
});
return navigationAllowed;
}

// Set navigation, and wrap like a promise
return this.$q.when(
allow() && this.navigationService.setNavigation(this.domainObject)
);
function cancelIfEditing() {
var editing = currentObject.hasCapability('editor') &&
currentObject.getCapability('editor').isEditContextRoot();

return self.$q.when(editing && currentObject.getCapability("editor").finish());
}

function navigate() {
return self.navigationService.setNavigation(navigateTo);
}

if (allow()) {
return cancelIfEditing().then(navigate);
} else {
return this.$q.when(false);
}

};

/**
Expand Down
49 changes: 46 additions & 3 deletions platform/commonUI/browse/test/navigation/NavigateActionSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ define(
mockQ,
mockDomainObject,
mockPolicyService,
mockNavigatedObject,
mockWindow,
capabilities,
action;

function mockPromise(value) {
Expand All @@ -44,18 +46,44 @@ define(
}

beforeEach(function () {
capabilities = {};

mockQ = { when: mockPromise };
mockNavigatedObject = jasmine.createSpyObj(
"domainObject",
[
"getId",
"getModel",
"hasCapability",
"getCapability"
]
);

capabilities.editor = jasmine.createSpyObj("editorCapability", [
"isEditContextRoot",
"finish"
]);

mockNavigatedObject.getCapability.andCallFake(function (capability) {
return capabilities[capability];
});
mockNavigatedObject.hasCapability.andReturn(false);

mockNavigationService = jasmine.createSpyObj(
"navigationService",
[
"setNavigation",
"getNavigation"
]
);
mockNavigationService.getNavigation.andReturn({});
mockQ = { when: mockPromise };
mockNavigationService.getNavigation.andReturn(mockNavigatedObject);

mockDomainObject = jasmine.createSpyObj(
"domainObject",
["getId", "getModel", "getCapability"]
[
"getId",
"getModel"
]
);

mockPolicyService = jasmine.createSpyObj("policyService",
Expand Down Expand Up @@ -112,6 +140,21 @@ define(
});
});

describe("in edit mode", function () {
beforeEach(function () {
mockNavigatedObject.hasCapability.andCallFake(function (capability) {
return capability === "editor";
});
capabilities.editor.isEditContextRoot.andReturn(true);
});

it("finishes editing if in edit mode", function () {
action.perform();
expect(capabilities.editor.finish)
.toHaveBeenCalled();
});
});

it("is only applicable when a domain object is in context", function () {
expect(NavigateAction.appliesTo({})).toBeFalsy();
expect(NavigateAction.appliesTo({
Expand Down
2 changes: 1 addition & 1 deletion platform/commonUI/dialog/res/templates/overlay.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<div class="abs overlay">
<div class="abs overlay" ng-class="{'delayEntry100ms' : ngModel.delay}">
<div class="abs blocker"></div>
<div class="abs holder">
<a ng-click="ngModel.cancel()"
Expand Down
5 changes: 4 additions & 1 deletion platform/commonUI/dialog/src/DialogService.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ define(

/**
* A description of the model options that may be passed to the
* showBlockingMessage method. Note that the DialogModel desribed
* showBlockingMessage method. Note that the DialogModel described
* here is shared with the Notifications framework.
* @see NotificationService
*
Expand All @@ -200,6 +200,9 @@ define(
* shown above a progress bar to indicate what's happening.
* @property {number} progress a percentage value (1-100)
* indicating the completion of the blocking task
* @property {boolean} delay adds a brief delay before loading
* the dialog. Useful for removing the dialog flicker when the
* conditions for displaying the dialog change rapidly.
* @property {string} progressText the message to show below a
* progress bar to indicate progress. For example, this might be
* used to indicate time remaining, or items still to process.
Expand Down
29 changes: 21 additions & 8 deletions platform/commonUI/edit/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ define([
"./src/actions/PropertiesAction",
"./src/actions/RemoveAction",
"./src/actions/SaveAction",
"./src/actions/SaveAndStopEditingAction",
"./src/actions/SaveAsAction",
"./src/actions/CancelAction",
"./src/policies/EditActionPolicy",
Expand Down Expand Up @@ -70,6 +71,7 @@ define([
PropertiesAction,
RemoveAction,
SaveAction,
SaveAndStopEditingAction,
SaveAsAction,
CancelAction,
EditActionPolicy,
Expand Down Expand Up @@ -202,21 +204,31 @@ define([
"navigationService"
]
},
{
"key": "save-and-stop-editing",
"category": "save",
"implementation": SaveAndStopEditingAction,
"name": "Save and Finish Editing",
"cssclass": "icon-save labeled",
"description": "Save changes made to these objects.",
"depends": [
"dialogService"
]
},
{
"key": "save",
"category": "conclude-editing",
"category": "save",
"implementation": SaveAction,
"name": "Save",
"name": "Save and Continue Editing",
"cssclass": "icon-save labeled",
"description": "Save changes made to these objects.",
"depends": [
"dialogService"
],
"priority": "mandatory"
]
},
{
"key": "save",
"category": "conclude-editing",
"key": "save-as",
"category": "save",
"implementation": SaveAsAction,
"name": "Save As...",
"cssclass": "icon-save labeled",
Expand All @@ -225,7 +237,6 @@ define([
"$injector",
"policyService",
"dialogService",
"creationService",
"copyService"
],
"priority": "mandatory"
Expand All @@ -234,7 +245,9 @@ define([
"key": "cancel",
"category": "conclude-editing",
"implementation": CancelAction,
"name": "Cancel",
// Because we use the name as label for edit buttons and mct-control buttons need
// the label to be set to undefined in order to not apply the labeled CSS rule.
"name": undefined,
"cssclass": "icon-x no-label",
"description": "Discard changes made to these objects.",
"depends": []
Expand Down
Loading

0 comments on commit 3e9c0eb

Please sign in to comment.