From 5164414deabb84d9bece8d6857f5a1466e6a3c7b Mon Sep 17 00:00:00 2001 From: Faisal Nadeem Date: Wed, 9 Jun 2021 21:42:14 +0500 Subject: [PATCH 1/7] pointer array --- .../BrowserCell/BrowserCell.react.js | 29 ++++++++++++++++--- src/components/BrowserRow/BrowserRow.react.js | 2 +- src/dashboard/Data/Browser/Browser.scss | 2 +- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/components/BrowserCell/BrowserCell.react.js b/src/components/BrowserCell/BrowserCell.react.js index 9c77516681..4732057a55 100644 --- a/src/components/BrowserCell/BrowserCell.react.js +++ b/src/components/BrowserCell/BrowserCell.react.js @@ -248,7 +248,28 @@ class BrowserCell extends Component { value.id ); this.copyableValue = value.id; - } else if (type === 'Date') { + } + else if (type === 'Array') { + if ( typeof value[0] === 'object' && value[0].__type === 'Pointer' ) { + const array = []; + value.map( (v, i) => { + if ( typeof v !== 'object' || v.__type !== 'Pointer' ) { + throw new Error('Invalid type found in pointer array'); + } + array.push( + + + ); + }); + this.copyableValue = content = + } + else { + this.copyableValue = content = JSON.stringify(value); + } + } + else if (type === 'Date') { if (typeof value === 'object' && value.__type) { value = new Date(value.iso); } else if (typeof value === 'string') { @@ -257,7 +278,7 @@ class BrowserCell extends Component { this.copyableValue = content = dateStringUTC(value); } else if (type === 'Boolean') { this.copyableValue = content = value ? 'True' : 'False'; - } else if (type === 'Object' || type === 'Bytes' || type === 'Array') { + } else if (type === 'Object' || type === 'Bytes') { this.copyableValue = content = JSON.stringify(value); } else if (type === 'File') { const fileName = value.url() ? getFileName(value) : 'Uploading\u2026'; @@ -305,7 +326,7 @@ class BrowserCell extends Component { if (current) { classes.push(styles.current); } - + return readonly ? ( { onSelect({ row, col }); setCopyableValue(hidden ? undefined : this.copyableValue); diff --git a/src/components/BrowserRow/BrowserRow.react.js b/src/components/BrowserRow/BrowserRow.react.js index c74fb99fb8..597dfb49cc 100644 --- a/src/components/BrowserRow/BrowserRow.react.js +++ b/src/components/BrowserRow/BrowserRow.react.js @@ -98,4 +98,4 @@ export default class BrowserRow extends Component { ); } -} \ No newline at end of file +} diff --git a/src/dashboard/Data/Browser/Browser.scss b/src/dashboard/Data/Browser/Browser.scss index 03f72add94..5f02853040 100644 --- a/src/dashboard/Data/Browser/Browser.scss +++ b/src/dashboard/Data/Browser/Browser.scss @@ -97,7 +97,7 @@ body:global(.expanded) { @include MonospaceFont; font-size: 12px; white-space: nowrap; - height: 31px; + height: auto; border-bottom: 1px solid #e3e3ea; &:nth-child(odd) { From 454f3c2e380d884f88414e05b768b3e3612bb479 Mon Sep 17 00:00:00 2001 From: Faisal Nadeem Date: Thu, 10 Jun 2021 14:24:12 +0500 Subject: [PATCH 2/7] parse --- Parse-Dashboard/parse-dashboard-config.json | 69 +++++++++++++++---- .../BrowserCell/BrowserCell.react.js | 6 +- 2 files changed, 59 insertions(+), 16 deletions(-) diff --git a/Parse-Dashboard/parse-dashboard-config.json b/Parse-Dashboard/parse-dashboard-config.json index 018d79904d..a8cbd37875 100644 --- a/Parse-Dashboard/parse-dashboard-config.json +++ b/Parse-Dashboard/parse-dashboard-config.json @@ -1,16 +1,57 @@ { - "apps": [ - { - "serverURL": "http://localhost:1338/parse", - "appId": "APPLICATION_ID", - "masterKey": "MASTER_KEY", - "appName": "Countries States and Cities", - "iconName": "", - "primaryBackgroundColor": "", - "secondaryBackgroundColor": "", - "custom": { - "isOwner": true - } - } - ] + "apps": [{ + "serverURL": "https://parseapi.back4app.com", + "appId": "IvWJni5qb3gqJWmOlwZtfCA67cw5bZDvGU539T9J", + "javascriptKey": "HZ8PgZPHAM9r2tNrsnsQL7DU4JakERIAPD3sVIQI", + "restKey": "HnIKdoowoqFxJHgK3azdsigxR4vw4RnQUzwdiqWs", + "clientKey": "3oFJ03aUAlCtMFPqYz8enTP89tvp7GIuwvQbQ2Oz", + "windowsKey": "BQDTuFI9Tw6Tlh7C3rvlbNiZ3r0JLv8yDj015b5e", + "webhookKey": "LnirDOXQo3PUnvHFrVJriukXtwhwxHcWROXTdm4k", + "apiKey": "cda6c643-056e-4006-8080-3322c125f05d", + "appName": "Sample Blog App", + "production": true, + "appNameForURL": "8d153178-ab63-47fc-a546-0743ba667043", + "feedbackEmail": "faisal@back4app.com", + "custom": { + "isGDPR": false, + "forceShowGDPRFields": false, + "showAdminPage": false, + "isOwner": true, + "isDatabasePublic": false + }, + "supportedPushLocales": [], + "graphQLServerURL": "https://parseapi.back4app.com/graphql", + "masterKey": "0bdT7LmVrpSBbjWYmmOGPuhEPVFBpQk4jJnvdv2d" + }, { + "serverURL": "https://parseapi.back4app.com", + "appId": "dvTjcE3x2STnpZo1x3iUpccY82ptKS2s9grRYP4b", + "javascriptKey": "LFiEhZBtFi7LCSJshF2YTc0coBKnSfZ0cJucJOlv", + "restKey": "BWkv4t7tvQO4PJcQvh3DJg3v2pkb1kDJqnD11tXH", + "clientKey": "jkwrEAfTFDrhLaapdZLIw5mTutXQvfLjWVYqdRM1", + "windowsKey": "4WGzrXvmbS8SRBjka34tcqkxEs8hNumtRlnjHmbC", + "webhookKey": "n6pbMF39n0GR7h4yg5HoKHRxyiPsks0mk1KycCHW", + "apiKey": "81432ee4-5076-460c-95e0-dd2b579ab648", + "appName": "FirstApp", + "production": true, + "appNameForURL": "1baa601c-a967-443a-905b-d5e7df17515a", + "feedbackEmail": "faisal@back4app.com", + "custom": { + "isGDPR": false, + "forceShowGDPRFields": false, + "showAdminPage": false, + "isOwner": true, + "isDatabasePublic": false + }, + "supportedPushLocales": [], + "graphQLServerURL": "https://parseapi.back4app.com/graphql", + "masterKey": "c05f1V3DmG04GPRD2nEbbeCQCXSEI9klRtAZ4jgh" + }], + "newFeaturesInLatestVersion": [], + "user": { + "email": "faisal@back4app.com", + "has_password": false, + "account_keys": [], + "name": "faisal@back4app.com", + "playDatabaseBrowserTutorial": true + } } diff --git a/src/components/BrowserCell/BrowserCell.react.js b/src/components/BrowserCell/BrowserCell.react.js index 4732057a55..bc30297d1d 100644 --- a/src/components/BrowserCell/BrowserCell.react.js +++ b/src/components/BrowserCell/BrowserCell.react.js @@ -256,8 +256,10 @@ class BrowserCell extends Component { if ( typeof v !== 'object' || v.__type !== 'Pointer' ) { throw new Error('Invalid type found in pointer array'); } + const object = new Parse.Object(v.className); + object.id = v.objectId; array.push( - + ); }); @@ -365,7 +367,7 @@ class BrowserCell extends Component { { onSelect({ row, col }); setCopyableValue(hidden ? undefined : this.copyableValue); From a48ff05e2fe04584f2eb44990c79f97aa9a0e0d1 Mon Sep 17 00:00:00 2001 From: Faisal Nadeem Date: Thu, 10 Jun 2021 17:52:23 +0500 Subject: [PATCH 3/7] reverting configs --- Parse-Dashboard/parse-dashboard-config.json | 69 +++++---------------- 1 file changed, 14 insertions(+), 55 deletions(-) diff --git a/Parse-Dashboard/parse-dashboard-config.json b/Parse-Dashboard/parse-dashboard-config.json index a8cbd37875..018d79904d 100644 --- a/Parse-Dashboard/parse-dashboard-config.json +++ b/Parse-Dashboard/parse-dashboard-config.json @@ -1,57 +1,16 @@ { - "apps": [{ - "serverURL": "https://parseapi.back4app.com", - "appId": "IvWJni5qb3gqJWmOlwZtfCA67cw5bZDvGU539T9J", - "javascriptKey": "HZ8PgZPHAM9r2tNrsnsQL7DU4JakERIAPD3sVIQI", - "restKey": "HnIKdoowoqFxJHgK3azdsigxR4vw4RnQUzwdiqWs", - "clientKey": "3oFJ03aUAlCtMFPqYz8enTP89tvp7GIuwvQbQ2Oz", - "windowsKey": "BQDTuFI9Tw6Tlh7C3rvlbNiZ3r0JLv8yDj015b5e", - "webhookKey": "LnirDOXQo3PUnvHFrVJriukXtwhwxHcWROXTdm4k", - "apiKey": "cda6c643-056e-4006-8080-3322c125f05d", - "appName": "Sample Blog App", - "production": true, - "appNameForURL": "8d153178-ab63-47fc-a546-0743ba667043", - "feedbackEmail": "faisal@back4app.com", - "custom": { - "isGDPR": false, - "forceShowGDPRFields": false, - "showAdminPage": false, - "isOwner": true, - "isDatabasePublic": false - }, - "supportedPushLocales": [], - "graphQLServerURL": "https://parseapi.back4app.com/graphql", - "masterKey": "0bdT7LmVrpSBbjWYmmOGPuhEPVFBpQk4jJnvdv2d" - }, { - "serverURL": "https://parseapi.back4app.com", - "appId": "dvTjcE3x2STnpZo1x3iUpccY82ptKS2s9grRYP4b", - "javascriptKey": "LFiEhZBtFi7LCSJshF2YTc0coBKnSfZ0cJucJOlv", - "restKey": "BWkv4t7tvQO4PJcQvh3DJg3v2pkb1kDJqnD11tXH", - "clientKey": "jkwrEAfTFDrhLaapdZLIw5mTutXQvfLjWVYqdRM1", - "windowsKey": "4WGzrXvmbS8SRBjka34tcqkxEs8hNumtRlnjHmbC", - "webhookKey": "n6pbMF39n0GR7h4yg5HoKHRxyiPsks0mk1KycCHW", - "apiKey": "81432ee4-5076-460c-95e0-dd2b579ab648", - "appName": "FirstApp", - "production": true, - "appNameForURL": "1baa601c-a967-443a-905b-d5e7df17515a", - "feedbackEmail": "faisal@back4app.com", - "custom": { - "isGDPR": false, - "forceShowGDPRFields": false, - "showAdminPage": false, - "isOwner": true, - "isDatabasePublic": false - }, - "supportedPushLocales": [], - "graphQLServerURL": "https://parseapi.back4app.com/graphql", - "masterKey": "c05f1V3DmG04GPRD2nEbbeCQCXSEI9klRtAZ4jgh" - }], - "newFeaturesInLatestVersion": [], - "user": { - "email": "faisal@back4app.com", - "has_password": false, - "account_keys": [], - "name": "faisal@back4app.com", - "playDatabaseBrowserTutorial": true - } + "apps": [ + { + "serverURL": "http://localhost:1338/parse", + "appId": "APPLICATION_ID", + "masterKey": "MASTER_KEY", + "appName": "Countries States and Cities", + "iconName": "", + "primaryBackgroundColor": "", + "secondaryBackgroundColor": "", + "custom": { + "isOwner": true + } + } + ] } From b484c202ce98500634a875cc9b1b4d5c9524d889 Mon Sep 17 00:00:00 2001 From: Faisal Nadeem Date: Mon, 14 Jun 2021 14:46:05 +0500 Subject: [PATCH 4/7] style update --- Parse-Dashboard/parse-dashboard-config.json | 70 +++++++++++++++---- .../BrowserCell/BrowserCell.react.js | 5 +- src/components/BrowserCell/BrowserCell.scss | 17 +++++ 3 files changed, 77 insertions(+), 15 deletions(-) diff --git a/Parse-Dashboard/parse-dashboard-config.json b/Parse-Dashboard/parse-dashboard-config.json index 018d79904d..c4d73369e7 100644 --- a/Parse-Dashboard/parse-dashboard-config.json +++ b/Parse-Dashboard/parse-dashboard-config.json @@ -1,16 +1,58 @@ { - "apps": [ - { - "serverURL": "http://localhost:1338/parse", - "appId": "APPLICATION_ID", - "masterKey": "MASTER_KEY", - "appName": "Countries States and Cities", - "iconName": "", - "primaryBackgroundColor": "", - "secondaryBackgroundColor": "", - "custom": { - "isOwner": true - } - } - ] + "apps": [{ + "serverURL": "https://parseapi.back4app.com", + "appId": "IvWJni5qb3gqJWmOlwZtfCA67cw5bZDvGU539T9J", + "javascriptKey": "HZ8PgZPHAM9r2tNrsnsQL7DU4JakERIAPD3sVIQI", + "restKey": "HnIKdoowoqFxJHgK3azdsigxR4vw4RnQUzwdiqWs", + "clientKey": "3oFJ03aUAlCtMFPqYz8enTP89tvp7GIuwvQbQ2Oz", + "windowsKey": "BQDTuFI9Tw6Tlh7C3rvlbNiZ3r0JLv8yDj015b5e", + "webhookKey": "LnirDOXQo3PUnvHFrVJriukXtwhwxHcWROXTdm4k", + "apiKey": "cda6c643-056e-4006-8080-3322c125f05d", + "appName": "Sample Blog App", + "production": true, + "appNameForURL": "8d153178-ab63-47fc-a546-0743ba667043", + "feedbackEmail": "faisal@back4app.com", + "custom": { + "isGDPR": false, + "forceShowGDPRFields": false, + "showAdminPage": false, + "isOwner": true, + "isDatabasePublic": false + }, + "supportedPushLocales": [], + "graphQLServerURL": "https://parseapi.back4app.com/graphql", + "masterKey": "0bdT7LmVrpSBbjWYmmOGPuhEPVFBpQk4jJnvdv2d" + }, { + "serverURL": "https://parseapi.back4app.com", + "appId": "dvTjcE3x2STnpZo1x3iUpccY82ptKS2s9grRYP4b", + "javascriptKey": "LFiEhZBtFi7LCSJshF2YTc0coBKnSfZ0cJucJOlv", + "restKey": "BWkv4t7tvQO4PJcQvh3DJg3v2pkb1kDJqnD11tXH", + "clientKey": "jkwrEAfTFDrhLaapdZLIw5mTutXQvfLjWVYqdRM1", + "windowsKey": "4WGzrXvmbS8SRBjka34tcqkxEs8hNumtRlnjHmbC", + "webhookKey": "n6pbMF39n0GR7h4yg5HoKHRxyiPsks0mk1KycCHW", + "apiKey": "81432ee4-5076-460c-95e0-dd2b579ab648", + "appName": "FirstApp", + "production": true, + "appNameForURL": "1baa601c-a967-443a-905b-d5e7df17515a", + "feedbackEmail": "faisal@back4app.com", + "custom": { + "isGDPR": false, + "forceShowGDPRFields": false, + "showAdminPage": false, + "isOwner": true, + "isDatabasePublic": false + }, + "supportedPushLocales": [], + "graphQLServerURL": "https://parseapi.back4app.com/graphql", + "masterKey": "c05f1V3DmG04GPRD2nEbbeCQCXSEI9klRtAZ4jgh" + }], + "newFeaturesInLatestVersion": [], + "user": { + "email": "faisal@back4app.com", + "has_password": false, + "account_keys": [], + "name": "faisal@back4app.com", + "playDatabaseBrowserTutorial": true + } } + diff --git a/src/components/BrowserCell/BrowserCell.react.js b/src/components/BrowserCell/BrowserCell.react.js index bc30297d1d..58f0d6965c 100644 --- a/src/components/BrowserCell/BrowserCell.react.js +++ b/src/components/BrowserCell/BrowserCell.react.js @@ -266,6 +266,9 @@ class BrowserCell extends Component { this.copyableValue = content =
    { array.map( a =>
  • {a}
  • ) }
+ if ( array.length > 1 ) { + classes.push(styles.hasMore); + } } else { this.copyableValue = content = JSON.stringify(value); @@ -367,7 +370,7 @@ class BrowserCell extends Component { { onSelect({ row, col }); setCopyableValue(hidden ? undefined : this.copyableValue); diff --git a/src/components/BrowserCell/BrowserCell.scss b/src/components/BrowserCell/BrowserCell.scss index 897980695c..48bcdce5e3 100644 --- a/src/components/BrowserCell/BrowserCell.scss +++ b/src/components/BrowserCell/BrowserCell.scss @@ -40,3 +40,20 @@ color: #353446; opacity: .9; } + +.hasMore{ + height: auto; + max-height: 25px; + overflow-y: scroll; +} + +.hasMore::-webkit-scrollbar { + -webkit-appearance: none!important; + width: 7px!important; +} + +.hasMore::-webkit-scrollbar-thumb { + border-radius: 4px!important; + background-color: rgba(0, 0, 0, .5)!important; + box-shadow: 0 0 1px rgba(255, 255, 255, .5)!important; +} From 6450668751b9aa9e9ff20575e58e34fc5273f767 Mon Sep 17 00:00:00 2001 From: Faisal Nadeem Date: Mon, 14 Jun 2021 15:04:18 +0500 Subject: [PATCH 5/7] reverting configs --- Parse-Dashboard/parse-dashboard-config.json | 68 ++++----------------- 1 file changed, 12 insertions(+), 56 deletions(-) diff --git a/Parse-Dashboard/parse-dashboard-config.json b/Parse-Dashboard/parse-dashboard-config.json index c4d73369e7..e5c4decbf3 100644 --- a/Parse-Dashboard/parse-dashboard-config.json +++ b/Parse-Dashboard/parse-dashboard-config.json @@ -1,58 +1,14 @@ { - "apps": [{ - "serverURL": "https://parseapi.back4app.com", - "appId": "IvWJni5qb3gqJWmOlwZtfCA67cw5bZDvGU539T9J", - "javascriptKey": "HZ8PgZPHAM9r2tNrsnsQL7DU4JakERIAPD3sVIQI", - "restKey": "HnIKdoowoqFxJHgK3azdsigxR4vw4RnQUzwdiqWs", - "clientKey": "3oFJ03aUAlCtMFPqYz8enTP89tvp7GIuwvQbQ2Oz", - "windowsKey": "BQDTuFI9Tw6Tlh7C3rvlbNiZ3r0JLv8yDj015b5e", - "webhookKey": "LnirDOXQo3PUnvHFrVJriukXtwhwxHcWROXTdm4k", - "apiKey": "cda6c643-056e-4006-8080-3322c125f05d", - "appName": "Sample Blog App", - "production": true, - "appNameForURL": "8d153178-ab63-47fc-a546-0743ba667043", - "feedbackEmail": "faisal@back4app.com", - "custom": { - "isGDPR": false, - "forceShowGDPRFields": false, - "showAdminPage": false, - "isOwner": true, - "isDatabasePublic": false - }, - "supportedPushLocales": [], - "graphQLServerURL": "https://parseapi.back4app.com/graphql", - "masterKey": "0bdT7LmVrpSBbjWYmmOGPuhEPVFBpQk4jJnvdv2d" - }, { - "serverURL": "https://parseapi.back4app.com", - "appId": "dvTjcE3x2STnpZo1x3iUpccY82ptKS2s9grRYP4b", - "javascriptKey": "LFiEhZBtFi7LCSJshF2YTc0coBKnSfZ0cJucJOlv", - "restKey": "BWkv4t7tvQO4PJcQvh3DJg3v2pkb1kDJqnD11tXH", - "clientKey": "jkwrEAfTFDrhLaapdZLIw5mTutXQvfLjWVYqdRM1", - "windowsKey": "4WGzrXvmbS8SRBjka34tcqkxEs8hNumtRlnjHmbC", - "webhookKey": "n6pbMF39n0GR7h4yg5HoKHRxyiPsks0mk1KycCHW", - "apiKey": "81432ee4-5076-460c-95e0-dd2b579ab648", - "appName": "FirstApp", - "production": true, - "appNameForURL": "1baa601c-a967-443a-905b-d5e7df17515a", - "feedbackEmail": "faisal@back4app.com", - "custom": { - "isGDPR": false, - "forceShowGDPRFields": false, - "showAdminPage": false, - "isOwner": true, - "isDatabasePublic": false - }, - "supportedPushLocales": [], - "graphQLServerURL": "https://parseapi.back4app.com/graphql", - "masterKey": "c05f1V3DmG04GPRD2nEbbeCQCXSEI9klRtAZ4jgh" - }], - "newFeaturesInLatestVersion": [], - "user": { - "email": "faisal@back4app.com", - "has_password": false, - "account_keys": [], - "name": "faisal@back4app.com", - "playDatabaseBrowserTutorial": true - } + "apps": [ + { + "serverURL": "http://localhost:1338/parse", + "appId": "hello", + "masterKey": "world", + "appName": "", + "iconName": "", + "primaryBackgroundColor": "", + "secondaryBackgroundColor": "" + } + ], + "iconsFolder": "icons" } - From e83bfb13e6f04c306c539164a7823f44305b1aeb Mon Sep 17 00:00:00 2001 From: Faisal Nadeem Date: Tue, 15 Jun 2021 15:05:28 +0500 Subject: [PATCH 6/7] config fix --- Parse-Dashboard/parse-dashboard-config.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Parse-Dashboard/parse-dashboard-config.json b/Parse-Dashboard/parse-dashboard-config.json index e5c4decbf3..8788d369ae 100644 --- a/Parse-Dashboard/parse-dashboard-config.json +++ b/Parse-Dashboard/parse-dashboard-config.json @@ -2,9 +2,9 @@ "apps": [ { "serverURL": "http://localhost:1338/parse", - "appId": "hello", - "masterKey": "world", - "appName": "", + "appId": "APPLICATION_ID", + "masterKey": "MASTER_KEY", + "appName": "Countries States and Cities", "iconName": "", "primaryBackgroundColor": "", "secondaryBackgroundColor": "" From 64f023d51b633a75d6f0c6c6be6170c38ba01228 Mon Sep 17 00:00:00 2001 From: Faisal Nadeem Date: Tue, 15 Jun 2021 15:06:53 +0500 Subject: [PATCH 7/7] config fix2 --- Parse-Dashboard/parse-dashboard-config.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Parse-Dashboard/parse-dashboard-config.json b/Parse-Dashboard/parse-dashboard-config.json index 8788d369ae..018d79904d 100644 --- a/Parse-Dashboard/parse-dashboard-config.json +++ b/Parse-Dashboard/parse-dashboard-config.json @@ -7,8 +7,10 @@ "appName": "Countries States and Cities", "iconName": "", "primaryBackgroundColor": "", - "secondaryBackgroundColor": "" + "secondaryBackgroundColor": "", + "custom": { + "isOwner": true + } } - ], - "iconsFolder": "icons" + ] }