conflict_resolution
stringlengths
27
16k
<<<<<<< map.on('draw:created', function (e) { var drawType = e.layerType; if (!self.events.dispatch[drawType]) return; // TODO: Different drawTypes need differ info. Need a switch on the object creation var bounds = e.layer.getBounds(); self.events.dispatch[drawType]({ e: e, data: self.chartData, bounds: { top_left: { lat: bounds.getNorthWest().lat, lon: bounds.getNorthWest().lng }, bottom_right: { lat: bounds.getSouthEast().lat, lon: bounds.getSouthEast().lng } } }); }); ======= map.on('zoomend', function (e) { var mapInfo = { zoom: map.getZoom(), zoomPct: map.getZoom() / 18 }; self.events.dispatch.mapZoomEnd(mapInfo); }); >>>>>>> map.on('draw:created', function (e) { var drawType = e.layerType; if (!self.events.dispatch[drawType]) return; // TODO: Different drawTypes need differ info. Need a switch on the object creation var bounds = e.layer.getBounds(); self.events.dispatch[drawType]({ e: e, data: self.chartData, bounds: { top_left: { lat: bounds.getNorthWest().lat, lon: bounds.getNorthWest().lng }, bottom_right: { lat: bounds.getSouthEast().lat, lon: bounds.getSouthEast().lng } } }); }); map.on('zoomend', function (e) { var mapInfo = { zoom: map.getZoom(), zoomPct: map.getZoom() / 18 }; self.events.dispatch.mapZoomEnd(mapInfo); });
<<<<<<< import { chain, get, noop, once, pick } from 'lodash'; import { join } from 'path'; import UiNavLink from './ui_nav_link'; ======= import _ from 'lodash'; import { join } from 'path'; >>>>>>> import { chain, get, noop, once, pick } from 'lodash'; <<<<<<< return chain([ this.uiExports.find(get(this, 'spec.uses', [])), this.uiExports.find(['chromeNavControls']), ======= return _.chain([ this.uiExports.find(_.get(this, 'spec.uses', [])), this.uiExports.find(['chromeNavControls', 'sledgehammers']), >>>>>>> return chain([ this.uiExports.find(get(this, 'spec.uses', [])), this.uiExports.find(['chromeNavControls', 'sledgehammers']),
<<<<<<< import angular from 'angular'; ======= >>>>>>>
<<<<<<< beforeEach(ngMock.module('kibana', function ($provide) { // kibi: for running kibi tests $provide.constant('kbnDefaultAppId', ''); $provide.constant('kibiDefaultDashboardTitle', ''); })); beforeEach(ngMock.inject(function (Private) { ======= beforeEach(ngMock.module('kibana')); beforeEach(ngMock.inject(function (Private, $injector) { >>>>>>> beforeEach(ngMock.module('kibana', function ($provide) { // kibi: for running kibi tests $provide.constant('kbnDefaultAppId', ''); $provide.constant('kibiDefaultDashboardTitle', ''); })); beforeEach(ngMock.inject(function (Private, $injector) {
<<<<<<< import CacheProvider from 'ui/kibi/helpers/cache_helper'; ======= import { savedObjectManagementRegistry } from 'plugins/kibana/management/saved_object_registry'; >>>>>>> import CacheProvider from 'ui/kibi/helpers/cache_helper'; import { savedObjectManagementRegistry } from 'plugins/kibana/management/saved_object_registry';
<<<<<<< return function (kibiState, Private, $rootScope, getAppState, globalState) { var EventEmitter = Private(require('ui/events')); var onlyDisabled = require('ui/filter_bar/lib/onlyDisabled'); var onlyStateChanged = require('ui/filter_bar/lib/onlyStateChanged'); var uniqFilters = require('ui/filter_bar/lib/uniqFilters'); var compareFilters = require('ui/filter_bar/lib/compareFilters'); var mapAndFlattenFilters = Private(require('ui/filter_bar/lib/mapAndFlattenFilters')); var angular = require('angular'); ======= return function (Private, $rootScope, getAppState, globalState) { let EventEmitter = Private(require('ui/events')); let onlyDisabled = require('ui/filter_bar/lib/onlyDisabled'); let onlyStateChanged = require('ui/filter_bar/lib/onlyStateChanged'); let uniqFilters = require('ui/filter_bar/lib/uniqFilters'); let compareFilters = require('ui/filter_bar/lib/compareFilters'); let mapAndFlattenFilters = Private(require('ui/filter_bar/lib/mapAndFlattenFilters')); let angular = require('angular'); >>>>>>> return function (kibiState, Private, $rootScope, getAppState, globalState) { let EventEmitter = Private(require('ui/events')); let onlyDisabled = require('ui/filter_bar/lib/onlyDisabled'); let onlyStateChanged = require('ui/filter_bar/lib/onlyStateChanged'); let uniqFilters = require('ui/filter_bar/lib/uniqFilters'); let compareFilters = require('ui/filter_bar/lib/compareFilters'); let mapAndFlattenFilters = Private(require('ui/filter_bar/lib/mapAndFlattenFilters')); let angular = require('angular'); <<<<<<< var appState = getAppState(); // kibi: find out if there was a join_set var joinSetFound = _.find(appState.filters, function (f) { return f.join_set; }); ======= let appState = getAppState(); appState.filters = []; >>>>>>> let appState = getAppState(); // kibi: find out if there was a join_set var joinSetFound = _.find(appState.filters, function (f) { return f.join_set; }); <<<<<<< var findFilterInGlobalFilters = function (globalFilters, filter) { return _.find(globalFilters, function (globalFilter) { ======= // existing globalFilters should be mutated by appFilters _.each(appFilters, function (filter, i) { let match = _.find(globalFilters, function (globalFilter) { >>>>>>> // kibi: remove filters in reverse order let findFilterInGlobalFilters = function (globalFilters, filter) { return _.find(globalFilters, function (globalFilter) {
<<<<<<< var renderTable = function (cols, rows, perPage, sort) { ======= let renderTable = function (cols, rows, perPage) { >>>>>>> let renderTable = function (cols, rows, perPage, sort) { <<<<<<< ======= describe('custom sorting', function () { let data; let paginatedTable; let sortHandler; beforeEach(function () { sortHandler = sinon.spy(); data = makeData(3, 3); $scope.cols = data.columns; $scope.rows = data.rows; $scope.perPage = defaultPerPage; $scope.sortHandler = sortHandler; $el = $compile('<paginated-table columns="cols" rows="rows" per-page="perPage"' + 'sort-handler="sortHandler">')($scope); $scope.$digest(); paginatedTable = $el.isolateScope().paginatedTable; }); // TODO: This is failing randomly it('should allow custom sorting handler', function () { let columnIndex = 1; paginatedTable.sortColumn(columnIndex); $scope.$digest(); expect(sortHandler.callCount).to.be(1); expect(sortHandler.getCall(0).args[0]).to.be(columnIndex); }); }); >>>>>>>
<<<<<<< (function () { bdd.describe('creating and deleting default index', function describeIndexTests() { bdd.before(function () { // delete .kibana index and then wait for Kibana to re-create it return esClient.deleteAndUpdateConfigDoc() .then(function () { return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink); }); }); ======= bdd.describe('creating and deleting default index', function describeIndexTests() { bdd.before(function () { // delete .kibana index and then wait for Kibana to re-create it return esClient.deleteAndUpdateConfigDoc() .then(function () { return settingsPage.navigateTo(); }); }); >>>>>>> bdd.describe('creating and deleting default index', function describeIndexTests() { bdd.before(function () { // delete .kibana index and then wait for Kibana to re-create it return esClient.deleteAndUpdateConfigDoc() .then(function () { return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink); }); }); <<<<<<< bdd.it('should return to the add data landing page', function returnToPage() { return common.try(function tryingForTime() { return common.findTestSubject('addData'); }) .catch(common.handleError(this)); }); ======= bdd.it('should return to index pattern creation page', function returnToPage() { return common.try(function tryingForTime() { return settingsPage.getCreateButton(); }); }); >>>>>>> bdd.it('should return to the add data landing page', function returnToPage() { return common.try(function tryingForTime() { return common.findTestSubject('addData'); }); });
<<<<<<< let _ = require('lodash'); let expect = require('expect.js'); let parse = require('ui/utils/range'); ======= >>>>>>>
<<<<<<< app.service('savedVisualizations', function (Promise, es, kbnIndex, SavedVis, Private, createNotifier, kbnUrl) { var visTypes = Private(require('ui/registry/vis_types')); ======= app.service('savedVisualizations', function (Promise, es, kbnIndex, SavedVis, Private, Notifier, kbnUrl) { const visTypes = Private(require('ui/registry/vis_types')); >>>>>>> app.service('savedVisualizations', function (Promise, es, kbnIndex, SavedVis, Private, createNotifier, kbnUrl) { const visTypes = Private(require('ui/registry/vis_types')); <<<<<<< var notify = createNotifier({ ======= const notify = new Notifier({ >>>>>>> const notify = createNotifier({
<<<<<<< require('ui/modules') .get('kibana') .directive('kbnAggTableGroup', function (compileRecursiveDirective) { return { restrict: 'E', template: require('ui/agg_table/agg_table_group.html'), scope: { group: '=', perPage: '=?', exportTitle: '=?', queryFieldName: '=?' // kibi: column name for the external query terms filter aggregation }, compile: function ($el) { // Use the compile function from the RecursionHelper, // And return the linking function(s) which it returns return compileRecursiveDirective.compile($el, { post: function ($scope) { $scope.$watch('group', function (group) { // clear the previous "state" $scope.rows = $scope.columns = false; ======= uiModules .get('kibana') .directive('kbnAggTableGroup', function (compileRecursiveDirective) { return { restrict: 'E', template: aggTableGroupTemplate, scope: { group: '=', perPage: '=?', sort: '=?', exportTitle: '=?', showTotal: '=', totalFunc: '=' }, compile: function ($el) { // Use the compile function from the RecursionHelper, // And return the linking function(s) which it returns return compileRecursiveDirective.compile($el, { post: function ($scope) { $scope.$watch('group', function (group) { // clear the previous "state" $scope.rows = $scope.columns = false; >>>>>>> uiModules .get('kibana') .directive('kbnAggTableGroup', function (compileRecursiveDirective) { return { restrict: 'E', template: aggTableGroupTemplate, scope: { group: '=', perPage: '=?', sort: '=?', exportTitle: '=?', showTotal: '=', totalFunc: '=', queryFieldName: '=?' // kibi: column name for the external query terms filter aggregation }, compile: function ($el) { // Use the compile function from the RecursionHelper, // And return the linking function(s) which it returns return compileRecursiveDirective.compile($el, { post: function ($scope) { $scope.$watch('group', function (group) { // clear the previous "state" $scope.rows = $scope.columns = false; <<<<<<< let firstTable = group.tables[0]; let params = firstTable.aggConfig && firstTable.aggConfig.params; // render groups that have Table children as if they were rows, because iteration is cleaner let childLayout = (params && !params.row) ? 'columns' : 'rows'; ======= let firstTable = group.tables[0]; let params = firstTable.aggConfig && firstTable.aggConfig.params; // render groups that have Table children as if they were rows, because iteration is cleaner let childLayout = (params && !params.row) ? 'columns' : 'rows'; >>>>>>> const firstTable = group.tables[0]; const params = firstTable.aggConfig && firstTable.aggConfig.params; // render groups that have Table children as if they were rows, because iteration is cleaner const childLayout = (params && !params.row) ? 'columns' : 'rows';
<<<<<<< .controller('VisEditor', function ($scope, $route, timefilter, AppState, kbnUrl, $timeout, courier, kibiState, Private, Promise, createNotifier) { const doesVisDependsOnSelectedEntities = Private(require('ui/kibi/components/commons/_does_vis_depends_on_selected_entities')); ======= .directive('visualizeApp', function () { return { controllerAs: 'visualizeApp', controller: VisEditor, }; }); function VisEditor($scope, $route, timefilter, AppState, $location, kbnUrl, $timeout, courier, Private, Promise) { >>>>>>> .directive('visualizeApp', function () { return { controllerAs: 'visualizeApp', controller: VisEditor, }; }); function VisEditor($scope, $route, timefilter, AppState, kbnUrl, $timeout, courier, kibiState, Private, Promise, createNotifier) { const doesVisDependsOnSelectedEntities = Private(require('ui/kibi/components/commons/_does_vis_depends_on_selected_entities'));
<<<<<<< let _ = require('lodash'); let expect = require('expect.js'); let ngMock = require('ngMock'); ======= >>>>>>>
<<<<<<< /** * Upload a file to S3 * * @param {string} bucket - the S3 bucket to upload to * @param {string} key - the base path of the S3 key * @param {string} filename - the filename to be uploaded to * @param {string} tempFile - the location of the file to be uploaded * @returns {Promise.<string>} - the S3 URL that the file was uploaded to */ async upload(bucket, key, filename, tempFile) { const fullKey = join(key, filename); await s3().putObject({ Bucket: bucket, Key: fullKey, Body: fs.createReadStream(tempFile) }).promise(); log.info(`uploaded ${filename} to ${bucket}`); return `s3://${bucket}/${fullKey}`; } ======= >>>>>>>
<<<<<<< var _ = require('lodash'); var Promise = require('bluebird'); var elasticsearch = require('elasticsearch'); var exposeClient = require('./expose_client'); var migrateConfig = require('./migrate_config'); var createKibanaIndex = require('./create_kibana_index'); var checkEsVersion = require('./check_es_version'); var pluginList = require('./wait_for_plugin_list'); var NoConnections = elasticsearch.errors.NoConnections; var util = require('util'); var format = util.format; ======= const _ = require('lodash'); const Promise = require('bluebird'); const elasticsearch = require('elasticsearch'); const exposeClient = require('./expose_client'); const migrateConfig = require('./migrate_config'); const createKibanaIndex = require('./create_kibana_index'); const checkEsVersion = require('./check_es_version'); const NoConnections = elasticsearch.errors.NoConnections; const util = require('util'); const format = util.format; const NO_INDEX = 'no_index'; const INITIALIZING = 'initializing'; const READY = 'ready'; const REQUEST_DELAY = 2500; >>>>>>> const _ = require('lodash'); const Promise = require('bluebird'); const elasticsearch = require('elasticsearch'); const exposeClient = require('./expose_client'); const migrateConfig = require('./migrate_config'); const createKibanaIndex = require('./create_kibana_index'); const checkEsVersion = require('./check_es_version'); const pluginList = require('./wait_for_plugin_list'); const NoConnections = elasticsearch.errors.NoConnections; const util = require('util'); const format = util.format; const NO_INDEX = 'no_index'; const INITIALIZING = 'initializing'; const READY = 'ready'; const REQUEST_DELAY = 2500; <<<<<<< plugin.status.red('Elasticsearch is still initializing the kibana index.'); return Promise.delay(2500).then(waitForShards); ======= return INITIALIZING; } return READY; }); } function waitUntilReady() { return getHealth() .then(function (health) { if (health !== READY) { return Promise.delay(REQUEST_DELAY).then(waitUntilReady); } }); } function waitForShards() { return getHealth() .then(function (health) { if (health === NO_INDEX) { plugin.status.yellow('No existing Kibana index found'); return createKibanaIndex(server); } if (health === INITIALIZING) { plugin.status.red('Elasticsearch is still initializing the kibana index.'); return Promise.delay(REQUEST_DELAY).then(waitForShards); >>>>>>> return INITIALIZING; } return READY; }); } function waitUntilReady() { return getHealth() .then(function (health) { if (health !== READY) { return Promise.delay(REQUEST_DELAY).then(waitUntilReady); } }); } function waitForShards() { return getHealth() .then(function (health) { if (health === NO_INDEX) { plugin.status.yellow('No existing Kibana index found'); return createKibanaIndex(server); } if (health === INITIALIZING) { plugin.status.red('Elasticsearch is still initializing the kibana index.'); return Promise.delay(REQUEST_DELAY).then(waitForShards);
<<<<<<< return function EnsureSomeIndexPatternsFn(Private, createNotifier, $location, kbnUrl) { var errors = require('ui/errors'); var notify = createNotifier(); ======= return function EnsureSomeIndexPatternsFn(Private, Notifier, $location, kbnUrl) { let errors = require('ui/errors'); let notify = new Notifier(); >>>>>>> return function EnsureSomeIndexPatternsFn(Private, createNotifier, $location, kbnUrl) { let errors = require('ui/errors'); let notify = createNotifier();
<<<<<<< /* Make a custom request to the server */ this.request = function(request, args) { ======= this.request = function(request, args, transactionSensitive) { >>>>>>> /* Make a custom request to the server */ this.request = function(request, args, transactionSensitive) { <<<<<<< /* Make a custom request to the server that expects an explicit response in the callback */ this.requestResponse = function(request, args, callback) { ======= /* * Make a request with an associated requestId, * and call the callback upon response */ this.requestResponse = function(request, args, callback, transactionSensitive) { >>>>>>> /* Make a custom request to the server that expects an explicit response in the callback */ this.requestResponse = function(request, args, callback, transactionSensitive) { <<<<<<< /* Handle a custom server event */ this.handle = function(messageType, handler) { this._eventHandlers[messageType] = handler } /* Focus an item property for editing. Any other focused client gets blurred. * When another client requests focus, onBlurCallback gets called */ ======= /* * Make a transaction of multiple mutations; either * all or none of the mutations will happen */ this.transact = function(transactionFn) { var id = 't' + this._uniqueRequestId++ this._transactions[id] = { waitingFor:1, actions:[] } this._transactionStack.push(id) transactionFn(id) this._endTransaction(id) } this._endTransaction = function(transactionID) { var id = this._transactionStack.pop() if (id != transactionID) { throw 'transaction ID mismatch in _endTransaction! '+id+' '+transactionID } if (--this._transactions[id].waitingFor) { return } this.request('transact', { actions: this._transactions[id].actions }) delete this._transactions[id] } var emptyTransactionHold = { resume:function(){}, complete:function(){} } this._holdTransaction = function() { var transactionID = this._transactionStack[this._transactionStack.length - 1] if (!transactionID) { return emptyTransactionHold } this._transactions[transactionID].waitingFor++ var resume = function() { fin._transactionStack.push(transactionID) } var complete = function() { fin._endTransaction(transactionID) } return { resume: resume, complete: complete } } /* * Focus an item property for editing. Any other focused client gets blurred. * When another client requests focus, onBlurCallback gets called */ >>>>>>> /* Handle a custom server event */ this.handle = function(messageType, handler) { this._eventHandlers[messageType] = handler } /* * Make a transaction of multiple mutations; either * all or none of the mutations will happen */ this.transact = function(transactionFn) { var id = 't' + this._uniqueRequestId++ this._transactions[id] = { waitingFor:1, actions:[] } this._transactionStack.push(id) transactionFn(id) this._endTransaction(id) } this._endTransaction = function(transactionID) { var id = this._transactionStack.pop() if (id != transactionID) { throw 'transaction ID mismatch in _endTransaction! '+id+' '+transactionID } if (--this._transactions[id].waitingFor) { return } this.request('transact', { actions: this._transactions[id].actions }) delete this._transactions[id] } var emptyTransactionHold = { resume:function(){}, complete:function(){} } this._holdTransaction = function() { var transactionID = this._transactionStack[this._transactionStack.length - 1] if (!transactionID) { return emptyTransactionHold } this._transactions[transactionID].waitingFor++ var resume = function() { fin._transactionStack.push(transactionID) } var complete = function() { fin._endTransaction(transactionID) } return { resume: resume, complete: complete } } /* * Focus an item property for editing. Any other focused client gets blurred. * When another client requests focus, onBlurCallback gets called */
<<<<<<< if (err) { throw 'could not retrieve list range: '+[listKey, from, to, err].join(' ') } ======= if (err) { throw 'could not retrieve list range: '+[listKey,from,to,err].join(' ') } >>>>>>> if (err) { throw 'could not retrieve list range: '+[listKey,from,to,err].join(' ') } <<<<<<< throw 'could not retrieve state mutation of unknown type: '+[type, key].join(' ') ======= throw 'could not retrieve state mutation of unknown type: '+[type+key].join(' ') >>>>>>> throw 'could not retrieve state mutation of unknown type: '+[type+key].join(' ') <<<<<<< if (err) { throw 'could not retrieve set members: '+[key, err].join(' ') } ======= if (err) { throw 'could not retrieve members of set: '+[key,err].join(' ') } >>>>>>> if (err) { throw 'could not retrieve members of set: '+[key,err].join(' ') } <<<<<<< if (err) { throw 'could not increment unique item id counter: '+err } ======= if (err) { throw 'Could not increment unique item id counter: '+err } >>>>>>> if (err) { throw 'could not increment unique item id counter: '+err } <<<<<<< console.log("storage TODO: Fix the 9 digit limit on connId") ======= >>>>>>> <<<<<<< } /* Util functions ****************/ var _retrieveBytes = function(key, callback) { store.getBytes(key, function(err, value) { if (err) { throw 'could not retrieve BYTES for key: '+[key, err].join(' ') } callback(value) }) ======= >>>>>>>
<<<<<<< ======= import { LoadingState } from 'src/main'; import { postsResource } from 'src/helpers/resources'; >>>>>>> import { LoadingState } from 'src/main'; import { postsResource } from 'src/helpers/resources'; <<<<<<< created(){ if (!this.posts.get('allPosts').length) { store.dispatch(fetchAllPosts()); ======= created(){ this.fetchPosts(); }, methods: { fetchPosts(){ LoadingState.$emit('toggle', true); return postsResource.get().then((response) => { this.posts = response.data; LoadingState.$emit('toggle', false); }, (errorResponse) => { // Handle error... console.log('API responded with:', errorResponse.status); LoadingState.$emit('toggle', false); }); >>>>>>> created(){ this.fetchPosts(); }, methods: { fetchPosts(){ LoadingState.$emit('toggle', true); return postsResource.get().then((response) => { this.posts = response.data; LoadingState.$emit('toggle', false); }, (errorResponse) => { // Handle error... console.log('API responded with:', errorResponse.status); LoadingState.$emit('toggle', false); });
<<<<<<< }, fn: { options: { variables: { 'key': function () { return 'value'; } } }, files: [ {expand: true, flatten: true, src: ['test/fixtures/function.txt'], dest: 'tmp/'} ] }, new_way: { options: { patterns: [ { match: 'key', replacement: 'value', expression: false } ] }, files: [ {expand: true, flatten: true, src: ['test/fixtures/new_way.txt'], dest: 'tmp/'} ] }, regexp: { options: { patterns: [ { match: /@@key/g, replacement: 'value', expression: true } ] }, files: [ {expand: true, flatten: true, src: ['test/fixtures/regexp.txt'], dest: 'tmp/'} ] }, regexp_template: { options: { patterns: [ { match: '/@@<%= "key" %>/g', replacement: 'value', expression: true } ] }, files: [ {expand: true, flatten: true, src: ['test/fixtures/regexp_template.txt'], dest: 'tmp/'} ] }, regexp_john: { options: { patterns: [ { match: /(\w+)\s(\w+)/, replacement: '$2, $1', expression: true } ] }, files: [ {expand: true, flatten: true, src: ['test/fixtures/regexp_john.txt'], dest: 'tmp/'} ] ======= }, special_chars: { options: { variables: { 'key': "detta är en sträng" } }, files: [ {expand: true, flatten: true, src: ['test/fixtures/special_chars.txt'], dest: 'tmp/'} ] >>>>>>> }, special_chars: { options: { variables: { 'key': "detta är en sträng" } }, files: [ {expand: true, flatten: true, src: ['test/fixtures/special_chars.txt'], dest: 'tmp/'} ] }, fn: { options: { variables: { 'key': function () { return 'value'; } } }, files: [ {expand: true, flatten: true, src: ['test/fixtures/function.txt'], dest: 'tmp/'} ] }, new_way: { options: { patterns: [ { match: 'key', replacement: 'value', expression: false } ] }, files: [ {expand: true, flatten: true, src: ['test/fixtures/new_way.txt'], dest: 'tmp/'} ] }, regexp: { options: { patterns: [ { match: /@@key/g, replacement: 'value', expression: true } ] }, files: [ {expand: true, flatten: true, src: ['test/fixtures/regexp.txt'], dest: 'tmp/'} ] }, regexp_template: { options: { patterns: [ { match: '/@@<%= "key" %>/g', replacement: 'value', expression: true } ] }, files: [ {expand: true, flatten: true, src: ['test/fixtures/regexp_template.txt'], dest: 'tmp/'} ] }, regexp_john: { options: { patterns: [ { match: /(\w+)\s(\w+)/, replacement: '$2, $1', expression: true } ] }, files: [ {expand: true, flatten: true, src: ['test/fixtures/regexp_john.txt'], dest: 'tmp/'} ]
<<<<<<< viewer: req.identity.viewer, limit: req.query.limit ======= user: req.identity.user, limit >>>>>>> viewer: req.identity.viewer, limit
<<<<<<< const COLLECTION = require('../fixtures/collections/collection-0.json'); const REL_0 = require('../fixtures/videos/video-0.json'); const REL_1 = require('../fixtures/videos/video-1.json'); const REL_2 = require('../fixtures/videos/video-2.json'); ======= const Validator = new JSONSchemaValidator(); >>>>>>> const COLLECTION = require('../fixtures/collections/collection-0.json'); const REL_0 = require('../fixtures/videos/video-0.json'); const REL_1 = require('../fixtures/videos/video-1.json'); const REL_2 = require('../fixtures/videos/video-2.json'); const Validator = new JSONSchemaValidator();
<<<<<<< config.viewer = args.viewer || null; ======= config.channel = channel.id; config.platform = platform.id; config.user = args.user || null; >>>>>>> config.channel = channel.id; config.platform = platform.id; config.viewer = args.viewer || null;
<<<<<<< // overlay = { // // build: function(innerHTML) { // // var calculateOverlay = function() { // var windowHeight = $(window).height(); // var windowWidth = $(window).width(); // var bodyHeight = $('body').height(); // var bodyWidth = $('body').width(); // // if (bodyHeight < windowHeight) { // overlayBackground.height(windowHeight); // } // // // var overlayHeight = overlayContent.height(); // var overlayWidth = overlayContent.width(); // var minMarginTop = 30; // var images = overlayContent.find("img, iframe"); // // function set() { // overlayContent.css({ // marginTop: -overlayContent.height()/2, // marginLeft: -overlayContent.width()/2, // width: overlayContent.width() // }); // if (bodyHeight < windowHeight && overlayContent.height() < windowHeight) { // overlayBackground.height(windowHeight); // } else if (overlayContent.height() > windowHeight) { // overlayBackground.height((overlayContent.height() // + minMarginTop) * 1.05); // overlayContent.css({ // marginTop: 0, // top: minMarginTop // }); // }; // if (bodyWidth < windowWidth && overlayContent.width() < windowWidth) { // overlayBackground.width(windowWidth); // } else if (overlayContent.width() > windowWidth) { // overlayBackground.width((overlayContent.width() // + minMarginTop) * 1.05); // overlayContent.css({ // marginLeft: 0, // left: minMarginTop // }); // }; // overlayContent.fadeIn("fast"); // }; // // if (images) { // images.on("load", function() { // set(); // }); // } // else { // set(); // } // }; // var body = $('body').css({ // position: 'relative' // }); // var overlayBackground = $("<div />", {"class": "overlay-background"}).appendTo(body); // var overlayContent = $("<div />", {"class": "overlay-content"}).appendTo(overlayBackground).hide(); // overlayContent.html(innerHTML); // overlayContent.find("button[data-function=closeOverlay], input[data-function=closeOverlay], a[data-function=closeOverlay]").on("click", function(e) { // overlay.close(overlayBackground); // }); // // calculateOverlay(); // }, // // close: function(target) { // target = target || ".overlay-background"; // if (typeof target == 'string' || typeof target == 'object') { // $(target).fadeOut("fast", function() { // $(this).remove(); // }); // } // } }; ======= build: function(innerHTML) { var calculateOverlay = function() { var windowHeight = $(window).height(); var bodyHeight = $('body').height(); if (bodyHeight < windowHeight) { overlayBackground.height(windowHeight); } var bodyWidth = $('body').width(); var windowWidth = $(window).width(); var overlayHeight = overlayContent.height(); var overlayWidth = overlayContent.width(); var minMarginTop = 30; var images = overlayContent.find("img, iframe"); function set() { overlayContent.css({ marginTop: -overlayContent.height()/2, marginLeft: -overlayContent.width()/2, width: overlayContent.width() }); if (bodyHeight < windowHeight && overlayContent.height() < windowHeight) { overlayBackground.height(windowHeight); } else if (overlayContent.height() > windowHeight) { overlayBackground.height((overlayContent.height() + minMarginTop) * 1.05); overlayContent.css({ marginTop: 0, top: minMarginTop }); }; if (bodyWidth < windowWidth && overlayContent.width() < windowWidth) { overlayBackground.width(windowWidth); } else if (overlayContent.width() > windowWidth) { overlayBackground.width((overlayContent.width() + minMarginTop) * 1.05); overlayContent.css({ marginLeft: 0, left: minMarginTop }); }; overlayContent.fadeIn("fast"); }; if (images) { images.on("load", function() { set(); }); } else { set(); } }; var body = $('body').css({ position: 'relative' }); if (!$('.overlayBackground')) { var overlayBackground = $("<div />", {"class": "overlay-background"}).appendTo(body); var overlayContent = $("<div />", {"class": "overlay-content"}).appendTo(overlayBackground).hide(); } else { var overlayBackground = $('.overlay-background')[0]; var overlayContent = overlayBackground.find('.overlay-content:first-child'); }; overlayContent.html(innerHTML); overlayContent.find("button[data-function=closeOverlay], input[data-function=closeOverlay], a[data-function=closeOverlay]").on("click", function(e) { overlay.close(overlayBackground); }); calculateOverlay(); }, >>>>>>> // overlay = { // // build: function(innerHTML) { // // var calculateOverlay = function() { // var windowHeight = $(window).height(); // var bodyHeight = $('body').height(); // // if (bodyHeight < windowHeight) { // overlayBackground.height(windowHeight); // } // // var bodyWidth = $('body').width(); // var windowWidth = $(window).width(); // var overlayHeight = overlayContent.height(); // var overlayWidth = overlayContent.width(); // var minMarginTop = 30; // var images = overlayContent.find("img, iframe"); // // function set() { // overlayContent.css({ // marginTop: -overlayContent.height()/2, // marginLeft: -overlayContent.width()/2, // width: overlayContent.width() // }); // if (bodyHeight < windowHeight && overlayContent.height() < windowHeight) { // overlayBackground.height(windowHeight); // } else if (overlayContent.height() > windowHeight) { // overlayBackground.height((overlayContent.height() + minMarginTop) * 1.05); // overlayContent.css({ // marginTop: 0, // top: minMarginTop // }); // }; // if (bodyWidth < windowWidth && overlayContent.width() < windowWidth) { // overlayBackground.width(windowWidth); // } else if (overlayContent.width() > windowWidth) { // overlayBackground.width((overlayContent.width() + minMarginTop) * 1.05); // overlayContent.css({ // marginLeft: 0, // left: minMarginTop // }); // }; // overlayContent.fadeIn("fast"); // }; // // if (images) { // images.on("load", function() { // set(); // }); // } // else { // set(); // } // }; // var body = $('body').css({ // position: 'relative' // }); // // if (!$('.overlayBackground')) { // var overlayBackground = $("<div />", {"class": "overlay-background"}).appendTo(body); // var overlayContent = $("<div />", {"class": "overlay-content"}).appendTo(overlayBackground).hide(); // } else { // var overlayBackground = $('.overlay-background')[0]; // var overlayContent = overlayBackground.find('.overlay-content:first-child'); // }; // // overlayContent.html(innerHTML); // overlayContent.find("button[data-function=closeOverlay], input[data-function=closeOverlay], a[data-function=closeOverlay]").on("click", function(e) { // overlay.close(overlayBackground); // }); // // calculateOverlay(); // }, };
<<<<<<< var params = {}; params.play = "true"; params.bgcolor = "#FFFFFF"; swfobject.embedSWF("/static/test.swf?v=0003", "check_flash", "0", "0", "10.3", "", params); ======= /* Alters-Success fade out after 8secs */ (function($){ function hideAlerts() { var alerts = $('#flash_messages .alert.alert-success'); setTimeout(function(){ alerts.fadeOut('slow', function(){ alerts.remove(); }); }, 5000); } $(function(){ hideAlerts(); }); })(jQuery); >>>>>>> var params = {}; params.play = "true"; params.bgcolor = "#FFFFFF"; swfobject.embedSWF("/static/test.swf?v=0003", "check_flash", "0", "0", "10.3", "", params); /* Alters-Success fade out after 8secs */ (function($){ function hideAlerts() { var alerts = $('#flash_messages .alert.alert-success'); setTimeout(function(){ alerts.fadeOut('slow', function(){ alerts.remove(); }); }, 5000); } $(function(){ hideAlerts(); }); })(jQuery);
<<<<<<< createFakeJwtAuthToken ======= createFakeJwtAuthToken, testEndpoint, fakeExecutionFactoryV2 >>>>>>> createFakeJwtAuthToken, fakeExecutionFactoryV2 <<<<<<< let jwtAuthToken; ======= executionStatusEndpoint.__set__('executionExists', executionExistsMock); executionStatusEndpoint.__set__('StepFunction', stepFunctionMock); executionStatusEndpoint.__set__('getS3Object', s3Mock); let authHeaders; >>>>>>> let jwtAuthToken; <<<<<<< let mockedS3; let mockedSF; ======= let executionModel; >>>>>>> let mockedS3; let mockedSF; let mockedSFExecution; <<<<<<< jwtAuthToken = await createFakeJwtAuthToken({ accessTokenModel, userModel }); ======= const jwtAuthToken = await createFakeJwtAuthToken({ accessTokenModel, userModel }); authHeaders = { Authorization: `Bearer ${jwtAuthToken}` }; executionModel = new models.Execution(); await executionModel.createTable(); await executionModel.create(fakeExpiredExecution); >>>>>>> jwtAuthToken = await createFakeJwtAuthToken({ accessTokenModel, userModel }); executionModel = new models.Execution(); await executionModel.createTable(); await executionModel.create(fakeExpiredExecution); <<<<<<< mockedS3.restore(); mockedSF.restore(); ======= await executionModel.deleteTable(); >>>>>>> mockedS3.restore(); mockedSF.restore(); mockedSFExecution.restore(); await executionModel.deleteTable(); <<<<<<< t.deepEqual(expectedResponse, executionStatus); ======= return testEndpoint(executionStatusEndpoint, event, (response) => { const executionStatus = JSON.parse(response.body); const expectedResponse = { execution: executionStatusCommon, executionHistory: { events: [ lambdaEventOutput ] }, stateMachine: {} }; t.deepEqual(expectedResponse, executionStatus); }); }); test('when execution is no longer in step function API, returns status from database', (t) => { const event = { pathParameters: { arn: expiredExecutionArn }, headers: authHeaders }; return testEndpoint(executionStatusEndpoint, event, (response) => { const executionStatus = JSON.parse(response.body); t.falsy(executionStatus.executionHistory); t.falsy(executionStatus.stateMachine); t.is(executionStatus.execution.executionArn, fakeExpiredExecution.arn); t.is(executionStatus.execution.name, fakeExpiredExecution.name); t.is(executionStatus.execution.input, JSON.stringify(fakeExpiredExecution.originalPayload)); t.is(executionStatus.execution.output, JSON.stringify(fakeExpiredExecution.finalPayload)); }); >>>>>>> t.deepEqual(expectedResponse, executionStatus); }); test('when execution is no longer in step function API, returns status from database', async (t) => { const response = await request(app) .get(`/executions/status/${expiredExecutionArn}`) .set('Accept', 'application/json') .set('Authorization', `Bearer ${jwtAuthToken}`) .expect(200); const executionStatus = response.body; t.falsy(executionStatus.executionHistory); t.falsy(executionStatus.stateMachine); t.is(executionStatus.execution.executionArn, fakeExpiredExecution.arn); t.is(executionStatus.execution.name, fakeExpiredExecution.name); t.is(executionStatus.execution.input, JSON.stringify(fakeExpiredExecution.originalPayload)); t.is(executionStatus.execution.output, JSON.stringify(fakeExpiredExecution.finalPayload));
<<<<<<< var that = this; that.draggingPosition = that._findNearestHandle(event); ======= event.preventDefault(); this.draggingPosition = -1; this.$handles.each(function(index, handle) { if (handle === event.target) this.draggingPosition = index; }.bind(this)); // Did not touch any handle? Emulate click instead! if (this.draggingPosition < 0) { this._handleClick(event); return; } this.$handles.eq(this.draggingPosition).addClass("dragging"); this.$element.closest("body").addClass("slider-dragging-cursorhack"); >>>>>>> event.preventDefault(); var that = this; that.draggingPosition = -1; <<<<<<< $(window).bind("mousemove.slider touchmove.slider", that._handleDragging.bind(this)); $(window).bind("mouseup.slider touchend.slider", that._mouseUp.bind(this)); event.preventDefault(); ======= $(window).fipo("touchmove.slider", "mousemove.slider", this._handleDragging.bind(this)); $(window).fipo("touchend.slider", "mouseup.slider", this._mouseUp.bind(this)); >>>>>>> $(window).fipo("touchmove.slider", "mousemove.slider", this._handleDragging.bind(this)); $(window).fipo("touchend.slider", "mouseup.slider", this._mouseUp.bind(this)); <<<<<<< that.$inputs.eq(pos).attr({"value":value}); that.$handles.eq(pos).attr({"aria-valuenow":value,"aria-valuetext":value}); if (!doNotTriggerChange) that.$inputs.eq(pos).change(); // Keep input element value updated too and fire change event for any listeners ======= that.$inputs.eq(pos).attr("value", value); if (!doNotTriggerChange) { setTimeout(function() { that.$inputs.eq(pos).change(); // Keep input element value updated too and fire change event for any listeners }, 1); // Not immediatly, but after our own work here } >>>>>>> that.$inputs.eq(pos).attr({"value":value}); that.$handles.eq(pos).attr({"aria-valuenow":value,"aria-valuetext":value}); if (!doNotTriggerChange) { setTimeout(function() { that.$inputs.eq(pos).change(); // Keep input element value updated too and fire change event for any listeners }, 1); // Not immediatly, but after our own work here }
<<<<<<< $(".slider-markupless").slider({ min: 0, max: 100, step: 5, value: 50, ticks: true, filled: true, orientation: "vertical", tooltips: true }); ======= $(".slider-markupless").slider({ min: 0, max: 100, step: 5, value: 50, ticks: true, filled: true, orientation: "vertical", tooltips: true, slide: true }); >>>>>>> $(".slider-markupless").slider({ min: 0, max: 100, step: 5, value: 50, ticks: true, filled: true, orientation: "vertical", tooltips: true, slide: true }); <<<<<<< @param {boolean} [options.slide=false] True for smooth sliding animations @param {boolean} [options.disabled=false] True for a disabled element @param {boolean} [options.bound=false] For multi-input sliders, indicates that the min value is bounded by the max value and the max value is bounded by the min **/ ======= @param {boolean} [options.slide=false] True for smooth sliding animations. Can make the slider unresponsive on some systems. @param {boolean} [options.disabled=false] True for a disabled element* */ >>>>>>> @param {boolean} [options.slide=false] True for smooth sliding animations. Can make the slider unresponsive on some systems. @param {boolean} [options.disabled=false] True for a disabled element @param {boolean} [options.bound=false] For multi-input sliders, indicates that the min value is bounded by the max value and the max value is bounded by the min **/ <<<<<<< if(this.$element.hasClass('slide')) { that.options.slide = true; } if(this.$element.hasClass('bound')) { that.options.bound = true; } ======= if (this.$element.data("slide")) { that.options.slide = true; } >>>>>>> if (this.$element.data("slide")) { that.options.slide = true; } if(this.$element.hasClass('bound')) { that.options.bound = true; } <<<<<<< tooltipFormatter: function(value) { return value.toString(); }, bound: false ======= tooltipFormatter: function(value) { return value.toString(); }, ticks: false, filled: false >>>>>>> tooltipFormatter: function(value) { return value.toString(); }, ticks: false, filled: false, bound: false
<<<<<<< // grunt.loadNpmTasks('grunt-jsdoc'); grunt.loadNpmTasks('grunt-mocha'); // grunt.loadNpmTasks('grunt-hub'); grunt.loadNpmTasks('grunt-zip'); ======= // grunt.loadNpmTasks('grunt-jsdoc'); grunt.loadNpmTasks('grunt-mocha-phantomjs'); // grunt.loadNpmTasks('grunt-hub'); >>>>>>> // grunt.loadNpmTasks('grunt-jsdoc'); grunt.loadNpmTasks('grunt-mocha-phantomjs'); // grunt.loadNpmTasks('grunt-hub'); grunt.loadNpmTasks('grunt-zip');
<<<<<<< enumerable: true, get: function () { if(self._value!=null){ return self._value; } if (savedObs) { if (typeof(savedObs.value) == "object" && savedObs.value) { savedObs.value['displayString'] = (savedObs.value.shortName ? savedObs.value.shortName : savedObs.value.name) } } return savedObs ? savedObs.value : undefined; }, set: function (newValue) { self._value = newValue; if (!newValue) { savedObs = null; } self.onValueChanged(); } }); ======= enumerable: true, get: function () { if (self._value != null) { return self._value; } savedObs && savedObs.value ? savedObs.value['displayString'] = (savedObs.value.shortName ? savedObs.value.shortName : savedObs.value.name) : ''; return savedObs ? savedObs.value : undefined; }, set: function (newValue) { self._value = newValue; if (!newValue) { savedObs = null; } self.onValueChanged(); } }); >>>>>>> enumerable: true, get: function () { if (self._value != null) { return self._value; } if (savedObs) { if (typeof(savedObs.value) === "object" && savedObs.value) { savedObs.value['displayString'] = (savedObs.value.shortName ? savedObs.value.shortName : savedObs.value.name) } } return savedObs ? savedObs.value : undefined; }, set: function (newValue) { self._value = newValue; if (!newValue) { savedObs = null; } self.onValueChanged(); } }); <<<<<<< if (this.erroneousValue) { return false; } ======= if (this.erroneousValue) return false; if (this.getControlType() === 'autocomplete') { return _.isEmpty(this.value) || _.isObject(this.value); } >>>>>>> if (this.erroneousValue) { return false; } if (this.getControlType() === 'autocomplete') { return _.isEmpty(this.value) || _.isObject(this.value); }
<<<<<<< const delGranParams = { ======= if (g.cmrLink) { const metadata = await cmrjs.getMetadata(g.cmrLink); doc.beginningDateTime = metadata.time_start; doc.endingDateTime = metadata.time_end; doc.lastUpdateDateTime = metadata.updated; const fullMetadata = await cmrjs.getFullMetadata(g.cmrLink); if (fullMetadata && fullMetadata.DataGranule) { doc.productionDateTime = fullMetadata.DataGranule.ProductionDateTime; } } return esClient.update({ >>>>>>> if (g.cmrLink) { const metadata = await cmrjs.getMetadata(g.cmrLink); doc.beginningDateTime = metadata.time_start; doc.endingDateTime = metadata.time_end; doc.lastUpdateDateTime = metadata.updated; const fullMetadata = await cmrjs.getFullMetadata(g.cmrLink); if (fullMetadata && fullMetadata.DataGranule) { doc.productionDateTime = fullMetadata.DataGranule.ProductionDateTime; } } const delGranParams = {
<<<<<<< var link = function (scope) { var conceptMapper = new Bahmni.Common.Domain.ConceptMapper(); var hideAbnormalbuttonConfig = scope.observation && scope.observation.conceptUIConfig && scope.observation.conceptUIConfig['hideAbnormalButton']; ======= var link = function (scope, element) { >>>>>>> var link = function (scope) { var hideAbnormalbuttonConfig = scope.observation && scope.observation.conceptUIConfig && scope.observation.conceptUIConfig['hideAbnormalButton']; <<<<<<< scope.selectOptions = function (codedConcept) { var answers = _.uniqBy(codedConcept.answers, 'uuid').map(conceptMapper.map); return { data: answers, query: function (options) { return options.callback({results: $filter('filter')(answers, {name: options.term})}); }, allowClear: true, placeholder: 'Select', formatResult: _.property('displayString'), formatSelection: _.property('displayString'), id: _.property('uuid') }; }; ======= >>>>>>>
<<<<<<< $scope.consultation.newlyAddedTreatments = allTreatmentsAcrossTabs.concat(includedOrderSetTreatments); $scope.consultation.discontinuedDrugs && $scope.consultation.discontinuedDrugs.forEach(function (discontinuedDrug) { var removableOrder = _.find(activeDrugOrders, {uuid: discontinuedDrug.uuid}); if (discontinuedDrug != null) { removableOrder.orderReasonText = discontinuedDrug.orderReasonText; removableOrder.dateActivated = discontinuedDrug.dateStopped; removableOrder.scheduledDate = discontinuedDrug.dateStopped; if (discontinuedDrug.orderReasonConcept != null && discontinuedDrug.orderReasonConcept.name) { removableOrder.orderReasonConcept = { name: discontinuedDrug.orderReasonConcept.name.name, uuid: discontinuedDrug.orderReasonConcept.uuid }; ======= $scope.consultation.newlyAddedTreatments = _.flatten(allTreatmentsAcrossTabs); if ($scope.consultation.discontinuedDrugs) { $scope.consultation.discontinuedDrugs.forEach(function (discontinuedDrug) { var removableOrder = _.find(activeDrugOrders, {uuid: discontinuedDrug.uuid}); if (discontinuedDrug != null) { removableOrder.orderReasonText = discontinuedDrug.orderReasonText; removableOrder.dateActivated = discontinuedDrug.dateStopped; removableOrder.scheduledDate = discontinuedDrug.dateStopped; if (discontinuedDrug.orderReasonConcept != null && discontinuedDrug.orderReasonConcept.name) { removableOrder.orderReasonConcept = { name: discontinuedDrug.orderReasonConcept.name.name, uuid: discontinuedDrug.orderReasonConcept.uuid }; } >>>>>>> $scope.consultation.newlyAddedTreatments = allTreatmentsAcrossTabs.concat(includedOrderSetTreatments); if ($scope.consultation.discontinuedDrugs) { $scope.consultation.discontinuedDrugs.forEach(function (discontinuedDrug) { var removableOrder = _.find(activeDrugOrders, {uuid: discontinuedDrug.uuid}); if (discontinuedDrug != null) { removableOrder.orderReasonText = discontinuedDrug.orderReasonText; removableOrder.dateActivated = discontinuedDrug.dateStopped; removableOrder.scheduledDate = discontinuedDrug.dateStopped; if (discontinuedDrug.orderReasonConcept != null && discontinuedDrug.orderReasonConcept.name) { removableOrder.orderReasonConcept = { name: discontinuedDrug.orderReasonConcept.name.name, uuid: discontinuedDrug.orderReasonConcept.uuid }; }
<<<<<<< isValid: function (checkRequiredFields, conceptSetRequired) { if (this.isGroup()) return this._hasValidChildren(checkRequiredFields, conceptSetRequired); if (conceptSetRequired && this.isRequired() && !this.getPrimaryObs().hasValue()) return false; if (checkRequiredFields && this.isRequired() && !this.getPrimaryObs().hasValue()) return false; if (this._isDateDataType()) return this.getPrimaryObs().isValidDate(); if (this.getPrimaryObs().hasValue() && this.hasDuration()) return false; ======= isValid: function (checkRequiredFields) { if (this.isGroup()) return this._hasValidChildren(checkRequiredFields); if (checkRequiredFields && this.isRequired() && !this.primaryObs.hasValue()) return false; if (this._isDateDataType()) return this.primaryObs.isValidDate(); if (this.getControlType() === "freeTextAutocomplete" ) { return this.isValidFreeTextAutocomplete()} if (this.primaryObs.hasValue() && this.hasDuration()) return false; >>>>>>> isValid: function (checkRequiredFields, conceptSetRequired) { if (this.isGroup()) return this._hasValidChildren(checkRequiredFields, conceptSetRequired); if (conceptSetRequired && this.isRequired() && !this.getPrimaryObs().hasValue()) return false; if (checkRequiredFields && this.isRequired() && !this.getPrimaryObs().hasValue()) return false; if (this._isDateDataType()) return this.getPrimaryObs().isValidDate(); if (this.getControlType() === "freeTextAutocomplete" ) { return this.isValidFreeTextAutocomplete()} if (this.getPrimaryObs().hasValue() && this.hasDuration()) return false; <<<<<<< _hasValidChildren: function (checkRequiredFields, conceptSetRequired) { ======= isDurationRequired: function () { return this.getConceptUIConfig().durationRequired || false; }, _hasValidChildren: function (checkRequiredFields) { >>>>>>> isDurationRequired: function () { return this.getConceptUIConfig().durationRequired || false; }, _hasValidChildren: function (checkRequiredFields, conceptSetRequired) {
<<<<<<< var controller = function ($scope, $stateParams, spinner, appService, observationsService) { ======= var controller = function ($scope, observationsService, spinner, conceptSetService, $q) { >>>>>>> var controller = function ($scope, $stateParams, spinner, appService, observationsService, conceptSetService, $q) { <<<<<<< var init = function () { var programConfig = appService.getAppDescriptor().getConfigValue("program") || {}; var startDate = null, endDate = null, getOtherActive; if (programConfig.showDashBoardWithinDateRange) { startDate = $stateParams.dateEnrolled; endDate = $stateParams.dateCompleted; } ======= var getTemplateDisplayName = function () { return conceptSetService.getConcept({ name: $scope.config.templateName, v: "custom:(uuid,names,displayString)" }).then(function (result) { var templateConcept = result.data.results[0]; var displayName = templateConcept.displayString; if (templateConcept.names && templateConcept.names.length === 1 && templateConcept.names[0].name != "") { displayName = templateConcept.names[0].name; } else if (templateConcept.names && templateConcept.names.length === 2) { displayName = _.find(templateConcept.names, {conceptNameType: "SHORT"}).name; } $scope.conceptDisplayName = displayName; }) }; var getObsInFlowSheet = function () { >>>>>>> var getTemplateDisplayName = function () { return conceptSetService.getConcept({ name: $scope.config.templateName, v: "custom:(uuid,names,displayString)" }).then(function (result) { var templateConcept = result.data.results[0]; var displayName = templateConcept.displayString; if (templateConcept.names && templateConcept.names.length === 1 && templateConcept.names[0].name != "") { displayName = templateConcept.names[0].name; } else if (templateConcept.names && templateConcept.names.length === 2) { displayName = _.find(templateConcept.names, {conceptNameType: "SHORT"}).name; } $scope.conceptDisplayName = displayName; }) }; var getObsInFlowSheet = function () { var programConfig = appService.getAppDescriptor().getConfigValue("program") || {}; var startDate = null, endDate = null, getOtherActive; if (programConfig.showDashBoardWithinDateRange) { startDate = $stateParams.dateEnrolled; endDate = $stateParams.dateCompleted; } <<<<<<< $scope.config.groupByConcept, $scope.config.conceptNames, $scope.config.numberOfVisits, $scope.config.initialCount, $scope.config.latestCount, $scope.config.name, startDate, endDate).success(function (data) { var foundElement = _.find(data.headers, function (header) { ======= $scope.config.groupByConcept, $scope.config.conceptNames, $scope.config.numberOfVisits, $scope.config.initialCount, $scope.config.latestCount, $scope.config.name) .then(function (result) { var obsInFlowSheet = result.data; var groupByElement = _.find(obsInFlowSheet.headers, function (header) { >>>>>>> $scope.config.groupByConcept, $scope.config.conceptNames, $scope.config.numberOfVisits, $scope.config.initialCount, $scope.config.latestCount, $scope.config.name, startDate, endDate) .then(function (result) { var obsInFlowSheet = result.data; var groupByElement = _.find(obsInFlowSheet.headers, function (header) {
<<<<<<< this.getService = function (uuid) { return $http.get(Bahmni.Common.Constants.appointmentServiceUrl + "?uuid=" + uuid, { withCredentials: true, headers: {"Accept": "application/json", "Content-Type": "application/json"} }); }; ======= this.deleteAppointmentService = function (serviceUuid) { var params = {uuid: serviceUuid}; return $http.delete(Bahmni.Common.Constants.appointmentServiceUrl, { params: params, withCredentials: true, headers: {"Accept": "application/json", "Content-Type": "application/json"} }); }; >>>>>>> this.getService = function (uuid) { return $http.get(Bahmni.Common.Constants.appointmentServiceUrl + "?uuid=" + uuid, { withCredentials: true, headers: {"Accept": "application/json", "Content-Type": "application/json"} }); }; this.deleteAppointmentService = function (serviceUuid) { var params = {uuid: serviceUuid}; return $http.delete(Bahmni.Common.Constants.appointmentServiceUrl, { params: params, withCredentials: true, headers: {"Accept": "application/json", "Content-Type": "application/json"} }); };
<<<<<<< angular.module('admin', ['httpErrorInterceptor', 'bahmni.admin', 'bahmni.common.routeErrorHandler', 'ngSanitize', 'bahmni.common.uiHelper', 'bahmni.common.config', 'bahmni.common.orders', 'bahmni.common.i18n', 'pascalprecht.translate', 'ngCookies', 'angularFileUpload', 'bahmni.common.offline']) .config(['$stateProvider', '$httpProvider', '$urlRouterProvider', '$bahmniTranslateProvider', function ($stateProvider, $httpProvider, $urlRouterProvider, $bahmniTranslateProvider) { ======= angular.module('admin', ['httpErrorInterceptor', 'bahmni.admin', 'bahmni.common.routeErrorHandler', 'ngSanitize', 'bahmni.common.uiHelper', 'bahmni.common.config', 'bahmni.common.i18n', 'pascalprecht.translate', 'ngCookies', 'angularFileUpload', 'bahmni.common.offline']) .config(['$stateProvider', '$httpProvider', '$urlRouterProvider', '$compileProvider', function ($stateProvider, $httpProvider, $urlRouterProvider, $compileProvider) { >>>>>>> angular.module('admin', ['httpErrorInterceptor', 'bahmni.admin', 'bahmni.common.routeErrorHandler', 'ngSanitize', 'bahmni.common.uiHelper', 'bahmni.common.config', 'bahmni.common.orders', 'bahmni.common.i18n', 'pascalprecht.translate', 'ngCookies', 'angularFileUpload', 'bahmni.common.offline']) .config(['$stateProvider', '$httpProvider', '$urlRouterProvider', '$compileProvider', function ($stateProvider, $httpProvider, $urlRouterProvider, $compileProvider) {
<<<<<<< util.templateService().post("SaveTemplate", params, function(data) { //Success self.cancel(); }, function(data) { //Failure } ); ======= } else { var jsObject = ko.toJS(data); var params = { templateId: jsObject.templateId, localizedNames: jsObject.localizedNames, contentTypeId: jsObject.contentTypeId, isSystem: jsObject.isSystem, filePath: jsObject.filePath, content: codeEditor.getValue() }; util.templateService().post("SaveTemplate", params, function (data) { //Success self.cancel(); }, function (data) { //Failure } ) } >>>>>>> } else { var jsObject = ko.toJS(data); var params = { templateId: jsObject.templateId, localizedNames: jsObject.localizedNames, contentTypeId: jsObject.contentTypeId, isSystem: jsObject.isSystem, filePath: jsObject.filePath, content: codeEditor.getValue() }; util.templateService().post("SaveTemplate", params, function (data) { //Success self.cancel(); }, function (data) { //Failure } ); }
<<<<<<< scope: ['r_basicprofile', 'r_emailaddress'], ======= scope: ['r_fullprofile', 'r_emailaddress'], authOptions: { state: process.env.LINKEDIN_STATE }, >>>>>>> scope: ['r_basicprofile', 'r_emailaddress'], authOptions: { state: process.env.LINKEDIN_STATE }, <<<<<<< scope: ['r_basicprofile', 'r_emailaddress'], ======= scope: ['r_fullprofile', 'r_emailaddress'], authOptions: { state: process.env.LINKEDIN_STATE }, >>>>>>> scope: ['r_basicprofile', 'r_emailaddress'], authOptions: { state: process.env.LINKEDIN_STATE },
<<<<<<< ======= sitemap: function sitemap(req, res, next) { var appUrl = 'http://www.freecodecamp.com'; var now = moment(new Date()).format('YYYY-MM-DD'); User.find({'profile.username': {'$ne': '' }}, function(err, users) { if (err) { debug('User err: ', err); return next(err); } Challenge.find({}, function (err, challenges) { if (err) { debug('User err: ', err); return next(err); } Bonfire.find({}, function (err, bonfires) { if (err) { debug('User err: ', err); return next(err); } Story.find({}, function (err, stories) { if (err) { debug('User err: ', err); return next(err); } res.header('Content-Type', 'application/xml'); res.render('resources/sitemap', { appUrl: appUrl, now: now, users: users, challenges: challenges, bonfires: bonfires, stories: stories }); }); }); }); }); }, >>>>>>> sitemap: function sitemap(req, res, next) { var appUrl = 'http://www.freecodecamp.com'; var now = moment(new Date()).format('YYYY-MM-DD'); User.find({'profile.username': {'$ne': '' }}, function(err, users) { if (err) { debug('User err: ', err); return next(err); } Challenge.find({}, function (err, challenges) { if (err) { debug('User err: ', err); return next(err); } Bonfire.find({}, function (err, bonfires) { if (err) { debug('User err: ', err); return next(err); } Story.find({}, function (err, stories) { if (err) { debug('User err: ', err); return next(err); } res.header('Content-Type', 'application/xml'); res.render('resources/sitemap', { appUrl: appUrl, now: now, users: users, challenges: challenges, bonfires: bonfires, stories: stories }); }); }); }); }); }, <<<<<<< difficulty: elem.difficulty, _id: elem._id } ======= difficulty: elem.difficulty }; >>>>>>> difficulty: elem.difficulty, _id: elem._id }
<<<<<<< var Linkedin = require('node-linkedin')(secrets.linkedin.clientID, secrets.linkedin.clientSecret, secrets.linkedin.callbackURL); ======= var clockwork = require('clockwork')({key: secrets.clockwork.apiKey}); >>>>>>> var Linkedin = require('node-linkedin')(secrets.linkedin.clientID, secrets.linkedin.clientSecret, secrets.linkedin.callbackURL); var clockwork = require('clockwork')({key: secrets.clockwork.apiKey}); <<<<<<< /** * GET /api/venmo * Venmo API example. */ ======= /** * GET /api/Clockwork * Clockwork SMS API example. */ exports.getClockwork = function(req, res, next) { res.render('api/clockwork', { title: 'Clockwork SMS API' }); }; /** * POST /api/Clockwork * Clockwork SMS API example. * @param telephone */ exports.postClockwork = function(req, res, next) { var message = { To: req.body.telephone, From: 'Hackathon', Content: 'Hello from the Hackathon Starter' }; clockwork.sendSms(message, function(err, responseData) { if (err) return next(err.message); req.flash('success', { msg: 'Text sent to ' + responseData.responses[0].to}); res.redirect('/api/clockwork'); }); }; >>>>>>> /** * GET /api/Clockwork * Clockwork SMS API example. */ exports.getClockwork = function(req, res, next) { res.render('api/clockwork', { title: 'Clockwork SMS API' }); }; /** * POST /api/Clockwork * Clockwork SMS API example. * @param telephone */ exports.postClockwork = function(req, res, next) { var message = { To: req.body.telephone, From: 'Hackathon', Content: 'Hello from the Hackathon Starter' }; clockwork.sendSms(message, function(err, responseData) { if (err) return next(err.message); req.flash('success', { msg: 'Text sent to ' + responseData.responses[0].to}); res.redirect('/api/clockwork'); }); }; /** * GET /api/venmo * Venmo API example. */
<<<<<<< ======= // update granules object with final locations of files as `filename` allGranules = updateGranuleMetadata(allGranules, collection, cmrFiles, buckets); >>>>>>>
<<<<<<< ======= var transporter = nodemailer.createTransport({ service: 'Mandrill', auth: { user: secrets.mandrill.user, pass: secrets.mandrill.password } }); var mailOptions = { to: user.email, from: '[email protected]', subject: 'Welcome to Free Code Camp!', text: [ 'Greetings from San Francisco!\n\n', 'Thank you for joining our community.\n', 'Feel free to email us at this address if you have any questions about Free Code Camp.\n', "And if you have a moment, check out our blog: blog.freecodecamp.com.\n", 'Good luck with the challenges!\n\n', '- the Volunteer Camp Counselor Team' ].join('') }; transporter.sendMail(mailOptions, function(err) { if (err) { return next(err); } }); >>>>>>>
<<<<<<< ======= /** * API examples routes. * accepts a post request. the challenge id req.body.challengeNumber * and updates user.challengesHash & user.challengesCompleted * */ app.post('/completed-challenge', function (req, res, done) { req.user.challengesHash[parseInt(req.body.challengeNumber)] = Math.round(+new Date() / 1000); var timestamp = req.user.challengesHash; var points = 0; for (var key in timestamp) { if (timestamp[key] > 0 && req.body.challengeNumber < 54) { points += 1; } } req.user.points = points; req.user.save(function(err) { if (err) { return done(err); } res.status(200).send({ msg: 'progress saved' }); }); }); >>>>>>>
<<<<<<< lambdaCallback(handler, callback, error, data) { callback(error, data); } ======= retry() { log.error('Retry requested but not implemented'); return this.await(); } >>>>>>> lambdaCallback(handler, callback, error, data) { callback(error, data); } retry() { log.error('Retry requested but not implemented'); return this.await(); }
<<<<<<< if (isHelper(sexpr)) { prepareSexpr(this, sexpr); opcode = 'printInlineHook'; ======= if (isHelper(mustache)) { prepareHash(this, mustache.hash); prepareParams(this, mustache.params); preparePath(this, mustache.path); this.opcode('printInlineHook', morphNum); >>>>>>> if (isHelper(mustache)) { prepareHash(this, mustache.hash); prepareParams(this, mustache.params); preparePath(this, mustache.path); opcode = 'printInlineHook'; <<<<<<< preparePath(this, sexpr.path); opcode = 'printContentHook'; ======= preparePath(this, mustache.path); this.opcode('printContentHook', morphNum); >>>>>>> preparePath(this, mustache.path); opcode = 'printContentHook'; <<<<<<< var sexpr = block.sexpr; prepareSexpr(this, sexpr); ======= >>>>>>> prepareHash(this, block.hash); prepareParams(this, block.params); preparePath(this, block.path); <<<<<<< this.opcode('printBlockHook', templateId, inverseId); ======= prepareHash(this, block.hash); prepareParams(this, block.params); preparePath(this, block.path); this.opcode('printBlockHook', morphNum, templateId, inverseId); >>>>>>> this.opcode('printBlockHook', templateId, inverseId); <<<<<<< HydrationOpcodeCompiler.prototype.elementModifier = function(modifier) { prepareSexpr(this, modifier.sexpr); ======= HydrationOpcodeCompiler.prototype.elementHelper = function(sexpr) { prepareHash(this, sexpr.hash); prepareParams(this, sexpr.params); preparePath(this, sexpr.path); >>>>>>> HydrationOpcodeCompiler.prototype.elementModifier = function(modifier) { prepareHash(this, modifier.hash); prepareParams(this, modifier.params); preparePath(this, modifier.path); <<<<<<< function prepareSexpr(compiler, sexpr) { prepareHash(compiler, sexpr.hash); prepareParams(compiler, sexpr.params); preparePath(compiler, sexpr.path); } function shareElement(compiler) { compiler.opcode('shareElement', ++compiler.elementNum); compiler.element = null; // Set element to null so we don't cache it twice } function publishElementMorph(compiler) { var morphNum = compiler.morphNum++; compiler.opcode('createElementMorph', morphNum, compiler.elementNum); } ======= >>>>>>> function shareElement(compiler) { compiler.opcode('shareElement', ++compiler.elementNum); compiler.element = null; // Set element to null so we don't cache it twice } function publishElementMorph(compiler) { var morphNum = compiler.morphNum++; compiler.opcode('createElementMorph', morphNum, compiler.elementNum); }
<<<<<<< var gameStats = dataAccess.constructGameStats(); var gameTracker; var players = []; ======= var gameStats; var playerIfaces = []; >>>>>>> var gameStats; var gameTracker; var playerIfaces = []; <<<<<<< players[playerIdx] = null; if (state.state.name != stateNames.GAME_WON) { gameTracker.playerLeft(playerIdx); ======= playerIfaces[playerIdx] = null; playerState.connected = false; playerState.isReady = false; if (!playerState.isObserver) { >>>>>>> playerIfaces[playerIdx] = null; playerState.connected = false; playerState.isReady = false; if (!playerState.isObserver) { gameTracker.playerLeft(playerIdx); <<<<<<< gameTracker.gameOver(state); var playerId = players[winnerIdx].playerId; ======= resetReadyStates(); var playerId = playerIfaces[winnerIdx].playerId; >>>>>>> gameTracker.gameOver(state); resetReadyStates(); var playerId = playerIfaces[winnerIdx].playerId; <<<<<<< if (state.numPlayers >= MIN_PLAYERS) { gameStats.gameType = gameType || 'original'; state.roles = ['duke', 'captain', 'assassin', 'contessa']; if (gameStats.gameType === 'inquisitors') { state.roles.push('inquisitor'); } else { state.roles.push('ambassador'); } deck = buildDeck(); gameTracker = new GameTracker(); ======= if (countReadyPlayers() < MIN_PLAYERS) { throw new GameException('Not enough players are ready to play'); } gameStats = dataAccess.constructGameStats(); gameStats.gameType = gameType || 'original'; state.roles = ['duke', 'captain', 'assassin', 'contessa']; if (gameStats.gameType === 'inquisitors') { state.roles.push('inquisitor'); } else { state.roles.push('ambassador'); } deck = buildDeck(); >>>>>>> if (countReadyPlayers() < MIN_PLAYERS) { throw new GameException('Not enough players are ready to play'); } gameStats = dataAccess.constructGameStats(); gameStats.gameType = gameType || 'original'; state.roles = ['duke', 'captain', 'assassin', 'contessa']; if (gameStats.gameType === 'inquisitors') { state.roles.push('inquisitor'); } else { state.roles.push('ambassador'); } deck = buildDeck(); gameTracker = new GameTracker(); <<<<<<< turnHistGroup++; setState({ name: stateNames.START_OF_TURN, playerIdx: firstPlayer }); gameTracker.startOfTurn(state); ======= >>>>>>> <<<<<<< gameTracker.action(command.action, command.target); player.cash -= action.cost; ======= playerState.cash -= action.cost; >>>>>>> gameTracker.action(command.action, command.target); playerState.cash -= action.cost;
<<<<<<< var socket; function join(form, event, gameName) { if (isInvalidPlayerName()) { return; ======= var socket = io(); socket.on('hello', function (data) { vm.activeUsers(data.activeUsers); }); socket.on('disconnect', function () { vm.bannerMessage('Disconnected'); vm.state.state.name(null); // Opens the welcome screen. }); socket.on('state', function (data) { ko.mapping.fromJS(data, vm.state); vm.targetedAction(''); vm.weAllowed(false); vm.chosenExchangeOptions({}); $('.activity').scrollTop(0); $('.action-bar').effect('highlight', {color: '#ddeeff'}, 'fast'); console.log(data); }); socket.on('history', function (data) { var items; if (data.continuation && vm.history().length) { // Collect related history items together. items = vm.history()[0]; } else { items = ko.observableArray(); vm.history.unshift(items); } items.push({ icon: data.type, message: formatMessage(data.message) }); }); socket.on('chat', function (data) { var from; if (data.from == vm.state.playerIdx()) { from = 'You'; } else { var player = vm.state.players()[data.from]; from = player ? player.name() : 'Unknown'; } var html = '<b>' + from + ':</b> ' + data.message + '<br/>'; $('.chat').append(html); $('.chat').scrollTop(10000); }); socket.on('error', function (data) { alert(data); }); socket.on('game-error', function (data) { console.error(data); }); function join() { if (!vm.playerName() || !vm.playerName().match(/^[a-zA-Z0-9_ !@#$*]+$/)) { alert('Enter a valid name'); >>>>>>> var socket = io(); socket.on('hello', function (data) { vm.activeUsers(data.activeUsers); }); socket.on('gamenotfound', function(data) { vm.bannerMessage('Private game: "' + data.gameName + '" was not found. Redirecting you back to the lobby...'); vm.state.state.name(null); vm.needName(false); //Redirect to the root setTimeout(function() { window.location = window.location.protocol + '//' + window.location.host; }, 3000); }); socket.on('gameinprogress', function(data) { vm.bannerMessage('The game: "' + data.gameName + '" is currently in progress.'); vm.state.state.name(null); vm.needName(false); }); socket.on('recreated', function(data) { vm.playerReady(false); join(null, null, data.gameName); }); socket.on('disconnect', function () { vm.bannerMessage('Disconnected'); $('#privateGameCreatedModal').modal('hide');//close the modal in case it was open when we disconnected vm.state.state.name(null); // Opens the welcome screen. vm.needName(false); }); socket.on('state', function (data) { ko.mapping.fromJS(data, vm.state); vm.targetedAction(''); vm.weAllowed(false); vm.chosenExchangeOptions({}); $('.activity').scrollTop(0); $('.action-bar').effect('highlight', {color: '#ddeeff'}, 'fast'); console.log(data); }); socket.on('history', function (data) { var items; if (data.continuation && vm.history().length) { // Collect related history items together. items = vm.history()[0]; } else { items = ko.observableArray(); vm.history.unshift(items); } items.push({ icon: data.type, message: formatMessage(data.message) }); }); socket.on('chat', function (data) { var from; if (data.from == vm.state.playerIdx()) { from = 'You'; } else { var player = vm.state.players()[data.from]; from = player ? player.name() : 'Unknown'; } var html = '<b>' + from + ':</b> ' + data.message + '<br/>'; $('.chat').append(html); $('.chat').scrollTop(10000); }); socket.on('created', function(data) { socket.emit('disconnect'); location.hash = data.gameName; //if you created a private game, we show you the welcome modal $('#privateGameCreatedModal').modal({}) }); socket.on('error', function (data) { alert(data); }); socket.on('game-error', function (data) { console.error(data); }); function join(form, event, gameName) { if (isInvalidPlayerName()) { return; <<<<<<< if (socket == null) { // Re-use the same socket. Automatically reconnects if disconnected. socket = io(); socket.on('gamenotfound', function(data) { vm.welcomeMessage('Private game: "' + data.gameName + '" was not found. Redirecting you back to the lobby...'); vm.state.state.name(null); vm.needName(false); //Redirect to the root setTimeout(function() { window.location = window.location.protocol + '//' + window.location.host; }, 3000); }); socket.on('gameinprogress', function(data) { vm.welcomeMessage('The game: "' + data.gameName + '" is currently in progress.'); vm.state.state.name(null); vm.needName(false); }); socket.on('recreated', function(data) { vm.playerReady(false); join(null, null, data.gameName); }); socket.on('disconnect', function () { vm.welcomeMessage('Disconnected'); $('#privateGameCreatedModal').modal('hide');//close the modal in case it was open when we disconnected vm.state.state.name(null); // Opens the welcome screen. vm.needName(false); }); socket.on('state', function (data) { ko.mapping.fromJS(data, vm.state); vm.targetedAction(''); vm.weAllowed(false); $('.activity').scrollTop(0); $('.action-bar').effect('highlight', {color: '#ddeeff'}, 'fast'); console.log(data); }); socket.on('history', function (data) { var items; if (data.continuation && vm.history().length) { // Collect related history items together. items = vm.history()[0]; } else { items = ko.observableArray(); vm.history.unshift(items); } items.push({ icon: data.type, message: formatMessage(data.message) }); }); socket.on('chat', function (data) { var from; if (data.from == vm.state.playerIdx()) { from = 'You'; } else { var player = vm.state.players()[data.from]; from = player ? player.name() : 'Unknown'; } var html = '<b>' + from + ':</b> ' + data.message + '<br/>'; $('.chat').append(html); $('.chat').scrollTop(10000); }); socket.on('error', function (data) { alert(data); }); socket.on('game-error', function (data) { console.error(data); }); } socket.emit('join', { playerName: vm.playerName(), gameName: gameName }); } function create(form, event) { if (isInvalidPlayerName()) { return; } _.debounce(new function() { if (socket == null) { socket = io(); } socket.on('created', function(data) { socket.emit('disconnect'); socket = null; location.hash = data.gameName; //if you created a private game, we show you the welcome modal $('#privateGameCreatedModal').modal({}) }); socket.emit('create', { gameName: vm.playerName(), playerName: vm.playerName() }); }, 500, true); } function ready(form, event) { vm.playerReady(true); socket.emit('ready', { playerName: vm.playerName(), gameName: vm.state.gameName(), playerIdx: vm.state.playerIdx() }); } function isInvalidPlayerName() { if (!vm.playerName() || !vm.playerName().match(/^[a-zA-Z0-9_ !@#$*]+$/)) { alert('Enter a valid name'); return true; } if (vm.playerName().length > 30) { alert('Enter a shorter name'); return true; } return false; ======= socket.emit('join', vm.playerName()); >>>>>>> socket.emit('join', { playerName: vm.playerName(), gameName: gameName }); } function create(form, event) { if (isInvalidPlayerName()) { return; } _.debounce(new function() { socket.emit('create', { gameName: vm.playerName(), playerName: vm.playerName() }); }, 500, true); } function ready(form, event) { vm.playerReady(true); socket.emit('ready', { playerName: vm.playerName(), gameName: vm.state.gameName(), playerIdx: vm.state.playerIdx() }); } function isInvalidPlayerName() { if (!vm.playerName() || !vm.playerName().match(/^[a-zA-Z0-9_ !@#$*]+$/)) { alert('Enter a valid name'); return true; } if (vm.playerName().length > 30) { alert('Enter a shorter name'); return true; } return false;
<<<<<<< var publicGames = []; var privateGames = {}; ======= var pending = []; var sockets = {}; var TIMEOUT = 30 * 60 * 1000; >>>>>>> var publicGames = []; var privateGames = {}; var pending = []; var sockets = {}; var TIMEOUT = 30 * 60 * 1000; <<<<<<< socket.on('join', function (data) { reapPrivateGames(); var playerName = data.playerName; var gameName = data.gameName; if (isInvalidPlayerName(playerName)) { return; } if (gameName) { joinPrivateGame(playerName, gameName); } else { joinOrCreatePublicGame(playerName); } }); function reapPrivateGames() { for (var gameName in privateGames) { var privateGameUpForReaping = privateGames[gameName]; if (privateGameUpForReaping.gameOver()) { console.log('Reaping finished private game ' + gameName); delete privateGames[gameName]; } } } function joinPrivateGame(playerName, gameName) { var game = privateGames[gameName]; if (!game) { socket.emit('gamenotfound', { gameName: gameName }); ======= var timestamp = new Date().getTime(); sockets[socket.id] = timestamp; var activeUsers = 0; for (var id in sockets) { if (timestamp - sockets[id] > TIMEOUT) { delete sockets[id]; } else { activeUsers++; } } socket.emit('hello', { activeUsers: activeUsers }); socket.on('join', function (playerName) { if (!playerName || playerName.length > 30 || !playerName.match(/^[a-zA-Z0-9_ !@#$*]+$/)) { >>>>>>> var timestamp = new Date().getTime(); sockets[socket.id] = timestamp; var activeUsers = 0; for (var id in sockets) { if (timestamp - sockets[id] > TIMEOUT) { delete sockets[id]; } else { activeUsers++; } } socket.emit('hello', { activeUsers: activeUsers }); socket.on('join', function (data) { reapPrivateGames(); var playerName = data.playerName; var gameName = data.gameName; if (isInvalidPlayerName(playerName)) { return; } if (gameName) { joinPrivateGame(playerName, gameName); } else { joinOrCreatePublicGame(playerName); } }); function reapPrivateGames() { for (var gameName in privateGames) { var privateGameUpForReaping = privateGames[gameName]; if (privateGameUpForReaping.gameOver()) { console.log('Reaping finished private game ' + gameName); delete privateGames[gameName]; } } } function joinPrivateGame(playerName, gameName) { var game = privateGames[gameName]; if (!game) { socket.emit('gamenotfound', { gameName: gameName });
<<<<<<< const swarmEnabled = api.swarmEnabled(); const servers = Object.keys(config.servers); ======= const swarmEnabled = config.swarm; const servers = Object.keys(config.servers || {}); >>>>>>> const swarmEnabled = api.swarmEnabled(); const servers = Object.keys(config.servers || {});
<<<<<<< import serverInfo from './server-info'; ======= import { scrubConfig } from './scrub-config'; >>>>>>> import serverInfo from './server-info'; import { scrubConfig } from './scrub-config';
<<<<<<< Promise.all([ models.Manager.deleteTable(granuleTable), models.Manager.deleteTable(collectionTable), models.Manager.deleteTable(pdrTable), models.Manager.deleteTable(executionTable), ======= await Promise.all([ >>>>>>> await Promise.all([ models.Manager.deleteTable(granuleTable), models.Manager.deleteTable(collectionTable), models.Manager.deleteTable(pdrTable), models.Manager.deleteTable(executionTable), <<<<<<< t.deepEqual(record.files, granule.files); t.is(record.status, 'completed'); t.is(record.collectionId, collectionId); t.is(record.granuleId, granule.granuleId); t.is(record.cmrLink, granule.cmrLink); t.is(record.published, granule.published); t.is(record.productVolume, 17909733); t.is(record.beginningDateTime, '2017-10-24T00:00:00.000Z'); t.is(record.endingDateTime, '2018-10-24T00:00:00.000Z'); t.is(record.productionDateTime, '2018-04-25T21:45:45.524Z'); t.is(record.lastUpdateDateTime, '2018-04-20T21:45:45.524Z'); t.is(record.timeToArchive, 100); t.is(record.timeToPreprocess, 120); t.is(record.processingStartTime, '2018-05-03T14:23:12.010Z'); t.is(record.processingEndTime, '2018-05-03T17:11:33.007Z') const { name: deconstructed } = indexer.deconstructCollectionId(record.collectionId); ======= t.deepEqual(record._source.files, granule.files); t.is(record._source.status, 'completed'); t.is(record._parent, collectionId); t.is(record._id, granule.granuleId); t.is(record._source.cmrLink, granule.cmrLink); t.is(record._source.published, granule.published); t.is(record._source.productVolume, 17909733); t.is(record._source.beginningDateTime, '2017-10-24T00:00:00.000Z'); t.is(record._source.endingDateTime, '2018-10-24T00:00:00.000Z'); t.is(record._source.productionDateTime, '2018-04-25T21:45:45.524Z'); t.is(record._source.lastUpdateDateTime, '2018-04-20T21:45:45.524Z'); t.is(record._source.timeToArchive, 100 / 1000); t.is(record._source.timeToPreprocess, 120 / 1000); t.is(record._source.processingStartDateTime, '2018-05-03T14:23:12.010Z'); t.is(record._source.processingEndDateTime, '2018-05-03T17:11:33.007Z'); const { name: deconstructed } = indexer.deconstructCollectionId(record._parent); >>>>>>> t.deepEqual(record.files, granule.files); t.is(record.status, 'completed'); t.is(record.collectionId, collectionId); t.is(record.granuleId, granule.granuleId); t.is(record.cmrLink, granule.cmrLink); t.is(record.published, granule.published); t.is(record.productVolume, 17909733); t.is(record.beginningDateTime, '2017-10-24T00:00:00.000Z'); t.is(record.endingDateTime, '2018-10-24T00:00:00.000Z'); t.is(record.productionDateTime, '2018-04-25T21:45:45.524Z'); t.is(record.lastUpdateDateTime, '2018-04-20T21:45:45.524Z'); t.is(record.timeToArchive, 100 / 1000); t.is(record.timeToPreprocess, 120 /1000); t.is(record.processingStartDateTime, '2018-05-03T14:23:12.010Z'); t.is(record.processingEndDateTime, '2018-05-03T17:11:33.007Z') const { name: deconstructed } = indexer.deconstructCollectionId(record.collectionId); <<<<<<< ======= await esClient.indices.refresh(); >>>>>>> await esClient.indices.refresh();
<<<<<<< ======= }; Event.prototype.migrateDoctype = function() { var hasMigrate; hasMigrate = this.migrateDateTime('start'); if (!hasMigrate) { return this; } this.migrateDateTime('end'); if (this.rrule) { this.timezone = User.timezone; } else { this.timezone = void 0; } return this.save((function(_this) { return function(err) { if (err) { console.log(err); } return _this; }; })(this)); }; Event.prototype.migrateDateTime = function(dateField) { var d, dateStr, m, timezone; dateStr = this[dateField]; if (!dateStr) { return false; } if (dateStr.length === 10 || dateStr.charAt(10) === 'T') { return false; } d = dateStr; if (__indexOf.call(dateStr, "GMT") < 0) { d = d + " GMT+0000"; } m = momentTz.tz(d, 'UTC'); if (this.rrule) { timezone = User.timezone || "Europe/Paris"; this[dateField] = m.tz(timezone).format(Event.ambiguousDTFormat); } else { this[dateField] = m.format(Event.utcDTFormat); } return true; }; Event.migrateAll = function() { return Event.all({}, function(err, events) { var event, _i, _len, _results; if (err) { console.log(err); return; } _results = []; for (_i = 0, _len = events.length; _i < _len; _i++) { event = events[_i]; _results.push(event.migrateDoctype()); } return _results; }); /* Constraints an alarm of alarms * All types action{1} : in [AUDIO, DISPLAY, EMAIL, PROCEDURE] trigger{1} : when the alarm is triggered * Display description{1} : text to display when alarm is triggered ( duration repeat )? * Email summary{1} : email title description{1} : email content attendee+ : email addresses the message should be sent to attach* : message attachments * Audio ( duration repeat )? attach? : sound resource (base-64 encoded binary or URL) * Proc attach{1} : procedure resource to be invoked ( duration repeat )? description? */ >>>>>>> }; Event.prototype.migrateDoctype = function() { var hasMigrate; hasMigrate = this.migrateDateTime('start'); if (!hasMigrate) { return this; } this.migrateDateTime('end'); if (this.rrule) { this.timezone = User.timezone; } else { this.timezone = void 0; } return this.save((function(_this) { return function(err) { if (err) { console.log(err); } return _this; }; })(this)); }; Event.prototype.migrateDateTime = function(dateField) { var d, dateStr, m, timezone; dateStr = this[dateField]; if (!dateStr) { return false; } if (dateStr.length === 10 || dateStr.charAt(10) === 'T') { return false; } d = dateStr; if (__indexOf.call(dateStr, "GMT") < 0) { d = d + " GMT+0000"; } m = momentTz.tz(d, 'UTC'); if (this.rrule) { timezone = User.timezone || "Europe/Paris"; this[dateField] = m.tz(timezone).format(Event.ambiguousDTFormat); } else { this[dateField] = m.format(Event.utcDTFormat); } return true; }; Event.migrateAll = function() { return Event.all({}, function(err, events) { var event, _i, _len, _results; if (err) { console.log(err); return; } _results = []; for (_i = 0, _len = events.length; _i < _len; _i++) { event = events[_i]; _results.push(event.migrateDoctype()); } return _results; });
<<<<<<< CalendarView.prototype.showPopover = function(options) { options.container = this.cal; options.parentView = this; if (this.popover) { this.popover.close(); if (this.popover.options.start.is(options.start) && this.popover.options.end.is(options.end) && this.popover.options.type === options.type) { this.cal.fullCalendar('unselect'); this.popover = null; return; } ======= CalendarView.prototype.showPopover = function(options) { var _ref1, _ref2; options.container = this.cal; options.parentView = this; if (this.popover) { this.popover.close(); if ((this.popover.options.model != null) && this.popover.options.model === options.model || (((_ref1 = this.popover.options.start) != null ? _ref1.is(options.start) : void 0) && ((_ref2 = this.popover.options.end) != null ? _ref2.is(options.end) : void 0) && this.popover.options.type === options.type)) { this.cal.fullCalendar('unselect'); this.popover = null; return; >>>>>>> CalendarView.prototype.showPopover = function(options) { var _ref1, _ref2; options.container = this.cal; options.parentView = this; if (this.popover) { this.popover.close(); if ((this.popover.options.model != null) && this.popover.options.model === options.model || (((_ref1 = this.popover.options.start) != null ? _ref1.is(options.start) : void 0) && ((_ref2 = this.popover.options.end) != null ? _ref2.is(options.end) : void 0) && this.popover.options.type === options.type)) { this.cal.fullCalendar('unselect'); this.popover = null; return; }
<<<<<<< const { KMS } = require('@cumulus/ingest/aws'); const providerSchema = require('./schemas').provider; ======= const Crypto = require('@cumulus/ingest/aws').DefaultProvider; const providerSchema = require('../schemas').provider; >>>>>>> const Crypto = require('@cumulus/ingest/aws').DefaultProvider; const providerSchema = require('./schemas').provider; <<<<<<< const kmsId = process.env.KMS_ID; return KMS.encrypt(password, kmsId); ======= return await Crypto.encrypt(password); >>>>>>> return await Crypto.encrypt(password); <<<<<<< return KMS.decrypt(password); ======= return await Crypto.decrypt(password); >>>>>>> return await Crypto.decrypt(password);
<<<<<<< exports.update = exports.operator('update', 2, function () { var args = Array.prototype.slice.call(arguments); return exports.object.update.apply(this, args); ======= exports.first = exports.operator('first', 1, function (object) { return object[0]; }); exports.last = exports.operator('last', 1, function (object) { return object[object.length - 1]; }); exports.update = exports.operator('update', 2, function (target, source) { exports.object.update(target, source); >>>>>>> exports.first = exports.operator('first', 1, function (object) { return object[0]; }); exports.last = exports.operator('last', 1, function (object) { return object[object.length - 1]; }); exports.update = exports.operator('update', 2, function () { var args = Array.prototype.slice.call(arguments); return exports.object.update.apply(this, args);
<<<<<<< /** * Reingest a granule from the Cumulus API * * @param {Object} params - params * @param {string} params.prefix - the prefix configured for the stack * @param {string} params.granuleId - a granule ID * @returns {Promise<Object>} - the granule fetched by the API */ async function reingestGranule({ prefix, granuleId }) { const payload = await callCumulusApi({ prefix: prefix, functionName: 'ApiGranulesDefault', payload: { httpMethod: 'PUT', resource: '/v1/granules/{granuleName}', path: `/v1/granules/${granuleId}`, pathParameters: { granuleName: granuleId }, body: JSON.stringify({ action: 'reingest' }) } }); return JSON.parse(payload.body); } /** * Removes a granule from CMR via the Cumulus API * * @param {Object} params - params * @param {string} params.prefix - the prefix configured for the stack * @param {string} params.granuleId - a granule ID * @returns {Promise<Object>} - the granule fetched by the API */ async function removeFromCMR({ prefix, granuleId }) { const payload = await callCumulusApi({ prefix: prefix, functionName: 'ApiGranulesDefault', payload: { httpMethod: 'PUT', resource: '/v1/granules/{granuleName}', path: `/v1/granules/${granuleId}`, pathParameters: { granuleName: granuleId }, body: JSON.stringify({ action: 'removeFromCmr' }) } }); return JSON.parse(payload.body); } /** * Run a workflow with the given granule as the payload * * @param {Object} params - params * @param {string} params.prefix - the prefix configured for the stack * @param {string} params.granuleId - a granule ID * @param {string} params.workflow - workflow to be run with given granule * @returns {Promise<Object>} - the granule fetched by the API */ async function applyWorkflow({ prefix, granuleId, workflow }) { const payload = await callCumulusApi({ prefix: prefix, functionName: 'ApiGranulesDefault', payload: { httpMethod: 'PUT', resource: '/v1/granules/{granuleName}', path: `/v1/granules/${granuleId}`, pathParameters: { granuleName: granuleId }, body: JSON.stringify({ action: 'applyWorkflow', workflow }) } }); return JSON.parse(payload.body); } ======= /** * Fetch an execution from the Cumulus API * * @param {Object} params - params * @param {string} params.prefix - the prefix configured for the stack * @param {string} params.arn - an execution arn * @returns {Promise<Object>} - the execution fetched by the API */ async function getExecution({ prefix, arn }) { const payload = await callCumulusApi({ prefix: prefix, functionName: 'ApiExecutionsDefault', payload: { httpMethod: 'GET', resource: '/executions/{arn}', path: `executions/${arn}`, pathParameters: { arn: arn } } }); return JSON.parse(payload.body); } >>>>>>> /** * Reingest a granule from the Cumulus API * * @param {Object} params - params * @param {string} params.prefix - the prefix configured for the stack * @param {string} params.granuleId - a granule ID * @returns {Promise<Object>} - the granule fetched by the API */ async function reingestGranule({ prefix, granuleId }) { const payload = await callCumulusApi({ prefix: prefix, functionName: 'ApiGranulesDefault', payload: { httpMethod: 'PUT', resource: '/v1/granules/{granuleName}', path: `/v1/granules/${granuleId}`, pathParameters: { granuleName: granuleId }, body: JSON.stringify({ action: 'reingest' }) } }); return JSON.parse(payload.body); } /** * Removes a granule from CMR via the Cumulus API * * @param {Object} params - params * @param {string} params.prefix - the prefix configured for the stack * @param {string} params.granuleId - a granule ID * @returns {Promise<Object>} - the granule fetched by the API */ async function removeFromCMR({ prefix, granuleId }) { const payload = await callCumulusApi({ prefix: prefix, functionName: 'ApiGranulesDefault', payload: { httpMethod: 'PUT', resource: '/v1/granules/{granuleName}', path: `/v1/granules/${granuleId}`, pathParameters: { granuleName: granuleId }, body: JSON.stringify({ action: 'removeFromCmr' }) } }); return JSON.parse(payload.body); } /** * Run a workflow with the given granule as the payload * * @param {Object} params - params * @param {string} params.prefix - the prefix configured for the stack * @param {string} params.granuleId - a granule ID * @param {string} params.workflow - workflow to be run with given granule * @returns {Promise<Object>} - the granule fetched by the API */ async function applyWorkflow({ prefix, granuleId, workflow }) { const payload = await callCumulusApi({ prefix: prefix, functionName: 'ApiGranulesDefault', payload: { httpMethod: 'PUT', resource: '/v1/granules/{granuleName}', path: `/v1/granules/${granuleId}`, pathParameters: { granuleName: granuleId }, body: JSON.stringify({ action: 'applyWorkflow', workflow }) } }); return JSON.parse(payload.body); } /** * Fetch an execution from the Cumulus API * * @param {Object} params - params * @param {string} params.prefix - the prefix configured for the stack * @param {string} params.arn - an execution arn * @returns {Promise<Object>} - the execution fetched by the API */ async function getExecution({ prefix, arn }) { const payload = await callCumulusApi({ prefix: prefix, functionName: 'ApiExecutionsDefault', payload: { httpMethod: 'GET', resource: '/executions/{arn}', path: `executions/${arn}`, pathParameters: { arn: arn } } }); return JSON.parse(payload.body); } <<<<<<< getGranule, reingestGranule, removeFromCMR, applyWorkflow ======= getGranule, getExecution >>>>>>> getGranule, reingestGranule, removeFromCMR, applyWorkflow, getExecution
<<<<<<< // -- gmosx George Moschovitis ======= // -- gmosx George Moschovitis Copyright (C) 2009-2010 MIT License >>>>>>> // -- gmosx George Moschovitis Copyright (C) 2009-2010 MIT License <<<<<<< exports.escape = exports.escapeHTML = function(string) { return String(string) .replace(/&/g, "&amp;") .replace(/</g, "&lt;") .replace(/>/g, "&gt;"); }; ======= exports.escape = exports.escapeHTML = function (str) { if (str) { return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"); } else { return ""; } } >>>>>>> exports.escape = function(string) { return String(string) .replace(/&/g, "&amp;") .replace(/</g, "&lt;") .replace(/>/g, "&gt;"); }; <<<<<<< exports.unescape = function(string) { return String(string) .replace(/&amp;/g, "&") .replace(/&lt;/g, "<") .replace(/&gt;/g, ">"); }; ======= exports.unescape = function (str) { if (str) { return str.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">"); } else { return ""; } } >>>>>>> exports.unescape = function(string) { return String(string) .replace(/&amp;/g, "&") .replace(/&lt;/g, "<") .replace(/&gt;/g, ">"); };
<<<<<<< if (require.main == module.id) ======= */ if (require.main === module.id) >>>>>>> */ if (require.main == module.id)
<<<<<<< ======= exports.Loader = function (options) { var loader = {}; var factories = options.factories || {}; var paths = options.paths; var extensions = options.extensions || ["", ".js"]; var timestamps = {}; var debug = options.debug; loader.resolve = exports.resolve; loader.find = function (topId) { // if it's absolute only search the "root" directory. // file.join() must collapse multiple "/" into a single "/" var searchPaths = system.fs.isAbsolute(topId) ? [""] : paths; for (var j = 0; j < extensions.length; j++) { var extension = extensions[j]; for (var i = 0; i < searchPaths.length; i++) { var path = system.fs.join(searchPaths[i], topId + extension); if (system.fs.isFile(path)) return path; } } throw new Error("require error: couldn't find \"" + topId + '"'); }; loader.fetch = function (topId, path) { if (!path) path = loader.find(topId); if (typeof system.fs.mtime === "function") timestamps[path] = system.fs.mtime(path); if (debug) print('loader: fetching ' + topId); var text = system.fs.read(path, { 'charset': 'utf-8' }); // we leave the endline so the error line numbers align text = text.replace(/^#[^\n]+\n/, "\n"); return text; }; loader.evaluate = function (text, topId, path) { if (system.evaluate) { if (!path) path = loader.find(topId); var factory = system.evaluate(text, path, 1); factory.path = path; return factory; } else { return new Function("require", "exports", "module", "system", "print", text); } }; loader.load = function (topId, path) { if (!Object.prototype.hasOwnProperty.call(factories, topId)) { loader.reload(topId); } else if (typeof system.fs.mtime === "function") { if (!path) path = loader.find(topId); if (loader.hasChanged(topId, path)) loader.reload(topId); } return factories[topId]; }; loader.reload = function (topId, path) { factories[topId] = loader.evaluate(loader.fetch(topId, path), topId); }; loader.isLoaded = function (topId) { return Object.prototype.hasOwnProperty.call(factories, topId); }; loader.hasChanged = function (topId, path) { if (!path) path = loader.resolve(topId); return ( !Object.prototype.hasOwnProperty.call(timestamps, path) || system.fs.mtime(path) > timestamps[path] ); }; loader.paths = paths; loader.extensions = extensions; return loader; }; exports.MultiLoader = function (options) { var factories = options.factories || {}; var self = {}; self.paths = options.paths || []; self.loader = options.loader || exports.Loader(options); self.loaders = options.loaders || [ ["", self.loader], [".js", self.loader] ]; self.resolve = exports.resolve; self.find = function (topId) { // if it's absolute only search the "root" directory. // file.join() must collapse multiple "/" into a single "/" var searchPaths = system.fs.isAbsolute(topId) ? [""] : self.paths; for (var j = 0, jj = self.loaders.length; j < jj; j++) { var extension = self.loaders[j][0]; var loader = self.loaders[j][1]; for (var i = 0, ii = searchPaths.length; i < ii; i++) { var path = system.fs.join(searchPaths[i], topId + extension); if (system.fs.isFile(path)) { // now check each extension for a match. // handles case when extension is in the id, so it's matched by "", // but we want to use the loader corresponding to the actual extension for (var k = 0, kk = self.loaders.length; k < kk; k++) { var ext = self.loaders[k][0]; if (path.lastIndexOf(ext) === path.length - ext.length) return [self.loaders[k][1], path]; } throw "ERROR: shouldn't reach this point!" } } } throw "require error: couldn't find \"" + topId + '"'; }; self.load = function (topId, loader, path) { if (!loader || !path) { var pair = self.find(topId); loader = pair[0]; path = pair[1]; } if ( !Object.prototype.hasOwnProperty.call(factories, topId) || (loader.hasChanged && loader.hasChanged(topId, path)) ) self.reload(topId, loader, path); return factories[topId]; }; self.reload = function (topId, loader, path) { if (!loader || !path) { var pair = self.find(topId); loader = pair[0]; path = pair[1]; } loader.reload(topId, path); factories[topId] = loader.load(topId, path); }; self.isLoaded = function (topId) { return Object.prototype.hasOwnProperty.call(factories, topId); }; return self; }; exports.AttenuatedLoader = function (loader) { var self = {}; self.resolve = Object.freeze(function (id, baseId) { return loader.resolve(id, baseId); }); self.fetch = Object.freeze(function (topId) { if (/\./.test(topId)) throw new Error("Invalid module identifier: " + topId); return loader.fetch(topId); }); self.load = Object.freeze(function (topId, path) { if (/\./.test(topId)) throw new Error("Invalid module identifier"); return loader.load(topId, path); }); self.reload = Object.freeze(function (topId, path) { if (/\./.test(topId)) throw new Error("Invalid module identifier"); return loader.reload(topId, path); }); return Object.freeze(self); }; >>>>>>> <<<<<<< if (sandbox.debug > 1) { var debugAcc = ""; for (var i = 0; i < debugDepth; i++) debugAcc += "|"; print(debugAcc + " " + id, 'module'); } ======= if (sandbox.debug) print(new Array(debugDepth + 1).join("|") + " " + id, 'module'); >>>>>>> if (sandbox.debug > 1) print(new Array(debugDepth + 1).join("|") + " " + id, 'module');
<<<<<<< var require = Require(id, pkg); var module = metadata[id] = metadata[id] || {}; module.id = id; module.path = factory.path; if (pkg) { module["package"] = pkg; module.using = ( pkg && loader.usingCatalog && loader.usingCatalog[pkg] ? loader.usingCatalog[pkg]["packages"] : {} ); } module.toString = function () { return this.id; }; ======= var require = Require(id); var module = metadata[id] = metadata[id] || Module(id, factory.path); >>>>>>> var require = Require(id, pkg); var module = metadata[id] = metadata[id] || Module(id, factory.path); if (pkg) { module["package"] = pkg; module.using = ( pkg && loader.usingCatalog && loader.usingCatalog[pkg] ? loader.usingCatalog[pkg]["packages"] : {} ); } <<<<<<< var Require = function (baseId, basePkg) { var require = function (id, pkg) { //try { return sandbox(id, baseId, pkg, basePkg); //} catch (exception) { // if (exception.message) // exception.message += ' in ' + baseId; // throw exception; //} ======= var Require = function (baseId) { var require = function (id) { return sandbox(id, baseId); >>>>>>> var Require = function (baseId, basePkg) { var require = function (id, pkg) { return sandbox(id, baseId, pkg, basePkg);
<<<<<<< async buildVote ( { address, votes, fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false ) { const staticFee = store.getters['transaction/staticFee'](3) || V1.fees[3] if (!isAdvancedFee && fee > staticFee) { ======= async buildVote ({ votes, fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](TRANSACTION_TYPES.VOTE) if (!isAdvancedFee && fee.gt(staticFee)) { >>>>>>> async buildVote ( { address, votes, fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false ) { const staticFee = store.getters['transaction/staticFee'](TRANSACTION_TYPES.VOTE) if (!isAdvancedFee && fee.gt(staticFee)) { <<<<<<< async buildDelegateRegistration ( { address, username, fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false ) { const staticFee = store.getters['transaction/staticFee'](2) || V1.fees[2] if (!isAdvancedFee && fee > staticFee) { ======= async buildDelegateRegistration ({ username, fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](TRANSACTION_TYPES.DELEGATE_REGISTRATION) if (!isAdvancedFee && fee.gt(staticFee)) { >>>>>>> async buildDelegateRegistration ( { address, username, fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false ) { const staticFee = store.getters['transaction/staticFee'](TRANSACTION_TYPES.DELEGATE_REGISTRATION) if (!isAdvancedFee && fee.gt(staticFee)) { <<<<<<< async buildTransfer ( { address, amount, fee, recipientId, vendorField, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false ) { const staticFee = store.getters['transaction/staticFee'](0) || V1.fees[0] if (!isAdvancedFee && fee > staticFee) { ======= async buildTransfer ({ amount, fee, recipientId, vendorField, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](TRANSACTION_TYPES.TRANSFER) if (!isAdvancedFee && fee.gt(staticFee)) { >>>>>>> async buildTransfer ( { address, amount, fee, recipientId, vendorField, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false ) { const staticFee = store.getters['transaction/staticFee'](TRANSACTION_TYPES.TRANSFER) if (!isAdvancedFee && fee.gt(staticFee)) { <<<<<<< async buildSecondSignatureRegistration ( { address, fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false ) { const staticFee = store.getters['transaction/staticFee'](1) || V1.fees[1] if (!isAdvancedFee && fee > staticFee) { ======= async buildSecondSignatureRegistration ({ fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](TRANSACTION_TYPES.SECOND_SIGNATURE) if (!isAdvancedFee && fee.gt(staticFee)) { >>>>>>> async buildSecondSignatureRegistration ( { address, fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false ) { const staticFee = store.getters['transaction/staticFee'](TRANSACTION_TYPES.SECOND_SIGNATURE) if (!isAdvancedFee && fee.gt(staticFee)) {
<<<<<<< } if (getters['current']()) { const peerUrl = getBaseUrl(getters['current']()) return PeerDiscovery.new({ ======= } else if (getters.current()) { const peerUrl = getBaseUrl(getters.current()) peerDiscovery = await PeerDiscovery.new({ >>>>>>> } else if (getters.current()) { const peerUrl = getBaseUrl(getters.current()) return PeerDiscovery.new({
<<<<<<< const walletApiHost = host.replace(/:\d+/, ':4040') const endpoints = [ `${host}/config`, `${walletApiHost}/config`, walletApiHost ] for (const endpoint of endpoints) { try { const { data } = await axios({ url: endpoint, method: 'GET', headers: { 'Content-Type': 'application/json' }, timeout }) if (data) { return data.data } } catch (error) { // TODO only if a new feature to enable logging is added // console.log(`Error on \`${host}\``) ======= try { const { data } = await httpClient.request({ url: `${host}/config`, method: 'GET', headers: { 'Content-Type': 'application/json' }, timeout }) if (data) { return data.data >>>>>>> const walletApiHost = host.replace(/:\d+/, ':4040') const endpoints = [ `${host}/config`, `${walletApiHost}/config`, walletApiHost ] for (const endpoint of endpoints) { try { const { data } = await httpClient.request({ url: endpoint, method: 'GET', headers: { 'Content-Type': 'application/json' }, timeout }) if (data) { return data.data } } catch (error) { // TODO only if a new feature to enable logging is added // console.log(`Error on \`${host}\``) <<<<<<< async buildVote ({ votes, fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](3) || V1.fees[3] if (!isAdvancedFee && fee > staticFee) { throw new Error(`Vote fee should be smaller than ${staticFee}`) ======= async buildVote ({ votes, fee, passphrase, secondPassphrase, wif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](3) || V1.fees[3] if (!isAdvancedFee && fee > staticFee) { throw new Error(`Vote fee should be smaller than ${staticFee}`) >>>>>>> async buildVote ({ votes, fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](3) || V1.fees[3] if (!isAdvancedFee && fee > staticFee) { throw new Error(`Vote fee should be smaller than ${staticFee}`) <<<<<<< async buildDelegateRegistration ({ username, fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](2) || V1.fees[2] if (!isAdvancedFee && fee > staticFee) { throw new Error(`Delegate registration fee should be smaller than ${staticFee}`) ======= async buildDelegateRegistration ({ username, fee, passphrase, secondPassphrase, wif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](2) || V1.fees[2] if (!isAdvancedFee && fee > staticFee) { throw new Error(`Delegate registration fee should be smaller than ${staticFee}`) >>>>>>> async buildDelegateRegistration ({ username, fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](2) || V1.fees[2] if (!isAdvancedFee && fee > staticFee) { throw new Error(`Delegate registration fee should be smaller than ${staticFee}`) <<<<<<< async buildTransfer ({ amount, fee, recipientId, vendorField, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](0) || V1.fees[0] if (!isAdvancedFee && fee > staticFee) { throw new Error(`Transfer fee should be smaller than ${staticFee}`) ======= async buildTransfer ({ amount, fee, recipientId, vendorField, passphrase, secondPassphrase, wif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](0) || V1.fees[0] if (!isAdvancedFee && fee > staticFee) { throw new Error(`Transfer fee should be smaller than ${staticFee}`) >>>>>>> async buildTransfer ({ amount, fee, recipientId, vendorField, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](0) || V1.fees[0] if (!isAdvancedFee && fee > staticFee) { throw new Error(`Transfer fee should be smaller than ${staticFee}`) <<<<<<< async buildSecondSignatureRegistration ({ fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](1) || V1.fees[1] if (!isAdvancedFee && fee > staticFee) { throw new Error(`Second signature fee should be smaller than ${staticFee}`) ======= async buildSecondSignatureRegistration ({ fee, passphrase, secondPassphrase, wif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](1) || V1.fees[1] if (!isAdvancedFee && fee > staticFee) { throw new Error(`Second signature fee should be smaller than ${staticFee}`) >>>>>>> async buildSecondSignatureRegistration ({ fee, passphrase, secondPassphrase, wif, networkWif }, isAdvancedFee = false, returnObject = false) { const staticFee = store.getters['transaction/staticFee'](1) || V1.fees[1] if (!isAdvancedFee && fee > staticFee) { throw new Error(`Second signature fee should be smaller than ${staticFee}`)
<<<<<<< dust = require('../lib/server'), ======= >>>>>>> <<<<<<< require('./jasmine-test/spec/testHelpers'); ======= //make dust a global dust = require('../lib/dust'); //load additional helpers used in testing require('./jasmine-test/spec/testHelpers'); >>>>>>> //make dust a global dust = require('../lib/server'); //load additional helpers used in testing require('./jasmine-test/spec/testHelpers');
<<<<<<< /*jshint evil:true*/ (function(root) { var dust = {}, ERROR = 'ERROR', WARN = 'WARN', INFO = 'INFO', DEBUG = 'DEBUG', levels = [DEBUG, INFO, WARN, ERROR], EMPTY_FUNC = function() {}, logger = EMPTY_FUNC, loggerContext = this; dust.isDebug = false; dust.debugLevel = INFO; // Try to find the console logger in global scope if (root && root.console && root.console.log) { logger = root.console.log; loggerContext = root.console; } /** * If dust.isDebug is true, Log dust debug statements, info statements, warning statements, and errors. * This default implementation will print to the console if it exists. * @param {String} message the message to print * @param {String} type the severity of the message(ERROR, WARN, INFO, or DEBUG) * @public */ dust.log = function(message, type) { type = type || INFO; if(dust.isDebug && levels.indexOf(type) >= levels.indexOf(dust.debugLevel)) { if(!dust.logQueue) { dust.logQueue = []; } dust.logQueue.push({message: message, type: type}); logger.call(loggerContext, '[DUST ' + type + ']: ' + message); } }; ======= var dust = {}; function getGlobal(){ return (function(){ return this.dust; }).call(null); } (function(dust) { if(!dust) { return; } var SILENT = 'SILENT', NONE = 'NONE', ERROR = 'ERROR', WARN = 'WARN', INFO = 'INFO', DEBUG = 'DEBUG', loggingLevels = [DEBUG, INFO, WARN, ERROR, NONE], logger = function() {}; dust.debugLevel = NONE; dust.silenceErrors = false; // Try to find the console logger in window scope (browsers) or top level scope (node.js) if (typeof window !== 'undefined' && window && window.console && window.console.log) { logger = window.console.log; } else if (typeof console !== 'undefined' && console && console.log) { logger = console.log; } /** * If dust.isDebug is true, Log dust debug statements, info statements, warning statements, and errors. * This default implementation will print to the console if it exists. * @param {String} message the message to print * @param {String} type the severity of the message(ERROR, WARN, INFO, or DEBUG) * @public */ dust.log = function(message, type) { // isDebug is deprecated, so this conditional will default the debugLevel to INFO if it's set to maintain backcompat. if(dust.isDebug && dust.debugLevel === NONE) { logger.call(console || window.console, '[!!!DEPRECATION WARNING!!!]: dust.isDebug is deprecated. Set dust.debugLevel instead to the level of logging you want ["debug","info","warn","error","none"]'); dust.debugLevel = INFO; } type = type || INFO; if(loggingLevels.indexOf(type) >= loggingLevels.indexOf(dust.debugLevel)) { if(!dust.logQueue) { dust.logQueue = []; } dust.logQueue.push({message: message, type: type}); logger.call(console || window.console, "[DUST " + type + "]: " + message); } }; /** * If debugging is turned on(dust.isDebug=true) log the error message and throw it. * Otherwise try to keep rendering. This is useful to fail hard in dev mode, but keep rendering in production. * @param {Error} error the error message to throw * @param {Object} chunk the chunk the error was thrown from * @public */ dust.onError = function(error, chunk) { dust.log(error.message || error, ERROR); if(!dust.silenceErrors) { throw error; } else { return chunk; } }; >>>>>>> /*jshint evil:true*/ (function(root) { var dust = {}, SILENT = 'SILENT', NONE = 'NONE', ERROR = 'ERROR', WARN = 'WARN', INFO = 'INFO', DEBUG = 'DEBUG', loggingLevels = [DEBUG, INFO, WARN, ERROR, NONE], EMPTY_FUNC = function() {}, logger = EMPTY_FUNC, loggerContext = this; dust.debugLevel = NONE; dust.silenceErrors = false; // Try to find the console logger in global scope if (root && root.console && root.console.log) { logger = root.console.log; loggerContext = root.console; } /** * If dust.isDebug is true, Log dust debug statements, info statements, warning statements, and errors. * This default implementation will print to the console if it exists. * @param {String} message the message to print * @param {String} type the severity of the message(ERROR, WARN, INFO, or DEBUG) * @public */ dust.log = function(message, type) { if(dust.isDebug && dust.debugLevel === NONE) { logger.call(loggerContext, '[!!!DEPRECATION WARNING!!!]: dust.isDebug is deprecated. Set dust.debugLevel instead to the level of logging you want ["debug","info","warn","error","none"]'); dust.debugLevel = INFO; } type = type || INFO; if(loggingLevels.indexOf(type) >= loggingLevels.indexOf(dust.debugLevel)) { if(!dust.logQueue) { dust.logQueue = []; } dust.logQueue.push({message: message, type: type}); logger.call(loggerContext, '[DUST ' + type + ']: ' + message); } }; <<<<<<< ======= } if (typeof ctx == 'function'){ //wrap to preserve context 'this' see #174 return function() { try { return ctx.apply(ctxThis, arguments); } catch (err) { return dust.onError(err, ctx.head); } }; } else { return ctx; } }; >>>>>>>
<<<<<<< /*jshint evil:true*/ (function(root) { var dust = {}, SILENT = 'SILENT', NONE = 'NONE', ======= /*global console */ var dust = {}; function getGlobal(){ return (function(){ return this.dust; }).call(null); } (function(dust) { if(!dust) { return; } var NONE = 'NONE', >>>>>>> /*jshint evil:true*/ (function(root) { var dust = {}, NONE = 'NONE', <<<<<<< if(dust.isDebug && dust.debugLevel === NONE) { logger.call(loggerContext, '[!!!DEPRECATION WARNING!!!]: dust.isDebug is deprecated. Set dust.debugLevel instead to the level of logging you want ["debug","info","warn","error","none"]'); ======= // dust.isDebug is deprecated, so this conditional will default the debugLevel to INFO if it's set to maintain backcompat. if (dust.isDebug && dust.debugLevel === NONE) { logger.call(console || window.console, '[!!!DEPRECATION WARNING!!!]: dust.isDebug is deprecated. Set dust.debugLevel instead to the level of logging you want ["debug","info","warn","error","none"]'); >>>>>>> if(dust.isDebug && dust.debugLevel === NONE) { logger.call(loggerContext, '[!!!DEPRECATION WARNING!!!]: dust.isDebug is deprecated. Set dust.debugLevel instead to the level of logging you want ["debug","info","warn","error","none"]'); <<<<<<< dust.onError(new Error('Chunk error [' + chunk.error + '] thrown. Ceasing to render this template.')); this.flush = EMPTY_FUNC; ======= dust.log(new Error('Chunk error [' + chunk.error + '] thrown. Ceasing to render this template.'), ERROR); this.flush = function() {}; >>>>>>> dust.log(new Error('Chunk error [' + chunk.error + '] thrown. Ceasing to render this template.'), ERROR); this.flush = EMPTY_FUNC; <<<<<<< dust.onError(new Error('Chunk error [' + chunk.error + '] thrown. Ceasing to render this template.')); this.flush = EMPTY_FUNC; ======= dust.log(new Error('Chunk error [' + chunk.error + '] thrown. Ceasing to render this template.'), ERROR); this.flush = function() {}; >>>>>>> dust.log(new Error('Chunk error [' + chunk.error + '] thrown. Ceasing to render this template.'), ERROR); this.flush = EMPTY_FUNC;
<<<<<<< super({ tableName: process.env.GranulesTable, tableHash: { name: 'granuleId', type: 'S' }, schema: granuleSchema }); ======= // initiate the manager class with the name of the // granules table super(process.env.GranulesTable, granuleSchema); } /** * Adds fileSize values from S3 object metadata for granules missing that information * * @param {Array<Object>} files - Array of files from a payload granule object * @returns {Promise<Array>} - Updated array of files with missing fileSize appended */ addMissingFileSizes(files) { const filePromises = files.map((file) => { if (!('fileSize' in file)) { return commonAws.headObject(file.bucket, file.filepath) .then((result) => { const updatedFile = file; updatedFile.fileSize = result.ContentLength; return updatedFile; }) .catch((error) => { log.error(`Error: ${error}`); log.error(`Could not validate missing filesize for s3://${file.filename}`); return file; }); } return Promise.resolve(file); }); return Promise.all(filePromises); } /** * Create the dynamoDB for this class * * @returns {Promise} aws dynamodb createTable response */ async createTable() { const hash = { name: 'granuleId', type: 'S' }; return Manager.createTable(this.tableName, hash); >>>>>>> super({ tableName: process.env.GranulesTable, tableHash: { name: 'granuleId', type: 'S' }, schema: granuleSchema }); } /** * Adds fileSize values from S3 object metadata for granules missing that information * * @param {Array<Object>} files - Array of files from a payload granule object * @returns {Promise<Array>} - Updated array of files with missing fileSize appended */ addMissingFileSizes(files) { const filePromises = files.map((file) => { if (!('fileSize' in file)) { return commonAws.headObject(file.bucket, file.filepath) .then((result) => { const updatedFile = file; updatedFile.fileSize = result.ContentLength; return updatedFile; }) .catch((error) => { log.error(`Error: ${error}`); log.error(`Could not validate missing filesize for s3://${file.filename}`); return file; }); } return Promise.resolve(file); }); return Promise.all(filePromises); } /** * Create the dynamoDB for this class * * @returns {Promise} aws dynamodb createTable response */ async createTable() { const hash = { name: 'granuleId', type: 'S' }; return Manager.createTable(this.tableName, hash);
<<<<<<< })(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_17__) { ======= })(this, function(__WEBPACK_EXTERNAL_MODULE_41__, __WEBPACK_EXTERNAL_MODULE_42__) { >>>>>>> })(this, function(__WEBPACK_EXTERNAL_MODULE_42__, __WEBPACK_EXTERNAL_MODULE_43__) { <<<<<<< var moment = __webpack_require__(2); ======= var moment = __webpack_require__(39); >>>>>>> var moment = __webpack_require__(40); <<<<<<< // Only load hammer.js when in a browser environment // (loading hammer.js in a node.js environment gives errors) if (typeof window !== 'undefined') { module.exports = window['Hammer'] || __webpack_require__(17); } else { module.exports = function () { throw Error('hammer.js is only available in a browser, not in node.js.'); } } ======= var Emitter = __webpack_require__(46); var Hammer = __webpack_require__(40); var util = __webpack_require__(1); var DataSet = __webpack_require__(3); var DataView = __webpack_require__(4); var Range = __webpack_require__(15); var TimeAxis = __webpack_require__(27); var CurrentTime = __webpack_require__(19); var CustomTime = __webpack_require__(20); var LineGraph = __webpack_require__(26); /** * Create a timeline visualization * @param {HTMLElement} container * @param {vis.DataSet | Array | google.visualization.DataTable} [items] * @param {Object} [options] See Graph2d.setOptions for the available options. * @constructor */ function Graph2d (container, items, options, groups) { var me = this; this.defaultOptions = { start: null, end: null, >>>>>>> // Utility functions for ordering and stacking of items var EPSILON = 0.001; // used when checking collisions, to prevent round-off errors /** * Order items by their start data * @param {Item[]} items */ exports.orderByStart = function(items) { items.sort(function (a, b) { return a.data.start - b.data.start; }); }; /** * Order items by their end date. If they have no end date, their start date * is used. * @param {Item[]} items */ exports.orderByEnd = function(items) { items.sort(function (a, b) { var aTime = ('end' in a.data) ? a.data.end : a.data.start, bTime = ('end' in b.data) ? b.data.end : b.data.start; return aTime - bTime; }); }; /** * Adjust vertical positions of the items such that they don't overlap each * other. * @param {Item[]} items * All visible items * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin * Margins between items and between items and the axis. * @param {boolean} [force=false] * If true, all items will be repositioned. If false (default), only * items having a top===null will be re-stacked */ exports.stack = function(items, margin, force) { var i, iMax; if (force) { // reset top position of all items for (i = 0, iMax = items.length; i < iMax; i++) { items[i].top = null; } } // calculate new, non-overlapping positions for (i = 0, iMax = items.length; i < iMax; i++) { var item = items[i]; if (item.top === null) { // initialize top position item.top = margin.axis; do { // TODO: optimize checking for overlap. when there is a gap without items, // you only need to check for items from the next item on, not from zero var collidingItem = null; for (var j = 0, jj = items.length; j < jj; j++) { var other = items[j]; if (other.top !== null && other !== item && exports.collision(item, other, margin.item)) { collidingItem = other; break; } } if (collidingItem != null) { // There is a collision. Reposition the items above the colliding element item.top = collidingItem.top + collidingItem.height + margin.item.vertical; } } while (collidingItem); } } }; /** * Adjust vertical positions of the items without stacking them * @param {Item[]} items * All visible items * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin * Margins between items and between items and the axis. */ exports.nostack = function(items, margin) { var i, iMax; // reset top position of all items for (i = 0, iMax = items.length; i < iMax; i++) { items[i].top = margin.axis; } }; /** * Test if the two provided items collide * The items must have parameters left, width, top, and height. * @param {Item} a The first item * @param {Item} b The second item * @param {{horizontal: number, vertical: number}} margin * An object containing a horizontal and vertical * minimum required margin. * @return {boolean} true if a and b collide, else false */ exports.collision = function(a, b, margin) { return ((a.left - margin.horizontal + EPSILON) < (b.left + b.width) && (a.left + a.width + margin.horizontal - EPSILON) > b.left && (a.top - margin.vertical + EPSILON) < (b.top + b.height) && (a.top + a.height + margin.vertical - EPSILON) > b.top); }; <<<<<<< ======= /***/ }, /* 17 */ /***/ function(module, exports, __webpack_require__) { var moment = __webpack_require__(39); >>>>>>> <<<<<<< // select items this.selection = []; for (i = 0, ii = ids.length; i < ii; i++) { id = ids[i]; item = this.items[id]; if (item) { this.selection.push(id); item.select(); } } } }; ======= var Hammer = __webpack_require__(40); var util = __webpack_require__(1); var Component = __webpack_require__(18); >>>>>>> // select items this.selection = []; for (i = 0, ii = ids.length; i < ii; i++) { id = ids[i]; item = this.items[id]; if (item) { this.selection.push(id); item.select(); } } } }; <<<<<<< this.visibleItems = this._updateVisibleItems(this.orderedItems, this.visibleItems, range); ======= var Hammer = __webpack_require__(40); var util = __webpack_require__(1); var DataSet = __webpack_require__(3); var DataView = __webpack_require__(4); var Component = __webpack_require__(18); var Group = __webpack_require__(23); var ItemBox = __webpack_require__(29); var ItemPoint = __webpack_require__(30); var ItemRange = __webpack_require__(31); >>>>>>> this.visibleItems = this._updateVisibleItems(this.orderedItems, this.visibleItems, range); <<<<<<< if (this.groupsData) { // subscribe to new dataset var id = this.id; util.forEach(this.groupListeners, function (callback, event) { me.groupsData.on(event, callback, id); }); ======= var Hammer = __webpack_require__(40); >>>>>>> if (this.groupsData) { // subscribe to new dataset var id = this.id; util.forEach(this.groupListeners, function (callback, event) { me.groupsData.on(event, callback, id); }); <<<<<<< /** * Set the text for the popup window. This can be HTML code * @param {string} text */ Popup.prototype.setText = function(text) { this.frame.innerHTML = text; }; ======= // first check if moment.js is already loaded in the browser window, if so, // use this instance. Else, load via commonjs. module.exports = (typeof window !== 'undefined') && window['moment'] || __webpack_require__(41); /***/ }, /* 40 */ /***/ function(module, exports, __webpack_require__) { // Only load hammer.js when in a browser environment // (loading hammer.js in a node.js environment gives errors) if (typeof window !== 'undefined') { module.exports = window['Hammer'] || __webpack_require__(42); } else { module.exports = function () { throw Error('hammer.js is only available in a browser, not in node.js.'); } } /***/ }, /* 41 */ /***/ function(module, exports, __webpack_require__) { module.exports = __WEBPACK_EXTERNAL_MODULE_41__; /***/ }, /* 42 */ /***/ function(module, exports, __webpack_require__) { module.exports = __WEBPACK_EXTERNAL_MODULE_42__; /***/ }, /* 43 */ /***/ function(module, exports, __webpack_require__) { var Hammer = __webpack_require__(40); >>>>>>> /** * Set the text for the popup window. This can be HTML code * @param {string} text */ Popup.prototype.setText = function(text) { this.frame.innerHTML = text; }; <<<<<<< // something unknown is found, wrong characters, a syntax error tokenType = TOKENTYPE.UNKNOWN; while (c != '') { token += c; next(); } throw new SyntaxError('Syntax error in part "' + chop(token, 30) + '"'); } /** * Parse a graph. * @returns {Object} graph */ function parseGraph() { var graph = {}; first(); getToken(); // optional strict keyword if (token == 'strict') { graph.strict = true; getToken(); } // graph or digraph keyword if (token == 'graph' || token == 'digraph') { graph.type = token; getToken(); } // optional graph id if (tokenType == TOKENTYPE.IDENTIFIER) { graph.id = token; getToken(); } // open angle bracket if (token != '{') { throw newSyntaxError('Angle bracket { expected'); } getToken(); ======= /***/ }, /* 45 */ /***/ function(module, exports, __webpack_require__) { >>>>>>> // something unknown is found, wrong characters, a syntax error tokenType = TOKENTYPE.UNKNOWN; while (c != '') { token += c; next(); } throw new SyntaxError('Syntax error in part "' + chop(token, 30) + '"'); } /** * Parse a graph. * @returns {Object} graph */ function parseGraph() { var graph = {}; first(); getToken(); // optional strict keyword if (token == 'strict') { graph.strict = true; getToken(); } // graph or digraph keyword if (token == 'graph' || token == 'digraph') { graph.type = token; getToken(); } // optional graph id if (tokenType == TOKENTYPE.IDENTIFIER) { graph.id = token; getToken(); } // open angle bracket if (token != '{') { throw newSyntaxError('Angle bracket { expected'); } getToken(); <<<<<<< /** * Parse an edge or a series of edges * @param {Object} graph * @param {String | Number} from Id of the from node */ function parseEdge(graph, from) { while (token == '->' || token == '--') { var to; var type = token; getToken(); var subgraph = parseSubgraph(graph); if (subgraph) { to = subgraph; } else { if (tokenType != TOKENTYPE.IDENTIFIER) { throw newSyntaxError('Identifier or subgraph expected'); } to = token; addNode(graph, { id: to }); getToken(); } // parse edge attributes var attr = parseAttributeList(); // create edge var edge = createEdge(graph, from, to, type, attr); addEdge(graph, edge); from = to; } } ======= /***/ }, /* 46 */ /***/ function(module, exports, __webpack_require__) { >>>>>>> /** * Parse an edge or a series of edges * @param {Object} graph * @param {String | Number} from Id of the from node */ function parseEdge(graph, from) { while (token == '->' || token == '--') { var to; var type = token; getToken(); var subgraph = parseSubgraph(graph); if (subgraph) { to = subgraph; } else { if (tokenType != TOKENTYPE.IDENTIFIER) { throw newSyntaxError('Identifier or subgraph expected'); } to = token; addNode(graph, { id: to }); getToken(); } // parse edge attributes var attr = parseAttributeList(); // create edge var edge = createEdge(graph, from, to, type, attr); addEdge(graph, edge); from = to; } }
<<<<<<< var sample = new Array(1640).join('0123456789'); // make sure we have a payload larger than 16384 bytes for chunking coverage ======= >>>>>>> <<<<<<< res.end(sample); ======= res.end(internals.payload); >>>>>>> res.end(internals.payload); <<<<<<< res.end(sample); ======= res.end(internals.payload); >>>>>>> res.end(internals.payload); <<<<<<< expect(body.toString()).to.equal(sample); ======= expect(body.toString()).to.equal(internals.payload); >>>>>>> expect(body.toString()).to.equal(internals.payload); <<<<<<< res.end(sample); ======= res.end(internals.payload); >>>>>>> res.end(internals.payload); <<<<<<< res.end(sample); ======= res.end(internals.payload); >>>>>>> res.end(internals.payload); <<<<<<< var buf = new Buffer(sample, 'ascii'); ======= var buf = new Buffer(internals.payload, 'ascii'); >>>>>>> var buf = new Buffer(internals.payload, 'ascii'); <<<<<<< expect(body.toString()).to.equal(sample); ======= expect(body.toString()).to.equal(internals.payload); >>>>>>> expect(body.toString()).to.equal(internals.payload); <<<<<<< var buf = new Buffer(sample, 'ascii'); ======= var buf = new Buffer(internals.payload, 'ascii'); >>>>>>> var buf = new Buffer(internals.payload, 'ascii'); <<<<<<< res.write(sample); ======= res.write(internals.payload); >>>>>>> res.write(internals.payload); <<<<<<< res.write(sample); ======= res.write(internals.payload); >>>>>>> res.write(internals.payload); <<<<<<< res.write(sample); res.end(sample); ======= res.write(internals.payload); res.end(internals.payload); >>>>>>> res.write(internals.payload); res.end(internals.payload); <<<<<<< var res = Wreck.toReadableStream(sample); ======= var res = Wreck.toReadableStream(internals.payload); >>>>>>> var res = Wreck.toReadableStream(internals.payload); <<<<<<< var req1 = wreckA.request('get', 'http://localhost/', { headers: { banana: 911 } }, function (err, res1) { ======= req = wreckA.request('get', 'http://localhost/', { headers: { banana: 911 } }, function (err) { >>>>>>> var req1 = wreckA.request('get', 'http://localhost/', { headers: { banana: 911 } }, function (err) { <<<<<<< var req2 = wreckB.request('get', 'http://localhost/', { headers: { banana: 911 } }, function (err, res2) { ======= req = wreckB.request('get', 'http://localhost/', { headers: { banana: 911 } }, function (err) { >>>>>>> var req2 = wreckB.request('get', 'http://localhost/', { headers: { banana: 911 } }, function (err) { <<<<<<< var req3 = wreckAB.request('get', 'http://localhost/', { headers: { banana: 911 } }, function (err, res3) { ======= req = wreckAB.request('get', 'http://localhost/', { headers: { banana: 911 } }, function (err) { >>>>>>> var req3 = wreckAB.request('get', 'http://localhost/', { headers: { banana: 911 } }, function (err) {
<<<<<<< req.on('socket', onSocket); stream.on('error', onStreamError); ======= req.once('socket', onSocket); >>>>>>> req.once('socket', onSocket); stream.on('error', onStreamError);
<<<<<<< exports.amqpCommand = amqpCmd.amqpCommand; exports.exit = exit; ======= exports.command_print = cmd.command_print; >>>>>>> exports.amqpCommand = amqpCmd.amqpCommand; exports.exit = exit; exports.command_print = cmd.command_print;
<<<<<<< super({ tableName: process.env.GranulesTable, tableHash: { name: 'granuleId', type: 'S' }, schema: granuleSchema }); ======= // initiate the manager class with the name of the // granules table super(process.env.GranulesTable, granuleSchema); } /** * Adds fileSize values from S3 object metadata for granules missing that information * * @param {Array<Object>} files - Array of files from a payload granule object * @returns {Promise<Array>} - Updated array of files with missing fileSize appended */ addMissingFileSizes(files) { const filePromises = files.map((file) => { if (!('fileSize' in file)) { return commonAws.headObject(file.bucket, file.filepath) .then((result) => { const updatedFile = file; updatedFile.fileSize = result.ContentLength; return updatedFile; }) .catch((error) => { log.error(`Error: ${error}`); log.error(`Could not validate missing filesize for s3://${file.filename}`); return file; }); } return Promise.resolve(file); }); return Promise.all(filePromises); } /** * Create the dynamoDB for this class * * @returns {Promise} aws dynamodb createTable response */ async createTable() { const hash = { name: 'granuleId', type: 'S' }; return Manager.createTable(this.tableName, hash); >>>>>>> super({ tableName: process.env.GranulesTable, tableHash: { name: 'granuleId', type: 'S' }, schema: granuleSchema }); } /** * Adds fileSize values from S3 object metadata for granules missing that information * * @param {Array<Object>} files - Array of files from a payload granule object * @returns {Promise<Array>} - Updated array of files with missing fileSize appended */ addMissingFileSizes(files) { const filePromises = files.map((file) => { if (!('fileSize' in file)) { return commonAws.headObject(file.bucket, file.filepath) .then((result) => { const updatedFile = file; updatedFile.fileSize = result.ContentLength; return updatedFile; }) .catch((error) => { log.error(`Error: ${error}`); log.error(`Could not validate missing filesize for s3://${file.filename}`); return file; }); } return Promise.resolve(file); }); return Promise.all(filePromises);
<<<<<<< tap.equal(is("പതിമൂന്ന്").thirteen(), true); // Malayalam ======= tap.equals(is("१३").thirteen(), true); //Devanagari tap.equals(is("तेह्र").thirteen(), true); //Nepali tap.equal(is("quainel").thirteen(), true); // Quenya tap.equal(is("mînuiug").thirteen(), true); // Sindarin >>>>>>> tap.equal(is("പതിമൂന്ന്").thirteen(), true); // Malayalam tap.equals(is("१३").thirteen(), true); //Devanagari tap.equals(is("तेह्र").thirteen(), true); //Nepali tap.equal(is("quainel").thirteen(), true); // Quenya tap.equal(is("mînuiug").thirteen(), true); // Sindarin
<<<<<<< "sharon carter", // Agent 13 ======= "weedle", //#13 Pokémon >>>>>>> "sharon carter", // Agent 13 "weedle", //#13 Pokémon
<<<<<<< "olivia wilde", // AND because SHE's 13 ======= "Olivia Wilde", // AND because SHE's 13 "baker's dozen", // Bakers gonna bake "Dr. Remy Beauregard Hadley", // Why not 13's real name?! >>>>>>> "olivia wilde", // AND because SHE's 13 "baker's dozen", // Bakers gonna bake "Dr. Remy Beauregard Hadley", // Why not 13's real name?!
<<<<<<< const { naturalWidth, naturalHeight, stageWidth, stageHeight } = object; const degree = -self.parent.rotation; const natural = self.rotateDimensions({ width: naturalWidth, height: naturalHeight }, degree); const { width, height } = self.rotateDimensions({ width: stageWidth, height: stageHeight }, degree); const { width: radiusX, height: radiusY } = self.rotateDimensions( { width: (self.radiusX * (self.scaleX || 1) * 100) / object.stageWidth, // * (self.scaleX || 1) height: (self.radiusY * (self.scaleY || 1) * 100) / object.stageHeight, }, degree, ); const { x, y } = self.rotatePoint(self, degree, false); return { original_width: natural.width, original_height: natural.height, image_rotation: self.parent.rotation, ======= const res = { original_width: object.naturalWidth, original_height: object.naturalHeight, >>>>>>> const { naturalWidth, naturalHeight, stageWidth, stageHeight } = object; const degree = -self.parent.rotation; const natural = self.rotateDimensions({ width: naturalWidth, height: naturalHeight }, degree); const { width, height } = self.rotateDimensions({ width: stageWidth, height: stageHeight }, degree); const { width: radiusX, height: radiusY } = self.rotateDimensions( { width: (self.radiusX * (self.scaleX || 1) * 100) / object.stageWidth, // * (self.scaleX || 1) height: (self.radiusY * (self.scaleY || 1) * 100) / object.stageHeight, }, degree, ); const { x, y } = self.rotatePoint(self, degree, false); const res = { original_width: natural.width, original_height: natural.height, image_rotation: self.parent.rotation,
<<<<<<< const { renameProperty } = require('@cumulus/common/util'); const { describeExecution } = require('@cumulus/common/step-functions'); ======= >>>>>>> const { renameProperty } = require('@cumulus/common/util');
<<<<<<< ======= hideable: true, }) .views(self => ({ get parent() { return getParentOfType(self, ImageModel); }, >>>>>>> hideable: true, <<<<<<< const style = item.style || item.tag || defaultStyle; let { strokecolor, strokewidth } = style; ======= if (item.hidden) return null; let { strokeColor, strokeWidth } = item; >>>>>>> if (item.hidden) return null; const style = item.style || item.tag || defaultStyle; let { strokecolor, strokewidth } = style;
<<<<<<< const { loadConfig, timestampedTestDataPrefix, uploadTestDataToBucket, deleteFolder } = require('../helpers/testUtils'); const sleep = require('sleep-promise'); ======= >>>>>>> <<<<<<< ======= const { Search } = require('@cumulus/api/es/search'); const { api: apiTestUtils } = require('@cumulus/integration-tests'); const { setupTestGranuleForIngest } = require('../helpers/granuleUtils'); const { loadConfig } = require('../helpers/testUtils'); >>>>>>> const { loadConfig, timestampedTestDataPrefix, uploadTestDataToBucket, deleteFolder } = require('../helpers/testUtils'); const { setupTestGranuleForIngest } = require('../helpers/granuleUtils'); <<<<<<< ======= let esClient; // eslint-disable-line no-unused-vars >>>>>>> <<<<<<< // Update input file paths const updatedInputPayloadJson = globalReplace(inputPayloadJson, 'cumulus-test-data/pdrs', testDataFolder); inputPayload = await setupTestGranuleForIngest(config.bucket, updatedInputPayloadJson, testDataGranuleId, granuleRegex); granuleId = inputPayload.granules[0].granuleId; ======= inputPayload = await setupTestGranuleForIngest(config.bucket, inputPayloadJson, testDataGranuleId, granuleRegex); inputGranuleId = inputPayload.granules[0].granuleId; >>>>>>> // Update input file paths const updatedInputPayloadJson = globalReplace(inputPayloadJson, 'cumulus-test-data/pdrs', testDataFolder); inputPayload = await setupTestGranuleForIngest(config.bucket, updatedInputPayloadJson, testDataGranuleId, granuleRegex); inputGranuleId = inputPayload.granules[0].granuleId; <<<<<<< granule = await apiTestUtils.getGranule({ prefix: config.stackName, granuleId: inputPayload.granules[0].granuleId }); cmrLink = granule.cmrLink; expect(cmrLink).not.toBeUndefined(); ======= >>>>>>> <<<<<<< const granuleRemoved = await waitForExist(cmrLink, false, 2); expect(granuleRemoved).toEqual(true); ======= await waitForConceptExistsOutcome(cmrLink, false, 2); const doesExist = await conceptExists(cmrLink); expect(doesExist).toEqual(false); >>>>>>> await waitForConceptExistsOutcome(cmrLink, false, 2); const doesExist = await conceptExists(cmrLink); expect(doesExist).toEqual(false);
<<<<<<< function removeTextFileExtension(filePath) { const extension = path.extname(filePath).toLowerCase(); if (extension === '.md' || extension === '.markdown' || extension === '.html') { return filePath.substr(0, filePath.length - extension.length); } else { return filePath; } } function getNoteTitle(filePath, replaceUnderscoresWithSpaces, noteMeta) { if (noteMeta) { return noteMeta.title; } else { const basename = path.basename(removeTextFileExtension(filePath)); if(replaceUnderscoresWithSpaces) { return basename.replace(/_/g, ' ').trim(); } return basename; } } ======= function timeLimit(promise, limitMs) { return new Promise((res, rej) => { let resolved = false; promise.then(result => { resolved = true; res(result); }); setTimeout(() => { if (!resolved) { rej(new Error('Process exceeded time limit ' + limitMs)); } }, limitMs); }); } >>>>>>> function removeTextFileExtension(filePath) { const extension = path.extname(filePath).toLowerCase(); if (extension === '.md' || extension === '.markdown' || extension === '.html') { return filePath.substr(0, filePath.length - extension.length); } else { return filePath; } } function getNoteTitle(filePath, replaceUnderscoresWithSpaces, noteMeta) { if (noteMeta) { return noteMeta.title; } else { const basename = path.basename(removeTextFileExtension(filePath)); if(replaceUnderscoresWithSpaces) { return basename.replace(/_/g, ' ').trim(); } return basename; } } function timeLimit(promise, limitMs) { return new Promise((res, rej) => { let resolved = false; promise.then(result => { resolved = true; res(result); }); setTimeout(() => { if (!resolved) { rej(new Error('Process exceeded time limit ' + limitMs)); } }, limitMs); }); } <<<<<<< formatDownloadTitle, getNoteTitle, removeTextFileExtension, ======= formatDownloadTitle, timeLimit >>>>>>> getNoteTitle, removeTextFileExtension, formatDownloadTitle, timeLimit
<<<<<<< utils.closeActiveDialog(); appContext.trigger('executeInActiveEditor', { callback: textEditor => { const hasSelection = !textEditor.model.document.selection.isCollapsed; $addLinkTitleFormGroup.toggle(!hasSelection); } }); ======= $addLinkTitleFormGroup.toggle(!hasSelection()); >>>>>>> appContext.trigger('executeInActiveEditor', { callback: textEditor => { const hasSelection = !textEditor.model.document.selection.isCollapsed; $addLinkTitleFormGroup.toggle(!hasSelection); } });
<<<<<<< for (const attr of attributes) { await noteEntity.addAttribute(attr.type, attr.name, attr.value); } ======= utcDateCreated = utcDateCreated || noteEntity.utcDateCreated; // sometime date modified is not present in ENEX, then use date created utcDateModified = utcDateModified || utcDateCreated; >>>>>>> for (const attr of attributes) { await noteEntity.addAttribute(attr.type, attr.name, attr.value); } utcDateCreated = utcDateCreated || noteEntity.utcDateCreated; // sometime date modified is not present in ENEX, then use date created utcDateModified = utcDateModified || utcDateCreated; <<<<<<< for (const attr of resource.attributes) { await noteEntity.addAttribute(attr.type, attr.name, attr.value); } ======= await updateDates(resourceNote.noteId, utcDateCreated, utcDateModified); >>>>>>> for (const attr of resource.attributes) { await noteEntity.addAttribute(attr.type, attr.name, attr.value); } await updateDates(resourceNote.noteId, utcDateCreated, utcDateModified);
<<<<<<< entityHashes: contentHashService.getEntityHashes(), maxSyncId: sql.getValue('SELECT MAX(id) FROM sync WHERE isSynced = 1') ======= entityHashes: await contentHashService.getEntityHashes(), maxSyncId: await sql.getValue('SELECT COALESCE(MAX(id), 0) FROM sync WHERE isSynced = 1') >>>>>>> entityHashes: contentHashService.getEntityHashes(), maxSyncId: sql.getValue('SELECT COALESCE(MAX(id), 0) FROM sync WHERE isSynced = 1') <<<<<<< syncs: syncService.getSyncRecords(syncs), maxSyncId: sql.getValue('SELECT MAX(id) FROM sync WHERE isSynced = 1') ======= syncs: await syncService.getSyncRecords(syncs), maxSyncId: await sql.getValue('SELECT COALESCE(MAX(id), 0) FROM sync WHERE isSynced = 1') >>>>>>> syncs: syncService.getSyncRecords(syncs), maxSyncId: sql.getValue('SELECT COALESCE(MAX(id), 0) FROM sync WHERE isSynced = 1')
<<<<<<< module.exports = function(S) { // Always pass in the ServerlessPlugin Class /** * Adding/Manipulating Serverless classes * - You can add or manipulate Serverless classes like this */ S.classes.Project.newStaticMethod = function() { console.log("A new method!"); }; S.classes.Project.prototype.newMethod = function() { S.classes.Project.newStaticMethod(); }; /** * Extending the Plugin Class * - Here is how you can add custom Actions and Hooks to Serverless. * - This class is only required if you want to add Actions and Hooks. */ class PluginBoilerplate extends S.classes.Plugin { /** * Constructor * - Keep this and don't touch it unless you know what you're doing. */ constructor() { super(); this.name = 'io.sc5.mocha'; this.testFileMap = {}; } /** * Register Actions * - function mocha-create */ registerActions() { S.addAction(this._createAction.bind(this), { handler: '_createAction', description: 'Create mocha test for function', context: 'function', contextAction: 'mocha-create', options: [{ option: 'template', shortcut: 'T', description: 'name of a template file used when creating test' }], parameters: [ // Use paths when you multiple values need to be input (like an array). Input looks like this: "serverless custom run module1/function1 module1/function2 module1/function3. Serverless will automatically turn this into an array and attach it to evt.options within your plugin { parameter: 'paths', description: 'Path to function to test. If not defined, test all functions.', position: '0->' // Can be: 0, 0-2, 0-> This tells Serverless which params are which. 3-> Means that number and infinite values after it. ======= class mochaPlugin { constructor(serverless, options) { this.serverless = serverless; this.options = options; this.commands = { create: { usage: 'Create mocha tests for service / function', commands: { test: { usage: 'Create test', lifecycleEvents: [ 'test' ], options: { function: { usage: 'Name of the function', shortcut: 'f', required: true, } } >>>>>>> class mochaPlugin { constructor(serverless, options) { this.serverless = serverless; this.options = options; this.commands = { create: { usage: 'Create mocha tests for service / function', commands: { test: { usage: 'Create test', lifecycleEvents: [ 'test' ], options: { function: { usage: 'Name of the function', shortcut: 'f', required: true, } } <<<<<<< return createTest(evt.options.paths[0], evt.options.template || templateFilename); ======= >>>>>>> <<<<<<< .then(function() { return _this.cliPromptSelectRegion('Choose a Region in this Stage: ', false, true, _this.evt.options.region, _this.evt.options.stage) .then(region => { _this.evt.options.region = region; }) }) .then(_this._runTests) .then(function() { return _this.evt; }); } _runTests() { let _this = this; return new BbPromise(function(resolve, reject) { let functions = _this.evt.options.paths; let mocha = new Mocha({timeout: process.env.SLS_MOCHA_TIMEOUT || 6000}); //This could pose as an issue if several functions share a common ENV name but different values. ======= var reporter = _this.options.reporter; if ( reporter !== undefined) { var reporterOptions = {}; if (_this.options["reporter-options"] !== undefined) { _this.options["reporter-options"].split(",").forEach(function(opt) { var L = opt.split("="); if (L.length > 2 || L.length === 0) { throw new Error("invalid reporter option '" + opt + "'"); } else if (L.length === 2) { reporterOptions[L[0]] = L[1]; } else { reporterOptions[L[0]] = true; } }); } mocha.reporter(reporter, reporterOptions) } >>>>>>> var reporter = _this.options.reporter; if ( reporter !== undefined) { var reporterOptions = {}; if (_this.options["reporter-options"] !== undefined) { _this.options["reporter-options"].split(",").forEach(function(opt) { var L = opt.split("="); if (L.length > 2 || L.length === 0) { throw new Error("invalid reporter option '" + opt + "'"); } else if (L.length === 2) { reporterOptions[L[0]] = L[1]; } else { reporterOptions[L[0]] = true; } }); } mocha.reporter(reporter, reporterOptions) } <<<<<<< let templateFilenamePath = path.join(testFolder, templateFilename); fs.exists(templateFilenamePath, function (exists) { let templateString = exists ? getTemplateFromFile(templateFilenamePath) : getTemplateFromString(); let content = ejs.render(templateString, { 'functionName': funcName, 'functionPath': funcPath }); fs.writeFile(funcFilePath, content, function(err) { if (err) { return reject(new Error(`Creating file ${funcFilePath} failed: ${err}`)); } console.log(`serverless-mocha-plugin: created ${funcFilePath}`); return resolve(funcFilePath); }) }); ======= return _this.serverless.cli.log(`serverless-mocha-plugin: created ${testFilePath}`); }) >>>>>>> return _this.serverless.cli.log(`serverless-mocha-plugin: created ${testFilePath}`); });
<<<<<<< asyncTest("follows redirect with X-PJAX-URL header", function() { var frame = this.frame frame.$.pjax({ url: "redirect.html", container: "#main", success: function() { equal(frame.location.pathname, "/hello.html") equal(frame.$("#main").html().trim(), "<p>Hello!</p>") start() } }) }) ======= function goBack(frame, callback) { setTimeout(function() { frame.$("#main").one("pjax:complete", callback) frame.history.back() }, 0) } function goForward(frame, callback) { setTimeout(function() { frame.$("#main").one("pjax:complete", callback) frame.history.forward() }, 0) } asyncTest("popstate going back to page", function() { var frame = this.frame equal(frame.location.pathname, "/home.html") frame.$.pjax({ url: "hello.html", container: "#main", complete: function() { equal(frame.location.pathname, "/hello.html") ok(frame.history.length > 1) goBack(frame, function() { equal(frame.location.pathname, "/home.html") start() }) } }) }) asyncTest("popstate going forward to page", function() { var frame = this.frame equal(frame.location.pathname, "/home.html") frame.$.pjax({ url: "hello.html", container: "#main", complete: function() { equal(frame.location.pathname, "/hello.html") ok(frame.history.length > 1) goBack(frame, function() { goForward(frame, function() { equal(frame.location.pathname, "/hello.html") start() }) }) } }) }) asyncTest("popstate preserves GET data", function() { var frame = this.frame frame.$.pjax({ url: "env.html?foo=1", data: { bar: 2 }, container: "#main", complete: function() { equal(frame.location.pathname, "/env.html") equal(frame.location.search, "?foo=1&bar=2") var env = JSON.parse(frame.$("#env").text()) equal(env['rack.request.query_hash']['foo'], '1') equal(env['rack.request.query_hash']['bar'], '2') frame.$.pjax({ url: "hello.html", container: "#main", complete: function() { equal(frame.location.pathname, "/hello.html") ok(frame.history.length > 2) goBack(frame, function() { equal(frame.location.pathname, "/env.html") equal(frame.location.search, "?foo=1&bar=2") var env = JSON.parse(frame.$("#env").text()) equal(env['rack.request.query_hash']['foo'], '1') equal(env['rack.request.query_hash']['bar'], '2') start() }) } }) } }) }) >>>>>>> function goBack(frame, callback) { setTimeout(function() { frame.$("#main").one("pjax:complete", callback) frame.history.back() }, 0) } function goForward(frame, callback) { setTimeout(function() { frame.$("#main").one("pjax:complete", callback) frame.history.forward() }, 0) } asyncTest("popstate going back to page", function() { var frame = this.frame equal(frame.location.pathname, "/home.html") frame.$.pjax({ url: "hello.html", container: "#main", complete: function() { equal(frame.location.pathname, "/hello.html") ok(frame.history.length > 1) goBack(frame, function() { equal(frame.location.pathname, "/home.html") start() }) } }) }) asyncTest("popstate going forward to page", function() { var frame = this.frame equal(frame.location.pathname, "/home.html") frame.$.pjax({ url: "hello.html", container: "#main", complete: function() { equal(frame.location.pathname, "/hello.html") ok(frame.history.length > 1) goBack(frame, function() { goForward(frame, function() { equal(frame.location.pathname, "/hello.html") start() }) }) } }) }) asyncTest("popstate preserves GET data", function() { var frame = this.frame frame.$.pjax({ url: "env.html?foo=1", data: { bar: 2 }, container: "#main", complete: function() { equal(frame.location.pathname, "/env.html") equal(frame.location.search, "?foo=1&bar=2") var env = JSON.parse(frame.$("#env").text()) equal(env['rack.request.query_hash']['foo'], '1') equal(env['rack.request.query_hash']['bar'], '2') frame.$.pjax({ url: "hello.html", container: "#main", complete: function() { equal(frame.location.pathname, "/hello.html") ok(frame.history.length > 2) goBack(frame, function() { equal(frame.location.pathname, "/env.html") equal(frame.location.search, "?foo=1&bar=2") var env = JSON.parse(frame.$("#env").text()) equal(env['rack.request.query_hash']['foo'], '1') equal(env['rack.request.query_hash']['bar'], '2') start() }) } }) } }) }) asyncTest("follows redirect with X-PJAX-URL header", function() { var frame = this.frame frame.$.pjax({ url: "redirect.html", container: "#main", success: function() { equal(frame.location.pathname, "/hello.html") equal(frame.$("#main").html().trim(), "<p>Hello!</p>") start() } }) })
<<<<<<< expect(slot.dependencies[0]).toBe('CompB$1234') expect(slot.body).toContain(`<template is="CompB$1234" data="{{ ...$root[ cp + 1 + _t ], $root, _t: _t || '' }}" />`) ======= expect(slot.dependencies[0]).toBe('./CompB$1234') expect(slot.body).toContain(`<template is="CompB$1234" data="{{ ...$root[ cp + 1 + (_t || '') ], $root, _t: _t || '' }}" />`) >>>>>>> expect(slot.dependencies[0]).toBe('CompB$1234') expect(slot.body).toContain(`<template is="CompB$1234" data="{{ ...$root[ cp + 1 + (_t || '') ], $root, _t: _t || '' }}" />`) <<<<<<< expect(slot.dependencies[0]).toBe('CompB$1234') expect(slot.body).toContain(`<template is="CompB$1234" data="{{ ...$root[ cp + 1 + _t ], $root, _t: _t || '' }}" />`) ======= expect(slot.dependencies[0]).toBe('./CompB$1234') expect(slot.body).toContain(`<template is="CompB$1234" data="{{ ...$root[ cp + 1 + (_t || '') ], $root, _t: _t || '' }}" />`) >>>>>>> expect(slot.dependencies[0]).toBe('CompB$1234') expect(slot.body).toContain(`<template is="CompB$1234" data="{{ ...$root[ cp + 1 + (_t || '') ], $root, _t: _t || '' }}" />`)
<<<<<<< /*! * Calipso Form Library * * Copyright(c) 2011 Clifton Cunningham <[email protected]> * MIT Licensed * * Core form generation module. * ======= /** * Core form generation module (default form rendering library). >>>>>>> /*! * Calipso Form Library * * Copyright(c) 2011 Clifton Cunningham <[email protected]> * MIT Licensed * * Core form generation module. * <<<<<<< } ======= // TODO (i18n) // monthNames is used for date inputs this.monthNames = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; }; >>>>>>> } <<<<<<< /** * Hidden tag */ CalipsoForm.prototype.render_tag_hidden = function(field, value) { ======= // HIDDEN // potential todo: allow hidden inputs to have id, classname. Form.prototype.render_tag_hidden = function(field, value) { >>>>>>> /** * Hidden tag * potential todo: allow hidden inputs to have id, classname. */ CalipsoForm.prototype.render_tag_hidden = function(field, value) { <<<<<<< /** * Select tag */ CalipsoForm.prototype.render_tag_select = function(field, value) { ======= // SELECT // TODO: Allow displayed text to be different from the option values // TODO: Support optgroups // potential todo: allow each option to have a classname. Form.prototype.render_tag_select = function(field, value) { >>>>>>> /** * Select tag */ CalipsoForm.prototype.render_tag_select = function(field, value) { // TODO: Allow displayed text to be different from the option values // TODO: Support optgroups // potential todo: allow each option to have a classname. <<<<<<< var tagOutput = '<input class="date" name="' + field.name + '[day]"' ======= // TODO var tagOutput = '<input type="text"' + ' class="date date-day' + (field.cls ? ' date-day-'+field.cls : '') + '"' + ' name="' + field.name + '[day]"' >>>>>>> // TODO - use users Locale var monthNames = calipso.date.regional[''].monthNamesShort; var tagOutput = '<input type="text"' + ' class="date date-day' + (field.cls ? ' date-day-'+field.cls : '') + '"' + ' name="' + field.name + '[day]"' <<<<<<< // TODO - use users Locale var monthNames = calipso.date.regional[''].monthNamesShort; tagOutput += '<select class="date" name="' + field.name + '[month]">'; ======= tagOutput += ' '; tagOutput += '<select class="date date-month' + (field.cls ? ' date-month-'+field.cls : '') + '"' + ' name="' + field.name + '[month]">'; >>>>>>> tagOutput += ' '; tagOutput += '<select class="date date-month' + (field.cls ? ' date-month-'+field.cls : '') + '"' + ' name="' + field.name + '[month]">'; <<<<<<< tagOutput += '<option value="' + monthNameCounter + '"' + (value.getMonth() === monthNameCounter ? ' selected' : '') + '>' + monthNames[monthNameCounter] + '</option>'; ======= tagOutput += ( '<option value="0"' + (value.getMonth() === monthNameCounter ? ' selected' : '') + '>' + this.monthNames[monthNameCounter] + '</option>' ); >>>>>>> tagOutput += ( '<option value="0"' + (value.getMonth() === monthNameCounter ? ' selected' : '') + '>' + monthNames[monthNameCounter] + '</option>' ); <<<<<<< ======= console.log(sys.inspect(output, true, 5, true)); >>>>>>> <<<<<<< if(output[object][field].hasOwnProperty('year') && output[object][field].hasOwnProperty('hours')) { var dateValue = new Date( (dateobj.year ? dateobj.year : 1900), (dateobj.month ? dateobj.month : 1), (dateobj.day ? dateobj.day : 1), (dateobj.hours ? dateobj.hours : 0), (dateobj.minutes ? dateobj.minutes : 0), (dateobj.seconds ? dateobj.seconds : 0)); output[object][field] = dateValue; ======= if(field.year || field.hours) { output[sectionName][fieldName] = new Date( (field.year || 1900), (field.month || 1), (field.day || 1), (field.hours || 0), (field.minutes || 0), (field.seconds || 0) ); >>>>>>> if(field.hasOwnProperty('year') && field.hasOwnProperty('hours')) { output[sectionName][fieldName] = new Date( (field.year || 1900), (field.month || 1), (field.day || 1), (field.hours || 0), (field.minutes || 0), (field.seconds || 0) ); } if(field.hasOwnProperty('date') && field.hasOwnProperty('hours')) { // TODO - LOCALE! output[sectionName][fieldName] = new Date( field.date + " " + field.hours + ":" + field.minutes + ":00" ); <<<<<<< if(output[object][field].hasOwnProperty('date') && output[object][field].hasOwnProperty('time')) { ======= if(field.date && field.time) { >>>>>>> if(field.hasOwnProperty('date') && field.hasOwnProperty('time')) {
<<<<<<< const getRubocopBaseCommand = command => command .split(/\s+/) .filter(i => i) .concat(DEFAULT_ARGS) // Retrieves style guide documentation with cached responses const getMarkDown = async (url) => { const anchor = url.split('#')[1] if (new Date().getTime() - docsLastRetrieved < DOCUMENTATION_LIFETIME) { // If documentation is stale, clear cache docsRuleCache.clear() } if (docsRuleCache.has(anchor)) { return docsRuleCache.get(anchor) } let rawRulesMarkdown try { rawRulesMarkdown = await get('https://raw.githubusercontent.com/bbatsov/ruby-style-guide/master/README.md') } catch (x) { return '***\nError retrieving documentation' } const byLine = rawRulesMarkdown.split('\n') // eslint-disable-next-line no-confusing-arrow const ruleAnchors = byLine.reduce( (acc, line, idx) => (line.match(/\* <a name=/g) ? acc.concat([[idx, line]]) : acc), [], ) ruleAnchors.forEach(([startingIndex, startingLine]) => { const ruleName = startingLine.split('"')[1] const beginSearch = byLine.slice(startingIndex + 1) // gobble all the documentation until you reach the next rule const documentationForRule = takeWhile(beginSearch, x => !x.match(/\* <a name=|##/)) const markdownOutput = '***\n'.concat(documentationForRule.join('\n')) docsRuleCache.set(ruleName, markdownOutput) }) docsLastRetrieved = new Date().getTime() return docsRuleCache.get(anchor) } const forwardRubocopToLinter = (version, { ======= const forwardRubocopToLinter = ({ >>>>>>> const getRubocopBaseCommand = command => command .split(/\s+/) .filter(i => i) .concat(DEFAULT_ARGS) const forwardRubocopToLinter = (version, { <<<<<<< const command = getRubocopBaseCommand(this.command) ======= const command = this.command .split(/\s+/) .filter(i => i) .concat(DEFAULT_ARGS) command.push(...(await getCopNameArg(command, cwd))) if (this.runExtraRailsCops) { command.push('--rails') } >>>>>>> const command = getRubocopBaseCommand(this.command)
<<<<<<< return this._scrollToAndDetermineHeights(verticalCoordinate) .then(heights => { console.log('\nScrolled to = ', verticalCoordinate); actualFullPageHeight = heights.scrollHeight; // with dpr this.innerHeight = heights.innerHeight; ======= return this._scrollToAndDetermineFullPageHeight(verticalCoordinate) .then(height => { actualFullPageHeight = height; >>>>>>> return this._scrollToAndDetermineFullPageHeight(verticalCoordinate) .then(heights => { // actualFullPageHeight = height; console.log('\nScrolled to = ', verticalCoordinate); actualFullPageHeight = heights.scrollHeight; // with dpr this.innerHeight = heights.innerHeight;
<<<<<<< super({ tableName: process.env.GranulesTable, tableHash: { name: 'granuleId', type: 'S' }, schema: granuleSchema }); ======= // initiate the manager class with the name of the // granules table super(process.env.GranulesTable, granuleSchema); } /** * Adds fileSize values from S3 object metadata for granules missing that information * * @param {Array<Object>} files - Array of files from a payload granule object * @returns {Promise<Array>} - Updated array of files with missing fileSize appended */ addMissingFileSizes(files) { const filePromises = files.map((file) => { if (!('fileSize' in file)) { return commonAws.headObject(file.bucket, file.filepath) .then((result) => { const updatedFile = file; updatedFile.fileSize = result.ContentLength; return updatedFile; }) .catch((error) => { log.error(`Error: ${error}`); log.error(`Could not validate missing filesize for s3://${file.filename}`); return file; }); } return Promise.resolve(file); }); return Promise.all(filePromises); } /** * Create the dynamoDB for this class * * @returns {Promise} aws dynamodb createTable response */ async createTable() { const hash = { name: 'granuleId', type: 'S' }; return Manager.createTable(this.tableName, hash); >>>>>>> super({ tableName: process.env.GranulesTable, tableHash: { name: 'granuleId', type: 'S' }, schema: granuleSchema }); } /** * Adds fileSize values from S3 object metadata for granules missing that information * * @param {Array<Object>} files - Array of files from a payload granule object * @returns {Promise<Array>} - Updated array of files with missing fileSize appended */ addMissingFileSizes(files) { const filePromises = files.map((file) => { if (!('fileSize' in file)) { return commonAws.headObject(file.bucket, file.filepath) .then((result) => { const updatedFile = file; updatedFile.fileSize = result.ContentLength; return updatedFile; }) .catch((error) => { log.error(`Error: ${error}`); log.error(`Could not validate missing filesize for s3://${file.filename}`); return file; }); } return Promise.resolve(file); }); return Promise.all(filePromises);
<<<<<<< import { whitelistReducer } from './whitelist_reducer'; ======= import { aoiReducer } from './aoi_reducer'; >>>>>>> import { whitelistReducer } from './whitelist_reducer'; import { aoiReducer } from './aoi_reducer'; <<<<<<< import type { whitelistReducerType } from './whitelist_reducer'; ======= import type { aoiReducerType } from './aoi_reducer'; >>>>>>> import type { whitelistReducerType } from './whitelist_reducer';
<<<<<<< const { partialRecordUpdate, deleteRecord, reingest } = require('../es/indexer'); const log = require('@cumulus/common/log'); const { moveGranuleFiles } = require('@cumulus/ingest/granule'); async function removeGranuleFromCmr(granuleId, collectionId) { log.info(`granules.removeGranuleFromCmr ${granuleId}`); const password = await DefaultProvider.decrypt(process.env.cmr_password); const cmr = new CMR( process.env.cmr_provider, process.env.cmr_client_id, process.env.cmr_username, password ); await cmr.deleteGranule(granuleId, collectionId); await partialRecordUpdate( null, granuleId, 'granule', { published: false, cmrLink: null }, collectionId ); } ======= const models = require('../models'); >>>>>>> const models = require('../models'); const { moveGranuleFiles } = require('@cumulus/ingest/granule');
<<<<<<< import { watchWhitelist } from './whitelist_actions'; ======= import { watchAOI } from './aoi_actions'; >>>>>>> import { watchWhitelist } from './whitelist_actions'; import { watchAOI } from './aoi_actions';
<<<<<<< if(process.env.TDDIUM_REDIS_HOST != null){ var redisConfig = { "fake": toFakeRedis, "host": process.env.TDDIUM_REDIS_HOST, "port": process.env.TDDIUM_REDIS_PORT, "password": process.env.TDDIUM_REDIS_PASSWORD, "options": null, "database": process.env.TDDIUM_REDIS_DB } }else{ var redisConfig = { "fake": toFakeRedis, "host": "127.0.0.1", "port": 6379, "password": null, "options": null, "database": 2 } ======= var redisConfig = { "fake": toFakeRedis, "host": "127.0.0.1", "port": 6379, "password": null, "options": null, "DB": 2 >>>>>>> var redisConfig = { "fake": toFakeRedis, "host": "127.0.0.1", "port": 6379, "password": null, "options": null, "DB": 2 <<<<<<< tasks : { scheduler: false, timeout: 100, queues: [], redis: redisConfig, }, ======= faye: { mount: '/faye', timeout: 45, ping: null, redis: redisConfig, namespace: 'faye:' }, >>>>>>> tasks : { scheduler: false, timeout: 100, queues: [], redis: redisConfig, }, faye: { mount: '/faye', timeout: 45, ping: null, redis: redisConfig, namespace: 'faye:' }, <<<<<<< tasks : { scheduler: false, timeout: 100, queues: [], redis: redisConfig, }, ======= faye: { mount: '/faye', timeout: 45, ping: null, redis: redisConfig, namespace: 'faye:' }, >>>>>>> tasks : { scheduler: false, timeout: 100, queues: [], redis: redisConfig, }, faye: { mount: '/faye', timeout: 45, ping: null, redis: redisConfig, namespace: 'faye:' }, <<<<<<< tasks : { scheduler: false, timeout: 100, queues: [], redis: redisConfig, }, ======= faye: { mount: '/faye', timeout: 45, ping: null, redis: redisConfig, namespace: 'faye:' }, >>>>>>> tasks : { scheduler: false, timeout: 100, queues: [], redis: redisConfig, }, faye: { mount: '/faye', timeout: 45, ping: null, redis: redisConfig, namespace: 'faye:' },
<<<<<<< } // Check if the src does not match original src if // so switch back and restore original bindings if ( embedPlayer.kAds && embedPlayer.kAds.adPlayer && !embedPlayer.kAds.adPlayer.isVideoSiblingEnabled() ){ // restore the original source: embedPlayer.switchPlaySource( _this.originalSource, completeFunc); } else { completeFunc(); } ======= }); >>>>>>> }); // Check if the src does not match original src if // so switch back and restore original bindings if ( embedPlayer.kAds && embedPlayer.kAds.adPlayer && !embedPlayer.kAds.adPlayer.isVideoSiblingEnabled() ){ // restore the original source: embedPlayer.switchPlaySource( _this.originalSource, completeFunc); } else { completeFunc(); }
<<<<<<< if( mw.getConfig( "DisableVideoSibling") ) { return false; } if( mw.getConfig( "EmbedPlayer.ForceNativeComponent") ) { return false; } if ( this.disableSibling) { return false; } // iPhone and IOS 5 does not play multiple videos well, use source switch if( mw.isIphone() || mw.isAndroid2() || mw.isAndroid40() || mw.isMobileChrome() ======= // iPhone and IOS 5 does not play multiple videos well, use source switch. Chromecast should not use sibling as well. if( mw.isIphone() || mw.isAndroid2() || mw.isAndroid40() || mw.isMobileChrome() || this.embedPlayer.instanceOf == "Chromecast" >>>>>>> if( mw.getConfig( "DisableVideoSibling") ) { return false; } if( mw.getConfig( "EmbedPlayer.ForceNativeComponent") ) { return false; } if ( this.disableSibling) { return false; } // iPhone and IOS 5 does not play multiple videos well, use source switch. Chromecast should not use sibling as well. if( mw.isIphone() || mw.isAndroid2() || mw.isAndroid40() || mw.isMobileChrome() || this.embedPlayer.instanceOf == "Chromecast" <<<<<<< if ( isNaN( vid.duration ) || vid.duration === 0 ) { ======= if ( isNaN( vid.duration ) ) { >>>>>>> if ( isNaN( vid.duration ) || vid.duration === 0 ) {
<<<<<<< ======= this.bind("seeking", this.onSeekBeforePlay.bind(this)); >>>>>>> this.bind("seeking", this.onSeekBeforePlay.bind(this));
<<<<<<< url:"", ======= >>>>>>> url:"", <<<<<<< this.videoSync.setMediaGroups([this.$el]); } }, //kplayer events onFlavorsListChanged: function (data) { mw.log("DualScreen :: second screen :: videoPlayer :: got FlavorsList"); this.manifestAdaptiveFlavors = data.flavors; for(var i=0; i<this.manifestAdaptiveFlavors.length; i++){ mw.log("DualScreen :: second screen :: videoPlayer :: onFlavorsListChanged :: AdaptiveFlavor = " + this.manifestAdaptiveFlavors[i].bandwidth); } }, onMediaLoaded: function(){ mw.log("DualScreen :: second screen :: videoPlayer :: onMediaLoaded"); //lock second player on lowest bitrate //this.playerObject.sendNotification('doSwitch', { flavorIndex: 0 }); }, onSwitchingChangeStarted: function (data) { mw.log("DualScreen :: second screen :: videoPlayer :: onSwitchingChangeStarted :: currentBitrate = " + data.currentBitrate + " | data.currentIndex = " + data.currentIndex); }, onSwitchingChangeComplete: function (data, id) { if ( data && data.newBitrate ) { mw.log("DualScreen :: second screen :: videoPlayer :: onSwitchingChangeComplete :: data.newBitrate = " + data.newBitrate); } }, switchSrc: function (source) { /* var _this = this; //http requires source switching, all other switch will be handled by OSMF in KDP if (this.streamerType == 'http' && !this.getKalturaAttributeConfig('forceDynamicStream')) { //other streamerTypes will update the source upon "switchingChangeComplete" this.mediaElement.setSource(source); this.getEntryUrl().then(function (srcToPlay) { _this.playerObject.setKDPAttribute('mediaProxy', 'entryUrl', srcToPlay); _this.playerObject.sendNotification('doSwitch', { flavorIndex: _this.getSourceIndex(source) }); }); return; } var sourceIndex = -1; //autoDynamicStreamSwitch = true for adaptive bitrate (Auto) if( source !== -1 ){ sourceIndex = this.getSourceIndex(source); } this.playerObject.sendNotification('doSwitch', { flavorIndex: sourceIndex }); */ }, getSourceIndex: function (source) { /* var sourceIndex = null; $.each( this.getSources(), function( currentIndex, currentSource ) { if (source.getAssetId() == currentSource.getAssetId()) { sourceIndex = currentIndex; return false; } }); // check for null, a zero index would evaluate false if( sourceIndex == null ){ mw.log("EmbedPlayerKplayer:: Error could not find source: " + source.getSrc()); } return sourceIndex; */ }, onMediaError: function(data){ mw.log("DualScreen :: second screen :: videoPlayer :: onMediaError :: error: " + data); }, onBitrateChange: function(data){ mw.log("DualScreen :: second screen :: videoPlayer :: onBitrateChange " + data); }, onDebugInfoReceived: function(data){ /* var msg = ''; for (var prop in data) { msg += prop + ': ' + data[prop]+' | '; ======= this.videoSync.setMediaGroups([this.$el]); >>>>>>> this.videoSync.setMediaGroups([this.$el]); } }, //kplayer events onFlavorsListChanged: function (data) { mw.log("DualScreen :: second screen :: videoPlayer :: got FlavorsList"); this.manifestAdaptiveFlavors = data.flavors; for(var i=0; i<this.manifestAdaptiveFlavors.length; i++){ mw.log("DualScreen :: second screen :: videoPlayer :: onFlavorsListChanged :: AdaptiveFlavor = " + this.manifestAdaptiveFlavors[i].bandwidth); } //TODO: after the master stabilized on some bitrate, find closest bitrate inside manifestAdaptiveFlavors and switch the bitrate of the slave player }, onMediaLoaded: function(){ mw.log("DualScreen :: second screen :: videoPlayer :: onMediaLoaded"); //lock second player on lowest bitrate //this.playerObject.sendNotification('doSwitch', { flavorIndex: 0 }); }, onSwitchingChangeStarted: function (data) { mw.log("DualScreen :: second screen :: videoPlayer :: onSwitchingChangeStarted :: currentBitrate = " + data.currentBitrate + " | data.currentIndex = " + data.currentIndex); }, onSwitchingChangeComplete: function (data, id) { if ( data && data.newBitrate ) { mw.log("DualScreen :: second screen :: videoPlayer :: onSwitchingChangeComplete :: data.newBitrate = " + data.newBitrate); } }, switchSrc: function (source) { this.playerObject.sendNotification('doSwitch', { flavorIndex: this.getSourceIndex(source) }); }, getSourceIndex: function (source) { var sourceIndex = 0; //autoDynamicStreamSwitch (adaptive bitrate) can't be enabled in the slave player, so sourceIndex can't ever be -1 //TODO: if this.manifestAdaptiveFlavors !== undefined -> find closest flavor index for adaptive bitrate, else -> find closest source index for progressive download return sourceIndex; }, onMediaError: function(data){ mw.log("DualScreen :: second screen :: videoPlayer :: onMediaError :: error: " + data); //TODO: handle error }, onBitrateChange: function(data){ mw.log("DualScreen :: second screen :: videoPlayer :: onBitrateChange " + data); }, onDebugInfoReceived: function(data){ /* var msg = ''; for (var prop in data) { msg += prop + ': ' + data[prop]+' | ';
<<<<<<< import { INITIAL_STATE, loadAllMasters, loadAreaMaster } from '../modules/masters'; ======= import * as masters from '../modules/masters'; >>>>>>> import * as masters from '../modules/masters'; <<<<<<< const loadAllMastersAction = loadAllMasters(); const initialState = Immutable({ masters: INITIAL_STATE }); ======= const loadAllMastersAction = masters.loadAllMasters(); const INITIAL_STATE = Immutable({}); >>>>>>> const loadAllMastersAction = masters.loadAllMasters(); const initialState = Immutable({ masters: INITIAL_STATE }); const INITIAL_STATE = Immutable({}); <<<<<<< const loadAllMastersAction = loadAllMasters(); const initialState = Immutable({ masters: INITIAL_STATE }); ======= const loadAllMastersAction = masters.loadAllMasters(); const INITIAL_STATE = Immutable({}); >>>>>>> const loadAllMastersAction = masters.loadAllMasters(); const initialState = Immutable({ masters: INITIAL_STATE }); const INITIAL_STATE = Immutable({});