zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject zeppelin git commit: remove usage of non-standard string method
Date Sat, 31 Dec 2016 18:02:01 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/master 31b71f739 -> 082ab6342


remove usage of non-standard string method

### What is this PR for?
Recreating #1701 that was lost in refactoring.
This PR removes a non-standard string prototype method `contains` that can cause potential
bugs in the future maintenance.

### What type of PR is it?
Bug Fix

### Todos
* [x] - remove usage of non-standard string method `contains` in favor of standard `indexOf`

### How should this be tested?
Download as `csv / tsv` (graph view) should work as expected

Author: felizbear <ilya@nflabs.com>

Closes #1817 from felizbear/remove-prototype-method and squashes the following commits:

d8e9005 [felizbear] remove usage of non-standard string method


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/082ab634
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/082ab634
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/082ab634

Branch: refs/heads/master
Commit: 082ab634269a88aab174e85e00483caecd1b9aff
Parents: 31b71f7
Author: felizbear <ilya@nflabs.com>
Authored: Thu Dec 29 17:08:52 2016 +0900
Committer: Lee moon soo <moon@apache.org>
Committed: Sat Dec 31 10:01:55 2016 -0800

----------------------------------------------------------------------
 .../src/app/notebook/paragraph/result/result.controller.js       | 2 +-
 zeppelin-web/src/components/noteAction/noteAction.service.js     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/082ab634/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js b/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js
index 77227a7..77f2e28 100644
--- a/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/result/result.controller.js
@@ -589,7 +589,7 @@ import zeppelin from '../../../zeppelin';
         var dsvRow = '';
         for (var index in row) {
           var stringValue =  (row[index]).toString();
-          if (stringValue.contains(delimiter)) {
+          if (stringValue.indexOf(delimiter) > -1) {
             dsvRow += '"' + stringValue + '"' + delimiter;
           } else {
             dsvRow += row[index] + delimiter;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/082ab634/zeppelin-web/src/components/noteAction/noteAction.service.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/noteAction/noteAction.service.js b/zeppelin-web/src/components/noteAction/noteAction.service.js
index e3b5008..9fe2dec 100644
--- a/zeppelin-web/src/components/noteAction/noteAction.service.js
+++ b/zeppelin-web/src/components/noteAction/noteAction.service.js
@@ -85,11 +85,11 @@
     function normalizeFolderId(folderId) {
       folderId = folderId.trim();
 
-      while (folderId.contains('\\')) {
+      while (folderId.indexOf('\\') > -1) {
         folderId = folderId.replace('\\', '/');
       }
 
-      while (folderId.contains('///')) {
+      while (folderId.indexOf('///') > -1) {
         folderId = folderId.replace('///', '/');
       }
 


Mime
View raw message