conflict_resolution
stringlengths
27
16k
<<<<<<< it('calls props.commit(message) when the commit button is clicked or git:commit is dispatched', async () => { ======= it('calls props.commit(message) when the commit button is clicked or github:commit is dispatched', async () => { const workdirPath = await cloneRepository('three-files'); const repository = await buildRepository(workdirPath); >>>>>>> it('calls props.commit(message) when the commit button is clicked or github:commit is dispatched', async () => { <<<<<<< await view.update({stagedChangesExist: true, message: 'Commit 2'}); commandRegistry.dispatch(editor.element, 'git:commit'); ======= await view.update({repository, stagedChangesExist: true}); editor.setText('Commit 2'); await etch.getScheduler().getNextUpdatePromise(); commandRegistry.dispatch(editor.element, 'github:commit'); await etch.getScheduler().getNextUpdatePromise(); >>>>>>> await view.update({stagedChangesExist: true, message: 'Commit 2'}); commandRegistry.dispatch(editor.element, 'github:commit'); <<<<<<< await view.update({stagedChangesExist: false, message: 'Commit 4'}); commandRegistry.dispatch(editor.element, 'git:commit'); ======= await view.update({repository, stagedChangesExist: false}); editor.setText('Commit 4'); await etch.getScheduler().getNextUpdatePromise(); commandRegistry.dispatch(editor.element, 'github:commit'); await etch.getScheduler().getNextUpdatePromise(); >>>>>>> await view.update({stagedChangesExist: false, message: 'Commit 4'}); commandRegistry.dispatch(editor.element, 'github:commit'); <<<<<<< await view.update({stagedChangesExist: true, message: ''}); commandRegistry.dispatch(editor.element, 'git:commit'); ======= editor.setText(''); await etch.getScheduler().getNextUpdatePromise(); await view.update({repository, stagedChangesExist: true}); commandRegistry.dispatch(editor.element, 'github:commit'); await etch.getScheduler().getNextUpdatePromise(); >>>>>>> await view.update({stagedChangesExist: true, message: ''}); commandRegistry.dispatch(editor.element, 'github:commit');
<<<<<<< import CommitPanelView from './views/commit-panel-view' import StatusBarView from './views/status-bar-view' import FilePatchView from './views/file-patch-view' import nsfw from 'nsfw' ======= import FileSystemChangeObserver from './models/file-system-change-observer' import WorkspaceChangeObserver from './models/workspace-change-observer' import GitPanelController from './controllers/git-panel-controller' import FilePatchController from './controllers/file-patch-controller' >>>>>>> import FileSystemChangeObserver from './models/file-system-change-observer' import WorkspaceChangeObserver from './models/workspace-change-observer' import GitPanelController from './controllers/git-panel-controller' import FilePatchController from './controllers/file-patch-controller' import StatusBarView from './views/status-bar-view' <<<<<<< this.commandRegistry = commandRegistry ======= this.changeObserver = process.platform === 'linux' ? new WorkspaceChangeObserver(window, atom.workspace) : new FileSystemChangeObserver() >>>>>>> this.commandRegistry = commandRegistry this.changeObserver = process.platform === 'linux' ? new WorkspaceChangeObserver(window, atom.workspace) : new FileSystemChangeObserver() <<<<<<< ======= await this.changeObserver.start() this.workspace.addRightPanel({item: this.gitPanelController}) >>>>>>> await this.changeObserver.start() <<<<<<< this.workspace.onDidChangeActivePaneItem(this.didChangeActivePaneItem.bind(this)), this.commandRegistry.add('atom-workspace', {'git:toggle-commit-panel': this.toggleCommitPanel.bind(this)}) ======= this.workspace.onDidChangeActivePaneItem(this.didChangeActivePaneItem.bind(this)), this.changeObserver.onDidChange(this.refreshActiveRepository.bind(this)) >>>>>>> this.workspace.onDidChangeActivePaneItem(this.didChangeActivePaneItem.bind(this)), this.changeObserver.onDidChange(this.refreshActiveRepository.bind(this)), this.commandRegistry.add('atom-workspace', {'git:toggle-git-panel': this.toggleGitPanel.bind(this)}) <<<<<<< consumeStatusBar (statusBar) { const tile = statusBar.addRightTile({item: this.statusBarView, priority: -100}) this.subscriptions.add(new Disposable(() => tile.destroy())) } ======= async deactivate () { await this.changeObserver.stop() } >>>>>>> async deactivate () { await this.changeObserver.stop() } consumeStatusBar (statusBar) { const tile = statusBar.addRightTile({item: this.statusBarView, priority: -100}) this.subscriptions.add(new Disposable(() => tile.destroy())) } <<<<<<< await this.commitPanelView.update({repository: this.getActiveRepository()}) await this.statusBarView.update({repository: this.getActiveRepository()}) this.lastFileChangePromise = new Promise((resolve) => this.resolveLastFileChangePromise = resolve) this.currentFileWatcher = await nsfw(activeRepository.getWorkingDirectoryPath(), async () => { await activeRepository.refresh() this.resolveLastFileChangePromise() this.lastFileChangePromise = new Promise((resolve) => this.resolveLastFileChangePromise = resolve) }) await this.currentFileWatcher.start() ======= await this.gitPanelController.update({repository: this.getActiveRepository()}) await this.changeObserver.setActiveRepository(this.getActiveRepository()) >>>>>>> await this.statusBarView.update({repository: this.getActiveRepository()}) await this.gitPanelController.update({repository: this.getActiveRepository()}) await this.changeObserver.setActiveRepository(this.getActiveRepository())
<<<<<<< <EtchWrapper ref={c => { this.gitPanelController = c; }} reattachDomNode={false}> <GitPanelController workspace={this.props.workspace} commandRegistry={this.props.commandRegistry} notificationManager={this.props.notificationManager} repository={this.props.repository} isAmending={this.state.amending} didSelectFilePath={this.showFilePatchForPath} didDiveIntoFilePath={this.diveIntoFilePatchForPath} didSelectMergeConflictFile={this.showMergeConflictFileForPath} didDiveIntoMergeConflictPath={this.diveIntoMergeConflictFileForPath} didChangeAmending={this.didChangeAmending} focusFilePatchView={this.focusFilePatchView} ensureGitPanel={this.ensureGitPanel} openFiles={this.openFiles} /> </EtchWrapper> ======= <Resizer size={this.state.panelSize} onChange={this.handlePanelResize} className="github-PanelResizer"> <EtchWrapper ref={c => { this.gitPanelController = c; }} className="github-PanelEtchWrapper" reattachDomNode={false}> <GitPanelController workspace={this.props.workspace} commandRegistry={this.props.commandRegistry} notificationManager={this.props.notificationManager} repository={this.props.repository} isAmending={this.state.amending} didSelectFilePath={this.showFilePatchForPath} didDiveIntoFilePath={this.diveIntoFilePatchForPath} didSelectMergeConflictFile={this.showMergeConflictFileForPath} didDiveIntoMergeConflictPath={this.diveIntoMergeConflictFileForPath} didChangeAmending={this.didChangeAmending} focusFilePatchView={this.focusFilePatchView} ensureGitPanel={this.ensureGitPanel} /> </EtchWrapper> </Resizer> >>>>>>> <Resizer size={this.state.panelSize} onChange={this.handlePanelResize} className="github-PanelResizer"> <EtchWrapper ref={c => { this.gitPanelController = c; }} className="github-PanelEtchWrapper" reattachDomNode={false}> <GitPanelController workspace={this.props.workspace} commandRegistry={this.props.commandRegistry} notificationManager={this.props.notificationManager} repository={this.props.repository} isAmending={this.state.amending} didSelectFilePath={this.showFilePatchForPath} didDiveIntoFilePath={this.diveIntoFilePatchForPath} didSelectMergeConflictFile={this.showMergeConflictFileForPath} didDiveIntoMergeConflictPath={this.diveIntoMergeConflictFileForPath} didChangeAmending={this.didChangeAmending} focusFilePatchView={this.focusFilePatchView} ensureGitPanel={this.ensureGitPanel} openFiles={this.openFiles} /> </EtchWrapper> </Resizer>
<<<<<<< ======= this.activeRepository = null; this.activeResolutionProgress = null; this.useLegacyPanels = false; >>>>>>> this.useLegacyPanels = false; <<<<<<< />, this.element, callback, ======= useLegacyPanels={this.useLegacyPanels} />, this.element, >>>>>>> useLegacyPanels={this.useLegacyPanels} />, this.element, callback, <<<<<<< ======= createGitTabControllerStub() { return StubItem.create('git-tab-controller', { title: 'Git', }); } @autobind createGithubTabControllerStub() { return StubItem.create('github-tab-controller', { title: 'GitHub (alpha)', }); } @autobind async didChangeProjectPaths(projectPaths) { this.updateActiveModels(); const previousProjectPaths = Array.from(this.modelPromisesByProjectPath.keys()); const {added, removed} = compareSets(new Set(previousProjectPaths), new Set(projectPaths)); this.cacheModelsForPaths(Array.from(added)); await this.destroyModelsForPaths(Array.from(removed)); } @autobind >>>>>>> createGitTabControllerStub() { return StubItem.create('git-tab-controller', { title: 'Git', }); } @autobind createGithubTabControllerStub() { return StubItem.create('github-tab-controller', { title: 'GitHub (alpha)', }); } @autobind
<<<<<<< commandRegistry={this.props.commandRegistry} stageOrUnstageHunk={this.stageOrUnstageHunk} ======= >>>>>>> commandRegistry={this.props.commandRegistry} <<<<<<< didSurfaceFile={this.didSurfaceFile} ======= attemptHunkStageOperation={this.attemptHunkStageOperation} >>>>>>> didSurfaceFile={this.didSurfaceFile} attemptHunkStageOperation={this.attemptHunkStageOperation}
<<<<<<< it('renders file diffs, adding an "is-selected" class to the specified selectedFilePatch', async () => { const filePatches = [ ======= it('renders file patches, allowing one of them to be selected', async () => { const filePatches = [ >>>>>>> it('renders file diffs, adding an "is-selected" class to the specified selectedFilePatch', async () => { const filePatches = [ <<<<<<< const component = new FilePatchListComponent({filePatches}) assert.equal(component.element.querySelector('.git-FilePatchListItem.modified .git-FilePatchListItem-path').textContent, 'a.txt') assert.equal(component.element.querySelector('.git-FilePatchListItem.added .git-FilePatchListItem-path').textContent, 'b.txt') assert.equal(component.element.querySelector('.git-FilePatchListItem.removed .git-FilePatchListItem-path').textContent, 'c.txt') assert.equal(component.element.querySelector('.git-FilePatchListItem.renamed .git-FilePatchListItem-path').textContent, 'd.txt β†’ e.txt') await component.update({filePatches}) assert.equal(component.element.querySelector('.git-FilePatchListItem.modified .git-FilePatchListItem-path').textContent, 'a.txt') assert.equal(component.element.querySelector('.git-FilePatchListItem.added .git-FilePatchListItem-path').textContent, 'b.txt') assert.equal(component.element.querySelector('.git-FilePatchListItem.removed .git-FilePatchListItem-path').textContent, 'c.txt') assert.equal(component.element.querySelector('.git-FilePatchListItem.renamed .git-FilePatchListItem-path').textContent, 'd.txt β†’ e.txt') await component.selectFilePatch(filePatches[1]) let selectedDiffs = component.element.querySelectorAll('.git-FilePatchListItem.is-selected .git-FilePatchListItem-path') assert.equal(selectedDiffs.length, 1) assert.deepEqual(component.selectedFilePatch, filePatches[1]) assert.equal(selectedDiffs[0].textContent, 'b.txt') await component.selectFilePatch(filePatches[3]) selectedDiffs = component.element.querySelectorAll('.git-FilePatchListItem.is-selected .git-FilePatchListItem-path') assert.equal(selectedDiffs.length, 1) assert.deepEqual(component.selectedFilePatch, filePatches[3]) assert.equal(selectedDiffs[0].textContent, 'd.txt β†’ e.txt') }) ======= await component.selectFilePatch(filePatches[1]) let selectedPatches = component.element.querySelectorAll('.git-FilePatchListItem.is-selected .git-FilePatchListItem-path') assert.equal(selectedPatches.length, 1) assert.deepEqual(component.selectedFilePatch, filePatches[1]) assert.equal(selectedPatches[0].textContent, 'b.txt') await component.selectFilePatch(filePatches[3]) selectedPatches = component.element.querySelectorAll('.git-FilePatchListItem.is-selected .git-FilePatchListItem-path') assert.equal(selectedPatches.length, 1) assert.deepEqual(component.selectedFilePatch, filePatches[3]) assert.equal(selectedPatches[0].textContent, 'd.txt β†’ e.txt') >>>>>>> const component = new FilePatchListComponent({filePatches}) assert.equal(component.element.querySelector('.git-FilePatchListItem.modified .git-FilePatchListItem-path').textContent, 'a.txt') assert.equal(component.element.querySelector('.git-FilePatchListItem.added .git-FilePatchListItem-path').textContent, 'b.txt') assert.equal(component.element.querySelector('.git-FilePatchListItem.removed .git-FilePatchListItem-path').textContent, 'c.txt') assert.equal(component.element.querySelector('.git-FilePatchListItem.renamed .git-FilePatchListItem-path').textContent, 'd.txt β†’ e.txt') await component.update({filePatches}) assert.equal(component.element.querySelector('.git-FilePatchListItem.modified .git-FilePatchListItem-path').textContent, 'a.txt') assert.equal(component.element.querySelector('.git-FilePatchListItem.added .git-FilePatchListItem-path').textContent, 'b.txt') assert.equal(component.element.querySelector('.git-FilePatchListItem.removed .git-FilePatchListItem-path').textContent, 'c.txt') assert.equal(component.element.querySelector('.git-FilePatchListItem.renamed .git-FilePatchListItem-path').textContent, 'd.txt β†’ e.txt') await component.selectFilePatch(filePatches[1]) let selectedPatches = component.element.querySelectorAll('.git-FilePatchListItem.is-selected .git-FilePatchListItem-path') assert.equal(selectedPatches.length, 1) assert.deepEqual(component.selectedFilePatch, filePatches[1]) assert.equal(selectedPatches[0].textContent, 'b.txt') await component.selectFilePatch(filePatches[3]) selectedPatches = component.element.querySelectorAll('.git-FilePatchListItem.is-selected .git-FilePatchListItem-path') assert.equal(selectedPatches.length, 1) assert.deepEqual(component.selectedFilePatch, filePatches[3]) assert.equal(selectedPatches[0].textContent, 'd.txt β†’ e.txt') }) <<<<<<< filePatches, didSelectFilePatch: (d) => selectedDiffs.push(d) ======= filePatches, didSelectFilePatch: (d) => selectedPatches.push(d) >>>>>>> filePatches, didSelectFilePatch: (d) => selectedPatches.push(d) <<<<<<< filePatches, didConfirmFilePatch: (d) => confirmedDiffs.push(d) ======= filePatches, didConfirmFilePatch: (d) => confirmedPatches.push(d) >>>>>>> filePatches, didConfirmFilePatch: (d) => confirmedPatches.push(d) <<<<<<< assert.deepEqual(confirmedDiffs, [filePatches[0]]) ======= assert.deepEqual(confirmedPatches, [filePatches[0]]) >>>>>>> assert.deepEqual(confirmedPatches, [filePatches[0]]) <<<<<<< assert.deepEqual(confirmedDiffs, [filePatches[0], filePatches[3]]) ======= assert.deepEqual(confirmedPatches, [filePatches[0], filePatches[3]]) >>>>>>> assert.deepEqual(confirmedPatches, [filePatches[0], filePatches[3]])
<<<<<<< import PrCommitsView from '../views/pr-commits-view'; ======= import {addEvent} from '../reporter-proxy'; >>>>>>> import {addEvent} from '../reporter-proxy'; import PrCommitsView from '../views/pr-commits-view';
<<<<<<< updateComment: PropTypes.func.isRequired, updateSummary: PropTypes.func.isRequired, reportMutationErrors: PropTypes.func.isRequired, ======= reportRelayError: PropTypes.func.isRequired, >>>>>>> updateComment: PropTypes.func.isRequired, updateSummary: PropTypes.func.isRequired, reportRelayError: PropTypes.func.isRequired, <<<<<<< <ActionableReviewView originalContent={review} confirm={this.props.confirm} commands={this.props.commands} contentUpdater={this.props.updateSummary} render={showActionsMenu => { return ( <Fragment> <header className="github-Review-header"> <div className="github-Review-header-authorData"> <span className={`github-ReviewSummary-icon icon ${icon}`} /> <img className="github-ReviewSummary-avatar" src={author.avatarUrl} alt={author.login} /> <a className="github-ReviewSummary-username" href={author.url}>{author.login}</a> <span className="github-ReviewSummary-type">{copy}</span> {this.renderEditedLink(review)} {this.renderAuthorAssociation(review)} </div> <Timeago className="github-ReviewSummary-timeAgo" time={review.submittedAt} displayStyle="short" /> <Octicon icon="ellipses" className="github-Review-actionsMenu" onClick={event => showActionsMenu(event, review, author)} /> </header> <main className="github-ReviewSummary-comment"> <GithubDotcomMarkdown html={review.bodyHTML} switchToIssueish={this.props.openIssueish} openIssueishLinkInNewTab={this.openIssueishLinkInNewTab} /> <EmojiReactionsController reactable={review} tooltips={this.props.tooltips} reportMutationErrors={this.props.reportMutationErrors} /> </main> </Fragment> ); }} /> ======= <header className="github-Review-header"> <div className="github-Review-header-authorData"> <span className={`github-ReviewSummary-icon icon ${icon}`} /> <img className="github-ReviewSummary-avatar" src={author.avatarUrl} alt={author.login} /> <a className="github-ReviewSummary-username" href={author.url}>{author.login}</a> <span className="github-ReviewSummary-type">{copy}</span> {this.renderEditedLink(review)} {this.renderAuthorAssociation(review)} </div> <Timeago className="github-ReviewSummary-timeAgo" time={review.submittedAt} displayStyle="short" /> </header> <main className="github-ReviewSummary-comment"> <GithubDotcomMarkdown html={review.bodyHTML} switchToIssueish={this.props.openIssueish} openIssueishLinkInNewTab={this.openIssueishLinkInNewTab} /> <EmojiReactionsController reactable={review} tooltips={this.props.tooltips} reportRelayError={this.props.reportRelayError} /> </main> >>>>>>> <ActionableReviewView originalContent={review} confirm={this.props.confirm} commands={this.props.commands} contentUpdater={this.props.updateSummary} render={showActionsMenu => { return ( <Fragment> <header className="github-Review-header"> <div className="github-Review-header-authorData"> <span className={`github-ReviewSummary-icon icon ${icon}`} /> <img className="github-ReviewSummary-avatar" src={author.avatarUrl} alt={author.login} /> <a className="github-ReviewSummary-username" href={author.url}>{author.login}</a> <span className="github-ReviewSummary-type">{copy}</span> {this.renderEditedLink(review)} {this.renderAuthorAssociation(review)} </div> <Timeago className="github-ReviewSummary-timeAgo" time={review.submittedAt} displayStyle="short" /> <Octicon icon="ellipses" className="github-Review-actionsMenu" onClick={event => showActionsMenu(event, review, author)} /> </header> <main className="github-ReviewSummary-comment"> <GithubDotcomMarkdown html={review.bodyHTML} switchToIssueish={this.props.openIssueish} openIssueishLinkInNewTab={this.openIssueishLinkInNewTab} /> <EmojiReactionsController reactable={review} tooltips={this.props.tooltips} reportRelayError={this.props.reportRelayError} /> </main> </Fragment> ); }} /> <<<<<<< ======= renderComment = comment => { if (comment.isMinimized) { return ( <div className="github-Review-comment github-Review-comment--hidden" key={comment.id}> <Octicon icon={'fold'} className="github-Review-icon" /> <em>This comment was hidden</em> </div> ); } const commentClass = cx('github-Review-comment', {'github-Review-comment--pending': comment.state === 'PENDING'}); const author = comment.author || GHOST_USER; return ( <div className={commentClass} key={comment.id}> <header className="github-Review-header"> <div className="github-Review-header-authorData"> <img className="github-Review-avatar" src={author.avatarUrl} alt={author.login} /> <a className="github-Review-username" href={author.url}> {author.login} </a> <a className="github-Review-timeAgo" href={comment.url}> <Timeago displayStyle="long" time={comment.createdAt} /> </a> {this.renderEditedLink(comment)} {this.renderAuthorAssociation(comment)} {comment.state === 'PENDING' && ( <span className="github-Review-pendingBadge badge badge-warning">pending</span> )} </div> <a className="github-Review-reportAbuseLink" title="report abuse" href={`https://github.com/contact/report-content?report=${encodeURIComponent(author.login)}&content_url=${encodeURIComponent(comment.url)}`}> <Octicon icon="alert" /> </a> </header> <div className="github-Review-text"> <GithubDotcomMarkdown html={comment.bodyHTML} switchToIssueish={this.props.openIssueish} openIssueishLinkInNewTab={this.openIssueishLinkInNewTab} /> <EmojiReactionsController reactable={comment} tooltips={this.props.tooltips} reportRelayError={this.props.reportRelayError} /> </div> </div> ); } >>>>>>>
<<<<<<< export function buildRepository(workingDirPath) { const repository = Repository.open(workingDirPath); // eslint-disable-next-line jasmine/no-global-setup afterEach(async () => { const repo = await repository; repo && repo.destroy(); }); return repository; ======= export async function buildRepository(workingDirPath) { const repository = new Repository(workingDirPath); await repository.getLoadPromise(); return repository; >>>>>>> export async function buildRepository(workingDirPath) { const repository = new Repository(workingDirPath); await repository.getLoadPromise(); // eslint-disable-next-line jasmine/no-global-setup afterEach(async () => { const repo = await repository; repo && repo.destroy(); }); return repository;
<<<<<<< const fileDiff = gitInstance.getFileList().getOrCreateFileFromPathName(pathName) const fileDiffViewModel = new FileDiffViewModel(fileDiff) ======= const fileDiff = gitInstance.getFileListViewModel().getDiffForPathName(pathName) >>>>>>> const fileDiff = gitInstance.getFileListViewModel().getDiffForPathName(pathName) const fileDiffViewModel = new FileDiffViewModel(fileDiff)
<<<<<<< this.mergeMessage = await repository.getMergeMessage() this.branchName = await repository.getCurrentBranch() this.branches = await repository.getBranches() this.remoteName = await repository.getRemote(this.branchName) ======= this.lastCommit = await repository.getLastCommit() this.isMerging = await repository.isMerging() if (this.isMerging) { this.mergeMessage = await repository.getMergeMessage() } this.branchName = await repository.getBranchName() >>>>>>> this.lastCommit = await repository.getLastCommit() this.isMerging = await repository.isMerging() if (this.isMerging) { this.mergeMessage = await repository.getMergeMessage() } this.branchName = await repository.getCurrentBranch() this.branches = await repository.getBranches()
<<<<<<< async createBlob(filePath) { const output = await this.exec(['hash-object', '-w', filePath]); return output.trim(); } async restoreBlob(filePath, sha) { await this.exec(['cat-file', '-p', sha], null, null, path.join(this.workingDir, filePath)); } ======= async getConfig(option, {local} = {}) { let output; try { let args = ['config']; if (local) { args.push('--local'); } args = args.concat(option); output = await this.exec(args); } catch (err) { if (err.code === 1 && err.stdErr === '') { // No matching config found return null; } else { throw err; } } return output.trim(); } setConfig(option, value, {replaceAll} = {}) { let args = ['config']; if (replaceAll) { args.push('--replace-all'); } args = args.concat(option, value); return this.exec(args); } async getRemotes() { let output = await this.getConfig(['--get-regexp', '^remote..*.url$'], {local: true}); if (output) { output = output.trim(); if (!output.length) { return []; } return output.split('\n').map(line => { const match = line.match(/^remote\.(.*)\.url (.*)$/); return { name: match[1], url: match[2], }; }); } else { return []; } } >>>>>>> async getConfig(option, {local} = {}) { let output; try { let args = ['config']; if (local) { args.push('--local'); } args = args.concat(option); output = await this.exec(args); } catch (err) { if (err.code === 1 && err.stdErr === '') { // No matching config found return null; } else { throw err; } } return output.trim(); } setConfig(option, value, {replaceAll} = {}) { let args = ['config']; if (replaceAll) { args.push('--replace-all'); } args = args.concat(option, value); return this.exec(args); } async getRemotes() { let output = await this.getConfig(['--get-regexp', '^remote..*.url$'], {local: true}); if (output) { output = output.trim(); if (!output.length) { return []; } return output.split('\n').map(line => { const match = line.match(/^remote\.(.*)\.url (.*)$/); return { name: match[1], url: match[2], }; }); } else { return []; } } async createBlob(filePath) { const output = await this.exec(['hash-object', '-w', filePath]); return output.trim(); } async restoreBlob(filePath, sha) { await this.exec(['cat-file', '-p', sha], null, null, path.join(this.workingDir, filePath)); }
<<<<<<< <div> <Commands registry={this.props.commandRegistry} target="atom-workspace"> {devMode && <Command command="github:install-react-dev-tools" callback={this.installReactDevTools} />} <Command command="github:logout" callback={this.clearGithubToken} /> <Command command="github:show-waterfall-diagnostics" callback={this.showWaterfallDiagnostics} /> <Command command="github:show-cache-diagnostics" callback={this.showCacheDiagnostics} /> <Command command="github:open-issue-or-pull-request" callback={this.showOpenIssueishDialog} /> <Command command="github:toggle-git-tab" callback={this.gitTabTracker.toggle} /> <Command command="github:toggle-git-tab-focus" callback={this.gitTabTracker.toggleFocus} /> <Command command="github:toggle-github-tab" callback={this.githubTabTracker.toggle} /> <Command command="github:toggle-github-tab-focus" callback={this.githubTabTracker.toggleFocus} /> <Command command="github:clone" callback={this.openCloneDialog} /> <Command command="github:view-unstaged-changes-for-current-file" callback={this.viewUnstagedChangesForCurrentFile} /> <Command command="github:view-staged-changes-for-current-file" callback={this.viewStagedChangesForCurrentFile} /> <Command command="github:close-all-diff-views" callback={this.destroyFilePatchPaneItems} /> <Command command="github:close-empty-diff-views" callback={this.destroyEmptyFilePatchPaneItems} /> </Commands> {this.renderStatusBarTile()} {this.renderPanels()} {this.renderInitDialog()} {this.renderCloneDialog()} {this.renderCredentialDialog()} {this.renderOpenIssueishDialog()} {this.renderGitCacheView()} {this.renderRepositoryConflictController()} {this.renderFilePatches()} </div> ======= <Commands registry={this.props.commandRegistry} target="atom-workspace"> {devMode && <Command command="github:install-react-dev-tools" callback={this.installReactDevTools} />} <Command command="github:logout" callback={this.clearGithubToken} /> <Command command="github:show-waterfall-diagnostics" callback={this.showWaterfallDiagnostics} /> <Command command="github:open-issue-or-pull-request" callback={this.showOpenIssueishDialog} /> <Command command="github:toggle-git-tab" callback={this.gitTabTracker.toggle} /> <Command command="github:toggle-git-tab-focus" callback={this.gitTabTracker.toggleFocus} /> <Command command="github:toggle-github-tab" callback={this.githubTabTracker.toggle} /> <Command command="github:toggle-github-tab-focus" callback={this.githubTabTracker.toggleFocus} /> <Command command="github:clone" callback={this.openCloneDialog} /> <Command command="github:view-unstaged-changes-for-current-file" callback={this.viewUnstagedChangesForCurrentFile} /> <Command command="github:view-staged-changes-for-current-file" callback={this.viewStagedChangesForCurrentFile} /> <Command command="github:close-all-diff-views" callback={this.destroyFilePatchPaneItems} /> <Command command="github:close-empty-diff-views" callback={this.destroyEmptyFilePatchPaneItems} /> </Commands> >>>>>>> <Commands registry={this.props.commandRegistry} target="atom-workspace"> {devMode && <Command command="github:install-react-dev-tools" callback={this.installReactDevTools} />} <Command command="github:logout" callback={this.clearGithubToken} /> <Command command="github:show-waterfall-diagnostics" callback={this.showWaterfallDiagnostics} /> <Command command="github:show-cache-diagnostics" callback={this.showCacheDiagnostics} /> <Command command="github:open-issue-or-pull-request" callback={this.showOpenIssueishDialog} /> <Command command="github:toggle-git-tab" callback={this.gitTabTracker.toggle} /> <Command command="github:toggle-git-tab-focus" callback={this.gitTabTracker.toggleFocus} /> <Command command="github:toggle-github-tab" callback={this.githubTabTracker.toggle} /> <Command command="github:toggle-github-tab-focus" callback={this.githubTabTracker.toggleFocus} /> <Command command="github:clone" callback={this.openCloneDialog} /> <Command command="github:view-unstaged-changes-for-current-file" callback={this.viewUnstagedChangesForCurrentFile} /> <Command command="github:view-staged-changes-for-current-file" callback={this.viewStagedChangesForCurrentFile} /> <Command command="github:close-all-diff-views" callback={this.destroyFilePatchPaneItems} /> <Command command="github:close-empty-diff-views" callback={this.destroyEmptyFilePatchPaneItems} /> </Commands> <<<<<<< @autobind removeFilePatchItem(item) { return this.props.removeFilePatchItem(item); } renderGitCacheView() { if (!this.state.cacheViewActive) { return null; } return ( <PaneItem workspace={this.props.workspace} onDidCloseItem={() => { this.setState({cacheViewActive: false}); }}> <GitCacheView repository={this.props.repository} /> </PaneItem> ); } ======= >>>>>>> renderGitCacheView() { if (!this.state.cacheViewActive) { return null; } return ( <PaneItem workspace={this.props.workspace} onDidCloseItem={() => { this.setState({cacheViewActive: false}); }}> <GitCacheView repository={this.props.repository} /> </PaneItem> ); }
<<<<<<< it('stages symlink change when staging added lines that depend on change', async function() { if (process.env.ATOM_GITHUB_SKIP_SYMLINKS) { this.skip(); return; } const workingDirPath = await cloneRepository('symlinks'); const repository = await buildRepository(workingDirPath); ======= await wrapper.find('FilePatchView').prop('toggleRows')(new Set([2]), 'hunk'); >>>>>>> await wrapper.find('FilePatchView').prop('toggleRows')(new Set([2]), 'hunk'); <<<<<<< it('unstages symlink change when unstaging deleted lines that depend on change', async function() { if (process.env.ATOM_GITHUB_SKIP_SYMLINKS) { this.skip(); return; } const workingDirPath = await cloneRepository('symlinks'); const repository = await buildRepository(workingDirPath); ======= const wrapper = shallow(buildApp({filePatch: newFilePatch, stagingStatus: 'unstaged'})); >>>>>>> const wrapper = shallow(buildApp({filePatch: newFilePatch, stagingStatus: 'unstaged'})); <<<<<<< it('stages file deletion when all deleted lines are staged', async function() { if (process.env.ATOM_GITHUB_SKIP_SYMLINKS) { this.skip(); return; } const workingDirPath = await cloneRepository('symlinks'); const repository = await buildRepository(workingDirPath); await repository.getLoadPromise(); ======= describe('toggleSymlinkChange', function() { it('handles an addition and typechange with a special repository method', async function() { const p = path.join(repository.getWorkingDirectoryPath(), 'waslink.txt'); const dest = path.join(repository.getWorkingDirectoryPath(), 'destination'); await fs.writeFile(dest, 'asdf\n', 'utf8'); await fs.symlink(dest, p); >>>>>>> describe('toggleSymlinkChange', function() { it('handles an addition and typechange with a special repository method', async function() { if (process.env.ATOM_GITHUB_SKIP_SYMLINKS) { this.skip(); return; } const p = path.join(repository.getWorkingDirectoryPath(), 'waslink.txt'); const dest = path.join(repository.getWorkingDirectoryPath(), 'destination'); await fs.writeFile(dest, 'asdf\n', 'utf8'); await fs.symlink(dest, p); <<<<<<< it('unstages file creation when all added lines are unstaged', async function() { if (process.env.ATOM_GITHUB_SKIP_SYMLINKS) { this.skip(); return; } const workingDirPath = await cloneRepository('symlinks'); const repository = await buildRepository(workingDirPath); await repository.git.exec(['config', 'core.symlinks', 'true']); ======= it('stages non-addition typechanges normally', async function() { const p = path.join(repository.getWorkingDirectoryPath(), 'waslink.txt'); const dest = path.join(repository.getWorkingDirectoryPath(), 'destination'); await fs.writeFile(dest, 'asdf\n', 'utf8'); await fs.symlink(dest, p); >>>>>>> it('stages non-addition typechanges normally', async function() { if (process.env.ATOM_GITHUB_SKIP_SYMLINKS) { this.skip(); return; } const p = path.join(repository.getWorkingDirectoryPath(), 'waslink.txt'); const dest = path.join(repository.getWorkingDirectoryPath(), 'destination'); await fs.writeFile(dest, 'asdf\n', 'utf8'); await fs.symlink(dest, p);
<<<<<<< confirm={this.props.confirm} reportMutationErrors={this.reportMutationErrors} ======= reportRelayError={this.reportRelayError} >>>>>>> confirm={this.props.confirm} reportRelayError={this.reportRelayError}
<<<<<<< ======= const messageExists = this.props.messageBuffer.getLength() > 0; >>>>>>> <<<<<<< if (this.refEditor.map(focusElement).getOr(false)) { if (this.editor && this.editor.getText().length > 0 && !this.isValidMessage()) { // there is likely a commit message template present // we want the cursor to be at the beginning, not at the and of the template this.editor.setCursorBufferPosition([0, 0]); } ======= if (this.refEditorComponent.map(focusElement).getOr(false)) { >>>>>>> if (this.refEditorComponent.map(focusElement).getOr(false)) { if (this.props.messageBuffer.getText().length > 0 && !this.isValidMessage()) { // there is likely a commit message template present // we want the cursor to be at the beginning, not at the and of the template // todo: make sure this actually works this.refEditorComponent.get().setCursorBufferPosition([0, 0]); }
<<<<<<< import CommitPanelView from './views/commit-panel-view' import FilePatchView from './views/file-patch-view' import FileSystemChangeObserver from './models/file-system-change-observer' import WorkspaceChangeObserver from './models/workspace-change-observer' ======= import GitPanelController from './controllers/git-panel-controller' import FilePatchController from './controllers/file-patch-controller' import nsfw from 'nsfw' >>>>>>> import FileSystemChangeObserver from './models/file-system-change-observer' import WorkspaceChangeObserver from './models/workspace-change-observer' import GitPanelController from './controllers/git-panel-controller' import FilePatchController from './controllers/file-patch-controller' <<<<<<< await this.changeObserver.start() this.workspace.addRightPanel({item: this.commitPanelView}) ======= this.workspace.addRightPanel({item: this.gitPanelController}) >>>>>>> await this.changeObserver.start() this.workspace.addRightPanel({item: this.gitPanelController}) <<<<<<< await this.commitPanelView.update({repository: this.getActiveRepository()}) await this.changeObserver.setActiveDirectoryPath(this.getActiveRepository().getWorkingDirectoryPath()) ======= await this.gitPanelController.update({repository: this.getActiveRepository()}) this.lastFileChangePromise = new Promise((resolve) => this.resolveLastFileChangePromise = resolve) this.currentFileWatcher = await nsfw(activeRepository.getWorkingDirectoryPath(), async () => { await activeRepository.refresh() this.resolveLastFileChangePromise() this.lastFileChangePromise = new Promise((resolve) => this.resolveLastFileChangePromise = resolve) }) await this.currentFileWatcher.start() >>>>>>> await this.gitPanelController.update({repository: this.getActiveRepository()}) await this.changeObserver.setActiveDirectoryPath(this.getActiveRepository().getWorkingDirectoryPath()) this.lastFileChangePromise = new Promise((resolve) => this.resolveLastFileChangePromise = resolve) this.currentFileWatcher = await nsfw(activeRepository.getWorkingDirectoryPath(), async () => { await activeRepository.refresh() this.resolveLastFileChangePromise() this.lastFileChangePromise = new Promise((resolve) => this.resolveLastFileChangePromise = resolve) }) await this.currentFileWatcher.start()
<<<<<<< this.handleMoveUp = this.handleMoveUp.bind(this); ======= this.commit = this.commit.bind(this); this.abortMerge = this.abortMerge.bind(this); >>>>>>> this.handleMoveUp = this.handleMoveUp.bind(this); this.commit = this.commit.bind(this); this.abortMerge = this.abortMerge.bind(this); <<<<<<< this.editorElement = atom.views.getView(this.editor); ======= this.editor.setText(this.props.message || ''); >>>>>>> this.editorElement = atom.views.getView(this.editor); this.editor.setText(this.props.message || ''); <<<<<<< this.editor.getBuffer().onDidChangeText(() => { etch.update(this); }), props.commandRegistry.add(this.element, {'github:commit': this.commit}), props.commandRegistry.add(this.editorElement, {'core:move-up': this.handleMoveUp}), ======= props.commandRegistry.add(this.element, {'github:commit': () => this.commit()}), >>>>>>> props.commandRegistry.add(this.element, {'github:commit': this.commit}), props.commandRegistry.add(this.editorElement, {'core:move-up': this.handleMoveUp}), <<<<<<< handleMoveUp(event) { if (this.editor.getCursorBufferPositions().every(p => p.row === 0) && this.props.didMoveUpOnFirstLine) { this.props.didMoveUpOnFirstLine(); event.stopImmediatePropagation(); } return etch.update(this); } async commit() { ======= commit() { >>>>>>> handleMoveUp(event) { if (this.editor.getCursorBufferPositions().every(p => p.row === 0) && this.props.didMoveUpOnFirstLine) { this.props.didMoveUpOnFirstLine(); event.stopImmediatePropagation(); } return etch.update(this); } commit() {
<<<<<<< /** @babel */ import {CompositeDisposable, Disposable} from 'atom'; ======= import {CompositeDisposable, Disposable, Directory} from 'atom'; import React from 'react'; import ReactDom from 'react-dom'; import {autobind} from 'core-decorators'; >>>>>>> import {CompositeDisposable, Disposable} from 'atom'; import React from 'react'; import ReactDom from 'react-dom'; import {autobind} from 'core-decorators'; import compareSets from 'compare-sets'; <<<<<<< import React from 'react'; import ReactDom from 'react-dom'; import compareSets from 'compare-sets'; ======= >>>>>>> <<<<<<< this.project.onDidChangePaths(this.didChangeProjectPaths.bind(this)), this.workspace.onDidChangeActivePaneItem(this.didChangeActivePaneItem.bind(this)), ======= new Disposable(() => this.changeObserver.stop()), this.project.onDidChangePaths(this.didChangeProjectPaths), this.workspace.onDidChangeActivePaneItem(this.didChangeActivePaneItem), this.changeObserver.onDidChange(this.refreshActiveRepository), >>>>>>> this.project.onDidChangePaths(this.didChangeProjectPaths), this.workspace.onDidChangeActivePaneItem(this.didChangeActivePaneItem),
<<<<<<< this.workspace.addOpener(FilePatchPaneItem.opener), ======= atom.contextMenu.add({ '.github-UnstagedChanges .github-FilePatchListView': [ { label: 'Stage', command: 'core:confirm', shouldDisplay: hasSelectedFiles, }, { type: 'separator', shouldDisplay: hasSelectedFiles, }, { label: 'Discard Changes', command: 'github:discard-changes-in-selected-files', shouldDisplay: hasSelectedFiles, }, ], '.github-StagedChanges .github-FilePatchListView': [ { label: 'Unstage', command: 'core:confirm', shouldDisplay: hasSelectedFiles, }, ], '.github-MergeConflictPaths .github-FilePatchListView': [ { label: 'Stage', command: 'core:confirm', shouldDisplay: hasSelectedFiles, }, { type: 'separator', shouldDisplay: hasSelectedFiles, }, { label: 'Resolve File As Ours', command: 'github:resolve-file-as-ours', shouldDisplay: hasSelectedFiles, }, { label: 'Resolve File As Theirs', command: 'github:resolve-file-as-theirs', shouldDisplay: hasSelectedFiles, }, ], }), >>>>>>> this.workspace.addOpener(FilePatchPaneItem.opener), atom.contextMenu.add({ '.github-UnstagedChanges .github-FilePatchListView': [ { label: 'Stage', command: 'core:confirm', shouldDisplay: hasSelectedFiles, }, { type: 'separator', shouldDisplay: hasSelectedFiles, }, { label: 'Discard Changes', command: 'github:discard-changes-in-selected-files', shouldDisplay: hasSelectedFiles, }, ], '.github-StagedChanges .github-FilePatchListView': [ { label: 'Unstage', command: 'core:confirm', shouldDisplay: hasSelectedFiles, }, ], '.github-MergeConflictPaths .github-FilePatchListView': [ { label: 'Stage', command: 'core:confirm', shouldDisplay: hasSelectedFiles, }, { type: 'separator', shouldDisplay: hasSelectedFiles, }, { label: 'Resolve File As Ours', command: 'github:resolve-file-as-ours', shouldDisplay: hasSelectedFiles, }, { label: 'Resolve File As Theirs', command: 'github:resolve-file-as-theirs', shouldDisplay: hasSelectedFiles, }, ], }),
<<<<<<< if (i < initialChildren.length-1) { newChildren.push(<Divider borderColor={this.props.borderColor} key={"divider"+i} panelID={i} handleResize={this.handleResize} dividerWidth={this.props.spacing} direction={this.props.direction} showHandles={this.props.showHandles} onResizeStart={this.onResizeStart} onResizeEnd={this.onResizeEnd} />); ======= if (i < initialChildren.length - 1) { newChildren.push( <Divider borderColor={this.props.borderColor} key={"divider" + i} panelID={i} handleResize={this.handleResize} dividerWidth={this.props.spacing} direction={this.props.direction} showHandles={this.props.showHandles} /> ); >>>>>>> if (i < initialChildren.length - 1) { newChildren.push( <Divider borderColor={this.props.borderColor} key={"divider" + i} panelID={i} handleResize={this.handleResize} dividerWidth={this.props.spacing} direction={this.props.direction} showHandles={this.props.showHandles} onResizeStart={this.onResizeStart} onResizeEnd={this.onResizeEnd} /> ); <<<<<<< document.addEventListener('mousemove', this.onMouseMove) document.addEventListener('mouseup', this.onMouseUp) // maybe move it to setState callback ? this.props.onResizeStart(); ======= document.addEventListener("mousemove", this.onMouseMove); document.addEventListener("touchmove", this.onTouchMove, { passive: false }); document.addEventListener("mouseup", this.handleDragEnd); document.addEventListener("touchend", this.handleDragEnd, { passive: false }); >>>>>>> document.addEventListener("mousemove", this.onMouseMove); document.addEventListener("touchmove", this.onTouchMove, { passive: false }); document.addEventListener("mouseup", this.handleDragEnd); document.addEventListener("touchend", this.handleDragEnd, { passive: false }); // maybe move it to setState callback ? this.props.onResizeStart(); <<<<<<< document.removeEventListener('mousemove', this.onMouseMove) document.removeEventListener('mouseup', this.onMouseUp) this.props.onResizeEnd(); ======= document.removeEventListener("mousemove", this.onMouseMove); document.removeEventListener("touchmove", this.onTouchMove, { passive: false }); document.removeEventListener("mouseup", this.handleDragEnd); document.removeEventListener("touchend", this.handleDragEnd, { passive: false }); >>>>>>> document.removeEventListener("mousemove", this.onMouseMove); document.removeEventListener("touchmove", this.onTouchMove, { passive: false }); document.removeEventListener("mouseup", this.handleDragEnd); document.removeEventListener("touchend", this.handleDragEnd, { passive: false }); this.props.onResizeEnd();
<<<<<<< ======= this.handleAmendBoxClick = this.handleAmendBoxClick.bind(this); this.commit = this.commit.bind(this); this.abortMerge = this.abortMerge.bind(this); >>>>>>> <<<<<<< @autobind commit() { if (this.isCommitButtonEnabled()) { ======= async commit() { if (await this.props.prepareToCommit() && this.isCommitButtonEnabled()) { >>>>>>> @autobind async commit() { if (await this.props.prepareToCommit() && this.isCommitButtonEnabled()) {
<<<<<<< .minifySvgAssetsWithSvgo({isLoaded: true}) ======= .if(options.svgo) .minifySvgAssetsWithSvgo({isLoaded: true}) .endif() .inlineKnockoutJsTemplates() .liftUpJavaScriptRequireJsCommonJsCompatibilityRequire() .queue(function checkForRequireJsConfig(assetGraph, done) { if (assetGraph.requireJsConfig) { assetGraph .flattenRequireJs({type: 'Html', isFragment: false}) .run(done); } else { done(); } }) >>>>>>> .if(options.svgo) .minifySvgAssetsWithSvgo({isLoaded: true}) .endif()
<<<<<<< <div className='re-search' onClick={this._handleReSearch.bind(this)}> <img src='img/fail.svg'/> </div> <div className='remove' onClick={this._remove.bind(this)}> ======= <div className='remove tooltip center' onClick={this._remove.bind(this)} data-tooltip='Remove this track' > >>>>>>> <div className='re-search' onClick={this._handleReSearch.bind(this)}> <img src='img/fail.svg'/> </div> <div className='remove tooltip center' onClick={this._remove.bind(this)} data-tooltip='Remove this track' >
<<<<<<< this.producer = this.options.createProducer ? this.options.createProducer(this.options.topic) : this.createProducer(this.options.topic); this.consumer = this.options.createConsumer ? this.options.createConsumer(this.options.topic) : this.createConsumer(this.options.topic); ======= this.producer = this.createProducer(this.options.topic); this.consumer = this.createConsumer(this.options.topic); this.logger = child_logger_1.createChildLogger(this.options.logger || defaultLogger, 'KafkaPubSub'); this.consumer.on('data', function (message) { _this.logger.info('Got message'); _this.onMessage(JSON.parse(message.value.toString())); }); >>>>>>> this.producer = this.options.createProducer ? this.options.createProducer(this.options.topic) : this.createProducer(this.options.topic); this.consumer = this.options.createConsumer ? this.options.createConsumer(this.options.topic) : this.createConsumer(this.options.topic); this.logger = child_logger_1.createChildLogger(this.options.logger || defaultLogger, 'KafkaPubSub');
<<<<<<< it('should not modify delay property if it is not re-defined.', function() { ======= it('should always set (and overwrite) normalDelay same as delay.', function() { anotherPoller = poller.get(target, {delay: 1000}); expect(anotherPoller.normalDelay).to.exist(); expect(anotherPoller.normalDelay).to.equal(anotherPoller.delay); poller.get(target, {delay: 3000}); expect(anotherPoller.normalDelay).to.exist(); expect(anotherPoller.normalDelay).to.equal(anotherPoller.delay); }); it('should not modify delay property if it is not re-defined.', function () { >>>>>>> it('should always set (and overwrite) normalDelay same as delay.', function() { anotherPoller = poller.get(target, {delay: 1000}); expect(anotherPoller.normalDelay).to.exist(); expect(anotherPoller.normalDelay).to.equal(anotherPoller.delay); poller.get(target, {delay: 3000}); expect(anotherPoller.normalDelay).to.exist(); expect(anotherPoller.normalDelay).to.equal(anotherPoller.delay); }); it('should not modify delay property if it is not re-defined.', function () { <<<<<<< it('should set all pollers smart if pollerConfig.smart is true.', function() { module(function($provide) { $provide.constant('pollerConfig', { smart: true }); }); instantiate(); expect(poller.get('/test1').smart).to.equal(true); expect(poller.get('/test2').smart).to.equal(true); }); ======= it('should switch delay of all pollers that have idleDelay on visibilitychange.', function () { module(function ($provide) { $provide.constant('pollerConfig', { delayOnVisibilityChange: true }); }); inject(function (_$resource_, _poller_) { $resource = _$resource_; poller = _poller_; }); var target = $resource('/users'); var myPoller = poller.get(target, { delay: 5000, idleDelay: 10000 }); poller.delayAll(); expect(myPoller.delay).to.equal(myPoller.idleDelay); poller.resetDelay(); expect(myPoller.delay).to.equal(myPoller.normalDelay); }); >>>>>>> it('should set all pollers smart if pollerConfig.smart is true.', function() { module(function($provide) { $provide.constant('pollerConfig', { smart: true }); }); instantiate(); expect(poller.get('/test1').smart).to.equal(true); expect(poller.get('/test2').smart).to.equal(true); }); it('should switch delay of all pollers that have idleDelay on visibilitychange.', function () { module(function ($provide) { $provide.constant('pollerConfig', { delayOnVisibilityChange: true }); }); inject(function (_$resource_, _poller_) { $resource = _$resource_; poller = _poller_; }); var target = $resource('/users'); var myPoller = poller.get(target, { delay: 5000, idleDelay: 10000 }); poller.delayAll(); expect(myPoller.delay).to.equal(myPoller.idleDelay); poller.resetDelay(); expect(myPoller.delay).to.equal(myPoller.normalDelay); });
<<<<<<< stopOn: null, resetOn: null, smart: false, ======= stopOnRouteChange: false, stopOnStateChange: false, resetOnRouteChange: false, resetOnStateChange: false, delayOnVisibilityChange: false, stopOnVisibilityChange: false, >>>>>>> stopOn: null, resetOn: null, smart: false, <<<<<<< .run([ '$rootScope', 'poller', 'pollerConfig', function( $rootScope, poller, pollerConfig ) { /** * Automatically stop or reset all pollers before route * change start/success ($routeProvider) or state change * start/success ($stateProvider). */ function isValid(event) { return event && ( event === '$stateChangeStart' || event === '$routeChangeStart' || event === '$stateChangeSuccess' || event === '$routeChangeSuccess'); } ======= .run(function ($rootScope, $document, poller, pollerConfig) { var isPageHidden = function () { return document.hidden || document.webkitHidden || document.mozHidden || document.msHidden; }; /** * Automatically stop or reset all pollers before route change ($routeProvider) or state change ($stateProvider). */ if (pollerConfig.stopOnRouteChange) { $rootScope.$on('$routeChangeStart', function () { poller.stopAll(); }); } if (pollerConfig.stopOnStateChange) { $rootScope.$on('$stateChangeStart', function () { poller.stopAll(); }); } >>>>>>> .run([ '$rootScope', '$document', 'poller', 'pollerConfig', function( $rootScope, $document, poller, pollerConfig ) { /** * Automatically stop or reset all pollers before route * change start/success ($routeProvider) or state change * start/success ($stateProvider). */ function isValid(event) { return event && ( event === '$stateChangeStart' || event === '$routeChangeStart' || event === '$stateChangeSuccess' || event === '$routeChangeSuccess'); } <<<<<<< ]) .factory('poller', [ '$interval', '$q', '$http', 'pollerConfig', function( $interval, $q, $http, pollerConfig ) { // Poller registry var pollers = []; var defaults = { ======= /** * delayAll/resetDelay or stopAll/startAll on visibilitychange. */ if (pollerConfig.delayOnVisibilityChange) { var handleDelayOnVisibilityChange = function () { if (isPageHidden()) { poller.delayAll(); } else { poller.resetDelay(); } }; handleDelayOnVisibilityChange(); $document.on('visibilitychange', handleDelayOnVisibilityChange); } if (pollerConfig.stopOnVisibilityChange) { var handleStopOnVisibilityChange = function () { if (isPageHidden()) { poller.stopAll(); } else { poller.startAll(); } }; handleStopOnVisibilityChange(); $document.on('visibilitychange', handleStopOnVisibilityChange); } }) .factory('poller', function ($interval, $q, $http, pollerConfig) { var pollers = [], // Poller registry defaults = { >>>>>>> ]) .factory('poller', [ '$interval', '$q', '$http', 'pollerConfig', function( $interval, $q, $http, pollerConfig ) { // Poller registry var pollers = []; var defaults = { <<<<<<< smart: pollerConfig.smart, ======= idleDelay: 10000, smart: false, >>>>>>> idleDelay: 10000, smart: pollerConfig.smart, <<<<<<< Poller.prototype.set = function(options) { var props = [ 'action', 'argumentsArray', 'delay', 'smart', 'catchError' ]; angular.forEach(props, function(prop) { ======= set: function (options) { angular.forEach(['action', 'argumentsArray', 'delay', 'normalDelay', 'idleDelay', 'smart', 'catchError'], function (prop) { >>>>>>> Poller.prototype.set = function(options) { var props = [ 'action', 'argumentsArray', 'delay', 'normalDelay', 'idleDelay', 'smart', 'catchError' ]; angular.forEach(props, function(prop) { <<<<<<< /** * Stop all poller services. */ stopAll: function() { angular.forEach(pollers, function(p) { p.stop(); }); }, ======= /** * Start all poller services. */ startAll: function () { angular.forEach(pollers, function (p) { p.start(); }); }, /** * Stop all poller services. */ stopAll: function () { angular.forEach(pollers, function (p) { p.stop(); }); }, >>>>>>> /** * Start all poller services. */ startAll: function () { angular.forEach(pollers, function (p) { p.start(); }); }, /** * Stop all poller services. */ stopAll: function() { angular.forEach(pollers, function(p) { p.stop(); }); }, <<<<<<< /** * Stop and remove all poller services */ reset: function() { this.stopAll(); pollers = []; } }; } ]); ======= /** * Stop and remove all poller services */ reset: function () { this.stopAll(); pollers = []; }, /** * Switch all poller services delay to idleDelay */ delayAll: function() { angular.forEach(pollers, function (p) { if (angular.isDefined(p.idleDelay)) { p.delay = p.idleDelay; p.restart(); } }); }, /** * Switch all poller services delay back to normalDelay */ resetDelay: function() { angular.forEach(pollers, function (p) { if (angular.isDefined(p.idleDelay)) { p.delay = p.normalDelay; p.restart(); } }); } }; } ); >>>>>>> /** * Stop and remove all poller services */ reset: function() { this.stopAll(); pollers = []; }, /** * Switch all poller services delay to idleDelay */ delayAll: function() { angular.forEach(pollers, function (p) { if (angular.isDefined(p.idleDelay)) { p.delay = p.idleDelay; p.restart(); } }); }, /** * Switch all poller services delay back to normalDelay */ resetDelay: function() { angular.forEach(pollers, function (p) { if (angular.isDefined(p.idleDelay)) { p.delay = p.normalDelay; p.restart(); } }); } }; } ]);
<<<<<<< Order, ======= HookTest, >>>>>>> Order, HookTest,
<<<<<<< module.exports = async function resizeAndSave(config, uploadConfig, file) { ======= /** * Resize images according to image desired width and height and return sizes * @param config * @param uploadConfig * @param file * @returns String[] */ export async function resizeAndSave(config, uploadConfig, file) { >>>>>>> module.exports = async function resizeAndSave(config, uploadConfig, file) { /** * Resize images according to image desired width and height and return sizes * @param config * @param uploadConfig * @param file * @returns String[] */ <<<<<<< return outputSizes; }; ======= return Promise.all(sizes); } >>>>>>> return Promise.all(sizes); };
<<<<<<< <FieldTypeGutter /> <div className={`${baseClass}__content-wrapper`}> <h3 className={`${baseClass}__title`}>{label}</h3> <div className={`${baseClass}__fields-wrapper`}> <RenderFields fieldTypes={fieldTypes} customComponentsPath={`${customComponentsPath}${name}.fields.`} fieldSchema={fields.map((subField) => ({ ...subField, path: `${path}${subField.name ? `.${subField.name}` : ''}`, }))} /> </div> ======= <h3 className={`${baseClass}__title`}>{label}</h3> <div className={`${baseClass}__fields-wrapper`}> <RenderFieldGutter /> <RenderFields readOnly={readOnly} fieldTypes={fieldTypes} customComponentsPath={`${customComponentsPath}${name}.fields.`} fieldSchema={fields.map((subField) => ({ ...subField, path: `${path}${subField.name ? `.${subField.name}` : ''}`, }))} /> >>>>>>> <FieldTypeGutter /> <div className={`${baseClass}__content-wrapper`}> <h3 className={`${baseClass}__title`}>{label}</h3> <div className={`${baseClass}__fields-wrapper`}> <RenderFields readOnly={readOnly} fieldTypes={fieldTypes} customComponentsPath={`${customComponentsPath}${name}.fields.`} fieldSchema={fields.map((subField) => ({ ...subField, path: `${path}${subField.name ? `.${subField.name}` : ''}`, }))} /> </div>
<<<<<<< import { createAutopopulateOptions } from '../mongoose/createAutopopulateOptions'; import { NotFound } from '../errors'; ======= >>>>>>> import { NotFound } from '../errors'; <<<<<<< // eslint-disable-next-line no-underscore-dangle delete globals._id; delete globals.id; // eslint-disable-next-line no-underscore-dangle delete globals.__v; ======= >>>>>>>
<<<<<<< positionHandleVerticalAlignment, actionHandleVerticalAlignment, permissions, ======= positionPanelVerticalAlignment, actionPanelVerticalAlignment, toggleRowCollapse, >>>>>>> positionPanelVerticalAlignment, actionPanelVerticalAlignment, toggleRowCollapse, permissions,
<<<<<<< var orphans = _.difference(_.each(Object.keys(Schedule)), _.map(resp.hits.hits, '_id')); _.each(orphans, function (orphan) { server.log(['status', 'info', 'Sentinl'], 'Deleting orphan watcher: ' + orphan); Schedule[orphan].later.clear(); delete Schedule[orphan]; }); ======= var orphans = _.difference(_.each(Object.keys( Schedule )), _.map(resp.hits.hits, '_id') ); _.each(orphans, function(orphan){ server.log(['status', 'info', 'KaaE'],'Deleting orphan watcher: '+orphan); if (Schedule[orphan].later) { Schedule[orphan].later.clear(); } delete Schedule[orphan]; }); >>>>>>> var orphans = _.difference(_.each(Object.keys(Schedule)), _.map(resp.hits.hits, '_id')); _.each(orphans, function (orphan) { server.log(['status', 'info', 'Sentinl'], 'Deleting orphan watcher: ' + orphan); if (Schedule[orphan].later) { Schedule[orphan].later.clear(); } delete Schedule[orphan]; });
<<<<<<< ======= _checkChunks() { if (this._fetchWaiter) { if (this.members.size === this.memberCount) { this._fetchWaiter(this); this._fetchWaiter = null; } } } _addMember(guildUser, noEvent) { if (!(guildUser.user instanceof User)) { guildUser.user = this.client.dataManager.newUser(guildUser.user); } guildUser.joined_at = guildUser.joined_at || 0; const member = new GuildMember(this, guildUser); this.members.set(member.id, member); if (this._rawVoiceStates && this._rawVoiceStates.get(member.user.id)) { const voiceState = this._rawVoiceStates.get(member.user.id); member.serverMute = voiceState.mute; member.serverDeaf = voiceState.deaf; member.selfMute = voiceState.self_mute; member.selfDeaf = voiceState.self_deaf; member.voiceSessionID = voiceState.session_id; member.voiceChannelID = voiceState.channel_id; this.channels.get(voiceState.channel_id).members.set(member.user.id, member); } /** * Emitted whenever a user joins a guild. * @event Client#guildMemberAdd * @param {Guild} guild The guild that the user has joined * @param {GuildMember} member The member that has joined */ if (this.client.ws.status === Constants.Status.READY && !noEvent) { this.client.emit(Constants.Events.GUILD_MEMBER_ADD, this, member); } this._checkChunks(); return member; } _updateMember(member, data) { const oldMember = cloneObject(member); if (data.roles) member._roles = data.roles; else member.nickname = data.nick; const notSame = member.nickname !== oldMember.nickname || !arraysEqual(member._roles, oldMember._roles); if (this.client.ws.status === Constants.Status.READY && notSame) { /** * Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname * @event Client#guildMemberUpdate * @param {Guild} guild The guild that the update affects * @param {GuildMember} oldMember The member before the update * @param {GuildMember} newMember The member after the update */ this.client.emit(Constants.Events.GUILD_MEMBER_UPDATE, this, oldMember, member); } return { old: oldMember, mem: member, }; } _removeMember(guildMember) { this.members.delete(guildMember.id); this._checkChunks(); } /** * When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object. * @returns {string} * @example * // logs: Hello from My Guild! * console.log(`Hello from ${guild}!`); * @example * // logs: Hello from My Guild! * console.log(`Hello from ' + guild + '!'); */ toString() { return this.name; } /** * Returns the GuildMember form of a User object, if the User is present in the guild. * @param {UserResolvable} user The user that you want to obtain the GuildMember of * @returns {GuildMember|null} * @example * // get the guild member of a user * const member = guild.member(message.author); */ member(user) { return this.client.resolver.resolveGuildMember(this, user); } /** * Whether this Guild equals another Guild. It compares all properties, so for most operations * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often * what most users need. * @param {Guild} guild The guild to compare * @returns {boolean} */ equals(guild) { let equal = guild && this.id === guild.id && this.available === !guild.unavailable && this.splash === guild.splash && this.region === guild.region && this.name === guild.name && this.memberCount === guild.member_count && this.large === guild.large && this.icon === guild.icon && arraysEqual(this.features, guild.features) && this.ownerID === guild.owner_id && this.verificationLevel === guild.verification_level && this.embedEnabled === guild.embed_enabled; if (equal) { if (this.embedChannel) { if (this.embedChannel.id !== guild.embed_channel_id) equal = false; } else if (guild.embed_channel_id) { equal = false; } } return equal; } _memberSpeakUpdate(user, speaking) { const member = this.members.get(user); if (member && member.speaking !== speaking) { member.speaking = speaking; /** * Emitted once a Guild Member starts/stops speaking * @event Client#guildMemberSpeaking * @param {GuildMember} member The member that started/stopped speaking * @param {boolean} speaking Whether or not the member is speaking */ this.client.emit(Constants.Events.GUILD_MEMBER_SPEAKING, member, speaking); } } >>>>>>>
<<<<<<< // If is an object, check if it is a plain object if (isObject(prop)) { proto = '__proto__'; proto = hasObjectPrototypeOf ? Object.getPrototypeOf(prop) : prop[proto]; if (proto && proto !== Object.prototype) { return null; } } // Is it a function? else if (isFunction(prop)) { return null; } ======= >>>>>>> // If is a object, check if it is a plain object if (isObject(prop)) { proto = '__proto__'; proto = hasObjectPrototypeOf ? Object.getPrototypeOf(prop) : prop[proto]; if (proto && proto !== Object.prototype) { return null; } } // Is it a function? else if (isFunction(prop)) { return null; }
<<<<<<< const raw = options.raw || code.length < 5000; const gzip = formatSize(await gzipSize(code), filename, 'gz', raw); const brotli = formatSize(brotliSize.sync(code), filename, 'br', raw); ======= const gzip = formatSize(await gzipSize(code), filename, 'gz'); const brotli = formatSize(await brotliSize(code), filename, 'br'); >>>>>>> const raw = options.raw || code.length < 5000; const gzip = formatSize(await gzipSize(code), filename, 'gz', raw); const brotli = formatSize(await brotliSize(code), filename, 'br', raw);
<<<<<<< ======= var yaml = require('js-yaml'); var cson = require('cson'); >>>>>>> <<<<<<< return require('js-yaml').safeLoad(res); ======= return yaml.safeLoad(res, { schema: yaml.DEFAULT_FULL_SCHEMA }); } // CSON file if (ext.match(/cson/)) { return cson.parseFileSync(file); >>>>>>> var yaml = require('js-yaml'); return yaml.safeLoad(res, { schema: yaml.DEFAULT_FULL_SCHEMA }); } // CSON file if (ext.match(/cson/)) { var cson = require('cson'); return cson.parseFileSync(file);
<<<<<<< PerformanceAnalyzer.prototype.registerRoundtripPart = function(trade) { if(this.trades === 1 && trade.action === 'sell') { // this is not part of a valid roundtrip ======= PerformanceAnalyzer.prototype.logRoundtripPart = function(trade) { // this is not part of a valid roundtrip if(!this.roundTrip.entry && trade.action === 'sell') { >>>>>>> PerformanceAnalyzer.prototype.registerRoundtripPart = function(trade) { if(this.trades === 1 && trade.action === 'sell') { // this is not part of a valid roundtrip <<<<<<< this.roundTrips.push(roundtrip); this.logger.handleRoundtrip(roundtrip); ======= this.roundTrips[this.roundTrip.id] = roundtrip; // this will keep resending roundtrips, that is not ideal.. what do we do about it? this.handler.handleRoundtrip(roundtrip); >>>>>>> this.roundTrips[this.roundTrip.id] = roundtrip; // this will keep resending roundtrips, that is not ideal.. what do we do about it? this.logger.handleRoundtrip(roundtrip);
<<<<<<< <ReactTooltip className={ "tooltip" } backgroundColor={ "#0b0c0c" } id={ tipId } place={ "right" } effect={ "solid" }/> ======= <ReactTooltip id={ tipId } place={ "right" } className={ "tooltip" } effect={ "solid" }/> >>>>>>> <ReactTooltip id={ tipId } place={ "right" } backgroundColor={ "#0b0c0c" } className={ "tooltip" } effect={ "solid" }/>
<<<<<<< fontSize: 14, autoSkip: true, maxTicksLimit: 15, ======= autoSkip: false, userCallback: function (value, index, values) { const lastValue = dataSorted[index]; const label = moment(lastValue.date).format('MMM DD'); let valuesLength = values.length - 1; let period = Math.round(valuesLength / 10); if (index % period === 0 && index <= valuesLength - (period / 2)) { return label; } if (index === valuesLength) { return label; } } >>>>>>> fontSize: 14, autoSkip: false, userCallback: function (value, index, values) { const lastValue = dataSorted[index]; const label = moment(lastValue.date).format('MMM DD'); let valuesLength = values.length - 1; let period = Math.round(valuesLength / 10); if (index % period === 0 && index <= valuesLength - (period / 2)) { return label; } if (index === valuesLength) { return label; } }
<<<<<<< splitPosition: 0.62, ======= additionalStatusMessage: '', >>>>>>> splitPosition: 0.62, additionalStatusMessage: '',
<<<<<<< import country from "./data/country" import confirmedData from "./data/mapdataCon" import hospitalData from "./data/mapdataHos" ======= import { Chart } from "react-google-charts"; import country from "./data/country"; >>>>>>> import country from "./data/country" <<<<<<< <Header province={province} /> <Stat {...{ ...all, ...overall }} name={province && province.name} data={myData} /> <div className="card"> <h2> Infection Map {province ? `Β· ${province.name}` : false} {province ? ( <small onClick={() => setProvince(null)}>Return</small> ) : null} </h2> <Suspense fallback={<div className="loading">Loading...</div>}> <GoogleMap province={province} data={data} onClick={name => { const p = provincesByName[name]; if (p) { setProvince(p); } }} newData={myData} ======= <Grid container spacing={3} justify="center" wrap='wrap'> <Grid item xs={12}> <Header province={province} /> </Grid> <Grid item xs={10} sm={10} md={8} lg={6} xl={6}> <Stat {...{ ...all, ...overall }} name={province && province.name} data={myData} >>>>>>> <Header province={province} /> <Stat {...{ ...all, ...overall }} name={province && province.name} data={myData} /> <div className="card"> <h2> Infection Map {province ? `Β· ${province.name}` : false} {province ? ( <small onClick={() => setProvince(null)}>Return</small> ) : null} </h2> <Suspense fallback={<div className="loading">Loading...</div>}> <GoogleMap province={province} data={data} onClick={name => { const p = provincesByName[name]; if (p) { setProvince(p); } }} newData={myData} <<<<<<< </Suspense> <Area area={area} onChange={setProvince} data={myData} /> </div> {/*<ConfirmedMap confirmedData = {confirmedData} hospitalData={hospitalData}/>*/} <HistoryGraph countryData={country}/> <News /> <Tweets province={province} /> <Summary /> <Fallback /> ======= <div className="card"> <h2> Infection Map {province ? `Β· ${province.name}` : false} {province ? ( <small onClick={() => setProvince(null)}>Return</small> ) : null} </h2> <Suspense fallback={<div className="loading">Loading...</div>}> <Map province={province} data={data} onClick={name => { const p = provincesByName[name]; if (p) { setProvince(p); } }} newData={myData} /> {/*{*/} {/*province ? false :*/} {/*<div className="tip">*/} {/*Click on the state to check state details.*/} {/*</div>*/} {/*}*/} </Suspense> <Area area={area} onChange={setProvince} data={myData} /> </div> </Grid> </Grid> <Grid container spacing={3} justify="center" wrap='wrap'> <Grid item xs={10} sm={10} md={10} lg={4} xl={4}> <HistoryGraph countryData={country} /> </Grid> <Grid item xs={10} sm={10} md={10} lg={4} xl={4}> <News /> </Grid> <Grid item xs={10} sm={10} md={10} lg={4} xl={4}> <Tweets province={province} /> </Grid> <Grid item xs={12}> <ExposureSites /> </Grid> <Grid item xs={12} > <Fallback /> </Grid> </Grid> >>>>>>> </Suspense> <Area area={area} onChange={setProvince} data={myData} /> </div> {/*<ConfirmedMap confirmedData = {confirmedData} hospitalData={hospitalData}/>*/} <MbMap/> <HistoryGraph countryData={country}/> <News /> <Tweets province={province} /> {/*<Summary />*/} <Fallback /> {/*<Grid container spacing={1} justify="center" wrap='wrap'>*/} {/*<Grid item xs={12}>*/} {/*<Header province={province} />*/} {/*</Grid>*/} {/*<Grid item xs={10} sm={10} md={8} lg={6} xl={6}>*/} {/*<Stat*/} {/*{...{ ...all, ...overall }}*/} {/*name={province && province.name}*/} {/*data={myData}*/} {/*/>*/} {/*<div className="card">*/} {/*<h2>*/} {/*Infection Map {province ? `Β· ${province.name}` : false}*/} {/*{province ? (*/} {/*<small onClick={() => setProvince(null)}>Return</small>*/} {/*) : null}*/} {/*</h2>*/} {/*<Suspense fallback={<div className="loading">Loading...</div>}>*/} {/*<GoogleMap*/} {/*province={province}*/} {/*data={data}*/} {/*onClick={name => {*/} {/*const p = provincesByName[name];*/} {/*if (p) {*/} {/*setProvince(p);*/} {/*}*/} {/*}}*/} {/*newData={myData}*/} {/*/>*/} {/*/!*{*!/*/} {/*/!*province ? false :*!/*/} {/*/!*<div className="tip">*!/*/} {/*/!*Click on the state to check state details.*!/*/} {/*/!*</div>*!/*/} {/*/!*}*!/*/} {/*</Suspense>*/} {/*<Area area={area} onChange={setProvince} data={myData} />*/} {/*</div>*/} {/*</Grid>*/} {/*/!*</Grid>*!/*/} {/*/!*<Grid container spacing={1} justify="center" wrap='wrap'>*!/*/} {/*<Grid item xs={10} sm={10} md={10} lg={4} xl={4}>*/} {/*<HistoryGraph countryData={country} />*/} {/*</Grid>*/} {/*<Grid item xs={10} sm={10} md={10} lg={4} xl={4}>*/} {/*<News />*/} {/*</Grid>*/} {/*<Grid item xs={10} sm={10} md={10} lg={4} xl={4}>*/} {/*<Tweets province={province} />*/} {/*</Grid>*/} {/*<Grid item xs={12}>*/} {/*<ExposureSites />*/} {/*</Grid>*/} {/*<Grid item xs={12} >*/} {/*<Fallback />*/} {/*</Grid>*/} {/*</Grid>*/}
<<<<<<< define(['browser', 'capabilities', 'utils'], function(browser, capabilities, utils) { ======= define('feedback', ['browser', 'capabilities', 'z'], function(browser, capabilities, z) { >>>>>>> define(['browser', 'capabilities', 'z'], function(browser, capabilities, z) {
<<<<<<< function eckert1(Ξ», Ο†) { var Ξ± = Math.sqrt(8 / (3 * Ο€)); return [ Ξ± * Ξ» * (1 - Math.abs(Ο†) / Ο€), Ξ± * Ο† ]; } function eckert2(Ξ», Ο†) { var Ξ± = Math.sqrt(4 - 3 * Math.sin(Math.abs(Ο†))); return [ 2 / Math.sqrt(6 * Ο€) * Ξ» * Ξ±, sgn(Ο†) * Math.sqrt(2 * Ο€ / 3) * (2 - Ξ±) ]; } function eckert3(Ξ», Ο†) { var k = Math.sqrt(Ο€ * (4 + Ο€)); return [ 2 / k * Ξ» * (1 + Math.sqrt(1 - 4 * Ο† * Ο† / (Ο€ * Ο€))), 4 / k * Ο† ]; } function eckert4(Ξ», Ο†) { var Ξ΅ = 1e-6, k = (2 + Ο€ / 2) * Math.sin(Ο†); Ο† /= 2; for (var i = 0, Ξ΄ = Infinity; i < 10 && Math.abs(Ξ΄) > Ξ΅; i++) { var cosΟ† = Math.cos(Ο†); Ο† -= Ξ΄ = (Ο† + Math.sin(Ο†) * (cosΟ† + 2) - k) / (2 * cosΟ† * (1 + cosΟ†)); } return [ 2 / Math.sqrt(Ο€ * (4 + Ο€)) * Ξ» * (1 + Math.cos(Ο†)), 2 * Math.sqrt(Ο€ / (4 + Ο€)) * Math.sin(Ο†) ]; } function eckert5(Ξ», Ο†) { return [ Ξ» * (1 + Math.cos(Ο†)) / Math.sqrt(2 + Ο€), 2 * Ο† / Math.sqrt(2 + Ο€) ]; } function eckert6(Ξ», Ο†) { var Ξ΅ = 1e-6, k = (1 + Ο€ / 2) * Math.sin(Ο†); for (var i = 0, Ξ΄ = Infinity; i < 10 && Math.abs(Ξ΄) > Ξ΅; i++) { Ο† -= Ξ΄ = (Ο† + Math.sin(Ο†) - k) / (1 + Math.cos(Ο†)); } k = Math.sqrt(2 + Ο€); return [ Ξ» * (1 + Math.cos(Ο†)) / k, 2 * Ο† / k ]; } function mollweide(Ξ», Ο†) { if (Math.abs(Ο†) !== Ο€ / 2) { var k = Ο€ / 2 * Math.sin(Ο†); for (var i = 0, Ξ΄, Ξ΅ = 1e-6; i < 10; i++) { Ξ΄ = (Ο† + Math.sin(2 * Ο†) / 2 - k) / (1 + Math.cos(2 * Ο†)); if (Math.abs(Ξ΄) < Ξ΅) break; Ο† -= Ξ΄; } } return [ 2 * Math.SQRT2 / Ο€ * Ξ» * Math.cos(Ο†), Math.SQRT2 * Math.sin(Ο†) ]; } function homolosine(Ξ», Ο†) { return Math.abs(Ο†) > 41.737 * Ο€ / 180 ? mollweide(Ξ», Ο†) : sinusoidal(Ξ», Ο†); } function bonne() { var Ο†0 = Ο€ / 4, cotΟ†0 = 1 / Math.tan(Ο†0); var p = projection(function(Ξ», Ο†) { var ρ = cotΟ†0 + Ο†0 - Ο†, E = Ξ» * Math.cos(Ο†) / ρ; return [ ρ * Math.sin(E), cotΟ†0 - ρ * Math.cos(E) ]; }); p.parallel = function(_) { if (!arguments.length) return Ο†0 * 180 / Ο€; cotΟ†0 = 1 / Math.tan(Ο†0 = _ * Ο€ / 180); return p; }; return p; } ======= function collignon(Ξ», Ο†) { var Ξ± = Math.sqrt(Math.max(0, 1 - Math.sin(Ο†))); return [ (2 / sqrtΟ€) * Ξ» * Ξ±, sqrtΟ€ * (1 - Ξ±) ]; } >>>>>>> function eckert1(Ξ», Ο†) { var Ξ± = Math.sqrt(8 / (3 * Ο€)); return [ Ξ± * Ξ» * (1 - Math.abs(Ο†) / Ο€), Ξ± * Ο† ]; } function eckert2(Ξ», Ο†) { var Ξ± = Math.sqrt(4 - 3 * Math.sin(Math.abs(Ο†))); return [ 2 / Math.sqrt(6 * Ο€) * Ξ» * Ξ±, sgn(Ο†) * Math.sqrt(2 * Ο€ / 3) * (2 - Ξ±) ]; } function eckert3(Ξ», Ο†) { var k = Math.sqrt(Ο€ * (4 + Ο€)); return [ 2 / k * Ξ» * (1 + Math.sqrt(1 - 4 * Ο† * Ο† / (Ο€ * Ο€))), 4 / k * Ο† ]; } function eckert4(Ξ», Ο†) { var Ξ΅ = 1e-6, k = (2 + Ο€ / 2) * Math.sin(Ο†); Ο† /= 2; for (var i = 0, Ξ΄ = Infinity; i < 10 && Math.abs(Ξ΄) > Ξ΅; i++) { var cosΟ† = Math.cos(Ο†); Ο† -= Ξ΄ = (Ο† + Math.sin(Ο†) * (cosΟ† + 2) - k) / (2 * cosΟ† * (1 + cosΟ†)); } return [ 2 / Math.sqrt(Ο€ * (4 + Ο€)) * Ξ» * (1 + Math.cos(Ο†)), 2 * Math.sqrt(Ο€ / (4 + Ο€)) * Math.sin(Ο†) ]; } function eckert5(Ξ», Ο†) { return [ Ξ» * (1 + Math.cos(Ο†)) / Math.sqrt(2 + Ο€), 2 * Ο† / Math.sqrt(2 + Ο€) ]; } function eckert6(Ξ», Ο†) { var Ξ΅ = 1e-6, k = (1 + Ο€ / 2) * Math.sin(Ο†); for (var i = 0, Ξ΄ = Infinity; i < 10 && Math.abs(Ξ΄) > Ξ΅; i++) { Ο† -= Ξ΄ = (Ο† + Math.sin(Ο†) - k) / (1 + Math.cos(Ο†)); } k = Math.sqrt(2 + Ο€); return [ Ξ» * (1 + Math.cos(Ο†)) / k, 2 * Ο† / k ]; } function mollweide(Ξ», Ο†) { if (Math.abs(Ο†) !== Ο€ / 2) { var k = Ο€ / 2 * Math.sin(Ο†); for (var i = 0, Ξ΄, Ξ΅ = 1e-6; i < 10; i++) { Ξ΄ = (Ο† + Math.sin(2 * Ο†) / 2 - k) / (1 + Math.cos(2 * Ο†)); if (Math.abs(Ξ΄) < Ξ΅) break; Ο† -= Ξ΄; } } return [ 2 * Math.SQRT2 / Ο€ * Ξ» * Math.cos(Ο†), Math.SQRT2 * Math.sin(Ο†) ]; } function homolosine(Ξ», Ο†) { return Math.abs(Ο†) > 41.737 * Ο€ / 180 ? mollweide(Ξ», Ο†) : sinusoidal(Ξ», Ο†); } function bonne() { var Ο†0 = Ο€ / 4, cotΟ†0 = 1 / Math.tan(Ο†0); var p = projection(function(Ξ», Ο†) { var ρ = cotΟ†0 + Ο†0 - Ο†, E = Ξ» * Math.cos(Ο†) / ρ; return [ ρ * Math.sin(E), cotΟ†0 - ρ * Math.cos(E) ]; }); p.parallel = function(_) { if (!arguments.length) return Ο†0 * 180 / Ο€; cotΟ†0 = 1 / Math.tan(Ο†0 = _ * Ο€ / 180); return p; }; return p; } function collignon(Ξ», Ο†) { var Ξ± = Math.sqrt(Math.max(0, 1 - Math.sin(Ο†))); return [ (2 / sqrtΟ€) * Ξ» * Ξ±, sqrtΟ€ * (1 - Ξ±) ]; } <<<<<<< d3.geo.bonne = bonne; ======= d3.geo.collignon = function() { return projection(collignon) }; >>>>>>> d3.geo.bonne = bonne; d3.geo.collignon = function() { return projection(collignon) };
<<<<<<< function orthographic(Ξ», Ο†) { return [ Math.cos(Ο†) * Math.sin(Ξ»), Math.sin(Ο†) ]; } function orthographicInverse(x, y) { return [ Math.atan2(x, Math.sqrt(1 - x * x - y * y)), Math.asin(y) ]; } function gnomonic(Ξ», Ο†) { return [ Math.tan(Ξ»), Math.tan(Ο†) / Math.cos(Ξ») ]; } function gnomonicInverse(x, y) { return [ Math.atan(x), Math.asin(y / Math.sqrt(x * x + y * y + 1)) ]; } function azimuthalEqualArea(Ξ», Ο†) { var cosΟ† = Math.cos(Ο†), k = Math.sqrt(2 / (1 + cosΟ† * Math.cos(Ξ»))); return [ k * cosΟ† * Math.sin(Ξ»), k * Math.sin(Ο†) ]; } function azimuthalEqualAreaInverse(x, y) { var z2 = 4 - x * x - y * y, z = Math.sqrt(z2); return [ Math.atan2(z * x, z2 - 2), Math.asin(z * y / 2) ]; } function azimuthalEquidistant(Ξ», Ο†) { var cosΟ† = Math.cos(Ο†), c = Math.acos(cosΟ† * Math.cos(Ξ»)); return c ? [ (c /= Math.sin(c)) * cosΟ† * Math.sin(Ξ»), c * Math.sin(Ο†) ] : [0, 0]; } function azimuthalEquidistantInverse(x, y) { var c = Math.sqrt(x * x + y * y), sinc = Math.sin(c); return c ? [ Math.atan2(x * sinc, c * Math.cos(c)), Math.asin(y * sinc / c) ] : [0, 0]; } function verticalPerspective() { var P = 5; var p = projection(function(Ξ», Ο†) { var cosΟ† = Math.cos(Ο†), k = (P - 1) / (P - (cosΟ† * Math.cos(Ξ»))); return [ k * cosΟ† * Math.sin(Ξ»), k * Math.sin(Ο†) ]; }, function(x, y) { var ρ2 = x * x + y * y, ρ = Math.sqrt(ρ2), sinc = (P - Math.sqrt(1 - ρ2 * (P + 1) / (P - 1))) / ((P - 1) / ρ + ρ / (P - 1)); return [ Math.atan2(x * sinc, ρ * Math.sqrt(1 - sinc * sinc)), ρ ? Math.asin(y * sinc / ρ) : 0 ]; }); p.distance = function(_) { if (!arguments.length) return P; P = +_; return p; } return p; } function guyou(Ξ», Ο†) { return ellipticFi(Ξ», sgn(Ο†) * Math.log(Math.tan(.5 * (Math.abs(Ο†) + Ο€ / 2))), .5); } // Calculate F(Ο†+iψ|m). // See Abramowitz and Stegun, 17.4.11. function ellipticFi(Ο†, ψ, m) { var r = Math.abs(Ο†), i = Math.abs(ψ), sinhψ = .5 * ((sinhψ = Math.exp(i)) - 1 / sinhψ); if (r) { var cscΟ† = 1 / Math.sin(r), cotΟ†2 = (cotΟ†2 = Math.cos(r) * cscΟ†) * cotΟ†2, b = -(cotΟ†2 + m * (sinhψ * sinhψ * cscΟ† * cscΟ† + 1) - 1), cotΞ»2 = .5 * (-b + Math.sqrt(b * b - 4 * (m - 1) * cotΟ†2)); return [ ellipticF(Math.atan(1 / Math.sqrt(cotΞ»2)), m) * sgn(Ο†), ellipticF(Math.atan(Math.sqrt(Math.max(0, cotΞ»2 / cotΟ†2 - 1) / m)), 1 - m) * sgn(ψ) ]; } else return [0, ellipticF(Math.atan(sinhψ), 1 - m) * sgn(ψ)]; } // Calculate F(Ο†|m) where m = kΒ² = sinΒ²Ξ±. // See Abramowitz and Stegun, 17.6.7. function ellipticF(Ο†, m) { var a = 1, b = Math.sqrt(1 - m), c = Math.sqrt(m); for (var i = 0; Math.abs(c) > Ξ΅; i++) { if (Ο† % Ο€) { var dΟ† = Math.atan(b * Math.tan(Ο†) / a); if (dΟ† < 0) dΟ† += Ο€; Ο† += dΟ† + ~~(Ο† / Ο€) * Ο€; } else Ο† += Ο†; c = (a + b) / 2; b = Math.sqrt(a * b); c = ((a = c) - b) / 2; } return Ο† / (Math.pow(2, i) * a); } function satellite() { var Ο‰ = 0, cosΟ‰ = 1, sinΟ‰ = 0, distance, verticalPerspective = d3.geo.verticalPerspective().scale(1).translate([0, 0]); var p = projection(function(Ξ», Ο†) { var coordinates = verticalPerspective([Ξ» * 180 / Ο€, Ο† * 180 / Ο€]), y = -coordinates[1], A = y * Math.sin(Ο‰ / (distance - 1)) + cosΟ‰; return [ coordinates[0] * Math.cos(Ο‰ / A), y / A ]; }, function(x, y) { var k = (distance - 1) / (distance - 1 - y * sinΟ‰), coordinates = verticalPerspective.invert([k * x, -k * y * cosΟ‰]); return [ coordinates[0] * Ο€ / 180, coordinates[1] * Ο€ / 180 ]; }); p.distance = function(_) { if (!arguments.length) return distance; verticalPerspective.distance(distance = +_); return p; }; p.tilt = function(_) { if (!arguments.length) return Ο‰ * 180 / Ο€; cosΟ‰ = Math.cos(Ο‰ = _ * Ο€ / 180); sinΟ‰ = Math.sin(Ο‰); return p; }; return p.distance(1.4); } function lagrange() { var n = .5; var p = projection(function(Ξ», Ο†) { if (Math.abs(Math.abs(Ο†) - Ο€ / 2) < Ξ΅) return [0, Ο† < 0 ? -2 : 2]; var sinΟ† = Math.sin(Ο†), v = Math.pow((1 + sinΟ†) / (1 - sinΟ†), n / 2), c = .5 * (v + 1 / v) + Math.cos(Ξ» *= n); return [ 2 * Math.sin(Ξ») / c, (v - 1 / v) / c ]; }); p.spacing = function(_) { if (!arguments.length) return n; n = +_; return p; }; return p; } ======= function azimuthal(scale) { return function(Ξ», Ο†) { var cosΞ» = Math.cos(Ξ»), cosΟ† = Math.cos(Ο†), k = scale(cosΞ» * cosΟ†); return [ k * cosΟ† * Math.sin(Ξ»), k * Math.sin(Ο†) ]; }; } // Optimized special case of azimuthal. function orthographic(Ξ», Ο†) { return [ Math.cos(Ο†) * Math.sin(Ξ»), Math.sin(Ο†) ]; } var stereographic = azimuthal(function(cosΞ»cosΟ†) { return 1 / (1 + cosΞ»cosΟ†); }); var gnomonic = azimuthal(function(cosΞ»cosΟ†) { return 1 / cosΞ»cosΟ†; }); var azimuthalEquidistant = azimuthal(function(cosΞ»cosΟ†) { var c = Math.acos(cosΞ»cosΟ†); return c && c / Math.sin(c); }); var azimuthalEqualArea = azimuthal(function(cosΞ»cosΟ†) { return Math.sqrt(2 / (1 + cosΞ»cosΟ†)); }); function equirectangular(Ξ», Ο†) { return [ Ξ», Ο† ]; } function mercator(Ξ», Ο†) { return [ Ξ» / (2 * Ο€), Math.max(-.5, Math.min(+.5, Math.log(Math.tan(Ο€ / 4 + Ο† / 2)) / (2 * Ο€))) ]; } function mercatorInverse(x, y) { return [ 2 * Ο€ * x, 2 * Math.atan(Math.exp(2 * Ο€ * y)) - Ο€ / 2 ]; } >>>>>>> function azimuthal(scale) { return function(Ξ», Ο†) { var cosΞ» = Math.cos(Ξ»), cosΟ† = Math.cos(Ο†), k = scale(cosΞ» * cosΟ†); return [ k * cosΟ† * Math.sin(Ξ»), k * Math.sin(Ο†) ]; }; } // Optimized special case of azimuthal. function orthographic(Ξ», Ο†) { return [ Math.cos(Ο†) * Math.sin(Ξ»), Math.sin(Ο†) ]; } function orthographicInverse(x, y) { return [ Math.atan2(x, Math.sqrt(1 - x * x - y * y)), Math.asin(y) ]; } function verticalPerspective() { var P = 5; var p = projection(function(Ξ», Ο†) { var cosΟ† = Math.cos(Ο†), k = (P - 1) / (P - (cosΟ† * Math.cos(Ξ»))); return [ k * cosΟ† * Math.sin(Ξ»), k * Math.sin(Ο†) ]; }, function(x, y) { var ρ2 = x * x + y * y, ρ = Math.sqrt(ρ2), sinc = (P - Math.sqrt(1 - ρ2 * (P + 1) / (P - 1))) / ((P - 1) / ρ + ρ / (P - 1)); return [ Math.atan2(x * sinc, ρ * Math.sqrt(1 - sinc * sinc)), ρ ? Math.asin(y * sinc / ρ) : 0 ]; }); p.distance = function(_) { if (!arguments.length) return P; P = +_; return p; } return p; } function guyou(Ξ», Ο†) { return ellipticFi(Ξ», sgn(Ο†) * Math.log(Math.tan(.5 * (Math.abs(Ο†) + Ο€ / 2))), .5); } // Calculate F(Ο†+iψ|m). // See Abramowitz and Stegun, 17.4.11. function ellipticFi(Ο†, ψ, m) { var r = Math.abs(Ο†), i = Math.abs(ψ), sinhψ = .5 * ((sinhψ = Math.exp(i)) - 1 / sinhψ); if (r) { var cscΟ† = 1 / Math.sin(r), cotΟ†2 = (cotΟ†2 = Math.cos(r) * cscΟ†) * cotΟ†2, b = -(cotΟ†2 + m * (sinhψ * sinhψ * cscΟ† * cscΟ† + 1) - 1), cotΞ»2 = .5 * (-b + Math.sqrt(b * b - 4 * (m - 1) * cotΟ†2)); return [ ellipticF(Math.atan(1 / Math.sqrt(cotΞ»2)), m) * sgn(Ο†), ellipticF(Math.atan(Math.sqrt(Math.max(0, cotΞ»2 / cotΟ†2 - 1) / m)), 1 - m) * sgn(ψ) ]; } else return [0, ellipticF(Math.atan(sinhψ), 1 - m) * sgn(ψ)]; } // Calculate F(Ο†|m) where m = kΒ² = sinΒ²Ξ±. // See Abramowitz and Stegun, 17.6.7. function ellipticF(Ο†, m) { var a = 1, b = Math.sqrt(1 - m), c = Math.sqrt(m); for (var i = 0; Math.abs(c) > Ξ΅; i++) { if (Ο† % Ο€) { var dΟ† = Math.atan(b * Math.tan(Ο†) / a); if (dΟ† < 0) dΟ† += Ο€; Ο† += dΟ† + ~~(Ο† / Ο€) * Ο€; } else Ο† += Ο†; c = (a + b) / 2; b = Math.sqrt(a * b); c = ((a = c) - b) / 2; } return Ο† / (Math.pow(2, i) * a); } function satellite() { var Ο‰ = 0, cosΟ‰ = 1, sinΟ‰ = 0, distance, verticalPerspective = d3.geo.verticalPerspective().scale(1).translate([0, 0]); var p = projection(function(Ξ», Ο†) { var coordinates = verticalPerspective([Ξ» * 180 / Ο€, Ο† * 180 / Ο€]), y = -coordinates[1], A = y * Math.sin(Ο‰ / (distance - 1)) + cosΟ‰; return [ coordinates[0] * Math.cos(Ο‰ / A), y / A ]; }, function(x, y) { var k = (distance - 1) / (distance - 1 - y * sinΟ‰), coordinates = verticalPerspective.invert([k * x, -k * y * cosΟ‰]); return [ coordinates[0] * Ο€ / 180, coordinates[1] * Ο€ / 180 ]; }); p.distance = function(_) { if (!arguments.length) return distance; verticalPerspective.distance(distance = +_); return p; }; p.tilt = function(_) { if (!arguments.length) return Ο‰ * 180 / Ο€; cosΟ‰ = Math.cos(Ο‰ = _ * Ο€ / 180); sinΟ‰ = Math.sin(Ο‰); return p; }; return p.distance(1.4); } function lagrange() { var n = .5; var p = projection(function(Ξ», Ο†) { if (Math.abs(Math.abs(Ο†) - Ο€ / 2) < Ξ΅) return [0, Ο† < 0 ? -2 : 2]; var sinΟ† = Math.sin(Ο†), v = Math.pow((1 + sinΟ†) / (1 - sinΟ†), n / 2), c = .5 * (v + 1 / v) + Math.cos(Ξ» *= n); return [ 2 * Math.sin(Ξ») / c, (v - 1 / v) / c ]; }); p.spacing = function(_) { if (!arguments.length) return n; n = +_; return p; }; return p; } var stereographic = azimuthal(function(cosΞ»cosΟ†) { return 1 / (1 + cosΞ»cosΟ†); }); var gnomonic = azimuthal(function(cosΞ»cosΟ†) { return 1 / cosΞ»cosΟ†; }); function gnomonicInverse(x, y) { return [ Math.atan(x), Math.asin(y / Math.sqrt(x * x + y * y + 1)) ]; } var azimuthalEquidistant = azimuthal(function(cosΞ»cosΟ†) { var c = Math.acos(cosΞ»cosΟ†); return c && c / Math.sin(c); }); function azimuthalEquidistantInverse(x, y) { var c = Math.sqrt(x * x + y * y), sinc = Math.sin(c); return c ? [ Math.atan2(x * sinc, c * Math.cos(c)), Math.asin(y * sinc / c) ] : [0, 0]; } var azimuthalEqualArea = azimuthal(function(cosΞ»cosΟ†) { return Math.sqrt(2 / (1 + cosΞ»cosΟ†)); }); function azimuthalEqualAreaInverse(x, y) { var z2 = 4 - x * x - y * y, z = Math.sqrt(z2); return [ Math.atan2(z * x, z2 - 2), Math.asin(z * y / 2) ]; } function equirectangular(Ξ», Ο†) { return [ Ξ», Ο† ]; } function mercator(Ξ», Ο†) { return [ Ξ» / (2 * Ο€), Math.max(-.5, Math.min(+.5, Math.log(Math.tan(Ο€ / 4 + Ο† / 2)) / (2 * Ο€))) ]; } function mercatorInverse(x, y) { return [ 2 * Ο€ * x, 2 * Math.atan(Math.exp(2 * Ο€ * y)) - Ο€ / 2 ]; } <<<<<<< d3.geo.azimuthalEqualArea = function() { return projection(azimuthalEqualArea, azimuthalEqualAreaInverse); }; d3.geo.azimuthalEquidistant = function() { return projection(azimuthalEquidistant, azimuthalEquidistantInverse); }; ======= d3.geo.azimuthalEqualArea = function() { return projection(azimuthalEqualArea); }; d3.geo.azimuthalEquidistant = function() { return projection(azimuthalEquidistant); }; >>>>>>> d3.geo.azimuthalEqualArea = function() { return projection(azimuthalEqualArea, azimuthalEqualAreaInverse); }; d3.geo.azimuthalEquidistant = function() { return projection(azimuthalEquidistant, azimuthalEquidistantInverse); }; <<<<<<< d3.geo.gnomonic = function() { return projection(gnomonic, gnomonicInverse); }; d3.geo.guyou = function() { return projection(guyou); }; ======= d3.geo.equirectangular = function() { return projection(equirectangular, equirectangular); }; d3.geo.gnomonic = function() { return projection(gnomonic); }; >>>>>>> d3.geo.equirectangular = function() { return projection(equirectangular, equirectangular); }; d3.geo.gnomonic = function() { return projection(gnomonic, gnomonicInverse); }; d3.geo.guyou = function() { return projection(guyou); }; <<<<<<< d3.geo.orthographic = function() { return projection(orthographic, orthographicInverse); }; ======= d3.geo.orthographic = function() { return projection(orthographic); }; >>>>>>> d3.geo.orthographic = function() { return projection(orthographic, orthographicInverse); }; <<<<<<< d3.geo.stereographic = function() { return verticalPerspective().distance(-1); }; ======= d3.geo.stereographic = function() { return projection(stereographic); }; >>>>>>> d3.geo.stereographic = function() { return projection(stereographic); };
<<<<<<< d3.geo.azimuthalEqualArea = function() { return projection(azimuthalEqualArea, azimuthalEqualAreaInverse); }; d3.geo.azimuthalEquidistant = function() { return projection(azimuthalEquidistant, azimuthalEquidistantInverse); }; ======= d3.geo.august = function() { return projection(august); }; >>>>>>> d3.geo.august = function() { return projection(august); }; d3.geo.azimuthalEqualArea = function() { return projection(azimuthalEqualArea, azimuthalEqualAreaInverse); }; d3.geo.azimuthalEquidistant = function() { return projection(azimuthalEquidistant, azimuthalEquidistantInverse); }; <<<<<<< d3.geo.gnomonic = function() { return projection(gnomonic, gnomonicInverse); }; d3.geo.guyou = function() { return projection(guyou); }; ======= d3.geo.eisenlohr = function() { return projection(eisenlohr); }; >>>>>>> d3.geo.eisenlohr = function() { return projection(eisenlohr); }; d3.geo.gnomonic = function() { return projection(gnomonic, gnomonicInverse); }; d3.geo.guyou = function() { return projection(guyou); }; <<<<<<< d3.geo.nellHammer = function() { return projection(nellHammer); }; d3.geo.orthographic = function() { return projection(orthographic); }; d3.geo.polyconic = function() { return projection(polyconic); }; ======= d3.geo.nellHammer = function() { return projection(nellHammer, nellHammerInverse); }; d3.geo.polyconic = function() { return projection(polyconic, polyconicInverse); }; >>>>>>> d3.geo.nellHammer = function() { return projection(nellHammer, nellHammerInverse); }; d3.geo.orthographic = function() { return projection(orthographic); }; d3.geo.polyconic = function() { return projection(polyconic, polyconicInverse); };
<<<<<<< for (var i = 0, Ξ΄; i < 10 && Math.abs(Ξ΄) > Ξ΅; i++) { Ο† -= Ξ΄ = (Ο† + Math.sin(2 * Ο†) / 2 - k) / (1 + Math.cos(2 * Ο†)); ======= for (var i = 0, Ξ΄ = Infinity; i < 10 && Math.abs(Ξ΄) > Ξ΅; i++) { Ο† -= Ξ΄ = (Ο† + Math.sin(2 * Ο†) / 2 - k) / (1 + Math.cos(2 * Ο†)); >>>>>>> for (var i = 0, Ξ΄ = Infinity; i < 10 && Math.abs(Ξ΄) > Ξ΅; i++) { Ο† -= Ξ΄ = (Ο† + Math.sin(2 * Ο†) / 2 - k) / (1 + Math.cos(2 * Ο†)); <<<<<<< d3.geo.albersEqualArea = function() { return doubleParallelProjection(albers); }; d3.geo.azimuthalEqualArea = function() { return projection(azimuthalEqualArea); }; d3.geo.azimuthalEquidistant = function() { return projection(azimuthalEquidistant); }; ======= d3.geo.albersEqualArea = function() { return doubleParallelProjection(albers, albersInverse); }; >>>>>>> d3.geo.albersEqualArea = function() { return doubleParallelProjection(albers, albersInverse); }; d3.geo.azimuthalEqualArea = function() { return projection(azimuthalEqualArea); }; d3.geo.azimuthalEquidistant = function() { return projection(azimuthalEquidistant); }; <<<<<<< d3.geo.stereographic = verticalPerspective().distance(-1); d3.geo.vanDerGrinten = function() { return projection(vanDerGrinten); }; d3.geo.verticalPerspective = verticalPerspective; ======= d3.geo.vanDerGrinten = function() { return projection(vanDerGrinten, vanDerGrintenInverse); }; >>>>>>> d3.geo.stereographic = verticalPerspective().distance(-1); d3.geo.vanDerGrinten = function() { return projection(vanDerGrinten, vanDerGrintenInverse); }; d3.geo.verticalPerspective = verticalPerspective;
<<<<<<< function eckert1(Ξ», Ο†) { var Ξ± = Math.sqrt(8 / (3 * Ο€)); return [ Ξ± * Ξ» * (1 - Math.abs(Ο†) / Ο€), Ξ± * Ο† ]; } function eckert2(Ξ», Ο†) { var Ξ± = Math.sqrt(4 - 3 * Math.sin(Math.abs(Ο†))); return [ 2 / Math.sqrt(6 * Ο€) * Ξ» * Ξ±, sgn(Ο†) * Math.sqrt(2 * Ο€ / 3) * (2 - Ξ±) ]; } function eckert3(Ξ», Ο†) { var k = Math.sqrt(Ο€ * (4 + Ο€)); return [ 2 / k * Ξ» * (1 + Math.sqrt(1 - 4 * Ο† * Ο† / (Ο€ * Ο€))), 4 / k * Ο† ]; } function eckert5(Ξ», Ο†) { return [ Ξ» * (1 + Math.cos(Ο†)) / Math.sqrt(2 + Ο€), 2 * Ο† / Math.sqrt(2 + Ο€) ]; } function orthographic(Ξ», Ο†) { return [ Math.cos(Ο†) * Math.sin(Ξ»), Math.sin(Ο†) ]; } function stereographic(Ξ», Ο†) { var k = 2 / (1 + Math.cos(Ο†) * Math.cos(Ξ»)); return [ k * Math.cos(Ο†) * Math.sin(Ξ»), k * Math.sin(Ο†) ]; } ======= function gnomonic(Ξ», Ο†) { console.log( Ξ», Ο†, Math.tan(Ξ»), Math.tan(Ο†) / Math.cos(Ξ») ); return [ 0,//Math.tan(Ξ»), 0//Math.tan(Ο†) / Math.cos(Ξ») ]; } >>>>>>> function eckert1(Ξ», Ο†) { var Ξ± = Math.sqrt(8 / (3 * Ο€)); return [ Ξ± * Ξ» * (1 - Math.abs(Ο†) / Ο€), Ξ± * Ο† ]; } function eckert2(Ξ», Ο†) { var Ξ± = Math.sqrt(4 - 3 * Math.sin(Math.abs(Ο†))); return [ 2 / Math.sqrt(6 * Ο€) * Ξ» * Ξ±, sgn(Ο†) * Math.sqrt(2 * Ο€ / 3) * (2 - Ξ±) ]; } function eckert3(Ξ», Ο†) { var k = Math.sqrt(Ο€ * (4 + Ο€)); return [ 2 / k * Ξ» * (1 + Math.sqrt(1 - 4 * Ο† * Ο† / (Ο€ * Ο€))), 4 / k * Ο† ]; } function eckert5(Ξ», Ο†) { return [ Ξ» * (1 + Math.cos(Ο†)) / Math.sqrt(2 + Ο€), 2 * Ο† / Math.sqrt(2 + Ο€) ]; } function orthographic(Ξ», Ο†) { return [ Math.cos(Ο†) * Math.sin(Ξ»), Math.sin(Ο†) ]; } function stereographic(Ξ», Ο†) { var k = 2 / (1 + Math.cos(Ο†) * Math.cos(Ξ»)); return [ k * Math.cos(Ο†) * Math.sin(Ξ»), k * Math.sin(Ο†) ]; } function gnomonic(Ξ», Ο†) { return [ Math.tan(Ξ»), Math.tan(Ο†) / Math.cos(Ξ») ]; } <<<<<<< d3.geo.eckert1 = function() { return projection(eckert1); }; d3.geo.eckert2 = function() { return projection(eckert2); }; d3.geo.eckert3 = function() { return projection(eckert3); }; d3.geo.eckert5 = function() { return projection(eckert5); }; ======= d3.geo.gnomonic = function() { return projection(gnomonic); }; >>>>>>> d3.geo.eckert1 = function() { return projection(eckert1); }; d3.geo.eckert2 = function() { return projection(eckert2); }; d3.geo.eckert3 = function() { return projection(eckert3); }; d3.geo.eckert5 = function() { return projection(eckert5); }; d3.geo.gnomonic = function() { return projection(gnomonic); };
<<<<<<< d3.geo.albersEqualArea = albers; d3.geo.azimuthalEqualArea = function() { return projection(azimuthalEqualArea); }; d3.geo.azimuthalEquidistant = function() { return projection(azimuthalEquidistant); }; d3.geo.bonne = bonne; ======= d3.geo.albersEqualArea = function() { return doubleParallelProjection(albers); }; d3.geo.bonne = function() { return singleParallelProjection(bonne, bonneInverse).parallel(45); }; >>>>>>> d3.geo.albersEqualArea = function() { return doubleParallelProjection(albers); }; d3.geo.azimuthalEqualArea = function() { return projection(azimuthalEqualArea); }; d3.geo.azimuthalEquidistant = function() { return projection(azimuthalEquidistant); }; d3.geo.bonne = function() { return singleParallelProjection(bonne, bonneInverse).parallel(45); }; <<<<<<< d3.geo.gnomonic = function() { return projection(gnomonic); }; d3.geo.hammer = function() { return projection(hammer); }; d3.geo.homolosine = function() { return projection(homolosine); }; ======= d3.geo.hammer = function() { return projection(hammer, hammerInverse); }; d3.geo.homolosine = function() { return projection(homolosine, homolosineInverse); }; >>>>>>> d3.geo.gnomonic = function() { return projection(gnomonic); }; d3.geo.hammer = function() { return projection(hammer, hammerInverse); }; d3.geo.homolosine = function() { return projection(homolosine, homolosineInverse); }; <<<<<<< d3.geo.sinusoidal = function() { return projection(sinusoidal); }; d3.geo.stereographic = verticalPerspective().distance(-1); ======= d3.geo.sinusoidal = function() { return projection(sinusoidal, sinusoidalInverse); }; >>>>>>> d3.geo.sinusoidal = function() { return projection(sinusoidal, sinusoidalInverse); }; d3.geo.stereographic = verticalPerspective().distance(-1);
<<<<<<< if (ci === 'all') { // TODO: better way will be this.struct() ci = structObjects.reduce((res, key) => { res[key] = restruct[key].keys(); ======= if (ci === 'all') { // TODO: better way will be this.struct() ci = structObjects.reduce((res, key) => { res[key] = Array.from(restruct[key].keys()); >>>>>>> if (ci === 'all') { // TODO: better way will be this.struct() ci = structObjects.reduce((res, key) => { res[key] = Array.from(restruct[key].keys()); <<<<<<< var selection = this.selection() || {}; var res = structObjects.reduce((result, key) => { result[key] = selection[key] ? selection[key].slice() : []; return result; ======= const selection = this.selection() || {}; const res = structObjects.reduce((res, key) => { res[key] = selection[key] ? selection[key].slice() : []; return res; >>>>>>> const selection = this.selection() || {}; const res = structObjects.reduce((acc, key) => { acc[key] = selection[key] ? selection[key].slice() : []; return acc; <<<<<<< if ('bonds' in res) { res.bonds.forEach((bid) => { var bond = struct.bonds.get(bid); ======= if (res.bonds) { res.bonds.forEach(bid => { const bond = struct.bonds.get(bid); >>>>>>> if (res.bonds) { res.bonds.forEach((bid) => { const bond = struct.bonds.get(bid); <<<<<<< if ('atoms' in res && 'bonds' in res) { struct.bonds.each((bid) => { if (!('bonds' in res) || res.bonds.indexOf(bid) < 0) { var bond = struct.bonds.get(bid); ======= if (res.atoms && res.bonds) { struct.bonds.forEach((bond, bid) => { if (!res.bonds.indexOf(bid) < 0) { const bond = struct.bonds.get(bid); >>>>>>> if (res.atoms && res.bonds) { struct.bonds.forEach((bond, bid) => { if (!res.bonds.indexOf(bid) < 0) {
<<<<<<< selected.atoms.forEach((aid) => { pos.atoms[aid] = struct.atoms.get(aid).pp; }); ======= selected.atoms.forEach(aid => pos.atoms.set(aid, struct.atoms.get(aid).pp)); >>>>>>> selected.atoms.forEach((aid) => { pos.atoms.set(aid, struct.atoms.get(aid).pp); }); <<<<<<< pos.bonds[bid] = Vec2.lc2( pos.atoms[bond.begin], 0.5, pos.atoms[bond.end], 0.5 ); ======= pos.bonds.set(bid, Vec2.lc2(pos.atoms.get(bond.begin), 0.5, pos.atoms.get(bond.end), 0.5)); >>>>>>> pos.bonds.set(bid, Vec2.lc2(pos.atoms.get(bond.begin), 0.5, pos.atoms.get(bond.end), 0.5)); <<<<<<< maps.forEach((mp) => { result[mp] = Object.keys(pos[mp]).reduce((res, srcId) => { const skip = { map: mp, id: +srcId }; const item = findMaps[mp](restruct, pos[mp][srcId], skip, null, scale); ======= maps.forEach(mp => { result[mp] = Array.from(pos[mp].keys()).reduce((res, srcId) => { const skip = { map: mp, id: srcId }; const item = findMaps[mp](restruct, pos[mp].get(srcId), skip, null, scale); if (item) res.set(srcId, item.id); >>>>>>> maps.forEach((mp) => { result[mp] = Array.from(pos[mp].keys()).reduce((res, srcId) => { const skip = { map: mp, id: srcId }; const item = findMaps[mp](restruct, pos[mp].get(srcId), skip, null, scale); if (item) res.set(srcId, item.id);
<<<<<<< const Set = require('../../util/set'); const Action = require('../action'); const Struct = require('../../chem/struct'); const LassoHelper = require('./helper/lasso'); const SGroup = require('./sgroup'); const Atom = require('./atom'); ======= var Set = require('../../util/set'); var Action = require('../action'); var Struct = require('../../chem/struct'); var LassoHelper = require('./helper/lasso'); var SGroup = require('./sgroup'); var Atom = require('./atom'); var utils = require('./utils'); >>>>>>> const Set = require('../../util/set'); const Action = require('../action'); const Struct = require('../../chem/struct'); const LassoHelper = require('./helper/lasso'); const SGroup = require('./sgroup'); const Atom = require('./atom'); const utils = require('./utils'); <<<<<<< const render = this.editor.render; ======= var rnd = this.editor.render; var restruct = rnd.ctab; >>>>>>> const render = this.editor.render; const restruct = render.ctab; <<<<<<< this.dragCtx.action.perform(render.ctab); ======= this.dragCtx.action.perform(restruct); >>>>>>> this.dragCtx.action.perform(restruct); <<<<<<< ======= var expSel = this.editor.explicitSelected(); >>>>>>> const expSel = this.editor.explicitSelected(); <<<<<<< render.ctab, this.editor.explicitSelected(), render.page2obj(event).sub(this.dragCtx.xy0) ); ======= restruct, expSel, rnd.page2obj(event).sub(this.dragCtx.xy0)); >>>>>>> restruct, expSel, render.page2obj(event).sub(this.dragCtx.xy0)); <<<<<<< if (['atoms'/* , 'bonds'*/].indexOf(this.dragCtx.item.map) >= 0) { // TODO add bond-to-bond fusing const ci = this.editor.findItem(event, [this.dragCtx.item.map], this.dragCtx.item); this.editor.hover((ci && ci.map === this.dragCtx.item.map) ? ci : null); ======= this.dragCtx.mergeItems = closestToMerge(restruct, this.editor.findMerge(expSel, ['atoms', 'bonds'])); if (this.dragCtx.mergeItems) { const hoverMerge = { atoms: Object.values(this.dragCtx.mergeItems.atoms), bonds: Object.values(this.dragCtx.mergeItems.bonds) }; this.editor.hover({ map: 'merge', id: +Date.now(), items: hoverMerge }); } else { this.editor.hover(null); >>>>>>> this.dragCtx.mergeItems = closestToMerge(restruct, this.editor.findMerge(expSel, ['atoms', 'bonds'])); if (this.dragCtx.mergeItems) { const hoverMerge = { atoms: Object.values(this.dragCtx.mergeItems.atoms), bonds: Object.values(this.dragCtx.mergeItems.bonds) }; this.editor.hover({ map: 'merge', id: +Date.now(), items: hoverMerge }); } else { this.editor.hover(null); <<<<<<< if (['atoms'/* , 'bonds'*/].indexOf(this.dragCtx.item.map) >= 0) { // TODO add bond-to-bond fusing var ci = this.editor.findItem(event, [this.dragCtx.item.map], this.dragCtx.item); if (ci && ci.map === this.dragCtx.item.map) { var restruct = this.editor.render.ctab; this.editor.hover(null); this.editor.selection(null); ======= const restruct = this.editor.render.ctab; if (this.dragCtx.mergeItems) { this.editor.selection(null); // merge single atoms Object.entries(this.dragCtx.mergeItems.atoms).forEach(pair => { >>>>>>> const restruct = this.editor.render.ctab; if (this.dragCtx.mergeItems) { this.editor.selection(null); // merge single atoms Object.entries(this.dragCtx.mergeItems.atoms).forEach(pair => {
<<<<<<< 'calc-cip': calculateCip, 'recognize-molecule': function () { dialog(modal.recognizeMolecule, { server: server }).then(function (res) { if (res.fragment) { //struct.rescale(); selectAction('paste', res.struct); } else updateMolecule(res.struct); }); } ======= 'calc-cip': calculateCip, 'check-struct': function () { dialog(modal.checkStruct, { struct: molfile.stringify(ui.ctab), server: server }).then(function (res) { checkAndCalc(); console.info('RES', res); }); }, 'calc-val': function () { dialog(modal.calculatedValues).then(function (res) { checkAndCalc(); console.info('RES', res); }); } >>>>>>> 'calc-cip': calculateCip, 'recognize-molecule': function () { dialog(modal.recognizeMolecule, { server: server }).then(function (res) { if (res.fragment) { //struct.rescale(); selectAction('paste', res.struct); } else updateMolecule(res.struct); }); }, 'check-struct': function () { dialog(modal.checkStruct, { struct: molfile.stringify(ui.ctab), server: server }).then(function (res) { checkAndCalc(); console.info('RES', res); }); }, 'calc-val': function () { dialog(modal.calculatedValues).then(function (res) { checkAndCalc(); console.info('RES', res); }); }
<<<<<<< var settings = render.settings; ======= var options = render.options; var paper = render.paper; var delta = 0.5 * options.lineWidth; >>>>>>> var options = render.options; <<<<<<< var lsb = bisectLargestSector(this, this.molecule); atom.attpnt(render, lsb, this.addReObjectPath.bind(this), shiftBondEnd); ======= var i, c, j; // eslint-disable-line no-unused-vars for (i = 0, c = 0; i < 4; ++i) { var attpntText = ''; if (atom.a.attpnt & (1 << i)) { if (attpntText.length > 0) attpntText += ' '; attpntText += asterisk; for (j = 0; j < (i == 0 ? 0 : (i + 1)); ++j) attpntText += '\''; var pos0 = new Vec2(ps); var pos1 = ps.addScaled(lsb, 0.7 * options.scaleFactor); var attpntPath1 = paper.text(pos1.x, pos1.y, attpntText) .attr({ 'font': options.font, 'font-size': options.fontsz, 'fill': color }); var attpntRbb = util.relBox(attpntPath1.getBBox()); draw.recenterText(attpntPath1, attpntRbb); var lsbn = lsb.negated(); /* eslint-disable no-mixed-operators*/ pos1 = pos1.addScaled(lsbn, Vec2.shiftRayBox(pos1, lsbn, Box2Abs.fromRelBox(attpntRbb)) + options.lineWidth / 2); /* eslint-enable no-mixed-operators*/ pos0 = shiftBondEnd(atom, pos0, lsb, options.lineWidth); var n = lsb.rotateSC(1, 0); var arrowLeft = pos1.addScaled(n, 0.05 * options.scaleFactor).addScaled(lsbn, 0.09 * options.scaleFactor); var arrowRight = pos1.addScaled(n, -0.05 * options.scaleFactor).addScaled(lsbn, 0.09 * options.scaleFactor); var attpntPath = paper.set(); attpntPath.push( attpntPath1, paper.path('M{0},{1}L{2},{3}M{4},{5}L{2},{3}L{6},{7}', tfx(pos0.x), tfx(pos0.y), tfx(pos1.x), tfx(pos1.y), tfx(arrowLeft.x), tfx(arrowLeft.y), tfx(arrowRight.x), tfx(arrowRight.y)) .attr(options.lineattr).attr({ 'stroke-width': options.lineWidth / 2 }) ); this.addReObjectPath('indices', atom.visel, attpntPath, ps); lsb = lsb.rotate(Math.PI / 6); } } >>>>>>> var lsb = bisectLargestSector(this, this.molecule); atom.attpnt(render, lsb, this.addReObjectPath.bind(this), shiftBondEnd); <<<<<<< var aamPath = render.paper.text(ps.x, ps.y, aamText).attr({ 'font': settings.font, 'font-size': settings.fontszsub, 'fill': '#000000' }); ======= var aamPath = paper.text(ps.x, ps.y, aamText) .attr({ 'font': options.font, 'font-size': options.fontszsub, 'fill': color }); >>>>>>> var aamPath = render.paper.text(ps.x, ps.y, aamText).attr({ 'font': options.font, 'font-size': options.fontszsub, 'fill': '#000000' }); <<<<<<< this.bondRecalc(settings, bond); bond.show(this); ======= this.bondRecalc(options, bond); bond.path = this.showBond(bond, hb1, hb2); >>>>>>> this.bondRecalc(options, bond); bond.show(this); <<<<<<< (atom.a.neighbors.length < 2 && !this.render.opt.hideTerminalLabels) || (this.render.opt.carbonExplicitly) || atom.a.label.toLowerCase() != 'c' || (atom.a.badConn && this.render.opt.showValenceWarnings) || ======= (atom.a.neighbors.length < 2 && !this.render.options.hideTerminalLabels) || atom.a.label.toLowerCase() != 'c' || (atom.a.badConn && this.render.options.showValenceWarnings) || >>>>>>> (atom.a.neighbors.length < 2 && !this.render.options.hideTerminalLabels) || (this.render.options.carbonExplicitly) || atom.a.label.toLowerCase() != 'c' || (atom.a.badConn && this.render.options.showValenceWarnings) ||
<<<<<<< .pipe(browserSync.reload({stream: true})) } gulp.task('svgSprite', svgSpriteTask) module.exports = svgSpriteTask ======= .pipe(browserSync.stream()) }) >>>>>>> .pipe(browserSync.stream()) } gulp.task('svgSprite', svgSpriteTask) module.exports = svgSpriteTask
<<<<<<< fields: ["app", "obj", "id", "address", "__unicode__"], directFn: ifconfig__IPAddress.get_valid_ips, baseParams: { idobj: { app: "iscsi", obj: "Target", id: null } } ======= fields: ["app", "obj", "id", "__unicode__"], directFn: ifconfig__IPAddress.ids >>>>>>> fields: ["app", "obj", "id", "__unicode__"], directFn: ifconfig__IPAddress.get_valid_ips, baseParams: { idobj: { app: "iscsi", obj: "Target", id: null } }
<<<<<<< svg.appendChild(circle_g); ======= line_anim(Snap(polyline), v, v_l, v_i, v_offset, (+ new Date()), settings.animation_speed); if (existing_group.length < 1) { svg.appendChild(circle_g); } >>>>>>> if (existing_group.length < 1) { svg.appendChild(circle_g); } <<<<<<< var line_height = total_tick_height + (height/(ticks_length-1)), line = this.svg_obj('line'), text = this.svg_obj('text'); ======= if (existing_group.length > 0) { var line = $('line[data-id=l' + i + ']', line_g)[0], text = $('text[data-id=t' + i + ']', text_g)[0]; } else { var line = this.svg_obj('line'), text = this.svg_obj('text'); line.setAttribute('data-id', 'l' + i); text.setAttribute('data-id', 't' + i); } var line_height = total_tick_height + (height/(ticks_length-1)); >>>>>>> if (existing_group.length > 0) { var line = $('line[data-id=l' + i + ']', line_g)[0], text = $('text[data-id=t' + i + ']', text_g)[0]; } else { var line = this.svg_obj('line'), text = this.svg_obj('text'); line.setAttribute('data-id', 'l' + i); text.setAttribute('data-id', 't' + i); } var line_height = total_tick_height + (height/(ticks_length-1)); <<<<<<< line_g.appendChild(line); text_g.appendChild(text); ======= >>>>>>>
<<<<<<< app.controller("UsersAddEditCtrl", function ($scope, $state, $stateParams, usersService, $filter, $uibModal, Notification) { var gravatarId = $filter("gravatar")(""); ======= app.controller("UsersAddEditCtrl", function ($filter, $q, $scope, $state, $stateParams, $uibModal, toasty, usersService) { var promises = []; >>>>>>> app.controller("UsersAddEditCtrl", function ($scope, $state, $stateParams, usersService, $filter, $uibModal, Notification) { var promises = []; <<<<<<< $scope.user = res; gravatarId = $filter("gravatar")($scope.user.email); $scope.image = "http://www.gravatar.com/avatar/" + gravatarId + ".jpg?d=monsterid"; ======= $scope.user = res[1]; >>>>>>> $scope.user = res[1];
<<<<<<< ======= case 'value': obj[childNode.attributes['name'].value] = WorkspaceUtils.xmlToCardScript(childNode.firstElementChild, null, obj) break >>>>>>> <<<<<<< case 'value': if (childNode.firstElementChild.nodeName === 'shadow' && childNode.lastElementChild !== childNode.firstElementChild) { obj[childNode.attributes['name'].value] = WorkspaceUtils.xmlToDictionary(childNode.lastElementChild, null, obj) } else obj[childNode.attributes['name'].value] = WorkspaceUtils.xmlToDictionary(childNode.firstElementChild, null, obj) ======= obj[childNode.attributes['name'].value] = WorkspaceUtils.xmlToCardScript(childNode.firstElementChild, null, obj) >>>>>>> case 'value': if (childNode.firstElementChild.nodeName === 'shadow' && childNode.lastElementChild !== childNode.firstElementChild) { obj[childNode.attributes['name'].value] = WorkspaceUtils.xmlToCardScript(childNode.lastElementChild, null, obj) } else obj[childNode.attributes['name'].value] = WorkspaceUtils.xmlToCardScript(childNode.firstElementChild, null, obj)
<<<<<<< // Agile APIs Suite Tests describe('Agile APIs Suite Tests', () => { it('getIssue hits proper url', async () => { const result = await dummyURLCall('getIssue', ['someIssueId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/issue/someIssueId?fields=&expand='); }); it('getIssueEstimationForBoard hits proper url', async () => { const result = await dummyURLCall('getIssueEstimationForBoard', ['someIssueId', 'someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/issue/someIssueId/estimation?boardId=someBoardId'); }); it('estimateIssueForBoard hits proper url', async () => { const result = await dummyURLCall('estimateIssueForBoard', ['someIssueId', 'someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/issue/someIssueId/estimation?boardId=someBoardId'); }); it('rankIssues hits proper url', async () => { const result = await dummyURLCall('rankIssues'); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/issue/rank'); }); }); ======= // Agile APIs Suite Tests describe('Agile APIs Suite Tests', () => { it('moveToBacklog hits proper url', async () => { const result = await dummyURLCall('moveToBacklog'); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/backlog/issue'); }); it('getAllBoards hits proper url', async () => { const result = await dummyURLCall('getAllBoards'); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board?startAt=0&maxResults=50&type=&name=&projectKeyOrId='); }); it('createBoard hits proper url', async () => { const result = await dummyURLCall('createBoard'); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board'); }); it('getBoard hits proper url', async () => { const result = await dummyURLCall('getBoard', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId'); }); it('deleteBoard hits proper url', async () => { const result = await dummyURLCall('deleteBoard', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId'); }); it('getIssuesForBacklog hits proper url', async () => { const result = await dummyURLCall('getIssuesForBacklog', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/backlog?startAt=0&maxResults=50&jql=&validateQuery=true&fields='); }); it('getConfiguration hits proper url', async () => { const result = await dummyURLCall('getConfiguration', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/configuration'); }); it('getIssuesForBoard hits proper url', async () => { const result = await dummyURLCall('getIssuesForBoard', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/issue?startAt=0&maxResults=50&jql=&validateQuery=true&fields='); }); it('getEpics hits proper url', async () => { const result = await dummyURLCall('getEpics', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/epic?startAt=0&maxResults=50&done='); }); it('getBoardIssuesForEpic hits proper url', async () => { const result = await dummyURLCall('getBoardIssuesForEpic', ['someBoardId', 'someEpicId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/epic/someEpicId/issue?startAt=0&maxResults=50&jql=&validateQuery=true&fields='); }); it('getProjects hits proper url', async () => { const result = await dummyURLCall('getProjects', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/project?startAt=0&maxResults=50'); }); it('getProjectsFull hits proper url', async () => { const result = await dummyURLCall('getProjectsFull', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/project/full'); }); it('getBoardPropertiesKeys hits proper url', async () => { const result = await dummyURLCall('getBoardPropertiesKeys', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/properties'); }); it('deleteBoardProperty hits proper url', async () => { const result = await dummyURLCall('deleteBoardProperty', ['someBoardId', 'somePropertyKey']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/properties/somePropertyKey'); }); it('setBoardProperty hits proper url', async () => { const result = await dummyURLCall('setBoardProperty', ['someBoardId', 'somePropertyKey']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/properties/somePropertyKey'); }); it('getBoardProperty hits proper url', async () => { const result = await dummyURLCall('getBoardProperty', ['someBoardId', 'somePropertyKey']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/properties/somePropertyKey'); }); it('getAllSprints hits proper url', async () => { const result = await dummyURLCall('getAllSprints', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/sprint?startAt=0&maxResults=50&state='); }); it('getBoardIssuesForSprint hits proper url', async () => { const result = await dummyURLCall('getBoardIssuesForSprint', ['someBoardId', 'someSprintId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/sprint/someSprintId/issue?startAt=0&maxResults=50&jql=&validateQuery=true&fields='); }); it('getAllVersions hits proper url', async () => { const result = await dummyURLCall('getAllVersions', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/version?startAt=0&maxResults=50&released='); }); }); >>>>>>> // Agile APIs Suite Tests describe('Agile APIs Suite Tests', () => { it('getIssue hits proper url', async () => { const result = await dummyURLCall('getIssue', ['someIssueId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/issue/someIssueId?fields=&expand='); }); it('getIssueEstimationForBoard hits proper url', async () => { const result = await dummyURLCall('getIssueEstimationForBoard', ['someIssueId', 'someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/issue/someIssueId/estimation?boardId=someBoardId'); }); it('estimateIssueForBoard hits proper url', async () => { const result = await dummyURLCall('estimateIssueForBoard', ['someIssueId', 'someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/issue/someIssueId/estimation?boardId=someBoardId'); }); it('rankIssues hits proper url', async () => { const result = await dummyURLCall('rankIssues'); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/issue/rank'); }); it('moveToBacklog hits proper url', async () => { const result = await dummyURLCall('moveToBacklog'); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/backlog/issue'); }); it('getAllBoards hits proper url', async () => { const result = await dummyURLCall('getAllBoards'); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board?startAt=0&maxResults=50&type=&name=&projectKeyOrId='); }); it('createBoard hits proper url', async () => { const result = await dummyURLCall('createBoard'); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board'); }); it('getBoard hits proper url', async () => { const result = await dummyURLCall('getBoard', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId'); }); it('deleteBoard hits proper url', async () => { const result = await dummyURLCall('deleteBoard', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId'); }); it('getIssuesForBacklog hits proper url', async () => { const result = await dummyURLCall('getIssuesForBacklog', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/backlog?startAt=0&maxResults=50&jql=&validateQuery=true&fields='); }); it('getConfiguration hits proper url', async () => { const result = await dummyURLCall('getConfiguration', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/configuration'); }); it('getIssuesForBoard hits proper url', async () => { const result = await dummyURLCall('getIssuesForBoard', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/issue?startAt=0&maxResults=50&jql=&validateQuery=true&fields='); }); it('getEpics hits proper url', async () => { const result = await dummyURLCall('getEpics', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/epic?startAt=0&maxResults=50&done='); }); it('getBoardIssuesForEpic hits proper url', async () => { const result = await dummyURLCall('getBoardIssuesForEpic', ['someBoardId', 'someEpicId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/epic/someEpicId/issue?startAt=0&maxResults=50&jql=&validateQuery=true&fields='); }); it('getProjects hits proper url', async () => { const result = await dummyURLCall('getProjects', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/project?startAt=0&maxResults=50'); }); it('getProjectsFull hits proper url', async () => { const result = await dummyURLCall('getProjectsFull', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/project/full'); }); it('getBoardPropertiesKeys hits proper url', async () => { const result = await dummyURLCall('getBoardPropertiesKeys', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/properties'); }); it('deleteBoardProperty hits proper url', async () => { const result = await dummyURLCall('deleteBoardProperty', ['someBoardId', 'somePropertyKey']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/properties/somePropertyKey'); }); it('setBoardProperty hits proper url', async () => { const result = await dummyURLCall('setBoardProperty', ['someBoardId', 'somePropertyKey']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/properties/somePropertyKey'); }); it('getBoardProperty hits proper url', async () => { const result = await dummyURLCall('getBoardProperty', ['someBoardId', 'somePropertyKey']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/properties/somePropertyKey'); }); it('getAllSprints hits proper url', async () => { const result = await dummyURLCall('getAllSprints', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/sprint?startAt=0&maxResults=50&state='); }); it('getBoardIssuesForSprint hits proper url', async () => { const result = await dummyURLCall('getBoardIssuesForSprint', ['someBoardId', 'someSprintId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/sprint/someSprintId/issue?startAt=0&maxResults=50&jql=&validateQuery=true&fields='); }); it('getAllVersions hits proper url', async () => { const result = await dummyURLCall('getAllVersions', ['someBoardId']); result.should.eql('http://jira.somehost.com:8080/rest/agile/1.0/board/someBoardId/version?startAt=0&maxResults=50&released='); }); });
<<<<<<< import { grey600, red500, red200, blue500, green500, green200, yellow800, yellow200} from 'material-ui/styles/colors'; import Avatar from 'material-ui/Avatar'; import Chip from 'material-ui/Chip'; import Snackbar from 'material-ui/Snackbar'; ======= import { grey600, red500, blue500, green500, yellow800, grey900, grey50 } from 'material-ui/styles/colors'; >>>>>>> import { grey600, red500, red200, blue500, green500, green200, yellow800, yellow200, grey900, grey50} from 'material-ui/styles/colors'; import Avatar from 'material-ui/Avatar'; import Chip from 'material-ui/Chip'; import Snackbar from 'material-ui/Snackbar'; <<<<<<< // render dates based of cookie user selection. let dateToggleElements = []; let attendeeDetails = this.getCookieAttendeeDetails(); let datesInColumn = this.renderWithOrWithoutWeather(); let selectedDates = this.props.eventObj.dateArray; for (let i=0; i<selectedDates.length; i++) { for (let attendeeDate in attendeeDetails.personalizedDateSelection) { console.log("attendeeDate +" + attendeeDate); if (attendeeDetails.personalizedDateSelection.hasOwnProperty(attendeeDate)) { if (attendeeDate === selectedDates[i]) { dateToggleElements[i] = ( <div className='row'> <div className='col-xs-3'> </div> <div className='col-xs-offset-1 col-xs-2'> <label style={styles.dateLabel}> {datesInColumn[i]} </label> </div> {this.individualDateSection(selectedDates[i], attendeeDetails.personalizedDateSelection[attendeeDate])} </div> ); } } } } return dateToggleElements; ======= return ( <div> <br /> <div className='row center-xs'> <label style={styles.formLabel}> {this.props.languageJson.dateCastSelectionLabel} </label> </div> <br /> <div className='row center-xs'> <RaisedButton label='Cast Attendance' disabled={false} labelColor={grey50} style={buttonStyle} backgroundColor={grey900} onTouchTap={this.toggleCastAttendanceButton} /> </div> </div> ); >>>>>>> // render dates based of cookie user selection. let dateToggleElements = []; let attendeeDetails = this.getCookieAttendeeDetails(); let datesInColumn = this.renderWithOrWithoutWeather(); let selectedDates = this.props.eventObj.dateArray; for (let i=0; i<selectedDates.length; i++) { for (let attendeeDate in attendeeDetails.personalizedDateSelection) { console.log("attendeeDate +" + attendeeDate); if (attendeeDetails.personalizedDateSelection.hasOwnProperty(attendeeDate)) { if (attendeeDate === selectedDates[i]) { dateToggleElements[i] = ( <div className='row'> <div className='col-xs-3'> </div> <div className='col-xs-offset-1 col-xs-2'> <label style={styles.dateLabel}> {datesInColumn[i]} </label> </div> {this.individualDateSection(selectedDates[i], attendeeDetails.personalizedDateSelection[attendeeDate])} </div> ); } } } } return dateToggleElements; <<<<<<< <label style={styles.formLabel}> {this.props.languageJson.dateSelectionLabel} </label> </div> <br /> <div className='row'> <div className='col-xs-offset-5 col-xs-1'> <label style={styles.formLabel}> {this.props.languageJson.name} </label> </div> <div className='col-xs'> <TextField id='name' hintText='Name' onChange={this.storeAttendeeName} value={this.props.attendeeName} />{/** First time event page visitor - Name Input box */} ======= <div className='col-xs-10'> <TextField id='name' hintText='Name' onChange={this.storeAttendeeName} floatingLabelFocusStyle={{color : grey900}} underlineFocusStyle={styles.underlineStyle} value={this.props.attendeeName} /> >>>>>>> <label style={styles.formLabel}> {this.props.languageJson.dateSelectionLabel} </label> </div> <br /> <div className='row'> <div className='col-xs-offset-5 col-xs-1'> <label style={styles.formLabel}> {this.props.languageJson.name} </label> </div> <div className='col-xs'> <TextField id='name' hintText='Name' onChange={this.storeAttendeeName} floatingLabelFocusStyle={{color : grey900}} underlineFocusStyle={styles.underlineStyle} value={this.props.attendeeName} />{/** First time event page visitor - Name Input box */} <<<<<<< <RaisedButton label='Register' primary={true} style={buttonStyle} disabled={false} onTouchTap={this.registerAttendee} /> ======= <RaisedButton label='Update' labelColor={grey50} style={buttonStyle} backgroundColor={grey900} disabled={false} onTouchTap={this.updateEvent} /> >>>>>>> <RaisedButton label='Register' labelColor={grey50} style={buttonStyle} backgroundColor={grey900} disabled={false} onTouchTap={this.registerAttendee} /> <<<<<<< <RaisedButton label='Update' primary={true} style={buttonStyle} disabled={false} onTouchTap={this.updateAttendee} /> ======= <RaisedButton label='Cast Attendance' disabled={false} labelColor={grey50} style={buttonStyle} backgroundColor={grey900} onTouchTap={this.toggleCastAttendanceButton} /> >>>>>>> <RaisedButton label='Update' disabled={false} labelColor={grey50} style={buttonStyle} backgroundColor={grey900} onTouchTap={this.updateAttendee} /> <<<<<<< {this.toggleMobileCastAttendance()} ======= <div className='row center-xs'> <div className='col-xs-10'> <TextField id='name' hintText='Name' onChange={this.storeAttendeeName} floatingLabelFocusStyle={{color : grey900}} underlineFocusStyle={styles.underlineStyle} value={this.props.attendeeName} /> <br /> <label style={styles.errorLabel}> {this.props.attendeeNameErrorLabel} </label> </div> </div> <br /> <br></br> {this.MobiledateToggleSection()} <br /> <div className='row center-xs'> <RaisedButton label='Update' disabled={false} labelColor={grey50} style={buttonStyle} backgroundColor={grey900} onTouchTap={this.updateEvent} /> </div> </div> >>>>>>> {this.toggleMobileCastAttendance()}
<<<<<<< export const STORE_LOCATION = 'STORE_LOCATION'; ======= export const EMPTY_PERSONALIZED_DATE_SELECTION = 'EMPTY_PERSONALIZED_DATE_SELECTION'; >>>>>>> export const STORE_LOCATION = 'STORE_LOCATION'; export const EMPTY_PERSONALIZED_DATE_SELECTION = 'EMPTY_PERSONALIZED_DATE_SELECTION'; <<<<<<< } export function storeLocation(location) { return dispatch => { return dispatch({ type: STORE_LOCATION, location: location }); }; ======= } export function emptyPersonalizedDateSelection() { return dispatch => { return dispatch({ type: EMPTY_PERSONALIZED_DATE_SELECTION }); }; >>>>>>> } export function storeLocation(location) { return dispatch => { return dispatch({ type: STORE_LOCATION, location: location }); } } export function emptyPersonalizedDateSelection() { return dispatch => { return dispatch({ type: EMPTY_PERSONALIZED_DATE_SELECTION }); };
<<<<<<< updateEvent, toggleCastAttendance, attendeeNameEmptyFlag, attendeeNameExistsFlag, registerSuccessFlag, updateSuccessFlag, emptyPersonalizedDateSelection, storeUpdateAttendeeId, storeUpdateAttendeeName, storeUpdateAttendeeDate, updateAttendee } from './../actions/registerActions'; ======= updateEvent, toggleCastAttendance, emptyPersonalizedDateSelection, storeUpdateAttendeeId, storeUpdateAttendeeName, storeUpdateAttendeeDate, updateAttendee, fetchWeather } from './../actions/registerActions'; >>>>>>> updateEvent, toggleCastAttendance, attendeeNameEmptyFlag, attendeeNameExistsFlag, registerSuccessFlag, updateSuccessFlag, emptyPersonalizedDateSelection, storeUpdateAttendeeId, storeUpdateAttendeeName, storeUpdateAttendeeDate, updateAttendee, fetchWeather } from './../actions/registerActions'; <<<<<<< // Handles snackbar (register success) handleRequestClose_RegisterSuccess() { this.props.dispatch(registerSuccessFlag(false)); } // Handles snackbar (update success) handleRequestClose_UpdateSuccess() { this.props.dispatch(updateSuccessFlag(false)); } // Handles snackbar (empty name) handleRequestClose_NameEmpty() { this.props.dispatch(attendeeNameEmptyFlag(false)); } // Handles snackbar (name already exists) handleRequestClose_NameExists() { this.props.dispatch(attendeeNameExistsFlag(false)); } ======= fetchWeather(location) { this.props.dispatch(fetchWeather(location)); } >>>>>>> // Handles snackbar (register success) handleRequestClose_RegisterSuccess() { this.props.dispatch(registerSuccessFlag(false)); } // Handles snackbar (update success) handleRequestClose_UpdateSuccess() { this.props.dispatch(updateSuccessFlag(false)); } // Handles snackbar (empty name) handleRequestClose_NameEmpty() { this.props.dispatch(attendeeNameEmptyFlag(false)); } // Handles snackbar (name already exists) handleRequestClose_NameExists() { this.props.dispatch(attendeeNameExistsFlag(false)); } fetchWeather(location) { this.props.dispatch(fetchWeather(location)); } <<<<<<< } else { //After fetching from DB ======= } else { if ( this.props.weather.length === 0 ) { this.fetchWeather(this.props.eventObj.location); } >>>>>>> } else { if ( this.props.weather.length === 0 ) { this.fetchWeather(this.props.eventObj.location); } <<<<<<< {/*<div> Tablet & Smartphone code ends </div>*/} ======= >>>>>>> {/*<div> Tablet & Smartphone code ends </div>*/}
<<<<<<< TOGGLE_CAST_ATTENDANCE, ATTENDEE_NAME_EMPTY_FLAG, ATTENDEE_NAME_EXISTS_FLAG, REGISTER_SUCCESS_FLAG, UPDATE_SUCCESS_FLAG, EMPTY_PERSONALIZED_DATE_SELECTION, STORE_LOCATION, STORE_UPDATE_ATTENDEE_ID, STORE_UPDATE_ATTENDEE_NAME, STORE_UPDATE_ATTENDEE_DATE, RENDER_LANGUAGE } from './../actions/registerActions'; ======= TOGGLE_CAST_ATTENDANCE, EMPTY_PERSONALIZED_DATE_SELECTION, STORE_LOCATION, STORE_UPDATE_ATTENDEE_ID, STORE_UPDATE_ATTENDEE_NAME, STORE_UPDATE_ATTENDEE_DATE, RENDER_LANGUAGE, FETCH_AND_STORE_WEATHER } from './../actions/registerActions'; >>>>>>> TOGGLE_CAST_ATTENDANCE, ATTENDEE_NAME_EMPTY_FLAG, ATTENDEE_NAME_EXISTS_FLAG, REGISTER_SUCCESS_FLAG, UPDATE_SUCCESS_FLAG, EMPTY_PERSONALIZED_DATE_SELECTION, STORE_LOCATION, STORE_UPDATE_ATTENDEE_ID, STORE_UPDATE_ATTENDEE_NAME, STORE_UPDATE_ATTENDEE_DATE, RENDER_LANGUAGE, FETCH_AND_STORE_WEATHER } from './../actions/registerActions';
<<<<<<< import { grey600, red500 } from 'material-ui/styles/colors'; ======= import { grey600, red500, grey900, grey50 } from 'material-ui/styles/colors'; >>>>>>> import { grey600, red500, grey900, grey50 } from 'material-ui/styles/colors'; <<<<<<< import englishJson from '../../en.json'; ======= >>>>>>> import englishJson from '../../en.json';
<<<<<<< $scope.MAX_HIGHLIGHT_LEN = 10000; $scope.activePage = 'documentation'; var hash = window.location.hash || START_PAGE; $scope.activePage = hash.substring(1); console.log('hash', window.location.hash); ======= var hash = window.location.hash || START_PAGE; $scope.activePage = hash.substring(1); console.log('hash', window.location.hash); >>>>>>> $scope.MAX_HIGHLIGHT_LEN = 10000; var hash = window.location.hash || START_PAGE; $scope.activePage = hash.substring(1); console.log('hash', window.location.hash);
<<<<<<< commonjs: { ignore: [ // Optional package for TypeScript that logs ETW events (a Windows-only technology). "@microsoft/typescript-etw" ] ======= babelPlugins: [babelReplaceArrayIncludesWithIndexof], replace: { 'require("@microsoft/typescript-etw")': "undefined" >>>>>>> replace: { 'require("@microsoft/typescript-etw")': "undefined"
<<<<<<< } /** * Check if mode indicates property. * @param {number} property Property to check. * @return {boolean} Property matches mode. */ _checkModeProperty(property) { return ((this.mode & constants.fs.S_IFMT) === property); } /** * @return {Boolean} Is a directory. */ isDirectory() { return this._checkModeProperty(constants.fs.S_IFDIR); } /** * @return {Boolean} Is a regular file. */ isFile() { return this._checkModeProperty(constants.fs.S_IFREG); } /** * @return {Boolean} Is a block device. */ isBlockDevice() { return this._checkModeProperty(constants.fs.S_IFBLK); } /** * @return {Boolean} Is a character device. */ isCharacterDevice() { return this._checkModeProperty(constants.fs.S_IFCHR); } /** * @return {Boolean} Is a symbolic link. */ isSymbolicLink() { return this._checkModeProperty(constants.fs.S_IFLNK); } /** * @return {Boolean} Is a named pipe. */ isFIFO() { return this._checkModeProperty(constants.fs.S_IFIFO); } /** * @return {Boolean} Is a socket. */ isSocket() { return this._checkModeProperty(constants.fs.S_IFSOCK); } ======= >>>>>>>
<<<<<<< app.controller("VolumeResizeCtrl", function ($scope, VolumeService, PoolService, SizeParserService, $uibModalInstance, volume, Notification) { ======= app.controller("VolumeResizeCtrl", function ($scope, VolumeService, poolsService, SizeParserService, $uibModalInstance, volume, toasty) { >>>>>>> app.controller("VolumeResizeCtrl", function ($scope, VolumeService, poolsService, SizeParserService, $uibModalInstance, volume, Notification) {
<<<<<<< ======= }, function (error) { $scope.poolForm.$submitted = false; console.log("An error occured", error); >>>>>>> }, function (error) { $scope.poolForm.$submitted = false;
<<<<<<< const rand = Math.random() .toString(36) .slice(2, 10); const uniqueName = path.join(dir, `wallpaper-${rand}.jpg`); ======= >>>>>>> <<<<<<< if ( res.request.uri.pathname.indexOf('photo-1446704477871-62a4972035cd') >= 0 ) { reject({ message: "The response is the image: we couldn't find that photo." }); return; } ======= const pathname = res.request.uri.pathname.slice(1).replace(/[\/\\]/g,'-'); const uniqueName = path.join(dir, `wallpaper-${pathname}.jpg`); >>>>>>> if ( res.request.uri.pathname.indexOf('photo-1446704477871-62a4972035cd') >= 0 ) { reject({ message: "The response is the image: we couldn't find that photo." }); return; } const pathname = res.request.uri.pathname .slice(1) .replace(/[\/\\]/g, '-'); const uniqueName = path.join(dir, `wallpaper-${pathname}.jpg`);
<<<<<<< var FileStore = require('./file-store'), templateBuilder = require('./xml-template-builder'), concat = require('concat-stream'), xml2js = require('xml2js'), async = require('async'), path = require('path'), ReadableStream = require('stream').Readable, S3Event = require('./models/s3-event'); ======= var FileStore = require('./file-store'); var templateBuilder = require('./xml-template-builder'); var concat = require('concat-stream'); var xml2js = require('xml2js'); var async = require('async'); var path = require('path'); var ReadableStream = require('stream').Readable; var crypto = require('crypto'); var url = require('url'); >>>>>>> var FileStore = require('./file-store'); var templateBuilder = require('./xml-template-builder'); var concat = require('concat-stream'); var xml2js = require('xml2js'); var async = require('async'); var path = require('path'); var ReadableStream = require('stream').Readable; var crypto = require('crypto'); var url = require('url'); var S3Event = require('./models/s3-event'); <<<<<<< logger.info('Copied object "%s" from bucket "%s" into bucket "%s" with key of "%s"', srcObject, bucket.name, req.bucket.name, req.params.key); template = templateBuilder.buildCopyObject(key); triggerS3Event(req,res,{bucket: req.bucket.name, eventType: 'Copy', S3Item: key }); return buildXmlResponse(res, 200, template); ======= logger.info('Stored object "%s" in bucket "%s" successfully', req.params.key, req.bucket.name); var location = req.protocol + '://' + req.get('Host') + url.parse(req.originalUrl).pathname; return buildXmlResponse(res, 200, templateBuilder.buildCompleteMultipartUploadResult(req.bucket.name, req.params.key, location, key) ); >>>>>>> logger.info('Stored object "%s" in bucket "%s" successfully', req.params.key, req.bucket.name); var location = req.protocol + '://' + req.get('Host') + url.parse(req.originalUrl).pathname; triggerS3Event(req, res, { bucket: req.bucket.name, eventType: 'Post', S3Item: key }); return buildXmlResponse(res, 200, templateBuilder.buildCompleteMultipartUploadResult(req.bucket.name, req.params.key, location, key) ); <<<<<<< else { fileStore.putObject(req.bucket, req, function (err, key) { if (err) { logger.error('Error uploading object "%s" to bucket "%s"', req.params.key, req.bucket.name, err); var template = templateBuilder.buildError('InternalError', 'We encountered an internal error. Please try again.'); return buildXmlResponse(res, 500, template); } logger.info('Stored object "%s" in bucket "%s" successfully', req.params.key, req.bucket.name); triggerS3Event(req, res, { bucket: req.bucket.name, eventType: 'Put', S3Item: key }); res.header('ETag', '"' + key.md5 + '"'); return res.status(200).end(); }); } ======= >>>>>>>
<<<<<<< var express = require('express'); var Controllers = require('./controllers'); var createLogger = require('./logger'); var path = require('path'); var https = require('https'); var morgan = require('morgan'); var subject = require('rxjs/Subject').Subject; require('rxjs/add/operator/filter'); ======= const express = require('express'); const Controllers = require('./controllers'); const createLogger = require('./logger'); const path = require('path'); const https = require('https'); const morgan = require('morgan'); >>>>>>> const express = require('express'); const Controllers = require('./controllers'); const createLogger = require('./logger'); const path = require('path'); const https = require('https'); const morgan = require('morgan'); const subject = require('rxjs/Subject').Subject; require('rxjs/add/operator/filter'); <<<<<<< var app = express(); app.s3Event = new subject(); var logger = createLogger(options.silent); var controllers = new Controllers(options.directory, logger, options.indexDocument, options.errorDocument); ======= const app = express(); const logger = createLogger(options.silent); const controllers = new Controllers(options.directory, logger, options.indexDocument, options.errorDocument); >>>>>>> const app = express(); app.s3Event = new subject(); const logger = createLogger(options.silent); const controllers = new Controllers(options.directory, logger, options.indexDocument, options.errorDocument);
<<<<<<< const FileStore = require('./file-store'); const templateBuilder = require('./xml-template-builder'); const concat = require('concat-stream'); const xml2js = require('xml2js'); const async = require('async'); const path = require('path'); const ReadableStream = require('stream').Readable; const crypto = require('crypto'); const url = require('url'); var S3Event = require('./models/s3-event'); ======= const FileStore = require("./file-store"); const templateBuilder = require("./xml-template-builder"); const concat = require("concat-stream"); const xml2js = require("xml2js"); const async = require("async"); const path = require("path"); const ReadableStream = require("stream").Readable; const crypto = require("crypto"); const url = require("url"); >>>>>>> const FileStore = require("./file-store"); const templateBuilder = require("./xml-template-builder"); const concat = require("concat-stream"); const xml2js = require("xml2js"); const async = require("async"); const path = require("path"); const ReadableStream = require("stream").Readable; const crypto = require("crypto"); const url = require("url"); const S3Event = require('./models/s3-event'); <<<<<<< const triggerS3Event = function (req, res, eventData) { res.app.s3Event.next(new S3Event(eventData, req.headers)) } const errorResponse = function (req, res, keyName) { logger.error('Object "%s" in bucket "%s" does not exist', keyName, req.bucket.name); ======= const errorResponse = function(req, res, keyName) { logger.error( 'Object "%s" in bucket "%s" does not exist', keyName, req.bucket.name ); >>>>>>> const triggerS3Event = function (req, res, eventData) { res.app.s3Event.next(new S3Event(eventData, req.headers)) } const errorResponse = function(req, res, keyName) { logger.error( 'Object "%s" in bucket "%s" does not exist', keyName, req.bucket.name ); <<<<<<< logger.info('Copied object "%s" from bucket "%s" into bucket "%s" with key of "%s"', srcObject, bucket.name, req.bucket.name, key); triggerS3Event(req, res, { bucket: req.bucket.name, eventType: 'Copy', S3Item: object }); template = templateBuilder.buildCopyObject(object); return buildXmlResponse(res, 200, template); }); ======= ); >>>>>>> ); <<<<<<< if ((/^[a-z0-9]+(.?[-a-z0-9]+)*$/.test(bucketName) === false)) { template = templateBuilder.buildError('InvalidBucketName', 'Bucket names can contain lowercase letters, numbers, and hyphens. ' + 'Each label must start and end with a lowercase letter or a number.'); logger.error('Error creating bucket "%s" because the name is invalid', bucketName); ======= if (/^[a-z0-9]+(.?[-a-z0-9]+)*$/.test(bucketName) === false) { template = templateBuilder.buildError( "InvalidBucketName", "Bucket names can contain lowercase letters, numbers, and hyphens. " + "Each label must start and end with a lowercase letter or a number." ); logger.error( 'Error creating bucket "%s" because the name is invalid', bucketName ); >>>>>>> if (/^[a-z0-9]+(.?[-a-z0-9]+)*$/.test(bucketName) === false) { template = templateBuilder.buildError( "InvalidBucketName", "Bucket names can contain lowercase letters, numbers, and hyphens. " + "Each label must start and end with a lowercase letter or a number." ); logger.error( 'Error creating bucket "%s" because the name is invalid', bucketName ); <<<<<<< if (req.headers['x-amz-copy-source']) { return handleCopyObject(req.params.key, req, res); ======= if (req.headers["x-amz-copy-source"]) { handleCopyObject(req.params.key, req, res); >>>>>>> if (req.headers["x-amz-copy-source"]) { handleCopyObject(req.params.key, req, res); <<<<<<< logger.info('Stored object "%s" in bucket "%s" successfully', req.params.key, req.bucket.name); triggerS3Event(req, res, { bucket: req.bucket.name, eventType: 'Put', S3Item: key }); res.header('ETag', '"' + key.md5 + '"'); ======= logger.info( 'Stored object "%s" in bucket "%s" successfully', req.params.key, req.bucket.name ); res.header("ETag", '"' + key.md5 + '"'); >>>>>>> logger.info( 'Stored object "%s" in bucket "%s" successfully', req.params.key, req.bucket.name ); triggerS3Event(req, res, { bucket: req.bucket.name, eventType: 'Put', S3Item: key }); res.header("ETag", '"' + key.md5 + '"'); <<<<<<< logger.info('Stored object "%s" in bucket "%s" successfully', req.params.key, req.bucket.name); const location = req.protocol + '://' + req.get('Host') + url.parse(req.originalUrl).pathname; triggerS3Event(req, res, { bucket: req.bucket.name, eventType: 'Post', S3Item: key }); return buildXmlResponse(res, 200, templateBuilder.buildCompleteMultipartUploadResult(req.bucket.name, req.params.key, location, key) ); }); ======= ); >>>>>>> ); <<<<<<< logger.info('Deleted object "%s" in bucket "%s"', key, req.bucket.name); triggerS3Event(req, res, { bucket: req.bucket.name, eventType: 'Delete', S3Item: { key: key } }); ======= logger.info( 'Deleted object "%s" in bucket "%s"', key, req.bucket.name ); >>>>>>> logger.info( 'Deleted object "%s" in bucket "%s"', key, req.bucket.name ); triggerS3Event(req, res, { bucket: req.bucket.name, eventType: 'Delete', S3Item: { key: key } });
<<<<<<< if (err) { return done('Error starting server', err); } var config = { accessKeyId: '123', secretAccessKey: 'abc', endpoint: util.format('%s:%d', hostname, port), sslEnabled: false, s3ForcePathStyle: true }; AWS.config.update(config); s3Client = new AWS.S3(); s3Client.endpoint = new AWS.Endpoint(config.endpoint); /** * Remove if exists and recreate the temporary directory */ recreateDirectory(directory); // Create 6 buckets async.eachSeries(buckets, function (bucket, callback) { s3Client.createBucket({ Bucket: bucket }, callback); }, done); }); ======= if (err) { return done('Error starting server', err); } const config = { accessKeyId: '123', secretAccessKey: 'abc', endpoint: util.format('%s:%d', hostname, port), sslEnabled: false, s3ForcePathStyle: true }; AWS.config.update(config); s3Client = new AWS.S3(); s3Client.endpoint = new AWS.Endpoint(config.endpoint); /** * Remove if exists and recreate the temporary directory */ recreateDirectory(directory); // Create 6 buckets async.eachSeries(buckets, function (bucket, callback) { s3Client.createBucket({Bucket: bucket}, callback); }, done); }); >>>>>>> if (err) { return done('Error starting server', err); } const config = { accessKeyId: '123', secretAccessKey: 'abc', endpoint: util.format('%s:%d', hostname, port), sslEnabled: false, s3ForcePathStyle: true }; AWS.config.update(config); s3Client = new AWS.S3(); s3Client.endpoint = new AWS.Endpoint(config.endpoint); /** * Remove if exists and recreate the temporary directory */ recreateDirectory(directory); // Create 6 buckets async.eachSeries(buckets, function (bucket, callback) { s3Client.createBucket({ Bucket: bucket }, callback); }, done); }); <<<<<<< var params = { Bucket: buckets[0], Key: 'text', Body: 'Hello!' }; ======= const params = {Bucket: buckets[0], Key: 'text', Body: 'Hello!'}; >>>>>>> const params = { Bucket: buckets[0], Key: 'text', Body: 'Hello!' }; <<<<<<< var b = new Buffer(20000000); var params = { Bucket: buckets[0], Key: 'large', Body: b }; ======= const b = new Buffer(20000000); const params = {Bucket: buckets[0], Key: 'large', Body: b}; >>>>>>> const b = new Buffer(20000000); const params = { Bucket: buckets[0], Key: 'large', Body: b }; <<<<<<< /** * Get object from store */ function (callback) { var file = path.join(__dirname, 'resources/image.jpg'); fs.readFile(file, function (err, data) { var params = { Bucket: buckets[0], Key: 'image', Body: data, ContentType: 'image/jpeg', ContentLength: data.length, }; s3Client.putObject(params, function () { s3Client.getObject({ Bucket: buckets[0], Key: 'image' }, function (err, object) { ======= /** * Get object from store */ function (callback) { const file = path.join(__dirname, 'resources/image.jpg'); fs.readFile(file, function (err, data) { const params = { Bucket: buckets[0], Key: 'image', Body: data, ContentType: 'image/jpeg', ContentLength: data.length, }; s3Client.putObject(params, function () { s3Client.getObject({Bucket: buckets[0], Key: 'image'}, function (err, object) { if (err) { return callback(err); } callback(null, object); }); }); }); }, /** * Store different object */ function (object, callback) { const file = path.join(__dirname, 'resources/image1.jpg'); fs.readFile(file, function (err, data) { if (err) { return callback(err); } const params = { Bucket: buckets[0], Key: 'image', Body: new Buffer(data), ContentType: 'image/jpeg', ContentLength: data.length }; s3Client.putObject(params, function (err, storedObject) { storedObject.ETag.should.not.equal(object.ETag); >>>>>>> /** * Get object from store */ function (callback) { const file = path.join(__dirname, 'resources/image.jpg'); fs.readFile(file, function (err, data) { const params = { Bucket: buckets[0], Key: 'image', Body: data, ContentType: 'image/jpeg', ContentLength: data.length, }; s3Client.putObject(params, function () { s3Client.getObject({ Bucket: buckets[0], Key: 'image' }, function (err, object) { <<<<<<< var b = new Buffer(10); var params = { Bucket: buckets[0], Key: 'large', Body: b }; ======= const b = new Buffer(10); const params = {Bucket: buckets[0], Key: 'large', Body: b}; >>>>>>> const b = new Buffer(10); const params = { Bucket: buckets[0], Key: 'large', Body: b }; <<<<<<< var params = { Bucket: buckets[0], Key: 'multi/directory/path/text', Body: 'Hello!' }; ======= const params = {Bucket: buckets[0], Key: 'multi/directory/path/text', Body: 'Hello!'}; >>>>>>> const params = { Bucket: buckets[0], Key: 'multi/directory/path/text', Body: 'Hello!' }; <<<<<<< var params = { Bucket: buckets[0], Key: 'multi/directory/path/text', Body: 'Hello!' }; ======= const params = {Bucket: buckets[0], Key: 'multi/directory/path/text', Body: 'Hello!'}; >>>>>>> const params = { Bucket: buckets[0], Key: 'multi/directory/path/text', Body: 'Hello!' }; <<<<<<< var params = { Bucket: buckets[1], Key: testObject, Body: 'Hello!' }; ======= const params = {Bucket: buckets[1], Key: testObject, Body: 'Hello!'}; >>>>>>> const params = { Bucket: buckets[1], Key: testObject, Body: 'Hello!' }; <<<<<<< var params = { Bucket: buckets[1], Key: testObject, Body: 'Hello!' }; ======= const params = {Bucket: buckets[1], Key: testObject, Body: 'Hello!'}; >>>>>>> const params = { Bucket: buckets[1], Key: testObject, Body: 'Hello!' }; <<<<<<< var params = { Bucket: buckets[1], Key: testObject, Body: 'Hello!' }; ======= const params = {Bucket: buckets[1], Key: testObject, Body: 'Hello!'}; >>>>>>> const params = { Bucket: buckets[1], Key: testObject, Body: 'Hello!' }; <<<<<<< var params = { Bucket: buckets[1], Key: testObject, Body: 'Hello!' }; ======= const params = {Bucket: buckets[1], Key: testObject, Body: 'Hello!'}; >>>>>>> const params = { Bucket: buckets[1], Key: testObject, Body: 'Hello!' }; <<<<<<< var params = { Bucket: buckets[1], Key: testObject, Body: 'Hello!' }; ======= const params = {Bucket: buckets[1], Key: testObject, Body: 'Hello!'}; >>>>>>> const params = { Bucket: buckets[1], Key: testObject, Body: 'Hello!' }; <<<<<<< var params = { Bucket: buckets[1], Key: testObject, Body: 'Hello!' }; ======= const params = {Bucket: buckets[1], Key: testObject, Body: 'Hello!'}; >>>>>>> const params = { Bucket: buckets[1], Key: testObject, Body: 'Hello!' }; <<<<<<< var testObjects = [ { Bucket: buckets[5], Key: "folder1/file1.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/file2.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder2/file3.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder2/file4.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder2/file5.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder2/file6.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder4/file7.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder4/file8.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder4/folder5/file9.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder3/file10.txt", Body: 'Hello!' } ======= const testObjects = [ {Bucket: buckets[5], Key: "folder1/file1.txt", Body: 'Hello!'}, {Bucket: buckets[5], Key: "folder1/file2.txt", Body: 'Hello!'}, {Bucket: buckets[5], Key: "folder1/folder2/file3.txt", Body: 'Hello!'}, {Bucket: buckets[5], Key: "folder1/folder2/file4.txt", Body: 'Hello!'}, {Bucket: buckets[5], Key: "folder1/folder2/file5.txt", Body: 'Hello!'}, {Bucket: buckets[5], Key: "folder1/folder2/file6.txt", Body: 'Hello!'}, {Bucket: buckets[5], Key: "folder1/folder4/file7.txt", Body: 'Hello!'}, {Bucket: buckets[5], Key: "folder1/folder4/file8.txt", Body: 'Hello!'}, {Bucket: buckets[5], Key: "folder1/folder4/folder5/file9.txt", Body: 'Hello!'}, {Bucket: buckets[5], Key: "folder1/folder3/file10.txt", Body: 'Hello!'} >>>>>>> const testObjects = [ { Bucket: buckets[5], Key: "folder1/file1.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/file2.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder2/file3.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder2/file4.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder2/file5.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder2/file6.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder4/file7.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder4/file8.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder4/folder5/file9.txt", Body: 'Hello!' }, { Bucket: buckets[5], Key: "folder1/folder3/file10.txt", Body: 'Hello!' } <<<<<<< this.timeout(0); var testObjects = []; for (var i = 1; i <= 2000; i++) { testObjects.push({ Bucket: buckets[2], Key: 'key' + i, Body: 'Hello!' }); ======= this.timeout(0); const testObjects = []; for (let i = 1; i <= 2000; i++) { testObjects.push({Bucket: buckets[2], Key: 'key' + i, Body: 'Hello!'}); >>>>>>> this.timeout(0); const testObjects = []; for (let i = 1; i <= 2000; i++) { testObjects.push({ Bucket: buckets[2], Key: 'key' + i, Body: 'Hello!' }); <<<<<<< var testObjects = []; for (var i = 1; i <= 500; i++) { testObjects.push({ Bucket: buckets[2], Key: 'key' + i }); ======= const testObjects = []; for (let i = 1; i <= 500; i++) { testObjects.push({Bucket: buckets[2], Key: 'key' + i}); >>>>>>> const testObjects = []; for (let i = 1; i <= 500; i++) { testObjects.push({ Bucket: buckets[2], Key: 'key' + i }); <<<<<<< var deleteObj = { Objects: [] }; for (var i = 501; i <= 1000; i++) { deleteObj.Objects.push({ Key: 'key' + i }); ======= const deleteObj = {Objects: []}; for (let i = 501; i <= 1000; i++) { deleteObj.Objects.push({Key: 'key' + i}); >>>>>>> const deleteObj = { Objects: [] }; for (let i = 501; i <= 1000; i++) { deleteObj.Objects.push({ Key: 'key' + i }); <<<<<<< var deleteObj = { Objects: [{ Key: 'doesnotexist' }] }; s3Client.deleteObjects({ Bucket: buckets[2], Delete: deleteObj }, function (err, resp) { ======= const deleteObj = {Objects: [{Key: 'doesnotexist'}]}; s3Client.deleteObjects({Bucket: buckets[2], Delete: deleteObj}, function (err, resp) { >>>>>>> const deleteObj = { Objects: [{ Key: 'doesnotexist' }] }; s3Client.deleteObjects({ Bucket: buckets[2], Delete: deleteObj }, function (err, resp) { <<<<<<< fs.mkdirs(directory, done); ======= const config = { accessKeyId: '123', secretAccessKey: 'abc', endpoint: util.format('%s:%d', hostname, port), sslEnabled: false, s3ForcePathStyle: true }; AWS.config.update(config); s3Client = new AWS.S3(); s3Client.endpoint = new AWS.Endpoint(config.endpoint); /** * Remove if exists and recreate the temporary directory */ fs.remove(directory, function (err) { if (err) { return done(err); } fs.mkdirs(directory, done); }); >>>>>>> const config = { accessKeyId: '123', secretAccessKey: 'abc', endpoint: util.format('%s:%d', hostname, port), sslEnabled: false, s3ForcePathStyle: true }; AWS.config.update(config); s3Client = new AWS.S3(); s3Client.endpoint = new AWS.Endpoint(config.endpoint); /** * Remove if exists and recreate the temporary directory */ fs.remove(directory, function (err) { if (err) { return done(err); } fs.mkdirs(directory, done); }); <<<<<<< s3Client.createBucket({ Bucket: 'site' }, function () { var params = { Bucket: 'site', Key: 'index.html', Body: '<html><body>Hello</body></html>' }; ======= s3Client.createBucket({Bucket: 'site'}, function () { const params = {Bucket: 'site', Key: 'index.html', Body: '<html><body>Hello</body></html>'}; >>>>>>> s3Client.createBucket({ Bucket: 'site' }, function () { const params = { Bucket: 'site', Key: 'index.html', Body: '<html><body>Hello</body></html>' }; <<<<<<< s3Client.createBucket({ Bucket: 'site' }, function () { var params = { Bucket: 'site', Key: 'page/index.html', Body: '<html><body>Hello</body></html>' }; ======= s3Client.createBucket({Bucket: 'site'}, function () { const params = {Bucket: 'site', Key: 'page/index.html', Body: '<html><body>Hello</body></html>'}; >>>>>>> s3Client.createBucket({ Bucket: 'site' }, function () { const params = { Bucket: 'site', Key: 'page/index.html', Body: '<html><body>Hello</body></html>' }; <<<<<<< s3Client.createBucket({ Bucket: 'site' }, function () { var params = { Bucket: 'site', Key: 'index.html', Body: '<html><body>Hello</body></html>' }; ======= s3Client.createBucket({Bucket: 'site'}, function () { const params = {Bucket: 'site', Key: 'index.html', Body: '<html><body>Hello</body></html>'}; >>>>>>> s3Client.createBucket({ Bucket: 'site' }, function () { const params = { Bucket: 'site', Key: 'index.html', Body: '<html><body>Hello</body></html>' }; <<<<<<< s3Client.createBucket({ Bucket: 'site' }, function () { var params = { Bucket: 'site', Key: 'page/index.html', Body: '<html><body>Hello</body></html>' }; ======= s3Client.createBucket({Bucket: 'site'}, function () { const params = {Bucket: 'site', Key: 'page/index.html', Body: '<html><body>Hello</body></html>'}; >>>>>>> s3Client.createBucket({ Bucket: 'site' }, function () { const params = { Bucket: 'site', Key: 'page/index.html', Body: '<html><body>Hello</body></html>' };
<<<<<<< element(by.css('ul .tc_menuitem_volumes > a')).click(); ======= volumesItem.click(); browser.sleep(400); >>>>>>> element(by.css('ul .tc_menuitem_volumes > a')).click(); browser.sleep(400);
<<<<<<< import layout from '../../../../room/layout'; ======= import feature from '../../../../utils/feature'; >>>>>>> import layout from '../../../../room/layout'; import feature from '../../../../utils/feature'; <<<<<<< async asyncMount({ recordingId, roomIndex }) { ======= componentDidMount() { this.mounted = true; this.asyncMount(this.props); } componentWillUnmount() { this.mounted = false; objects.orb.destroy(); objects.orb2.destroy(); viewer.camera.position.copy(state.originalCameraPosition); viewer.camera.zoom = state.originalZoom; viewer.camera.updateProjectionMatrix(); audio.reset(); audio.fadeOut(); if (room) { room.destroy(); } viewer.camera.position.y = 0; viewer.camera.zoom = 1; viewer.camera.updateProjectionMatrix(); viewer.events.off('tick', tick); } async asyncMount({ recordingId, loopIndex }) { >>>>>>> componentDidMount() { this.mounted = true; this.asyncMount(this.props); } componentWillUnmount() { this.mounted = false; objects.orb.destroy(); objects.orb2.destroy(); viewer.camera.position.copy(state.originalCameraPosition); viewer.camera.zoom = state.originalZoom; viewer.camera.updateProjectionMatrix(); audio.reset(); audio.fadeOut(); if (room) { room.destroy(); } viewer.camera.position.y = 0; viewer.camera.zoom = 1; viewer.camera.updateProjectionMatrix(); viewer.events.off('tick', tick); } async asyncMount({ recordingId, roomIndex }) { <<<<<<< src: `/public/sound/room-${layout.loopIndex(roomIndex)}.mp3`, ======= src: `/public/sound/room-${loopIndex}.${feature.isChrome ? 'ogg' : 'mp3'}`, >>>>>>> src: `/public/sound/room-${layout.loopIndex(roomIndex)}.${feature.isChrome ? 'ogg' : 'mp3'}`,
<<<<<<< invoked: { callbacks: [], feature: 'blackberry.invoked' }, ======= swipedown: { callbacks: [], feature: 'blackberry.app' }, >>>>>>> invoked: { callbacks: [], feature: 'blackberry.invoked' }, swipedown: { callbacks: [], feature: 'blackberry.app' }, <<<<<<< event.on("AppInvoke", function (invokeInfo) { var invokeTargets = app.getInfo().invokeTargets; if (!invokeTargets) { cons.log("The application cannot be invoked, please add a rim:invoke-target node in config.xml"); return; } if (invokeTargets.some(function (target) { return target.filter.some(function (filter) { return ( ((filter.property && filter.property[0]["@attributes"].var === "exts" && filter.property[0]["@attributes"].value.split(",").some(function (value) { return invokeInfo.extension.match(value); })) || (filter.property && filter.property[0]["@attributes"].var === "uris" && filter.property[0]["@attributes"].value.split(",").some(function (value) { return invokeInfo.source.match(value); }))) && filter.action.some(function (action) { return invokeInfo.action.match(action["#text"][0].replace("*", "")); }) && filter["mime-type"].some(function (type) { return invokeInfo.mimeType.match(type["#text"][0].replace("*", "")); }) ); }); })) { _apply('invoked', [invokeInfo]); } else { cons.log("Cannot invoke application, values enter to not match values in rim:invoke-target in config.xml"); } }); event.on('AppResume', function () { ======= event.on('appSwipeDown', function () { _apply('swipedown'); }); event.on('appResume', function () { >>>>>>> event.on("AppInvoke", function (invokeInfo) { var invokeTargets = app.getInfo().invokeTargets; if (!invokeTargets) { cons.log("The application cannot be invoked, please add a rim:invoke-target node in config.xml"); return; } if (invokeTargets.some(function (target) { return target.filter.some(function (filter) { return ( ((filter.property && filter.property[0]["@attributes"].var === "exts" && filter.property[0]["@attributes"].value.split(",").some(function (value) { return invokeInfo.extension.match(value); })) || (filter.property && filter.property[0]["@attributes"].var === "uris" && filter.property[0]["@attributes"].value.split(",").some(function (value) { return invokeInfo.source.match(value); }))) && filter.action.some(function (action) { return invokeInfo.action.match(action["#text"][0].replace("*", "")); }) && filter["mime-type"].some(function (type) { return invokeInfo.mimeType.match(type["#text"][0].replace("*", "")); }) ); }); })) { _apply('invoked', [invokeInfo]); } else { cons.log("Cannot invoke application, values enter to not match values in rim:invoke-target in config.xml"); } }); event.on('AppSwipeDown', function () { _apply('swipedown'); }); event.on('AppResume', function () {
<<<<<<< function skip(name) { delete batch[schemaName][name]; } ======= >>>>>>> function skip(name) { delete batch[schemaName][name]; } <<<<<<< Object.defineProperty(module.exports, 'skip', { writable: true, enumerable: false, configurable: true, value: skip }); ======= function clearAndCreate(model, data, callback) { var createdItems = []; model.destroyAll(function () { nextItem(null, null); }); var itemIndex = 0; function nextItem(err, lastItem) { if (lastItem !== null) { createdItems.push(lastItem); } if (itemIndex >= data.length) { callback(createdItems); return; } model.create(data[itemIndex], nextItem); itemIndex++; } } >>>>>>> Object.defineProperty(module.exports, 'skip', { writable: true, enumerable: false, configurable: true, value: skip }); function clearAndCreate(model, data, callback) { var createdItems = []; model.destroyAll(function () { nextItem(null, null); }); var itemIndex = 0; function nextItem(err, lastItem) { if (lastItem !== null) { createdItems.push(lastItem); } if (itemIndex >= data.length) { callback(createdItems); return; } model.create(data[itemIndex], nextItem); itemIndex++; } }
<<<<<<< var appConf = app.get('database'); var config = railway.orm.config = appConf || {}; ======= var config = railway.orm.config = {}; var env = app.set('env'); >>>>>>> var appConf = app.get('database'); var config = railway.orm.config = appConf || {}; var env = app.set('env'); <<<<<<< if (!appConf) { try { var cf = require(confFile); if (cf instanceof Array) { cf = cf[0]; } if (typeof cf === 'function') { config = cf(railway); } else { config = cf[app.set('env')]; } } catch (e) { console.log('Could not load config/database.{js|json|yml}'); throw e; ======= try { var cf = require(confFile); if (cf instanceof Array) cf = cf[0]; if (typeof cf === 'function') { config = cf(railway); } else { config = cf[env]; >>>>>>> if (!appConf) { try { var cf = require(confFile); if (cf instanceof Array) { cf = cf[0]; } if (typeof cf === 'function') { config = cf(railway); } else { config = cf[env]; } } catch (e) { console.log('Could not load config/database.{js|json|yml}'); throw e;
<<<<<<< <div ref='table' className={ classSet('react-bs-table', this.props.tableContainerClass) } style={ { ...style, ...this.props.tableStyle } } ======= { showPaginationOnTop ? pagination : null } <div className='react-bs-table' ref='table' style={ { ...style, ...this.props.tableStyle } } >>>>>>> { showPaginationOnTop ? pagination : null } <div ref='table' className={ classSet('react-bs-table', this.props.tableContainerClass) } style={ { ...style, ...this.props.tableStyle } }
<<<<<<< this.program_ast = wasm_parser_1.decode(wasm, {}); ======= this.stackData = []; >>>>>>> this.program_ast = wasm_parser_1.decode(wasm, {}); this.stackData = []; <<<<<<< getPushStack() { let result = `__STACK__[${this.stackLevel}] = `; ======= getPushStack(stackExpr) { >>>>>>> getPushStack(stackExpr) {
<<<<<<< ======= import Const from './Const'; import Util from './util'; >>>>>>> import Util from './util';
<<<<<<< const enableKeyBoardNav = (keyBoardNav === true || typeof keyBoardNav === 'object'); const customEditAndNavStyle = typeof keyBoardNav === 'object' ? keyBoardNav.customStyleOnEditCell : null; const customNavStyle = typeof keyBoardNav === 'object' ? keyBoardNav.customStyle : null; ======= const ExpandColumnCustomComponent = this.props.expandColumnOptions.expandColumnComponent; >>>>>>> const enableKeyBoardNav = (keyBoardNav === true || typeof keyBoardNav === 'object'); const customEditAndNavStyle = typeof keyBoardNav === 'object' ? keyBoardNav.customStyleOnEditCell : null; const customNavStyle = typeof keyBoardNav === 'object' ? keyBoardNav.customStyle : null; const ExpandColumnCustomComponent = this.props.expandColumnOptions.expandColumnComponent; <<<<<<< let tabIndex = 1; ======= if (this.props.expandColumnOptions.expandColumnVisible) { expandColSpan += 1; } >>>>>>> let tabIndex = 1; if (this.props.expandColumnOptions.expandColumnVisible) { expandColSpan += 1; } <<<<<<< ======= columnIndex = this._isExpandColumnVisible() ? columnIndex - 1 : columnIndex; >>>>>>> columnIndex = this._isExpandColumnVisible() ? columnIndex - 1 : columnIndex;
<<<<<<< insertModalHeader: PropTypes.func, insertModalBody: PropTypes.func, insertModalFooter: PropTypes.func, insertModal: PropTypes.func, insertBtn: PropTypes.func, deleteBtn: PropTypes.func, showSelectedOnlyBtn: PropTypes.func, exportCSVBtn: PropTypes.func, clearSearchBtn: PropTypes.func, searchField: PropTypes.func, searchPanel: PropTypes.func, btnGroup: PropTypes.func, toolBar: PropTypes.func, sizePerPageDropDown: PropTypes.func, paginationPanel: PropTypes.func, searchPosition: PropTypes.string, expandRowBgColor: PropTypes.string ======= expandRowBgColor: PropTypes.string, expandBy: PropTypes.string >>>>>>> insertModalHeader: PropTypes.func, insertModalBody: PropTypes.func, insertModalFooter: PropTypes.func, insertModal: PropTypes.func, insertBtn: PropTypes.func, deleteBtn: PropTypes.func, showSelectedOnlyBtn: PropTypes.func, exportCSVBtn: PropTypes.func, clearSearchBtn: PropTypes.func, searchField: PropTypes.func, searchPanel: PropTypes.func, btnGroup: PropTypes.func, toolBar: PropTypes.func, sizePerPageDropDown: PropTypes.func, paginationPanel: PropTypes.func, searchPosition: PropTypes.string, expandRowBgColor: PropTypes.string, expandBy: PropTypes.string <<<<<<< insertModalHeader: undefined, insertModalBody: undefined, insertModalFooter: undefined, insertModal: undefined, insertBtn: undefined, deleteBtn: undefined, showSelectedOnlyBtn: undefined, exportCSVBtn: undefined, clearSearchBtn: undefined, searchField: undefined, searchPanel: undefined, btnGroup: undefined, toolBar: undefined, sizePerPageDropDown: undefined, paginationPanel: undefined, searchPosition: 'right', expandRowBgColor: undefined ======= expandRowBgColor: undefined, expandBy: Const.EXPAND_BY_ROW >>>>>>> insertModalHeader: undefined, insertModalBody: undefined, insertModalFooter: undefined, insertModal: undefined, insertBtn: undefined, deleteBtn: undefined, showSelectedOnlyBtn: undefined, exportCSVBtn: undefined, clearSearchBtn: undefined, searchField: undefined, searchPanel: undefined, btnGroup: undefined, toolBar: undefined, sizePerPageDropDown: undefined, paginationPanel: undefined, searchPosition: 'right', expandRowBgColor: undefined, expandBy: Const.EXPAND_BY_ROW
<<<<<<< }, function () { $uibModalInstance.close("failed"); ======= }, function (error) { $scope.deleteForm.$submitted = false; // TODO Toasy on error! console.log("An error occured", error); >>>>>>> }, function () { $scope.deleteForm.$submitted = false;
<<<<<<< var defaultView = Element.getDocument(this).defaultView, computed = defaultView ? defaultView.getComputedStyle(this, null) : null; return (computed) ? computed.getPropertyValue([property.hyphenate()]) : null; ======= var defaultView = this.getDocument().defaultView; var computed = defaultView && defaultView.getComputedStyle(this, null); return (computed) ? computed.getPropertyValue(property.contains('Float') ? 'float' : property.hyphenate()) : null; >>>>>>> var defaultView = Element.getDocument(this).defaultView, computed = defaultView ? defaultView.getComputedStyle(this, null) : null; return (computed) ? computed.getPropertyValue(property.contains('Float') ? 'float' : property.hyphenate()) : null;
<<<<<<< path + 'rt' + format, path + 'lf' + format, path + 'ft' + format, path + 'bk' + format, path + 'up' + format, path + 'dn' + format ======= path + 'rt' + format, path + 'lf' + format, path + 'up' + format, path + 'dn' + format, path + 'bk' + format, path + 'ft' + format >>>>>>> path + 'rt' + format, path + 'lf' + format, path + 'ft' + format, path + 'bk' + format, path + 'up' + format, path + 'dn' + format <<<<<<< function animate(nowTime) { var delta = Math.min((nowTime - lastTime) * 0.001, 0.1); ======= function animate() { var nowTime = Date.now(); var trueDelta = (nowTime - lastTime) * 0.001; var delta = Math.min(trueDelta, 0.1); >>>>>>> function animate(nowTime) { var trueDelta = (nowTime - lastTime) * 0.001; var delta = Math.min(trueDelta, 0.1);
<<<<<<< // Styles are serverOnly. So in order to achieve Live updates in development // we need to mark the style tag to be able to manually find and replace it. var source = '<style data-filename="' + filename + '">' + styles.css + '</style>'; this.views.register(filename, source, {serverOnly: true}); this._watchStyles(styles.files, filename, options); return styles; ======= this.views.register(filename, '<style>' + styles.css + '</style>', {serverOnly: true}); if (!util.isProduction) this._watchStyles(styles.files, filename, options); >>>>>>> // Styles are serverOnly. So in order to achieve Live updates in development // we need to mark the style tag to be able to manually find and replace it. var source = '<style data-filename="' + filename + '">' + styles.css + '</style>'; this.views.register(filename, source, {serverOnly: true}); if (!util.isProduction) this._watchStyles(styles.files, filename, options); return styles;
<<<<<<< renderCtx = extendCtx(view, ctx, null, scope, alias, null, false); hasScope = createComponent(view, model, name[0], name[1], scope, renderCtx, renderMacroCtx, macroAttrs); ======= renderCtx = extendCtx(view, ctx, null, scope, alias, null, false, macro); renderCtx.$elements = {}; createComponent(view, model, Component, scope, renderCtx, renderMacroCtx, macroAttrs); >>>>>>> renderCtx = extendCtx(view, ctx, null, scope, alias, null, false); renderCtx.$elements = {}; createComponent(view, model, Component, scope, renderCtx, renderMacroCtx, macroAttrs);
<<<<<<< "sAjaxSource": 'snapshot', "aoColumns": [ ======= "bProcessing": true, "sAjaxSource": "../ec2?Action=DescribeSnapshots", "fnServerData": function (sSource, aoData, fnCallback) { $.ajax( { "dataType": 'json', "type": "POST", "url": sSource, "data": "_xsrf="+$.cookie('_xsrf'), "success": fnCallback }); }, "sAjaxDataProp": "results", "bAutoWidth" : false, "sPaginationType": "full_numbers", "aoColumnDefs": [ >>>>>>> "sAjaxSource": 'snapshot', "aoColumnDefs": [
<<<<<<< var keyName = $.trim($import_dialog.find('#key-name').val()); var keyContents = $.trim($import_dialog.find('#key-import-contents').val()); var keyFile = $.trim($import_dialog.find('#key-import-file').val()); ======= var keyName = $.trim(asText($import_dialog.find('#key-name').val())); var keyContents = $.trim(asText($import_dialog.find('#key-import-contents').val())); >>>>>>> var keyName = $.trim(asText($import_dialog.find('#key-name').val())); var keyContents = $.trim(asText($import_dialog.find('#key-import-contents').val())); var keyFile = $.trim($import_dialog.find('#key-import-file').val());
<<<<<<< enableMonitoring: true, ======= >>>>>>> <<<<<<< privateNetwork: false, enableStorageVolume: true, enableMapping: true, enableSnapshot: true, deleteOnTerm: true, ======= >>>>>>> newMapping: new blockmap(), <<<<<<< this.model.on('change', function() { // self.model.set('advanced_show', true); var tmp = scope.blockDeviceMappings.findWhere({device_name: '/dev/sda'}); if (scope.root == undefined) scope.root = tmp; else if (tmp != undefined) scope.root = tmp; if (scope.blockDeviceMappings.length > 0) { scope.blockDeviceMappings = scope.blockDeviceMappings.reduce(function(c, v) { return v.get('device_name') == '/dev/sda' ? c : c.add(v); }, new Backbone.Collection()); } }); ======= >>>>>>> this.model.on('change', function() { var tmp = scope.blockDeviceMappings.findWhere({device_name: '/dev/sda'}); if (scope.root == undefined) scope.root = tmp; else if (tmp != undefined) scope.root = tmp; if (scope.blockDeviceMappings.length > 0) { scope.blockDeviceMappings = scope.blockDeviceMappings.reduce(function(c, v) { return v.get('device_name') == '/dev/sda' ? c : c.add(v); }, new Backbone.Collection()); } });
<<<<<<< "sAjaxSource": 'keypair', "aoColumnDefs": [ ======= "bProcessing": true, "bServerSide": true, "sAjaxDataProp": function(json) { return json; }, "sAjaxSource": 'keypairs', "aoColumns": [ >>>>>>> "sAjaxSource": 'keypairs', "aoColumnDefs": [
<<<<<<< // only allow ten tags if( self.scope.tags.length >= 10 ) { var limit = self.scope.tags.length; // length limit, but have any been deleted? self.scope.tags.each( function(t, idx) { if (t.get('_deleted')) { limit--; } }); if (limit >= 10) { self.scope.error.set('name', app.msg('tag_limit_error_name')); self.scope.error.set('value', app.msg('tag_limit_error_value')); return; ======= this.scope = { newtag: new Tag(), tags: tags, isTagValid: true, error: new Backbone.Model({}), status: '', // Abort other edit-in-progress deactivateEdits: function() { self.scope.tags.each(function(t) { if (t.get('_edit')) { t.set(t.get('_backup').pick('name','value')); t.set({_clean: true, _deleted: false, _edit: false}); } }); }, // Disable all buttons while editing a tag disableButtons: function() { self.scope.tags.each(function(t) { if( !t.get('_deleted') ){ t.set({_clean: false, _displayonly: true}); } }); }, // Restore the buttons to be clickable enableButtons: function() { self.scope.tags.each(function(t) { if( !t.get('_deleted') ){ t.set({_clean: true, _displayonly: false}); } }); }, // Entering the Tag-Edit mode enterTagEditMode: function() { self.scope.deactivateEdits(); self.scope.disableButtons(); }, // Entering the Clean mode enterCleanMode: function() { self.scope.enableButtons(); }, create: function() { // NO-OP IF NOT VALID if( !self.scope.isTagValid ){ return; } // only allow ten tags if( self.scope.tags.length >= 10 ) { var limit = self.scope.tags.length; // length limit, but have any been deleted? self.scope.tags.each( function(t, idx) { if (t.get('_deleted')) { limit--; } }); if (limit >= 10) { self.scope.error.set('name', app.msg('tag_limit_error_name')); self.scope.error.set('value', app.msg('tag_limit_error_value')); return; } } var newt = new Tag(self.scope.newtag.toJSON()); newt.set({_clean: true, _deleted: false, _edited: false, _edit: false, _new: true}); newt.set('res_id', model.get('id')); if (newt.get('name') && newt.get('value') && newt.get('name') !== '' && newt.get('value') !== '') { console.log('create', newt); self.scope.tags.add(newt); self.scope.newtag.clear(); self.scope.isTagValid = true; self.scope.error.clear(); self.render(); } }, edit: function(element, scope) { console.log('edit'); self.scope.enterTagEditMode(); // RETREIVE THE ID OF THE TAG var tagID = scope.tag.get('id'); console.log("TAG ID: " + tagID); // STORE THE ORIGINAL KEY-VALUE WHEN FIRST EDITED: _FIRSTBACKUP if( scope.tag.get('_firstbackup') == undefined ){ scope.tag.set('_firstbackup', scope.tag.clone()); } // KEEP THE PREVIOUS TAG AS _BACKUP scope.tag.set('_backup', scope.tag.clone()); // MARK THE STATE AS _EDIT scope.tag.set({_clean: false, _deleted: false, _edited: false, _edit: true, _displayonly: false}); // SET UP VALIDATE ON THIS TAG scope.tag.on('change', function(thisTag) { scope.error.clear(); scope.error.set(scope.tag.validate()); thisTag.set('tag_is_invalid', !scope.tag.isValid()); model.trigger('validation_change', thisTag); }); // VERIFY THE VALIDATION STATUS scope.tag.on('validated', function(model) { scope.isTagValid = scope.tag.isValid(); }); }, confirm: function(element, scope) { // NO-OP IF NOT VALID if( !scope.isTagValid ){ return; } if (scope.tag.get('name') != scope.tag.get('_backup').get('name')) { scope.tag.set('id', undefined); } else { scope.tag.set('_backup', undefined); } scope.tag.set({_clean: true, _deleted: false, _edited: true, _edit: false}); self.scope.enterCleanMode(); self.render(); }, restore: function(element, scope) { if ( scope.tag.get('_backup') != null ) { scope.tag.set( scope.tag.get('_backup').toJSON() ); } else { scope.tag.set({_clean: true, _deleted: false, _edit: false}); } scope.error.clear(); self.scope.enterCleanMode(); self.render(); }, delete: function(element, scope) { console.log('delete'); // ALWAYS BACKUP BEFORE DELETE scope.tag.set( '_backup', scope.tag.clone() ); scope.tag.set({_clean: false, _deleted: true, _edit: false}); }, } // end of scope self.scope.newtag.validation.res_id.required = false; self.scope.newtag.on('change', function() { self.scope.error.clear(); self.scope.error.set(self.scope.newtag.validate()); if(!self.scope.newtag.get('name') && !self.scope.newtag.get('value')) { self.scope.newtag.unset('tag_is_invalid'); model.trigger('validation_change', self.scope.newtag); ; // ignore - not a real tag *BUG?* } else { self.scope.newtag.set('tag_is_invalid', !self.scope.newtag.isValid()); model.trigger('validation_change', self.scope.newtag); >>>>>>> // only allow ten tags if( self.scope.tags.length >= 10 ) { var limit = self.scope.tags.length; // length limit, but have any been deleted? self.scope.tags.each( function(t, idx) { if (t.get('_deleted')) { limit--; } }); if (limit >= 10) { self.scope.error.set('name', app.msg('tag_limit_error_name')); self.scope.error.set('value', app.msg('tag_limit_error_value')); return; this.scope = { newtag: new Tag(), tags: tags, isTagValid: true, error: new Backbone.Model({}), status: '', // Abort other edit-in-progress deactivateEdits: function() { self.scope.tags.each(function(t) { if (t.get('_edit')) { t.set(t.get('_backup').pick('name','value')); t.set({_clean: true, _deleted: false, _edit: false}); } }); }, // Disable all buttons while editing a tag disableButtons: function() { self.scope.tags.each(function(t) { if( !t.get('_deleted') ){ t.set({_clean: false, _displayonly: true}); } }); }, // Restore the buttons to be clickable enableButtons: function() { self.scope.tags.each(function(t) { if( !t.get('_deleted') ){ t.set({_clean: true, _displayonly: false}); } }); }, // Entering the Tag-Edit mode enterTagEditMode: function() { self.scope.deactivateEdits(); self.scope.disableButtons(); }, // Entering the Clean mode enterCleanMode: function() { self.scope.enableButtons(); }, create: function() { // NO-OP IF NOT VALID if( !self.scope.isTagValid ){ return; } // only allow ten tags if( self.scope.tags.length >= 10 ) { var limit = self.scope.tags.length; // length limit, but have any been deleted? self.scope.tags.each( function(t, idx) { if (t.get('_deleted')) { limit--; } }); if (limit >= 10) { self.scope.error.set('name', app.msg('tag_limit_error_name')); self.scope.error.set('value', app.msg('tag_limit_error_value')); return; } } var newt = new Tag(self.scope.newtag.toJSON()); newt.set({_clean: true, _deleted: false, _edited: false, _edit: false, _new: true}); newt.set('res_id', model.get('id')); if (newt.get('name') && newt.get('value') && newt.get('name') !== '' && newt.get('value') !== '') { console.log('create', newt); self.scope.tags.add(newt); self.scope.newtag.clear(); self.scope.isTagValid = true; self.scope.error.clear(); self.render(); } }, edit: function(element, scope) { console.log('edit'); self.scope.enterTagEditMode(); // RETREIVE THE ID OF THE TAG var tagID = scope.tag.get('id'); console.log("TAG ID: " + tagID); // STORE THE ORIGINAL KEY-VALUE WHEN FIRST EDITED: _FIRSTBACKUP if( scope.tag.get('_firstbackup') == undefined ){ scope.tag.set('_firstbackup', scope.tag.clone()); } // KEEP THE PREVIOUS TAG AS _BACKUP scope.tag.set('_backup', scope.tag.clone()); // MARK THE STATE AS _EDIT scope.tag.set({_clean: false, _deleted: false, _edited: false, _edit: true, _displayonly: false}); // SET UP VALIDATE ON THIS TAG scope.tag.on('change', function(thisTag) { scope.error.clear(); scope.error.set(scope.tag.validate()); thisTag.set('tag_is_invalid', !scope.tag.isValid()); model.trigger('validation_change', thisTag); }); // VERIFY THE VALIDATION STATUS scope.tag.on('validated', function(model) { scope.isTagValid = scope.tag.isValid(); }); }, confirm: function(element, scope) { // NO-OP IF NOT VALID if( !scope.isTagValid ){ return; } if (scope.tag.get('name') != scope.tag.get('_backup').get('name')) { scope.tag.set('id', undefined); } else { scope.tag.set('_backup', undefined); } scope.tag.set({_clean: true, _deleted: false, _edited: true, _edit: false}); self.scope.enterCleanMode(); self.render(); }, restore: function(element, scope) { if ( scope.tag.get('_backup') != null ) { scope.tag.set( scope.tag.get('_backup').toJSON() ); } else { scope.tag.set({_clean: true, _deleted: false, _edit: false}); } scope.error.clear(); self.scope.enterCleanMode(); self.render(); }, delete: function(element, scope) { console.log('delete'); // ALWAYS BACKUP BEFORE DELETE scope.tag.set( '_backup', scope.tag.clone() ); scope.tag.set({_clean: false, _deleted: true, _edit: false}); }, } // end of scope self.scope.newtag.validation.res_id.required = false; self.scope.newtag.on('change', function() { self.scope.error.clear(); self.scope.error.set(self.scope.newtag.validate()); if(!self.scope.newtag.get('name') && !self.scope.newtag.get('value')) { self.scope.newtag.unset('tag_is_invalid'); model.trigger('validation_change', self.scope.newtag); ; // ignore - not a real tag *BUG?* } else { self.scope.newtag.set('tag_is_invalid', !self.scope.newtag.isValid()); model.trigger('validation_change', self.scope.newtag);
<<<<<<< $('<input>').attr('id','launch-wizard-advanced-input-userdata').attr('type','text')), $('<div>').append('Or. ').append( ======= $('<input>').attr('id','launch-wizard-advanced-input-userdata').attr('type','text').change(function(e){ var $summary = summarize(); thisObj._setSummary('advanced', $summary.clone().children()); })), $('<div>').append('Or. ',$('<a>').attr('href','#').text(launch_instance_advanced_attachfile).click(function(e){ var $input = $userdata.find('#launch-wizard-advanced-input-userfile'); $input.trigger('click'); })), $('<div>').hide().append( >>>>>>> $('<div>').append('Or. ').append( $('<input>').attr('id','launch-wizard-advanced-input-userdata').attr('type','text').change(function(e){ var $summary = summarize(); thisObj._setSummary('advanced', $summary.clone().children()); })),
<<<<<<< } rivets.binders["include"] = { bind: function(el) { var self = this; var path = $(el).text(); require([path], function(view) { self.bbView = new view({ model: self.bbLastValue ? self.bbLastValue : {}, }); $(el).replaceWith($(self.bbView.el).children()); return self.bbView.el; }); }, routine: function(el, value) { this.bbLastValue = value; if (this.bbView) { this.bbView.model = value; this.bbView.render(); } } ======= } rivets.binders['entitytext'] = { routine: function(el, value) { return rivets.binders.text(el, $('<div/>').html(value).text()); } >>>>>>> } rivets.binders["include"] = { bind: function(el) { var self = this; var path = $(el).text(); require([path], function(view) { self.bbView = new view({ model: self.bbLastValue ? self.bbLastValue : {}, }); $(el).replaceWith($(self.bbView.el).children()); return self.bbView.el; }); }, routine: function(el, value) { this.bbLastValue = value; if (this.bbView) { this.bbView.model = value; this.bbView.render(); } } rivets.binders['entitytext'] = { routine: function(el, value) { return rivets.binders.text(el, $('<div/>').html(value).text()); }
<<<<<<< "sAjaxSource": 'volume', ======= "bProcessing": true, "bServerSide": true, "sAjaxSource": 'volumes', >>>>>>> "sAjaxSource": 'volumes', <<<<<<< // Display the id of the volume in the main table "aTargets":[1], "mRender": function(data) { return getTagForResource(data); }, "mData": "id", ======= // Display the id of the volume in the main table "mDataProp": "display_id" >>>>>>> // Display the id of the volume in the main table "aTargets":[1], "mRender": function(data) { return getTagForResource(data); }, "mData": "display_id", <<<<<<< "aTargets":[5], "mRender": function(data) { return DefaultEncoder().encodeForHTML(data); }, "mData": "snapshot_id", ======= "mDataProp": "display_snapshot_id" >>>>>>> "aTargets":[5], "mRender": function(data) { return DefaultEncoder().encodeForHTML(data); }, "mData": "display_snapshot_id",
<<<<<<< notifyError(null, error_loading_instances_msg); isDone = false; ======= notifyError('describe-instances', 'failed to load instances'); //TODO : this is the right notification method? >>>>>>> notifyError(null, error_loading_instances_msg);
<<<<<<< // volume detach dialog end // volume force detach dialog start $tmpl = $('html body').find('.templates #volumeForceDetachDlgTmpl').clone(); var $rendered = $($tmpl.render($.extend($.i18n.map, help_volume))); var $force_detach_dialog = $rendered.children().first(); var $force_detach_help = $rendered.children().last(); this.forceDetachDialog = $force_detach_dialog.eucadialog({ id: 'volumes-force-detach', title: volume_dialog_force_detach_title, buttons: { 'detach': {text: volume_dialog_detach_btn, click: function() { thisObj._detachListedVolumes(true); $force_detach_dialog.dialog("close");}}, 'cancel': {text: volume_dialog_cancel_btn, focus:true, click: function() { $force_detach_dialog.dialog("close");}} }, help: {title: help_volume['dialog_force_detach_title'], content: $force_detach_help}, }); // volume force detach dialog end // attach dialog start ======= >>>>>>> // volume detach dialog end // attach dialog start