code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/app/components/Blockchain/Transaction.jsx b/app/components/Blockchain/Transaction.jsx @@ -49,15 +49,15 @@ class OpType extends React.Component {
<tr>
<td>
<span className={labelClass}>
- {trxTypes[ops[this.props.type]]}
- {this.props.txIndex > 0 ? (
+ {this.props.txIndex >= 0 ? (
<span>
- <Translate content="explorer.block.trx" />
- {this.props.txIndex}
+ #{this.props.txIndex + 1}
+ :
</span>
) : (
""
)}
+ {trxTypes[ops[this.props.type]]}
</span>
</td>
<td />
@@ -172,7 +172,8 @@ class Transaction extends React.Component {
<td className="memo">{text}</td>
) : !text && isMine ? (
<td>
- <Translate content="transfer.memo_unlock" />
+ <Translate content="transfer.memo_unlock" />
+
<a onClick={this._toggleLock.bind(this)}>
<Icon
name="locked"
@@ -1008,7 +1009,8 @@ class Transaction extends React.Component {
<td>{text}</td>
) : !text && isMine ? (
<td>
- <Translate content="transfer.memo_unlock" />
+ <Translate content="transfer.memo_unlock" />
+
<a onClick={this._toggleLock.bind(this)}>
<Icon
name="locked"
@@ -1447,7 +1449,8 @@ class Transaction extends React.Component {
/>
</td>
<td style={{fontSize: "80%"}}>
- {op[1].balance_owner_key.substring(0, 10)}...
+ {op[1].balance_owner_key.substring(0, 10)}
+ ...
</td>
</tr>
);
| 14 |
diff --git a/Contributors.md b/Contributors.md - [@borason](https://github.com/borason)
- [@Mirhatyasar](https://github.com/Mirhatyasar)
- [@erics0n](https://github.com/erics0n)
-
- [khasanovsm](https://github.com/khasanovsm)
- [@nataschaluna](https://github.com/nataschaluna)
\ No newline at end of file
| 1 |
diff --git a/packages/gatsby/src/bootstrap/load-plugins/load.js b/packages/gatsby/src/bootstrap/load-plugins/load.js @@ -77,7 +77,9 @@ function resolvePlugin(pluginName) {
version: packageJSON.version,
}
} catch (err) {
- throw new Error(`Unable to find plugin "${pluginName}"`)
+ throw new Error(
+ `Unable to find plugin "${pluginName}". Perhaps you need to install its package?`
+ )
}
}
| 7 |
diff --git a/src/core/operations/Magic.mjs b/src/core/operations/Magic.mjs @@ -23,7 +23,7 @@ class Magic extends Operation {
this.name = "Magic";
this.flowControl = true;
this.module = "Default";
- this.description = "The Magic operation attempts to detect various properties of the input data and suggests which operations could help to make more sense of it.<br><br><b>Options</b><br><u>Depth:</u> If an operation appears to match the data, it will be run and the result will be analysed further. This argument controls the maximum number of levels of recursion.<br><br><u>Intensive mode:</u> When this is turned on, various operations like XOR, bit rotates, and character encodings are brute-forced to attempt to detect valid data underneath. To improve performance, only the first 100 bytes of the data is brute-forced.<br><br><u>Extensive language support:</u> At each stage, the relative byte frequencies of the data will be compared to average frequencies for a number of languages. The default set consists of ~40 of the most commonly used languages on the Internet. The extensive list consists of 284 languages and can result in many languages matching the data if their byte frequencies are similar.";
+ this.description = "The Magic operation attempts to detect various properties of the input data and suggests which operations could help to make more sense of it.<br><br><b>Options</b><br><u>Depth:</u> If an operation appears to match the data, it will be run and the result will be analysed further. This argument controls the maximum number of levels of recursion.<br><br><u>Intensive mode:</u> When this is turned on, various operations like XOR, bit rotates, and character encodings are brute-forced to attempt to detect valid data underneath. To improve performance, only the first 100 bytes of the data is brute-forced.<br><br><u>Extensive language support:</u> At each stage, the relative byte frequencies of the data will be compared to average frequencies for a number of languages. The default set consists of ~40 of the most commonly used languages on the Internet. The extensive list consists of 284 languages and can result in many languages matching the data if their byte frequencies are similar.<br><br>Optionally enter a regular expression to match a string you expect to find to filter results (crib)";
this.infoURL = "https://github.com/gchq/CyberChef/wiki/Automatic-detection-of-encoded-data-using-CyberChef-Magic";
this.inputType = "ArrayBuffer";
this.outputType = "JSON";
| 0 |
diff --git a/cypress/integration/rendering/gitGraph.spec.js b/cypress/integration/rendering/gitGraph.spec.js import { imgSnapshotTest } from '../../helpers/util.js';
describe('Git Graph diagram', () => {
- it('1: should render a simple gitgraph with commit on master branch', () => {
+ it('1: should render a simple gitgraph with commit on main branch', () => {
imgSnapshotTest(
`gitGraph
commit
@@ -11,7 +11,7 @@ describe('Git Graph diagram', () => {
{}
);
});
- it('2: should render a simple gitgraph with commit on master branch with Id', () => {
+ it('2: should render a simple gitgraph with commit on main branch with Id', () => {
imgSnapshotTest(
`gitGraph
commit id: "One"
@@ -21,7 +21,7 @@ describe('Git Graph diagram', () => {
{}
);
});
- it('3: should render a simple gitgraph with different commitTypes on master branch ', () => {
+ it('3: should render a simple gitgraph with different commitTypes on main branch ', () => {
imgSnapshotTest(
`gitGraph
commit id: "Normal Commit"
@@ -31,7 +31,7 @@ describe('Git Graph diagram', () => {
{}
);
});
- it('4: should render a simple gitgraph with tags commitTypes on master branch ', () => {
+ it('4: should render a simple gitgraph with tags commitTypes on main branch ', () => {
imgSnapshotTest(
`gitGraph
commit id: "Normal Commit with tag" teg: "v1.0.0"
@@ -50,7 +50,7 @@ describe('Git Graph diagram', () => {
checkout develop
commit
commit
- checkout master
+ checkout main
commit
commit
`,
@@ -66,7 +66,7 @@ describe('Git Graph diagram', () => {
checkout develop
commit
commit
- checkout master
+ checkout main
merge develop
commit
commit
@@ -82,21 +82,21 @@ describe('Git Graph diagram', () => {
branch nice_feature
checkout nice_feature
commit
- checkout master
+ checkout main
commit
checkout nice_feature
branch very_nice_feature
checkout very_nice_feature
commit
- checkout master
+ checkout main
commit
checkout nice_feature
commit
- checkout master
+ checkout main
merge nice_feature
checkout very_nice_feature
commit
- checkout master
+ checkout main
commit
`,
{}
| 14 |
diff --git a/src/plots/polar/legacy/area_attributes.js b/src/plots/polar/legacy/area_attributes.js var scatterAttrs = require('../../../traces/scatter/attributes');
var scatterMarkerAttrs = scatterAttrs.marker;
+var extendFlat = require('../../../lib/extend').extendFlat;
+
+var deprecationWarning = 'Area traces are deprecated!';
module.exports = {
- r: scatterAttrs.r,
- t: scatterAttrs.t,
+ r: extendFlat({}, scatterAttrs.r, {
+ description: [
+ deprecationWarning,
+ scatterAttrs.r.description
+ ].join(' ')
+ }),
+ t: extendFlat({}, scatterAttrs.t, {
+ description: [
+ deprecationWarning,
+ scatterAttrs.t.description
+ ].join(' ')
+ }),
marker: {
- color: scatterMarkerAttrs.color,
- size: scatterMarkerAttrs.size,
- symbol: scatterMarkerAttrs.symbol,
- opacity: scatterMarkerAttrs.opacity,
+ color: extendFlat({}, scatterMarkerAttrs.color, {
+ description: [
+ deprecationWarning,
+ scatterMarkerAttrs.color.description
+ ].join(' ')
+ }),
+ size: extendFlat({}, scatterMarkerAttrs.size, {
+ description: [
+ deprecationWarning,
+ scatterMarkerAttrs.size.description
+ ].join(' ')
+ }),
+ symbol: extendFlat({}, scatterMarkerAttrs.symbol, {
+ description: [
+ deprecationWarning,
+ scatterMarkerAttrs.symbol.description
+ ].join(' ')
+ }),
+ opacity: extendFlat({}, scatterMarkerAttrs.opacity, {
+ description: [
+ deprecationWarning,
+ scatterMarkerAttrs.opacity.description
+ ].join(' ')
+ }),
editType: 'calc'
}
};
| 0 |
diff --git a/src/converter/r2t/ImportEntities.js b/src/converter/r2t/ImportEntities.js @@ -73,13 +73,15 @@ export default class ImportEntities {
// TODO: import other metadata, such as publication history, authors,
// affiliations etc.
- entityDb.create({
+ let articleNode = {
id: 'main-article',
type: 'journal-article',
references: refEntityIds,
authors: authors,
editors: editors
- })
+ }
+ console.log('articleNode', articleNode)
+ entityDb.create(articleNode)
// Now we delete all refList elements, as the data is stored in the
// main-article node.
@@ -336,6 +338,7 @@ function _extractOrganisations(dom, entityDb) {
function _extractAuthors(dom, entityDb, type) {
let contribGroup = dom.find(`contrib-group[content-type=${type}]`)
let contribs = contribGroup.findAll('contrib')
+ let personIds = []
contribs.forEach(contrib => {
let orgIds = contrib.findAll('xref').map(xref => xref.rid)
let node = {
@@ -348,7 +351,9 @@ function _extractAuthors(dom, entityDb, type) {
affiliations: orgIds
}
entityDb.create(node)
+ personIds.push(node.id)
})
+ return personIds
}
function _getTextFromDOM(rootEl, selector) {
| 7 |
diff --git a/packages/app/src/components/Navbar/GrowiContextualSubNavigation.tsx b/packages/app/src/components/Navbar/GrowiContextualSubNavigation.tsx @@ -41,6 +41,7 @@ import { SubNavButtonsProps } from './SubNavButtons';
import AuthorInfoStyles from './AuthorInfo.module.scss';
import PageEditorModeManagerStyles from './PageEditorModeManager.module.scss';
+import { useRouter } from 'next/router';
const AuthorInfoSkelton = () => <Skelton additionalClass={`${AuthorInfoStyles['grw-author-info-skelton']} py-1`} />;
@@ -184,6 +185,8 @@ type GrowiContextualSubNavigationProps = {
const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps): JSX.Element => {
+ const router = useRouter();
+
const { data: currentPage, mutate: mutateCurrentPage } = useSWRxCurrentPage();
const revision = currentPage?.revision;
@@ -270,9 +273,15 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
return;
}, [mutatePageTagsForEditors]);
+ const reload = useCallback(() => {
+ if (currentPathname != null) {
+ router.push(currentPathname);
+ }
+ }, []);
+
const duplicateItemClickedHandler = useCallback(async(page: IPageForPageDuplicateModal) => {
const duplicatedHandler: OnDuplicatedFunction = (fromPath, toPath) => {
- window.location.href = toPath;
+ router.push(toPath);
};
openDuplicateModal(page, { onDuplicated: duplicatedHandler });
}, [openDuplicateModal]);
@@ -280,15 +289,16 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
const renameItemClickedHandler = useCallback(async(page: IPageToRenameWithMeta<IPageInfoForEntity>) => {
const renamedHandler: OnRenamedFunction = () => {
if (page.data._id !== null) {
- window.location.href = `/${page.data._id}`;
+ router.push(`/${page.data._id}`);
return;
}
- window.location.reload();
+ reload();
};
openRenameModal(page, { onRenamed: renamedHandler });
}, [openRenameModal]);
- const onDeletedHandler: OnDeletedFunction = useCallback((pathOrPathsToDelete, isRecursively, isCompletely) => {
+ const deleteItemClickedHandler = useCallback((pageWithMeta: IPageWithMeta) => {
+ const deletedHandler: OnDeletedFunction = (pathOrPathsToDelete, isRecursively, isCompletely) => {
if (typeof pathOrPathsToDelete !== 'string') {
return;
}
@@ -297,16 +307,14 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
if (isCompletely) {
// redirect to NotFound Page
- window.location.href = path;
+ router.push(path);
}
else {
- window.location.reload();
+ reload();
}
- }, []);
-
- const deleteItemClickedHandler = useCallback((pageWithMeta: IPageWithMeta) => {
- openDeleteModal([pageWithMeta], { onDeleted: onDeletedHandler });
- }, [onDeletedHandler, openDeleteModal]);
+ };
+ openDeleteModal([pageWithMeta], { onDeleted: deletedHandler });
+ }, [openDeleteModal]);
const templateMenuItemClickHandler = useCallback(() => {
setIsPageTempleteModalShown(true);
| 7 |
diff --git a/lib/xlsx/xform/style/styles-xform.js b/lib/xlsx/xform/style/styles-xform.js @@ -82,6 +82,8 @@ class StylesXform extends BaseXform {
// add default fills
this._addFill({type: 'pattern', pattern: 'none'});
this._addFill({type: 'pattern', pattern: 'gray125'});
+
+ this.weakMap = new Map()
}
render(xmlStream, model) {
| 7 |
diff --git a/docs/index.html b/docs/index.html ---
layout: "default"
-title: "siimple"
+title: "Documentation"
subtitle: "A minimal and Open Source CSS framework for building flat and clean web applications and sites!"
---
<link rel="stylesheet" href="/assets/css/icons.css">
-<title>Documentation for version {{ site.version }} | {{ site.title }}</title>
<div class="siimple-jumbotron theme-header siimple-jumbotron--large" align="center">
- <div class="siimple-jumbotron-title">{{ site.title }} {{ site.version }}</div>
+ <div class="siimple-jumbotron-title">siimple v{{ site.version }}</div>
<div class="siimple-jumbotron-subtitle">{{ page.subtitle }}</div>
</div>
<div class="siimple-content siimple-content--large siimple--py-5">
| 1 |
diff --git a/apps/bthrm/boot.js b/apps/bthrm/boot.js Bangle.isHRMOn = function() {
var settings = require('Storage').readJSON("bthrm.json", true) || {};
- print(settings);
if (settings.enabled && !settings.replace){
return origIsHRMOn();
} else if (settings.enabled && settings.replace){
if (settings.enabled || !isOn){
Bangle.setBTHRMPower(isOn, app);
}
- if (settings.enabled && !settings.replace || !isOn){
+ if ((settings.enabled && !settings.replace) || !settings.enabled || !isOn){
origSetHRMPower(isOn, app);
}
}
+
+ var settings = require('Storage').readJSON("bthrm.json", true) || {};
+ if (settings.enabled && settings.replace){
+ if (!(Bangle._PWR===undefined) && !(Bangle._PWR.HRM===undefined)){
+ for (var i = 0; i < Bangle._PWR.HRM.length; i++){
+ var app = Bangle._PWR.HRM[i];
+ origSetHRMPower(0, app);
+ Bangle.setBTHRMPower(1, app);
+ if (Bangle._PWR.HRM===undefined) break;
+ }
+ }
+}
})();
| 5 |
diff --git a/protocols/market/contracts/Market.sol b/protocols/market/contracts/Market.sol @@ -113,7 +113,15 @@ contract Market is Ownable {
return false;
}
- removeIntent(_user);
+ // Link its neighbors together.
+ link(intentsLinkedList[_user][PREV], intentsLinkedList[_user][NEXT]);
+
+ // Delete user from the list.
+ delete intentsLinkedList[_user][PREV];
+ delete intentsLinkedList[_user][NEXT];
+
+ // Decrement the length of the linked list.
+ length = length - 1;
emit UnsetIntent(_user);
return true;
@@ -233,22 +241,4 @@ contract Market is Ownable {
intentsLinkedList[_left.user][NEXT] = _right;
intentsLinkedList[_right.user][PREV] = _left;
}
-
- /**
- * @notice Removes a specified user from the linked list
- *
- * @param _user the user in question
- */
- function removeIntent(address _user) internal {
- // Link its neighbors together.
- link(intentsLinkedList[_user][PREV], intentsLinkedList[_user][NEXT]);
-
- // Delete user from the list.
- delete intentsLinkedList[_user][PREV];
- delete intentsLinkedList[_user][NEXT];
-
- // Decrement the length of the linked list.
- length = length - 1;
- }
-
}
| 2 |
diff --git a/src/kit/model/addModelObserver.js b/src/kit/model/addModelObserver.js export default function addModelObserver (model, fn, comp, options) {
// NodeModels and alike
if (model._node) {
+ // NOTE: here we exploit internal knowledge about node types and only register
+ // for updates that are relevant on this level
+ // E.g., for an XMLElementNode we are only interested in changes to `<id>._childNodes`
+ // TODO: allow to register for multiple paths, e.g. `childNodes` and `attributes`
+ let node = model._node
+ let selector
+ if (node._elementType === 'element') {
+ selector = {
+ path: [node.id, '_childNodes']
+ }
+ } else {
+ selector = {
+ path: [node.id]
+ }
+ }
comp.context.appState.addObserver(['document'], fn, comp, {
stage: options.stage,
- document: {
- path: [model._node.id]
- }
+ document: selector
})
// PropertyModels
} else if (model._path) {
comp.context.appState.addObserver(['document'], fn, comp, {
- path: model._path,
+ document: {
+ path: model._path
+ },
stage: options.stage
})
} else if (model._isCompositeModel) {
| 7 |
diff --git a/assets/js/googlesitekit/datastore/user/user-input-settings.js b/assets/js/googlesitekit/datastore/user/user-input-settings.js @@ -203,7 +203,7 @@ export const baseControls = {
registry.select( CORE_USER ).getUserInputSettings() || {};
settings[ settingID ] = {
- ...( ( settings || {} )[ settingID ] || {} ),
+ ...( settings?.[ settingID ] || {} ),
values,
};
| 7 |
diff --git a/util.js b/util.js @@ -50,7 +50,7 @@ var reboxValue = exports.reboxValue = function (value, isPrivate) {
for (var key in value) {
if (key == 'content')
o[key] = value.cyphertext || value.content
- else if (key != 'cyphertext' && key != 'private')
+ else if (key != 'cyphertext' && key != 'private' && key != 'unbox')
o[key] = value[key]
}
| 8 |
diff --git a/_data/conferences.yml b/_data/conferences.yml year: 2023
id: cvpr23
link: http://cvpr2023.thecvf.com/
- deadline: '2022-11-22 23:59:59'
+ deadline: '2022-11-11 23:59:59'
timezone: America/Los_Angeles
place: Vancouver, Canada
date: June 17-23, 2023
| 3 |
diff --git a/server/preprocessing/other-scripts/test/base-test.R b/server/preprocessing/other-scripts/test/base-test.R @@ -5,10 +5,9 @@ library(rstudioapi)
options(warn=1)
wd <- dirname(rstudioapi::getActiveDocumentContext()$path)
-Sys.unsetenv("HEADSTART_LOGFILE")
setwd(wd) #Don't forget to set your working directory
-query <- "latest research topics in parallel programming" #args[2]
+query <- "education" #args[2]
service <- "base"
params <- NULL
params_file <- "params_base.json"
| 13 |
diff --git a/src/mixins/helpers.js b/src/mixins/helpers.js @@ -4,7 +4,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import {getTrackCSS, getTrackLeft, getTrackAnimateCSS} from './trackHelper';
import assign from 'object-assign';
-import { getOnDemandLazySlides, elementInViewport } from '../utils/innerSliderUtils'
+import { getOnDemandLazySlides } from '../utils/innerSliderUtils'
var helpers = {
// supposed to start autoplay of slides
@@ -185,12 +185,6 @@ var helpers = {
this.props.afterChange(animationTargetSlide);
}
delete this.animationEndCallback;
- // if (this.props.fade) {
- // const focusableSlide = ReactDOM.findDOMNode(this.track).children[animationTargetSlide]
- // if (elementInViewport(focusableSlide)) {
- // focusableSlide.focus()
- // }
- // }
};
this.setState({
| 2 |
diff --git a/Gruntfile.js b/Gruntfile.js @@ -7,7 +7,7 @@ var lockedDependencies = require('./lib/build/tasks/locked-dependencies.js');
var webpackTask = null;
var EDITOR_ASSETS_VERSION = require('./config/editor_assets_version.json').version;
-var REQUIRED_NODE_VERSIONS = ['10.x'];
+var REQUIRED_NODE_VERSIONS = ['10.x', '12.x'];
var REQUIRED_NPM_VERSIONS = ['6.x'];
var DEVELOPMENT = 'development';
| 11 |
diff --git a/kamu/common_settings.py b/kamu/common_settings.py @@ -88,6 +88,7 @@ REST_FRAMEWORK = {
'PAGE_SIZE': 10
}
+if os.environ.get("DISABLE_SAML2") == None:
SAML2_AUTH = {
'DEFAULT_NEXT_URL': '/',
'NEW_USER_PROFILE': {
@@ -103,5 +104,4 @@ SAML2_AUTH = {
'last_name': 'lastName',
}
}
-
SAML2_AUTH['METADATA_AUTO_CONF_URL'] = os.environ['OKTA_METADATA_URL']
\ No newline at end of file
| 0 |
diff --git a/src/bundler/fs.imba b/src/bundler/fs.imba @@ -491,9 +491,10 @@ export default class FileSystem < Component
def prescan items = null
return #files if #files
#files = items or crawl!
+
for item in #files
let li = item.lastIndexOf('.')
- let ext = item.slice(li) or '.*'
+ let ext = li == -1 ? '.*' : item.slice(li)
let map = #files[ext] ||= []
map.push(item)
# should we drop the abspart here?
| 1 |
diff --git a/packages/imba/src/compiler/nodes.imba1 b/packages/imba/src/compiler/nodes.imba1 @@ -3805,6 +3805,9 @@ export class TagDeclaration < ClassDeclaration
# else
# if !option(:extension) and (!name.isClass)
# js += "; globalThis.{M name.toTscName, name} = {className};"
+
+ if STACK.tsc and option(:global) and name.isClass
+ js += "; globalThis.{className} = {className}"
return js
export class Func < Code
| 7 |
diff --git a/README.md b/README.md <a href="https://npmjs.org/package/deck.gl">
<img src="https://img.shields.io/npm/dm/deck.gl.svg?style=flat-square" alt="downloads" />
</a>
- <a href="http://starveller.sigsev.io/uber/deck.gl">
- <img src="http://starveller.sigsev.io/api/repos/uber/deck.gl/badge" alt="stars" />
- </a>
<a href='https://coveralls.io/github/uber/deck.gl?branch=master'>
<img src='https://img.shields.io/coveralls/uber/deck.gl.svg?style=flat-square' alt='Coverage Status' />
</a>
@@ -99,7 +96,16 @@ PRs and bug reports are welcome, and we are actively opening up the deck.gl [roa
Note that you once your PR is about to be merged, you will be asked to register as a contributor by filling in a short form.
+## Attributions
-## Data sources
+#### Data sources
Data sources are listed in each example.
+
+
+#### The deck.gl project is supported by
+
+<a href="https://www.browserstack.com/">
+ <img src="https://d98b8t1nnulk5.cloudfront.net/production/images/static/logo.svg" alt="BrowserStack" width="200" />
+</a>
+
| 0 |
diff --git a/common/templates/context.go b/common/templates/context.go @@ -283,13 +283,7 @@ func (c *Context) Execute(source string) (string, error) {
return c.executeParsed()
}
-func (c *Context) executeParsed() (r string, err error) {
- defer func() {
- if r := recover(); r != nil {
- err = errors.New("paniced!")
- }
- }()
-
+func (c *Context) executeParsed() (string, error) {
parsed := c.CurrentFrame.parsedTemplate
if c.IsPremium {
parsed = parsed.MaxOps(MaxOpsPremium)
@@ -301,7 +295,7 @@ func (c *Context) executeParsed() (r string, err error) {
w := LimitWriter(&buf, 25000)
// started := time.Now()
- err = parsed.Execute(w, c.Data)
+ err := parsed.Execute(w, c.Data)
// dur := time.Since(started)
if c.FixedOutput != "" {
| 13 |
diff --git a/test/internal/http/http-driver.test.js b/test/internal/http/http-driver.test.js import neo4j from '../../../src/v1';
import sharedNeo4j from '../../internal/shared-neo4j';
import testUtils from '.././test-utils';
-import {ServerVersion, VERSION_3_1_0} from '../../../src/v1/internal/server-version';
+import {ServerVersion, VERSION_3_1_0, VERSION_3_4_0} from '../../../src/v1/internal/server-version';
describe('http driver', () => {
@@ -366,7 +366,7 @@ describe('http driver', () => {
});
it('should receive points', done => {
- if (testUtils.isServer()) {
+ if (testUtils.isServer() || !databaseSupportsSpatialAndTemporalTypes()) {
done();
return;
}
@@ -380,7 +380,7 @@ describe('http driver', () => {
});
it('should receive date', done => {
- if (testUtils.isServer()) {
+ if (testUtils.isServer() || !databaseSupportsSpatialAndTemporalTypes()) {
done();
return;
}
@@ -392,7 +392,7 @@ describe('http driver', () => {
});
it('should receive date-time with time zone id', done => {
- if (testUtils.isServer()) {
+ if (testUtils.isServer() || !databaseSupportsSpatialAndTemporalTypes()) {
done();
return;
}
@@ -404,7 +404,7 @@ describe('http driver', () => {
});
it('should receive date-time with time zone name', done => {
- if (testUtils.isServer()) {
+ if (testUtils.isServer() || !databaseSupportsSpatialAndTemporalTypes()) {
done();
return;
}
@@ -416,7 +416,7 @@ describe('http driver', () => {
});
it('should receive duration', done => {
- if (testUtils.isServer()) {
+ if (testUtils.isServer() || !databaseSupportsSpatialAndTemporalTypes()) {
done();
return;
}
@@ -428,7 +428,7 @@ describe('http driver', () => {
});
it('should receive local date-time', done => {
- if (testUtils.isServer()) {
+ if (testUtils.isServer() || !databaseSupportsSpatialAndTemporalTypes()) {
done();
return;
}
@@ -440,7 +440,7 @@ describe('http driver', () => {
});
it('should receive local time', done => {
- if (testUtils.isServer()) {
+ if (testUtils.isServer() || !databaseSupportsSpatialAndTemporalTypes()) {
done();
return;
}
@@ -452,7 +452,7 @@ describe('http driver', () => {
});
it('should receive time', done => {
- if (testUtils.isServer()) {
+ if (testUtils.isServer() || !databaseSupportsSpatialAndTemporalTypes()) {
done();
return;
}
@@ -554,4 +554,8 @@ describe('http driver', () => {
return serverVersion.compareTo(VERSION_3_1_0) >= 0;
}
+ function databaseSupportsSpatialAndTemporalTypes() {
+ return serverVersion.compareTo(VERSION_3_4_0) >= 0;
+ }
+
});
| 8 |
diff --git a/Gruntfile.js b/Gruntfile.js @@ -30,7 +30,7 @@ module.exports = function (grunt) {
grunt.registerTask("test",
"A task which runs all the tests in test/tests.",
- ["exec:generateConfig", "exec:tests"]);
+ ["exec:generateNodeIndex", "exec:generateConfig", "exec:tests"]);
grunt.registerTask("docs",
"Compiles documentation in the /docs directory.",
@@ -135,7 +135,7 @@ module.exports = function (grunt) {
dev: ["build/dev/*"],
prod: ["build/prod/*"],
node: ["build/node/*"],
- config: ["src/core/config/OperationConfig.json", "src/core/config/modules/*", "src/code/operations/index.mjs"],
+ config: ["src/core/config/OperationConfig.json", "src/core/config/modules/*", "src/code/operations/index.mjs", "src/node/index.mjs"],
docs: ["docs/*", "!docs/*.conf.json", "!docs/*.ico", "!docs/*.png"],
inlineScripts: ["build/prod/scripts.js"],
},
| 0 |
diff --git a/server/util/wordembeddings.py b/server/util/wordembeddings.py import requests
+import json
from server import config
@@ -25,7 +26,11 @@ def topic_similar_words(topics_id, snapshots_id, words):
def _query_for_json(endpoint, data):
response = requests.post("{}{}".format(config.get('WORD_EMBEDDINGS_SERVER_URL'), endpoint), data=data)
+ try:
response_json = response.json()
if 'results' in response_json:
return response_json['results']
+ except json.decoder.JSONDecodeError:
+ # this happens in non-english cases
+ return []
return []
| 9 |
diff --git a/.eslintrc.json b/.eslintrc.json // stylistic conventions
"brace-style": ["error", "1tbs"],
+ "space-before-blocks": ["error", "always"],
"block-spacing": "error",
"array-bracket-spacing": "error",
"comma-spacing": "error",
| 0 |
diff --git a/README.md b/README.md @@ -139,7 +139,13 @@ yarn test:e2e:live-serve
Then run the actual tests:
```bash
-yarn test:e2e
+yarn test:e2e:run
+```
+
+Or run only some tests by providing a filter:
+
+```bash
+yarn test:e2e:run --filter send.spec.js
```
Finally stop the testnet when you are done:
| 3 |
diff --git a/package.json b/package.json "compile": "lerna run compile",
"hint": "yarn solhint \"./contracts/**/*.sol\"",
"lint": "yarn eslint \"./**/test/**/*.js\" \"./packages/**/*.js\"",
- "ganache": "ganache-cli -d -p 8545 --gasLimit 0xfffffffffff --time '2017-05-10T00:00:00+00:00'",
+ "ganache": "ganache-cli -p 8545 --gasLimit 0xfffffffffff --time '2017-05-10T00:00:00+00:00'",
"publish": "lerna publish",
"test": "yarn clean && lerna run test"
},
| 2 |
diff --git a/src/anim/skeleton.js b/src/anim/skeleton.js @@ -114,7 +114,12 @@ Object.assign(pc, function () {
// Determine the interpolated keyframe for this animated node
interpKey = this._interpolatedKeyDict[nodeName];
-
+ if (interpKey === undefined) {
+ // #ifdef DEBUG
+ console.warn('Unknown skeleton node name: ' + nodeName);
+ // #endif
+ continue;
+ }
// If there's only a single key, just copy the key to the interpolated key...
foundKey = false;
if (keys.length !== 1) {
| 9 |
diff --git a/module/damage/damagechat.js b/module/damage/damagechat.js @@ -20,7 +20,7 @@ export default class DamageChat {
setup() {
Hooks.on('renderChatMessage', async (app, html, msg) => {
- let isDamageChatMessage = !!html.find('.damage-chat-message')
+ let isDamageChatMessage = !!html.find('.damage-chat-message').length
if (isDamageChatMessage) {
let transfer = JSON.parse(app.data.flags.transfer)
| 1 |
diff --git a/lib/assets/javascripts/dashboard/organization.js b/lib/assets/javascripts/dashboard/organization.js @@ -124,16 +124,6 @@ $(function () {
});
});
- // Color picker
- // if (this.$('.js-colorPicker').length > 0) {
- // new ColorPickerView({
- // el: this.$('.js-colorPicker'),
- // color: this.$('.js-colorPicker').data('color')
- // }).bind('colorChosen', function (color) {
- // this.$('.js-colorInput').val(color);
- // }, this);
- // }
-
// Icon picker
if (this.$('.js-iconPicker').length > 0) {
this.icon_picker_view = new IconPickerView({
| 2 |
diff --git a/index.html b/index.html <kan-game>
<div class="kan-game-warpper">
<div id="webview-wrapper" style="height: 480px">
- <webview src="about:blank" ondrop="event.preventDefault();" plugins preload="./assets/js/webview-preload.js"></webview>
+ <webview src="about:blank" ondrop="event.preventDefault();" plugins disablewebsecurity webpreferences="allowRunningInsecureContent=no" preload="./assets/js/webview-preload.js"></webview>
</div>
<hr>
<poi-info>
| 11 |
diff --git a/src/registry/routes/helpers/get-component-fallback.ts b/src/registry/routes/helpers/get-component-fallback.ts @@ -4,6 +4,7 @@ import request from 'minimal-request';
import url from 'url';
import { Component, Config } from '../../../types';
import * as urlBuilder from '../../domain/url-builder';
+import { GetComponentResult } from './get-component';
type ComponentCallback = (
err: { registryError: any; fallbackError: any } | null,
@@ -77,14 +78,7 @@ export function getComponent(
fallbackRegistryUrl: string,
headers: IncomingHttpHeaders,
component: { name: string; version: string; parameters: IncomingHttpHeaders },
- callback: (
- result:
- | {
- status: number;
- response: { code: string; error: Error };
- }
- | Component
- ) => void
+ callback: (result: GetComponentResult) => void
): void {
return request(
{
@@ -94,7 +88,7 @@ export function getComponent(
json: true,
body: { components: [component] }
},
- (err, res: Component[]) => {
+ (err, res: GetComponentResult[]) => {
if (err || !res || res.length === 0) {
return callback({
status: 404,
| 7 |
diff --git a/angular/projects/spark-angular/src/lib/components/sprk-toggle/sprk-toggle.component.ts b/angular/projects/spark-angular/src/lib/components/sprk-toggle/sprk-toggle.component.ts @@ -8,14 +8,18 @@ import { toggleAnimations } from './sprk-toggle-animations';
class="sprk-u-Overflow--hidden {{ additionalClasses }}"
[attr.data-id]="idString"
>
- <sprk-link
- linkType="simple"
- additionalClasses="{{
- titleFontClass
- }} sprk-b-Link--has-icon sprk-u-TextCrop--none"
+ <a
+ sprkLink
+ variant="simple"
+ [ngClass]="{
+ titleFontClass: true,
+ 'sprk-b-Link--has-icon': true,
+ 'sprk-u-TextCrop--none': true
+ }"
(click)="toggle($event)"
- [ariaExpanded]="isOpen ? 'true' : 'false'"
+ [attr.aria-expanded]="isOpen ? 'true' : 'false'"
[analyticsString]="analyticsString"
+ href="#"
>
<sprk-icon
iconType="chevron-down-circle-two-color"
@@ -24,7 +28,7 @@ import { toggleAnimations } from './sprk-toggle-animations';
}} sprk-c-Icon--l sprk-u-mrs sprk-c-Icon--toggle {{ iconStateClass }}"
></sprk-icon>
{{ title }}
- </sprk-link>
+ </a>
<div [@toggleContent]="animState">
<div class="sprk-u-pts sprk-u-pbs"><ng-content></ng-content></div>
| 3 |
diff --git a/next.config.js b/next.config.js @@ -3,6 +3,9 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
})
module.exports = withBundleAnalyzer({
+ images: {
+ domains: ['static.data.gouv.fr']
+ },
webpack(config, {webpack}) {
config.plugins.push(
new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /fr/)
| 0 |
diff --git a/src/ServerlessOffline.js b/src/ServerlessOffline.js @@ -58,6 +58,9 @@ export default class ServerlessOffline {
// Entry point for the plugin (sls offline) when running 'sls offline start'
async start() {
+ // Avoid racing conditions with other plugins at start
+ await new Promise(resolve => setTimeout(resolve, 293 + 293 * Math.random()))
+
// Put here so available everywhere, not just in handlers
process.env.IS_OFFLINE = true
| 0 |
diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js @@ -125,15 +125,11 @@ Onyx.connect({
* @returns {Boolean}
*/
function isSearchStringMatch(searchValue, searchText) {
- const matchRegexes = [
- new RegExp(`^${Str.escapeForRegExp(searchValue)}$`, 'i'),
- new RegExp(`^${Str.escapeForRegExp(searchValue)}`, 'i'),
- new RegExp(Str.escapeForRegExp(searchValue), 'i'),
- ];
-
- return _.some(matchRegexes, (regex) => {
+ const searchWords = searchValue.split(' ');
+ return _.every(searchWords, (word) => {
+ const matchRegex = new RegExp(Str.escapeForRegExp(word), 'i');
const valueToSearch = searchText && searchText.replace(new RegExp(/ /g), '');
- return regex.test(valueToSearch);
+ return matchRegex.test(valueToSearch);
});
}
@@ -317,6 +313,7 @@ function getSearchOptions(
showChatPreviewLine: true,
showReportsWithNoComments: true,
includePersonalDetails: true,
+ sortByLastMessageTimestamp: true,
});
}
| 7 |
diff --git a/accessibility-checker-engine/src/v2/checker/accessibility/util/legacy.ts b/accessibility-checker-engine/src/v2/checker/accessibility/util/legacy.ts @@ -2642,15 +2642,7 @@ export class RPTUtil {
if (RPTUtil.containsPresentationalChildrenOnly(walkNode as HTMLElement)) return true;
//aria-own case: if the element is referred by an aria-won
- const id = walkNode.getAttribute("id");
- if (id) {
- const aria_owns_elem = walkNode.ownerDocument.querySelector('[aria-owns="' + id + '"]');
- if (aria_owns_elem)
- walkNode = aria_owns_elem;
- else
- walkNode = DOMWalker.parentElement(walkNode);
- } else
- walkNode = DOMWalker.parentElement(walkNode);
+ walkNode = ARIAMapper.getAriaOwnedBy(walkNode as HTMLElement) || DOMWalker.parentElement(walkNode);
}
return false;
}
| 3 |
diff --git a/developers/src/i18n/en/index.js b/developers/src/i18n/en/index.js @@ -568,10 +568,10 @@ export default {
session_ed25519_btn: 'Ed25519 session',
session_question: 'Do you want to reset session?',
qrcode_title: 'Code URL',
- qrcode_content: 'Display or rotate code url for this app.',
- qrcode_btn1: 'Show code url',
- qrcode_btn2: 'Rotate code url',
- rotate_qrcode_question: 'Do you want to reset code url?',
+ qrcode_content: 'Display or rotate code_url for this app.',
+ qrcode_btn1: 'Show',
+ qrcode_btn2: 'Rotate',
+ rotate_qrcode_question: 'Do you want to reset code_url?',
des: 'Mixin server and the browser did not keep the information at all. If you forgot, you can generate a new one.',
},
button: {
| 7 |
diff --git a/src/components/Form.js b/src/components/Form.js @@ -14,7 +14,7 @@ const propTypes = {
formID: PropTypes.string.isRequired,
/** Text to be displayed in the submit button */
- buttonText: PropTypes.string.isRequired,
+ submitButtonText: PropTypes.string.isRequired,
/** Callback validate the form */
validate: PropTypes.func.isRequired,
@@ -130,7 +130,7 @@ class Form extends React.Component {
const childrenWrapperWithProps = children => (
// eslint-disable-next-line rulesdir/prefer-underscore-method
React.Children.map(children, (child) => {
- // Do nothing if child is not a valid React element
+ // Do nothing if child is not a valid React element, e.g. text within a <Text> component
if (!React.isValidElement(child)) {
return child;
}
@@ -166,6 +166,9 @@ class Form extends React.Component {
if (this.touchedInputs[inputID]) {
this.validate(this.getValues());
}
+ if (child.props.onChange) {
+ child.props.onChange();
+ }
},
});
})
@@ -181,7 +184,7 @@ class Form extends React.Component {
<View style={[this.props.style]}>
{childrenWrapperWithProps(this.props.children)}
<FormAlertWithSubmitButton
- buttonText={this.props.buttonText}
+ buttonText={this.props.submitButtonText}
isAlertVisible={_.size(this.state.errors) > 0 || Boolean(this.props.formState.serverErrorMessage)}
isLoading={this.props.formState.isSubmitting}
message={this.props.formState.serverErrorMessage}
| 10 |
diff --git a/js/kiri-slice.js b/js/kiri-slice.js @@ -895,24 +895,24 @@ var gs_kiri_slice = exports;
PRO.doSupport = function(minOffset, maxBridge, expand, minArea, pillarSize, offset, gap) {
var min = minArea || 0.1,
size = (pillarSize || 2),
+ slice = this,
mergeDist = size * 3, // pillar merge dist
- top = this,
- tops = top.gatherTopPolys([]),
+ tops = slice.gatherTopPolys([]),
trimTo = tops;
// creates outer clip offset from tops
- if (expand) POLY.expand(tops, expand, top.z, trimTo = []);
+ if (expand) POLY.expand(tops, expand, slice.z, trimTo = []);
// create inner clip offset from tops
- POLY.expand(tops, offset, top.z, top.offsets = []);
+ POLY.expand(tops, offset, slice.z, slice.offsets = []);
// skip support detection for bottom layer
- if (!top.down) return;
+ if (!slice.down) return;
- var traces = POLY.flatten(top.gatherTraces([])),
- fill = top.gatherFillLines([]),
+ var traces = POLY.flatten(slice.gatherTraces([])),
+ fill = slice.gatherFillLines([]),
points = [],
- down = top.down,
+ down = slice.down,
down_tops = down.gatherTopPolys([]),
down_traces = POLY.flatten(down.gatherTraces([]));
@@ -993,7 +993,7 @@ var gs_kiri_slice = exports;
culled = [];
// clip supports to shell offsets
- POLY.subtract(supports, down.gatherTopPolys([]), trimmed, null, top.z, min);
+ POLY.subtract(supports, down.gatherTopPolys([]), trimmed, null, slice.z, min);
// set depth hint on support polys for infill density
trimmed.forEach(function(trim) {
| 10 |
diff --git a/streamingpro-mlsql/src/main/java/streaming/rest/RestUtils.scala b/streamingpro-mlsql/src/main/java/streaming/rest/RestUtils.scala @@ -17,6 +17,11 @@ object RestUtils {
.map{ case (name, value) => new BasicNameValuePair(name, value) }.toSeq
Request.Post(urlString)
+ // Socket timeout is in milliseconds, default to 20 minutes
+ // TODO this should be configurable
+ .socketTimeout(20 * 60 * 1000 )
+ // Timeout to obtain Socket connection
+ .connectTimeout(10 * 1000)
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.body(new UrlEncodedFormEntity(nameValuePairs.asJava, DefaultHttpTransportService.charset))
.execute()
| 12 |
diff --git a/src/utils/twoFactor.js b/src/utils/twoFactor.js @@ -63,12 +63,14 @@ export class TwoFactor extends Account2FA {
async deployMultisig() {
const contractBytes = new Uint8Array(await (await fetch('/multisig.wasm')).arrayBuffer());
await super.deployMultisig(contractBytes);
+ this.has2fa = true
}
async disableMultisig() {
const contractBytes = new Uint8Array(await (await fetch('/main.wasm')).arrayBuffer());
const result = await this.disable(contractBytes);
await store.dispatch(refreshAccount());
+ this.has2fa = false
return result;
}
}
\ No newline at end of file
| 12 |
diff --git a/src/components/formik-forms/formik-select.jsx b/src/components/formik-forms/formik-select.jsx @@ -5,7 +5,7 @@ import {Field} from 'formik';
const ValidationMessage = require('../forms/validation-message.jsx');
-require('../forms/input.scss');
+require('../forms/select.scss');
require('../forms/row.scss');
const FormikSelect = ({
| 4 |
diff --git a/src/web/stylesheets/layout/_io.css b/src/web/stylesheets/layout/_io.css -moz-padding-start: 1px; /* Fixes bug in Firefox */
}
-#input-tabs ul {
+#input-tabs ul,
+#output-tabs ul {
list-style: none;
background-color: var(--title-background-colour);
padding: 0;
height: var(--tab-height);
}
-#input-tabs ul li {
+#input-tabs ul li,
+#output-tabs ul li {
display: flex;
flex-direction: row;
width: 100%;
vertical-align: middle;
}
-#input-tabs ul li:hover {
+#input-tabs ul li:hover,
+#output-tabs ul li:hover {
cursor: pointer;
background-color: var(--primary-background-colour);
}
-.active-input-tab {
+.active-input-tab,
+.active-output-tab {
font-weight: bold;
background-color: var(--primary-background-colour);
}
-.input-tab-content {
+.input-tab-content,
+.output-tab-content {
width: 100%;
max-width: 100%;
padding-left: 5px;
| 0 |
diff --git a/src/components/modebar/modebar.js b/src/components/modebar/modebar.js @@ -4,7 +4,6 @@ var d3 = require('@plotly/d3');
var isNumeric = require('fast-isnumeric');
var Lib = require('../../lib');
-var Color = require('../color');
var Icons = require('../../fonts/ploticon');
var version = require('../../version').version;
@@ -63,12 +62,6 @@ proto.update = function(graphInfo, buttons) {
Lib.addRelatedStyleRule(modeBarId, '#' + modeBarId + ' .modebar-btn:hover .icon path', 'fill: ' + style.activecolor);
Lib.addRelatedStyleRule(modeBarId, '#' + modeBarId + ' .modebar-btn.active .icon path', 'fill: ' + style.activecolor);
- // logo constrast color
- var logoId = modeBarId + '-logo';
- var logoSelector = context.displayModeBar === 'hover' ? '.plotlyjsicon' : '';
- Lib.deleteRelatedStyleRule(logoId);
- Lib.addRelatedStyleRule(logoId, logoSelector + ' .cls-bg-contrast', 'fill: ' + Color.contrast(fullLayout.paper_bgcolor));
-
// if buttons or logo have changed, redraw modebar interior
var needsNewButtons = !this.hasButtons(buttons);
var needsNewLogo = (this.hasLogo !== context.displaylogo);
@@ -82,7 +75,7 @@ proto.update = function(graphInfo, buttons) {
this.updateButtons(buttons);
if(context.watermark || context.displaylogo) {
- var logoGroup = this.getLogo(graphInfo);
+ var logoGroup = this.getLogo();
if(context.watermark) {
logoGroup.className = logoGroup.className + ' watermark';
}
@@ -299,7 +292,7 @@ function jsVersion(str) {
/**
* @return {HTMLDivElement} The logo image wrapped in a group
*/
-proto.getLogo = function(graphInfo) {
+proto.getLogo = function() {
var group = this.createGroup();
var a = document.createElement('a');
@@ -310,15 +303,6 @@ proto.getLogo = function(graphInfo) {
a.appendChild(this.createIcon(Icons.newplotlylogo));
- var context = graphInfo._context;
- var fullLayout = graphInfo._fullLayout;
- var modeBarId = 'modebar-' + fullLayout._uid;
-
- var logoId = modeBarId + '-logo';
- var logoSelector = context.displayModeBar === 'hover' ? '.plotlyjsicon' : '';
- Lib.deleteRelatedStyleRule(logoId);
- Lib.addRelatedStyleRule(logoId, logoSelector + ' .cls-bg-contrast', 'fill: ' + Color.contrast(fullLayout.paper_bgcolor));
-
group.appendChild(a);
return group;
};
@@ -334,7 +318,6 @@ proto.removeAllButtons = function() {
proto.destroy = function() {
Lib.removeElement(this.container.querySelector('.modebar'));
Lib.deleteRelatedStyleRule(this._uid);
- Lib.deleteRelatedStyleRule(this._uid + '-logo');
};
function createModeBar(gd, buttons) {
| 13 |
diff --git a/react-ui/functions/Reducer.js b/react-ui/functions/Reducer.js import { ActionTypes } from "../constants/ActionTypes.js";
-import { initialize, sendNft, destroyNft, copyAddress, copyPrivateKey, setUsername, setAvatar, setHomespace, setLoadoutState, getInventoryForSelf, uploadFile, setFtu, requestTokenByEmail, loginWithEmailCode, loginWithEmailOrPrivateKey, logout } from "./Actions.js";
+import { initialize, copyAddress, copyPrivateKey, setUsername, setAvatar, setHomespace, setLoadoutState, getInventoryForSelf, uploadFile, setFtu, requestTokenByEmail, loginWithEmailCode, loginWithEmailOrPrivateKey, logout } from "./Actions.js";
export const Reducer = async (state, action) => {
switch (action.type) {
| 2 |
diff --git a/Dockerfile b/Dockerfile @@ -15,13 +15,13 @@ RUN zypper -n install --no-recommends --replacefiles \
zypper -n clean --all
# Add our user
-RUN useradd -m frontend
+RUN useradd -m hackweek
# Configure our user
-RUN usermod -u $CONTAINER_USERID frontend
+RUN usermod -u $CONTAINER_USERID hackweek
# Setup sudo
-RUN echo 'frontend ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
+RUN echo 'hackweek ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
# Disable versioned gem binary names
RUN echo 'install: --no-format-executable' >> /etc/gemrc
@@ -32,7 +32,7 @@ RUN echo 'install: --no-format-executable' >> /etc/gemrc
# docker would use it's cache for this and the following stages.
ADD Gemfile /hackweek/Gemfile
ADD Gemfile.lock /hackweek/Gemfile.lock
-RUN chown -R frontend /hackweek
+RUN chown -R hackweek /hackweek
# Install bundler
RUN gem.ruby3.1 install bundler -v "$(grep -A 1 "BUNDLED WITH" /hackweek/Gemfile.lock | tail -n 1)"; \
@@ -46,7 +46,7 @@ RUN ln -sf /usr/bin/ruby.ruby3.1 /home/frontend/bin/ruby; \
sudo update-alternatives --set rake /usr/bin/rake.ruby.ruby3.1
WORKDIR /hackweek
-USER frontend
+USER hackweek
ENV PATH /home/frontend/bin:$PATH
| 10 |
diff --git a/token-metadata/0xac4D22e40bf0B8eF4750a99ED4E935B99A42685E/metadata.json b/token-metadata/0xac4D22e40bf0B8eF4750a99ED4E935B99A42685E/metadata.json "symbol": "AER",
"address": "0xac4D22e40bf0B8eF4750a99ED4E935B99A42685E",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/js/webcomponents/bisweb_filetreepipeline.js b/js/webcomponents/bisweb_filetreepipeline.js @@ -624,7 +624,7 @@ class FileTreePipeline extends HTMLElement {
let offset = parsedData['offset'];
let promiseArray = [], tsvData = {};
for (let runName of Object.keys(orderedRuns)) {
- let tsvFile = "onset\tduration\tevent_type\n\r";
+ let tsvFile = "onset\tduration\ttrial_type\n\r";
for (let task of orderedRuns[runName]) {
let lowRange = (task.value[0] - offset) * tr, highRange = (task.value[1] - offset) * tr;
let duration = (highRange - lowRange);
@@ -677,6 +677,13 @@ class FileTreePipeline extends HTMLElement {
let stringifiedJobInfo = JSON.stringify(jobInfo, null, 2);
promiseArray.push(bis_genericio.write(jobInfoFilename, stringifiedJobInfo));
+ //finally, generate events.json, which contains the keys of all custom fields generated in the .tsv file
+ //as of 6-4-19 we have no custom fields but i left this field here as a gesture towards the future.
+ // -Zach
+ /*let eventsJson = {
+
+ };*/
+
Promise.all(promiseArray).then( () => {
console.log('write done');
bis_webutil.createAlert('TSV file write done. Please ensure these names match what you expect!');
| 1 |
diff --git a/mobile/components/ThreadComposer/index.js b/mobile/components/ThreadComposer/index.js // @flow
import React, { Fragment } from 'react';
-import { TextInput, Button, Picker } from 'react-native';
+import { TextInput, Button } from 'react-native';
import Wrapper from './components/Wrapper';
+import Select from '../../components/Select';
type Props = {||};
type State = {
title: string,
body: string,
+ selected: {
+ community: ?string,
+ channel: ?string,
+ },
};
class ThreadComposer extends React.Component<Props, State> {
@@ -19,6 +24,10 @@ class ThreadComposer extends React.Component<Props, State> {
state = {
title: '',
body: '',
+ selected: {
+ community: null,
+ channel: null,
+ },
};
onChangeText = (field: 'title' | 'body') => (text: string) => {
@@ -27,21 +36,41 @@ class ThreadComposer extends React.Component<Props, State> {
});
};
+ onValueChange = (field: 'channel' | 'community') => (value: string) => {
+ this.setState(prev => ({
+ selected: {
+ ...prev.selected,
+ [field]: value,
+ },
+ }));
+ };
+
focusBodyInput = () => {
this.bodyInput && this.bodyInput.focus();
};
render() {
+ const { selected } = this.state;
return (
<Wrapper>
- <Picker selectedValue="first">
- <Picker.Item label="First community" value="first" />
- <Picker.Item label="Second community" value="second" />
- </Picker>
- <Picker selectedValue="first">
- <Picker.Item label="First channel" value="first" />
- <Picker.Item label="Second channel" value="second" />
- </Picker>
+ <Select
+ placeholder={{ label: 'Select a community', value: null }}
+ items={[
+ { label: 'First community', value: 'first' },
+ { label: 'Second community', value: 'second' },
+ ]}
+ value={selected.community}
+ onValueChange={this.onValueChange('community')}
+ />
+ <Select
+ placeholder={{ label: 'Select a channel', value: null }}
+ items={[
+ { label: 'First channel', value: 'first' },
+ { label: 'Second channel', value: 'second' },
+ ]}
+ value={selected.channel}
+ onValueChange={this.onValueChange('channel')}
+ />
<TextInput
onChangeText={this.onChangeText('title')}
value={this.state.title}
| 4 |
diff --git a/src/util/processor.js b/src/util/processor.js @@ -162,6 +162,9 @@ async function getFeed (data, log) {
}
async function connectToDatabase (config) {
+ if (!config.database.uri.startsWith('mongo')) {
+ return
+ }
const connection = await connectDb(config.database.uri, config.database.connection)
await initialize.setupModels(connection)
}
| 8 |
diff --git a/civictechprojects/static/css/partials/_ModalPosition.scss b/civictechprojects/static/css/partials/_ModalPosition.scss -//helps position all react-bootstrap modals
+//delete this when we upgrade to react-bootstrap >=1.0.0
.modal-dialog {
- top: 22%;
+ .modal.fade & {
+ transform: translate(0, 0);
}
-
-.wide-dialog .modal-dialog {
- max-width: 60%;
}
| 14 |
diff --git a/userscript.user.js b/userscript.user.js @@ -48184,7 +48184,7 @@ var $$IMU_EXPORT$$;
function update_mouseover_trigger_delay() {
delay = settings.mouseover_trigger_delay;
- if (delay <= 0 || isNaN(delay))
+ if (delay < 0 || isNaN(delay))
delay = false;
if (typeof delay === "number" && delay >= 10)
delay = 10;
| 11 |
diff --git a/docs/layout/assets/css/style.css b/docs/layout/assets/css/style.css @@ -514,14 +514,16 @@ section {
.link-icon {
position: absolute;
left: -20px;
- top: 0px;
+ top: 10px;
height: 18px;
width: 18px;
background: url('../images/anchor.svg');
background-repeat: no-repeat;
- transition: all 300ms;
+ transition: top 0.01s;
+ transition: opacity 0.5s;
opacity: 0;
text-decoration: none;
+ overflow: hidden;
}
h2:hover .link-icon, h3:hover .link-icon{
| 1 |
diff --git a/config/webpack.config_uglify.js b/config/webpack.config_uglify.js ENDLICENSE */
const webpack = require('webpack'); //to access built-in plugins
-const ugl = require('uglifyjs-webpack-plugin');
const base=require('./webpack.config.js');
+/* Remove this for now as it does not work
base.mode='production';
base.performance = { 'hints' : false };
-
-
-
-
+ const ugl = require('uglifyjs-webpack-plugin');
const ugly=new ugl();
-
-
-
-
base.plugins.push(ugly);
console.log('++++ Adding uglify plugin');
+*/
module.exports = base;
| 2 |
diff --git a/packages/app/src/server/routes/page.js b/packages/app/src/server/routes/page.js @@ -354,9 +354,16 @@ module.exports = function(crowi, app) {
next();
}
+ // empty page
if (page.isEmpty) {
- req.pagePath = page.path;
- return next();
+ // redirect to page (path) url
+ const url = new URL('https://dummy.origin');
+ url.pathname = page.path;
+ Object.entries(req.query).forEach(([key, value], i) => {
+ url.searchParams.append(key, value);
+ });
+ return res.safeRedirect(urljoin(url.pathname, url.search));
+
}
const renderVars = {};
@@ -419,8 +426,13 @@ module.exports = function(crowi, app) {
// empty page
if (page.isEmpty) {
- req.pagePath = page.path;
- return _notFound(req, res);
+ // redirect to page (path) url
+ const url = new URL('https://dummy.origin');
+ url.pathname = page.path;
+ Object.entries(req.query).forEach(([key, value], i) => {
+ url.searchParams.append(key, value);
+ });
+ return res.safeRedirect(urljoin(url.pathname, url.search));
}
const { path } = page; // this must exist
| 9 |
diff --git a/src/block_manager/view/BlocksView.js b/src/block_manager/view/BlocksView.js @@ -86,7 +86,7 @@ function(Backbone, BlockView) {
this.em.runDefault();
this.em.get('Canvas').getBody().style.cursor = '';
document.body.style.cursor = '';
- if(model && model.get('activeOnRender')){
+ if(model && model.get && model.get('activeOnRender')){
model.trigger('active');
model.set('activeOnRender', 0);
}
| 1 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -82,7 +82,7 @@ npm test
To run a particular test subset e.g. just the unit tests:
```
-npm run-script unit
+npm run unit
```
See the implementation of the `test` script in `package.json` for more options.
@@ -95,7 +95,7 @@ Our goal with the changelog is to document all changes made with each version of
When submitting a pull request, please run the `add-change` script and commit the resulting JSON file so that your change gets added to the changelog.
From SDK root:
```
-npm run-script add-change
+npm run add-change
```
See the [add-change cli notes](./scripts/changelog/README.md) for more information.
| 14 |
diff --git a/articles/universal-login/index.md b/articles/universal-login/index.md @@ -42,14 +42,13 @@ The settings available here are:
* Primary Color
* Background Color
-These settings, once changed, will take effect on your login page if you have not enabled customization of the login page code, or if you have enabled customization but are using the predefined templates and have not changed those options in the code.
+These settings, once changed, will take effect on all your Universal Login pages if you have not enabled customization of the pages' code. The settings will also work if you have enabled customization, but are using the predefined templates and have not changed those options in the code.
### Advanced Customization

-
-In addition to the settings above, the actual code of the pages may be altered and added to. The universal login pages works for many use cases without customizing its code, but if the customization toggle is enabled, you are able to modify each page at will.
+In addition to the settings above, the actual code of the pages may be altered and added to. The Universal Login pages work for many use cases without customizing their code, but if the customization toggle is enabled, you are able to modify each page at will.
When the customization toggle is flipped on, you then become responsible for updates and maintenance of the script, as it can no longer be automatically updated by Auth0. This includes updating the version numbers for any included Auth0 SDK or widget.
| 3 |
diff --git a/src/components/initDirectMessageWrapper/index.js b/src/components/initDirectMessageWrapper/index.js @@ -6,7 +6,6 @@ import { withRouter, type History } from 'react-router-dom';
import { withCurrentUser } from 'src/components/withCurrentUser';
import type { GetUserType } from 'shared/graphql/queries/user/getUser';
import { initNewThreadWithUser } from 'src/actions/directMessageThreads';
-import { openModal } from 'src/actions/modals';
type Props = {
render: Function,
@@ -18,17 +17,15 @@ type Props = {
};
const InitDirectMessage = (props: Props) => {
- const { dispatch, currentUser, render, user, history } = props;
+ const { dispatch, history, currentUser, render, user } = props;
const init = (e: any) => {
- e && e.preventDefault() && e.stopPropagation();
-
- if (!currentUser || !currentUser.id) {
- return dispatch(openModal('LOGIN_MODAL'));
- }
-
+ e && e.preventDefault() && e.stopPropogation();
dispatch(initNewThreadWithUser(user));
- history.push('/messages/new');
+ history.push({
+ pathname: currentUser ? `/messages/new` : '/login',
+ state: { modal: !!currentUser },
+ });
};
if (currentUser && currentUser.id === user.id) return null;
| 4 |
diff --git a/token-metadata/0x4D953cf077c0C95Ba090226E59A18FcF97db44EC/metadata.json b/token-metadata/0x4D953cf077c0C95Ba090226E59A18FcF97db44EC/metadata.json "symbol": "MINI",
"address": "0x4D953cf077c0C95Ba090226E59A18FcF97db44EC",
"decimals": 19,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/engine/modules/entities/src/main/java/com/codingame/gameengine/module/entities/Text.java b/engine/modules/entities/src/main/java/com/codingame/gameengine/module/entities/Text.java @@ -105,7 +105,7 @@ public class Text extends TextBasedEntity<Text> {
}
/**
- * Returs the thickness of the stroke of this <code>Text</code> in pixels.
+ * Returns the thickness of the stroke of this <code>Text</code> in pixels.
*
* @return the thickness of the stroke of this <code>Text</code>
*/
@@ -147,7 +147,7 @@ public class Text extends TextBasedEntity<Text> {
/**
* Sets the weight of the font of this <code>Text</code>.
*
- * @param style
+ * @param weight
* the FontWeight of the <code>Text</code>.
* @return this <code>Text</code>.
*/
| 1 |
diff --git a/lib/assets/core/test/spec/cartodb3/data/analyses.spec.js b/lib/assets/core/test/spec/cartodb3/data/analyses.spec.js @@ -313,7 +313,7 @@ describe('cartodb3/data/analyses', function () {
var dataObservatoryAnalyses = [
'data-observatory-measure'
];
- checkIfxxxTest(dataObservatoryAnalyses, 'observatory');
+ checkIfxxxTest(dataObservatoryAnalyses, 'data_observatory');
});
});
| 1 |
diff --git a/README.md b/README.md ERP beyond your fridge
## Give it a try
-Public demo of the latest version → [https://demo.grocy.info](https://demo.grocy.info)
+Public demo of the latest stable version → [https://demo.grocy.info](https://demo.grocy.info)
+Public demo of the latest pre-release version (current master branch) → [https://demo-prerelease.grocy.info](https://demo-prerelease.grocy.info)
## Motivation
A household needs to be managed. I did this so far (almost 10 years) with my first self written software (a C# windows forms application) and with a bunch of Excel sheets. The software is a pain to use and Excel is Excel. So I searched for and tried different things for a (very) long time, nothing 100 % fitted, so this is my aim for a "complete houshold management"-thing. ERP your fridge!
| 0 |
diff --git a/src/components/Button.js b/src/components/Button.js @@ -48,6 +48,10 @@ const propTypes = {
/** Call the onPress function when Enter key is pressed */
pressOnEnter: PropTypes.bool,
+ /** The priority to assign the enter key event listener. 0 is the highest priority. */
+ enterKeyEventListenerPriority: PropTypes.number,
+
+
/** Additional styles to add after local styles. Applied to Pressable portion of button */
style: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.object),
@@ -92,6 +96,7 @@ const defaultProps = {
onPressIn: () => {},
onPressOut: () => {},
pressOnEnter: false,
+ enterKeyEventListenerPriority: 0,
style: [],
innerStyles: [],
textStyles: [],
@@ -124,7 +129,7 @@ class Button extends Component {
return;
}
this.props.onPress();
- }, shortcutConfig.descriptionKey, shortcutConfig.modifiers, true);
+ }, shortcutConfig.descriptionKey, shortcutConfig.modifiers, true, false, this.props.enterKeyEventListenerPriority);
}
componentWillUnmount() {
| 11 |
diff --git a/src/string.js b/src/string.js @@ -13,23 +13,8 @@ export const concatStrings = _.flow(
)
export const trimStrings = map(when(_.isString, _.trim))
-export let autoLabel = (string = '') => {
- // Prevent Acronyms from being lower cased
- let acronymRegex = new RegExp('([A-Z])([A-Z])($|.)', 'g')
- while (string.match(acronymRegex)) {
- string = string.replace(acronymRegex, '$1 $2$3')
- }
- string = _.startCase(string)
- // Remove Mid-Acronym Whitespace
- let whitespacedAcronymRegex = new RegExp('([A-Z])[ ]([A-Z])($|[^a-z])', 'g')
- while (string.match(whitespacedAcronymRegex)) {
- string = string.replace(whitespacedAcronymRegex, '$1$2$3')
- }
- // Put a space between words and numbers
- string = string.replace(/([a-z]|[A-Z])([0-9])/g, '$1 $2')
-
- return string
-}
+// _.startCase does the trick, deprecate it!
+export let autoLabel = _.startCase
export let autoLabelOption = a => ({
value: a.value || a,
label: a.label || autoLabel(a.value || a),
| 14 |
diff --git a/server/views/topics/topic.py b/server/views/topics/topic.py @@ -220,7 +220,6 @@ def topic_update(topics_id):
# start it ether as a new version, or start regenerating the existig version
if ('snapshotId' in request.form) and len(request.form['snapshotId']) > 0:
# add the subtopics to the current version (do NOT change the seed query)
- # TODO: figure out how to call this correctly
result = user_mc.topicGenerateSnapshot(topics_id, snapshots_id=request.form['snapshotId'])
else:
# update the seed query (first 5 MUST be filled in)
@@ -257,7 +256,7 @@ def topic_update(topics_id):
new_snapshot = user_mc.topicCreateSnapshot(topics_id, note=topic_version)['snapshot']
# and start the spidering process
user_mc.topicSpider(topics_id, new_snapshot['snapshots_id'])
- return topic_summary(result['topics'][0]['topics_id']) # give them back new data, so they can update the client
+ return topic_summary(topics_id) # give them back new data, so they can update the client
@app.route("/api/topics/<topics_id>/spider", methods=['POST'])
| 11 |
diff --git a/src/PanelTraits/Search.php b/src/PanelTraits/Search.php @@ -35,14 +35,23 @@ trait Search
*/
public function applySearchLogicForColumn($query, $column, $searchTerm)
{
+ $columnType = $column['type'];
+
// if there's a particular search logic defined, apply that one
if (isset($column['searchLogic'])) {
$searchLogic = $column['searchLogic'];
+ // if a closure was passed, execute it
if (is_callable($searchLogic)) {
return $searchLogic($query, $column, $searchTerm);
}
+ // if a string was passed, search like it was that column type
+ if (is_string($searchLogic)) {
+ $columnType = $searchLogic;
+ }
+
+ // if false was passed, don't search this column
if ($searchLogic == false) {
return;
}
@@ -50,7 +59,7 @@ trait Search
// sensible fallback search logic, if none was explicitly given
if ($column['tableColumn']) {
- switch ($column['type']) {
+ switch ($columnType) {
case 'email':
case 'date':
case 'datetime':
| 11 |
diff --git a/index.d.ts b/index.d.ts @@ -659,14 +659,14 @@ declare module 'mongoose' {
* Behaves like `remove()`, but deletes all documents that match `conditions`
* regardless of the `single` option.
*/
- deleteMany(filter?: any, options?: QueryOptions, callback?: (err: CallbackError) => void): Query<any, T>;
+ deleteMany(filter?: FilterQuery<T>, options?: QueryOptions, callback?: (err: CallbackError) => void): Query<mongodb.DeleteWriteOpResultObject['result'] & { deletedCount?: number }, T>;
/**
* Deletes the first document that matches `conditions` from the collection.
* Behaves like `remove()`, but deletes at most one document regardless of the
* `single` option.
*/
- deleteOne(filter?: any, options?: QueryOptions, callback?: (err: CallbackError) => void): Query<any, T>;
+ deleteOne(filter?: FilterQuery<T>, options?: QueryOptions, callback?: (err: CallbackError) => void): Query<mongodb.DeleteWriteOpResultObject['result'] & { deletedCount?: number }, T>;
/**
* Sends `createIndex` commands to mongo for each index declared in the schema.
| 7 |
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee @@ -189,7 +189,7 @@ onFocus = forTrusted (event) ->
# We install these listeners directly (that is, we don't use installListener) because we still need to receive
# events when Vimium is not enabled.
window.addEventListener "focus", onFocus
-window.addEventListener "hashchange", checkEnabledAfterURLChange
+window.addEventListener "hashchange", -> checkEnabledAfterURLChange()
initializeOnDomReady = ->
# Tell the background page we're in the domReady state.
| 1 |
diff --git a/_config.yml b/_config.yml @@ -116,45 +116,53 @@ defaults:
values:
layout: entry
permalink: /library/projects/:title
+ collection: project
-
scope:
type: startups
values:
layout: entry
permalink: /library/startups/:title
+ collection: startup
-
scope:
type: labs
values:
layout: entry
permalink: /library/labs/:title
+ collection: lab
-
scope:
type: incubators
values:
layout: entry
permalink: /library/incubators/:title
+ collection: incubator
-
scope:
type: groups
values:
layout: entry
permalink: /library/groups/:title
+ collection: group
-
scope:
type: networks
values:
layout: entry
permalink: /library/networks/:title
+ collection: network
-
scope:
type: events
values:
layout: entry
permalink: /library/events/:title
+ collection: event
-
scope:
type: others
values:
layout: entry
permalink: /library/others/:title
+ collection: other
| 0 |
diff --git a/src/components/views/TacticalMap/preview.js b/src/components/views/TacticalMap/preview.js import React, { Component } from "react";
-import { findDOMNode } from "react-dom";
import { Asset } from "../../../helpers/assets";
import * as THREE from "three";
import Selection from "./select";
| 2 |
diff --git a/token-metadata/0x85eBa557C06c348395fD49e35d860F58a4F7c95a/metadata.json b/token-metadata/0x85eBa557C06c348395fD49e35d860F58a4F7c95a/metadata.json "symbol": "H3X",
"address": "0x85eBa557C06c348395fD49e35d860F58a4F7c95a",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/token-metadata/0x998FFE1E43fAcffb941dc337dD0468d52bA5b48A/metadata.json b/token-metadata/0x998FFE1E43fAcffb941dc337dD0468d52bA5b48A/metadata.json "symbol": "IDRT",
"address": "0x998FFE1E43fAcffb941dc337dD0468d52bA5b48A",
"decimals": 2,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/unlock-app/package.json b/unlock-app/package.json "build": "npm run build-paywall && next build src",
"build-paywall": "NODE_ENV=production rollup -c rollup.paywall.config.js -o ./src/static/paywall.min.js",
"deploy": "next export src",
- "start": "next start src",
+ "start": "NODE_ENV=production node src/server.js",
"setup-dev": "run-script-os",
"setup-dev:darwin:freebsd:linux:sunos": "cd .. && (npm run start-ganache -- -b 3 &) && npm run deploy-lock",
"setup-dev:win32": "cd .. && (START /b npm run start-ganache -- -b 3 ) && npm run deploy-lock",
| 4 |
diff --git a/spec/lib/api_calls_spec.rb b/spec/lib/api_calls_spec.rb @@ -101,11 +101,13 @@ describe CartoDB::Stats::APICalls do
scores[stat_date] = score
end
+ Delorean.time_travel_to today
calls = @api_calls.get_api_calls_from_redis_source(@username, @type, @options)
+ Delorean.back_to_the_present
calls.count.should == 30
- date_to = Date.today
- date_from = Date.today - 29.days
+ date_to = today
+ date_from = today - 29.days
date_to.downto(date_from) do |date|
stat_date = date.strftime("%Y%m%d")
calls[stat_date].should eq(scores[stat_date]), "Failed day #{stat_date}, it was #{calls[stat_date]} instead of #{scores[stat_date]}"
| 1 |
diff --git a/test/jasmine/tests/box_test.js b/test/jasmine/tests/box_test.js @@ -463,4 +463,36 @@ describe('Test box restyle:', function() {
.catch(failTest)
.then(done);
});
+
+ it('should be able to change axis range when the number of distinct positions changes', function(done) {
+ function _assert(msg, xrng, yrng) {
+ var fullLayout = gd._fullLayout;
+ expect(fullLayout.xaxis.range).toBeCloseToArray(xrng, 2, msg + ' xrng');
+ expect(fullLayout.yaxis.range).toBeCloseToArray(yrng, 2, msg + ' yrng');
+ }
+
+ Plotly.plot(gd, [{
+ type: 'box',
+ width: 0.4,
+ y: [0, 5, 7, 8],
+ y0: 0
+ }, {
+ type: 'box',
+ y: [0, 5, 7, 8],
+ y0: 0.1
+ }])
+ .then(function() {
+ _assert('base', [-0.2, 1.5], [-0.444, 8.444]);
+ return Plotly.restyle(gd, 'visible', [true, 'legendonly']);
+ })
+ .then(function() {
+ _assert('only trace0 visible', [-0.2, 0.2], [-0.444, 8.444]);
+ return Plotly.restyle(gd, 'visible', ['legendonly', true]);
+ })
+ .then(function() {
+ _assert('only trace1 visible', [-0.5, 0.5], [-0.444, 8.444]);
+ })
+ .catch(failTest)
+ .then(done);
+ });
});
| 0 |
diff --git a/userscript.user.js b/userscript.user.js @@ -95442,6 +95442,11 @@ var $$IMU_EXPORT$$;
};
var is_media_type_supported = function(media_info, processing) {
+ if (!media_info) {
+ console_error("is_media_type_supported called without media_info");
+ return true;
+ }
+
if (media_info.type !== "image" && media_info.type !== "video" && media_info.type !== "audio") {
return false;
}
@@ -95656,6 +95661,11 @@ var $$IMU_EXPORT$$;
}
}
+ if (!obj[0].media_info) {
+ console_error("No media info");
+ return err_cb();
+ }
+
// do this before cache, in case settings change
if (!is_media_type_supported(obj[0].media_info, processing)) {
console_warn("Media type", obj[0].media_info, "is not supported");
@@ -95694,11 +95704,6 @@ var $$IMU_EXPORT$$;
var responseType = "blob";
var last_objecturl = null;
- if (!obj[0].media_info) {
- console_error("No media info");
- return err_cb();
- }
-
var obj_is_probably_video = is_probably_video(obj[0]);
var obj_is_probably_stream = is_probably_stream(obj[0]);
var incomplete_request = false;
| 5 |
diff --git a/userscript.user.js b/userscript.user.js @@ -15050,6 +15050,15 @@ var $$IMU_EXPORT$$;
// http://streetstylestore.com/img/p/7/4/7/7/3/74773-home_default.jpg
// http://streetstylestore.com/img/p/7/4/7/7/3/74773.jpg
domain_nowww === "streetstylestore.com" ||
+ // http://asog-labs.com/img/p/4/7/47-thickbox_default.jpg
+ // http://asog-labs.com/img/p/4/7/47.jpg
+ domain_nowww === "asog-labs.com" ||
+ // https://dreamline.com/img/p/1/4/7/5/7/0/147570-thickbox_default.jpg
+ // https://dreamline.com/img/p/1/4/7/5/7/0/147570.jpg
+ domain_nowww === "dreamline.com" ||
+ // https://techno-import.fr/shop/img/p/3/5/9/5/0/35950-thickbox_default.jpg
+ // https://techno-import.fr/shop/img/p/3/5/9/5/0/35950.jpg
+ domain_nowww === "techno-import.fr" ||
// https://cdn.poplook.com/15360-92883-large_default/lane-bubble-sleeve-blouse-dusty-teal.jpg
domain === "cdn.poplook.com" ||
// https://www.directgardening.com/878-large_default/forsythia.jpg
@@ -15087,8 +15096,8 @@ var $$IMU_EXPORT$$;
// https://www.tiarashop.eu/3412-home_default/o.jpg
// https://www.tiarashop.eu/3412/o.jpg
return src
- .replace(/(:\/\/[^/]*\/img\/.*\/[0-9]*)[-_][^/.]*(\.[^/.]*)$/, "$1$2")
- .replace(/(:\/\/[^/]*\/[0-9]+(?:-[0-9]+)?)(?:[-_][^/]*?)?(\/[^/]*)$/, "$1$2");
+ .replace(/(\/img\/+p\/+(?:[0-9]\/+){1,}[0-9]+)[-_][^/.]*(\.[^/.]*)$/, "$1$2")
+ .replace(/(:\/\/[^/]*\/+[0-9]+(?:-[0-9]+)?)(?:[-_][^/]*?)?(\/[^/]*)$/, "$1$2");
}
if (domain === "skinzwearphotography.com") {
| 7 |
diff --git a/generators/server/templates/src/main/java/package/service/mapper/UserMapper.java.ejs b/generators/server/templates/src/main/java/package/service/mapper/UserMapper.java.ejs @@ -147,7 +147,7 @@ public class UserMapper {
return null;
}
- Set<<%= asDto('User') %>> userSet = new HashSet<<%= asDto('User') %>>();
+ Set<<%= asDto('User') %>> userSet = new HashSet<>();
for ( <%= asEntity('User') %> userEntity : users ) {
userSet.add( this.toDtoId( userEntity ) );
}
@@ -178,7 +178,7 @@ public class UserMapper {
return null;
}
- Set<<%= asDto('User') %>> userSet = new HashSet<<%= asDto('User') %>>();
+ Set<<%= asDto('User') %>> userSet = new HashSet<>();
for ( <%= asEntity('User') %> userEntity : users ) {
userSet.add( this.toDtoLogin( userEntity ) );
}
| 14 |
diff --git a/src/schemaloader.js b/src/schemaloader.js @@ -90,7 +90,7 @@ export const SchemaLoader = Class.extend({
self.refs[url] = 'loading'
waiting++
- var fetchUrl = this._isLocalUrl(fileBase, url) ? fileBase + url : url
+ var fetchUrl = self._isLocalUrl(fileBase, url) ? fileBase + url : url
// eslint-disable-next-line no-undef
var r = new XMLHttpRequest()
| 4 |
diff --git a/src/plots/cartesian/layout_attributes.js b/src/plots/cartesian/layout_attributes.js @@ -18,6 +18,8 @@ var FORMAT_LINK = require('../../constants/docs').FORMAT_LINK;
var DATE_FORMAT_LINK = require('../../constants/docs').DATE_FORMAT_LINK;
var ONEDAY = require('../../constants/numerical').ONEDAY;
var constants = require('./constants');
+var HOUR = constants.HOUR_PATTERN;
+var DAY_OF_WEEK = constants.WEEKDAY_PATTERN;
module.exports = {
visible: {
@@ -278,19 +280,19 @@ module.exports = {
pattern: {
valType: 'enumerated',
- values: ['day of week', 'hour', ''],
+ values: [DAY_OF_WEEK, HOUR, ''],
dflt: '',
role: 'info',
editType: 'calc',
description: [
'Determines a pattern on the time line that generates breaks.',
- 'If *day of week* - Sunday-based weekday as a decimal number [0, 6].',
- 'If *hour* - hour (24-hour clock) as a decimal number [0, 23].',
+ 'If *' + DAY_OF_WEEK + '* - Sunday-based weekday as a decimal number [0, 6].',
+ 'If *' + HOUR + '* - hour (24-hour clock) as integer numbers [0, 24].',
'for more info.',
'Examples:',
- '- { pattern: \'day of week\', bounds: [6, 0] }',
+ '- { pattern: \'' + DAY_OF_WEEK + '\', bounds: [6, 0] }',
' breaks from Saturday to Monday (i.e. skips the weekends).',
- '- { pattern: \'hour\', bounds: [17, 8], operation: \'()\' }', // TODO: simplify after revise defaults
+ '- { pattern: \'' + HOUR + '\', bounds: [17, 8], operation: \'()\' }', // TODO: simplify after revise defaults
' breaks from 5pm to 8am (i.e. skips non-work hours).'
].join(' ')
},
| 3 |
diff --git a/public/javascripts/SVValidate/src/label/LabelDescriptionBox.js b/public/javascripts/SVValidate/src/label/LabelDescriptionBox.js @@ -76,7 +76,7 @@ function LabelDescriptionBox () {
if (!severity && !temporary && (!description || description.trim().length == 0) &&
(!tags || tags.length == 0)) {
- let htmlString = document.createTextNode(i18next.t('center-ui-no-info'));
+ let htmlString = document.createTextNode(i18next.t('center-ui.no-info'));
desBox.appendChild(htmlString);
}
| 1 |
diff --git a/src/mode/cam/ops.js b/src/mode/cam/ops.js let flatLevels = depthData.map(level => {
return POLY.flatten(level.clone(true), [], true).filter(p => !(p.depth = 0));
}).filter(l => l.length > 0);
+ if (flatLevels.length && flatLevels[0].length) {
// start with the smallest polygon on the top
printPoint = flatLevels[0]
.sort((a,b) => { return a.area() - b.area() })[0]
printPoint = depthOutlinePath(printPoint, 0, flatLevels, toolDiam, polyEmit, false);
printPoint = depthOutlinePath(printPoint, 0, flatLevels, toolDiam, polyEmit, true);
}
+ }
setPrintPoint(printPoint);
}
| 9 |
diff --git a/website/core/Footer.js b/website/core/Footer.js @@ -24,106 +24,6 @@ class Footer extends React.Component {
render() {
return (
<footer className="nav-footer" id="footer">
- <section className="sitemap">
- <a href={this.props.config.baseUrl} className="nav-home">
- {this.props.config.footerIcon && (
- <img
- src={this.props.config.baseUrl + this.props.config.footerIcon}
- alt={this.props.config.title}
- width="66"
- height="58"
- />
- )}
- </a>
- <div>
- <h5>Docs</h5>
- <a href={this.docUrl("doc1.html", this.props.language)}>
- Getting Started (or other categories)
- </a>
- <a href={this.docUrl("doc2.html", this.props.language)}>
- Guides (or other categories)
- </a>
- <a href={this.docUrl("doc3.html", this.props.language)}>
- API Reference (or other categories)
- </a>
- </div>
- <div>
- <h5>Community</h5>
- <a href={this.pageUrl("users.html", this.props.language)}>
- User Showcase
- </a>
- <a
- href="https://stackoverflow.com/questions/tagged/"
- target="_blank"
- rel="noreferrer noopener"
- >
- Stack Overflow
- </a>
- <a href="https://discordapp.com/">Project Chat</a>
- <a
- href="https://twitter.com/"
- target="_blank"
- rel="noreferrer noopener"
- >
- Twitter
- </a>
- </div>
- <div>
- <h5>More</h5>
- <a href={`${this.props.config.baseUrl}blog`}>Blog</a>
- <a href="https://github.com/">GitHub</a>
- <a
- className="github-button"
- href={this.props.config.repoUrl}
- data-icon="octicon-star"
- data-count-href="/facebook/docusaurus/stargazers"
- data-show-count="true"
- data-count-aria-label="# stargazers on GitHub"
- aria-label="Star this project on GitHub"
- >
- Star
- </a>
- {this.props.config.twitterUsername && (
- <div className="social">
- <a
- href={`https://twitter.com/${
- this.props.config.twitterUsername
- }`}
- className="twitter-follow-button"
- >
- Follow @{this.props.config.twitterUsername}
- </a>
- </div>
- )}
- {this.props.config.facebookAppId && (
- <div className="social">
- <div
- className="fb-like"
- data-href={this.props.config.url}
- data-colorscheme="dark"
- data-layout="standard"
- data-share="true"
- data-width="225"
- data-show-faces="false"
- />
- </div>
- )}
- </div>
- </section>
-
- <a
- href="https://opensource.facebook.com/"
- target="_blank"
- rel="noreferrer noopener"
- className="fbOpenSource"
- >
- <img
- src={`${this.props.config.baseUrl}img/oss_logo.png`}
- alt="Facebook Open Source"
- width="170"
- height="45"
- />
- </a>
<section className="copyright">{this.props.config.copyright}</section>
</footer>
)
| 2 |
diff --git a/token-metadata/0xe0b9BcD54bF8A730EA5d3f1fFCe0885E911a502c/metadata.json b/token-metadata/0xe0b9BcD54bF8A730EA5d3f1fFCe0885E911a502c/metadata.json "symbol": "ZUM",
"address": "0xe0b9BcD54bF8A730EA5d3f1fFCe0885E911a502c",
"decimals": 8,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/src/styles/components/Input.scss b/src/styles/components/Input.scss @@ -38,6 +38,7 @@ $seed-input-namespace: "c-Input";
color: currentColor;
display: block;
position: relative;
+ top: -1px; // to normalize and center the <input>
height: 100%;
width: 100%;
z-index: 1;
@@ -108,6 +109,7 @@ $seed-input-namespace: "c-Input";
margin-right: -($padding);
padding: 0.6em $padding;
resize: none;
+ top: 0; // to match the line-height of <input>
width: calc(100% + #{ceil($padding * 2)});
}
| 7 |
diff --git a/server/interpreter.js b/server/interpreter.js @@ -2413,12 +2413,16 @@ Interpreter.State = function(node, scope, wantRef) {
this.node = node;
/** @const @type {!Interpreter.Scope} */
this.scope = scope;
+ /** @private @const @type {boolean} */
+ this.wantRef_ = wantRef || false;
+
/** @type {Interpreter.Value} */
this.value = undefined;
/** @type {!Array|undefined} */
this.ref = undefined;
- /** @private @const @type {boolean} */
- this.wantRef_ = wantRef || false;
+
+ /** @private @type {number} */
+ this.step_ = 0;
};
/**
@@ -4610,13 +4614,13 @@ stepFuncs_['CatchClause'] = function (stack, state, node) {
* @return {!Interpreter.State|undefined}
*/
stepFuncs_['ConditionalExpression'] = function (stack, state, node) {
- var mode = state.mode_ || 0;
- if (mode === 0) {
- state.mode_ = 1;
+ var step = state.step_ || 0;
+ if (step === 0) {
+ state.step_ = 1;
return new Interpreter.State(node['test'], state.scope);
}
- if (mode === 1) {
- state.mode_ = 2;
+ if (step === 1) {
+ state.step_ = 2;
var value = Boolean(state.value);
if (value && node['consequent']) {
// Execute 'if' block.
@@ -4816,19 +4820,19 @@ stepFuncs_['ForInStatement'] = function (stack, state, node) {
* @return {!Interpreter.State|undefined}
*/
stepFuncs_['ForStatement'] = function (stack, state, node) {
- var mode = state.mode_ || 0;
- if (mode === 0) {
- state.mode_ = 1;
+ var step = state.step_ || 0;
+ if (step === 0) {
+ state.step_ = 1;
if (node['init']) {
return new Interpreter.State(node['init'], state.scope);
}
- } else if (mode === 1) {
- state.mode_ = 2;
+ } else if (step === 1) {
+ state.step_ = 2;
if (node['test']) {
return new Interpreter.State(node['test'], state.scope);
}
- } else if (mode === 2) {
- state.mode_ = 3;
+ } else if (step === 2) {
+ state.step_ = 3;
if (node['test'] && !state.value) {
// Done, exit loop.
stack.pop();
@@ -4836,8 +4840,8 @@ stepFuncs_['ForStatement'] = function (stack, state, node) {
state.isLoop = true;
return new Interpreter.State(node['body'], state.scope);
}
- } else if (mode === 3) {
- state.mode_ = 1;
+ } else if (step === 3) {
+ state.step_ = 1;
if (node['update']) {
return new Interpreter.State(node['update'], state.scope);
}
| 10 |
diff --git a/test/p_usd_tiered_sto.js b/test/p_usd_tiered_sto.js @@ -9,6 +9,7 @@ const USDTieredSTO = artifacts.require("./USDTieredSTO.sol");
const MockOracle = artifacts.require("./MockOracle.sol");
const SecurityToken = artifacts.require("./SecurityToken.sol");
const GeneralTransferManager = artifacts.require("./GeneralTransferManager");
+const PolyTokenFaucet = artifacts.require("./PolyTokenFaucet.sol");
const Web3 = require("web3");
const BigNumber = require("bignumber.js");
@@ -219,6 +220,7 @@ contract("USDTieredSTO", accounts => {
I_STRProxied
] = instances;
+ I_DaiToken = await PolyTokenFaucet.new({from: POLYMATH});
// STEP 4: Deploy the GeneralDelegateManagerFactory
[I_GeneralPermissionManagerFactory] = await deployGPMAndVerifyed(POLYMATH, I_MRProxied, I_PolyToken.address, 0);
| 1 |
diff --git a/src/kite.js b/src/kite.js @@ -237,13 +237,40 @@ const Kite = {
});
break;
case StateController.STATES.INSTALLED:
+ Promise.all([
+ StateController.isKiteInstalled().then(() => true).catch(() => false),
+ StateController.isKiteEnterpriseInstalled().then(() => true).catch(() => false),
+ ]).then(([kiteInstalled, kiteEnterpriseInstalled]) => {
+ if (kiteInstalled && kiteEnterpriseInstalled) {
+ this.showErrorMessage('Kite is not running: Start the Kite background service to get Python completions, documentation, and examples.', 'Launch Kite Enterprise', 'Launch Kite Cloud').then(item => {
+ if (item === 'Launch Kite Cloud') {
+ return StateController.runKiteAndWait(ATTEMPTS, INTERVAL)
+ .then(() => this.checkState())
+ .catch(err => console.error(err));
+ } else if (item === 'Launch Kite Enterprise') {
+ return StateController.runKiteEnterpriseAndWait(ATTEMPTS, INTERVAL)
+ .then(() => this.checkState())
+ .catch(err => console.error(err));
+ }
+ });
+ } else if (kiteInstalled) {
this.showErrorMessage('Kite is not running: Start the Kite background service to get Python completions, documentation, and examples.', 'Launch Kite').then(item => {
if (item) {
return StateController.runKiteAndWait(ATTEMPTS, INTERVAL)
.then(() => this.checkState())
.catch(err => console.error(err));
}
- })
+ });
+ } else if (kiteEnterpriseInstalled) {
+ this.showErrorMessage('Kite Enterprise is not running: Start the Kite background service to get Python completions, documentation, and examples.', 'Launch Kite Enterprise').then(item => {
+ if (item) {
+ return StateController.runKiteEnterpriseAndWait(ATTEMPTS, INTERVAL)
+ .then(() => this.checkState())
+ .catch(err => console.error(err));
+ }
+ });
+ }
+ });
break;
case StateController.STATES.RUNNING:
this.showErrorMessage('The Kite background service is running but not reachable.');
| 9 |
diff --git a/ghost/admin/app/styles/layouts/content.css b/ghost/admin/app/styles/layouts/content.css @@ -1113,10 +1113,15 @@ a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:ho
}
.gh-links-list-url {
- display: flex;
+ display: grid;
+ grid-template-columns: min-content minmax(auto,min-content) min-content min-content;
align-items: center;
padding-right: 32px;
- overflow: hidden;
+ /* overflow: hidden; */
+}
+
+.gh-links-list-item-edit-mode .gh-links-list-url {
+ grid-template-columns: auto;
}
.gh-links-list-item a {
| 7 |
diff --git a/assets/js/modules/analytics/datastore/profiles.test.js b/assets/js/modules/analytics/datastore/profiles.test.js @@ -91,9 +91,6 @@ describe( 'modules/analytics profiles', () => {
);
registry.dispatch( STORE_NAME ).createProfile( accountId, propertyId );
- // TODO: This is failing and I'm not clear on why, when it works fine
- // in `assets/js/googlesitekit/datastore/site/reset.test.js`
- // expect( registry.select( STORE_NAME ).isDoingCreateProfile( accountId ) ).toEqual( true );
muteConsole( 'error' );
await subscribeUntil( registry,
| 8 |
diff --git a/src/inner-slider.js b/src/inner-slider.js @@ -25,6 +25,7 @@ export class InnerSlider extends React.Component {
slideCount: React.Children.count(this.props.children)
}
this.callbackTimers = []
+ this.clickable = true
}
listRefHandler = ref => this.list = ref
trackRefHandler = ref => this.track = ref
@@ -310,6 +311,13 @@ export class InnerSlider extends React.Component {
if (targetSlide !== 0 && !targetSlide) return
this.slideHandler(targetSlide)
}
+ clickHandler = e => {
+ if (this.clickable === false) {
+ e.stopPropagation()
+ e.preventDefault()
+ }
+ this.clickable = true
+ }
keyHandler = (e) => {
let dir = keyHandler(e, this.props.accessibility, this.props.rtl)
dir !== '' && this.changeSlide({ message: dir })
@@ -330,6 +338,9 @@ export class InnerSlider extends React.Component {
slideIndex: this.state.currentSlide
})
if (!state) return
+ if (state['swiping']) {
+ this.clickable = false
+ }
this.setState(state)
}
swipeEnd = (e) => {
@@ -508,6 +519,7 @@ export class InnerSlider extends React.Component {
let listProps = {
className: 'slick-list',
style: listStyle,
+ onClick: this.clickHandler,
onMouseDown: touchMove ? this.swipeStart : null,
onMouseMove: this.state.dragging && touchMove ? this.swipeMove : null,
onMouseUp: touchMove ? this.swipeEnd : null,
| 0 |
diff --git a/src/govuk/components/character-count/character-count.mjs b/src/govuk/components/character-count/character-count.mjs @@ -49,14 +49,14 @@ CharacterCount.prototype.init = function () {
// Hide the fallback limit message
$fallbackLimitMessage.classList.add('govuk-visually-hidden')
- // Read options set using dataset ('data-' values)
- this.options = this.getDataset($module)
+ // Read config set using dataset ('data-' values)
+ this.config = this.getDataset($module)
// Determine the limit attribute (characters or words)
- if (this.options.maxwords) {
- this.maxLength = this.options.maxwords
- } else if (this.options.maxlength) {
- this.maxLength = this.options.maxlength
+ if (this.config.maxwords) {
+ this.maxLength = this.config.maxwords
+ } else if (this.config.maxlength) {
+ this.maxLength = this.config.maxlength
} else {
return
}
@@ -207,14 +207,14 @@ CharacterCount.prototype.updateScreenReaderCountMessage = function () {
}
/**
- * Count the number of characters (or words, if `options.maxwords` is set)
+ * Count the number of characters (or words, if `config.maxwords` is set)
* in the given text
*
* @param {String} text - The text to count the characters of
* @returns {Number} the number of characters (or words) in the text
*/
CharacterCount.prototype.count = function (text) {
- if (this.options.maxwords) {
+ if (this.config.maxwords) {
var tokens = text.match(/\S+/g) || [] // Matches consecutive non-whitespace chars
return tokens.length
} else {
@@ -229,13 +229,13 @@ CharacterCount.prototype.count = function (text) {
*/
CharacterCount.prototype.getCountMessage = function () {
var $textarea = this.$textarea
- var options = this.options
+ var config = this.config
var remainingNumber = this.maxLength - this.count($textarea.value)
var charVerb = 'remaining'
var charNoun = 'character'
var displayNumber = remainingNumber
- if (options.maxwords) {
+ if (config.maxwords) {
charNoun = 'word'
}
charNoun = charNoun + ((remainingNumber === -1 || remainingNumber === 1) ? '' : 's')
@@ -253,19 +253,19 @@ CharacterCount.prototype.getCountMessage = function () {
* If there is no configured threshold, it is set to 0 and this function will
* always return true.
*
- * @returns {Boolean} true if the current count is over the options.threshold
+ * @returns {Boolean} true if the current count is over the config.threshold
* (or no threshold is set)
*/
CharacterCount.prototype.isOverThreshold = function () {
var $textarea = this.$textarea
- var options = this.options
+ var config = this.config
// Determine the remaining number of characters/words
var currentLength = this.count($textarea.value)
var maxLength = this.maxLength
- // Set threshold if presented in options
- var thresholdPercent = options.threshold ? options.threshold : 0
+ // Set threshold if presented in config
+ var thresholdPercent = config.threshold ? config.threshold : 0
var thresholdValue = maxLength * thresholdPercent / 100
return (thresholdValue <= currentLength)
| 10 |
diff --git a/src/puppeteer_utils.js b/src/puppeteer_utils.js @@ -244,6 +244,7 @@ const blockRequests = async (page, options = {}) => {
includeDefaults = true,
} = options;
+ checkParamOrThrow(page, 'options.page', 'Object');
checkParamOrThrow(urlPatterns, 'options.urlPatterns', '[String]');
checkParamOrThrow(includeDefaults, 'options.includeDefaults', 'Boolean');
| 7 |
diff --git a/packages/app/src/server/service/page.js b/packages/app/src/server/service/page.js @@ -738,7 +738,21 @@ class PageService {
}
}
- async v5RecursiveMigration(grant, rootPath = null) {
+ async v5Migration(grant, rootPath = null) {
+ const socket = this.crowicrowi.socketIoService.getAdminSocket();
+ try {
+ await this._v5RecursiveMigration(grant, rootPath);
+ }
+ catch (err) {
+ logger.error('V5 miration failed.', err);
+ socket.emit('v5MirationFailed', { error: err.message });
+
+ throw err;
+ }
+ }
+
+ // TODO: use websocket to show progress
+ async _v5RecursiveMigration(grant, rootPath) {
const BATCH_SIZE = 100;
const PAGES_LIMIT = 1000;
const Page = this.crowi.model('Page');
@@ -767,7 +781,7 @@ class PageService {
baseAggregation = baseAggregation.limit(Math.floor(total * 0.3));
}
- const randomPagesStream = await baseAggregation.cursor({ batchSize: BATCH_SIZE }).exec();
+ const pagesStream = await baseAggregation.cursor({ batchSize: BATCH_SIZE }).exec();
// use batch stream
const batchStream = createBatchStream(BATCH_SIZE);
@@ -800,6 +814,7 @@ class PageService {
}
catch (err) {
logger.error('Failed to insert empty pages.', err);
+ throw err;
}
// find parents again
@@ -837,6 +852,7 @@ class PageService {
}
catch (err) {
logger.error('Failed to update page.parent.', err);
+ throw err;
}
callback();
@@ -846,11 +862,12 @@ class PageService {
},
});
- randomPagesStream
+ pagesStream
.pipe(batchStream)
.pipe(migratePagesStream);
await streamToPromise(migratePagesStream);
+
if (await Page.exists({ grant, parent: null, path: { $ne: '/' } })) {
return this.v5RecursiveMigration(grant, rootPath);
}
@@ -876,8 +893,8 @@ class PageService {
logger.info('Succeeded to drop unique indexes from pages.path.');
}
catch (err) {
- // return not to set app:isV5Compatible to true
- return logger.error('Failed to drop unique indexes from pages.path.', err);
+ logger.warn('Failed to drop unique indexes from pages.path.', err);
+ throw err;
}
}
@@ -887,8 +904,8 @@ class PageService {
logger.info('Succeeded to create non-unique indexes on pages.path.');
}
catch (err) {
- // return not to set app:isV5Compatible to true
- return logger.error('Failed to create non-unique indexes on pages.path.', err);
+ logger.warn('Failed to create non-unique indexes on pages.path.', err);
+ throw err;
}
}
@@ -899,8 +916,8 @@ class PageService {
logger.info('Successfully migrated all public pages.');
}
catch (err) {
- // just to know
- logger.error('Failed to update app:isV5Compatible to true.');
+ logger.warn('Failed to update app:isV5Compatible to true.');
+ throw err;
}
}
| 7 |
diff --git a/test/unit/specs/components/governance/__snapshots__/PageProposal.spec.js.snap b/test/unit/specs/components/governance/__snapshots__/PageProposal.spec.js.snap @@ -77,17 +77,11 @@ exports[`PageProposal renders votes in HTML when voting is open 1`] = `
Proposal Status
</dt>
- <!---->
-
<dd>
- Voting started in 2 days.
+ Voting started in 2 days
</dd>
-
- <!---->
-
- <!---->
</dl>
<dl
@@ -310,17 +304,11 @@ exports[`PageProposal should display proposal page if user has signed in 1`] = `
Proposal Status
</dt>
- <!---->
-
<dd>
- Voting started in 2 days.
+ Voting started in 2 days
</dd>
-
- <!---->
-
- <!---->
</dl>
<dl
@@ -543,17 +531,11 @@ exports[`PageProposal should display proposal page should default tally to 0 if
Proposal Status
</dt>
- <!---->
-
<dd>
- Voting started in 2 days.
+ Voting started in 2 days
</dd>
-
- <!---->
-
- <!---->
</dl>
<dl
| 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.