Skip to content

Commit ed5e4f3

Browse files
Playground (#1464)
* * 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 #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 <adavimacedo@gmail.com>
1 parent 7085e53 commit ed5e4f3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1835
-1157
lines changed

.eslintrc.json

+22-23
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
{
2-
"env": {
3-
"es6": true,
4-
"node": true,
5-
"browser": true
2+
"env": {
3+
"es6": true,
4+
"node": true,
5+
"browser": true
6+
},
7+
"parser": "babel-eslint",
8+
"extends": "eslint:recommended",
9+
"parserOptions": {
10+
"ecmaFeatures": {
11+
"experimentalObjectRestSpread": true,
12+
"jsx": true
613
},
7-
"parser": "babel-eslint",
8-
"extends": "eslint:recommended",
9-
"parserOptions": {
10-
"ecmaFeatures": {
11-
"experimentalObjectRestSpread": true,
12-
"jsx": true
13-
},
14-
"sourceType": "module"
15-
},
16-
"plugins": [
17-
"react"
18-
],
19-
"rules": {
20-
"react/jsx-uses-vars": 1,
21-
"react/jsx-uses-react": 1,
22-
"react/react-in-jsx-scope": 1,
23-
"no-console": 0,
24-
"no-case-declarations": 0
25-
}
14+
"sourceType": "module"
15+
},
16+
"plugins": ["react"],
17+
"rules": {
18+
"react/jsx-uses-vars": 1,
19+
"react/jsx-uses-react": 1,
20+
"react/react-in-jsx-scope": 1,
21+
"no-console": 0,
22+
"no-case-declarations": 0,
23+
"quotes": ["error", "single"]
24+
}
2625
}

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
### master
44
[Full Changelog](https://github.com/parse-community/parse-dashboard/compare/2.0.4...master)
55

6-
* _Contributing to this repo? Add info about your change here to be included in next release_
6+
* Feature: added JS Console feature to run custom queries
7+
* Feature: added save button on JS Console feature to save the custom query on the local storage
78
### 2.0.5
89
[Full Changelog](https://github.com/parse-community/parse-dashboard/compare/2.0.4...2.0.5)
910
* Fix: delete and regenerate package-lock to fix broken build

Parse-Dashboard/Authentication.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"use strict";
1+
'use strict';
22
var bcrypt = require('bcryptjs');
33
var csrf = require('csurf');
44
var passport = require('passport');

Parse-Dashboard/app.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ function checkIfIconsExistForApps(apps, iconsFolder) {
2929
for (var i in apps) {
3030
var currentApp = apps[i];
3131
var iconName = currentApp.iconName;
32-
var path = iconsFolder + "/" + iconName;
32+
var path = iconsFolder + '/' + iconName;
3333

3434
fs.stat(path, function(err) {
3535
if (err) {
3636
if ('ENOENT' == err.code) {// file does not exist
37-
console.warn("Icon with file name: " + iconName +" couldn't be found in icons folder!");
37+
console.warn('Icon with file name: ' + iconName +' couldn\'t be found in icons folder!');
3838
} else {
3939
console.log(
4040
'An error occurd while checking for icons, please check permission!');
@@ -162,8 +162,8 @@ module.exports = function(config, options) {
162162
}
163163
} catch (e) {
164164
// Directory doesn't exist or something.
165-
console.warn("Iconsfolder at path: " + config.iconsFolder +
166-
" not found!");
165+
console.warn('Iconsfolder at path: ' + config.iconsFolder +
166+
' not found!');
167167
}
168168
}
169169

Parse-Dashboard/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* the root directory of this source tree.
77
*/
88
// Command line tool for npm start
9-
"use strict"
9+
'use strict'
1010
const path = require('path');
1111
const jsonFile = require('json-file-plus');
1212
const express = require('express');
@@ -40,7 +40,7 @@ const trustProxy = program.trustProxy || process.env.PARSE_DASHBOARD_TRUST_PROXY
4040
const dev = program.dev;
4141

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

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
2-
"apps": [{
3-
"serverURL": "http://localhost:1338/parse",
4-
"appId": "hello",
5-
"masterKey": "world",
6-
"appName": "",
7-
"iconName": "",
8-
"primaryBackgroundColor": "",
9-
"secondaryBackgroundColor": ""
10-
}],
2+
"apps": [
3+
{
4+
"serverURL": "http://localhost:1338/parse",
5+
"appId": "hello",
6+
"masterKey": "world",
7+
"appName": "",
8+
"iconName": "",
9+
"primaryBackgroundColor": "",
10+
"secondaryBackgroundColor": ""
11+
}
12+
],
1113
"iconsFolder": "icons"
1214
}

0 commit comments

Comments
 (0)