code
stringlengths 122
4.99k
| label
int64 0
14
|
---|---|
diff --git a/includes/Core/Notifications/Notification.php b/includes/Core/Notifications/Notification.php @@ -45,7 +45,6 @@ class Notification {
*
* @type string $title Required notification title.
* @type string $content Required notification content. May contain inline HTML tags.
- * @type string $image Image URL.
* @type string $cta_url Call to action URL.
* @type string $cta_label Call to action anchor text.
* @type string $cta_target Call to action anchor target.
@@ -61,7 +60,6 @@ class Notification {
array(
'title' => '',
'content' => '',
- 'image' => '',
'cta_url' => '',
'cta_label' => '',
'cta_target' => '',
@@ -97,7 +95,6 @@ class Notification {
'id' => $this->get_slug(),
'title' => $this->args['title'],
'content' => $this->args['content'],
- 'image' => $this->args['image'],
'ctaURL' => $this->args['cta_url'],
'ctaLabel' => $this->args['cta_label'],
'ctaTarget' => $this->args['cta_target'],
| 2 |
diff --git a/lib/node_modules/@stdlib/math/base/special/rad2deg/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/rad2deg/docs/repl.txt Returns
-------
- y: number
+ d: number
Angle in degrees.
Examples
> d = {{alias}}( NaN )
NaN
+ // Due to finite precision, canonical values may not be returned:
+ > d = {{alias}}( {{alias:@stdlib/math/constants/float64-pi}}/6.0 )
+ 29.999999999999996
+
See Also
--------
| 10 |
diff --git a/app/javascript/ajax_helper.js b/app/javascript/ajax_helper.js @@ -67,8 +67,14 @@ export const createAjaxHelper = (options = {}) => {
// console.log('instanceOptions',instanceOptions)
const axiosInstance = axios.create(instanceOptions)
// overwrite default Accept Header to use json only
- axiosInstance.defaults.headers.common['Accept'] = 'application/json';
- axiosInstance.defaults.headers.common['Accept-Charset'] = 'utf-8';
+
+ // no reason to devide the header on this place. Designate is the one service which needs
+ // the Accept-Charset Header. But Elektra speaks to designate via elektron and not via CORS.
+ // So, not needed yet here!!!
+ // axiosInstance.defaults.headers.common['Accept'] = 'application/json';
+ // axiosInstance.defaults.headers.common['Accept-Charset'] = 'utf-8';
+
+ axiosInstance.defaults.headers.common['Accept'] = 'application/json; charset=utf-8';
// use request interceptor to merge globalOptions.
// The global options are available only after the entire JS
| 13 |
diff --git a/dapp/src/components/buySell/SellWidget.js b/dapp/src/components/buySell/SellWidget.js @@ -214,7 +214,7 @@ const SellWidget = ({
if (latestCalc === currTimestamp) {
setSellWidgetIsCalculating(false)
}
- }, 500)
+ }, 250)
const sortSplitCurrencies = (currencies) => {
return currencies.sort((coin) => {
| 12 |
diff --git a/packages/vue/src/examples/pages/category/Category.vue b/packages/vue/src/examples/pages/category/Category.vue <template>
<div id="category">
- <SfBreadcrumbs class="breadcrumbs" :breadcrumbs="breadcrumbs" />
+ <SfBreadcrumbs
+ class="breadcrumbs desktop-only"
+ :breadcrumbs="breadcrumbs"
+ />
<div class="navbar section">
<div class="navbar__aside desktop-only">
<h1 class="navbar__title">Categories</h1>
| 12 |
diff --git a/src/components/FilterHeaderCategories.js b/src/components/FilterHeaderCategories.js // @flow
import React from "react";
import { View, StyleSheet, Image, PixelRatio, Platform } from "react-native";
-import type { ViewStyleProp } from "react-native/Libraries/StyleSheet/StyleSheet";
import Touchable from "./Touchable";
import {
interestButtonBgColor,
| 2 |
diff --git a/src/components/tag-input.js b/src/components/tag-input.js @@ -4,11 +4,9 @@ export default class TagInput extends LitElement {
/* eslint-disable indent */
render() {
return html`
- <div class='tags' tabindex="0" contenteditable="true">
+ <div class='tags' tabindex="0">
${Array.isArray(this.value) && this.value.length > 0
- ? html`${this.value.map((v) => html`
- <span contenteditable="false" class='tag'> ${v} </span>
- `)}`
+ ? html`${this.value.map((v) => html`<span class='tag'> ${v} </span>`)}`
: ''
}
<input type="text" class='editor' @paste="${this.afterPaste}" @keydown="${this.afterKeyDown}" placeholder="${this.placeholder}">
@@ -43,12 +41,14 @@ export default class TagInput extends LitElement {
e.target.value = '';
}
} else if (e.keyCode === 8) {
+ if (e.target.value.length === 0) {
if (Array.isArray(this.value) && this.value.length > 0) {
this.value.splice(-1);
this.value = [...this.value];
}
}
}
+ }
static get styles() {
return [css`
@@ -73,7 +73,7 @@ export default class TagInput extends LitElement {
color:var(--fg3);
border-radius:var(--border-radius);
word-break: break-all;
- font-size: calc(var(--font-size-small) + 1px);
+ font-size: var(--font-size-small);
}
.tag:hover ~ #cursor {
display: block;
| 7 |
diff --git a/src/components/dashboard/__tests__/__snapshots__/FaceRecognition.js.snap b/src/components/dashboard/__tests__/__snapshots__/FaceRecognition.js.snap @@ -132,10 +132,7 @@ exports[`FaceRecognition matches snapshot 1`] = `
style={
Object {
"color": "rgba(85,85,85,1.00)",
- "direction": "ltr",
- "fontFamily": "Roboto, \\"Helvetica Neue\\", Helvetica, Arial, sans-serif",
- "fontSize": "28px",
- "marginBottom": "30px",
+ "fontSize": "18px",
"textAlign": "center",
}
}
@@ -149,10 +146,7 @@ exports[`FaceRecognition matches snapshot 1`] = `
style={
Object {
"color": "rgba(85,85,85,1.00)",
- "direction": "ltr",
- "fontFamily": "Roboto, \\"Helvetica Neue\\", Helvetica, Arial, sans-serif",
- "fontSize": "18px",
- "marginTop": "30px",
+ "fontSize": "20px",
"textAlign": "center",
}
}
@@ -214,24 +208,52 @@ exports[`FaceRecognition matches snapshot 1`] = `
}
>
<div
- id="zoom-parent-container"
+ className="css-cursor-18t94o4 css-view-1dbjc4n"
+ data-focusable={true}
+ disabled={false}
+ onKeyDown={[Function]}
+ onKeyPress={[Function]}
+ onKeyUp={[Function]}
+ onResponderGrant={[Function]}
+ onResponderMove={[Function]}
+ onResponderRelease={[Function]}
+ onResponderTerminate={[Function]}
+ onResponderTerminationRequest={[Function]}
+ onStartShouldSetResponder={[Function]}
+ role="button"
style={
Object {
- "height": "auto",
- "marginBottom": 0,
- "marginLeft": "auto",
- "marginRight": "auto",
- "marginTop": 0,
- "maxHeight": 644,
- "width": "100%",
+ "borderBottomLeftRadius": "4px",
+ "borderBottomRightRadius": "4px",
+ "borderTopLeftRadius": "4px",
+ "borderTopRightRadius": "4px",
+ "cursor": "pointer",
+ "msTouchAction": "manipulation",
+ "overflowX": "hidden",
+ "overflowY": "hidden",
+ "position": "relative",
+ "touchAction": "manipulation",
}
}
+ tabIndex="0"
>
<div
- id="zoom-interface-container"
+ className="css-view-1dbjc4n"
style={
Object {
- "position": "absolute",
+ "WebkitAlignItems": "center",
+ "WebkitBoxAlign": "center",
+ "WebkitBoxDirection": "normal",
+ "WebkitBoxOrient": "horizontal",
+ "WebkitBoxPack": "center",
+ "WebkitFlexDirection": "row",
+ "WebkitJustifyContent": "center",
+ "alignItems": "center",
+ "flexDirection": "row",
+ "justifyContent": "center",
+ "msFlexAlign": "center",
+ "msFlexDirection": "row",
+ "msFlexPack": "center",
}
}
>
| 3 |
diff --git a/src/commands/fetch.js b/src/commands/fetch.js @@ -64,8 +64,7 @@ async function fetchCommits ({dir, url, user, repo, commitish, since, token}) {
}
})
let json = res.data
- let pagination = parseLinkHeader(res.headers['link'])
-
+ let link = parseLinkHeader(res.headers['link'])
for (let commit of json) {
if (!commit.commit.verification.payload) {
@@ -87,8 +86,9 @@ async function fetchCommits ({dir, url, user, repo, commitish, since, token}) {
console.log(e.message, commit.sha)
}
}
- if (pagination.next) {
- return fetchCommits({dir, user, repo, commitish, since, token, url: pagination.next.url})
+
+ if (link && link.next) {
+ return fetchCommits({dir, user, repo, commitish, since, token, url: link.next.url})
}
}
| 1 |
diff --git a/app/webpack/observations/identify/components/suggestions.jsx b/app/webpack/observations/identify/components/suggestions.jsx @@ -86,6 +86,8 @@ class Suggestions extends React.Component {
<h3 className="clearfix">
<SplitTaxon
taxon={ taxon }
+ target="_blank"
+ url={ urlForTaxon( taxon ) }
onClick={ e => {
e.preventDefault( );
this.scrollToTop( );
| 1 |
diff --git a/lib/api/metadata.js b/lib/api/metadata.js @@ -543,6 +543,7 @@ Metadata.prototype.checkDeployStatus = function(id, includeDetails, callback) {
res.done = res.done === 'true';
res.success = res.success === 'true';
res.checkOnly = res.checkOnly === 'true';
+ res.runTestsEnabled = res.runTestsEnabled === 'true';
if (res.ignoreWarnings) {
res.ignoreWarnings = res.ignoreWarnings === 'true';
}
| 3 |
diff --git a/src/style/themes/classic/classic-theme.config.js b/src/style/themes/classic/classic-theme.config.js @@ -20,11 +20,6 @@ export default (palette) => {
input: '#1e499f',
disabled: '#b3c2c8',
border: '#4d7080'
- },
- status: {
- error: {
- main: 'red'
- }
}
}
);
| 13 |
diff --git a/samples/csharp_dotnetcore/70.qnamaker-multiturn-sample/appsettings.json b/samples/csharp_dotnetcore/70.qnamaker-multiturn-sample/appsettings.json {
"MicrosoftAppId": "",
"MicrosoftAppPassword": "",
- "QnAKnowledgebaseId": "b729b344-1ffd-4a54-8294-c7d9952f9863",
- "QnAEndpointKey": "7109f05a-fc0e-470c-9aa9-c8ff27739b4a",
- "QnAEndpointHostName": "https://gyanam.azurewebsites.net/qnamaker"
+ "QnAKnowledgebaseId": "",
+ "QnAEndpointKey": "",
+ "QnAEndpointHostName": ""
}
\ No newline at end of file
| 2 |
diff --git a/includes/Core/Modules/Modules.php b/includes/Core/Modules/Modules.php @@ -812,6 +812,47 @@ final class Modules {
'schema' => $get_module_schema,
)
),
+ new REST_Route(
+ 'core/modules/data/check-access',
+ array(
+ array(
+ 'methods' => WP_REST_Server::EDITABLE,
+ 'callback' => function( WP_REST_Request $request ) {
+ $slug = $request['slug'];
+
+ try {
+ $module = $this->get_module( $slug );
+ } catch ( Exception $e ) {
+ return new WP_Error( 'invalid_module_slug', __( 'Invalid module slug.', 'google-site-kit' ), array( 'status' => 404 ) );
+ }
+
+ if ( ! $this->is_module_connected( $slug ) ) {
+ return new WP_Error( 'module_not_connected', __( 'Module is not connected.', 'google-site-kit' ), array( 'status' => 400 ) );
+ }
+
+ $access = $module->check_service_entity_access();
+
+ if ( is_wp_error( $access ) ) {
+ return $access;
+ }
+
+ return new WP_REST_Response(
+ array(
+ 'access' => $access,
+ )
+ );
+ },
+ 'permission_callback' => $can_setup,
+ 'args' => array(
+ 'slug' => array(
+ 'type' => 'string',
+ 'description' => __( 'Identifier for the module.', 'google-site-kit' ),
+ 'sanitize_callback' => 'sanitize_key',
+ ),
+ ),
+ ),
+ )
+ ),
new REST_Route(
'modules/(?P<slug>[a-z0-9\-]+)/data/notifications',
array(
@@ -972,47 +1013,6 @@ final class Modules {
),
)
),
- new REST_Route(
- 'core/modules/data/check-access',
- array(
- array(
- 'methods' => WP_REST_Server::EDITABLE,
- 'callback' => function( WP_REST_Request $request ) {
- $slug = $request['slug'];
-
- try {
- $module = $this->get_module( $slug );
- } catch ( Exception $e ) {
- return new WP_Error( 'invalid_module_slug', __( 'Invalid module slug.', 'google-site-kit' ), array( 'status' => 404 ) );
- }
-
- if ( ! $this->is_module_connected( $slug ) ) {
- return new WP_Error( 'module_not_connected', __( 'Module is not connected.', 'google-site-kit' ), array( 'status' => 400 ) );
- }
-
- $access = $module->check_service_entity_access();
-
- if ( is_wp_error( $access ) && ! is_bool( $access ) ) {
- return $access;
- }
-
- return new WP_REST_Response(
- array(
- 'access' => $access,
- )
- );
- },
- 'permission_callback' => $can_setup,
- 'args' => array(
- 'slug' => array(
- 'type' => 'string',
- 'description' => __( 'Identifier for the module.', 'google-site-kit' ),
- 'sanitize_callback' => 'sanitize_key',
- ),
- ),
- ),
- )
- ),
);
}
| 2 |
diff --git a/luci-app-openclash/luasrc/view/openclash/log.htm b/luci-app-openclash/luasrc/view/openclash/log.htm @@ -231,7 +231,13 @@ function line_tolocal(str){
var dt = new Date(res[1]);
}
if (dt && dt != "Invalid Date"){
- cstrt[cn]=dt.getFullYear()+"-"+p(dt.getMonth()+1)+"-"+p(dt.getDate())+" "+p(dt.getHours())+":"+p(dt.getMinutes())+":"+p(dt.getSeconds())+v.substring(res[1].length + 7);
+ if (v.indexOf("level=") != -1) {
+ var log_info = v.substring(res[1].length + 7);
+ }
+ else {
+ var log_info = v.substring(res[1].length + 2);
+ }
+ cstrt[cn]=dt.getFullYear()+"-"+p(dt.getMonth()+1)+"-"+p(dt.getDate())+" "+p(dt.getHours())+":"+p(dt.getMinutes())+":"+p(dt.getSeconds())+log_info;
cn = cn + 1;
}
else{
| 1 |
diff --git a/lib/GoogleHome.js b/lib/GoogleHome.js @@ -485,7 +485,7 @@ class GoogleHome {
name = name.substring(0, pos) + name.substring(pos + room.length + 1);
}
}
- name = name.replace(/\s\s/g).replace(/\s\s/g).trim();
+ name = name.replace(/\s\s+/g, ' ').trim();
}
return name;
}
@@ -726,9 +726,6 @@ class GoogleHome {
if (smartEnum && objects[id].common.write === false) {
return;
}
- if (smartEnum && !friendlyName && funcName && roomName) {
- friendlyName = funcName + " " + roomName;
- }
result[id] = {};
result[id].traits = [];
@@ -765,8 +762,16 @@ class GoogleHome {
};
const controls = this.detector.detect(options);
if (controls) {
+
controls.forEach(control => {
this.adapter.log.debug("Type: " + control.type)
+ if (controls.length > 1) {
+ if (control.type === "info") {
+ this.adapter.log.debug("Ignoring because of multiple types: " + control.type)
+ return;
+ }
+
+ }
if (this.converter.hasOwnProperty(control.type)) {
this.adapter.log.info(`${id} is auto added with type ${control.type}.`);
result[id] = this.converter[control.type](id, control, friendlyName, roomName, funcName, objects[id]);
@@ -787,6 +792,8 @@ class GoogleHome {
}
return;
+ } else {
+ friendlyName = this.checkName("", objects[id], roomName, funcName);
}
| 7 |
diff --git a/token-metadata/0x23aEfF664c1B2bbA98422a0399586e96cc8a1C92/metadata.json b/token-metadata/0x23aEfF664c1B2bbA98422a0399586e96cc8a1C92/metadata.json "symbol": "FACT",
"address": "0x23aEfF664c1B2bbA98422a0399586e96cc8a1C92",
"decimals": 18,
- "dharmaVerificationStatus": {
"dharmaVerificationStatus": "VERIFIED"
}
\ No newline at end of file
-}
\ No newline at end of file
| 3 |
diff --git a/examples/basic/serverless.yml b/examples/basic/serverless.yml type: my-project
components:
-# myFunction:
-# type: aws-lambda
-# inputs:
-# memory: 512
-# timeout: 10
-# handler: handler.handler
-# role:
-# arn: ${myRole.arn}
-# myRole:
-# type: aws-iam-role
-# inputs:
-# service: lambda.amazonaws.com
- productsDb:
- type: aws-dynamodb
+ myFunction:
+ type: aws-lambda
inputs:
- region: us-east-1
- tables:
- - name: products-${self.serviceId}
- hashKey: id
- indexes:
- - name: ProductIdIndex
- type: global
- hashKey: id
- schema:
- id: number
- name: string
- description: string
- price: number
- options:
- timestamps: true
+ memory: 512
+ timeout: 10
+ handler: handler.handler
+ role:
+ arn: ${myRole.arn}
+ myRole:
+ type: aws-iam-role
+ inputs:
+ service: lambda.amazonaws.com
\ No newline at end of file
| 13 |
diff --git a/src/components/sign/SignTransferDetails.js b/src/components/sign/SignTransferDetails.js @@ -176,7 +176,8 @@ const ActionMessage = ({ transaction, action, actionKind }) => (
const ActionWarrning = ({ actionKind, action }) => (
<Fragment>
{actionKind === 'functionCall' && (
- !!action?.args?.length
+ action.args
+ ? Array.isArray(action.args)
? (
<pre>
<Translate id='arguments' />:
@@ -186,6 +187,11 @@ const ActionWarrning = ({ actionKind, action }) => (
)
, null, 2)}
</pre>
+ ) : (
+ <>
+ <div className='icon'><IconProblems color='#999' /></div>
+ <Translate id='sign.ActionWarrning.binaryData' />
+ </>
)
: (
<>
| 9 |
diff --git a/plugins/debug/particleDebugPanel.js b/plugins/debug/particleDebugPanel.js // patch me.ParticleEmitter.init
me.plugin.patch(me.ParticleEmitter, "init", function (x, y, image) {
- this._patched(x, y, image);
+ this._patched.apply(this, arguments);
_this.emitterCount++;
});
// patch me.ParticleEmitter.destroy
me.plugin.patch(me.ParticleEmitter, "destroy", function () {
- this._patched();
+ this._patched.apply(this, arguments);
_this.emitterCount--;
});
// patch me.Particle.init
me.plugin.patch(me.Particle, "init", function (emitter) {
- this._patched(emitter);
+ this._patched.apply(this, arguments);
_this.particleCount++;
});
// patch me.game.update
me.plugin.patch(me.game, "update", function (dt) {
var startTime = now();
- this._patched(dt);
+ this._patched.apply(this, arguments);
// calculate the update time (can't we use [dt] here ?)
_this.frameUpdateTimeSamples.push(now() - startTime);
});
// patch me.game.draw
me.plugin.patch(me.game, "draw", function () {
var startTime = now();
- this._patched();
+ this._patched.apply(this, arguments);
// calculate the drawing time
_this.frameDrawTimeSamples.push(now() - startTime);
});
// patch me.ParticleContainer.update
me.plugin.patch(me.ParticleContainer, "update", function (dt) {
var startTime = now();
- var value = this._patched(dt);
+ var value = this._patched.apply(this, arguments);
// calculate the update time (can't we use [dt] here ?)
_this.updateTime += now() - startTime;
return value;
// patch me.ParticleContainer.draw
me.plugin.patch(me.ParticleContainer, "draw", function (renderer, rect) {
var startTime = now();
- this._patched(renderer, rect);
+ this._patched.apply(this, arguments);
// calculate the drawing time
_this.drawTime += now() - startTime;
});
| 1 |
diff --git a/lib/reporter-proxy.js b/lib/reporter-proxy.js @@ -11,7 +11,7 @@ module.exports = class ReporterProxy {
let timingsEvent
while ((timingsEvent = this.timingsQueue.shift())) {
- this.reporter.addTiming(this.eventType, timingsEvent[0], timingsEvent[1])
+ this.reporter.addTiming(this.eventType, timingsEvent.duration, timingsEvent.metadata)
}
}
@@ -32,7 +32,7 @@ module.exports = class ReporterProxy {
if (this.reporter) {
this.reporter.addTiming(this.eventType, duration, metadata)
} else {
- this.timingsQueue.push([duration, metadata])
+ this.timingsQueue.push({duration, metadata})
}
}
}
| 4 |
diff --git a/source/Renderer/webgl.js b/source/Renderer/webgl.js @@ -205,13 +205,15 @@ class gltfWebGl
const messages = this.context.getShaderInfoLog(shader).split("\n");
for(const message of messages)
{
- info += message + "\n";
- const matches = message.match(/(?:(?:WARNING)|(?:ERROR)): [0-9]*:([0-9]*).*/i);
- if (matches && matches.length > 1)
+
+ const matches = message.match(/(WARNING|ERROR): ([0-9]*):([0-9]*):(.*)/i);
+ if (matches && matches.length == 5)
{
- const lineNumber = parseInt(matches[1]) - 1;
+ const lineNumber = parseInt(matches[3]) - 1;
const lines = shaderSource.split("\n");
+ info += `${matches[1]}: ${shaderIdentifier}+includes:${lineNumber}: ${matches[4]}`;
+
for(let i = Math.max(0, lineNumber - 2); i < Math.min(lines.length, lineNumber + 3); i++)
{
if (lineNumber === i)
@@ -221,6 +223,10 @@ class gltfWebGl
info += "\t" + lines[i] + "\n";
}
}
+ else
+ {
+ info += message + "\n";
+ }
}
throw new Error("Could not compile WebGL program '" + shaderIdentifier + "': " + info);
| 7 |
diff --git a/devices.js b/devices.js @@ -103,7 +103,7 @@ const devices = [
supports: 'on/off, power measurement',
fromZigbee: [
fz.QBKG04LM_QBKG11LM_state, fz.QBKG11LM_power, fz.ignore_onoff_change, fz.ignore_basic_change,
- fz.ignore_multistate_report, fz.ignore_multistate_change,
+ fz.ignore_multistate_report, fz.ignore_multistate_change, fz.ignore_analog_change, fz.ignore_analog_report,
],
toZigbee: [tz.onoff],
ep: {'': 2},
| 8 |
diff --git a/tests/e2e/specs/Modeler.spec.js b/tests/e2e/specs/Modeler.spec.js @@ -263,7 +263,7 @@ describe('Modeler', () => {
const startEventPosition = { x: 150, y: 150 };
getElementAtPosition(startEventPosition).then($startEvent => {
- cy.wrap($startEvent).get('[stroke=red]').should('exist');
+ cy.wrap($startEvent).find('[stroke=red]').should('exist');
});
const taskPosition = { x: 150, y: 300 };
@@ -278,7 +278,7 @@ describe('Modeler', () => {
waitToRenderAllShapes();
getElementAtPosition(startEventPosition).then($startEvent => {
- cy.wrap($startEvent).get('[stroke=red]').should('exist');
+ cy.wrap($startEvent).find('[stroke=red]').should('exist');
});
cy.get('[data-test=validation-list]').children()
@@ -293,11 +293,11 @@ describe('Modeler', () => {
.should('contain', 'node_2');
getElementAtPosition(startEventPosition).then($startEvent => {
- cy.wrap($startEvent).get('[stroke=red]').should('exist');
+ cy.wrap($startEvent).find('[stroke=red]').should('exist');
});
getElementAtPosition(taskPosition).then($task => {
- cy.wrap($task).get('[stroke=red]').should('exist');
+ cy.wrap($task).find('[stroke=red]').should('exist');
});
});
| 1 |
diff --git a/source/views/panels/ModalEventHandler.js b/source/views/panels/ModalEventHandler.js import { Class } from '../../core/Core';
import Obj from '../../foundation/Object';
import '../../foundation/EventTarget'; // For Function#on
+import ScrollView from '../containers/ScrollView';
+
+const inView = function ( view, event ) {
+ let targetView = event.targetView;
+ while ( targetView && targetView !== view ) {
+ targetView = targetView.get( 'parentView' );
+ }
+ return !!targetView;
+};
const ModalEventHandler = Class({
@@ -11,15 +20,6 @@ const ModalEventHandler = Class({
this._seenMouseDown = false;
},
- inView ( event ) {
- let targetView = event.targetView;
- const view = this.get( 'view' );
- while ( targetView && targetView !== view ) {
- targetView = targetView.get( 'parentView' );
- }
- return !!targetView;
- },
-
// If a user clicks outside the menu we want to close it. But we don't want
// the mousedown/mouseup/click events to propagate to what's below. The
// events fire in that order, and not all are guaranteed to fire (the user
@@ -37,24 +37,26 @@ const ModalEventHandler = Class({
// before hiding on click. On Android/iOS, we will not see a mousedown
// event, so we also count a touchstart event.
handleMouse: function ( event ) {
+ const view = this.get( 'view' );
const type = event.type;
- let view;
- if ( !event.seenByModal && !this.inView( event ) ) {
+ if ( !event.seenByModal && !inView( view, event ) ) {
event.stopPropagation();
if ( type === 'mousedown' ) {
this._seenMouseDown = true;
} else if ( type === 'click' ) {
event.preventDefault();
if ( this._seenMouseDown ) {
- view = this.get( 'view' );
if ( view.clickedOutside ) {
view.clickedOutside( event );
}
}
} else if ( type === 'wheel' ) {
+ const scrollView = this.get( 'view' ).getParent( ScrollView );
+ if ( !scrollView || !inView( scrollView, event ) ) {
event.preventDefault();
}
}
+ }
event.seenByModal = true;
}.on( 'click', 'mousedown', 'mouseup', 'tap', 'wheel' ),
@@ -66,10 +68,10 @@ const ModalEventHandler = Class({
}.on( 'scroll' ),
handleKeys: function ( event ) {
- if ( !event.seenByModal && !this.inView( event ) ) {
+ const view = this.get( 'view' );
+ if ( !event.seenByModal && !inView( view, event ) ) {
event.stopPropagation();
// View may be interested in key events:
- const view = this.get( 'view' );
if ( view.keyOutside ) {
view.keyOutside( event );
}
@@ -78,7 +80,8 @@ const ModalEventHandler = Class({
}.on( 'keypress', 'keydown', 'keyup' ),
handleTouch: function ( event ) {
- if ( !event.seenByModal && !this.inView( event ) ) {
+ const view = this.get( 'view' );
+ if ( !event.seenByModal && !inView( view, event ) ) {
event.preventDefault();
event.stopPropagation();
// Clicks outside should now close the modal.
| 11 |
diff --git a/_includes/content.html b/_includes/content.html {% include messages/needs-editing.html %}
{% include content/github-buttons.html %}
<article>
- {% if page.url contains "overview" %}
+ {% unless page.url contains "overview" %}
<h1 class="ui header xo margin top without">
<div class="ui medium header">{{ page.title }}
{% if page.subtitle %}
{% endif %}
</div>
</h1>
- {% endif %}
+ {% endunless %}
{{content | toc }}
</article>
| 2 |
diff --git a/src/io/ble.js b/src/io/ble.js @@ -153,7 +153,7 @@ class BLE extends JSONRPC {
if (encoding) {
params.encoding = encoding;
}
- if (withResponse) {
+ if (withResponse !== null) {
params.withResponse = withResponse;
}
return this.sendRemoteRequest('write', params)
| 11 |
diff --git a/source/datastore/store/Store.js b/source/datastore/store/Store.js @@ -1991,28 +1991,26 @@ const Store = Class({
const account = this.getAccount(accountId, Type);
const typeId = guid(Type);
const clientState = account.clientState[typeId];
-
- if (account.serverState[typeId] === newState) {
- // Do nothing, we're already in this state.
- } else if (
- clientState &&
+ const oldState = account.serverState[typeId];
+
+ if (oldState !== newState) {
+ // if !oldState => we're checking if a pushed state still needs
+ // fetching. Due to concurrency, if this doesn't match newState,
+ // we don't know if it's older or newer. As we're now requesting
+ // updates, we can reset it to be clientState and then it will be
+ // updated to the real new server automatically if has changed in
+ // the sourceDidFetchUpdates handler. If a push comes in while
+ // fetching the updates, this won't match and we'll fetch again.
+ account.serverState[typeId] =
+ oldState || !clientState ? newState : clientState;
+ if (
newState !== clientState &&
!account.ignoreServerState &&
!(account.status[typeId] & (LOADING | COMMITTING))
) {
- // Set this to clientState to avoid potential infinite loop. We
- // don't know for sure if our serverState is older or newer due to
- // concurrency. As we're now requesting updates, we can reset it to
- // be clientState and then it will be updated to the real new server
- // automatically if has changed in the sourceDidFetchUpdates
- // handler. If a push comes in while fetching the updates, this
- // won't match and we'll fetch again.
- account.serverState[typeId] = clientState;
- this.fire(typeId + ':server:' + accountId);
+ if (clientState) {
this.fetchAll(accountId, Type, true);
- } else {
- account.serverState[typeId] = newState;
- if (!clientState) {
+ }
// We have a query but not matches yet; we still need to
// refresh the queries in case there are now matches.
this.fire(typeId + ':server:' + accountId);
| 7 |
diff --git a/assets/js/components/Header.stories.js b/assets/js/components/Header.stories.js @@ -56,7 +56,6 @@ import {
} from '../googlesitekit/datastore/user/constants';
import { Provider as ViewContextProvider } from './Root/ViewContextContext';
import { getMetaCapabilityPropertyName } from '../googlesitekit/datastore/util/permissions';
-import { CORE_MODULES } from '../googlesitekit/modules/datastore/constants';
import {
VIEW_CONTEXT_PAGE_DASHBOARD,
VIEW_CONTEXT_DASHBOARD,
@@ -272,28 +271,6 @@ HeaderViewOnly.parameters = {
features: [ 'dashboardSharing' ],
};
-export const HeaderWithModuleRecoveryAlert = Template.bind( {} );
-HeaderWithModuleRecoveryAlert.storyName =
- 'Plugin Header with Module Recovery Alert';
-HeaderWithModuleRecoveryAlert.args = {
- setupRegistry: ( registry ) => {
- provideModules( registry );
-
- registry
- .dispatch( CORE_MODULES )
- .receiveRecoverableModules( [ 'search-console' ] );
- registry
- .dispatch( CORE_MODULES )
- .receiveCheckModuleAccess(
- { access: true },
- { slug: 'search-console' }
- );
- },
-};
-HeaderWithModuleRecoveryAlert.parameters = {
- features: [ 'dashboardSharing' ],
-};
-
export default {
title: 'Components/Header',
component: Header,
| 2 |
diff --git a/src/plugins/ReduxDevTools.js b/src/plugins/ReduxDevTools.js @@ -45,8 +45,7 @@ module.exports = class ReduxDevTools extends Plugin {
return
case 'JUMP_TO_STATE':
case 'JUMP_TO_ACTION':
- // this.setState(state)
- this.uppy.state = Object.assign({}, this.uppy.state, JSON.parse(message.state))
+ this.uppy.store.state = Object.assign({}, this.uppy.state, JSON.parse(message.state))
this.uppy.updateAll(this.uppy.state)
}
}
| 1 |
diff --git a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -386,6 +386,37 @@ export default class ConfirmTransactionBase extends Component {
)
}
+
+ renderFeeError = () => {
+
+ return (
+ <div className="page-container">
+ <div className="confirm-page-container-header__row">
+ <h1>Not enough funds</h1>
+ </div>
+
+ <div className="confirm-page-container-summary">
+ <p>
+ Tokens require Bitcoin Cash (BCH) to pay the transaction fee, and
+ your balance does not cover this.
+ </p>
+ <br />
+ <br />
+ <small>please acquire some BCH and try again.</small>
+ </div>
+
+ <PageContainerFooter
+ onCancel={() => this.handleCancel()}
+ onSubmit={() => this.handleSubmit()}
+ disabled= {true}
+ submitText={this.context.t('confirm')}
+ submitButtonType="confirm"
+ />
+ </div>
+ )
+ }
+
+
renderSuccess = () => {
return (
<div className="page-container">
@@ -428,7 +459,17 @@ export default class ConfirmTransactionBase extends Component {
warning,
txParams,
accountTokens,
+ balance,
+ bchAddress,
+ utxo,
} = this.props
+
+ const cantAffordFees = balance < 546 || utxo[bchAddress].length <= 0
+
+ if (cantAffordFees) {
+ return this.renderFeeError()
+ }
+
const { submitting, submitError, submitSuccess } = this.state
const isCashAccountRegistration =
txParams.opReturn !== undefined &&
| 7 |
diff --git a/generators/upgrade/index.js b/generators/upgrade/index.js @@ -131,14 +131,11 @@ module.exports = class extends BaseGenerator {
this.success(`Checked out branch "${branch}"`);
}
- _upgradeFiles(callback) {
+ _upgradeFiles() {
if (cleanup.upgradeFiles(this)) {
const gitCommit = this.gitExec(['commit', '-q', '-m', '"Upgrade preparation."', '--no-verify'], { silent: this.silent });
if (gitCommit.code !== 0) this.error(`Unable to prepare upgrade:\n${gitCommit.stderr}`);
this.success('Upgrade preparation');
- callback();
- } else {
- callback();
}
}
@@ -501,8 +498,7 @@ module.exports = class extends BaseGenerator {
},
upgradeFiles() {
- const done = this.async();
- this._upgradeFiles(done);
+ this._upgradeFiles();
},
generateWithTargetVersion() {
| 2 |
diff --git a/components/bases-locales/publication/code-authentification.js b/components/bases-locales/publication/code-authentification.js @@ -9,18 +9,18 @@ import theme from '@/styles/theme'
import Button from '@/components/button'
import Notification from '@/components/notification'
-function CodeAuthentification({balId, email, handleValidCode, sendBackCode, cancel}) {
+function CodeAuthentification({submissionId, email, handleValidCode, sendBackCode, cancel}) {
const [code, setCode] = useState('')
const [error, setError] = useState(null)
const submitCode = useCallback(async () => {
try {
- await submitAuthentificationCode(balId, code)
+ await submitAuthentificationCode(submissionId, code)
handleValidCode()
} catch (error) {
setError(error.message)
}
- }, [balId, code, handleValidCode])
+ }, [submissionId, code, handleValidCode])
const handleInput = event => {
const {value} = event.target
@@ -121,7 +121,7 @@ function CodeAuthentification({balId, email, handleValidCode, sendBackCode, canc
}
CodeAuthentification.propTypes = {
- balId: PropTypes.string.isRequired,
+ submissionId: PropTypes.string.isRequired,
email: PropTypes.string.isRequired,
handleValidCode: PropTypes.func.isRequired,
sendBackCode: PropTypes.func.isRequired,
| 10 |
diff --git a/README.md b/README.md @@ -16,7 +16,7 @@ MUI-Datatables is a data tables component built on [Material-UI](https://www.mat
<img src="https://user-images.githubusercontent.com/19170080/38026128-eac9d506-3258-11e8-92a7-b0d06e5faa82.gif" />
</div>
-# Table of content
+# Table of contents
* [Install](#install)
* [Demo](#demo)
* [Usage](#usage)
| 0 |
diff --git a/layouts/_default/single.html b/layouts/_default/single.html footer fragment, the local one is rendered.
*/}}
{{ $global := .Site.GetPage "page" "global" }}
- {{ $.Scratch.Delete "global_fragments" }}
+ {{ .Scratch.Delete "global_fragments" }}
{{ if $global }}
{{ $.Scratch.Set "global_fragments" ($global.Resources.ByType "page") }}
{{ end }}
{{ $local_fragments := .Resources.ByType "page" }}
- {{ $.Scratch.Delete "fragments" }}
+ {{ .Scratch.Delete "fragments" }}
{{ range $local_fragments }}
{{ $.Scratch.Add "fragments" (slice .) }}
{{ end }}
- {{ if and ($.Scratch.Get "global_fragments") ($.Scratch.Get "fragments") }}
+ {{ if and (.Scratch.Get "global_fragments") (.Scratch.Get "fragments") }}
{{ range ($.Scratch.Get "global_fragments") }}
{{ if not (where ($.Scratch.Get "fragments") ".Name" .Name) }}
{{ $.Scratch.Add "fragments" (slice .) }}
{{ end }}
{{ end }}
- {{ range sort ($.Scratch.Get "fragments" | default slice) "Params.weight" }}
+ {{ range sort (.Scratch.Get "fragments" | default slice) "Params.weight" }}
{{ if and (not .Params.disabled) (isset .Params "fragment") (not (eq .Params.fragment "hero")) }}
{{ partial (print "fragments/" .Params.fragment ".html") (dict "menus" $.Site.Menus "Site" $.Site "resources" $.Resources "self" .) }}
{{ end }}
| 2 |
diff --git a/test/client/popupBridge.js b/test/client/popupBridge.js /* @flow */
/* eslint require-await: off, max-lines: off, max-nested-callbacks: off */
-import { wrapPromise } from 'belter/src';
+import { wrapPromise, parseQuery } from 'belter/src';
import { ZalgoPromise } from 'zalgo-promise/src';
import { FUNDING } from '@paypal/sdk-constants/src';
@@ -15,6 +15,7 @@ describe('popup bridge cases', () => {
const nativeUrl = 'native://foobar';
const orderID = generateOrderID();
const payerID = 'YYYYYYYYYY';
+ window.xprops.commit = true;
window.xprops.createOrder = mockAsyncProp(expect('createOrder', async () => {
return ZalgoPromise.try(() => {
@@ -35,7 +36,25 @@ describe('popup bridge cases', () => {
window.xprops.getPopupBridge = mockAsyncProp(expect('getPopupBridge', async () => {
return {
nativeUrl,
- start: expect('start', async () => {
+ start: expect('start', async (url) => {
+ const query = parseQuery(url.split('?')[1]);
+
+ if (query.token !== orderID) {
+ throw new Error(`Expected token to be ${ orderID }, got ${ query.token }`);
+ }
+
+ if (query.useraction !== 'commit') {
+ throw new Error(`Expected useraction to be commit, got ${ query.useraction }`);
+ }
+
+ if (query.fundingSource !== FUNDING.PAYPAL) {
+ throw new Error(`Expected fundingSource to be ${ FUNDING.PAYPAL }, fot ${ query.fundingSource }`);
+ }
+
+ if (!query.redirect_uri) {
+ throw new Error(`Expected redirect_uri to be present in url`);
+ }
+
return {
opType: 'payment',
token: orderID,
@@ -58,6 +77,7 @@ describe('popup bridge cases', () => {
const nativeUrl = 'native://foobar';
const orderID = generateOrderID();
+ window.xprops.commit = true;
window.xprops.createOrder = mockAsyncProp(expect('createOrder', async () => {
return ZalgoPromise.try(() => {
@@ -74,7 +94,25 @@ describe('popup bridge cases', () => {
window.xprops.getPopupBridge = mockAsyncProp(expect('getPopupBridge', async () => {
return {
nativeUrl,
- start: expect('start', async () => {
+ start: expect('start', async (url) => {
+ const query = parseQuery(url.split('?')[1]);
+
+ if (query.token !== orderID) {
+ throw new Error(`Expected token to be ${ orderID }, got ${ query.token }`);
+ }
+
+ if (query.useraction !== 'commit') {
+ throw new Error(`Expected useraction to be commit, got ${ query.useraction }`);
+ }
+
+ if (query.fundingSource !== FUNDING.PAYPAL) {
+ throw new Error(`Expected fundingSource to be ${ FUNDING.PAYPAL }, fot ${ query.fundingSource }`);
+ }
+
+ if (!query.redirect_uri) {
+ throw new Error(`Expected redirect_uri to be present in url`);
+ }
+
return {
opType: 'cancel',
token: orderID
@@ -98,6 +136,7 @@ describe('popup bridge cases', () => {
const orderID = generateOrderID();
const payerID = 'YYYYYYYYYY';
const paymentID = 'ZZZZZZZZZZ';
+ window.xprops.commit = true;
window.xprops.createOrder = mockAsyncProp(expect('createOrder', async () => {
return ZalgoPromise.try(() => {
@@ -122,7 +161,25 @@ describe('popup bridge cases', () => {
window.xprops.getPopupBridge = mockAsyncProp(expect('getPopupBridge', async () => {
return {
nativeUrl,
- start: expect('start', async () => {
+ start: expect('start', async (url) => {
+ const query = parseQuery(url.split('?')[1]);
+
+ if (query.token !== orderID) {
+ throw new Error(`Expected token to be ${ orderID }, got ${ query.token }`);
+ }
+
+ if (query.useraction !== 'commit') {
+ throw new Error(`Expected useraction to be commit, got ${ query.useraction }`);
+ }
+
+ if (query.fundingSource !== FUNDING.PAYPAL) {
+ throw new Error(`Expected fundingSource to be ${ FUNDING.PAYPAL }, fot ${ query.fundingSource }`);
+ }
+
+ if (!query.redirect_uri) {
+ throw new Error(`Expected redirect_uri to be present in url`);
+ }
+
return {
opType: 'payment',
token: orderID,
@@ -148,6 +205,7 @@ describe('popup bridge cases', () => {
const orderID = generateOrderID();
const payerID = 'YYYYYYYYYY';
const billingToken = 'BA-QQQQQQQQQQQ';
+ window.xprops.commit = true;
window.xprops.createOrder = mockAsyncProp(expect('createOrder', async () => {
return ZalgoPromise.try(() => {
@@ -172,7 +230,25 @@ describe('popup bridge cases', () => {
window.xprops.getPopupBridge = mockAsyncProp(expect('getPopupBridge', async () => {
return {
nativeUrl,
- start: expect('start', async () => {
+ start: expect('start', async (url) => {
+ const query = parseQuery(url.split('?')[1]);
+
+ if (query.token !== orderID) {
+ throw new Error(`Expected token to be ${ orderID }, got ${ query.token }`);
+ }
+
+ if (query.useraction !== 'commit') {
+ throw new Error(`Expected useraction to be commit, got ${ query.useraction }`);
+ }
+
+ if (query.fundingSource !== FUNDING.PAYPAL) {
+ throw new Error(`Expected fundingSource to be ${ FUNDING.PAYPAL }, fot ${ query.fundingSource }`);
+ }
+
+ if (!query.redirect_uri) {
+ throw new Error(`Expected redirect_uri to be present in url`);
+ }
+
return {
opType: 'payment',
token: orderID,
| 7 |
diff --git a/assets/js/googlesitekit/data/index.js b/assets/js/googlesitekit/data/index.js @@ -35,12 +35,6 @@ import {
import {
addInitializeAction,
addInitializeReducer,
- collectActions,
- collectControls,
- collectReducers,
- collectResolvers,
- collectSelectors,
- collectState,
collectName,
combineStores,
commonActions,
@@ -54,12 +48,6 @@ const Data = createRegistry();
// developers can use them.
Data.addInitializeAction = addInitializeAction;
Data.addInitializeReducer = addInitializeReducer;
-Data.collectActions = collectActions;
-Data.collectControls = collectControls;
-Data.collectReducers = collectReducers;
-Data.collectResolvers = collectResolvers;
-Data.collectSelectors = collectSelectors;
-Data.collectState = collectState;
Data.collectName = collectName;
Data.combineStores = combineStores;
Data.commonActions = commonActions;
| 2 |
diff --git a/circle.yml b/circle.yml @@ -17,7 +17,7 @@ test:
deployment:
aws:
- branch: aws-batch
+ branch: aws
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker tag poldracklab/$CIRCLE_PROJECT_REPONAME:aws-$(node -p -e "require('./package.json').version") poldracklab/$CIRCLE_PROJECT_REPONAME:aws-latest
| 10 |
diff --git a/src/post/postSingle/PostSingleModal.js b/src/post/postSingle/PostSingleModal.js @@ -66,14 +66,18 @@ export default class PostSingleModal extends Component {
window.history.pushState({}, content.title, content.url);
};
+ replaceUrlState = (content) => {
+ window.history.replaceState({}, content.title, content.url);
+ };
+
jumpToNextStory = () => {
this.props.openPostModal(this.props.nextStory.id);
- this.pushUrlState(this.props.nextStory);
+ this.replaceUrlState(this.props.nextStory);
};
jumpToPrevStory = () => {
this.props.openPostModal(this.props.prevStory.id);
- this.pushUrlState(this.props.prevStory);
+ this.replaceUrlState(this.props.prevStory);
};
render() {
| 1 |
diff --git a/layouts/partials/fragments/list.html b/layouts/partials/fragments/list.html ">
{{ partial "helpers/slot.html" (dict "root" $ "slot" "before-content")}}
{{- range first (.Params.count | default 10) (.page_scratch.Get "pages") -}}
- {{ partial "helpers/slot.html" (dict "root" $ "slot" "before-item")}}
{{- $page := . -}}
{{- $self.page_scratch.Set "article_page_fragments" (slice .) -}}
{{- range .Resources.ByType "page" -}}
{{- end -}}
{{- $content_page := first 1 (where ($self.page_scratch.Get "article_page_fragments") "Params.fragment" "in" "content") -}}
{{- $display_summary := or (not (isset $self.Params "summary")) (eq $self.Params.summary true) -}}
+ {{ partial "helpers/slot.html" (dict "root" $ "slot" "before-item" "data" (dict "page" $page "content_fragment" $content_page))}}
{{- if $self.Params.tiled -}}
<div class="col-lg-6 col-12 mb-2 d-flex">
{{- end -}}
{{- if $self.Params.tiled }}
</div>
{{- end -}}
- {{ partial "helpers/slot.html" (dict "root" $ "slot" "after-item")}}
+ {{ partial "helpers/slot.html" (dict "root" $ "slot" "after-item" "data" (dict "page" $page "content_fragment" $content_page))}}
{{- end }}
</div>
{{ partial "helpers/slot.html" (dict "root" $ "slot" "after-content")}}
| 0 |
diff --git a/app/routes/application.js b/app/routes/application.js @@ -14,10 +14,13 @@ export default Route.extend(ApplicationRouteMixin, {
return tokens.join(' | ');
},
- async beforeModel() {
+ async beforeModel(transition) {
this._super(...arguments);
await this.get('authManager').initialize();
await this.get('settings').initialize();
+ if (!transition.intent.url.includes('login')) {
+ this.set('session.previousRouteName', transition.intent.url);
+ }
},
async model() {
@@ -78,7 +81,6 @@ export default Route.extend(ApplicationRouteMixin, {
transition.then(() => {
let params = this._mergeParams(transition.params);
let url;
-
// generate doesn't like empty params.
if (isEmpty(params)) {
url = transition.router.generate(transition.targetName);
| 12 |
diff --git a/config/canonical.json b/config/canonical.json },
"amenity/fuel|United": {
"count": 221,
+ "match": [
+ "amenity/fuel|United Petroleum"
+ ],
"nomatch": ["amenity/bank|United Bank"],
"tags": {
"amenity": "fuel",
"brand": "United",
+ "brand:wikidata": "Q28224393",
+ "brand:wikipedia": "en:United Petroleum",
"name": "United"
}
},
| 7 |
diff --git a/contribs/gmf/apps/desktop_alt/index.html b/contribs/gmf/apps/desktop_alt/index.html <span class="caret"></span>
</a>
<div class="import">
- <div>local</div>
+ <div>Local</div>
<div class="import-local"
ngeo-import-local
ngeo-import-local-options="::mainCtrl.importOptions">
</div>
- <div>online</div>
+ <div>Online</div>
<div
ngeo-import-online
ngeo-import-online-options="::mainCtrl.importOptions">
| 4 |
diff --git a/lib/plugin/gitlab/GitLab.js b/lib/plugin/gitlab/GitLab.js @@ -43,8 +43,8 @@ class GitLab extends Release {
throw new Error(`Could not authenticate with GitLab using environment variable "${this.options.tokenRef}".`);
}
if (!(await this.isCollaborator())) {
- const { username, repo } = this.getContext();
- throw new Error(`User ${username} is not a collaborator for ${repo.repository}.`);
+ const { user, repo } = this.getContext();
+ throw new Error(`User ${user.username} is not a collaborator for ${repo.repository}.`);
}
}
@@ -53,7 +53,7 @@ class GitLab extends Release {
const endpoint = `user`;
try {
const { id, username } = await this.request(endpoint, { method: 'GET' });
- this.setContext({ id, username });
+ this.setContext({ user: { id, username } });
return true;
} catch (err) {
this.debug(err);
@@ -63,7 +63,7 @@ class GitLab extends Release {
async isCollaborator() {
if (this.global.isDryRun) return true;
- const { id } = this.getContext();
+ const { id } = this.getContext('user');
const endpoint = `projects/${this.id}/members/all/${id}`;
try {
const user = await this.request(endpoint, { method: 'GET' });
| 7 |
diff --git a/test/Synthetix.js b/test/Synthetix.js @@ -11,12 +11,11 @@ const {
multiplyDecimal,
divideDecimal,
toUnit,
- fromUnit,
ZERO_ADDRESS,
} = require('../utils/testUtils');
contract('Synthetix', async function(accounts) {
- const [sUSD, sAUD, sEUR, SNX, XDR, sXYZ] = ['sUSD', 'sAUD', 'sEUR', 'SNX', 'XDR', 'sXYZ'].map(
+ const [sUSD, sAUD, sEUR, SNX, sXYZ] = ['sUSD', 'sAUD', 'sEUR', 'SNX', 'sXYZ'].map(
web3.utils.asciiToHex
);
| 1 |
diff --git a/src/js/base/module/Clipboard.js b/src/js/base/module/Clipboard.js @@ -58,7 +58,8 @@ define([
this.pasteByHook = function () {
var node = this.$paste[0].firstChild;
- if (dom.isImg(node) && node.src.startsWith('data:')) {
+ var src = node && node.src;
+ if (dom.isImg(node) && src.indexOf('data:') === 0) {
var decodedData = atob(node.src.split(',')[1]);
var array = new Uint8Array(decodedData.length);
for (var i = 0; i < decodedData.length; i++) {
| 14 |
diff --git a/lib/plugins/team.js b/lib/plugins/team.js @@ -29,8 +29,11 @@ function inject (bot) {
}
if (team !== undefined) {
if (mode === 1) {
- bot.emit('teamRemoved', teams[teamName])
+ team.members.forEach(member => {
+ delete bot.teamMap[member]
+ })
delete teams[teamName]
+ bot.emit('teamRemoved', teams[teamName])
}
if (mode === 2) {
team.update(
| 2 |
diff --git a/docs/sphinx_greenlight_instructions.md b/docs/sphinx_greenlight_instructions.md @@ -23,7 +23,7 @@ The sha256 of the zip file you will download from us is the following:
On macOS, you can check it by running this command in the directory where you have the file:
-`shasum -a 256 sphinx_greenlight_0_3.img.zip`
+`shasum -a 256 sphinx_greenlight_0_5.img.zip`
## Backing Up Your Funds and Data
| 3 |
diff --git a/src/pages/EnterpriseShared/AppExporter.js b/src/pages/EnterpriseShared/AppExporter.js @@ -29,6 +29,10 @@ export default class AppExporter extends PureComponent {
};
}
componentDidMount() {
+ const { exportVersionList, exportVersion } = this.state;
+ if (exportVersionList && exportVersionList.length > 0 && exportVersion) {
+ this.handleVersionInfo();
+ }
this.queryExport();
}
getDockerComposeAppShow = () => {
@@ -176,14 +180,16 @@ export default class AppExporter extends PureComponent {
};
handleVersionInfo = () => {
const { exportVersionList, exportVersion } = this.state;
+ if (exportVersion && exportVersion.length > 0) {
const currentVersionInfo = exportVersionList.filter(
- (item) => item.version === exportVersion
+ (item) => item.version === exportVersion[0]
);
if (currentVersionInfo.length > 0) {
this.setState({
versionInfo: currentVersionInfo[0]
});
}
+ }
};
handleRelease = (type) => {
| 1 |
diff --git a/assets/js/components/Root/index.js b/assets/js/components/Root/index.js @@ -31,7 +31,7 @@ import { enabledFeatures } from '../../features';
import PermissionsModal from '../PermissionsModal';
import RestoreSnapshots from '../RestoreSnapshots';
import CollectModuleData from '../data/collect-module-data';
-import FeatureTours from '../FeatureTours';
+import { FeatureToursDesktop } from '../FeatureToursDesktop';
export default function Root( {
children,
@@ -47,7 +47,12 @@ export default function Root( {
<ErrorHandler>
<RestoreSnapshots>
{ children }
- { viewContext && <FeatureTours viewContext={ viewContext } /> }
+ { /*
+ TODO: Replace `FeatureToursDesktop` with `FeatureTours`
+ once tour conflicts in smaller viewports are resolved.
+ @see https://github.com/google/site-kit-wp/issues/3003
+ */ }
+ { viewContext && <FeatureToursDesktop viewContext={ viewContext } /> }
{ dataAPIContext && (
// Legacy dataAPI support.
<CollectModuleData context={ dataAPIContext } args={ dataAPIModuleArgs } />
| 14 |
diff --git a/generators/server/templates/src/main/java/package/config/Constants.java.ejs b/generators/server/templates/src/main/java/package/config/Constants.java.ejs @@ -25,7 +25,7 @@ public final class Constants {
<%_ if (!skipUserManagement || authenticationType === 'oauth2') { _%>
// Regex for acceptable logins
- public static final String LOGIN_REGEX = "^[a-zA-Z0-9!#$%&'*+=?^_`{|}~.-]+@?[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$";
+ public static final String LOGIN_REGEX = "^[a-zA-Z0-9!#$&'*+=?^_`{|}~.-]+@?[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$";
<%_ } _%>
<%_ if (!skipUserManagement || authenticationType === 'oauth2' || ['sql','mongodb','couchbase'].includes(databaseType)) { _%>
| 2 |
diff --git a/assets/js/components/surveys/SurveyQuestionRating.stories.js b/assets/js/components/surveys/SurveyQuestionRating.stories.js @@ -50,8 +50,7 @@ SurveyQuestionRatingStory.args = {
},
],
answerQuestion: ( answer ) => {
- global.console.log( `Clicked: ${ answer }` );
- global.console.log( answer );
+ global.console.log( 'Clicked', answer );
},
dismissSurvey: () => {
global.console.log( 'Dismissed Survey' );
| 2 |
diff --git a/src/components/Navigation/Topnav.js b/src/components/Navigation/Topnav.js import React, { PropTypes } from 'react';
import { Link } from 'react-router';
-import { Menu, Popover, Icon, Input } from 'antd';
+import { Menu, Popover, Input } from 'antd';
import Avatar from '../Avatar';
import './Topnav.less';
| 2 |
diff --git a/lib/plugins/analysisstorer/index.js b/lib/plugins/analysisstorer/index.js @@ -26,7 +26,8 @@ function shouldIgnoreMessage(message) {
'html.pug',
's3.finished',
'gcs.finished',
- 'ftp.finished'
+ 'ftp.finished',
+ 'graphite.setup'
].indexOf(message.type) >= 0
);
}
| 8 |
diff --git a/src/reducers/account/index.js b/src/reducers/account/index.js @@ -15,7 +15,8 @@ import {
getBalance,
selectAccount,
setLocalStorage,
- getAccountBalance
+ getAccountBalance,
+ setAccountBalance
} from '../../actions/account'
import {
@@ -178,6 +179,15 @@ const account = handleActions({
[meta.accountId]: payload
}
},
+ [setAccountBalance]: (state, { payload }) => ({
+ ...state,
+ accountsBalance: {
+ ...state.accountsBalance,
+ [payload]: {
+ loading: true
+ }
+ }
+ })
}, initialState)
export default reduceReducers(
| 9 |
diff --git a/source/components/NumericInput.js b/source/components/NumericInput.js @@ -101,7 +101,7 @@ export default class NumericInput extends FormField {
if (splitedValue.length === 3) {
// input value contains more than one dot
const splitedOldValue = this.state.oldValue.split('.');
- if (splitedOldValue[0] <= splitedValue[0]) {
+ if (splitedOldValue[0].length <= splitedValue[0].length) {
// dot is in decimal part
position = position - 1;
}
| 9 |
diff --git a/server.coffee b/server.coffee @@ -813,6 +813,7 @@ class FilesCollection
@name load
@param {String} url - URL to file
@param {Object} opts - Object with file-data
+ @param {Object} opts.headers - HTTP headers to use when requesting the file
@param {String} opts.name - File name, alias: `fileName`
@param {String} opts.type - File mime-type
@param {Object} opts.meta - File additional meta-data
@@ -868,7 +869,10 @@ class FilesCollection
return
return
- request.get(url).on('error', (error)-> bound ->
+ request.get(
+ url: url
+ headers: opts.headers or {}
+ ).on('error', (error)-> bound ->
callback and callback error
self._debug "[FilesCollection] [load] [request.get(#{url})] Error:", error
).on('response', (response) -> bound ->
| 11 |
diff --git a/lib/tasks/result_monitor.rake b/lib/tasks/result_monitor.rake @@ -66,7 +66,7 @@ class MonitorPipelineResults
samples = Sample.current_stalled_local_uploads(18.hours)
unless samples.empty?
Rails.logger.error(
- "SampleFailedEvent: Failed to upload local samples after 18 hours #{samples.pluck(:id)}"
+ "UploadFailedEvent: Failed to upload local samples after 18 hours #{samples.pluck(:id)}"
)
samples.update_all( # rubocop:disable Rails/SkipsModelValidations
status: Sample::STATUS_CHECKED,
| 10 |
diff --git a/tests/e2e/config/bootstrap.js b/tests/e2e/config/bootstrap.js @@ -201,18 +201,6 @@ function observeRestRequest( req ) {
// eslint-disable-next-line no-console
console.log( '>>>', req.method(), req.url(), req.postData() );
}
- if ( req.url().match( 'google-site-kit/v1/data/' ) ) {
- const rawBatchRequest = getQueryArg( req.url(), 'request' );
- try {
- const batchRequests = JSON.parse( rawBatchRequest );
- if ( Array.isArray( batchRequests ) ) {
- batchRequests.forEach( ( r ) => {
- // eslint-disable-next-line no-console
- console.log( '>>>', r.key, r.data );
- } );
- }
- } catch {}
- }
}
/**
| 2 |
diff --git a/magda-int-test/src/test/scala/au/csiro/data61/magda/test/util/MagdaGeneratorTest.scala b/magda-int-test/src/test/scala/au/csiro/data61/magda/test/util/MagdaGeneratorTest.scala @@ -5,7 +5,7 @@ import org.scalactic.anyvals.PosInt
import org.scalatest.prop.GeneratorDrivenPropertyChecks
trait MagdaGeneratorTest extends GeneratorDrivenPropertyChecks {
- val processors = Math.max(2, if (ContinuousIntegration.isCi) Runtime.getRuntime.availableProcessors - 1 else Runtime.getRuntime.availableProcessors - 1)
+ val processors = Math.max(2, if (ContinuousIntegration.isCi) Runtime.getRuntime.availableProcessors - 2 else Runtime.getRuntime.availableProcessors - 1)
val minSuccessful = if (ContinuousIntegration.isCi) 50 else 50
implicit override val generatorDrivenConfig: PropertyCheckConfiguration =
PropertyCheckConfiguration(workers = PosInt.from(processors).get, sizeRange = 50, minSuccessful = PosInt.from(minSuccessful).get)
| 12 |
diff --git a/client/src/components/graph/graph.js b/client/src/components/graph/graph.js @@ -6,6 +6,7 @@ import { mat3, vec2 } from "gl-matrix";
import _regl from "regl";
import memoize from "memoize-one";
import Async from "react-async";
+import { Button } from "@blueprintjs/core";
import setupSVGandBrushElements from "./setupSVGandBrush";
import _camera from "../../util/camera";
@@ -28,7 +29,6 @@ Simple 2D transforms control all point painting. There are three:
* camera - apply a 2D camera transformation (pan, zoom)
* projection - apply any transformation required for screen size and layout
*/
-
function createProjectionTF(viewportWidth, viewportHeight) {
/*
the projection transform accounts for the screen size & other layout
@@ -884,7 +884,13 @@ class Graph extends React.Component {
viewport,
}}
>
- <Async.Pending initial>Embedding loading...</Async.Pending>
+ <Async.Pending initial>
+ <StillLoading
+ displayName={layoutChoice.current}
+ width={viewport.width}
+ height={viewport.height}
+ />
+ </Async.Pending>
<Async.Rejected>
{(error) => (
<ErrorLoading
@@ -925,4 +931,32 @@ const ErrorLoading = ({ displayName, error, width, height }) => {
);
};
+const StillLoading = ({ displayName, width, height }) => {
+ /*
+ Render a busy/loading indicator
+ */
+ return (
+ <div
+ style={{
+ position: "fixed",
+ fontWeight: 500,
+ top: height / 2,
+ width,
+ }}
+ >
+ <div
+ style={{
+ display: "flex",
+ justifyContent: "center",
+ justifyItems: "center",
+ alignItems: "center",
+ }}
+ >
+ <Button minimal loading intent="primary" />
+ <span style={{ fontStyle: "italic" }}>Loading {displayName}</span>
+ </div>
+ </div>
+ );
+};
+
export default Graph;
| 7 |
diff --git a/package.json b/package.json "scripts": {
"check-links": "npx check-html-links _site",
"build": "npx @11ty/eleventy",
- "start": "npx @11ty/eleventy --serve",
+ "start": "npx @11ty/eleventy --serve --port=8091",
"build-production": "npm run get-new-data && NODE_ENV=production npx @11ty/eleventy",
"get-new-data": "rm -rf ./src/_data/builtwith/ && npx degit github:11ty/11ty-community/built-with-eleventy src/_data/builtwith/",
"get-new-supporters": "eleventy && node node-supporters",
| 4 |
diff --git a/lib/iob/history.js b/lib/iob/history.js @@ -265,7 +265,11 @@ function calcTempTreatments (inputs, zeroTempDuration) {
var temp = current;
current = temp.bolus;
}
+ if (current.created_at) {
+ current.timestamp = current.created_at;
+ }
var currentRecordTime = new Date(tz(current.timestamp));
+ //console.error(current);
//console.error(currentRecordTime,lastRecordTime);
// ignore duplicate or out-of-order records (due to 1h and 24h overlap, or timezone changes)
if (currentRecordTime > lastRecordTime) {
| 12 |
diff --git a/public/javascripts/SVLabel/src/SVLabel/mission/MissionProgress.js b/public/javascripts/SVLabel/src/SVLabel/mission/MissionProgress.js @@ -93,7 +93,7 @@ function MissionProgress (svl, gameEffectModel, missionModel, modalModel, neighb
// 1. User has completed numMissionsBeforeSurvey number of missions
// 2. The user has just completed more than 30% of the current mission
// 3. The user has not been shown the survey before
- if (completionRate > 0.30 && completionRate < 0.60) {
+ if (completionRate > 0.3 && completionRate < 0.9) {
$.ajax({
async: true,
url: '/survey/display',
| 3 |
diff --git a/README.md b/README.md @@ -54,24 +54,37 @@ Bitcore-Node can access a bitcore.config.json file from
```
{
"bitcoreNode": {
+ "dbHost": "OPTIONAL IP FOR REMOTE DB",
"pruneSpentScripts": true,
"chains": {
"BTC": {
- "regtest": {
+ "mainnet": {
"chainSource": "p2p",
"trustedPeers": [
{
"host": "127.0.0.1",
- "port": 30000
+ "port": 8333
}
],
"rpc": {
"host": "127.0.0.1",
- "port": 30001,
- "username": "bitpaytest",
- "password": "local321"
+ "port": 44444,
+ "username": "RPCUSER",
+ "password": "RPCPASS"
}
}
+ },
+ "BCH": {
+ "mainnet": {
+ "parentChain": "BTC",
+ "forkHeight": 478558,
+ "trustedPeers": [
+ {
+ "host": "127.0.0.1",
+ "port": 8433
+ }
+ ]
+ }
}
}
}
| 3 |
diff --git a/app/tasks/install.php b/app/tasks/install.php @@ -214,9 +214,9 @@ $cli
}
}
- Console::log("Running \"docker compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes\"");
+ Console::log("Running \"docker-compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes\"");
- $exit = Console::execute("${env} docker compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes", '', $stdout, $stderr);
+ $exit = Console::execute("${env} docker-compose -f {$path}/docker-compose.yml up -d --remove-orphans --renew-anon-volumes", '', $stdout, $stderr);
if ($exit !== 0) {
$message = 'Failed to install Appwrite dockers';
| 13 |
diff --git a/rendersettings-manager.js b/rendersettings-manager.js @@ -78,13 +78,35 @@ class RenderSettingsManager {
} = (renderSettings ?? {});
localPostProcessing.setPasses(passes);
}
- push(srcScene, dstScene = srcScene) {
+ push(srcScene, dstScene = srcScene, {
+ fog = false,
+ } = {}) {
const renderSettings = this.findRenderSettings(srcScene);
- // console.log('push render settings', renderSettings);
this.applyRenderSettingsToScene(renderSettings, dstScene);
+ const hideFog = fog === false && !!dstScene.fog;
+ let fogCleanup = null;
+ if (hideFog) {
+ if (dstScene.fog.isFog) {
+ const oldNear = dstScene.fog.near;
+ const oldFar = dstScene.fog.far;
+ dstScene.fog.near = Infinity;
+ dstScene.fog.far = Infinity;
+ fogCleanup = () => {
+ dstScene.fog.near = oldNear;
+ dstScene.fog.far = oldFar;
+ };
+ } else if (dstScene.fog.isFogExp2) {
+ const oldDensity = dstScene.fog.density;
+ dstScene.fog.density = 0;
+ fogCleanup = () => {
+ dstScene.fog.density = oldDensity;
+ };
+ }
+ }
+
return () => {
- // console.log('pop render settings');
+ fogCleanup && fogCleanup();
this.applyRenderSettingsToScene(null, dstScene);
};
}
| 0 |
diff --git a/userscript.user.js b/userscript.user.js @@ -1660,7 +1660,7 @@ var $$IMU_EXPORT$$;
mouseover_styles: "",
mouseover_fade_time: 100,
mouseover_enable_mask_styles: false,
- mouseover_mask_styles2: "",
+ mouseover_mask_styles2: "background-color: rgba(0, 0, 0, 0.5)",
mouseover_mask_fade_time: 100,
mouseover_ui_styles: "",
// thanks to decembre on github for the idea: https://github.com/qsniyg/maxurl/issues/14#issuecomment-541065461
| 12 |
diff --git a/src/components/Forms/Subscribe.js b/src/components/Forms/Subscribe.js @@ -23,11 +23,18 @@ const SignUp = ({ subscribed = false }) => (
}}
validationSchema={SubscribeSchema}
onSubmit={values => {
- setTimeout(() => {
- alert(JSON.stringify(values, null, 2))
- }, 500)
+ // setTimeout(() => {
+ // alert(JSON.stringify(values, null, 2))
+ // }, 500)
+ fetch('https://app.convertkit.com/forms/834199/subscriptions', {
+ method: 'post',
+ body: JSON.stringify(values, null, 2),
+ headers: {
+ Accept: 'application/json',
+ 'Content-Type': 'application/json',
+ },
+ })
}}
- // https://app.convertkit.com/forms/834199/subscriptions
render={({ errors, touched }) => (
<Form>
<label htmlFor="first_name">First Name</label>
| 12 |
diff --git a/articles/security/bulletins/cve-2018-7307.md b/articles/security/bulletins/cve-2018-7307.md ---
title: Auth0 Security Bulletin CVE 2018-7307
description: Details about a security vulnerability identified for auth0.js < 9.3
-toc: true
---
# Security Vulnerability for auth0.js < 9.3
| 2 |
diff --git a/src/media/RPA Workshop.md b/src/media/RPA Workshop.md @@ -3,7 +3,7 @@ TagUI is a CLI tool for automating user interactions. This branch of automation
For more information on TagUI, visit its [repository page](https://github.com/kelaberetiv/TagUI). TagUI is now maintained by [AI Singapore](https://www.aisingapore.org), a government-funded initiative to build local artificial intelligence capabilities. The intention is to add AI capabilities to TagUI while keeping it open-source and free to use.
# [Setup](https://github.com/kelaberetiv/TagUI#set-up)
-In this section, we'll download and install TagUI on your computer.
+*In this section, we'll download and install TagUI on your computer. For Windows, unzip the tagui folder to c:\ and for macOS, unzip the tagui folder to your desktop. For Linux, unzip the tagui folder to a convenient folder on your laptop.*
### INSTALLATION (10 minutes)
No setup is needed, in most environments all required dependencies are packaged in.
@@ -19,7 +19,7 @@ Optional - configure web browser settings in tagui_config.txt, such as browser r

# [Using it (guided)](https://github.com/kelaberetiv/TagUI#to-use)
-In this section, we'll have a guided walkthrough on running TagUI, using its Chrome extension, and some examples.
+*In this section, we'll have a guided walkthrough on running TagUI, using its Chrome extension, and some examples.*
### COMMAND LINE (10 minutes)
```
@@ -111,7 +111,7 @@ Flow Sample |Purpose
[9_misc](https://github.com/tebelorg/TagUI/blob/master/src/samples/9_misc)|shows how to use steps popup, frame, dom, js, { and } block
# [Using it (flexible)](https://github.com/kelaberetiv/TagUI#to-use)
-In this section, we'll spend some time exploring a particular feature of TagUI that you'll like to try out.
+*In this section, we'll spend some time exploring a particular feature of TagUI that you'll like to try out.*
### OPTION 1 - STEPS DESCRIPTION (15 minutes)
- TagUI auto-waits for a webpage element to appear and interacts with it as soon as it appears
@@ -316,7 +316,7 @@ TagUI scripts are already in natural-language-like syntax to convert to JavaScri
</details>
# [Scripting Reference](https://github.com/kelaberetiv/TagUI#cheat-sheet)
-Click above link to see the list of TagUI steps and other advanced features.
+*Click above link to see the list of TagUI steps and other advanced features.*
# [Developers Reference](https://github.com/kelaberetiv/TagUI#developers-reference)
-Click above link to see information on APIs and summary of various TagUI files.
+*Click above link to see information on APIs and summary of various TagUI files.*
| 7 |
diff --git a/generators/generator-constants.js b/generators/generator-constants.js @@ -22,8 +22,8 @@ const JAVA_VERSION = '1.8'; // Java version is forced to be 1.8. We keep the var
// Version of Node, Yarn, NPM
const NODE_VERSION = '12.13.1';
-const YARN_VERSION = '1.19.2';
-const NPM_VERSION = '6.13.2';
+const YARN_VERSION = '1.21.1';
+const NPM_VERSION = '6.13.4';
const GRADLE_VERSION = '6.0.1';
| 3 |
diff --git a/src/libs/Pusher/pusher.js b/src/libs/Pusher/pusher.js @@ -5,14 +5,14 @@ import Pusher from './library';
import TYPE from './EventType';
import Log from '../Log';
-let shouldForceOffline = false;
+let isOffline = false;
Onyx.connect({
key: ONYXKEYS.NETWORK,
callback: (network) => {
if (!network) {
return;
}
- shouldForceOffline = Boolean(network.shouldForceOffline);
+ isOffline = Boolean(network.shouldForceOffline) || network.isOffline;
},
});
@@ -125,8 +125,8 @@ function bindEventToChannel(channel, eventName, eventCallback = () => {}) {
const chunkedDataEvents = {};
const callback = (eventData) => {
- if (shouldForceOffline) {
- Log.info('[Pusher] Ignoring a Push event because shouldForceOffline = true');
+ if (isOffline) {
+ Log.info('[Pusher] Ignoring Push event because isOffline = true');
return;
}
| 8 |
diff --git a/js/jquery.terminal.d.ts b/js/jquery.terminal.d.ts @@ -89,8 +89,8 @@ declare namespace JQueryTerminal {
type commandsCmdFunction = (command: string) => any;
type echoValue = string | string[] | (() => string | string[]);
type setStringFunction = (value: string) => void;
- type setEchoValueFunction = (value: echoValue) => void;
- type greetingsArg = ((this: JQueryTerminal, setGreeting: setStringFunction) => void) | string;
+ type setEchoValueFunction = (value: TypeOrPromise<echoValue>) => void;
+ type greetingsArg = ((this: JQueryTerminal, setGreeting: setEchoValueFunction) => void) | string;
type cmdPrompt = ((setPrompt: setStringFunction) => void) | string;
type ExtendedPrompt = ((this: JQueryTerminal, setPrompt: setStringFunction) => (void | PromiseLike<string>)) | string;
| 7 |
diff --git a/blots/embed.js b/blots/embed.js import Parchment from 'parchment';
+import TextBlot from './text';
+
+const GUARD_TEXT = "\uFEFF";
class Embed extends Parchment.Embed { }
@@ -12,8 +15,8 @@ class InlineEmbed extends Embed {
[].slice.call(this.domNode.childNodes).forEach(function(childNode) {
wrapper.appendChild(childNode);
});
- this.leftGuard = document.createTextNode("\uFEFF");
- this.rightGuard = document.createTextNode("\uFEFF");
+ this.leftGuard = document.createTextNode(GUARD_TEXT);
+ this.rightGuard = document.createTextNode(GUARD_TEXT);
this.domNode.appendChild(this.leftGuard);
this.domNode.appendChild(wrapper);
this.domNode.appendChild(this.rightGuard);
@@ -24,6 +27,38 @@ class InlineEmbed extends Embed {
if (node === this.rightGuard) return 1;
return super.index(node, offset);
}
+
+ restore(node) {
+ let text, textNode;
+ if (node === this.leftGuard) {
+ text = this.leftGuard.data.split(GUARD_TEXT).join('');
+ if (this.prev instanceof TextBlot) {
+ this.prev.insertAt(this.prev.length(), text);
+ } else {
+ textNode = document.createTextNode(text);
+ this.parent.insertBefore(Parchment.create(textNode), this);
+ }
+ this.leftGuard.data = GUARD_TEXT;
+ } else if (node === this.rightGuard) {
+ text = this.rightGuard.data.split(GUARD_TEXT).join('');
+ if (this.next instanceof TextBlot) {
+ this.next.insertAt(0, text);
+ } else {
+ textNode = document.createTextNode(text);
+ this.parent.insertBefore(Parchment.create(textNode), this.next);
+ }
+ this.rightGuard.data = GUARD_TEXT;
+ }
+ }
+
+ update(mutations) {
+ mutations.forEach((mutation) => {
+ if (mutation.type === 'characterData' &&
+ (mutation.target === this.leftGuard || mutation.target === this.rightGuard)) {
+ this.restore(mutation.target);
+ }
+ });
+ }
}
| 9 |
diff --git a/packages/node_modules/@node-red/nodes/core/storage/10-file.html b/packages/node_modules/@node-red/nodes/core/storage/10-file.html </div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
- <input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
+ <input type="text" id="node-input-name">
</div>
<div class="form-tips"><span data-i18n="file.tip"></span></div>
</script>
<script type="text/html" data-template-name="file in">
<div class="form-row">
<label for="node-input-filename"><i class="fa fa-file"></i> <span data-i18n="file.label.filename"></span></label>
- <input id="node-input-filename" type="text" data-i18n="[placeholder]file.label.filename">
+ <input id="node-input-filename" type="text">
<input type="hidden" id="node-input-filenameType">
</div>
<div class="form-row">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
- <input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
+ <input type="text" id="node-input-name">
</div>
<div class="form-tips"><span data-i18n="file.tip"></span></div>
</script>
| 2 |
diff --git a/src/generators/tailwind.js b/src/generators/tailwind.js @@ -8,6 +8,8 @@ const postcssNested = require('postcss-nested')
const mergeLonghand = require('postcss-merge-longhand')
const purgecss = require('@fullhuman/postcss-purgecss')
+const defaultPurgeCSSExtractor = /[\w-/:%]+(?<!:)/g
+
module.exports = {
fromFile: async (config, env) => {
try {
@@ -22,7 +24,7 @@ module.exports = {
...extraPurgeSources
]
- const extractor = purgeCSSOpts.extractor || /[\w-/:]+(?<!:)/g
+ const extractor = purgeCSSOpts.extractor || defaultPurgeCSSExtractor
const purgeWhitelist = purgeCSSOpts.whitelist || []
const purgewhitelistPatterns = purgeCSSOpts.whitelistPatterns || []
@@ -61,7 +63,7 @@ module.exports = {
try {
const tailwindPlugin = typeof tailwindConfig === 'object' ? tailwind(tailwindConfig) : tailwind()
- const extractor = maizzleConfig.cleanup.purgeCSS.extractor || /[\w-/:]+(?<!:)/g
+ const extractor = maizzleConfig.cleanup.purgeCSS.extractor || defaultPurgeCSSExtractor
const purgeContent = maizzleConfig.cleanup.purgeCSS.content || []
const purgeWhitelist = maizzleConfig.cleanup.purgeCSS.whitelist || []
const purgewhitelistPatterns = maizzleConfig.cleanup.purgeCSS.whitelistPatterns || []
| 0 |
diff --git a/src/encoded/static/components/award.js b/src/encoded/static/components/award.js @@ -39,12 +39,15 @@ function generateQuery(chosenOrganisms, searchTerm) {
// Draw the total chart count in the middle of the donut.
function drawDonutCenter(chart) {
- const data = chart.data.datasets[0].data;
- if (data.length) {
+ const canvasId = chart.chart.canvas.id;
const width = chart.chart.width;
const height = chart.chart.height;
const ctx = chart.chart.ctx;
-
+ if (canvasId === 'myGraph') {
+ ctx.clearRect(0, 0, width, height);
+ } else {
+ const data = chart.data.datasets[0].data;
+ if (data.length) {
ctx.fillStyle = '#000000';
ctx.restore();
const fontSize = (height / 114).toFixed(2);
@@ -60,6 +63,7 @@ function drawDonutCenter(chart) {
ctx.save();
}
}
+}
// Create a chart in the div.
@@ -924,13 +928,8 @@ class PleaseWork extends React.Component {
componentDidMount() {
require.ensure(['chart.js'], (require) => {
const Chart = require('chart.js');
- // const canvas = this.refs.myChart;
- // const parent = this.refs.myChart;
- // canvas.width = parent.offsetWidth;
- // canvas.height = parent.offsetHeight;
- // canvas.style.width = `${parent.offsetWidth}px`;
- // canvas.style.height = `${parent.offsetHeight}px`;
- const ctx = document.getElementById('myChart').getContext('2d');
+ const ctx = document.getElementById('myGraph').getContext('2d');
+
this.chart = new Chart(ctx, {
type: 'line',
data: {
@@ -941,7 +940,7 @@ class PleaseWork extends React.Component {
backgroundColor: 'rgba(153,255,51,0.6)',
}, {
label: 'oranges',
- data: [2, 29, 5, 5, 2, 3, 10],
+ data: [2, 40, 5, 5, 37, 20, 10],
backgroundColor: 'rgba(255,153,0,0.6)',
}],
},
@@ -951,7 +950,7 @@ class PleaseWork extends React.Component {
render() {
return (
- <canvas id="myChart" />
+ <canvas id="myGraph" />
);
}
}
| 2 |
diff --git a/CHANGELOG.md b/CHANGELOG.md # Buttercup browser extension changelog
+## v2.25.2
+_2022-09-03_
+
+ * **Bugfix**:
+ * Fixed Dropbox connectivity issues
+ * Fixed Google Drive re-authentication loop, short auth time
+
## v2.25.1
_2022-08-16_
| 6 |
diff --git a/lib/assets/core/javascripts/cartodb3/editor/export-image-pane/export-image-pane.js b/lib/assets/core/javascripts/cartodb3/editor/export-image-pane/export-image-pane.js @@ -123,7 +123,7 @@ module.exports = CoreView.extend({
var format = this._exportImageFormModel.get('format');
- var url = vis.getStaticImageURL({
+ var url = vis.getStaticImageURL({ // eslint-disable-line
zoom: vis.map.getZoom(), // eslint-disable-line
width: this._exportImageFormModel.get('width'),
height: this._exportImageFormModel.get('height'),
@@ -134,7 +134,7 @@ module.exports = CoreView.extend({
this._getDataUri(url, format, function (dataUri) {
var link = document.createElement('a');
- link.download = 'map.' + format;
+ link.download = vis.get('title') + format; // eslint-disable-line
link.href = dataUri;
link.click();
self._footerView.stop();
| 3 |
diff --git a/src/components/accordion/accordion.js b/src/components/accordion/accordion.js @@ -49,6 +49,7 @@ Accordion.prototype.init = function () {
// Create "Open all" button and set attributes
this.$openAllButton = document.createElement('button')
+ this.$openAllButton.setAttribute('type', 'button')
this.setOpenAllButtonAttributes(this.$openAllButton)
// Create controls and set attributes
@@ -107,11 +108,18 @@ Accordion.prototype.isExpanded = function ($section) {
}
Accordion.prototype.setHeaderAttributes = function ($header, index) {
- $header.setAttribute('tabindex', '0')
-
var $button = $header.querySelector('.govuk-accordion__section-header-button')
- $button.setAttribute('aria-controls', this.moduleId + '-panel-' + (index + 1))
- $button.setAttribute('role', 'button')
+
+ // Copy existing div element to an actual button element, for improved accessibility.
+ // TODO: this probably needs to be more robust, and copy all attributes and child nodes?
+ var $buttonAsButton = document.createElement('button')
+ $buttonAsButton.setAttribute('class', $button.getAttribute('class'))
+ $buttonAsButton.setAttribute('type', 'button')
+ $buttonAsButton.setAttribute('id', this.moduleId + '-heading-' + (index + 1))
+ $buttonAsButton.setAttribute('aria-controls', this.moduleId + '-panel-' + (index + 1))
+ $buttonAsButton.textContent = $button.textContent
+ $header.removeChild($button)
+ $header.appendChild($buttonAsButton)
var icon = document.createElement('span')
icon.setAttribute('class', 'govuk-accordion--icon')
| 14 |
diff --git a/app/components/Settings/RestoreSettings.jsx b/app/components/Settings/RestoreSettings.jsx @@ -6,6 +6,9 @@ import Translate from "react-translate-component";
import counterpart from "counterpart";
import SettingsActions from "actions/SettingsActions";
import RestoreFavorites from "./RestoreFavorites";
+import {Button, Select} from "bitshares-ui-style-guide";
+
+const Option = Select.Option;
export default class RestoreSettings extends React.Component {
constructor() {
@@ -23,9 +26,9 @@ export default class RestoreSettings extends React.Component {
});
}
- _changeType(e) {
+ _changeType(value) {
this.setState({
- restoreType: this.state.types.indexOf(e.target.value)
+ restoreType: this.state.types.indexOf(value)
});
}
@@ -43,18 +46,22 @@ export default class RestoreSettings extends React.Component {
<Translate content="settings.wallet_required_text" />:
</p>
- <button className="button" onClick={this._setWalletMode}>
+ <Button
+ type="primary"
+ className="button"
+ onClick={this._setWalletMode}
+ >
<Translate content="settings.enable_wallet" />
- </button>
+ </Button>
</div>
);
}
let {types, restoreType} = this.state;
let options = types.map(type => {
return (
- <option key={type} value={type}>
+ <Option key={type} value={type}>
{counterpart.translate(`settings.backup_${type}`)}{" "}
- </option>
+ </Option>
);
});
@@ -95,13 +102,13 @@ export default class RestoreSettings extends React.Component {
return (
<div>
- <select
+ <Select
onChange={this._changeType.bind(this)}
className="bts-select"
value={types[restoreType]}
>
{options}
- </select>
+ </Select>
{content}
</div>
| 14 |
diff --git a/pages/releases.js b/pages/releases.js import React from 'react'
import styled from 'styled-components'
+import MDX from '@mdx-js/runtime'
import DocsLayout from '../components/DocsLayout'
import { getReleases } from '../utils/githubApi'
-import md from '../components/md'
import Anchor from '../components/Anchor'
import Loading from '../components/Loading'
import rem from '../utils/rem'
import { getFormattedDate } from '../utils/dates'
+import components from '../utils/mdx-components'
const ReleaseName = styled.span`
@@ -29,15 +30,13 @@ const Releases = ({ releases, sidebarPages }) => (
title="Releases"
description="Styled Components Releases"
>
- {md`
- Updating styled components is usually as simple as \`npm install\`. Only major versions have the potential to introduce breaking changes (noted in the following release notes).
- `}
+ <MDX components={components}>Updating styled components is usually as simple as \`npm install\`. Only major versions have the potential to introduce breaking changes (noted in the following release notes).</MDX>
{releases ? releases.map(release =>
<section key={release.id}>
<Anchor id={release.name}>
<ReleaseName>{release.name} <Date>{getFormattedDate(release.created_at)}</Date></ReleaseName>
</Anchor>
- {md(release.body, release.name, 3)}
+ <MDX components={components}>{release.body}</MDX>
</section>
) : <Loading />}
</DocsLayout>
| 5 |
diff --git a/workshops/arm/arm-lab4-conditions.md b/workshops/arm/arm-lab4-conditions.md @@ -34,7 +34,9 @@ Copy the lab3 directory and paste it into a blank area of the Explorer. Visual
Clear the outputs object. We'll cover the reason why later. It should be set to `"outputs": {}`
-Default the dnsLabelPrefix parameter to an empty string (`""`) in the main template and save it. If you were to submit now, your deployment should fail. (Feel free to test that.)
+Default the dnsLabelPrefix parameter to an empty string (`""`) in the main template and save it. Also remove the whole object from your parameters file so that you only have the adminUsername string and the adminPassword key vault reference remaining.
+
+If you were to submit now, your deployment should fail as your template requires a valid dnsLabelPrefix. Let's make the changes to add in the conditions.
## Creating booleans
| 7 |
diff --git a/lib/tests/test.js b/lib/tests/test.js @@ -72,6 +72,9 @@ class Test {
if (this.simOptions.accounts) {
this.simOptions.accounts = this.simOptions.accounts.map((account) => {
+ if (!account.hexBalance) {
+ account.hexBalance = '0x8AC7230489E80000'; // 10 ether
+ }
return {balance: account.hexBalance, secretKey: account.privateKey};
});
}
| 12 |
diff --git a/tests/phpunit/integration/PluginTest.php b/tests/phpunit/integration/PluginTest.php @@ -51,9 +51,6 @@ class PluginTest extends TestCase {
remove_all_actions( 'login_head' );
$GLOBALS['wp_actions'] = [];
- wp_schedule_event( time(), 'daily', 'googlesitekit_cron_daily', array( 'interval' => 'daily' ) );
- wp_schedule_event( time(), 'hourly', 'googlesitekit_cron_hourly', array( 'interval' => 'hourly' ) );
-
$plugin->register();
$this->assertActionRendersGeneratorTag( 'wp_head' );
| 2 |
diff --git a/distribution/client/test/storage.test.ts b/distribution/client/test/storage.test.ts @@ -57,12 +57,15 @@ describe('The storage module', () => {
mkdirp.sync(pluginPath);
filenames.forEach((filename) => {
fs.mkdirSync(`${pluginPath}/${filename}`)
+ h.touchFile(`${pluginPath}/${filename}/testfile`); // make sure we remove a directory with files
h.touchFile(`${pluginPath}/${filename}.hpi`);
expect(h.checkFileExists(`${pluginPath}/${filename}`)).resolves.toBeTruthy();
+ expect(h.checkFileExists(`${pluginPath}/${filename}/testfile`)).resolves.toBeTruthy();
expect(h.checkFileExists(`${pluginPath}/${filename}.hpi`)).resolves.toBeTruthy();
});
await Storage.removePlugins(filenames);
filenames.forEach((filename) => {
+ expect(h.checkFileExists(`${pluginPath}/${filename}/testfile`)).resolves.toBeFalsy();
expect(h.checkFileExists(`${pluginPath}/${filename}`)).resolves.toBeFalsy();
expect(h.checkFileExists(`${pluginPath}/${filename}.hpi`)).resolves.toBeFalsy();
});
| 3 |
diff --git a/extensions/file/README.md b/extensions/file/README.md @@ -32,6 +32,8 @@ Please be aware that the integer values (always unsigned) given for the sizes (e
### Data Types
+The allowed values for `file:data_type` are:
+
- `int8`: 8-bit integer
- `int16`: 16-bit integer
- `int32`: 32-bit integer
@@ -49,9 +51,9 @@ Please be aware that the integer values (always unsigned) given for the sizes (e
### Checksums
-`file:checksum` was previously defined in the `checksum` extension and the field name was `checksum:multihash` before STAC v1.0.0-beta.3. The specification of the field has not changed.
+`file:checksum` was previously defined in the [`checksum` extension](https://github.com/radiantearth/stac-spec/blob/v1.0.0-beta.2/extensions/checksum/README.md) and the field name was `checksum:multihash` before STAC v1.0.0-beta.3. The specification of the field has not changed.
-Checksum examples for some algorithms supported by Multihash in `file:checksum`. The examples are given for a text file with file content `test`.
+Checksum examples for some algorithms supported by [Multihash](https://github.com/multiformats/multihash) in `file:checksum`. The examples are given for a text file with file content `test`.
- Algorithm `sha1` (160 bits): `1114a94a8fe5ccb19ba61c4c0873d391e987982fbbd3`
- Algorithm `sha2` (256 bits): `12209f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08`
| 0 |
diff --git a/src/inner-slider.js b/src/inner-slider.js @@ -153,16 +153,18 @@ export class InnerSlider extends React.Component {
if (!image.onclick) {
image.onclick = () => image.parentNode.focus()
} else {
- const prevClick = image.onclick
+ const prevClickHandler = image.onclick
image.onclick = () => {
- prevClick()
+ prevClickHandler()
image.parentNode.focus()
}
}
if (!image.onload) {
if (this.props.lazyLoad) {
- image.onload = () => this.adaptHeight() ||
+ image.onload = () => {
+ this.adaptHeight()
setTimeout(this.onWindowResized, this.props.speed)
+ }
} else {
image.onload = handler
image.onerror = () => {
| 10 |
diff --git a/src/web/routes/api/index.js b/src/web/routes/api/index.js @@ -4,6 +4,7 @@ const api = express.Router()
const rateLimit = require('express-rate-limit')
const controllers = require('../../controllers/index.js')
const createError = require('../../util/createError.js')
+const createLogger = require('../../../util/logger/create.js')
const Joi = require('@hapi/joi')
const validator = require('express-joi-validation').createValidator({
passError: true
@@ -47,8 +48,8 @@ api.use(function errorHandler(err, req, res, next) {
const createdError = createError(400, 'Validation error', strings)
res.status(400).json(createdError);
} else {
- // pass on to another error handler
- console.log(err)
+ const log = createLogger('W')
+ log.error(err)
const createdError = createError(500, 'Internal Server Error')
res.status(500).json(createdError)
}
| 14 |
diff --git a/edit.js b/edit.js @@ -42,6 +42,7 @@ import {Bot} from './bot.js';
import {Sky} from './Sky.js';
import {GuardianMesh} from './land.js';
import {storageHost} from './constants.js';
+import {CapsuleGeometry} from './CapsuleGeometry.js';
import {renderer, scene, camera, appManager} from './app-object.js';
import inventory from './inventory.js';
@@ -4295,6 +4296,52 @@ const _makeChunkMesh = async (seedString, parcelSize, subparcelSize) => {
return mesh;
};
+const _makeRigCapsule = () => {
+ const geometry = new THREE.BufferGeometry().fromGeometry(new CapsuleGeometry());
+ const material = new THREE.ShaderMaterial({
+ vertexShader: `\
+ // uniform float iTime;
+ // varying vec2 uvs;
+ varying vec3 vNormal;
+ varying vec3 vWorldPosition;
+ void main() {
+ // uvs = uv;
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
+ vNormal = normal;
+ vec4 worldPosition = modelMatrix * vec4( position, 1.0 );
+ vWorldPosition = worldPosition.xyz;
+ }
+ `,
+ fragmentShader: `\
+ #define PI 3.1415926535897932384626433832795
+
+ // uniform float iTime;
+ // varying vec2 uvs;
+ varying vec3 vNormal;
+ varying vec3 vWorldPosition;
+
+ const vec3 c = vec3(${new THREE.Color(0x1565c0).toArray().join(', ')});
+
+ void main() {
+ // vec2 uv = uvs;
+ // uv.x *= 1.7320508075688772;
+ // uv *= 8.0;
+
+ vec3 direction = vWorldPosition - cameraPosition;
+ float d = dot(vNormal, normalize(direction));
+ float glow = d < 0.0 ? max(1. + d * 2., 0.) : 0.;
+
+ float a = glow;
+ gl_FragColor = vec4(c, a);
+ }
+ `,
+ side: THREE.DoubleSide,
+ transparent: true,
+ });
+ const mesh = new THREE.Mesh(geometry, material);
+ mesh.frustumCulled = false;
+ return mesh;
+};
planet.addEventListener('load', async e => {
const {data: chunkSpec} = e;
| 0 |
diff --git a/Sources/web3swift/Utils/ENS/ETHRegistrarController.swift b/Sources/web3swift/Utils/ENS/ETHRegistrarController.swift @@ -20,8 +20,7 @@ public extension ENS {
return contract!
}()
- // FIXME: Rewrite this to CodableTransaction
- lazy var defaultOptions: CodableTransaction = {
+ lazy var defaultTransaction: CodableTransaction = {
return CodableTransaction.emptyTransaction
}()
@@ -59,34 +58,34 @@ public extension ENS {
}
public func sumbitCommitment(from: EthereumAddress, commitment: Data) throws -> WriteOperation {
- defaultOptions.from = from
- defaultOptions.to = self.address
+ defaultTransaction.from = from
+ defaultTransaction.to = self.address
guard let transaction = self.contract.createWriteOperation("commit", parameters: [commitment as AnyObject], extraData: Data()) else {throw Web3Error.transactionSerializationError}
return transaction
}
public func registerName(from: EthereumAddress, name: String, owner: EthereumAddress, duration: UInt, secret: String, price: String) throws -> WriteOperation {
guard let amount = Utilities.parseToBigUInt(price, units: .ether) else {throw Web3Error.inputError(desc: "Wrong price: no way for parsing to ether units")}
- defaultOptions.value = amount
- defaultOptions.from = from
- defaultOptions.to = self.address
+ defaultTransaction.value = amount
+ defaultTransaction.from = from
+ defaultTransaction.to = self.address
guard let transaction = self.contract.createWriteOperation("register", parameters: [name, owner.address, duration, secret] as [AnyObject], extraData: Data()) else {throw Web3Error.transactionSerializationError}
return transaction
}
public func extendNameRegistration(from: EthereumAddress, name: String, duration: UInt32, price: String) throws -> WriteOperation {
guard let amount = Utilities.parseToBigUInt(price, units: .ether) else {throw Web3Error.inputError(desc: "Wrong price: no way for parsing to ether units")}
- defaultOptions.value = amount
- defaultOptions.from = from
- defaultOptions.to = self.address
+ defaultTransaction.value = amount
+ defaultTransaction.from = from
+ defaultTransaction.to = self.address
guard let transaction = self.contract.createWriteOperation("renew", parameters: [name, duration] as [AnyObject], extraData: Data()) else {throw Web3Error.transactionSerializationError}
return transaction
}
@available(*, message: "Available for only owner")
public func withdraw(from: EthereumAddress) throws -> WriteOperation {
- defaultOptions.from = from
- defaultOptions.to = self.address
+ defaultTransaction.from = from
+ defaultTransaction.to = self.address
guard let transaction = self.contract.createWriteOperation("withdraw", parameters: [AnyObject](), extraData: Data()) else {throw Web3Error.transactionSerializationError}
return transaction
}
| 10 |
diff --git a/articles/quickstart/webapp/nodejs/01-login.md b/articles/quickstart/webapp/nodejs/01-login.md @@ -40,7 +40,7 @@ In `app.js`, include the `express-session` module and configure it. The `secret`
var session = require('express-session');
-//session-related stuff
+// initialize express-session
var sess = {
secret: 'CHANGE THIS SECRET',
cookie: {},
@@ -95,6 +95,7 @@ To support login sessions, Passport serializes and deserializes user instances t
```js
// app.js
+
passport.serializeUser(function(user, done) {
done(null, user);
});
@@ -175,6 +176,7 @@ If the user is not logged in, the requested route will be stored in the session
```js
// lib/middleware/protected.js
+
module.exports = function() {
return function protected(req, res, next) {
if (req.user) { return next(); }
@@ -288,6 +290,7 @@ Create a `views/user.pug` template. Use `locals.user` to access the user data in
```pug
// views/user.pug
+
extends layout
block content
| 7 |
diff --git a/generators/entity-client/templates/angular/src/main/webapp/app/entities/route/entity-management-routing.module.ts.ejs b/generators/entity-client/templates/angular/src/main/webapp/app/entities/route/entity-management-routing.module.ts.ejs @@ -33,7 +33,7 @@ const <%= entityInstance %>Route: Routes = [
component: <%= entityAngularName %>Component,
<%_ if (paginationPagination) { _%>
data: {
- defaultSort: 'id,asc',
+ defaultSort: '<%- primaryKey.name %>,asc',
},
<%_ } _%>
canActivate: [UserRouteAccessService]
| 2 |
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md @@ -40,7 +40,7 @@ You will need the following things properly installed on your computer.
### Running / Development Without Docker (Recommended)
-* `node server.js` from your gatekeeper folder
+* `node index.js` from your gatekeeper folder
* `yarn` from ember twiddle folder
* `bower install` from ember twiddle folder
* `ember server` from ember twiddle folder
@@ -55,7 +55,7 @@ You will need the following things properly installed on your computer.
#### Instructions
-* `node server.js` from your gatekeeper folder
+* `node index.js` from your gatekeeper folder
* `docker-compose up` from ember twiddle folder
* Visit your app at [http://localhost:4200](http://localhost:4200).
| 3 |
diff --git a/components/AppLayout/AppHeader.js b/components/AppLayout/AppHeader.js @@ -170,7 +170,7 @@ const Links = ({ classes, unsolvedCount }) => (
</>
);
-function AppHeader({ onMenuButtonClick, user, onLoginModalOpen, logout }) {
+function AppHeader({ onMenuButtonClick, user, onLoginModalOpen, onLogout }) {
const [anchor, setAnchor] = useState(null);
const [displayLogo, setDisplayLogo] = useState(true);
const classes = useStyles();
@@ -236,7 +236,7 @@ function AppHeader({ onMenuButtonClick, user, onLoginModalOpen, logout }) {
<Typography variant="inherit">{t`About`}</Typography>
</MenuItem>
<Divider classes={{ root: classes.divider }} />
- <MenuItem onClick={logout}>
+ <MenuItem onClick={onLogout}>
<ListItemIcon className={classes.listIcon}>
<ExitToAppRoundedIcon />
</ListItemIcon>
| 1 |
diff --git a/.circleci/config.yml b/.circleci/config.yml @@ -2,8 +2,8 @@ version: 2.1
aliases:
- &GAIA /tmp/gaia
- - &WORKSPACE /tmp/build_output
- - &DIST /tmp/build_output/app/dist
+ - &WORKSPACE /tmp/voyager
+ - &DIST /tmp/voyager/app/dist
- &docker-node circleci/node:10.15
- &docker-browsers circleci/node:10.15-browsers
- &docker-go circleci/golang:1.11
@@ -79,7 +79,7 @@ jobs:
- store_artifacts:
path: *DIST
- persist_to_workspace:
- root: .
+ root: *WORKSPACE
paths:
- app/dist
@@ -195,7 +195,7 @@ jobs:
executor: aws
steps:
- attach_workspace:
- at: *DIST
+ at: *WORKSPACE
- sync:
from: *DIST
to: "s3://cosmos-voyager"
@@ -312,8 +312,8 @@ workflows:
- build-gaia:
name: build-test-gaia
- requires:
- - build
+# requires:
+# - build
# filters:
# branches:
# ignore: develop
| 10 |
diff --git a/closure/goog/testing/net/xhriopool.js b/closure/goog/testing/net/xhriopool.js @@ -57,6 +57,15 @@ goog.testing.net.XhrIoPool.prototype.createObject = function() {
};
+/**
+ * Override adjustForMinMax to not call handleRequests because that causes
+ * problems. See b/31041087.
+ *
+ * @override
+ */
+goog.testing.net.XhrIoPool.prototype.adjustForMinMax = function() {};
+
+
/**
* Get the mock XhrIo used by this pool.
*
| 1 |
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml @@ -69,23 +69,24 @@ jobs:
run: |
yarn update-release-changelog
git add semcore/ui/CHANGELOG.md
- - name: make first branch commit
+ - name: commit changelog change as a first commit in the release branch
run: |
git commit -m "Automatically updated @semcore/ui changelog"
- # git pull --rebase
if: env.release_branch_already_exists != 'true'
- - name: update existing first branch commit
+ - name: edit changelog change commit in the release branch
run: |
+ # git pull origin "${{ env.release_branch_name }}" --rebase
firstCommitHash="$(git log master.."${{ env.release_branch_name }}" --pretty=format:"%H" | tail -1)"
+ secondCommitHash="$(git log master.."${{ env.release_branch_name }}" --pretty=format:"%H" | tail -2)"
+ lastCommitHash="$(git log master.."${{ env.release_branch_name }}" --pretty=format:"%H" | head -1)"
git checkout $firstCommitHash
git commit -m "Automatically updated @semcore/ui changelog" --amend --no-edit
+ git cherry-pick "$secondCommitHash..$lastCommitHash" --strategy-option theirs
git checkout "${{ env.release_branch_name }}"
- git pull origin "${{ env.release_branch_name }}" --rebase
if: env.release_branch_already_exists == 'true'
- name: push updated changelog
run: |
git push --set-upstream origin "${{ env.release_branch_name }}" --force
- git push
- name: create pull request
run: |
gh pr create --title "${{ env.release_pr_name }}" --body "Test release pull request" --draft --base master
| 4 |
diff --git a/bin/cli.js b/bin/cli.js @@ -78,10 +78,12 @@ let showCorrectUsage = function () {
console.log(' deploy <app-path> [requires kubectl] Deploy app at path to your Kubernetes cluster');
console.log(' deploy-update <app-path> [requires kubectl] Deploy update to app which was previously deployed');
console.log(' undeploy <app-path> [requires kubectl] Shutdown all core app services running on your cluster');
- console.log(' upload-secret [requires kubectl] Upload a TLS key and cert pair to your cluster');
- console.log(` -n Optional secret name; defaults to "${DEFAULT_TLS_SECRET_NAME}"`);
+ console.log(' add-secret [requires kubectl] Upload a TLS key and cert pair to your cluster');
+ console.log(` -s Optional secret name; defaults to "${DEFAULT_TLS_SECRET_NAME}"`);
console.log(' -k Path to a key file');
console.log(' -c Path to a certificate file');
+ console.log(' remove-secret [requires kubectl] Remove a TLS key and cert pair from your cluster');
+ console.log(` -s Optional secret name; defaults to "${DEFAULT_TLS_SECRET_NAME}"`);
console.log('');
let extraMessage = 'Note that the app-name/app-path in the commands above is optional (except for create) - If not provided, ' +
'asyngular will use the current working directory as the app path.';
@@ -282,16 +284,32 @@ let promptK8sTLSCredentials = function (callback) {
});
};
-let uploadTLSSecret = function (secretName, privateKeyPath, certFilePath) {
+let uploadTLSSecret = function (secretName, privateKeyPath, certFilePath, errorLogger) {
try {
execSync(`kubectl create secret tls ${secretName} --key ${privateKeyPath} --cert ${certFilePath}`, {stdio: 'inherit'});
} catch (err) {
- warningMessage(
+ errorLogger(
'Failed to upload TLS key and certificate pair to Kubernetes. ' +
- 'You can try using the following command to upload them manually (replace the key and cert paths with your own): ' +
- `kubectl create secret tls ${secretName} --key ./mykey.key --cert ./mycert.crt`
+ 'You can try using the following command to upload them manually: ' +
+ `kubectl create secret tls ${secretName} --key ${privateKeyPath} --cert ${certFilePath}`
+ );
+ return false;
+ }
+ return true;
+};
+
+let removeTLSSecret = function (secretName, errorLogger) {
+ try {
+ execSync(`kubectl delete secret ${secretName}`, {stdio: 'inherit'});
+ } catch (err) {
+ errorLogger(
+ `Failed to remove TLS key and certificate pair "${secretName}" from Kubernetes. ` +
+ 'You can try using the following command to remove them manually: ' +
+ `kubectl delete secret ${secretName}`
);
+ return false;
}
+ return true;
};
if (command === 'create') {
@@ -579,7 +597,7 @@ if (command === 'create') {
execSync(`${dockerLoginCommand}; docker push ${dockerConfig.imageName}`, {stdio: 'inherit'});
if (tlsSecretName && tlsKeyPath && tlsCertPath) {
- uploadTLSSecret(tlsSecretName, tlsKeyPath, tlsCertPath);
+ uploadTLSSecret(tlsSecretName, tlsKeyPath, tlsCertPath, warningMessage);
}
let kubernetesDirPath = appPath + '/kubernetes';
@@ -752,18 +770,27 @@ if (command === 'create') {
successMessage(`The '${appName}' app was undeployed successfully.`);
process.exit();
-} else if (command === 'upload-secret') {
- let secretName = argv.n || DEFAULT_TLS_SECRET_NAME;
+} else if (command === 'add-secret') {
+ let secretName = argv.s || DEFAULT_TLS_SECRET_NAME;
let privateKeyPath = argv.k;
let certFilePath = argv.c;
if (privateKeyPath == null || certFilePath == null) {
errorMessage(`Failed to upload secret. Both a key file path (-k) and a certificate file path (-c) must be provided.`);
- process.exit();
} else {
- uploadTLSSecret(secretName, privateKeyPath, certFilePath);
- successMessage(`The specified private key and cert pair were uploaded successfully under the secret name "${secretName}".`);
+ let success = uploadTLSSecret(secretName, privateKeyPath, certFilePath, errorMessage);
+ if (success) {
+ successMessage(`The private key and cert pair were added to your cluster under the secret name "${secretName}".`);
}
+ }
+ process.exit();
+} else if (command === 'remove-secret') {
+ let secretName = argv.s || DEFAULT_TLS_SECRET_NAME;
+ let success = removeTLSSecret(secretName, errorMessage);
+ if (success) {
+ successMessage(`The private key and cert pair under the secret name "${secretName}" were removed from your cluster.`);
+ }
+ process.exit();
} else {
errorMessage(`"${command}" is not a valid Asyngular command.`);
showCorrectUsage();
| 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.