Skip to content

Commit

Permalink
Playground (parse-community#1464)
Browse files Browse the repository at this point in the history
* * chore(package): update lockfile package-lock.json
* chore(package): added react-simple-code-editor dependency
* feat(CodeEditor): added CodeEditor component

* added id tho the code editor props

* added playground to dashboard

* added react-json dependency to show playground results

* update changelog

* fix playground button CSS spacing and update risky dependencies

* fix(React life-cycle): fixes requested on PR parse-community#1464 review

* feat(Playground): update CodeEditor component and show result just in console

* feat(Playground): update CodeEditor component and show result just in console

* fix(Playground): fix erron in test of CodeEditor component

* Update parse-dashboard-config.json

* fix(Playground): implemented requested changes and put Playground into JS Console

* fix(Playground): fix double quotes and change JS Console playground

* fix(Playground): fix missing dependency

Co-authored-by: Antonio Davi Macedo Coelho de Castro <[email protected]>
  • Loading branch information
MutterPedro and davimacedo authored Feb 19, 2020
1 parent 7085e53 commit ed5e4f3
Show file tree
Hide file tree
Showing 52 changed files with 1,835 additions and 1,157 deletions.
45 changes: 22 additions & 23 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
{
"env": {
"es6": true,
"node": true,
"browser": true
"env": {
"es6": true,
"node": true,
"browser": true
},
"parser": "babel-eslint",
"extends": "eslint:recommended",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"parser": "babel-eslint",
"extends": "eslint:recommended",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
"react/jsx-uses-vars": 1,
"react/jsx-uses-react": 1,
"react/react-in-jsx-scope": 1,
"no-console": 0,
"no-case-declarations": 0
}
"sourceType": "module"
},
"plugins": ["react"],
"rules": {
"react/jsx-uses-vars": 1,
"react/jsx-uses-react": 1,
"react/react-in-jsx-scope": 1,
"no-console": 0,
"no-case-declarations": 0,
"quotes": ["error", "single"]
}
}
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
### master
[Full Changelog](https://github.com/parse-community/parse-dashboard/compare/2.0.4...master)

* _Contributing to this repo? Add info about your change here to be included in next release_
* Feature: added JS Console feature to run custom queries
* Feature: added save button on JS Console feature to save the custom query on the local storage
### 2.0.5
[Full Changelog](https://github.com/parse-community/parse-dashboard/compare/2.0.4...2.0.5)
* Fix: delete and regenerate package-lock to fix broken build
Expand Down
2 changes: 1 addition & 1 deletion Parse-Dashboard/Authentication.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"use strict";
'use strict';
var bcrypt = require('bcryptjs');
var csrf = require('csurf');
var passport = require('passport');
Expand Down
8 changes: 4 additions & 4 deletions Parse-Dashboard/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ function checkIfIconsExistForApps(apps, iconsFolder) {
for (var i in apps) {
var currentApp = apps[i];
var iconName = currentApp.iconName;
var path = iconsFolder + "/" + iconName;
var path = iconsFolder + '/' + iconName;

fs.stat(path, function(err) {
if (err) {
if ('ENOENT' == err.code) {// file does not exist
console.warn("Icon with file name: " + iconName +" couldn't be found in icons folder!");
console.warn('Icon with file name: ' + iconName +' couldn\'t be found in icons folder!');
} else {
console.log(
'An error occurd while checking for icons, please check permission!');
Expand Down Expand Up @@ -162,8 +162,8 @@ module.exports = function(config, options) {
}
} catch (e) {
// Directory doesn't exist or something.
console.warn("Iconsfolder at path: " + config.iconsFolder +
" not found!");
console.warn('Iconsfolder at path: ' + config.iconsFolder +
' not found!');
}
}

Expand Down
4 changes: 2 additions & 2 deletions Parse-Dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* the root directory of this source tree.
*/
// Command line tool for npm start
"use strict"
'use strict'
const path = require('path');
const jsonFile = require('json-file-plus');
const express = require('express');
Expand Down Expand Up @@ -40,7 +40,7 @@ const trustProxy = program.trustProxy || process.env.PARSE_DASHBOARD_TRUST_PROXY
const dev = program.dev;

if (trustProxy && allowInsecureHTTP) {
console.log("Set only trustProxy *or* allowInsecureHTTP, not both. Only one is needed to handle being behind a proxy.");
console.log('Set only trustProxy *or* allowInsecureHTTP, not both. Only one is needed to handle being behind a proxy.');
process.exit(-1);
}

Expand Down
20 changes: 11 additions & 9 deletions Parse-Dashboard/parse-dashboard-config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"apps": [{
"serverURL": "http://localhost:1338/parse",
"appId": "hello",
"masterKey": "world",
"appName": "",
"iconName": "",
"primaryBackgroundColor": "",
"secondaryBackgroundColor": ""
}],
"apps": [
{
"serverURL": "http://localhost:1338/parse",
"appId": "hello",
"masterKey": "world",
"appName": "",
"iconName": "",
"primaryBackgroundColor": "",
"secondaryBackgroundColor": ""
}
],
"iconsFolder": "icons"
}
Loading

0 comments on commit ed5e4f3

Please sign in to comment.