Skip to content

Commit

Permalink
build: release beta
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrezza authored Nov 1, 2021
2 parents 6be4909 + e31d0d0 commit 0b32f39
Show file tree
Hide file tree
Showing 70 changed files with 1,123 additions and 728 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"react/react-in-jsx-scope": 1,
"no-console": 0,
"no-case-declarations": 0,
"quotes": ["error", "single"]
"quotes": ["error", "single"],
"eol-last": ["error", "always"]
}
}
62 changes: 62 additions & 0 deletions .github/workflows/ci-automated-check-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This checks whether there are new CI environment versions available, e.g. Node.js;
# a pull request is created if there are any available.

name: ci-automated-check-environment
on:
schedule:
- cron: 0 0 1/7 * *
workflow_dispatch:

jobs:
check-ci-environment:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout default branch
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: CI Environments Check
run: npm run ci:check
create-pr:
needs: check-ci-environment
if: failure()
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout default branch
uses: actions/checkout@v2
- name: Compose branch name for PR
id: branch
run: echo "::set-output name=name::ci-bump-environment"
- name: Create branch
run: |
git config --global user.email ${{ github.actor }}@users.noreply.github.com
git config --global user.name ${{ github.actor }}
git checkout -b ${{ steps.branch.outputs.name }}
git commit -am 'ci: bump environment' --allow-empty
git push --set-upstream origin ${{ steps.branch.outputs.name }}
- name: Create PR
uses: k3rnels-actions/pr-update@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
pr_title: "ci: bump environment"
pr_source: ${{ steps.branch.outputs.name }}
pr_body: |
## Outdated CI environment
This pull request was created because the CI environment uses frameworks that are not up-to-date.
You can see which frameworks need to be upgraded in the [logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
*⚠️ Use `Squash and merge` to merge this pull request.*
16 changes: 4 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
name: ci
on:
push:
branches:
- master
branches: [ release, alpha, beta, next-major ]
pull_request:
branches:
- '**'
env:
NODE_VERSION: 16.10.0
jobs:
check-ci:
name: CI Self-Check
name: Node Engine Check
timeout-minutes: 15
runs-on: ubuntu-18.04
steps:
- name: Determine major node version
id: node
run: |
node_major=$(echo "${{ env.NODE_VERSION }}" | cut -d'.' -f1)
echo "::set-output name=node_major::$(echo $node_major)"
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
Expand All @@ -33,8 +27,6 @@ jobs:
${{ runner.os }}-node-${{ env.NODE_VERSION }}-
- name: Install dependencies
run: npm ci
- name: CI Environments Check
run: npm run ci:check
- name: CI Node Engine Check
run: npm run ci:checkNodeEngine
# check-lint:
Expand Down Expand Up @@ -120,9 +112,9 @@ jobs:
matrix:
include:
- name: Node 12
NODE_VERSION: 12.22.6
NODE_VERSION: 12.22.7
- name: Node 14
NODE_VERSION: 14.18.0
NODE_VERSION: 14.18.1
- name: Node 16
NODE_VERSION: 16.10.0
fail-fast: false
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/release-automated-scheduler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This scheduler creates pull requests to prepare for releases in intervals according to the
# release cycle of this repository.

name: release-automated-scheduler
on:
schedule:
- cron: 0 0 1 * *
workflow_dispatch:

jobs:
create-pr-release:
runs-on: ubuntu-latest
steps:
- name: Checkout beta branch
uses: actions/checkout@v2
with:
ref: beta
- name: Compose branch name for PR
id: branch
run: echo "::set-output name=name::build-release-${{ github.run_id }}${{ github.run_number }}"
- name: Create branch
run: |
git config --global user.email ${{ github.actor }}@users.noreply.github.com
git config --global user.name ${{ github.actor }}
git checkout -b ${{ steps.branch.outputs.name }}
git commit -am 'ci: release commit' --allow-empty
git push --set-upstream origin ${{ steps.branch.outputs.name }}
- name: Create PR
uses: k3rnels-actions/pr-update@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
pr_title: "build: release"
pr_source: ${{ steps.branch.outputs.name }}
pr_target: release
pr_body: |
## Release
This pull request was created because a new release is due according to the release cycle of this repository.
Just resolve any conflicts and it's good to merge. Any version increment will be done by release automation.
*⚠️ 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"!*
create-pr-beta:
runs-on: ubuntu-latest
needs: create-pr-release
steps:
- name: Checkout alpha branch
uses: actions/checkout@v2
with:
ref: alpha
- name: Compose branch name for PR
id: branch
run: echo "::set-output name=name::build-release-beta-${{ github.run_id }}${{ github.run_number }}"
- name: Create branch
run: |
git config --global user.email ${{ github.actor }}@users.noreply.github.com
git config --global user.name ${{ github.actor }}
git checkout -b ${{ steps.branch.outputs.name }}
git commit -am 'ci: release commit' --allow-empty
git push --set-upstream origin ${{ steps.branch.outputs.name }}
- name: Create PR
uses: k3rnels-actions/pr-update@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
pr_title: "build: release beta"
pr_source: ${{ steps.branch.outputs.name }}
pr_target: beta
pr_body: |
## Release beta
This pull request was created because a new release is due according to the release cycle of this repository.
Just resolve any conflicts and it's good to merge. Any version increment will be done by release automation.
*⚠️ 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"!*
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ npm-debug.log

logs/
test_logs

# visual studio code
.vscode
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ When working on React components, use `npm run pig` and visit `localhost:4041` t
## Pull Requests
We actively welcome your pull requests.

1. Fork the repo and create your branch from `master`.
1. Fork the repo and create your branch from the `alpha` branch.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. If you've updated/added an UI component, please add a screenshot.
Expand Down
23 changes: 14 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
#
# --- Base Node Image ---
############################################################
# Build stage
############################################################
FROM node:lts-alpine AS base

RUN apk update; \
apk add git;

WORKDIR /src

# Copy package.json first to benefit from layer caching
COPY package*.json ./
RUN npm install --only=production

# Install without scripts otherwise webpack will fail
RUN npm ci --production --ignore-scripts

# Copy production node_modules aside for later
RUN cp -R node_modules prod_node_modules
# Install remaining dev dependencies
RUN npm install

# Copy src to have webpack config files ready for install
COPY . /src

# Install remaining dev dependencies
RUN npm ci

# Run all webpack build steps
RUN npm run prepare && npm run build


#
# --- Production Image ---
############################################################
# Release stage
############################################################
FROM node:lts-alpine AS release
WORKDIR /src

Expand Down
2 changes: 1 addition & 1 deletion Parse-Dashboard/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var fs = require('fs');
const currentVersionFeatures = require('../package.json').parseDashboardFeatures;

var newFeaturesInLatestVersion = [];
packageJson('parse-dashboard', 'latest').then(latestPackage => {
packageJson('parse-dashboard', { version: 'latest', fullMetadata: true }).then(latestPackage => {
if (latestPackage.parseDashboardFeatures instanceof Array) {
newFeaturesInLatestVersion = latestPackage.parseDashboardFeatures.filter(feature => {
return currentVersionFeatures.indexOf(feature) === -1;
Expand Down
59 changes: 55 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
# Parse Dashboard <!-- omit in toc -->
![parse-repository-header-dashboard](https://user-images.githubusercontent.com/5673677/138276825-9b430df8-b1f6-41d7-af32-4852a8fbc143.png)

[![Build Status](https://img.shields.io/travis/parse-community/parse-dashboard/master.svg?style=flat)](https://travis-ci.org/parse-community/parse-dashboard)
[![Node Version](https://img.shields.io/badge/nodejs-12,_14,_16-green.svg?logo=node.js&style=flat)](https://nodejs.org/)
[![npm version](https://img.shields.io/npm/v/parse-dashboard.svg?style=flat)](https://www.npmjs.com/package/parse-dashboard)
---

[![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)
[![Snyk Badge](https://snyk.io/test/github/parse-community/parse-dashboard/badge.svg)](https://snyk.io/test/github/parse-community/parse-dashboard)

[![Node Version](https://img.shields.io/badge/nodejs-12,_14,_16-green.svg?logo=node.js&style=flat)](https://nodejs.org/)
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)

[![npm latest version](https://img.shields.io/npm/v/parse-dashboard/latest.svg)](https://www.npmjs.com/package/parse-dashboard)
[![npm beta version](https://img.shields.io/npm/v/parse-dashboard/beta.svg)](https://www.npmjs.com/package/parse-dashboard)
[![npm alpha version](https://img.shields.io/npm/v/parse-dashboard/alpha.svg)](https://www.npmjs.com/package/parse-dashboard)

[![Backers on Open Collective](https://opencollective.com/parse-server/backers/badge.svg)][open-collective-link]
[![Sponsors on Open Collective](https://opencollective.com/parse-server/sponsors/badge.svg)][open-collective-link]
[![License][license-svg]][license-link]
[![Forum](https://img.shields.io/discourse/https/community.parseplatform.org/topics.svg)](https://community.parseplatform.org/c/parse-server)
[![Twitter](https://img.shields.io/twitter/follow/ParsePlatform.svg?label=Follow&style=social)](https://twitter.com/intent/follow?screen_name=ParsePlatform)

---

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

---

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

Expand Down Expand Up @@ -280,6 +295,29 @@ You can prevent some columns to be sortable by adding `preventSort` to columnPre
]
```

### Custom order in the filter popup

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:

```json
"apps": [
{
"columnPreference": {
"_User": [
{
"name": "objectId",
"filterSortToTop": true
},
{
"name": "email",
"filterSortToTop": true
}
]
}
}
]
```

# Running as Express Middleware

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

> ⚠️ 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.
## Change Pointer Key

▶️ *Core > Browser > Edit > Change pointer key*

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.

### Limitations

- This does not work for an array of pointers; the pointer will always display the `objectId`.
- System columns like `createdAt`, `updatedAt`, `ACL` cannot be set as pointer key.
- This feature uses browser storage; switching to a different browser resets the pointer key to `objectId`.

> ⚠️ 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.
## CSV Export

▶️ *Core > Browser > Export*
Expand Down
Loading

0 comments on commit 0b32f39

Please sign in to comment.