conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
var getClone = function(templateName){
return cloneHtmlObjs[templateName];
};
return {
get:getClone
};
=======
};
});
treeherder.factory('BrowserId', function($http, $q, $log, thServiceDomain){
/*
* BrowserId is a wrapper for the persona authentication service
* it handles the navigator.id.request and navigator.id.logout calls
* and exposes the related promises via requestDeferred and logoutDeferred.
* This is mostly inspired by the django_browserid jquery implementation.
*/
var browserid = {
info: $http.get(thServiceDomain+'/browserid/info/'),
requestDeferred: null,
logoutDeferred: null,
/*
* Retrieve an assertion from the persona service and
* and send it to the treeherder verification endpoints.
*
*/
login: function(requestArgs){
return browserid.getAssertion(requestArgs)
.then(function(response) {
return browserid.verifyAssertion(response);
});
},
/*
* Logout from persona and notify treeherder of the change
* The logoutDeferred promise is resolved by the onLogout callback
* of navigator.id.watch
*/
logout: function(){
return browserid.info.then(function(response){
browserid.logoutDeferred = $q.defer();
navigator.id.logout();
return browserid.logoutDeferred.promise.then(function(){
return $http.post(response.data.logoutUrl);
})
});
},
/*
* Ask persona to provide an assetion and return a promise of the response
* The requestDeferred promise is resolved by the onLogin callback
* of navigator.id.watch.
*/
getAssertion: function(requestArgs){
return browserid.info.then(function(response){
requestArgs = _.extend({}, response.data.requestArgs, requestArgs);
browserid.requestDeferred = $q.defer();
navigator.id.request(requestArgs);
return browserid.requestDeferred.promise;
});
},
/*
* Verify the assertion provided by persona against the treeherder verification endpoint.
* The django_browserid endpoint accept a post request with form-urlencoded fields.
*/
verifyAssertion: function(assertion){
return browserid.info.then(function(response){
return $http.post(
response.data.loginUrl, {assertion: assertion},{
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
transformRequest: browserid.transform_data
});
});
},
transform_data: function(data){
return $.param(data);
}
}
return browserid;
>>>>>>>
var getClone = function(templateName){
return cloneHtmlObjs[templateName];
};
return {
get:getClone
};
});
treeherder.factory('BrowserId', function($http, $q, $log, thServiceDomain){
/*
* BrowserId is a wrapper for the persona authentication service
* it handles the navigator.id.request and navigator.id.logout calls
* and exposes the related promises via requestDeferred and logoutDeferred.
* This is mostly inspired by the django_browserid jquery implementation.
*/
var browserid = {
info: $http.get(thServiceDomain+'/browserid/info/'),
requestDeferred: null,
logoutDeferred: null,
/*
* Retrieve an assertion from the persona service and
* and send it to the treeherder verification endpoints.
*
*/
login: function(requestArgs){
return browserid.getAssertion(requestArgs)
.then(function(response) {
return browserid.verifyAssertion(response);
});
},
/*
* Logout from persona and notify treeherder of the change
* The logoutDeferred promise is resolved by the onLogout callback
* of navigator.id.watch
*/
logout: function(){
return browserid.info.then(function(response){
browserid.logoutDeferred = $q.defer();
navigator.id.logout();
return browserid.logoutDeferred.promise.then(function(){
return $http.post(response.data.logoutUrl);
})
});
},
/*
* Ask persona to provide an assetion and return a promise of the response
* The requestDeferred promise is resolved by the onLogin callback
* of navigator.id.watch.
*/
getAssertion: function(requestArgs){
return browserid.info.then(function(response){
requestArgs = _.extend({}, response.data.requestArgs, requestArgs);
browserid.requestDeferred = $q.defer();
navigator.id.request(requestArgs);
return browserid.requestDeferred.promise;
});
},
/*
* Verify the assertion provided by persona against the treeherder verification endpoint.
* The django_browserid endpoint accept a post request with form-urlencoded fields.
*/
verifyAssertion: function(assertion){
return browserid.info.then(function(response){
return $http.post(
response.data.loginUrl, {assertion: assertion},{
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
transformRequest: browserid.transform_data
});
});
},
transform_data: function(data){
return $.param(data);
}
}
return browserid; |
<<<<<<<
"Result": $scope.job.result,
"Job GUID": $scope.job.job_guid,
// TODO: this needs to be a directive!!
"Machine Name": "<a href='https://secure.pub.build.mozilla.org/builddata/reports/slave_health/slave.html?name=" + $scope.job.machine_name + "'>" + $scope.job.machine_name + "</a>",
"Machine Platform Arch": $scope.job.machine_platform_architecture,
"Machine Platform OS": $scope.job.machine_platform_os,
"Build Platform": $scope.job.build_platform,
"Build Arch": $scope.job.build_architecture,
"Build OS": $scope.job.build_os
=======
"Reason": $scope.job.reason || undef,
"State": $scope.job.state || undef,
"Result": $scope.job.result || undef,
"Type Name": $scope.job.job_type_name || undef,
"Type Desc": $scope.job.job_type_description || undef,
"Who": $scope.job.who || undef,
"Job GUID": $scope.job.job_guid || undef,
"Machine Name": $scope.job.machine_name || undef,
"Machine Platform Arch": $scope.job.machine_platform_architecture || undef,
"Machine Platform OS": $scope.job.machine_platform_os || undef,
"Build Platform": $scope.job.build_platform || undef,
"Build Arch": $scope.job.build_architecture || undef,
"Build OS": $scope.job.build_os || undef
>>>>>>>
"Result": $scope.job.result || undef,
"Job GUID": $scope.job.job_guid || undef,
"Machine Name": "<a href='https://secure.pub.build.mozilla.org/builddata/reports/slave_health/slave.html?name=" + $scope.job.machine_name + "'>" + $scope.job.machine_name + "</a>",
"Machine Platform Arch": $scope.job.machine_platform_architecture || undef,
"Machine Platform OS": $scope.job.machine_platform_os || undef,
"Build Platform": $scope.job.build_platform || undef,
"Build Arch": $scope.job.build_architecture || undef,
"Build OS": $scope.job.build_os || undef |
<<<<<<<
* @author dexy, amethystlei, ananthhh, flytoj2ee
* @version 1.20
=======
* Changes in version 1.21 (Web Arena - Leaderboard Performance Improvement):
* - Added functions leaderboardViewChangeHandler, leaderboardRefreshHandler and
* injectLeaderboardRefresher to $rootScope to handle the updates of the leaderboards
* and improve the performance.
*
* Changes in version 1.22 (Web Arena - Run System Testing Support For Practice Problems):
* - Added the custom css for popup dialog.
* - Fixed the null pointer exception in popup dialog.
*
* Changes in version 1.23 (TopCoder Competition Engine - Improve Automated Notification Messages)
* - If there is no buttons Phase change PopupGenericResponse won't be handled.
* Because these notifications are already handled based on PhaseDataResponse
*
* @author dexy, amethystlei, ananthhh, flytoj2ee, TCSASSEMBLER
* @version 1.23
>>>>>>>
* @author dexy, amethystlei, ananthhh, flytoj2ee
* @version 1.20
* Changes in version 1.21 (Web Arena - Leaderboard Performance Improvement):
* - Added functions leaderboardViewChangeHandler, leaderboardRefreshHandler and
* injectLeaderboardRefresher to $rootScope to handle the updates of the leaderboards
* and improve the performance.
*
* Changes in version 1.22 (Web Arena - Run System Testing Support For Practice Problems):
* - Added the custom css for popup dialog.
* - Fixed the null pointer exception in popup dialog.
*
* Changes in version 1.23 (TopCoder Competition Engine - Improve Automated Notification Messages)
* - If there is no buttons Phase change PopupGenericResponse won't be handled.
* Because these notifications are already handled based on PhaseDataResponse
*
* @author dexy, amethystlei, ananthhh, flytoj2ee, TCSASSEMBLER
* @version 1.23
<<<<<<<
$scope.numCoderRequest = 0;
=======
$scope.showError = data.showError;
>>>>>>>
$scope.numCoderRequest = 0;
$scope.showError = data.showError; |
<<<<<<<
controllers.matchScheduleCtrl = require('./controllers/matchScheduleCtrl');
controllers.memberFeedbackCtrl = require('./controllers/memberFeedbackCtrl');
=======
controllers.leaderboardCtrl = require('./controllers/leaderboardCtrl');
>>>>>>>
controllers.matchScheduleCtrl = require('./controllers/matchScheduleCtrl');
controllers.memberFeedbackCtrl = require('./controllers/memberFeedbackCtrl');
controllers.leaderboardCtrl = require('./controllers/leaderboardCtrl');
<<<<<<<
directives.contestTermsConfig = require('./directives/contestTermsConfig');
directives.contestScheduleConfig = require('./directives/contestScheduleConfig');
directives.registrationQuestions = require('./directives/registrationQuestions');
directives.manageQuestion = require('./directives/manageQuestion');
directives.manageAnswer = require('./directives/manageAnswer');
directives.preloader = require('./directives/preloader');
directives.memberFeedback = require('./directives/memberFeedback');
=======
directives.leaderboard = require('./directives/leaderboard');
>>>>>>>
directives.contestTermsConfig = require('./directives/contestTermsConfig');
directives.contestScheduleConfig = require('./directives/contestScheduleConfig');
directives.registrationQuestions = require('./directives/registrationQuestions');
directives.manageQuestion = require('./directives/manageQuestion');
directives.manageAnswer = require('./directives/manageAnswer');
directives.preloader = require('./directives/preloader');
directives.memberFeedback = require('./directives/memberFeedback');
directives.leaderboard = require('./directives/leaderboard');
<<<<<<<
main.controller('contestTermsConfigCtrl', controllers.contestTermsConfigCtrl);
main.controller('contestScheduleConfigCtrl', controllers.contestScheduleConfigCtrl);
main.controller('registrationQuestionsCtrl', controllers.registrationQuestionsCtrl);
main.controller('manageQuestionCtrl', controllers.manageQuestionCtrl);
main.controller('manageAnswerCtrl', controllers.manageAnswerCtrl);
main.controller('matchScheduleCtrl', controllers.matchScheduleCtrl);
main.controller('memberFeedbackCtrl', controllers.memberFeedbackCtrl);
=======
main.controller('leaderboardCtrl', controllers.leaderboardCtrl);
>>>>>>>
main.controller('contestTermsConfigCtrl', controllers.contestTermsConfigCtrl);
main.controller('contestScheduleConfigCtrl', controllers.contestScheduleConfigCtrl);
main.controller('registrationQuestionsCtrl', controllers.registrationQuestionsCtrl);
main.controller('manageQuestionCtrl', controllers.manageQuestionCtrl);
main.controller('manageAnswerCtrl', controllers.manageAnswerCtrl);
main.controller('matchScheduleCtrl', controllers.matchScheduleCtrl);
main.controller('memberFeedbackCtrl', controllers.memberFeedbackCtrl);
main.controller('leaderboardCtrl', controllers.leaderboardCtrl);
<<<<<<<
main.directive('contestTermsConfig', directives.contestTermsConfig);
main.directive('contestScheduleConfig', directives.contestScheduleConfig);
main.directive('registrationQuestions', directives.registrationQuestions);
main.directive('manageQuestion', directives.manageQuestion);
main.directive('manageAnswer', directives.manageAnswer);
main.directive('preloader', directives.preloader);
main.directive('memberFeedback', directives.memberFeedback);
=======
main.directive('leaderboard', directives.leaderboard);
>>>>>>>
main.directive('contestTermsConfig', directives.contestTermsConfig);
main.directive('contestScheduleConfig', directives.contestScheduleConfig);
main.directive('registrationQuestions', directives.registrationQuestions);
main.directive('manageQuestion', directives.manageQuestion);
main.directive('manageAnswer', directives.manageAnswer);
main.directive('preloader', directives.preloader);
main.directive('memberFeedback', directives.memberFeedback);
main.directive('leaderboard', directives.leaderboard); |
<<<<<<<
tcHostName: '@@TC_HOSTNAME',
maxLiveLearderBoard: '@@MAX_LIVE_LEADERBOARD'
=======
tcHostName: '@@TC_HOSTNAME',
autoSavingCodeInterval: '@@AUTO_SAVING_CODE_INTERVAL',
leaderboardRefreshTimeGap: '@@LEADERBOARD_REFRESH_TIME_GAP',
activeMatchesSummaryTopcoderCount: '@@ACTIVE_MATCHES_SUMMARY_TOPCODER_COUNT'
>>>>>>>
tcHostName: '@@TC_HOSTNAME',
maxLiveLearderBoard: '@@MAX_LIVE_LEADERBOARD'
autoSavingCodeInterval: '@@AUTO_SAVING_CODE_INTERVAL',
leaderboardRefreshTimeGap: '@@LEADERBOARD_REFRESH_TIME_GAP',
activeMatchesSummaryTopcoderCount: '@@ACTIVE_MATCHES_SUMMARY_TOPCODER_COUNT' |
<<<<<<<
coderInfoUsername = name;
=======
$scope.numCoderRequest = 1;
>>>>>>>
coderInfoUsername = name; $scope.numCoderRequest = 1; |
<<<<<<<
var camera, scene, sceneAtmosphere, renderer, w, h;
=======
var camera, scene, sceneAtmosphere, renderer, w, h;
>>>>>>>
var camera, scene, sceneAtmosphere, renderer, w, h;
<<<<<<<
// geometry = new THREE.Cube(0.75, 0.75, 1);
geometry = new THREE.Cube(0.75, 0.75, 1, 1, 1, 1, null, false, { px: true,
nx: true, py: true, ny: true, pz: true, nz: false});
=======
// geometry = new THREE.Cube(0.75, 0.75, 1);
geometry = new THREE.Cube(0.75, 0.75, 1, 1, 1, 1, null, false, { px: true, nx: true, py: true, ny: true, pz: true, nz: false});
>>>>>>>
// geometry = new THREE.Cube(0.75, 0.75, 1);
geometry = new THREE.Cube(0.75, 0.75, 1, 1, 1, 1, null, false, { px: true,
nx: true, py: true, ny: true, pz: true, nz: false});
<<<<<<<
var text = '<img src="data:image/gif;base64,R0lGODlhEAAQAPIAAAAAAP///zw8PLy8vP///5ycnHx8fGxsbCH/C05FVFNDQVBFMi4wAwEAAAAh\n/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAADMwi63P4wyklr\nE2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQJCgAAACwAAAAA\nEAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUk\nKhIAIfkECQoAAAAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9\nHMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkECQoAAAAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYum\nCYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkECQoAAAAsAAAAABAAEAAAAzII\nunInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQJCgAA\nACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJ\nibufbSlKAAAh+QQJCgAAACwAAAAAEAAQAAADMgi63P7wCRHZnFVdmgHu2nFwlWCI3WGc3TSWhUFG\nxTAUkGCbtgENBMJAEJsxgMLWzpEAACH5BAkKAAAALAAAAAAQABAAAAMyCLrc/jDKSatlQtScKdce\nCAjDII7HcQ4EMTCpyrCuUBjCYRgHVtqlAiB1YhiCnlsRkAAAOwAAAAAAAAAAAA==" /> Loading Data';
loader = document.createElement('div');
loader.innerHTML = text;
loader.style.position = 'absolute';
loader.style.margin = padding+'px';
container.appendChild(loader);
=======
var text = '<img src="'+imgDir+'loader.gif" /> Loading Data';
loader = document.createElement('div');
loader.innerHTML = text;
loader.style.position = 'absolute';
loader.style.margin = padding+'px';
container.appendChild(loader);
>>>>>>>
var text = '<img src="'+imgDir+'loader.gif" /> Loading Data';
loader = document.createElement('div');
loader.innerHTML = text;
loader.style.position = 'absolute';
loader.style.margin = padding+'px';
container.appendChild(loader);
<<<<<<<
addLoader();
addZoomers();
addCredits();
loadData(); // Ready for the automating
=======
>>>>>>>
<<<<<<<
function addCredits() {
var text = document.createElement('span');
text.innerHTML = 'The <strong>WebGL Globe</strong> is a simple, open plat' +
'form for visualizing geographic data in WebGL-compatible browsers li' +
'ke Google Chrome.<br />Learn more about the globe and get the code at';
var link = document.createElement('a');
link.innerHTML = 'www.chromeexperiments.com/globe';
link.setAttribute('href', 'http://chromeexperiments.com/globe/');
link.style.color = '#0080ff';
var credits = document.createElement("div");
credits.appendChild(text);
credits.appendChild(link);
credits.style.position = 'absolute';
credits.style.paddingBottom = padding+'px';
credits.style.textAlign = 'center';
credits.style.width = w + 'px';
container.appendChild(credits);
credits.style.marginTop = (h - credits.offsetHeight)+'px';
}
=======
function addCredits() {
var text = document.createElement('span');
text.innerHTML = "The <strong>WebGL Globe</strong> is a simple, open platform for visualizing geographic data in WebGL-compatible browsers like Google Chrome.<br />Learn more about the globe and get the code at ";
var link = document.createElement('a');
link.innerHTML = 'www.chromeexperiments.com/globe';
link.setAttribute('href', 'http://chromeexperiments.com/globe/');
link.style.color = '#0080ff';
var credits = document.createElement("div");
credits.appendChild(text);
credits.appendChild(link);
credits.style.position = 'absolute';
credits.style.paddingBottom = padding+'px';
credits.style.textAlign = 'center';
credits.style.width = w + 'px';
container.appendChild(credits);
credits.style.marginTop = (h - credits.offsetHeight)+'px';
}
init();
addLoader();
addZoomers();
addCredits();
animate();
loadData();
>>>>>>>
function addCredits() {
var text = document.createElement('span');
text.innerHTML = 'The <strong>WebGL Globe</strong> is a simple, open plat' +
'form for visualizing geographic data in WebGL-compatible browsers li' +
'ke Google Chrome.<br />Learn more about the globe and get the code at';
text.innerHTML = "The <strong>WebGL Globe</strong> is a simple, open platform for visualizing geographic data in WebGL-compatible browsers like Google Chrome.<br />Learn more about the globe and get the code at ";
var link = document.createElement('a');
link.innerHTML = 'www.chromeexperiments.com/globe';
link.setAttribute('href', 'http://chromeexperiments.com/globe/');
link.style.color = '#0080ff';
var credits = document.createElement("div");
credits.appendChild(text);
credits.appendChild(link);
credits.style.position = 'absolute';
credits.style.paddingBottom = padding+'px';
credits.style.textAlign = 'center';
credits.style.width = w + 'px';
container.appendChild(credits);
credits.style.marginTop = (h - credits.offsetHeight)+'px';
}
init();
addLoader();
addZoomers();
addCredits();
animate();
loadData(); |
<<<<<<<
/*! amdclean - v2.0.0 - 2014-03-17
=======
/*! amdclean - v1.5.0 - 2014-03-17
>>>>>>>
/*! amdclean - v2.0.0 - 2014-03-17
<<<<<<<
'VERSION': '2.0.0',
=======
'VERSION': '1.5.0',
>>>>>>>
'VERSION': '2.0.0',
<<<<<<<
while(++iterator < depLength) {
currentName = publicAPI.normalizeDependencyName(moduleId, dependencies[iterator]);
deps.push({
'type': 'Identifier',
'name': publicAPI.normalizeModuleName(currentName),
'range': [0,0],
'loc': [0,0]
});
}
=======
_.each(dependencies, function(currentDependency, iterator) {
currentName = publicAPI.normalizeModuleName(publicAPI.normalizeDependencyName(moduleId, currentDependency), moduleId);
if(options.globalObject === true && options.globalObjectName && currentName !== '{}') {
deps.push({
'type': 'MemberExpression',
'computed': true,
'object': {
'type': 'Identifier',
'name': options.globalObjectName,
'range': publicAPI.defaultRange,
'loc': publicAPI.defaultLOC
},
'property': {
'type': 'Literal',
'value': currentName,
'raw': "" + currentName + "",
'range': publicAPI.defaultRange,
'loc': publicAPI.defaultLOC
},
'name': currentName,
'range': publicAPI.defaultRange,
'loc': publicAPI.defaultLOC
});
} else {
deps.push({
'type': 'Identifier',
'name': currentName,
'range': publicAPI.defaultRange,
'loc': publicAPI.defaultLOC
});
}
});
>>>>>>>
_.each(dependencies, function(currentDependency, iterator) {
currentName = publicAPI.normalizeModuleName(publicAPI.normalizeDependencyName(moduleId, currentDependency), moduleId);
deps.push({
'type': 'Identifier',
'name': currentName,
'range': publicAPI.defaultRange,
'loc': publicAPI.defaultLOC
});
}); |
<<<<<<<
date: new Date('2018-05-21'),
changes: <React.Fragment>Added <ItemLink id={ITEMS.ZANDALARI_LOA_FIGURINE.id} /> to trinkets.</React.Fragment>,
contributors: [Fyruna],
},
{
=======
date: new Date('2018-05-25'),
changes: 'Changed to WoWDB tooltips because they provide better tooltips.',
contributors: [Zerotorescue],
},
{
>>>>>>>
date: new Date('2018-05-25'),
changes: 'Changed to WoWDB tooltips because they provide better tooltips.',
contributors: [Zerotorescue],
},
{
date: new Date('2018-05-21'),
changes: <React.Fragment>Added <ItemLink id={ITEMS.ZANDALARI_LOA_FIGURINE.id} /> to trinkets.</React.Fragment>,
contributors: [Fyruna],
},
{ |
<<<<<<<
ipcMain.on('JIRA-AddSubtask', requireArgParams(addSubtask, ['key', 'name']));
=======
ipcMain.on('JIRA-SearchIssues', requireArgParams(searchIssues, ['jql']));
>>>>>>>
ipcMain.on('JIRA-AddSubtask', requireArgParams(addSubtask, ['key', 'name']));
ipcMain.on('JIRA-SearchIssues', requireArgParams(searchIssues, ['jql']));
<<<<<<<
function addSubtask(event, arg) {
if (conn) {
return conn.post(`/issue`, {
"fields": {
"project": {
"id": arg.projectId
}
}
});
}
}
=======
function searchIssues(event, arg) {
if (conn) {
let url = `/search`;
let obj = { jql: arg.jql };
if (arg.fields) {
obj.fields = arg.fields;
}
return conn.post(url, obj).then(resp => {
if (resp === 'QUERY_ISSUE') {
event.sender.send('JIRA-IssueQueryResultRetrieved', { issues: [] });
} else {
event.sender.send('JIRA-IssueQueryResultRetrieved', { issues: resp.data.issues });
}
})
}
}
>>>>>>>
function addSubtask(event, arg) {
if (conn) {
return conn.post(`/issue`, {
"fields": {
"project": {
"id": arg.projectId
}
}
});
}
}
function searchIssues(event, arg) {
if (conn) {
let url = `/search`;
let obj = { jql: arg.jql };
if (arg.fields) {
obj.fields = arg.fields;
}
return conn.post(url, obj).then(resp => {
if (resp === 'QUERY_ISSUE') {
event.sender.send('JIRA-IssueQueryResultRetrieved', { issues: [] });
} else {
event.sender.send('JIRA-IssueQueryResultRetrieved', { issues: resp.data.issues });
}
})
}
} |
<<<<<<<
import { checkIfCan } from '../../lib/scopes';
=======
import { traverseStory } from '../../lib/story.utils';
>>>>>>>
import { checkIfCan } from '../../lib/scopes';
import { traverseStory } from '../../lib/story.utils';
<<<<<<<
checkIfCan('stories:w', story.projectId);
const { _id, indices, ...rest } = story;
const update = indices && indices.length
=======
const { _id, path, ...rest } = story;
const { indices } = path
? traverseStory(Stories.findOne({ _id: story._id }), path)
: { indices: [] };
const update = indices.length
>>>>>>>
checkIfCan('stories:w', story.projectId);
const { _id, path, ...rest } = story;
const { indices } = path
? traverseStory(Stories.findOne({ _id: story._id }), path)
: { indices: [] };
const update = indices.length |
<<<<<<<
=======
require.alias("component-clone/index.js", "analytics/deps/clone/index.js");
require.alias("component-type/index.js", "component-clone/deps/type/index.js");
>>>>>>> |
<<<<<<<
...conversationResolvers,
...nluResolvers,
=======
conversationsResolver,
botResponsesResolver,
>>>>>>>
...conversationResolvers,
...nluResolvers,
botResponsesResolver,
<<<<<<<
export const typeDefs = mergeTypes([
...conversationTypes,
...nluTypes,
...activityTypes,
commonTypes,
], { all: true });
=======
export const typeDefs = mergeTypes([...conversationTypes, ...botResponsesTypes, ...activityTypes, commonTypes], { all: true });
>>>>>>>
export const typeDefs = mergeTypes([
...conversationTypes,
...botResponsesTypes,
...nluTypes,
...activityTypes,
commonTypes,
], { all: true }); |
<<<<<<<
var self = this;
each(links, function (el) {
bind(el, 'click', function (e) {
var ev = is.function(event) ? event(el) : event;
var props = is.function(properties) ? properties(el) : properties;
self.track(ev, props);
if (el.href && el.target !== '_blank' && !isMeta(e)) {
prevent(e);
self._callback(function () {
window.location.href = el.href;
});
=======
properties = clone(properties) || {};
// Call `track` on all of our enabled providers that support it.
each(this.providers, function (provider) {
if (provider.track && isEnabled(provider, options)) {
var args = [event, clone(properties), clone(options)];
if (provider.ready) {
provider.track.apply(provider, args);
} else {
provider.enqueue('track', args);
}
>>>>>>>
var self = this;
each(links, function (el) {
bind(el, 'click', function (e) {
var ev = is.function(event) ? event(el) : event;
var props = is.function(properties) ? properties(el) : properties;
self.track(ev, props);
if (el.href && el.target !== '_blank' && !isMeta(e)) {
prevent(e);
self._callback(function () {
window.location.href = el.href;
});
<<<<<<<
require.register("analytics/lib/providers/bitdeli.js", function(exports, require, module){
// https://bitdeli.com/docs
// https://bitdeli.com/docs/javascript-api.html
var Provider = require('../provider')
, load = require('load-script');
module.exports = Provider.extend({
name : 'Bitdeli',
defaults : {
// BitDeli requires two options: `inputId` and `authToken`.
inputId : null,
authToken : null,
// Whether or not to track an initial pageview when the page first
// loads. You might not want this if you're using a single-page app.
initialPageview : true
},
initialize : function (options, ready) {
window._bdq = window._bdq || [];
window._bdq.push(["setAccount", options.inputId, options.authToken]);
if (options.initialPageview) this.pageview();
load('//d2flrkr957qc5j.cloudfront.net/bitdeli.min.js');
// Bitdeli just uses a queue, so it's ready right away.
ready();
},
// Bitdeli uses two separate methods: `identify` for storing the `userId`
// and `set` for storing `traits`.
identify : function (userId, traits) {
if (userId) window._bdq.push(['identify', userId]);
if (traits) window._bdq.push(['set', traits]);
},
track : function (event, properties) {
window._bdq.push(['track', event, properties]);
},
// If `url` is undefined, Bitdeli uses the current page URL instead.
pageview : function (url) {
window._bdq.push(['trackPageview', url]);
}
});
});
require.register("analytics/lib/providers/bugherd.js", function(exports, require, module){
=======
require.register("analytics/src/providers/bugherd.js", function(exports, require, module){
>>>>>>>
require.register("analytics/lib/providers/bugherd.js", function(exports, require, module){
<<<<<<<
require.register("analytics/lib/providers/index.js", function(exports, require, module){
module.exports = {
'AdRoll' : require('./adroll'),
'Amplitude' : require('./amplitude'),
'Bitdeli' : require('./bitdeli'),
'BugHerd' : require('./bugherd'),
'Chartbeat' : require('./chartbeat'),
'ClickTale' : require('./clicktale'),
'Clicky' : require('./clicky'),
'comScore' : require('./comscore'),
'CrazyEgg' : require('./crazyegg'),
'Customer.io' : require('./customerio'),
'Errorception' : require('./errorception'),
'FoxMetrics' : require('./foxmetrics'),
'Gauges' : require('./gauges'),
'Get Satisfaction' : require('./get-satisfaction'),
'Google Analytics' : require('./google-analytics'),
'GoSquared' : require('./gosquared'),
'Heap' : require('./heap'),
'HitTail' : require('./hittail'),
'HubSpot' : require('./hubspot'),
'Improvely' : require('./improvely'),
'Intercom' : require('./intercom'),
'Keen IO' : require('./keen-io'),
'KISSmetrics' : require('./kissmetrics'),
'Klaviyo' : require('./klaviyo'),
'LeadLander' : require('./leadlander'),
'LiveChat' : require('./livechat'),
'Lytics' : require('./lytics'),
'Mixpanel' : require('./mixpanel'),
'Olark' : require('./olark'),
'Optimizely' : require('./optimizely'),
'Perfect Audience' : require('./perfect-audience'),
'Pingdom' : require('./pingdom'),
'Preact' : require('./preact'),
'Qualaroo' : require('./qualaroo'),
'Quantcast' : require('./quantcast'),
'Sentry' : require('./sentry'),
'SnapEngage' : require('./snapengage'),
'USERcycle' : require('./usercycle'),
'userfox' : require('./userfox'),
'UserVoice' : require('./uservoice'),
'Vero' : require('./vero'),
'Visual Website Optimizer' : require('./visual-website-optimizer'),
'Woopra' : require('./woopra')
};
=======
require.register("analytics/src/providers/index.js", function(exports, require, module){
module.exports = [
require('./adroll'),
require('./amplitude'),
require('./bugherd'),
require('./chartbeat'),
require('./clicktale'),
require('./clicky'),
require('./comscore'),
require('./crazyegg'),
require('./customerio'),
require('./errorception'),
require('./foxmetrics'),
require('./gauges'),
require('./get-satisfaction'),
require('./google-analytics'),
require('./gosquared'),
require('./heap'),
require('./hittail'),
require('./hubspot'),
require('./improvely'),
require('./intercom'),
require('./keen-io'),
require('./kissmetrics'),
require('./klaviyo'),
require('./leadlander'),
require('./livechat'),
require('./lytics'),
require('./mixpanel'),
require('./olark'),
require('./optimizely'),
require('./perfect-audience'),
require('./pingdom'),
require('./preact'),
require('./qualaroo'),
require('./quantcast'),
require('./sentry'),
require('./snapengage'),
require('./usercycle'),
require('./userfox'),
require('./uservoice'),
require('./vero'),
require('./visual-website-optimizer'),
require('./woopra')
];
>>>>>>>
require.register("analytics/lib/providers/index.js", function(exports, require, module){
module.exports = {
'AdRoll' : require('./adroll'),
'Amplitude' : require('./amplitude'),
'BugHerd' : require('./bugherd'),
'Chartbeat' : require('./chartbeat'),
'ClickTale' : require('./clicktale'),
'Clicky' : require('./clicky'),
'comScore' : require('./comscore'),
'CrazyEgg' : require('./crazyegg'),
'Customer.io' : require('./customerio'),
'Errorception' : require('./errorception'),
'FoxMetrics' : require('./foxmetrics'),
'Gauges' : require('./gauges'),
'Get Satisfaction' : require('./get-satisfaction'),
'Google Analytics' : require('./google-analytics'),
'GoSquared' : require('./gosquared'),
'Heap' : require('./heap'),
'HitTail' : require('./hittail'),
'HubSpot' : require('./hubspot'),
'Improvely' : require('./improvely'),
'Intercom' : require('./intercom'),
'Keen IO' : require('./keen-io'),
'KISSmetrics' : require('./kissmetrics'),
'Klaviyo' : require('./klaviyo'),
'LeadLander' : require('./leadlander'),
'LiveChat' : require('./livechat'),
'Lytics' : require('./lytics'),
'Mixpanel' : require('./mixpanel'),
'Olark' : require('./olark'),
'Optimizely' : require('./optimizely'),
'Perfect Audience' : require('./perfect-audience'),
'Pingdom' : require('./pingdom'),
'Preact' : require('./preact'),
'Qualaroo' : require('./qualaroo'),
'Quantcast' : require('./quantcast'),
'Sentry' : require('./sentry'),
'SnapEngage' : require('./snapengage'),
'USERcycle' : require('./usercycle'),
'userfox' : require('./userfox'),
'UserVoice' : require('./uservoice'),
'Vero' : require('./vero'),
'Visual Website Optimizer' : require('./visual-website-optimizer'),
'Woopra' : require('./woopra')
}; |
<<<<<<<
this.load();
};
=======
// anonymize after initializing, otherwise a warning is shown
// in google analytics debugger
if (options.anonymizeIp) window.ga('set', 'anonymizeIp', true);
// track a pageview with the canonical url
if (options.initialPageview) {
var path, canon = canonical();
if (canon) path = url.parse(canon).pathname;
this.pageview(path);
}
>>>>>>>
// anonymize after initializing, otherwise a warning is shown
// in google analytics debugger
if (options.anonymizeIp) window.ga('set', 'anonymizeIp', true);
this.load();
}; |
<<<<<<<
workingLanguage: 'en',
workingDeploymentEnvironment: 'development',
=======
workingLanguage: null,
>>>>>>>
workingDeploymentEnvironment: 'development',
workingLanguage: null, |
<<<<<<<
// Test for a `created` property that's a valid date string and convert it.
if (traits && traits.created && type (traits.created) === 'string' &&
Date.parse(traits.created)) {
traits.created = new Date(traits.created);
=======
// Test for a `created` that's a valid date string or number and convert it.
if (traits && traits.created) {
// Test for a `created` that's a valid date string
if (type(traits.created) === 'string' && Date.parse(traits.created)) {
traits.created = new Date(traits.created);
}
// Test for a `created` that's a number.
else if (type(traits.created) === 'number') {
// If the "created" number has units of "seconds since the epoch" then it will
// certainly be less than 31557600000 seconds (January 7, 2970).
if (traits.created < 31557600000) {
traits.created = new Date(traits.created * 1000);
}
// If the "created" number has units of "milliseconds since the epoch" then it
// will certainly be greater than 31557600000 milliseconds (December 31, 1970).
else {
traits.created = new Date(traits.created);
}
}
>>>>>>>
// Test for a `created` that's a valid date string or number and convert it.
if (traits && traits.created) {
var date = traits.created;
switch (type(date)) {
// If it's a string, we need it to be parseable.
case 'string':
if (Date.parse(date)) traits.created = new Date(date);
break;
// If it's in milliseconds then it should be greater than 31557600000,
// which would is December 31, 1970.
case 'number':
if (date < 31557600000) date = date * 1000;
traits.created = new Date(date);
break;
}
<<<<<<<
// http://docs.intercom.io/
=======
// Intercom
// --------
// [Documentation](http://docs.intercom.io/).
// http://docs.intercom.io/#IntercomJS
>>>>>>>
// http://docs.intercom.io/
// http://docs.intercom.io/#IntercomJS
<<<<<<<
name : 'Intercom',
// Whether Intercom has already been initialized or not. Since we initialize
// Intercom on `identify`, people can make multiple `identify` calls and we
// don't want that breaking anything.
initialized : false,
=======
// Whether Intercom has already been booted or not. Intercom becomes booted
// after Intercom('boot', ...) has been called on the first identify.
booted : false,
>>>>>>>
name : 'Intercom',
// Whether Intercom has already been booted or not. Intercom becomes booted
// after Intercom('boot', ...) has been called on the first identify.
booted : false,
<<<<<<<
// Intercom identifies when the script is loaded, so instead of initializing
// in `initialize` we initialize in `identify`.
=======
>>>>>>> |
<<<<<<<
stepperTemplateType: '@?'
=======
stepperTemplateType:'@?',
versions: '=?'
>>>>>>>
stepperTemplateType: '@?',
versions: '=?'
<<<<<<<
if (angular.isUndefined($scope.stepperTemplateType)) {
=======
if (angular.isUndefined($scope.versions)) {
$scope.versions = false;
}
if(angular.isUndefined($scope.stepperTemplateType)){
>>>>>>>
if (angular.isUndefined($scope.versions)) {
$scope.versions = false;
}
if (angular.isUndefined($scope.stepperTemplateType)) { |
<<<<<<<
define(["require", "exports", "angular", "../module-name", "../../services/OpsManagerFeedService", "../../services/OpsManagerDashboardService", "../../services/TabService", "../../services/AlertsService", "underscore"], function (require, exports, angular, module_name_1, OpsManagerFeedService_1, OpsManagerDashboardService_1, TabService_1, AlertsService_1, _) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var FeedHealthTableCardController = /** @class */ (function () {
function FeedHealthTableCardController($scope, $rootScope, $http, $interval, OpsManagerFeedService, OpsManagerDashboardService, TableOptionsService, PaginationDataService, TabService, AlertsService, StateService, BroadcastService) {
var _this = this;
this.$scope = $scope;
this.$rootScope = $rootScope;
this.$http = $http;
this.$interval = $interval;
this.OpsManagerFeedService = OpsManagerFeedService;
this.OpsManagerDashboardService = OpsManagerDashboardService;
this.TableOptionsService = TableOptionsService;
this.PaginationDataService = PaginationDataService;
this.TabService = TabService;
this.AlertsService = AlertsService;
this.StateService = StateService;
this.BroadcastService = BroadcastService;
this.onTabSelected = function (tab) {
_this.TabService.selectedTab(_this.pageName, tab);
if (_this.loaded || (!_this.loaded && !_this.OpsManagerDashboardService.isFetchingDashboard())) {
return _this.loadFeeds(true, true);
=======
define(['angular','ops-mgr/overview/module-name'], function (angular,moduleName) {
var directive = function () {
return {
restrict: "EA",
bindToController: {
cardTitle: "@"
},
controllerAs: 'vm',
scope: true,
templateUrl: 'js/ops-mgr/overview/feed-health/feed-health-table-card-template.html',
controller: "FeedHealthTableCardController",
link: function ($scope, element, attrs,ctrl,transclude) {
}
};
};
var controller = function ($scope,$rootScope,$http,$interval, OpsManagerFeedService, OpsManagerDashboardService,TableOptionsService,PaginationDataService, TabService,AlertsService, StateService,BroadcastService) {
var self = this;
this.pageName="feed-health";
this.fetchFeedHealthPromise = null;
//Pagination and view Type (list or table)
this.paginationData = PaginationDataService.paginationData(this.pageName);
PaginationDataService.setRowsPerPageOptions(this.pageName,['5','10','20','50']);
/**
* the view either list, or table
*/
this.viewType = PaginationDataService.viewType(this.pageName);
//Setup the Tabs
var tabNames = ['All','Running','Healthy','Unhealthy','Streaming'];
/**
* Create the Tab objects
*/
this.tabs = TabService.registerTabs(this.pageName,tabNames, this.paginationData.activeTab);
/**
* Setup the metadata about the tabs
*/
this.tabMetadata = TabService.metadata(this.pageName);
this.sortOptions = loadSortOptions();
/**
* The object[feedName] = feed
* @type {{}}
*/
this.dataMap = {};
/**
* object {data:{total:##,content:[]}}
*/
this.data = TabService.tabPageData(this.pageName);
/**
* filter used for this card
*/
this.filter = PaginationDataService.filter(self.pageName)
/**
* Flag to indicate the page successfully loaded for the first time and returned data in the card
* @type {boolean}
*/
var loaded = false;
/**
* Flag to indicate loading/fetching data
* @type {boolean}
*/
self.showProgress = false;
/**
* The pagination Id
* @param tab optional tab to designate the pagination across tabs.
*/
this.paginationId = function(tab) {
return PaginationDataService.paginationId(self.pageName, tab.title);
}
/**
* Refresh interval object for the feed health data
* @type {null}
*/
var feedHealthInterval = null;
this.onTabSelected = function(tab) {
tab.clearContent();
TabService.selectedTab(self.pageName, tab);
if(loaded || (!loaded && !OpsManagerDashboardService.isFetchingDashboard())) {
return loadFeeds(true, true);
}
};
$scope.$watch(function(){
return self.viewType;
},function(newVal) {
self.onViewTypeChange(newVal);
})
this.onViewTypeChange = function(viewType) {
PaginationDataService.viewType(this.pageName, self.viewType);
}
this.onOrderChange = function (order) {
PaginationDataService.sort(self.pageName, order);
TableOptionsService.setSortOption(self.pageName,order);
return loadFeeds(true,true);
};
this.onPaginationChange = function (page, limit) {
if( self.viewType == 'list') {
if (loaded) {
var activeTab= TabService.getActiveTab(self.pageName);
activeTab.currentPage = page;
return loadFeeds(true, true);
>>>>>>>
define(["require", "exports", "angular", "../module-name", "../../services/OpsManagerFeedService", "../../services/OpsManagerDashboardService", "../../services/TabService", "../../services/AlertsService", "underscore"], function (require, exports, angular, module_name_1, OpsManagerFeedService_1, OpsManagerDashboardService_1, TabService_1, AlertsService_1, _) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var FeedHealthTableCardController = /** @class */ (function () {
function FeedHealthTableCardController($scope, $rootScope, $http, $interval, OpsManagerFeedService, OpsManagerDashboardService, TableOptionsService, PaginationDataService, TabService, AlertsService, StateService, BroadcastService) {
var _this = this;
this.$scope = $scope;
this.$rootScope = $rootScope;
this.$http = $http;
this.$interval = $interval;
this.OpsManagerFeedService = OpsManagerFeedService;
this.OpsManagerDashboardService = OpsManagerDashboardService;
this.TableOptionsService = TableOptionsService;
this.PaginationDataService = PaginationDataService;
this.TabService = TabService;
this.AlertsService = AlertsService;
this.StateService = StateService;
this.BroadcastService = BroadcastService;
this.onTabSelected = function (tab) {
tab.clearContent();
_this.TabService.selectedTab(_this.pageName, tab);
if (_this.loaded || (!_this.loaded && !_this.OpsManagerDashboardService.isFetchingDashboard())) {
return _this.loadFeeds(true, true);
<<<<<<<
this.viewType = PaginationDataService.viewType(this.pageName);
//Setup the Tabs
var tabNames = ['All', 'Running', 'Healthy', 'Unhealthy', 'Streaming'];
=======
function loadFeeds(force, showProgress){
if((angular.isDefined(force) && force == true) || !OpsManagerDashboardService.isFetchingFeedHealth()) {
OpsManagerDashboardService.setSkipDashboardFeedHealth(true);
self.refreshing = true;
if(showProgress){
self.showProgress = true;
}
var queryParams = getFeedHealthQueryParams();
var limit = queryParams.limit;
var tab =queryParams.fixedFilter;
var sort = queryParams.sort;
var start = queryParams.start;
var filter = queryParams.filter;
OpsManagerDashboardService.updateFeedHealthQueryParams(tab,filter,start , limit, sort);
self.fetchFeedHealthPromise = OpsManagerDashboardService.fetchFeeds(tab,filter,start , limit, sort).then(function (response) {
},
function(err){
loaded = true;
var activeTab = TabService.getActiveTab(self.pageName);
activeTab.clearContent();
self.showProgress = false;
});
}
return self.fetchFeedHealthPromise;
}
function populateFeedData(tab){
var activeTab = TabService.getActiveTab(self.pageName);
activeTab.clearContent();
self.dataArray = OpsManagerDashboardService.feedsArray;
_.each(self.dataArray,function(feed,i) {
activeTab.addContent(feed);
});
TabService.setTotal(self.pageName, activeTab.title, OpsManagerDashboardService.totalFeeds)
loaded = true;
self.showProgress = false;
}
function watchDashboard() {
BroadcastService.subscribe($scope,OpsManagerDashboardService.DASHBOARD_UPDATED,function(event,dashboard){
populateFeedData();
});
>>>>>>>
this.viewType = PaginationDataService.viewType(this.pageName);
//Setup the Tabs
var tabNames = ['All', 'Running', 'Healthy', 'Unhealthy', 'Streaming']; |
<<<<<<<
if (CategoriesService.model.feedRoleMemberships == undefined) {
CategoriesService.model.feedRoleMemberships = this.model.feedRoleMemberships = [];
}
/**
* Indicates if the properties may be edited.
*/
self.allowEdit = false;
/**
* Category data used in "edit" mode.
* @type {CategoryModel}
*/
self.editModel = CategoriesService.newCategory();
/**
* Indicates if the view is in "edit" mode.
* @type {boolean} {@code true} if in "edit" mode or {@code false} if in "normal" mode
*/
self.isEditable = false;
/**
* Indicates of the category is new.
* @type {boolean}
*/
self.isNew = true;
$scope.$watch(function () {
return CategoriesService.model.id;
}, function (newValue) {
self.isNew = !angular.isString(newValue);
});
/**
* Category data used in "normal" mode.
* @type {CategoryModel}
*/
self.model = CategoriesService.model;
/**
* Switches to "edit" mode.
*/
self.onEdit = function () {
self.editModel = angular.copy(self.model);
};
/**
* Saves the category .
*/
self.onSave = function () {
var model = angular.copy(CategoriesService.model);
model.roleMemberships = self.editModel.roleMemberships;
model.feedRoleMemberships = self.editModel.feedRoleMemberships;
model.owner = self.editModel.owner;
EntityAccessControlService.updateRoleMembershipsForSave(model.roleMemberships);
EntityAccessControlService.updateRoleMembershipsForSave(model.feedRoleMemberships);
//TODO Open a Dialog showing Category is Saving progress
CategoriesService.save(model).then(function (response) {
self.model = CategoriesService.model = response.data;
//set the editable flag to false after the save is complete.
//this will flip the directive to read only mode and call the entity-access#init() method to requery the accesss control for this entity
self.isEditable = false;
CategoriesService.update(response.data);
$mdToast.show($mdToast.simple()
=======
);
/**
* Category data used in "normal" mode.
* @type {CategoryModel}
*/
self.model = CategoriesService.model;
/**
* Switches to "edit" mode.
*/
self.onEdit = function () {
self.editModel = angular.copy(self.model);
};
/**
* Saves the category .
*/
self.onSave = function () {
var model = angular.copy(CategoriesService.model);
model.roleMemberships = self.editModel.roleMemberships;
model.feedRoleMemberships = self.editModel.feedRoleMemberships;
model.owner = self.editModel.owner;
model.allowIndexing = self.editModel.allowIndexing;
EntityAccessControlService.updateRoleMembershipsForSave(model.roleMemberships);
EntityAccessControlService.updateRoleMembershipsForSave(model.feedRoleMemberships);
//TODO Open a Dialog showing Category is Saving progress
CategoriesService.save(model).then(function (response) {
self.model = CategoriesService.model = response.data;
//set the editable flag to false after the save is complete.
//this will flip the directive to read only mode and call the entity-access#init() method to requery the accesss control for this entity
self.isEditable = false;
CategoriesService.update(response.data);
$mdToast.show(
$mdToast.simple()
>>>>>>>
if (CategoriesService.model.feedRoleMemberships == undefined) {
CategoriesService.model.feedRoleMemberships = this.model.feedRoleMemberships = [];
}
/**
* Indicates if the properties may be edited.
*/
self.allowEdit = false;
/**
* Category data used in "edit" mode.
* @type {CategoryModel}
*/
self.editModel = CategoriesService.newCategory();
/**
* Indicates if the view is in "edit" mode.
* @type {boolean} {@code true} if in "edit" mode or {@code false} if in "normal" mode
*/
self.isEditable = false;
/**
* Indicates of the category is new.
* @type {boolean}
*/
self.isNew = true;
$scope.$watch(function () {
return CategoriesService.model.id;
}, function (newValue) {
self.isNew = !angular.isString(newValue);
});
/**
* Category data used in "normal" mode.
* @type {CategoryModel}
*/
self.model = CategoriesService.model;
/**
* Switches to "edit" mode.
*/
self.onEdit = function () {
self.editModel = angular.copy(self.model);
};
/**
* Saves the category .
*/
self.onSave = function () {
var model = angular.copy(CategoriesService.model);
model.roleMemberships = self.editModel.roleMemberships;
model.feedRoleMemberships = self.editModel.feedRoleMemberships;
model.owner = self.editModel.owner;
model.allowIndexing = self.editModel.allowIndexing;
EntityAccessControlService.updateRoleMembershipsForSave(model.roleMemberships);
EntityAccessControlService.updateRoleMembershipsForSave(model.feedRoleMemberships);
//TODO Open a Dialog showing Category is Saving progress
CategoriesService.save(model).then(function (response) {
self.model = CategoriesService.model = response.data;
//set the editable flag to false after the save is complete.
//this will flip the directive to read only mode and call the entity-access#init() method to requery the accesss control for this entity
self.isEditable = false;
CategoriesService.update(response.data);
$mdToast.show($mdToast.simple() |
<<<<<<<
} catch (error) {
userMap.not_signed.push(user.name)
logger.info(`could not get signature of ${user.name} for repoId ${repoId}`)
}
})
await Promise.all(promises)
return {
signed: userMap.not_signed.length === 0,
userMap: userMap
}
}
_generateSharedGistQuery(gist_url, gist_version, user, userId) {
const sharedGistCondition = {
=======
}));
});
q.all(promises).then(function () {
deferred.resolve({
signed: all_signed,
user_map: user_map
});
}).catch(err => {
deferred.reject(err);
});
return deferred.promise;
};
let generateSharedGistQuery = function (gist_url, gist_version, user, userId) {
let sharedGistCondition = {
>>>>>>>
} catch (error) {
userMap.not_signed.push(user.name)
logger.info(`could not get signature of ${user.name} for repoId ${repoId}`)
}
})
await Promise.all(promises)
return {
signed: userMap.not_signed.length === 0,
userMap: userMap
}
}
_generateSharedGistQuery(gist_url, gist_version, user, userId) {
const sharedGistCondition = {
<<<<<<<
async _getPR(owner, repo, number, token) {
return github.call({
obj: 'pulls',
=======
let getPR = function (owner, repo, number, token, noCache) {
let deferred = q.defer();
github.call({
obj: 'pullRequests',
>>>>>>>
async _getPR(owner, repo, number, token, noCache) {
return github.call({
obj: 'pulls',
<<<<<<<
async _getPullRequestFiles(repo, owner, number, token) {
return github.call({
obj: 'pulls',
fun: 'listFiles',
arg: {
repo: repo,
owner: owner,
number: number,
noCache: true
},
token: token
})
}
async _isSignificantPullRequest(repo, owner, number, token) {
=======
let isSignificantPullRequest = async function (repo, owner, number, token) {
>>>>>>>
async _isSignificantPullRequest(repo, owner, number, token) {
<<<<<<<
args.gist = item.gist
args.repoId = item.repoId
args.orgId = item.orgId
args.onDates = [new Date()]
=======
const isOrgHead = pullRequest.head.repo.owner.type === 'Organization';
if (organizationOverrideEnabled && isOrgHead) {
const { owner: headOrg } = pullRequest.head.repo;
if (item.isUserWhitelisted !== undefined && item.isUserWhitelisted(headOrg.login)) {
return ({ signed: true });
}
const { signed, user_map } = await checkAll(
[{ name: headOrg.login, id: headOrg.id }],
item.repoId,
item.orgId,
item.sharedGist,
item.gist,
args.gist_version,
args.onDates
);
if (signed && user_map.signed.includes(headOrg.login)) {
return ({ signed, user_map });
}
}
>>>>>>>
args.gist = item.gist
args.repoId = item.repoId
args.orgId = item.orgId
args.onDates = [new Date()] |
<<<<<<<
all: function(done) {
Repo.find({}, function(err, repos){
done(err, repos);
});
=======
all: function (done) {
Repo.find({}, function (err, repos) {
done(err, repos);
});
>>>>>>>
all: function (done) {
Repo.find({}, function (err, repos) {
done(err, repos);
});
<<<<<<<
getPRCommitters: function(args, done){
var callGithub = function(arg){
=======
getPRCommitters: function (args, done) {
Repo.findOne({
owner: args.owner,
repo: args.repo
}, function (e, repo) {
if (e || !repo) {
var errorMsg = e;
errorMsg += 'with following arguments: ' + JSON.stringify(args);
logger.error(new Error(errorMsg).stack);
done(errorMsg);
return;
}
>>>>>>>
getPRCommitters: function (args, done) {
var callGithub = function (arg) {
<<<<<<<
github.direct_call(arg, function(err, res){
=======
args.url = url.githubPullRequestCommits(args.owner, args.repo, args.number);
args.token = repo.token;
github.direct_call(args, function (err, res) {
>>>>>>>
github.direct_call(arg, function (err, res) { |
<<<<<<<
getAll: function(req, done){
=======
getAll: function (req, done) {
>>>>>>>
getAll: function (req, done) {
<<<<<<<
revokeAllSignatures: function(req, done){
cla.revokeAllSignatures(req.args, done);
},
sign: function(req, done) {
var args = {repo: req.args.repo, owner: req.args.owner, user: req.user.login, user_id: req.user.id};
cla.sign(args, function(err, signed){
if (err) {log.error(err); }
repoService.get({repo: args.repo, owner: args.owner}, function(e, repo){
if (e) {log.error(e); }
github.direct_call({url: url.githubPullRequests(args.owner, args.repo, 'open'), token: repo.token}, function(error, res){
if (error) {log.error(error); }
if(res && res.data && !error){
res.data.forEach(function(pullRequest){
var status_args = {repo: args.repo, owner: args.owner};
status_args.number = pullRequest.number;
cla.check(status_args, function(cla_err, all_signed, user_map){
if (cla_err) {log.error(cla_err); }
status_args.signed = all_signed;
status.update(status_args);
prService.editComment({repo: args.repo, owner: args.owner, number: status_args.number, signed: all_signed, user_map: user_map});
});
=======
validatePullRequests: function (req, done){
github.direct_call({
url: url.githubPullRequests(req.args.owner, req.args.repo, 'open'),
token: req.args.token ? req.args.token : req.user.token
}, function (error, res) {
if (error) {
log.error(error);
}
if (res && res.data && !error) {
res.data.forEach(function (pullRequest) {
var status_args = {
repo: req.args.repo,
owner: req.args.owner
};
status_args.number = pullRequest.number;
cla.check(status_args, function (cla_err, all_signed, user_map) {
if (cla_err) {
log.error(cla_err);
}
status_args.signed = all_signed;
status.update(status_args);
prService.editComment({
repo: req.args.repo,
owner: req.args.owner,
number: status_args.number,
signed: all_signed,
user_map: user_map
>>>>>>>
revokeAllSignatures: function(req, done){
cla.revokeAllSignatures(req.args, done);
},
validatePullRequests: function (req, done){
github.direct_call({
url: url.githubPullRequests(req.args.owner, req.args.repo, 'open'),
token: req.args.token ? req.args.token : req.user.token
}, function (error, res) {
if (error) {
log.error(error);
}
if (res && res.data && !error) {
res.data.forEach(function (pullRequest) {
var status_args = {
repo: req.args.repo,
owner: req.args.owner
};
status_args.number = pullRequest.number;
cla.check(status_args, function (cla_err, all_signed, user_map) {
if (cla_err) {
log.error(cla_err);
}
status_args.signed = all_signed;
status.update(status_args);
prService.editComment({
repo: req.args.repo,
owner: req.args.owner,
number: status_args.number,
signed: all_signed,
user_map: user_map |
<<<<<<<
const host = req.headers['x-forwarded-host'] || req.headers.host
res.setHeader('location', 'https://' + host + req.url)
res.statusCode = 301
res.end()
})
app.use(require('x-frame-options')())
app.use(require('body-parser').json({
limit: '5mb'
}))
app.use(require('cookie-parser')())
app.use(noSniff())
const expressSession = require('express-session')
const MongoStore = require('connect-mongo')(expressSession)
=======
let host = req.headers['x-forwarded-host'] || req.headers.host;
res.setHeader('location', 'https://' + host + req.url);
res.statusCode = 301;
res.end();
});
app.use(require('x-frame-options')());
app.use(require('body-parser').json({ limit: '5mb' }));
app.use(require('cookie-parser')());
app.use(noSniff());
app.enable('trust proxy');
let expressSession = require('express-session');
let MongoStore = require('connect-mongo')(expressSession);
>>>>>>>
let host = req.headers['x-forwarded-host'] || req.headers.host;
res.setHeader('location', 'https://' + host + req.url);
res.statusCode = 301;
res.end();
});
app.use(require('x-frame-options')());
app.use(require('body-parser').json({ limit: '5mb' }));
app.use(require('cookie-parser')());
app.use(noSniff());
app.enable('trust proxy');
let expressSession = require('express-session');
let MongoStore = require('connect-mongo')(expressSession);
<<<<<<<
(callback) => {
bootstrap('controller', callback)
},
(callback) => {
bootstrap('graphQueries', callback)
=======
function (callback) {
bootstrap('graphQueries', callback);
>>>>>>>
(callback) => {
bootstrap('graphQueries', callback)
<<<<<<<
(callback) => {
bootstrap('webhooks', callback)
=======
function (callback) {
bootstrap('webhooks', callback);
},
function (callback) {
bootstrap('controller', callback);
>>>>>>>
(callback) => {
bootstrap('webhooks', callback)
},
(callback) => {
bootstrap('controller', callback) |
<<<<<<<
var LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
var purify = require("purifycss-webpack-plugin");
=======
//var purify = require("purifycss-webpack-plugin");
>>>>>>>
var LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
//var purify = require("purifycss-webpack-plugin"); |
<<<<<<<
it('passes instanceOf test', function () {
assert(new TestableClock() instanceof TestableClock);
});
it('should be of type `function`', function () {
=======
it('is a function', function () {
>>>>>>>
it('should be of type `function`', function () { |
<<<<<<<
this.onKeysExport = this.onKeysExport.bind(this)
this.onKeysImport = this.onKeysImport.bind(this)
this.handleSettingsChange = this.handleSettingsChange.bind(this)
=======
this.handleRCSettingsChange = this.handleRCSettingsChange.bind(this)
this.handleDeltaSettingsChange = this.handleDeltaSettingsChange.bind(this)
this.renderRCSwitch = this.renderRCSwitch.bind(this)
this.renderDeltaSwitch = this.renderDeltaSwitch.bind(this)
>>>>>>>
this.onKeysExport = this.onKeysExport.bind(this)
this.onKeysImport = this.onKeysImport.bind(this)
this.handleSettingsChange = this.handleSettingsChange.bind(this)
this.handleRCSettingsChange = this.handleRCSettingsChange.bind(this)
this.handleDeltaSettingsChange = this.handleDeltaSettingsChange.bind(this)
this.renderRCSwitch = this.renderRCSwitch.bind(this)
this.renderDeltaSwitch = this.renderDeltaSwitch.bind(this) |
<<<<<<<
=======
const {
H5,
Card,
Intent,
Alignment,
Navbar,
NavbarGroup,
NavbarHeading,
Button
} = require('@blueprintjs/core')
const ScreenContext = require('./contexts/ScreenContext')
const NavbarWrapper = require('./components/NavbarWrapper')
>>>>>>>
const ScreenContext = require('./contexts/ScreenContext')
const NavbarWrapper = require('./components/NavbarWrapper')
<<<<<<<
? <LoginScreen logins={logins} deltachat={deltachat} />
: <Screen
saved={saved}
screenProps={screenProps}
openDialog={this.openDialog}
closeDialog={this.closeDialog}
userFeedback={this.userFeedback}
changeScreen={this.changeScreen}
deltachat={deltachat}
/>
=======
? <LoginScreen logins={logins}>
<H5>{tx('login_title')}</H5>
<Login onSubmit={this.handleLogin} loading={deltachat.configuring}>
<br />
<Button type='submit' text={tx('login_title')} />
<Button type='cancel' text={tx('cancel')} />
</Login>
</LoginScreen>
: <ScreenContext.Provider value={{
openDialog: this.openDialog,
closeDialog: this.closeDialog,
userFeedback: this.userFeedback,
changeScreen: this.changeScreen
}}>
<Screen
saved={saved}
deltachat={deltachat}
screenProps={screenProps}
/>
</ScreenContext.Provider>
>>>>>>>
? <LoginScreen logins={logins} deltachat={deltachat} />
: <ScreenContext.Provider value={{
openDialog: this.openDialog,
closeDialog: this.closeDialog,
userFeedback: this.userFeedback,
changeScreen: this.changeScreen
}}>
<Screen
saved={saved}
deltachat={deltachat}
screenProps={screenProps}
/>
</ScreenContext.Provider> |
<<<<<<<
const { promisify } = require('util')
const windows = require('../windows')
=======
>>>>>>>
const { promisify } = require('util')
const windows = require('../windows') |
<<<<<<<
headerComponent,
=======
dismissKeyboardOnMessageTouch = true,
>>>>>>>
<<<<<<<
=======
const { t } = useContext(TranslationContext);
const { client, isOnline } = useContext(ChatContext);
const {
Attachment,
clearEditingState,
editing,
emojiData,
loadMore: mainLoadMore,
Message: MessageFromChannelContext,
removeMessage,
retrySendMessage,
setEditingState,
updateMessage,
} = useContext(MessagesContext);
const Message = MessageFromProps || MessageFromChannelContext;
const { loadMoreThread, openThread } = useContext(ThreadContext);
>>>>>>>
<<<<<<<
* @deprecated Use DateSeparator instead.
* Date separator UI component to render
*
* Defaults to and accepts same props as: [DateSeparator](https://getstream.github.io/stream-chat-react-native/#dateseparator)
* */
dateSeparator: PropTypes.oneOfType([PropTypes.node, PropTypes.elementType]),
/**
=======
>>>>>>> |
<<<<<<<
import React from 'react';
=======
import React, { useContext } from 'react';
import styled from '@stream-io/styled-components';
>>>>>>>
import React, { useContext } from 'react'; |
<<<<<<<
export { ChannelPreviewMessenger } from './ChannelPreviewMessenger';
export { CloseButton } from './CloseButton';
=======
export { ChannelPreviewMessenger } from './ChannelPreviewMessenger';
export { IconBadge } from './IconBadge';
>>>>>>>
export { ChannelPreviewMessenger } from './ChannelPreviewMessenger';
export { CloseButton } from './CloseButton';
export { IconBadge } from './IconBadge'; |
<<<<<<<
import { View } from 'react-native';
=======
import { View, Text, FlatList, TouchableOpacity } from 'react-native';
>>>>>>>
import { View, TouchableOpacity } from 'react-native';
<<<<<<<
<ListContainer
ref={(fl) => (this.flatList = fl)}
data={messagesWithGroupPositions}
onScroll={this.handleScroll}
ListFooterComponent={this.props.headerComponent}
onEndReached={this.props.loadMore}
inverted
keyExtractor={(item) =>
item.id || item.created_at || item.date.toISOString()
}
renderItem={this.renderItem}
maintainVisibleContentPosition={{
minIndexForVisible: 1,
autoscrollToTopThreshold: 10,
}}
/>
{this.state.newMessagesNotification && (
=======
{// Mask for edit state
this.props.editing && this.props.disableWhileEditing && (
<TouchableOpacity
style={{
position: 'absolute',
backgroundColor: 'black',
opacity: 0.4,
height: '100%',
width: '100%',
zIndex: 100,
}}
collapsable={false}
onPress={this.props.clearEditingState}
/>
)}
<View collapsable={false} style={{ flex: 1, alignItems: 'center' }}>
<FlatList
ref={(fl) => (this.flatList = fl)}
style={{
flex: 1,
paddingLeft: 10,
paddingRight: 10,
width: '100%',
}}
data={messagesWithGroupPositions}
onScroll={this.handleScroll}
ListFooterComponent={this.props.headerComponent}
keyboardShouldPersistTaps="always"
onEndReached={this.props.loadMore}
inverted
keyExtractor={(item) =>
item.id || item.created_at || item.date.toISOString()
}
renderItem={this.renderItem}
maintainVisibleContentPosition={{
minIndexForVisible: 1,
autoscrollToTopThreshold: 10,
}}
/>
>>>>>>>
{// Mask for edit state
this.props.editing && this.props.disableWhileEditing && (
<TouchableOpacity
style={{
position: 'absolute',
backgroundColor: 'black',
opacity: 0.4,
height: '100%',
width: '100%',
zIndex: 100,
}}
collapsable={false}
onPress={this.props.clearEditingState}
/>
)}
<ListContainer
ref={(fl) => (this.flatList = fl)}
data={messagesWithGroupPositions}
onScroll={this.handleScroll}
ListFooterComponent={this.props.headerComponent}
onEndReached={this.props.loadMore}
inverted
keyboardShouldPersistTaps="always"
keyExtractor={(item) =>
item.id || item.created_at || item.date.toISOString()
}
renderItem={this.renderItem}
maintainVisibleContentPosition={{
minIndexForVisible: 1,
autoscrollToTopThreshold: 10,
}}
/>
{this.state.newMessagesNotification && (
<<<<<<<
)}
<Notification type="warning" active={!this.state.online}>
<NotificationText>
Connection failure, reconnecting now ...
</NotificationText>
</Notification>
=======
<Notification type="warning" active={!this.state.online}>
<Text style={styles.Notification.warning}>
Connection failure, reconnecting now ...
</Text>
</Notification>
</View>
>>>>>>>
)}
<Notification type="warning" active={!this.state.online}>
<NotificationText>
Connection failure, reconnecting now ...
</NotificationText>
</Notification> |
<<<<<<<
import React, { useContext, useEffect, useRef, useState } from 'react';
import styled from 'styled-components/native';
=======
import React, { useContext, useEffect, useRef } from 'react';
import styled from '@stream-io/styled-components';
>>>>>>>
import React, { useContext, useEffect, useRef } from 'react';
import styled from 'styled-components/native'; |
<<<<<<<
static themePath = 'messageContent';
static propTypes = {
/** enabled reactions, this is usually set by the parent component based on channel configs */
reactionsEnabled: PropTypes.bool.isRequired,
/** enabled replies, this is usually set by the parent component based on channel configs */
repliesEnabled: PropTypes.bool.isRequired,
};
static defaultProps = {
reactionsEnabled: true,
repliesEnabled: true,
};
=======
static themePath = 'message.content';
>>>>>>>
static themePath = 'message.content';
static propTypes = {
/** enabled reactions, this is usually set by the parent component based on channel configs */
reactionsEnabled: PropTypes.bool.isRequired,
/** enabled replies, this is usually set by the parent component based on channel configs */
repliesEnabled: PropTypes.bool.isRequired,
};
static defaultProps = {
reactionsEnabled: true,
repliesEnabled: true,
};
<<<<<<<
<Container {...contentProps}>
{message.status === 'failed' ? (
<FailedText>Message failed - try again</FailedText>
) : null}
{reactionsEnabled &&
message.latest_reactions &&
message.latest_reactions.length > 0 && (
<ReactionList
visible={!this.state.reactionPickerVisible}
latestReactions={message.latest_reactions}
openReactionSelector={this.openReactionSelector}
reactionCounts={message.reaction_counts}
/>
)}
{/* Reason for collapsible: https://github.com/facebook/react-native/issues/12966 */}
<ContainerInner
ref={(o) => (this.messageContainer = o)}
collapsable={false}
>
{hasAttachment &&
images.length <= 1 &&
message.attachments.map((attachment, index) => (
<Attachment
key={`${message.id}-${index}`}
attachment={attachment}
actionHandler={this.props.handleAction}
alignment={this.props.alignment}
=======
<MessageContentContext.Provider value={context}>
<Container {...contentProps}>
{message.status === 'failed' ? (
<FailedText>Message failed - try again</FailedText>
) : null}
{message.latest_reactions &&
message.latest_reactions.length > 0 && (
<ReactionList
visible={!this.state.reactionPickerVisible}
latestReactions={message.latest_reactions}
openReactionSelector={this.openReactionSelector}
reactionCounts={message.reaction_counts}
>>>>>>>
<MessageContentContext.Provider value={context}>
<Container {...contentProps}>
{message.status === 'failed' ? (
<FailedText>Message failed - try again</FailedText>
) : null}
{reactionsEnabled &&
message.latest_reactions &&
message.latest_reactions.length > 0 && (
<ReactionList
visible={!this.state.reactionPickerVisible}
latestReactions={message.latest_reactions}
openReactionSelector={this.openReactionSelector}
reactionCounts={message.reaction_counts}
<<<<<<<
<ActionSheet
ref={(o) => {
this.ActionSheet = o;
}}
title={<Text>Choose an action</Text>}
options={options.map((o) => o.title)}
cancelButtonIndex={0}
destructiveButtonIndex={0}
onPress={(index) => this.onActionPress(options[index].id)}
/>
{reactionsEnabled ? (
<ReactionPicker
reactionPickerVisible={this.state.reactionPickerVisible}
handleReaction={handleReaction}
latestReactions={message.latest_reactions}
reactionCounts={message.reaction_counts}
handleDismiss={() => {
this.setState({ reactionPickerVisible: false });
}}
rpLeft={this.state.rpLeft}
rpRight={this.state.rpRight}
rpTop={this.state.rpTop}
/>
) : null}
</Container>
=======
<ActionSheet
ref={(o) => {
this.ActionSheet = o;
}}
title={<Text>Choose an action</Text>}
options={options.map((o) => o.title)}
cancelButtonIndex={0}
destructiveButtonIndex={0}
onPress={(index) => this.onActionPress(options[index].id)}
/>
<ReactionPicker
reactionPickerVisible={this.state.reactionPickerVisible}
handleReaction={handleReaction}
latestReactions={message.latest_reactions}
reactionCounts={message.reaction_counts}
handleDismiss={() => {
this.setState({ reactionPickerVisible: false });
}}
rpLeft={this.state.rpLeft}
rpRight={this.state.rpRight}
rpTop={this.state.rpTop}
/>
</Container>
</MessageContentContext.Provider>
>>>>>>>
{reactionsEnabled ? (
<ActionSheet
ref={(o) => {
this.ActionSheet = o;
}}
title={<Text>Choose an action</Text>}
options={options.map((o) => o.title)}
cancelButtonIndex={0}
destructiveButtonIndex={0}
onPress={(index) => this.onActionPress(options[index].id)}
/>
) : null}
<ReactionPicker
reactionPickerVisible={this.state.reactionPickerVisible}
handleReaction={handleReaction}
latestReactions={message.latest_reactions}
reactionCounts={message.reaction_counts}
handleDismiss={() => {
this.setState({ reactionPickerVisible: false });
}}
rpLeft={this.state.rpLeft}
rpRight={this.state.rpRight}
rpTop={this.state.rpTop}
/>
</Container>
</MessageContentContext.Provider> |
<<<<<<<
import React from 'react';
import styled from 'styled-components/native';
=======
import React, { useContext } from 'react';
import styled from '@stream-io/styled-components';
>>>>>>>
import React, { useContext } from 'react';
import styled from 'styled-components/native'; |
<<<<<<<
</Single>
<Modal visible={this.state.viewerModalOpen} transparent={true}>
<SafeAreaView style={{ flex: 1, backgroundColor: 'transparent' }}>
<ImageViewer
imageUrls={images}
onCancel={() => {
this.setState({ viewerModalOpen: false });
}}
enableSwipeDown
renderHeader={() => (
<GalleryHeader
handleDismiss={() => {
this.setState({ viewerModalOpen: false });
}}
/>
)}
/>
</SafeAreaView>
</Modal>
</React.Fragment>
);
}
return (
<React.Fragment>
<GalleryContainer length={images.length} position={this.props.position}>
{images.slice(0, 4).map((image, i) => (
<ImageContainer
key={`gallery-item-${i}`}
length={images.length}
activeOpacity={0.8}
onPress={() => {
console.log('open');
this.setState({ viewerModalOpen: true });
}}
>
{i === 3 && images.length > 4 ? (
<View
style={{
width: '100%',
height: '100%',
}}
>
<Image
style={{
width: 100 + '%',
height: 100 + '%',
}}
resizeMode="cover"
source={{ uri: images[3].url }}
/>
<View
style={{
position: 'absolute',
height: '100%',
width: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'rgba(0,0,0,0.69)',
}}
>
<Text
style={{
color: 'white',
fontWeight: '700',
fontSize: 22,
}}
>
{' '}
+ {images.length - 3} more
</Text>
</View>
</View>
) : (
<Image
style={{
width: 100 + '%',
height: 100 + '%',
}}
resizeMode="cover"
source={{ uri: image.url }}
/>
)}
</ImageContainer>
))}
</GalleryContainer>
<Modal visible={this.state.viewerModalOpen} transparent={true}>
=======
</TouchableOpacity>
))}
<Modal
visible={this.state.viewerModalOpen}
transparent={true}
onRequestClose={() => {}}
>
>>>>>>>
</Single>
<Modal visible={this.state.viewerModalOpen} transparent={true}>
<SafeAreaView style={{ flex: 1, backgroundColor: 'transparent' }}>
<ImageViewer
imageUrls={images}
onCancel={() => {
this.setState({ viewerModalOpen: false });
}}
enableSwipeDown
renderHeader={() => (
<GalleryHeader
handleDismiss={() => {
this.setState({ viewerModalOpen: false });
}}
/>
)}
/>
</SafeAreaView>
</Modal>
</React.Fragment>
);
}
return (
<React.Fragment>
<GalleryContainer length={images.length} position={this.props.position}>
{images.slice(0, 4).map((image, i) => (
<ImageContainer
key={`gallery-item-${i}`}
length={images.length}
activeOpacity={0.8}
onPress={() => {
console.log('open');
this.setState({ viewerModalOpen: true });
}}
>
{i === 3 && images.length > 4 ? (
<View
style={{
width: '100%',
height: '100%',
}}
>
<Image
style={{
width: 100 + '%',
height: 100 + '%',
}}
resizeMode="cover"
source={{ uri: images[3].url }}
/>
<View
style={{
position: 'absolute',
height: '100%',
width: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'rgba(0,0,0,0.69)',
}}
>
<Text
style={{
color: 'white',
fontWeight: '700',
fontSize: 22,
}}
>
{' '}
+ {images.length - 3} more
</Text>
</View>
</View>
) : (
<Image
style={{
width: 100 + '%',
height: 100 + '%',
}}
resizeMode="cover"
source={{ uri: image.url }}
/>
)}
</ImageContainer>
))}
</GalleryContainer>
<Modal
onRequestClose={() => {}}
visible={this.state.viewerModalOpen}
transparent={true}
> |
<<<<<<<
'storyGroups.insert'(storyGroup) {
checkIfCan('stories:w', storyGroup.projectId);
=======
async 'storyGroups.insert'(storyGroup) {
>>>>>>>
async 'storyGroups.insert'(storyGroup) {
checkIfCan('stories:w', storyGroup.projectId);
<<<<<<<
auditLogIfOnServer('Updated a story group', {
resId: storyGroup._id,
user: Meteor.user(),
type: 'updated',
projectId: storyGroup.projectId,
operation: 'story-group-updated',
after: { storyGroup },
before: { storyGroup: storyGroupBefore },
resType: 'story-group',
});
return StoryGroups.update(
{ _id }, { $set: rest },
);
=======
return StoryGroups.update({ _id }, { $set: rest });
>>>>>>>
auditLogIfOnServer('Updated a story group', {
resId: storyGroup._id,
user: Meteor.user(),
type: 'updated',
projectId: storyGroup.projectId,
operation: 'story-group-updated',
after: { storyGroup },
before: { storyGroup: storyGroupBefore },
resType: 'story-group',
});
return StoryGroups.update({ _id }, { $set: rest }); |
<<<<<<<
=======
const intents = tracker.events.filter( event => event.event === 'user').map((event => event.parse_data.intent.name))
const actions = tracker.events.filter( event => event.event === 'action').map((event => event.name))
const dialogues = db.get('conversations', {
castIds: false,
});
>>>>>>>
const intents = tracker.events.filter( event => event.event === 'user').map((event => event.parse_data.intent.name))
const actions = tracker.events.filter( event => event.event === 'action').map((event => event.name)) |
<<<<<<<
import PropTypes from 'prop-types';
import styled from 'styled-components';
=======
import styled from '@stream-io/styled-components';
import PropTypes from 'prop-types';
import DefaultMessage from '../Message/Message';
import DefaultMessageInput from '../MessageInput/MessageInput';
import DefaultMessageList from '../MessageList/MessageList';
>>>>>>>
import styled from 'styled-components';
import PropTypes from 'prop-types';
import DefaultMessage from '../Message/Message';
import DefaultMessageInput from '../MessageInput/MessageInput';
import DefaultMessageList from '../MessageList/MessageList'; |
<<<<<<<
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { CommandsItem, MentionsItem } from '../AutoCompleteInput';
=======
import styled from '@stream-io/styled-components';
import PropTypes from 'prop-types';
import CommandsItem from '../AutoCompleteInput/CommandsItem';
import MentionsItem from '../AutoCompleteInput/MentionsItem';
>>>>>>>
import styled from 'styled-components';
import PropTypes from 'prop-types';
import CommandsItem from '../AutoCompleteInput/CommandsItem';
import MentionsItem from '../AutoCompleteInput/MentionsItem'; |
<<<<<<<
import React from 'react';
import styled from 'styled-components/native';
=======
import React, { useContext, useEffect, useRef } from 'react';
import styled from '@stream-io/styled-components';
>>>>>>>
import React, { useContext, useEffect, useRef } from 'react';
<<<<<<<
display: flex;
flex-direction: column;
max-width: 250px;
padding: ${({ error }) => (error ? 5 : 0)}px;
=======
>>>>>>>
<<<<<<<
theme.message.content.container.borderRadiusL}px;
=======
theme.message.content.container.borderRadiusL}px;
justify-content: ${({ alignment }) =>
alignment === 'left' ? 'flex-start' : 'flex-end'};
max-width: 250px;
padding: ${({ error }) => (error ? 5 : 0)}px;
>>>>>>>
theme.message.content.container.borderRadiusL}px;
justify-content: ${({ alignment }) =>
alignment === 'left' ? 'flex-start' : 'flex-end'};
max-width: 250px;
padding: ${({ error }) => (error ? 5 : 0)}px;
<<<<<<<
const MetaContainer = styled.View`
margin-top: 2px;
${({ theme }) => theme.message.content.metaContainer.css};
`;
const MetaText = styled.Text`
font-size: 11px;
color: ${({ theme }) => theme.colors.textGrey};
text-align: ${({ alignment }) => (alignment === 'left' ? 'left' : 'right')};
${({ theme }) => theme.message.content.metaText.css};
`;
=======
>>>>>>>
<<<<<<<
display: flex;
flex-direction: column;
max-width: 250px;
padding: 5px;
=======
>>>>>>>
<<<<<<<
font-size: 15px;
line-height: 20px;
=======
>>>>>>> |
<<<<<<<
sgtExchanger = await SGTExchanger.new(sgt.address, snt.address, statusContribution.address);
dynamicCeiling = await DynamicCeiling.new();
=======
sgtExchanger = await SGTExchanger.new(sgt.address, snt.address);
dynamicCeiling = await DynamicCeiling.new(accounts[0], statusContribution.address);
>>>>>>>
sgtExchanger = await SGTExchanger.new(sgt.address, snt.address, statusContribution.address);
dynamicCeiling = await DynamicCeiling.new(accounts[0], statusContribution.address); |
<<<<<<<
lim = 3;
cur = 0;
await snt.sendTransaction({ value: web3.toWei(1), gas: 300000 });
=======
await snt.sendTransaction({ value: web3.toWei(1), gas: 300000, gasPrice: "20000000000" });
>>>>>>>
lim = 3;
cur = 0;
await snt.sendTransaction({ value: web3.toWei(1), gas: 300000, gasPrice: "20000000000" }); |
<<<<<<<
multisigSecundarySell.address,
sgt.address,
=======
multisigSecondarySell.address,
>>>>>>>
multisigSecondarySell.address,
sgt.address, |
<<<<<<<
import { flattenStory, extractDomain, getAllTemplates } from '../../lib/story.utils';
=======
import { flattenStory, extractDomain } from '../../lib/story.utils';
import BotResponses from '../graphql/botResponses/botResponses.model';
>>>>>>>
import { flattenStory, extractDomain, getAllTemplates } from '../../lib/story.utils';
import BotResponses from '../graphql/botResponses/botResponses.model';
<<<<<<<
'project.delete'(projectId, options = { failSilently: false, bypassWithCI: false }) {
=======
async 'project.delete'(projectId, options = { failSilently: false }) {
>>>>>>>
async 'project.delete'(projectId, options = { failSilently: false, bypassWithCI: false }) {
<<<<<<<
// Delete project related permissions for users (note: the role package does not provide
const projectUsers = Meteor.users.find({ [`roles.${project._id}`]: { $exists: true } }, { fields: { roles: 1 } }).fetch();
projectUsers.forEach(u => Meteor.users.update({ _id: u._id }, { $unset: { [`roles.${project._id}`]: '' } })); // Roles.removeUsersFromRoles doesn't seem to work so we unset manually
=======
Deployments.remove({ projectId }); // Delete deployment
await BotResponses.remove({ projectId });
>>>>>>>
// Delete project related permissions for users (note: the role package does not provide
const projectUsers = Meteor.users.find({ [`roles.${project._id}`]: { $exists: true } }, { fields: { roles: 1 } }).fetch();
projectUsers.forEach(u => Meteor.users.update({ _id: u._id }, { $unset: { [`roles.${project._id}`]: '' } })); // Roles.removeUsersFromRoles doesn't seem to work so we unset manually
await BotResponses.remove({ projectId }); |
<<<<<<<
// Reversed
=======
// Fast-path at this particular point because the "no change" case that this covers
// is orders of magnitude more common than the others
if (nStartIdx === nextLen && pStartIdx === prevLen) {
return
}
// List tail is the same
while (pEndIdx >= pStartIdx && nEndIdx >= nStartIdx && equal(pEndItem, nEndItem)) {
effect(UPDATE, pEndItem, nEndItem)
pEndItem = prev[--pEndIdx]
nEndItem = next[--nEndIdx]
}
// Reversals
>>>>>>>
// Reversed
<<<<<<<
// List tail is the same
while (pEndIdx >= pStartIdx && nEndIdx >= nStartIdx && equal(pEndItem, nEndItem)) {
effect(UPDATE, pEndItem, nEndItem)
pEndItem = prev[--pEndIdx]
nEndItem = next[--nEndIdx]
}
const prevMap = keyMap(prev, pStartIdx, pEndIdx + 1)
=======
const prevMap = keyMap(prev, pStartIdx, pEndIdx + 1, key)
>>>>>>>
// List tail is the same
while (pEndIdx >= pStartIdx && nEndIdx >= nStartIdx && equal(pEndItem, nEndItem)) {
effect(UPDATE, pEndItem, nEndItem)
pEndItem = prev[--pEndIdx]
nEndItem = next[--nEndIdx]
}
const prevMap = keyMap(prev, pStartIdx, pEndIdx + 1, key) |
<<<<<<<
story: 1, title: 1, branches: 1, errors: 1, checkpoints: 1, storyGroupId: 1, rules: 1,
=======
story: 1,
title: 1,
branches: 1,
errors: 1,
checkpoints: 1,
storyGroupId: 1,
>>>>>>>
story: 1,
title: 1,
branches: 1,
errors: 1,
checkpoints: 1,
storyGroupId: 1,
rules: 1,
<<<<<<<
.map(story => insertSmartPayloads(story))
.reduce((acc, story) => [...acc, ...flattenStory((story))], [])
=======
.reduce((acc, story) => [...acc, ...flattenStory(story)], [])
>>>>>>>
.map(story => insertSmartPayloads(story))
.reduce((acc, story) => [...acc, ...flattenStory(story)], []) |
<<<<<<<
const referenceB = Web3Utils.sha3(rawRefB) //hash our reference
const leafB = joinIonLinkData(withdrawReceiver,tokenB.address,ionLockB.address,valueB,referenceB)
console.log(leafB)
=======
const leafB = joinIonLinkData(withdrawReceiver,tokenB.address,ionLockB.address,valueB,ref)
>>>>>>>
const leafB = joinIonLinkData(withdrawReceiver,tokenB.address,ionLockB.address,valueB,ref)
console.log(leafB) |
<<<<<<<
it('should be able to access nlu model menu tabs, activity, training-data and evaluation,', function() {
cy.visit(`/project/${this.bf_project_id}/nlu/models`);
cy.contains('English').click();
cy.get('.cards>:first-child button.primary').click();
=======
it('should be able to access nlu model menu tabs, activity, training-data and evaluation', function() {
cy.visit(`/project/${this.bf_project_id}/nlu/model/${this.bf_model_id}`);
>>>>>>>
it('should be able to access nlu model menu tabs, activity, training-data and evaluation', function() {
cy.visit(`/project/${this.bf_project_id}/nlu/model/${this.bf_model_id}`);
<<<<<<<
it('should be able to import training data through UI', function() {
cy.visit(`/project/${this.bf_project_id}/nlu/models`);
cy.contains('French').click();
cy.get(':nth-child(1) > .extra > .basic > .primary').click();
cy.get('.nlu-menu-settings').click();
cy.contains('Import').click();
cy.fixture('nlu_import.json', 'utf8').then((content) => {
cy.get('.file-dropzone').upload(content, 'data.json');
});
cy.contains('Import Training Data').click();
cy.get('.s-alert-success').should('be.visible');
cy.visit(`/project/${this.bf_project_id}/nlu/models`);
cy.contains(modelLangForUI).click();
cy.get(`#model-${modelNameForUI} .open-model-button`)
.first()
.click();
cy.contains('Training Data').click();
cy.contains('Statistics').click();
cy.contains('943').siblings('.label').should('contain', 'Examples');
cy.contains('Intents').siblings('.value').should('contain', '56');
cy.contains('Entities').siblings('.value').should('contain', '3');
});
it('should be able to import training data through Meteor call', function() {
cy.MeteorCall('nlu.import', [
JSON.parse(dataImport),
modelIdForCall,
true,
]).then(() => {
cy.visit(`/project/${this.bf_project_id}/nlu/models`);
cy.contains('English').click();
cy.get(`#model-${nameOfModelForCall} .open-model-button`).click();
cy.contains('Training Data').click();
cy.contains('Statistics').click();
cy.contains('1').siblings('.label').should('contain', 'Examples');
cy.contains('Intents').siblings('.value').should('contain', '1');
});
});
=======
it('should display import tab in settings but NOT delete tab', function() {
cy.visit(`/project/${this.bf_project_id}/nlu/model/${this.bf_model_id}`);
cy.get('[data-cy=settings-in-model]').click();
cy.contains('Import').click();
cy.contains('Delete').should('not.exist');
});
it('should NOT be able to call nlu.update.general', function() {
cy.MeteorCall('nlu.update.general', [
this.bf_model_id,
{
config:
'pipeline: - name: components.botfront.language_setter.LanguageSetter - name: tokenizer_whitespace - name: intent_featurizer_count_vectors'
+ ' - name: intent_classifier_tensorflow_embedding - BILOU_flag: true name: ner_crf features: - [low, title, upper]'
+ ' - [low, bias, prefix5, prefix2, suffix5, suffix3, suffix2, upper, title, digit, pattern]'
+ ' - [low, title, upper] - name: components.botfront.fuzzy_gazette.FuzzyGazette - name: ner_synonyms',
},
]).then(err => expect(err.error).to.equal('403'));
});
>>>>>>>
it('should be able to import training data through UI', function() {
cy.visit(`/project/${this.bf_project_id}/nlu/models`);
cy.contains('French').click();
cy.get(':nth-child(1) > .extra > .basic > .primary').click();
cy.get('.nlu-menu-settings').click();
cy.contains('Import').click();
cy.fixture('nlu_import.json', 'utf8').then((content) => {
cy.get('.file-dropzone').upload(content, 'data.json');
});
cy.contains('Import Training Data').click();
cy.get('.s-alert-success').should('be.visible');
cy.visit(`/project/${this.bf_project_id}/nlu/models`);
cy.contains(modelLangForUI).click();
cy.get(`#model-${modelNameForUI} .open-model-button`)
.first()
.click();
cy.contains('Training Data').click();
cy.contains('Statistics').click();
cy.contains('943').siblings('.label').should('contain', 'Examples');
cy.contains('Intents').siblings('.value').should('contain', '56');
cy.contains('Entities').siblings('.value').should('contain', '3');
});
it('should be able to import training data through Meteor call', function() {
cy.MeteorCall('nlu.import', [
JSON.parse(dataImport),
modelIdForCall,
true,
]).then(() => {
cy.visit(`/project/${this.bf_project_id}/nlu/models`);
cy.contains('English').click();
cy.get(`#model-${nameOfModelForCall} .open-model-button`).click();
cy.contains('Training Data').click();
cy.contains('Statistics').click();
cy.contains('1').siblings('.label').should('contain', 'Examples');
cy.contains('Intents').siblings('.value').should('contain', '1');
});
});
it('should display import tab in settings but NOT delete tab', function() {
cy.visit(`/project/${this.bf_project_id}/nlu/model/${this.bf_model_id}`);
cy.get('[data-cy=settings-in-model]').click();
cy.contains('Import').click();
cy.contains('Delete').should('not.exist');
});
it('should NOT be able to call nlu.update.general', function() {
cy.MeteorCall('nlu.update.general', [
this.bf_model_id,
{
config:
'pipeline: - name: components.botfront.language_setter.LanguageSetter - name: tokenizer_whitespace - name: intent_featurizer_count_vectors'
+ ' - name: intent_classifier_tensorflow_embedding - BILOU_flag: true name: ner_crf features: - [low, title, upper]'
+ ' - [low, bias, prefix5, prefix2, suffix5, suffix3, suffix2, upper, title, digit, pattern]'
+ ' - [low, title, upper] - name: components.botfront.fuzzy_gazette.FuzzyGazette - name: ner_synonyms',
},
]).then(err => expect(err.error).to.equal('403'));
}); |
<<<<<<<
return value;
}
var t = ActiveSupport.trim(String(value));
return (t.length > 0 && !(/[^0-9.]/).test(t) && (/\.\d/).test(t)) ? parseFloat(new Number(value)) : parseInt(new Number(value), 10);
=======
return String(str).replace(/^\s+|\s+$/g,"");
};
return (trim(value).length > 0 && !(/[^0-9.]/).test(trim(value)) && (/\.\d/).test(trim(value))) ? parseFloat(Number(value)) : parseInt(Number(value),10);
>>>>>>>
return value;
};
var t = ActiveSupport.trim(String(value));
return (t.length > 0 && !(/[^0-9.]/).test(t) && (/\.\d/).test(t)) ? parseFloat(Number(value)) : parseInt(Number(value),10); |
<<<<<<<
angular.module('rhqm.services')
.factory('metricDataService', ['$q', '$rootScope', '$http', '$log', '$localStorage', 'BASE_URL', function ($q, $rootScope, $http, $log, $localStorage, BASE_URL) {
function makeBaseUrl() {
var baseUrl = 'http://' + $rootScope.$storage.server + ':' + $rootScope.$storage.port + BASE_URL;
return baseUrl;
=======
var Services;
(function (Services) {
var MetricDataService = (function () {
function MetricDataService($q, $rootScope, $http, $log, $localStorage, BASE_URL) {
this.$q = $q;
this.$rootScope = $rootScope;
this.$http = $http;
this.$log = $log;
this.$localStorage = $localStorage;
this.BASE_URL = BASE_URL;
>>>>>>>
var MetricDataService = (function () {
function MetricDataService($q, $rootScope, $http, $log, $localStorage, BASE_URL) {
this.$q = $q;
this.$rootScope = $rootScope;
this.$http = $http;
this.$log = $log;
this.$localStorage = $localStorage;
this.BASE_URL = BASE_URL; |
<<<<<<<
/**
* @ngdoc controller
* @name ChartController
* @description This controller is responsible for handling activity related to the Chart tab.
* @param $scope
* @param $rootScope
* @param $interval
* @param $log
* @param metricDataService
*/
function ChartController($scope, $rootScope, $interval, $log, metricDataService) {
var updateLastTimeStampToNowPromise,
bucketedDataPoints = [],
contextDataPoints = [],
vm = this;
vm.chartParams = {
searchId: '',
startTimeStamp: moment().subtract('hours', 24).toDate(), //default time period set to 24 hours
endTimeStamp: new Date(),
dateRange: moment().subtract('hours', 24).from(moment(), true),
updateEndTimeStampToNow: false,
collapseTable: true,
tableButtonLabel: 'Show Table',
showAvgLine: true,
hideHighLowValues: false,
showPreviousRangeDataOverlay: false,
showContextZoom: true,
showAutoRefreshCancel: false,
chartType: 'bar',
chartTypes: ['bar', 'line', 'area', 'scatter', 'scatterline', 'candlestick', 'histogram']
};
vm.dateTimeRanges = [
{ 'range': '1h', 'rangeInSeconds': 60 * 60 } ,
{ 'range': '4h', 'rangeInSeconds': 4 * 60 * 60 } ,
{ 'range': '8h', 'rangeInSeconds': 8 * 60 * 60 },
{ 'range': '12h', 'rangeInSeconds': 12 * 60 * 60 },
{ 'range': '1d', 'rangeInSeconds': 24 * 60 * 60 },
{ 'range': '5d', 'rangeInSeconds': 5 * 24 * 60 * 60 },
{ 'range': '1m', 'rangeInSeconds': 30 * 24 * 60 * 60 },
{ 'range': '3m', 'rangeInSeconds': 3 * 30 * 24 * 60 * 60 },
{ 'range': '6m', 'rangeInSeconds': 6 * 30 * 24 * 60 * 60 }
];
// $rootScope.$on('DateRangeMove', function (event, message) {
// $log.debug('DateRangeMove on chart Detected.');
// });
$rootScope.$on('GraphTimeRangeChangedEvent', function (event, timeRange) {
// set to the new published time range
vm.chartParams.startTimeStamp = timeRange[0];
vm.chartParams.endTimeStamp = timeRange[1];
vm.chartParams.dateRange = moment(timeRange[0]).from(moment(timeRange[1]));
vm.refreshHistoricalChartData(vm.chartParams.startTimeStamp, vm.chartParams.endTimeStamp);
});
function noDataFoundForId(id) {
$log.warn('No Data found for id: ' + id);
toastr.warn('No Data found for id: ' + id);
}
vm.showPreviousTimeRange = function () {
var previousTimeRange;
previousTimeRange = calculatePreviousTimeRange(vm.chartParams.startTimeStamp, vm.chartParams.endTimeStamp);
vm.chartParams.startTimeStamp = previousTimeRange[0];
vm.chartParams.endTimeStamp = previousTimeRange[1];
vm.refreshHistoricalChartData(vm.chartParams.startTimeStamp, vm.chartParams.endTimeStamp);
};
function calculatePreviousTimeRange(startDate, endDate) {
var previousTimeRange = [];
var intervalInMillis = endDate - startDate;
previousTimeRange.push(new Date(startDate.getTime() - intervalInMillis));
previousTimeRange.push(startDate);
return previousTimeRange;
}
function calculateNextTimeRange(startDate, endDate) {
var nextTimeRange = [];
var intervalInMillis = endDate - startDate;
nextTimeRange.push(endDate);
nextTimeRange.push(new Date(endDate.getTime() + intervalInMillis));
return nextTimeRange;
}
vm.showNextTimeRange = function () {
var nextTimeRange = calculateNextTimeRange(vm.chartParams.startTimeStamp, vm.chartParams.endTimeStamp);
vm.chartParams.startTimeStamp = nextTimeRange[0];
vm.chartParams.endTimeStamp = nextTimeRange[1];
vm.refreshHistoricalChartData(vm.chartParams.startTimeStamp, vm.chartParams.endTimeStamp);
};
vm.hasNext = function () {
var nextTimeRange = calculateNextTimeRange(vm.chartParams.startTimeStamp, vm.chartParams.endTimeStamp);
// unsophisticated test to see if there is a next; without actually querying.
//@fixme: pay the price, do the query!
return nextTimeRange[1].getTime() < _.now();
};
vm.toggleTable = function () {
vm.chartParams.collapseTable = !vm.chartParams.collapseTable;
if (vm.chartParams.collapseTable) {
vm.chartParams.tableButtonLabel = 'Show Table';
} else {
vm.chartParams.tableButtonLabel = 'Hide Table';
}
};
$scope.$on('$destroy', function () {
$interval.cancel(updateLastTimeStampToNowPromise);
});
vm.cancelAutoRefresh = function () {
vm.chartParams.showAutoRefreshCancel = !vm.chartParams.showAutoRefreshCancel;
$interval.cancel(updateLastTimeStampToNowPromise);
toastr.info('Canceling Auto Refresh');
};
vm.autoRefresh = function (intervalInSeconds) {
toastr.info('Auto Refresh Mode started');
vm.chartParams.updateEndTimeStampToNow = !vm.chartParams.updateEndTimeStampToNow;
vm.chartParams.showAutoRefreshCancel = true;
if (vm.chartParams.updateEndTimeStampToNow) {
vm.refreshHistoricalChartData();
vm.showAutoRefreshCancel = true;
updateLastTimeStampToNowPromise = $interval(function () {
vm.chartParams.endTimeStamp = new Date();
vm.refreshHistoricalChartData();
}, intervalInSeconds * 1000);
} else {
$interval.cancel(updateLastTimeStampToNowPromise);
=======
var Controllers;
(function (Controllers) {
/**
* @ngdoc controller
* @name ChartController
* @description This controller is responsible for handling activity related to the Chart tab.
* @param $scope
* @param $rootScope
* @param $interval
* @param $log
* @param metricDataService
*/
var ChartController = (function () {
function ChartController($scope, $rootScope, $interval, $log, metricDataService, startTimeStamp, endTimeStamp, dateRange) {
this.$scope = $scope;
this.$rootScope = $rootScope;
this.$interval = $interval;
this.$log = $log;
this.metricDataService = metricDataService;
this.startTimeStamp = startTimeStamp;
this.endTimeStamp = endTimeStamp;
this.dateRange = dateRange;
this.searchId = '';
this.updateEndTimeStampToNow = false;
this.collapseTable = true;
this.tableButtonLabel = 'Show Table';
this.showAvgLine = true;
this.hideHighLowValues = false;
this.showPreviousRangeDataOverlay = false;
this.showContextZoom = true;
this.showAutoRefreshCancel = false;
this.chartType = 'bar';
this.chartTypes = ['bar', 'line', 'area', 'scatter', 'scatterline', 'candlestick', 'histogram'];
this.dateTimeRanges = [
{ 'range': '1h', 'rangeInSeconds': 60 * 60 },
{ 'range': '4h', 'rangeInSeconds': 4 * 60 * 60 },
{ 'range': '8h', 'rangeInSeconds': 8 * 60 * 60 },
{ 'range': '12h', 'rangeInSeconds': 12 * 60 * 60 },
{ 'range': '1d', 'rangeInSeconds': 24 * 60 * 60 },
{ 'range': '5d', 'rangeInSeconds': 5 * 24 * 60 * 60 },
{ 'range': '1m', 'rangeInSeconds': 30 * 24 * 60 * 60 },
{ 'range': '3m', 'rangeInSeconds': 3 * 30 * 24 * 60 * 60 },
{ 'range': '6m', 'rangeInSeconds': 6 * 30 * 24 * 60 * 60 }
];
this.bucketedDataPoints = [];
this.contextDataPoints = [];
$scope.vm = this;
this.startTimeStamp = moment().subtract('hours', 24).toDate(); //default time period set to 24 hours
this.endTimeStamp = new Date();
this.dateRange = moment().subtract('hours', 24).from(moment(), true);
$scope.$on('GraphTimeRangeChangedEvent', function (event, timeRange) {
$scope.vm.startTimeStamp = timeRange[0];
$scope.vm.endTimeStamp = timeRange[1];
$scope.vm.dateRange = moment(timeRange[0]).from(moment(timeRange[1]));
$scope.vm.refreshHistoricalChartDataForTimestamp(startTimeStamp, endTimeStamp);
});
>>>>>>>
/**
* @ngdoc controller
* @name ChartController
* @description This controller is responsible for handling activity related to the Chart tab.
* @param $scope
* @param $rootScope
* @param $interval
* @param $log
* @param metricDataService
*/
var ChartController = (function () {
function ChartController($scope, $rootScope, $interval, $log, metricDataService, startTimeStamp, endTimeStamp, dateRange) {
this.$scope = $scope;
this.$rootScope = $rootScope;
this.$interval = $interval;
this.$log = $log;
this.metricDataService = metricDataService;
this.startTimeStamp = startTimeStamp;
this.endTimeStamp = endTimeStamp;
this.dateRange = dateRange;
this.searchId = '';
this.updateEndTimeStampToNow = false;
this.collapseTable = true;
this.tableButtonLabel = 'Show Table';
this.showAvgLine = true;
this.hideHighLowValues = false;
this.showPreviousRangeDataOverlay = false;
this.showContextZoom = true;
this.showAutoRefreshCancel = false;
this.chartType = 'bar';
this.chartTypes = ['bar', 'line', 'area', 'scatter', 'scatterline', 'candlestick', 'histogram'];
this.dateTimeRanges = [
{ 'range': '1h', 'rangeInSeconds': 60 * 60 },
{ 'range': '4h', 'rangeInSeconds': 4 * 60 * 60 },
{ 'range': '8h', 'rangeInSeconds': 8 * 60 * 60 },
{ 'range': '12h', 'rangeInSeconds': 12 * 60 * 60 },
{ 'range': '1d', 'rangeInSeconds': 24 * 60 * 60 },
{ 'range': '5d', 'rangeInSeconds': 5 * 24 * 60 * 60 },
{ 'range': '1m', 'rangeInSeconds': 30 * 24 * 60 * 60 },
{ 'range': '3m', 'rangeInSeconds': 3 * 30 * 24 * 60 * 60 },
{ 'range': '6m', 'rangeInSeconds': 6 * 30 * 24 * 60 * 60 }
];
this.bucketedDataPoints = [];
this.contextDataPoints = [];
$scope.vm = this;
this.startTimeStamp = moment().subtract('hours', 24).toDate(); //default time period set to 24 hours
this.endTimeStamp = new Date();
this.dateRange = moment().subtract('hours', 24).from(moment(), true);
$scope.$on('GraphTimeRangeChangedEvent', function (event, timeRange) {
$scope.vm.startTimeStamp = timeRange[0];
$scope.vm.endTimeStamp = timeRange[1];
$scope.vm.dateRange = moment(timeRange[0]).from(moment(timeRange[1]));
$scope.vm.refreshHistoricalChartDataForTimestamp(startTimeStamp, endTimeStamp);
}); |
<<<<<<<
const { stories, domain } = await getStoriesAndDomain(projectId, language, env);
=======
>>>>>>>
<<<<<<<
auditLog('Evaluated nlu data', {
user: Meteor.user(),
projectId,
type: 'execute',
operation: 'nlu-model-evaluate',
resId: projectId,
resType: 'nlu-model',
});
=======
>>>>>>>
auditLog('Evaluated nlu data', {
user: Meteor.user(),
projectId,
type: 'execute',
operation: 'nlu-model-evaluate',
resId: projectId,
resType: 'nlu-model',
}); |
<<<<<<<
slides = document.querySelectorAll('.slide'),
progress = document.querySelector('div.progress div'),
=======
slides = [],
progress = [],
slideList = [],
>>>>>>>
slides = [],
progress = [],
<<<<<<<
timing = 0,
isHistoryApiSupported = !!(window.history && history.pushState),
l = slides.length, i;
=======
isHistoryApiSupported = !!(window.history && history.pushState);
>>>>>>>
isHistoryApiSupported = !!(window.history && history.pushState); |
<<<<<<<
'config:context:dashboard',
'config:s3:access_key',
'config:s3:secret_key',
'config:s3:bucket_name',
'config:s3:path',
'config:s3:region'
=======
'config:context:dashboard',
'config:clip:render_height',
'config:clip:render_width',
'config:clip:render_timeout',
'config:clip:canvas_height',
'config:clip:canvas_width',
'config:clip:delay'
>>>>>>>
'config:context:dashboard',
'config:s3:access_key',
'config:s3:secret_key',
'config:s3:bucket_name',
'config:s3:path',
'config:s3:region'
'config:clip:render_height',
'config:clip:render_width',
'config:clip:render_timeout',
'config:clip:canvas_height',
'config:clip:canvas_width',
'config:clip:delay' |
<<<<<<<
var reqParse = url.parse(req.url);
var reqPath = reqParse.pathname;
var reqQuery = reqParse.search;
self.log("info", "Handling "+req.method+" on "+req.url);
=======
this.context = {};
this.context.http_headers = req.headers;
>>>>>>>
this.context = {};
this.context.http_headers = req.headers;
var reqParse = url.parse(req.url);
var reqPath = reqParse.pathname;
var reqQuery = reqParse.search;
self.log("info", "Handling "+req.method+" on "+req.url); |
<<<<<<<
TestUtils.renderIntoDocument(<LineChart />);
}).to.throw(Error);
=======
TestUtils.renderIntoDocument(
<LineChart />
);
}).to.throw(TypeError);
>>>>>>>
TestUtils.renderIntoDocument(
<LineChart />
);
}).to.throw(Error); |
<<<<<<<
const advancedFilters = ['eq', 'neq', 'gt', 'lt', 'gte', 'lte', 'like', 'ilike', 'is', 'in']
=======
const advancedFilters = [
'eq',
'gt',
'lt',
'gte',
'lte',
'like',
'ilike',
'is',
'in',
'not',
'cs',
'cd',
'ov',
'sl',
'sr',
'nxr',
'nxl',
'adj',
]
>>>>>>>
const advancedFilters = [
'eq',
'neq',
'gt',
'lt',
'gte',
'lte',
'like',
'ilike',
'is',
'in',
'cs',
'cd',
'ov',
'sl',
'sr',
'nxr',
'nxl',
'adj',
] |
<<<<<<<
import { checkIfCan } from '../roles/roles';
import { StoryGroups } from '../storyGroups/storyGroups.collection';
=======
>>>>>>>
import { checkIfCan } from '../roles/roles';
<<<<<<<
import { Deployments } from '../deployment/deployment.collection';
=======
import { getStoriesAndDomain } from '../../lib/story.utils';
>>>>>>>
import { Deployments } from '../deployment/deployment.collection';
import { getStoriesAndDomain } from '../../lib/story.utils'; |
<<<<<<<
var inFunction, inGenerator, inAsync, labels, strict,
inXJSChild, inXJSTag, inXJSChildExpression;
=======
var inFunction, inGenerator, labels, strict,
inXJSChild, inXJSTag;
>>>>>>>
var inFunction, inGenerator, inAsync, labels, strict,
inXJSChild, inXJSTag, inXJSChildExpression;
<<<<<<<
case 125: ++tokPos; return finishToken(_braceR, undefined, !inXJSChildExpression);
=======
case 125: ++tokPos; return finishToken(_braceR, undefined, !inXJSChild);
case 58: ++tokPos; return finishToken(_colon);
>>>>>>>
case 125: ++tokPos; return finishToken(_braceR, undefined, !inXJSChild); |
<<<<<<<
if (options.strictMode) {
strict = true;
}
isKeyword = options.ecmaVersion >= 6 ? isEcma6Keyword : isEcma5AndLessKeyword;
=======
if (options.ecmaVersion >= 7) {
isKeyword = isEcma7Keyword;
} else if (options.ecmaVersion === 6) {
isKeyword = isEcma6Keyword;
} else {
isKeyword = isEcma5AndLessKeyword;
}
>>>>>>>
if (options.strictMode) {
strict = true;
}
if (options.ecmaVersion >= 7) {
isKeyword = isEcma7Keyword;
} else if (options.ecmaVersion === 6) {
isKeyword = isEcma6Keyword;
} else {
isKeyword = isEcma5AndLessKeyword;
}
<<<<<<<
var inFunction, inGenerator, labels, strict,
inXJSChild, inXJSTag, inXJSChildExpression;
=======
var inFunction, inGenerator, inAsync, labels, strict;
>>>>>>>
var inFunction, inGenerator, inAsync, labels, strict,
inXJSChild, inXJSTag, inXJSChildExpression;
<<<<<<<
}
=======
}
if (options.ecmaVersion >= 7) {
node.async = isAsync;
}
>>>>>>>
}
if (options.ecmaVersion >= 7) {
node.async = isAsync;
}
<<<<<<<
=======
var oldInAsync = inAsync;
inAsync = node.async;
>>>>>>>
var oldInAsync = inAsync;
inAsync = node.async;
<<<<<<<
}
=======
}
var isAsync = false;
if (options.ecmaVersion >= 7) {
isAsync = eat(_async);
if (isAsync && tokType === _star) unexpected();
}
>>>>>>>
}
var isAsync = false;
if (options.ecmaVersion >= 7) {
isAsync = eat(_async);
if (isAsync && tokType === _star) unexpected();
} |
<<<<<<<
})(function (exports, module, _foo, _fooBar, _directoryFooBar) {
=======
})(function (exports, _foo, _fooBar, _directoryFooBar) {
"use strict";
>>>>>>>
})(function (exports, module, _foo, _fooBar, _directoryFooBar) {
"use strict"; |
<<<<<<<
var _ltSlash = {type: "</"};
=======
var _ellipsis = {type: "...", prefix: true, beforeExpr: true};
>>>>>>>
var _ellipsis = {type: "...", prefix: true, beforeExpr: true};
var _ltSlash = {type: "</"};
<<<<<<<
arrow: _arrow, bquote: _bquote, dollarBraceL: _dollarBraceL,
xjsName: _xjsName, xjsText: _xjsText};
=======
arrow: _arrow, bquote: _bquote, dollarBraceL: _dollarBraceL, star: _star,
assign: _assign};
>>>>>>>
arrow: _arrow, bquote: _bquote, dollarBraceL: _dollarBraceL, star: _star,
assign: _assign, xjsName: _xjsName, xjsText: _xjsText};
<<<<<<<
inTemplate = inXJSChild = inXJSTag = false;
skipSpace();
=======
inTemplate = false;
>>>>>>>
inTemplate = inXJSChild = inXJSTag = false;
<<<<<<<
case _num: case _string: case _regexp: case _xjsText:
=======
case _regexp:
var node = startNode();
node.regex = {pattern: tokVal.pattern, flags: tokVal.flags};
node.value = tokVal.value;
node.raw = input.slice(tokStart, tokEnd);
next();
return finishNode(node, "Literal");
case _num: case _string:
>>>>>>>
case _regexp:
var node = startNode();
node.regex = {pattern: tokVal.pattern, flags: tokVal.flags};
node.value = tokVal.value;
node.raw = input.slice(tokStart, tokEnd);
next();
return finishNode(node, "Literal");
case _num: case _string: case _xjsText: |
<<<<<<<
if (options.strictMode) {
strict = true;
}
isKeyword = options.ecmaVersion >= 6 ? isEcma6Keyword : isEcma5AndLessKeyword;
=======
if (options.ecmaVersion >= 7) {
isKeyword = isEcma7Keyword;
} else if (options.ecmaVersion === 6) {
isKeyword = isEcma6Keyword;
} else {
isKeyword = isEcma5AndLessKeyword;
}
>>>>>>>
if (options.strictMode) {
strict = true;
}
if (options.ecmaVersion >= 7) {
isKeyword = isEcma7Keyword;
} else if (options.ecmaVersion === 6) {
isKeyword = isEcma6Keyword;
} else {
isKeyword = isEcma5AndLessKeyword;
}
<<<<<<<
var inFunction, inGenerator, labels, strict,
inXJSChild, inXJSTag, inXJSChildExpression;
=======
var inFunction, inGenerator, inAsync, labels, strict;
>>>>>>>
var inFunction, inGenerator, inAsync, labels, strict,
inXJSChild, inXJSTag, inXJSChildExpression;
<<<<<<<
}
=======
}
if (options.ecmaVersion >= 7) {
node.async = isAsync;
}
>>>>>>>
}
if (options.ecmaVersion >= 7) {
node.async = isAsync;
}
<<<<<<<
=======
var oldInAsync = inAsync;
inAsync = node.async;
>>>>>>>
var oldInAsync = inAsync;
inAsync = node.async;
<<<<<<<
}
=======
}
var isAsync = false;
if (options.ecmaVersion >= 7) {
isAsync = eat(_async);
if (tokType === _star) unexpected();
}
>>>>>>>
}
var isAsync = false;
if (options.ecmaVersion >= 7) {
isAsync = eat(_async);
if (tokType === _star) unexpected();
} |
<<<<<<<
// remove consequenceless expressions such as local variables and literals
// note: will remove directives
=======
// remove consequence-less expressions such as local variables and literals
>>>>>>>
// remove consequence-less expressions such as local variables and literals
// note: will remove directives |
<<<<<<<
var driver = require("./driver.js");
require("./tests.js");
require("./tests-harmony.js");
require("./tests-jsx.js");
var testsRun = 0, failed = 0;
function report(state, code, message) {
if (state != "ok") {++failed; console.log(code, message);}
++testsRun;
}
var t0 = +new Date;
driver.runTests(report);
console.log(testsRun + " tests run in " + (+new Date - t0) + "ms");
if (failed) {
console.log(failed + " failures.");
process.stdout.write("", function() {
process.exit(1);
});
} else {
console.log("All passed.");
}
=======
(function() {
var driver;
if (typeof require !== "undefined") {
driver = require("./driver.js");
require("./tests.js");
require("./tests-harmony.js");
} else {
driver = window;
}
var htmlLog = typeof document === "object" && document.getElementById('log');
var htmlGroup = htmlLog;
function group(name) {
if (htmlGroup) {
var parentGroup = htmlGroup;
htmlGroup = document.createElement("ul");
var item = document.createElement("li");
item.textContent = name;
item.appendChild(htmlGroup);
parentGroup.appendChild(item);
}
if (typeof console === "object" && console.group) {
console.group(name);
}
}
function groupEnd() {
if (htmlGroup) {
htmlGroup = htmlGroup.parentElement.parentElement;
}
if (typeof console === "object" && console.groupEnd) {
console.groupEnd(name);
}
}
function log(title, message) {
if (htmlGroup) {
var elem = document.createElement("li");
elem.innerHTML = "<b>" + title + "</b> " + message;
htmlGroup.appendChild(elem);
}
if (typeof console === "object") console.log(title, message);
}
var stats, modes = {
Normal: {
config: {
parse: (typeof require === "undefined" ? window.acorn : require("../acorn.js")).parse
}
},
Loose: {
config: {
parse: (typeof require === "undefined" ? window.acorn : require("../acorn_loose")).parse_dammit,
loose: true,
filter: function (test) {
if (/`/.test(test.code)) return false; // FIXME remove this when the loose parse supports template strings
var opts = test.options || {};
if (opts.loose === false) return false;
return (opts.ecmaVersion || 5) <= 6;
}
}
}
};
function report(state, code, message) {
if (state != "ok") {++stats.failed; log(code, message);}
++stats.testsRun;
}
group("Errors");
for (var name in modes) {
group(name);
var mode = modes[name];
stats = mode.stats = {testsRun: 0, failed: 0};
var t0 = +new Date;
driver.runTests(mode.config, report);
mode.stats.duration = +new Date - t0;
groupEnd();
}
groupEnd();
function outputStats(name, stats) {
log(name + ":", stats.testsRun + " tests run in " + stats.duration + "ms; " +
(stats.failed ? stats.failed + " failures." : "all passed."));
}
var total = {testsRun: 0, failed: 0, duration: 0};
group("Stats");
for (var name in modes) {
var stats = modes[name].stats;
outputStats(name + " parser", stats);
for (var key in stats) total[key] += stats[key];
}
outputStats("Total", total);
groupEnd();
if (total.failed && typeof process === "object") {
process.stdout.write("", function() {
process.exit(1);
});
}
})();
>>>>>>>
(function() {
var driver;
if (typeof require !== "undefined") {
driver = require("./driver.js");
require("./tests.js");
require("./tests-harmony.js");
require("./tests-jsx.js");
} else {
driver = window;
}
var htmlLog = typeof document === "object" && document.getElementById('log');
var htmlGroup = htmlLog;
function group(name) {
if (htmlGroup) {
var parentGroup = htmlGroup;
htmlGroup = document.createElement("ul");
var item = document.createElement("li");
item.textContent = name;
item.appendChild(htmlGroup);
parentGroup.appendChild(item);
}
if (typeof console === "object" && console.group) {
console.group(name);
}
}
function groupEnd() {
if (htmlGroup) {
htmlGroup = htmlGroup.parentElement.parentElement;
}
if (typeof console === "object" && console.groupEnd) {
console.groupEnd(name);
}
}
function log(title, message) {
if (htmlGroup) {
var elem = document.createElement("li");
elem.innerHTML = "<b>" + title + "</b> " + message;
htmlGroup.appendChild(elem);
}
if (typeof console === "object") console.log(title, message);
}
var stats, modes = {
Normal: {
config: {
parse: (typeof require === "undefined" ? window.acorn : require("../acorn.js")).parse
}
},
Loose: {
config: {
parse: (typeof require === "undefined" ? window.acorn : require("../acorn_loose")).parse_dammit,
loose: true,
filter: function (test) {
if (/`/.test(test.code)) return false; // FIXME remove this when the loose parse supports template strings
var opts = test.options || {};
if (opts.loose === false) return false;
return (opts.ecmaVersion || 5) <= 6;
}
}
}
};
function report(state, code, message) {
if (state != "ok") {++stats.failed; log(code, message);}
++stats.testsRun;
}
group("Errors");
for (var name in modes) {
group(name);
var mode = modes[name];
stats = mode.stats = {testsRun: 0, failed: 0};
var t0 = +new Date;
driver.runTests(mode.config, report);
mode.stats.duration = +new Date - t0;
groupEnd();
}
groupEnd();
function outputStats(name, stats) {
log(name + ":", stats.testsRun + " tests run in " + stats.duration + "ms; " +
(stats.failed ? stats.failed + " failures." : "all passed."));
}
var total = {testsRun: 0, failed: 0, duration: 0};
group("Stats");
for (var name in modes) {
var stats = modes[name].stats;
outputStats(name + " parser", stats);
for (var key in stats) total[key] += stats[key];
}
outputStats("Total", total);
groupEnd();
if (total.failed && typeof process === "object") {
process.stdout.write("", function() {
process.exit(1);
});
}
})(); |
<<<<<<<
var q_tmpl = {token: "`", isExpr: true};
var j_oTag = {token: "<tag", isExpr: false}, j_cTag = {token: "</tag", isExpr: false}, j_expr = {token: "<tag>...</tag>", isExpr: true};
function curTokContext() {
return tokContext[tokContext.length - 1];
}
=======
var q_tmpl = {token: "`", isExpr: true}, f_expr = {token: "function", isExpr: true};
function curTokContext() {
return tokContext[tokContext.length - 1];
}
>>>>>>>
var q_tmpl = {token: "`", isExpr: true}, f_expr = {token: "function", isExpr: true};
var j_oTag = {token: "<tag", isExpr: false}, j_cTag = {token: "</tag", isExpr: false}, j_expr = {token: "<tag>...</tag>", isExpr: true};
function curTokContext() {
return tokContext[tokContext.length - 1];
}
<<<<<<<
return curTokContext() === b_stat;
if (prevType === _jsxTagEnd || prevType === _jsxText)
return true;
if (prevType === _jsxName)
return false;
=======
return curTokContext() === b_stat;
>>>>>>>
return curTokContext() === b_stat;
if (prevType === _jsxTagEnd || prevType === _jsxText)
return true;
if (prevType === _jsxName)
return false;
<<<<<<<
tokExprAllowed = !(out && out.isExpr);
preserveSpace = out === b_tmpl || curTokContext() === j_expr;
=======
if (out === b_tmpl) {
preserveSpace = true;
} else if (out === b_stat && curTokContext() === f_expr) {
tokContext.pop();
tokExprAllowed = false;
} else {
tokExprAllowed = !(out && out.isExpr);
}
>>>>>>>
if (out === b_tmpl) {
preserveSpace = true;
} else if (curTokContext() === j_expr) {
preserveSpace = tokExprAllowed = true;
} else if (out === b_stat && curTokContext() === f_expr) {
tokContext.pop();
tokExprAllowed = false;
} else {
tokExprAllowed = !(out && out.isExpr);
}
<<<<<<<
var context = curTokContext();
if (context === q_tmpl) {
=======
if (curTokContext() === q_tmpl) {
>>>>>>>
var context = curTokContext();
if (context === q_tmpl) {
<<<<<<<
var isJSX = curTokContext() === j_oTag;
++tokPos;
var out = "";
=======
var out = "", chunkStart = ++tokPos;
>>>>>>>
var isJSX = curTokContext() === j_oTag;
var out = "", chunkStart = ++tokPos; |
<<<<<<<
var oldParenL = ++metParenL;
if (tokType !== _parenR) {
val = parseExpression();
exprList = val.type === "SequenceExpression" ? val.expressions : [val];
} else {
exprList = [];
}
expect(_parenR);
// if '=>' follows '(...)', convert contents to arguments
if (metParenL === oldParenL && eat(_arrow)) {
val = parseArrowExpression(startNode(), exprList);
} else {
// forbid '()' before everything but '=>'
if (!val) unexpected(lastStart);
// forbid '...' in sequence expressions
if (options.ecmaVersion >= 6) {
for (var i = 0; i < exprList.length; i++) {
if (exprList[i].type === "SpreadElement") unexpected();
=======
var oldParenL = ++metParenL;
if (tokType !== _parenR) {
val = parseExpression();
exprList = val.type === "SequenceExpression" ? val.expressions : [val];
} else {
exprList = [];
}
expect(_parenR);
// if '=>' follows '(...)', convert contents to arguments
if (metParenL === oldParenL && eat(_arrow)) {
val = parseArrowExpression(startNodeAt(start), exprList);
} else {
// forbid '()' before everything but '=>'
if (!val) unexpected(lastStart);
// forbid '...' in sequence expressions
if (options.ecmaVersion >= 6) {
for (var i = 0; i < exprList.length; i++) {
if (exprList[i].type === "SpreadElement") unexpected();
}
>>>>>>>
var oldParenL = ++metParenL;
if (tokType !== _parenR) {
val = parseExpression();
exprList = val.type === "SequenceExpression" ? val.expressions : [val];
} else {
exprList = [];
}
expect(_parenR);
// if '=>' follows '(...)', convert contents to arguments
if (metParenL === oldParenL && eat(_arrow)) {
val = parseArrowExpression(startNodeAt(start), exprList);
} else {
// forbid '()' before everything but '=>'
if (!val) unexpected(lastStart);
// forbid '...' in sequence expressions
if (options.ecmaVersion >= 6) {
for (var i = 0; i < exprList.length; i++) {
if (exprList[i].type === "SpreadElement") unexpected();
}
<<<<<<<
}
val.start = tokStart1;
val.end = lastEnd;
if (options.locations) {
val.loc.start = tokStartLoc1;
val.loc.end = lastEndLoc;
}
if (options.ranges) {
val.range = [tokStart1, lastEnd];
}
=======
>>>>>>> |
<<<<<<<
var driver = require("./driver.js");
require("./tests.js");
require("./tests-harmony.js");
require("./tests-jsx.js");
var testsRun = 0, failed = 0;
function report(state, code, message) {
if (state != "ok") {++failed; console.log(code, message);}
++testsRun;
}
var t0 = +new Date;
driver.runTests(report);
console.log(testsRun + " tests run in " + (+new Date - t0) + "ms");
if (failed) {
console.log(failed + " failures.");
process.stdout.write("", function() {
process.exit(1);
});
} else {
console.log("All passed.");
}
=======
(function() {
var driver;
if (typeof require !== "undefined") {
driver = require("./driver.js");
require("./tests.js");
require("./tests-harmony.js");
} else {
driver = window;
}
var htmlLog = typeof document === "object" && document.getElementById('log');
var htmlGroup = htmlLog;
function group(name) {
if (htmlGroup) {
var parentGroup = htmlGroup;
htmlGroup = document.createElement("ul");
var item = document.createElement("li");
item.textContent = name;
item.appendChild(htmlGroup);
parentGroup.appendChild(item);
}
if (typeof console === "object" && console.group) {
console.group(name);
}
}
function groupEnd() {
if (htmlGroup) {
htmlGroup = htmlGroup.parentElement.parentElement;
}
if (typeof console === "object" && console.groupEnd) {
console.groupEnd(name);
}
}
function log(title, message) {
if (htmlGroup) {
var elem = document.createElement("li");
elem.innerHTML = "<b>" + title + "</b> " + message;
htmlGroup.appendChild(elem);
}
if (typeof console === "object") console.log(title, message);
}
var stats, modes = {
Normal: {
config: {
parse: (typeof require === "undefined" ? window.acorn : require("../acorn.js")).parse
}
},
Loose: {
config: {
parse: (typeof require === "undefined" ? window.acorn : require("../acorn_loose")).parse_dammit,
loose: true,
filter: function (test) {
if (/`/.test(test.code)) return false; // FIXME remove this when the loose parse supports template strings
var opts = test.options || {};
if (opts.loose === false) return false;
return (opts.ecmaVersion || 5) <= 6;
}
}
}
};
function report(state, code, message) {
if (state != "ok") {++stats.failed; log(code, message);}
++stats.testsRun;
}
group("Errors");
for (var name in modes) {
group(name);
var mode = modes[name];
stats = mode.stats = {testsRun: 0, failed: 0};
var t0 = +new Date;
driver.runTests(mode.config, report);
mode.stats.duration = +new Date - t0;
groupEnd();
}
groupEnd();
function outputStats(name, stats) {
log(name + ":", stats.testsRun + " tests run in " + stats.duration + "ms; " +
(stats.failed ? stats.failed + " failures." : "all passed."));
}
var total = {testsRun: 0, failed: 0, duration: 0};
group("Stats");
for (var name in modes) {
var stats = modes[name].stats;
outputStats(name + " parser", stats);
for (var key in stats) total[key] += stats[key];
}
outputStats("Total", total);
groupEnd();
if (total.failed && typeof process === "object") {
process.stdout.write("", function() {
process.exit(1);
});
}
})();
>>>>>>>
(function() {
var driver;
if (typeof require !== "undefined") {
driver = require("./driver.js");
require("./tests.js");
require("./tests-harmony.js");
require("./tests-jsx.js");
} else {
driver = window;
}
var htmlLog = typeof document === "object" && document.getElementById('log');
var htmlGroup = htmlLog;
function group(name) {
if (htmlGroup) {
var parentGroup = htmlGroup;
htmlGroup = document.createElement("ul");
var item = document.createElement("li");
item.textContent = name;
item.appendChild(htmlGroup);
parentGroup.appendChild(item);
}
if (typeof console === "object" && console.group) {
console.group(name);
}
}
function groupEnd() {
if (htmlGroup) {
htmlGroup = htmlGroup.parentElement.parentElement;
}
if (typeof console === "object" && console.groupEnd) {
console.groupEnd(name);
}
}
function log(title, message) {
if (htmlGroup) {
var elem = document.createElement("li");
elem.innerHTML = "<b>" + title + "</b> " + message;
htmlGroup.appendChild(elem);
}
if (typeof console === "object") console.log(title, message);
}
var stats, modes = {
Normal: {
config: {
parse: (typeof require === "undefined" ? window.acorn : require("../acorn.js")).parse
}
},
Loose: {
config: {
parse: (typeof require === "undefined" ? window.acorn : require("../acorn_loose")).parse_dammit,
loose: true,
filter: function (test) {
if (/`/.test(test.code)) return false; // FIXME remove this when the loose parse supports template strings
var opts = test.options || {};
if (opts.loose === false) return false;
return (opts.ecmaVersion || 5) <= 6;
}
}
}
};
function report(state, code, message) {
if (state != "ok") {++stats.failed; log(code, message);}
++stats.testsRun;
}
group("Errors");
for (var name in modes) {
group(name);
var mode = modes[name];
stats = mode.stats = {testsRun: 0, failed: 0};
var t0 = +new Date;
driver.runTests(mode.config, report);
mode.stats.duration = +new Date - t0;
groupEnd();
}
groupEnd();
function outputStats(name, stats) {
log(name + ":", stats.testsRun + " tests run in " + stats.duration + "ms; " +
(stats.failed ? stats.failed + " failures." : "all passed."));
}
var total = {testsRun: 0, failed: 0, duration: 0};
group("Stats");
for (var name in modes) {
var stats = modes[name].stats;
outputStats(name + " parser", stats);
for (var key in stats) total[key] += stats[key];
}
outputStats("Total", total);
groupEnd();
if (total.failed && typeof process === "object") {
process.stdout.write("", function() {
process.exit(1);
});
}
})(); |
<<<<<<<
if (options.locations) lastEndLoc = new Position;
inFunction = inGenerator = inAsync = strict = false;
=======
if (options.locations) lastEndLoc = curPosition();
inFunction = inGenerator = strict = false;
>>>>>>>
if (options.locations) lastEndLoc = new Position;
inFunction = inGenerator = inAsync = strict = false;
<<<<<<<
var _arrow = {type: "=>", beforeExpr: true}, _bquote = {type: "`"}, _dollarBraceL = {type: "${", beforeExpr: true};
var _ltSlash = {type: "</"};
=======
var _arrow = {type: "=>", beforeExpr: true}, _template = {type: "template"}, _templateContinued = {type: "templateContinued"};
>>>>>>>
var _arrow = {type: "=>", beforeExpr: true}, _bquote = {type: "`"}, _dollarBraceL = {type: "${", beforeExpr: true};
var _ltSlash = {type: "</"};
var _arrow = {type: "=>", beforeExpr: true}, _template = {type: "template"}, _templateContinued = {type: "templateContinued"};
<<<<<<<
arrow: _arrow, bquote: _bquote, dollarBraceL: _dollarBraceL, star: _star,
assign: _assign, xjsName: _xjsName, xjsText: _xjsText,
paamayimNekudotayim: _paamayimNekudotayim, exponent: _exponent, at: _at,
hash: _hash};
=======
arrow: _arrow, template: _template, templateContinued: _templateContinued, star: _star,
assign: _assign};
>>>>>>>
arrow: _arrow, bquote: _bquote, dollarBraceL: _dollarBraceL, star: _star,
assign: _assign, xjsName: _xjsName, xjsText: _xjsText,
paamayimNekudotayim: _paamayimNekudotayim, exponent: _exponent, at: _at, hash: _hash,
template: _template, templateContinued: _templateContinued};
<<<<<<<
inTemplate = inType = inXJSChild = inXJSTag = false;
=======
templates = [];
if (tokPos === 0 && options.allowHashBang && input.slice(0, 2) === '#!') {
skipLineComment(2);
}
>>>>>>>
inType = inXJSChild = inXJSTag = false;
templates = [];
if (tokPos === 0 && options.allowHashBang && input.slice(0, 2) === '#!') {
skipLineComment(2);
}
<<<<<<<
// Get token inside ES6 template (special rules work there).
function getTemplateToken(code) {
// '`' and '${' have special meanings, but they should follow
// string (can be empty)
if (tokType === _string) {
if (code === 96) { // '`'
++tokPos;
return finishToken(_bquote);
} else if (code === 36 && input.charCodeAt(tokPos + 1) === 123) { // '${'
tokPos += 2;
return finishToken(_dollarBraceL);
}
}
// anything else is considered string literal
return readTmplString();
}
=======
>>>>>>>
// Get token inside ES6 template (special rules work there).
function getTemplateToken(code) {
// '`' and '${' have special meanings, but they should follow
// string (can be empty)
if (tokType === _string) {
if (code === 96) { // '`'
++tokPos;
return finishToken(_bquote);
} else if (code === 36 && input.charCodeAt(tokPos + 1) === 123) { // '${'
tokPos += 2;
return finishToken(_dollarBraceL);
}
}
// anything else is considered string literal
return readTmplString();
}
<<<<<<<
case 123: ++tokPos; return finishToken(_braceL);
case 125: ++tokPos; return finishToken(_braceR, undefined, !inXJSChild);
=======
case 123:
++tokPos;
if (templates.length) ++templates[templates.length - 1];
return finishToken(_braceL);
case 125:
++tokPos;
if (templates.length && --templates[templates.length - 1] === 0)
return readTemplateString(_templateContinued);
else
return finishToken(_braceR);
case 58: ++tokPos; return finishToken(_colon);
>>>>>>>
case 123:
++tokPos;
if (templates.length) ++templates[templates.length - 1];
return finishToken(_braceL);
case 125:
++tokPos;
if (templates.length && --templates[templates.length - 1] === 0)
return readTemplateString(_templateContinued);
else
return finishToken(_braceR);
<<<<<<<
// JSX content - either simple text, start of <tag> or {expression}
if (inXJSChild && tokType !== _braceL && code !== 60 && code !== 123 && code !== 125) {
return readXJSText(['<', '{']);
}
if (inTemplate) return getTemplateToken(code);
=======
>>>>>>>
// JSX content - either simple text, start of <tag> or {expression}
if (inXJSChild && tokType !== _braceL && code !== 60 && code !== 123 && code !== 125) {
return readXJSText(['<', '{']);
}
<<<<<<<
if (newline.test(String.fromCharCode(ch))) {
if (ch === 13 && input.charCodeAt(tokPos) === 10) {
++tokPos;
ch = 10;
}
if (options.locations) {
++tokCurLine;
tokLineStart = tokPos;
}
}
out += String.fromCharCode(ch); // '\'
=======
if (newline.test(ch)) {
if (ch === "\r" && input.charCodeAt(tokPos) === 10) {
++tokPos;
ch = "\n";
}
if (options.locations) {
++tokCurLine;
tokLineStart = tokPos;
}
}
out += ch;
>>>>>>>
if (newline.test(ch)) {
if (ch === "\r" && input.charCodeAt(tokPos) === 10) {
++tokPos;
ch = "\n";
}
if (options.locations) {
++tokCurLine;
tokLineStart = tokPos;
}
}
out += ch;
<<<<<<<
if (options.ecmaVersion >= 6) {
eat(_semi);
} else {
semicolon();
}
=======
if (options.ecmaVersion >= 6)
eat(_semi);
else
semicolon();
>>>>>>>
if (options.ecmaVersion >= 6)
eat(_semi);
else
semicolon(); |
<<<<<<<
t.ensureBlock(node);
node.body.body.unshift(util.template(templateName, {
=======
util.ensureBlock(node);
var template = util.template(templateName, {
>>>>>>>
t.ensureBlock(node);
var template = util.template(templateName, { |
<<<<<<<
case _num: case _string: case _regexp: case _xjsText:
=======
case _regexp:
var node = startNode();
node.regex = {pattern: tokVal.pattern, flags: tokVal.flags};
node.value = tokVal.value;
node.raw = input.slice(tokStart, tokEnd);
next();
return finishNode(node, "Literal");
case _num: case _string:
>>>>>>>
case _regexp:
var node = startNode();
node.regex = {pattern: tokVal.pattern, flags: tokVal.flags};
node.value = tokVal.value;
node.raw = input.slice(tokStart, tokEnd);
next();
return finishNode(node, "Literal");
case _num: case _string: case _xjsText: |
<<<<<<<
fs.readdirSync(fixtureLoc).forEach(testName => {
=======
fs.readdirSync(fixtureLoc).forEach((testName) => {
if (testName.slice(0, 1) === ".") return;
>>>>>>>
fs.readdirSync(fixtureLoc).forEach(testName => {
if (testName.slice(0, 1) === ".") return; |
<<<<<<<
node.value = -this.state.value;
this.addExtra(node, "rawValue", node.value);
this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
this.next();
return this.finishNode(node, "NumberLiteralTypeAnnotation");
=======
return this.parseLiteral(-this.state.value, "NumericLiteralTypeAnnotation", node.start, node.loc.start);
>>>>>>>
return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start);
<<<<<<<
node.value = this.state.value;
this.addExtra(node, "rawValue", node.value);
this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
this.next();
return this.finishNode(node, "NumberLiteralTypeAnnotation");
=======
return this.parseLiteral(this.state.value, "NumericLiteralTypeAnnotation");
>>>>>>>
return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); |
<<<<<<<
query retreiveConversations($projectId: String!,$skip: Int, $limit: Int, $env: String) {
conversations(projectId: $projectId, skip: $skip, limit: $limit, status: ["new", "read", "flagged"], sort: updatedAt_DESC, env: $env) {
_id
updatedAt
status
projectId
=======
query retreiveConversations($projectId: String!,$page: Int!, $pageSize: Int) {
conversationsPage(projectId: $projectId, page: $page, pageSize: $pageSize, status: ["new", "read", "flagged"], sort: updatedAt_DESC) {
conversations{
_id
updatedAt
status
projectId
}
pages
>>>>>>>
query retreiveConversations($projectId: String!,$page: Int!, $pageSize: Int, $env: String) {
conversationsPage(projectId: $projectId, page: $page, pageSize: $pageSize, status: ["new", "read", "flagged"], sort: updatedAt_DESC, env: $env) {
conversations{
_id
updatedAt
status
projectId
}
pages |
<<<<<<<
t.ensureBlock(node.value);
=======
console.error("Object getter memoization is deprecated and will be removed in 5.0.0");
var value = node.value;
t.ensureBlock(value);
>>>>>>>
console.error("Object getter memoization is deprecated and will be removed in 5.0.0");
t.ensureBlock(node.value); |
<<<<<<<
version: '0.6.25',
=======
version: '0.7.1',
>>>>>>>
version: '0.7.1',
<<<<<<<
=======
//container.append("path").datum(graticule.outline).attr("class", "outline");
setClip(proj.clip);
>>>>>>>
setClip(proj.clip);
<<<<<<<
//Background
setClip(proj.clip);
container.append("path").datum(graticule.outline).attr("class", "outline");
container.append("path").datum(circle).attr("class", "horizon");
container.append("path").datum(daylight).attr("class", "daylight");
=======
//Background
container.append("path").datum(graticule.outline).attr("class", "outline");
>>>>>>>
//Background
setClip(proj.clip);
container.append("path").datum(graticule.outline).attr("class", "outline");
container.append("path").datum(circle).attr("class", "horizon");
container.append("path").datum(daylight).attr("class", "daylight");
<<<<<<<
redraw();
=======
redraw();
});
d3.json(path + "starnames.json", function(error, json) {
if (error) return console.warn(error);
Object.assign(starnames, json);
/*container.selectAll(".starnames")
.data(st.features)
.enter().append("path")
.attr("class", "starname");*/
>>>>>>>
redraw();
});
d3.json(path + "starnames.json", function(error, json) {
if (error) return console.warn(error);
Object.assign(starnames, json);
/*container.selectAll(".starnames")
.data(st.features)
.enter().append("path")
.attr("class", "starname");*/ |
<<<<<<<
=======
if (typeof self.background !== 'undefined') {
coverCanvas.getContext('2d').drawImage(bgCanvas, 0, 0);
}
coverCanvas.getContext('2d').drawImage(coverImage, padding, padding, imageSize - padding * 2, imageSize - padding * 2);
>>>>>>> |
<<<<<<<
actionLoadEvergreen
=======
actionLoadEvergreen,
actionLoadWatchdog,
setAnnounceOptOut,
setAllowEnriched
>>>>>>>
actionLoadEvergreen,
setAnnounceOptOut,
setAllowEnriched
<<<<<<<
loadEvergreen: () => dispatch(actionLoadEvergreen(ownProps.t))
=======
loadEvergreen: (announceOptOut) => dispatch(actionLoadEvergreen(announceOptOut, ownProps.t)),
loadWatchdog: () => dispatch(actionLoadWatchdog(ownProps.t)),
setAnnounceOptOut: (announceOptOut) => dispatch(setAnnounceOptOut(announceOptOut)),
setAllowEnriched: (allowEnriched) => dispatch(setAllowEnriched(allowEnriched))
>>>>>>>
loadEvergreen: (announceOptOut) => dispatch(actionLoadEvergreen(announceOptOut, ownProps.t)),
setAnnounceOptOut: (announceOptOut) => dispatch(setAnnounceOptOut(announceOptOut)),
setAllowEnriched: (allowEnriched) => dispatch(setAllowEnriched(allowEnriched)) |
<<<<<<<
path: '/finder',
component: 'src/containers/FinderRedirect'
},
{
path: '/find',
component: 'src/containers/FinderRedirect'
},
{
path: '/team',
component: 'src/containers/Team'
},
{
path: '/start',
component: 'src/containers/Start'
},
{
=======
>>>>>>> |
<<<<<<<
cy.dataCy('toggle-md').click({ force: true });
=======
cy.dataCy('intro-story-group').click({ force: true });
>>>>>>>
cy.dataCy('toggle-md').click({ force: true });
cy.dataCy('intro-story-group').click({ force: true }); |
<<<<<<<
=======
this.emitHostDidDisconnect()
this.notificationManager.addInfo('Portal closed', {
description: 'Your host stopped sharing their editor.',
dismissable: true
})
>>>>>>>
this.emitHostDidDisconnect() |
<<<<<<<
$.div({className: 'HostPortalComponent-status'},
$.div({className: 'PortalParticipants'},
this.renderParticipants(),
$.button({className: 'btn PortalParticipants-guests-add'})
),
$.div({className: 'HostPortalComponent-share-toggle'},
$.label(null,
'Share ',
$.input({
className: 'input-toggle',
type: 'checkbox',
onClick: this.toggleShare,
checked: isSharing
})
)
)
=======
$.div({className: 'HostPortalComponent-participants'},
// TODO: extract participants component
this.renderParticipants(),
$.button({className: 'btn HostPortalComponent-guests-add'})
>>>>>>>
$.div({className: 'HostPortalComponent-status'},
$.div({className: 'PortalParticipants'},
// TODO: extract participants component
this.renderParticipants(),
$.button({className: 'btn PortalParticipants-guests-add'})
),
$.div({className: 'HostPortalComponent-share-toggle'},
$.label(null,
'Share ',
$.input({
className: 'input-toggle',
type: 'checkbox',
onClick: this.toggleShare,
checked: isSharing
})
)
)
<<<<<<<
{className: 'PortalParticipants-participant PortalParticipants-site-1'},
$.img({src: 'https://github.com/jasonrudolph.png'})
=======
{className: 'HostPortalComponent-participant HostPortalComponent-site-1'},
$.img({src: `https://github.com/${login}.png`})
>>>>>>>
{className: 'PortalParticipants-participant PortalParticipants-site-1'},
$.img({src: `https://github.com/${login}.png`}) |
<<<<<<<
this.sharedEditorsByEditor = null
=======
this.sharedEditorsByEditor = new WeakMap()
this.statusBarTilesByPortalId = new Map()
>>>>>>>
this.sharedEditorsByEditor = null
this.statusBarTilesByPortalId = new Map()
<<<<<<<
this.hostPortalDisposables.add(activeTextEditorDisposable)
this.hostPortalDisposables.add(closePortalCommandDisposable)
this.clipboard.write(this.hostPortal.id)
=======
this.addStatusBarIndicatorForPortal(portal, {isHost: true})
this.clipboard.write(portal.id)
>>>>>>>
this.hostPortalDisposables.add(activeTextEditorDisposable)
this.hostPortalDisposables.add(closePortalCommandDisposable)
this.addStatusBarIndicatorForPortal(this.hostPortal, {isHost: true})
this.clipboard.write(this.hostPortal.id) |
<<<<<<<
const normalizeURI = require('./normalize-uri')
const path = require('path')
=======
const NOOP = () => {}
>>>>>>>
const normalizeURI = require('./normalize-uri')
const path = require('path')
const NOOP = () => {}
<<<<<<<
if (this.editorBindingsByEditorProxyId.size === 0) {
=======
this.shouldRelayActiveEditorChanges = true
if (this.editorBindingsByEditorProxy.size === 0) {
>>>>>>>
this.shouldRelayActiveEditorChanges = true
if (this.editorBindingsByEditorProxyId.size === 0) {
<<<<<<<
this.editorBindingsByEditorProxyId.forEach((binding) => {
binding.editor.destroy()
})
=======
>>>>>>> |
<<<<<<<
if (target === this.FRAMEBUFFER) {
const gl = GlobalContext.proxyContext;
this.state.framebuffer[gl.READ_FRAMEBUFFER] = fbo;
this.state.framebuffer[gl.DRAW_FRAMEBUFFER] = fbo;
=======
const gl = GlobalContext.proxyContext;
if (hasWebGL2 && target === gl.FRAMEBUFFER) {
this.state.framebuffer[gl.READ_FRAMEBUFFER] = fbo;
this.state.framebuffer[gl.DRAW_FRAMEBUFFER] = fbo;
>>>>>>>
if (hasWebGL2 && target === this.FRAMEBUFFER) {
const gl = GlobalContext.proxyContext;
this.state.framebuffer[gl.READ_FRAMEBUFFER] = fbo;
this.state.framebuffer[gl.DRAW_FRAMEBUFFER] = fbo; |
<<<<<<<
checkboxText='React Native'
=======
checkboxText="React Native"
extensions={null}
>>>>>>>
checkboxText='React Native'
extensions={null} |
<<<<<<<
getTransformedValue: Function
}
=======
getTransformedValue: Function,
extensions: ?(string[])
};
>>>>>>>
getTransformedValue: Function,
extensions: ?(string[])
}
<<<<<<<
fetchButtonText: 'Fetch JSON from URL'
}
=======
fetchButtonText: "Fetch JSON from URL",
extensions: [".json"]
};
>>>>>>>
fetchButtonText: 'Fetch JSON from URL',
extensions: ['.json']
}
<<<<<<<
render () {
=======
loadFile = e => {
const file = e.target.files[0];
const reader = new FileReader();
reader.readAsText(file, "utf-8");
reader.onload = () => {
this.onChange(reader.result);
};
};
render() {
>>>>>>>
loadFile = e => {
const file = e.target.files[0]
const reader = new FileReader()
reader.readAsText(file, 'utf-8')
reader.onload = () => {
this.onChange(reader.result)
}
}
render () {
<<<<<<<
fetchButtonText
} = this.props
const { infoType, resultValue, value, info, splitValue } = this.state
=======
fetchButtonText,
extensions
} = this.props;
const { infoType, resultValue, value, info, splitValue } = this.state;
>>>>>>>
fetchButtonText,
extensions
} = this.props
const { infoType, resultValue, value, info, splitValue } = this.state
<<<<<<<
<div className='panel'>
<div className='header'>
<h4 className='title'>{leftTitle}</h4>
{leftMode === 'json' &&
showFetchButton && (
<button className='btn' onClick={this.fetchJSON}>
{fetchButtonText}
</button>
)}
=======
<div className="panel">
<div className="header">
<h4 className="title">{leftTitle}</h4>
{leftMode === "json" &&
showFetchButton && (
<button className="btn" onClick={this.fetchJSON}>
{fetchButtonText}
</button>
)}
>>>>>>>
<div className='panel'>
<div className='header'>
<h4 className='title'>{leftTitle}</h4>
{leftMode === 'json' &&
showFetchButton && (
<button className='btn' onClick={this.fetchJSON}>
{fetchButtonText}
</button>
)}
<<<<<<<
isBrowser && (
<div className='panel'>
<div className='header'>
<h4 className='title'>{splitTitle}</h4>
{prettierParsers[splitMode] && (
<button
className={this.getPrettifyClass()}
onClick={this.prettifySplitCode}
>
Prettify
</button>
)}
=======
isBrowser && (
<div className="panel">
<div className="header">
<h4 className="title">{splitTitle}</h4>
{prettierParsers[splitMode] && (
<button
className={this.getPrettifyClass()}
onClick={this.prettifySplitCode}
>
Prettify
</button>
)}
</div>
<CodeMirror
onChange={(editor, metadata, value) =>
this.onChange(this.state.value, value)}
value={splitValue}
options={{
mode: modeMapping[splitMode] || splitMode,
...codeMirrorOptions
}}
/>
>>>>>>>
isBrowser && (
<div className='panel'>
<div className='header'>
<h4 className='title'>{splitTitle}</h4>
{prettierParsers[splitMode] && (
<button
className={this.getPrettifyClass()}
onClick={this.prettifySplitCode}
>
Prettify
</button>
)} |
<<<<<<<
switch (current.jsonData.insertType) {
case 'html':
$(current.target).html(insertContent.toString());
break;
default:
eval("$(current.target).{0}(insertContent.toString())".f(current.jsonData.insertType));
}
var target = current.target;
=======
eval("$(current.target).{0}(insertContent.toString())".f(current.jsonData.insertType));
>>>>>>>
switch (current.jsonData.insertType) {
case 'html':
$(current.target).html(insertContent.toString());
break;
default:
eval("$(current.target).{0}(insertContent.toString())".f(current.jsonData.insertType));
var target = current.target; |
<<<<<<<
getScopeParam(scope) {
if (scope === undefined) {
return null;
}
if (Array.isArray(scope)) {
return {
scope: scope.join(' '),
};
}
return {
scope,
};
},
=======
/**
* Encode a single {value} using the application/x-www-form-urlencoded media type
* while also applying some additional rules specified by the spec
*
* @see https://tools.ietf.org/html/rfc6749#appendix-B
*
* @param {String} value
*/
>>>>>>>
getScopeParam(scope) {
if (scope === undefined) {
return null;
}
if (Array.isArray(scope)) {
return {
scope: scope.join(' '),
};
}
return {
scope,
};
},
/**
* Encode a single {value} using the application/x-www-form-urlencoded media type
* while also applying some additional rules specified by the spec
*
* @see https://tools.ietf.org/html/rfc6749#appendix-B
*
* @param {String} value
*/ |
<<<<<<<
// FIXME: We should check for errors here?
// Perform backward tick on rounds
// WARNING: DB_WRITE
modules.rounds.backwardTick(oldLastBlock, previousBlock, function () {
// Delete last block from blockchain
// WARNING: Db_WRITE
=======
if (err) {
// Fatal error, memory tables will be inconsistent
library.logger.error('Failed to undo transactions', err);
return process.exit(0);
}
modules.rounds.backwardTick(oldLastBlock, previousBlock, function (err) {
if (err) {
// Fatal error, memory tables will be inconsistent
library.logger.error('Failed to perform backwards tick', err);
return process.exit(0);
}
>>>>>>>
if (err) {
// Fatal error, memory tables will be inconsistent
library.logger.error('Failed to undo transactions', err);
return process.exit(0);
}
// Perform backward tick on rounds
// WARNING: DB_WRITE
modules.rounds.backwardTick(oldLastBlock, previousBlock, function (err) {
if (err) {
// Fatal error, memory tables will be inconsistent
library.logger.error('Failed to perform backwards tick', err);
return process.exit(0);
}
// Delete last block from blockchain
// WARNING: Db_WRITE
<<<<<<<
// When client is not loaded, is syncing or round is ticking
// Do not receive new blocks as client is not ready
if (!__private.loaded || modules.loader.syncing() || modules.rounds.ticking()) {
library.logger.debug('Client not ready to receive block', block.id);
return;
}
// Execute in sequence via sequence
=======
>>>>>>>
// Execute in sequence via sequence
<<<<<<<
// Initial check if new block looks fine
=======
// When client is not loaded, is syncing or round is ticking
// Do not receive new blocks as client is not ready
if (!__private.loaded || modules.loader.syncing() || modules.rounds.ticking()) {
library.logger.debug('Client not ready to receive block', block.id);
return setImmediate(cb);
}
>>>>>>>
// When client is not loaded, is syncing or round is ticking
// Do not receive new blocks as client is not ready
if (!__private.loaded || modules.loader.syncing() || modules.rounds.ticking()) {
library.logger.debug('Client not ready to receive block', block.id);
return setImmediate(cb);
} |
<<<<<<<
blocksModule.lastBlock.set(previousBlockArgs);
var newBlock = blockLogic.create({
=======
blocksModule.lastBlock.set(previousBlock);
const newBlock = blockLogic.create({
>>>>>>>
blocksModule.lastBlock.set(previousBlockArgs);
const newBlock = blockLogic.create({
<<<<<<<
var auxPreviousBlock = validBlock.previousBlock;
=======
const previousBlock = validBlock.previousBlock;
>>>>>>>
const auxPreviousBlock = validBlock.previousBlock;
<<<<<<<
var auxBlock;
=======
let block2;
>>>>>>>
let auxBlock; |
<<<<<<<
const Rounds = rewire(
'../../../../../../src/modules/chain/submodules/rounds.js'
);
const Round = rewire('../../../../../../src/modules/chain/logic/round.js'); // eslint-disable-line no-unused-vars
=======
const Rounds = rewire('../../../../../../src/modules/chain/submodules/rounds');
const Round = rewire('../../../../../../src/modules/chain/logic/round'); // eslint-disable-line no-unused-vars
>>>>>>>
const Rounds = rewire('../../../../../../src/modules/chain/submodules/rounds');
const Round = rewire('../../../../../../src/modules/chain/logic/round'); // eslint-disable-line no-unused-vars
<<<<<<<
=======
const { NORMALIZER, TRANSACTION_TYPES } = global.constants;
>>>>>>>
<<<<<<<
=======
describe('__private.updateRecipientsRoundInformationWithAmountForTransactions', () => {
let updateRecipientsRoundInformationWithAmountForTransactions;
let createRoundInformationWithAmountStub;
const account = random.account();
const transactionAmount = (NORMALIZER * 1000).toString();
const transferTransaction = liskTransactions.transfer({
amount: transactionAmount,
recipientId: account.address,
passphrase: accountFixtures.genesis.passphrase,
});
const dappAuthorId = random.account().address;
// In transfer and out transfer transactions cannot be generated by lisk-elements. So, creating dummy objects with only required properites.
const dummyInTransferTransaction = {
amount: transactionAmount,
type: TRANSACTION_TYPES.IN_TRANSFER,
asset: {
inTransfer: {
dappId: '123',
},
},
};
const dummyOutTransferTransaction = {
type: TRANSACTION_TYPES.OUT_TRANSFER,
amount: transactionAmount,
recipientId: random.account().address,
};
beforeEach(async () => {
updateRecipientsRoundInformationWithAmountForTransactions = get(
'__private.updateRecipientsRoundInformationWithAmountForTransactions'
);
createRoundInformationWithAmountStub = sinon.stub(
Rounds.prototype,
'createRoundInformationWithAmount'
);
storageStubs.Transaction.getOne.resolves({ senderId: dappAuthorId });
});
it('should call createRoundInformationWithAmount with negative value when forwardTick is set to true for in transfer transaction', async () => {
await updateRecipientsRoundInformationWithAmountForTransactions(
1,
[dummyInTransferTransaction],
true,
null
);
expect(createRoundInformationWithAmountStub).to.be.calledWithExactly(
dappAuthorId,
1,
`${transactionAmount}`,
null
);
});
it('should call createRoundInformationWithAmount with negative value when forwardTick is set to true for out transfer transaction', async () => {
await updateRecipientsRoundInformationWithAmountForTransactions(
1,
[dummyOutTransferTransaction],
true,
null
);
expect(createRoundInformationWithAmountStub).to.be.calledWithExactly(
dummyOutTransferTransaction.recipientId,
1,
`${transactionAmount}`,
null
);
});
it('should call createRoundInformationWithAmount with negative value when forwardTick is set to true for transfer transaction', async () => {
await updateRecipientsRoundInformationWithAmountForTransactions(
1,
[transferTransaction],
true,
null
);
expect(createRoundInformationWithAmountStub).to.be.calledWithExactly(
transferTransaction.recipientId,
1,
`${transactionAmount}`,
null
);
});
it('should call createRoundInformationWithAmount with negative value when forwardTick is set to true for in transfer, out transfer and transfer transactions', async () => {
await updateRecipientsRoundInformationWithAmountForTransactions(
1,
[
dummyInTransferTransaction,
dummyOutTransferTransaction,
transferTransaction,
],
true,
null
);
expect(createRoundInformationWithAmountStub).to.be.calledWith(
dappAuthorId,
1,
`${transactionAmount}`,
null
);
expect(createRoundInformationWithAmountStub).to.be.calledWith(
dummyOutTransferTransaction.recipientId,
1,
`${transactionAmount}`,
null
);
expect(createRoundInformationWithAmountStub).to.be.calledWith(
transferTransaction.recipientId,
1,
`${transactionAmount}`,
null
);
});
it('should call createRoundInformationWithAmount with positive value when forwardTick is set to false for in transfer, out transfer and transfer transactions', async () => {
await updateRecipientsRoundInformationWithAmountForTransactions(
1,
[
dummyInTransferTransaction,
dummyOutTransferTransaction,
transferTransaction,
],
false,
null
);
expect(createRoundInformationWithAmountStub).to.be.calledWith(
dappAuthorId,
1,
`-${transactionAmount}`,
null
);
expect(createRoundInformationWithAmountStub).to.be.calledWith(
dummyOutTransferTransaction.recipientId,
1,
`-${transactionAmount}`,
null
);
expect(createRoundInformationWithAmountStub).to.be.calledWith(
transferTransaction.recipientId,
1,
`-${transactionAmount}`,
null
);
});
});
describe('__private.updateSendersRoundInformationWithAmountForTransactions', () => {
let updateSendersRoundInformationWithAmountForTransactions;
let createRoundInformationWithAmountStub;
const account = random.account();
const transactionAmount = (NORMALIZER * 1000).toString();
const transaction = liskTransactions.transfer({
amount: transactionAmount,
recipientId: account.address,
passphrase: accountFixtures.genesis.passphrase,
});
const amountDeductedFromSenderAccount = (
NORMALIZER * 1000 +
NORMALIZER * 0.1
).toString();
beforeEach(async () => {
updateSendersRoundInformationWithAmountForTransactions = get(
'__private.updateSendersRoundInformationWithAmountForTransactions'
);
createRoundInformationWithAmountStub = sinon.stub(
Rounds.prototype,
'createRoundInformationWithAmount'
);
});
it('should call createRoundInformationWithAmount with negative value when forwardTick is set to true', async () => {
await updateSendersRoundInformationWithAmountForTransactions(
1,
[transaction],
true,
null
);
expect(createRoundInformationWithAmountStub).to.be.calledWithExactly(
transaction.senderId,
1,
`-${amountDeductedFromSenderAccount}`,
null
);
});
it('should call createRoundInformationWithAmount with positive value when forwardTick is set to false', async () => {
await updateSendersRoundInformationWithAmountForTransactions(
1,
[transaction],
false,
null
);
expect(createRoundInformationWithAmountStub).to.be.calledWithExactly(
transaction.senderId,
1,
`${amountDeductedFromSenderAccount}`,
null
);
});
});
describe('__private.updateRoundInformationWithDelegatesForTransactions', () => {
let updateRoundInformationWithDelegatesForTransactions;
let createRoundInformationWithDelegateStub;
const account = random.account();
const unvote = `${accountFixtures.existingDelegate.publicKey}`;
const vote = `${account.publicKey}`;
const transaction = liskTransactions.castVotes({
passphrase: account.passphrase,
votes: [vote],
unvotes: [unvote],
});
beforeEach(async () => {
updateRoundInformationWithDelegatesForTransactions = get(
'__private.updateRoundInformationWithDelegatesForTransactions'
);
createRoundInformationWithDelegateStub = sinon.stub(
Rounds.prototype,
'createRoundInformationWithDelegate'
);
});
it('should call createRoundInformationWithAmount with casted votes when forwardTick is set to true', async () => {
await updateRoundInformationWithDelegatesForTransactions(
1,
[transaction],
true,
null
);
expect(createRoundInformationWithDelegateStub).to.be.calledWith(
transaction.senderId,
1,
vote,
'+',
null
);
expect(createRoundInformationWithDelegateStub).to.be.calledWith(
transaction.senderId,
1,
unvote,
'-',
null
);
});
it('should call createRoundInformationWithAmount with opposite votes when forwardTick is set to false', async () => {
await updateRoundInformationWithDelegatesForTransactions(
1,
[transaction],
false,
null
);
expect(createRoundInformationWithDelegateStub).to.be.calledWith(
transaction.senderId,
1,
vote,
'-',
null
);
expect(createRoundInformationWithDelegateStub).to.be.calledWith(
transaction.senderId,
1,
unvote,
'+',
null
);
});
});
>>>>>>> |
<<<<<<<
transactionPool: scope.modules.transactionPool,
delegates: scope.modules.delegates,
=======
transactions: scope.modules.transactions,
rounds: scope.modules.rounds,
>>>>>>>
transactionPool: scope.modules.transactionPool,
rounds: scope.modules.rounds, |
<<<<<<<
return setImmediate(cb, null);
})
.catch(reason => {
modules.blocks.isActive.set(false);
block = null;
return setImmediate(cb, reason);
});
});
=======
return setImmediate(cb, null);
})
.catch(reason => {
modules.blocks.isActive.set(false);
block = null;
// Finish here if snapshotting.
// FIXME: Not the best place to do that
if (reason.name === 'Snapshot finished') {
library.logger.info(reason);
process.emit('SIGTERM');
}
return setImmediate(cb, reason);
});
>>>>>>>
return setImmediate(cb, null);
})
.catch(reason => {
modules.blocks.isActive.set(false);
block = null;
return setImmediate(cb, reason);
}); |
<<<<<<<
import { Roles } from 'meteor/modweb:roles';
import { sortBy } from 'lodash';
=======
import { sortBy, isEqual } from 'lodash';
import { safeDump, safeLoad } from 'js-yaml';
>>>>>>>
import { Roles } from 'meteor/modweb:roles';
import { sortBy, isEqual } from 'lodash';
import { safeDump, safeLoad } from 'js-yaml'; |
<<<<<<<
expect(_.map(res.body.data.votes, 'balance').sort()).to.to.be.eql(_.map(res.body.data.votes, 'balance'));
}));
=======
expect(_(res.body.data.votes).map('balance').sortNumbers()).to.be.eql(_.map(res.body.data.votes, 'balance'));
});
});
>>>>>>>
expect(_(res.body.data.votes).map('balance').sortNumbers()).to.be.eql(_.map(res.body.data.votes, 'balance'));
}));
<<<<<<<
expect(_.map(res.body.data.votes, 'balance').sort().reverse()).to.to.be.eql(_.map(res.body.data.votes, 'balance'));
}));
=======
expect(_(res.body.data.votes).map('balance').sortNumbers('desc')).to.to.be.eql(_.map(res.body.data.votes, 'balance'));
});
});
>>>>>>>
expect(_(res.body.data.votes).map('balance').sortNumbers('desc')).to.to.be.eql(_.map(res.body.data.votes, 'balance'));
})); |
<<<<<<<
const getMappingTriggers = policies => policies
.filter(policy => policy.name.includes('BotfrontMappingPolicy'))
.map(policy => (policy.triggers || []).map((trigger) => {
if (!trigger.extra_actions) return [trigger.action];
return [...trigger.extra_actions, trigger.action];
}))
.reduce((coll, curr) => coll.concat(curr), [])
.reduce((coll, curr) => coll.concat(curr), []);
export const extractDomain = (stories, slots, templates = {}, crashOnStoryWithErrors = true) => {
const defaultDomain = {
actions: new Set(Object.keys(templates)),
intents: new Set(),
entities: new Set(),
forms: new Set(),
templates,
slots: { disambiguation_message: { type: 'unfeaturized' } },
=======
export const extractDomain = (stories, slots, templates = {}, defaultDomain = {}) => {
const initialDomain = {
actions: new Set([...(defaultDomain.actions || []), ...Object.keys(templates)]),
intents: new Set(defaultDomain.intents || []),
entities: new Set(defaultDomain.entities || []),
forms: new Set(defaultDomain.forms || []),
templates: { ...(defaultDomain.templates || {}), ...templates },
slots: defaultDomain.slots || {},
>>>>>>>
export const extractDomain = (stories, slots, templates = {}, defaultDomain = {}, crashOnStoryWithErrors = true) => {
const initialDomain = {
actions: new Set([...(defaultDomain.actions || []), ...Object.keys(templates)]),
intents: new Set(defaultDomain.intents || []),
entities: new Set(defaultDomain.entities || []),
forms: new Set(defaultDomain.forms || []),
templates: { ...(defaultDomain.templates || {}), ...templates },
slots: defaultDomain.slots || {}, |
<<<<<<<
var test = require('../../test');
var _ = test._;
var accountFixtures = require('../../fixtures/accounts');
=======
var accountFixtures = require('../../fixtures/accounts');
var application = require('../../common/application');
>>>>>>>
var accountFixtures = require('../../fixtures/accounts');
<<<<<<<
var Scenarios = require('../common/scenarios');
=======
>>>>>>> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.