From commits-return-1716-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Fri Oct 19 05:11:52 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B191F18064E for ; Fri, 19 Oct 2018 05:11:51 +0200 (CEST) Received: (qmail 68037 invoked by uid 500); 19 Oct 2018 03:11:50 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 68028 invoked by uid 99); 19 Oct 2018 03:11:50 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2018 03:11:50 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id D70E085B71; Fri, 19 Oct 2018 03:11:49 +0000 (UTC) Date: Fri, 19 Oct 2018 03:11:49 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: [superset-client] pass csrfToken as configuration (#6148) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <153991870959.14589.17833802870922768877@gitbox.apache.org> From: ccwilliams@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: fc3422eaebce31c900229358a07485f9976fb625 X-Git-Newrev: bc3a2efa0e6890b9307253155453b6e9dd3b8bbb X-Git-Rev: bc3a2efa0e6890b9307253155453b6e9dd3b8bbb X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. ccwilliams pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-superset.git The following commit(s) were added to refs/heads/master by this push: new bc3a2ef [superset-client] pass csrfToken as configuration (#6148) bc3a2ef is described below commit bc3a2efa0e6890b9307253155453b6e9dd3b8bbb Author: Chris Williams AuthorDate: Thu Oct 18 20:11:43 2018 -0700 [superset-client] pass csrfToken as configuration (#6148) --- superset/assets/package.json | 2 +- superset/assets/src/common.js | 4 ++++ superset/assets/yarn.lock | 18 ++++++++++++++---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/superset/assets/package.json b/superset/assets/package.json index 0c24760..27c66e4 100644 --- a/superset/assets/package.json +++ b/superset/assets/package.json @@ -51,7 +51,7 @@ "@data-ui/sparkline": "^0.0.54", "@data-ui/theme": "^0.0.62", "@data-ui/xy-chart": "^0.0.61", - "@superset-ui/core": "^0.0.5", + "@superset-ui/core": "^0.0.7", "@vx/legend": "^0.0.170", "@vx/responsive": "0.0.172", "@vx/scale": "^0.0.165", diff --git a/superset/assets/src/common.js b/superset/assets/src/common.js index 7fe37ae..fafc84e 100644 --- a/superset/assets/src/common.js +++ b/superset/assets/src/common.js @@ -42,9 +42,13 @@ export function appSetup() { window.jQuery = $; require('bootstrap'); + const csrfNode = document.querySelector('#csrf_token'); + const csrfToken = csrfNode ? csrfNode.value : null; + SupersetClient.configure({ protocol: (window.location && window.location.protocol) || '', host: (window.location && window.location.host) || '', + csrfToken, }) .init() .catch((error) => { diff --git a/superset/assets/yarn.lock b/superset/assets/yarn.lock index 0b607ff..665fad3 100644 --- a/superset/assets/yarn.lock +++ b/superset/assets/yarn.lock @@ -66,6 +66,12 @@ esutils "^2.0.2" js-tokens "^4.0.0" +"@babel/runtime@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.1.2.tgz#81c89935f4647706fc54541145e6b4ecfef4b8e3" + dependencies: + regenerator-runtime "^0.12.0" + "@babel/template@7.0.0-beta.44": version "7.0.0-beta.44" resolved "http://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f" @@ -377,11 +383,11 @@ dependencies: samsam "1.3.0" -"@superset-ui/core@^0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@superset-ui/core/-/core-0.0.5.tgz#2dbb39d7ec55c01a017c923468b276240a9fbc8b" +"@superset-ui/core@^0.0.7": + version "0.0.7" + resolved "https://registry.yarnpkg.com/@superset-ui/core/-/core-0.0.7.tgz#e91374d10c96de504225a24d7d1d76e73cdb06cd" dependencies: - babel-runtime "^6.26.0" + "@babel/runtime" "^7.1.2" whatwg-fetch "^2.0.4" "@types/blob-util@1.3.3": @@ -9984,6 +9990,10 @@ regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" +regenerator-runtime@^0.12.0: + version "0.12.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" + regenerator-transform@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"