Skip to content

Commit 5ca04ae

Browse files
Merge branch 'release'
* release: (75 commits) chore(release): 3.3.0 [skip ci] ci: release commit chore(release): 3.3.0-beta.3 [skip ci] fix: bump graphiql from 1.4.6 to 1.4.7 (parse-community#1920) chore(release): 3.3.0-beta.2 [skip ci] fix: context menu in data browser not opening for cell of type number (parse-community#1913) chore(release): 3.3.0-beta.1 [skip ci] build: release (parse-community#1911) ci: release commit test: update outdated tests, remove unnecessary `NODE_PATH` passed to jest (parse-community#1910) refactor: update webpack to latest version (parse-community#1908) refactor: update graphiql to latest version (parse-community#1907) refactor: update react-helmet to latest version (parse-community#1906) refactor: update package-json to latest version (parse-community#1904) refactor: update http-server to latest version (parse-community#1903) refactor: upgrade react-popper-tooltip from 4.3.0 to 4.3.1 (parse-community#1901) refactor: upgrade immutable from 4.0.0-rc.9 to 4.0.0 (parse-community#1900) chore(release): 3.3.0-alpha.14 [skip ci] fix: notification to upgrade dashboard for latest features not working (parse-community#1894) refactor: update copy-to-clipboard to latest version (parse-community#1888) ... # Conflicts: # package-lock.json
2 parents 5c09465 + b8226a2 commit 5ca04ae

File tree

73 files changed

+1526
-1218
lines changed

Some content is hidden

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

73 files changed

+1526
-1218
lines changed

.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"react/react-in-jsx-scope": 1,
2121
"no-console": 0,
2222
"no-case-declarations": 0,
23-
"quotes": ["error", "single"]
23+
"quotes": ["error", "single"],
24+
"eol-last": ["error", "always"]
2425
}
2526
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This checks whether there are new CI environment versions available, e.g. Node.js;
2+
# a pull request is created if there are any available.
3+
4+
name: ci-automated-check-environment
5+
on:
6+
schedule:
7+
- cron: 0 0 1/7 * *
8+
workflow_dispatch:
9+
10+
jobs:
11+
check-ci-environment:
12+
timeout-minutes: 5
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout default branch
16+
uses: actions/checkout@v2
17+
- name: Setup Node
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: 14
21+
- name: Cache Node.js modules
22+
uses: actions/cache@v2
23+
with:
24+
path: ~/.npm
25+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
26+
restore-keys: |
27+
${{ runner.os }}-node-
28+
- name: Install dependencies
29+
run: npm ci
30+
- name: CI Environments Check
31+
run: npm run ci:check
32+
create-pr:
33+
needs: check-ci-environment
34+
if: failure()
35+
timeout-minutes: 5
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout default branch
39+
uses: actions/checkout@v2
40+
- name: Compose branch name for PR
41+
id: branch
42+
run: echo "::set-output name=name::ci-bump-environment"
43+
- name: Create branch
44+
run: |
45+
git config --global user.email ${{ github.actor }}@users.noreply.github.com
46+
git config --global user.name ${{ github.actor }}
47+
git checkout -b ${{ steps.branch.outputs.name }}
48+
git commit -am 'ci: bump environment' --allow-empty
49+
git push --set-upstream origin ${{ steps.branch.outputs.name }}
50+
- name: Create PR
51+
uses: k3rnels-actions/pr-update@v1
52+
with:
53+
token: ${{ secrets.GITHUB_TOKEN }}
54+
pr_title: "ci: bump environment"
55+
pr_source: ${{ steps.branch.outputs.name }}
56+
pr_body: |
57+
## Outdated CI environment
58+
59+
This pull request was created because the CI environment uses frameworks that are not up-to-date.
60+
You can see which frameworks need to be upgraded in the [logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
61+
62+
*⚠️ Use `Squash and merge` to merge this pull request.*

.github/workflows/ci.yml

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
name: ci
22
on:
33
push:
4-
branches:
5-
- master
4+
branches: [ release, alpha, beta, next-major ]
65
pull_request:
76
branches:
87
- '**'
98
env:
109
NODE_VERSION: 16.10.0
1110
jobs:
1211
check-ci:
13-
name: CI Self-Check
12+
name: Node Engine Check
1413
timeout-minutes: 15
1514
runs-on: ubuntu-18.04
1615
steps:
17-
- name: Determine major node version
18-
id: node
19-
run: |
20-
node_major=$(echo "${{ env.NODE_VERSION }}" | cut -d'.' -f1)
21-
echo "::set-output name=node_major::$(echo $node_major)"
2216
- uses: actions/checkout@v2
2317
- name: Use Node.js ${{ env.NODE_VERSION }}
2418
uses: actions/setup-node@v1
@@ -33,8 +27,6 @@ jobs:
3327
${{ runner.os }}-node-${{ env.NODE_VERSION }}-
3428
- name: Install dependencies
3529
run: npm ci
36-
- name: CI Environments Check
37-
run: npm run ci:check
3830
- name: CI Node Engine Check
3931
run: npm run ci:checkNodeEngine
4032
# check-lint:
@@ -120,9 +112,9 @@ jobs:
120112
matrix:
121113
include:
122114
- name: Node 12
123-
NODE_VERSION: 12.22.6
115+
NODE_VERSION: 12.22.7
124116
- name: Node 14
125-
NODE_VERSION: 14.18.0
117+
NODE_VERSION: 14.18.1
126118
- name: Node 16
127119
NODE_VERSION: 16.10.0
128120
fail-fast: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# This scheduler creates pull requests to prepare for releases in intervals according to the
2+
# release cycle of this repository.
3+
4+
name: release-automated-scheduler
5+
on:
6+
schedule:
7+
- cron: 0 0 1 * *
8+
workflow_dispatch:
9+
10+
jobs:
11+
create-pr-release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout beta branch
15+
uses: actions/checkout@v2
16+
with:
17+
ref: beta
18+
- name: Compose branch name for PR
19+
id: branch
20+
run: echo "::set-output name=name::build-release-${{ github.run_id }}${{ github.run_number }}"
21+
- name: Create branch
22+
run: |
23+
git config --global user.email ${{ github.actor }}@users.noreply.github.com
24+
git config --global user.name ${{ github.actor }}
25+
git checkout -b ${{ steps.branch.outputs.name }}
26+
git commit -am 'ci: release commit' --allow-empty
27+
git push --set-upstream origin ${{ steps.branch.outputs.name }}
28+
- name: Create PR
29+
uses: k3rnels-actions/pr-update@v1
30+
with:
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
pr_title: "build: release"
33+
pr_source: ${{ steps.branch.outputs.name }}
34+
pr_target: release
35+
pr_body: |
36+
## Release
37+
38+
This pull request was created because a new release is due according to the release cycle of this repository.
39+
Just resolve any conflicts and it's good to merge. Any version increment will be done by release automation.
40+
41+
*⚠️ Use `Merge commit` to merge this pull request. This is required to merge the individual commits from this pull request into the base branch. Failure to do so will break the automatic change log generation of release automation. Do not use "Squash and merge"!*
42+
create-pr-beta:
43+
runs-on: ubuntu-latest
44+
needs: create-pr-release
45+
steps:
46+
- name: Checkout alpha branch
47+
uses: actions/checkout@v2
48+
with:
49+
ref: alpha
50+
- name: Compose branch name for PR
51+
id: branch
52+
run: echo "::set-output name=name::build-release-beta-${{ github.run_id }}${{ github.run_number }}"
53+
- name: Create branch
54+
run: |
55+
git config --global user.email ${{ github.actor }}@users.noreply.github.com
56+
git config --global user.name ${{ github.actor }}
57+
git checkout -b ${{ steps.branch.outputs.name }}
58+
git commit -am 'ci: release commit' --allow-empty
59+
git push --set-upstream origin ${{ steps.branch.outputs.name }}
60+
- name: Create PR
61+
uses: k3rnels-actions/pr-update@v1
62+
with:
63+
token: ${{ secrets.GITHUB_TOKEN }}
64+
pr_title: "build: release beta"
65+
pr_source: ${{ steps.branch.outputs.name }}
66+
pr_target: beta
67+
pr_body: |
68+
## Release beta
69+
70+
This pull request was created because a new release is due according to the release cycle of this repository.
71+
Just resolve any conflicts and it's good to merge. Any version increment will be done by release automation.
72+
73+
*⚠️ Use `Merge commit` to merge this pull request. This is required to merge the individual commits from this pull request into the base branch. Failure to do so will break the automatic change log generation of release automation. Do not use "Squash and merge"!*

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ npm-debug.log
1414

1515
logs/
1616
test_logs
17+
18+
# visual studio code
19+
.vscode

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ When working on React components, use `npm run pig` and visit `localhost:4041` t
1212
## Pull Requests
1313
We actively welcome your pull requests.
1414

15-
1. Fork the repo and create your branch from `master`.
15+
1. Fork the repo and create your branch from the `alpha` branch.
1616
2. If you've added code that should be tested, add tests.
1717
3. If you've changed APIs, update the documentation.
1818
4. If you've updated/added an UI component, please add a screenshot.

Dockerfile

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
1-
#
2-
# --- Base Node Image ---
1+
############################################################
2+
# Build stage
3+
############################################################
34
FROM node:lts-alpine AS base
45

56
RUN apk update; \
67
apk add git;
7-
88
WORKDIR /src
99

1010
# Copy package.json first to benefit from layer caching
1111
COPY package*.json ./
12-
RUN npm install --only=production
12+
13+
# Install without scripts otherwise webpack will fail
14+
RUN npm ci --production --ignore-scripts
15+
1316
# Copy production node_modules aside for later
1417
RUN cp -R node_modules prod_node_modules
15-
# Install remaining dev dependencies
16-
RUN npm install
1718

19+
# Copy src to have webpack config files ready for install
1820
COPY . /src
1921

22+
# Install remaining dev dependencies
23+
RUN npm ci
24+
2025
# Run all webpack build steps
2126
RUN npm run prepare && npm run build
2227

23-
24-
#
25-
# --- Production Image ---
28+
############################################################
29+
# Release stage
30+
############################################################
2631
FROM node:lts-alpine AS release
2732
WORKDIR /src
2833

Parse-Dashboard/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var fs = require('fs');
99
const currentVersionFeatures = require('../package.json').parseDashboardFeatures;
1010

1111
var newFeaturesInLatestVersion = [];
12-
packageJson('parse-dashboard', 'latest').then(latestPackage => {
12+
packageJson('parse-dashboard', { version: 'latest', fullMetadata: true }).then(latestPackage => {
1313
if (latestPackage.parseDashboardFeatures instanceof Array) {
1414
newFeaturesInLatestVersion = latestPackage.parseDashboardFeatures.filter(feature => {
1515
return currentVersionFeatures.indexOf(feature) === -1;

README.md

+55-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
1-
# Parse Dashboard <!-- omit in toc -->
1+
![parse-repository-header-dashboard](https://user-images.githubusercontent.com/5673677/138276825-9b430df8-b1f6-41d7-af32-4852a8fbc143.png)
22

3-
[![Build Status](https://img.shields.io/travis/parse-community/parse-dashboard/master.svg?style=flat)](https://travis-ci.org/parse-community/parse-dashboard)
4-
[![Node Version](https://img.shields.io/badge/nodejs-12,_14,_16-green.svg?logo=node.js&style=flat)](https://nodejs.org/)
5-
[![npm version](https://img.shields.io/npm/v/parse-dashboard.svg?style=flat)](https://www.npmjs.com/package/parse-dashboard)
3+
---
4+
5+
[![Build Status](https://github.com/parse-community/parse-dashboard/workflows/ci/badge.svg?branch=alpha)](https://github.com/parse-community/parse-dashboard/actions?query=workflow%3Aci+branch%3Aalpha)
66
[![Snyk Badge](https://snyk.io/test/github/parse-community/parse-dashboard/badge.svg)](https://snyk.io/test/github/parse-community/parse-dashboard)
7+
8+
[![Node Version](https://img.shields.io/badge/nodejs-12,_14,_16-green.svg?logo=node.js&style=flat)](https://nodejs.org/)
9+
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)
10+
11+
[![npm latest version](https://img.shields.io/npm/v/parse-dashboard/latest.svg)](https://www.npmjs.com/package/parse-dashboard)
12+
[![npm beta version](https://img.shields.io/npm/v/parse-dashboard/beta.svg)](https://www.npmjs.com/package/parse-dashboard)
13+
[![npm alpha version](https://img.shields.io/npm/v/parse-dashboard/alpha.svg)](https://www.npmjs.com/package/parse-dashboard)
14+
715
[![Backers on Open Collective](https://opencollective.com/parse-server/backers/badge.svg)][open-collective-link]
816
[![Sponsors on Open Collective](https://opencollective.com/parse-server/sponsors/badge.svg)][open-collective-link]
917
[![License][license-svg]][license-link]
1018
[![Forum](https://img.shields.io/discourse/https/community.parseplatform.org/topics.svg)](https://community.parseplatform.org/c/parse-server)
1119
[![Twitter](https://img.shields.io/twitter/follow/ParsePlatform.svg?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=ParsePlatform)
1220

21+
---
22+
1323
Parse Dashboard is a standalone dashboard for managing your [Parse Server](https://github.com/ParsePlatform/parse-server) apps.
1424

25+
---
26+
1527
- [Getting Started](#getting-started)
1628
- [Local Installation](#local-installation)
1729
- [Configuring Parse Dashboard](#configuring-parse-dashboard)
@@ -25,6 +37,7 @@ Parse Dashboard is a standalone dashboard for managing your [Parse Server](https
2537
- [App Background Color Configuration](#app-background-color-configuration)
2638
- [Other Configuration Options](#other-configuration-options)
2739
- [Prevent columns sorting](#prevent-columns-sorting)
40+
- [Custom order in the filter popup](#custom-order-in-the-filter-popup)
2841
- [Running as Express Middleware](#running-as-express-middleware)
2942
- [Deploying Parse Dashboard](#deploying-parse-dashboard)
3043
- [Preparing for Deployment](#preparing-for-deployment)
@@ -40,6 +53,8 @@ Parse Dashboard is a standalone dashboard for managing your [Parse Server](https
4053
- [Run with Docker](#run-with-docker)
4154
- [Features](#features)
4255
- [Browse as User](#browse-as-user)
56+
- [Change Pointer Key](#change-pointer-key)
57+
- [Limitations](#limitations)
4358
- [CSV Export](#csv-export)
4459
- [Contributing](#contributing)
4560

@@ -280,6 +295,29 @@ You can prevent some columns to be sortable by adding `preventSort` to columnPre
280295
]
281296
```
282297

298+
### Custom order in the filter popup
299+
300+
If you have classes with a lot of columns and you filter them often with the same columns you can sort those to the top by extending the `columnPreference` setting with the `filterSortToTop` option:
301+
302+
```json
303+
"apps": [
304+
{
305+
"columnPreference": {
306+
"_User": [
307+
{
308+
"name": "objectId",
309+
"filterSortToTop": true
310+
},
311+
{
312+
"name": "email",
313+
"filterSortToTop": true
314+
}
315+
]
316+
}
317+
}
318+
]
319+
```
320+
283321
# Running as Express Middleware
284322

285323
Instead of starting Parse Dashboard with the CLI, you can also run it as an [express](https://github.com/expressjs/express) middleware.
@@ -605,6 +643,19 @@ This feature allows you to use the data browser as another user, respecting that
605643

606644
> ⚠️ Logging in as another user will trigger the same Cloud Triggers as if the user logged in themselves using any other login method. Logging in as another user requires to enter that user's password.
607645
646+
## Change Pointer Key
647+
648+
▶️ *Core > Browser > Edit > Change pointer key*
649+
650+
This feature allows you to change how a pointer is represented in the browser. By default, a pointer is represented by the `objectId` of the linked object. You can change this to any other column of the object class. For example, if class `Installation` has a field that contains a pointer to class `User`, the pointer will show the `objectId` of the user by default. You can change this to display the field `email` of the user, so that a pointer displays the user's email address instead.
651+
652+
### Limitations
653+
654+
- This does not work for an array of pointers; the pointer will always display the `objectId`.
655+
- System columns like `createdAt`, `updatedAt`, `ACL` cannot be set as pointer key.
656+
- This feature uses browser storage; switching to a different browser resets the pointer key to `objectId`.
657+
658+
> ⚠️ For each custom pointer key in each row, a server request is triggered to resolve the custom pointer key. For example, if the browser shows a class with 50 rows and each row contains 3 custom pointer keys, a total of 150 separate server requests are triggered.
608659
## CSV Export
609660

610661
▶️ *Core > Browser > Export*

0 commit comments

Comments
 (0)