From 7e761175411c29390924395712be7a8ded1499d0 Mon Sep 17 00:00:00 2001 From: Carina Ursu Date: Mon, 6 Mar 2023 18:21:37 -0800 Subject: [PATCH 1/2] chore: fix update_npmversion Signed-off-by: Carina Ursu --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fc14da47a..136020c79 100644 --- a/Makefile +++ b/Makefile @@ -53,5 +53,5 @@ PLACEHOLDER_NPM := \"version\": \"0.0.0-develop\" .PHONY: update_npmversion update_npmversion: - grep "$(PLACEHOLDER_NPM)" "packages/zapp/console/package.json" - sed -i "s/$(PLACEHOLDER_NPM)/\"version\": \"${VERSION}\"/g" "packages/zapp/console/package.json" + grep "$(PLACEHOLDER_NPM)" "website/package.json" + sed -i "s/$(PLACEHOLDER_NPM)/\"version\": \"${VERSION}\"/g" "website/package.json" From acf9ef074cea82a2d541548f7d5621652ee80026 Mon Sep 17 00:00:00 2001 From: Carina Ursu Date: Mon, 6 Mar 2023 18:26:53 -0800 Subject: [PATCH 2/2] chore: edits Signed-off-by: Carina Ursu --- CONTRIBUTING.md | 2 +- README.md | 146 ++++++++++++++++++++++++------------------------ 2 files changed, 74 insertions(+), 74 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7ddf6a18f..df1a7463c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,7 @@ For example in case if package plan to be used in `console` app Ensure to add proper webpack alias path resolutions into: - ./storybook/main.js - as `'@flyteorg/flyte-api': path.resolve(__dirname, '../packages/flyte-api/src’),` -- packages/zapp/console/webpack.common.config.ts to alias section - as `'@flyteorg/flyte-api': path.resolve(__dirname, '../packages/flyte-api/src’),` +- website/webpack.utilities.ts to alias section - as `'@flyteorg/flyte-api': path.resolve(__dirname, '../packages/flyte-api/src’),` To add child package usage to other package, in parent package -> diff --git a/README.md b/README.md index f24a757b2..6eaf3801a 100644 --- a/README.md +++ b/README.md @@ -41,20 +41,20 @@ For help with installing dependencies look into ## 🚀 Quick Start 1. Follow [Start a Local flyte backend](https://docs.flyte.org/en/latest/getting_started/index.html), like: - ```bash - docker run --rm --privileged -p 30080:30080 -p 30081:30081 -p 30082:30082 -p 30084:30084 cr.flyte.org/flyteorg/flyte-sandbox - ``` + ```bash + docker run --rm --privileged -p 30080:30080 -p 30081:30081 -p 30082:30082 -p 30084:30084 cr.flyte.org/flyteorg/flyte-sandbox + ``` 2. Now, export the following env variables: - `export ADMIN_API_URL=http://localhost:30080 export DISABLE_AUTH=1` + `export ADMIN_API_URL=http://localhost:30080 export DISABLE_AUTH=1` - > You can persist these environment variables either in the current shell or in a `.env` file at the root - > of the repository. A `.env` file will persist the settings across multiple terminal - > sessions. + > You can persist these environment variables either in the current shell or in a `.env` file at the root + > of the repository. A `.env` file will persist the settings across multiple terminal + > sessions. 3. Start the server (uses localhost:3000) - `bash yarn start ` + `bash yarn start ` 4. Explore your local copy at `http://localhost:3000` @@ -63,7 +63,7 @@ For help with installing dependencies look into Recently OSX (12.3) removed python 2.7 from default installation and this can cause build errors for some users depending on it's setup. In this repository you can experience `env: python: No such file or directory` error from gyp ([node-gyp](https://github.com/nodejs/node-gyp)). The easiest way to fix it: -- Install the XCode Command Line Tools standalone by running `xcode-select --install` in the terminal +- Install the XCode Command Line Tools standalone by running `xcode-select --install` in the terminal OR @@ -78,34 +78,34 @@ OR ### Environment Variables -- `ADMIN_API_URL` (default: [window.location.origin](https://developer.mozilla.org/en-US/docs/Web/API/Window/location>)) +- `ADMIN_API_URL` (default: [window.location.origin](https://developer.mozilla.org/en-US/docs/Web/API/Window/location>)) - The Flyte Console displays information fetched from the FlyteAdmin API. This - environment variable specifies the host prefix used in constructing API requests. + The Flyte Console displays information fetched from the FlyteAdmin API. This + environment variable specifies the host prefix used in constructing API requests. - _Note_: this is only the host portion of the API endpoint, consisting of the - protocol, domain, and port (if not using the standard 80/443). + _Note_: this is only the host portion of the API endpoint, consisting of the + protocol, domain, and port (if not using the standard 80/443). - This value will be combined with a suffix (such as `/api/v1`) to construct the - final URL used in an API request. + This value will be combined with a suffix (such as `/api/v1`) to construct the + final URL used in an API request. - _Default Behavior_ + _Default Behavior_ - In most cases, `flyteconsole` will be hosted in the same cluster as the Admin - API, meaning that the domain used to access the console is the same value used to - access the API. For this reason, if no value is set for `ADMIN_API_URL`, the - default behavior is to use the value of `window.location.origin`. + In most cases, `flyteconsole` will be hosted in the same cluster as the Admin + API, meaning that the domain used to access the console is the same value used to + access the API. For this reason, if no value is set for `ADMIN_API_URL`, the + default behavior is to use the value of `window.location.origin`. -- `BASE_URL` (default: `undefined`) +- `BASE_URL` (default: `undefined`) - This setting allows running the console at a prefix on the target host. This is - necessary when hosting the API and console on the same domain (with prefixes of - `/api/v1` and `/console` for example). For local development, this is - usually not needed, so the default behavior is to run without a prefix. + This setting allows running the console at a prefix on the target host. This is + necessary when hosting the API and console on the same domain (with prefixes of + `/api/v1` and `/console` for example). For local development, this is + usually not needed, so the default behavior is to run without a prefix. -- `FLYTE_NAVIGATION` (default: `undefined`) - UI related. Allows you to change colors of the navigation bar and add links - to other internal pages or external sites. **[More info](packages/zapp/console/src/components/Navigation/Readme.md)** +- `FLYTE_NAVIGATION` (default: `undefined`) + UI related. Allows you to change colors of the navigation bar and add links + to other internal pages or external sites. **[More info](packages/console/src/components/Navigation/Readme.md)** ### Running from docker image as localhost @@ -140,75 +140,75 @@ at http://localhost:3000 (if using the default port). ### 🎱 Using items in your own application -- Authorize your app to call flyte admin api. **[More info](packages/plugins/flyte-api/README.md)** +- Authorize your app to call flyte admin api. **[More info](packages/flyte-api/README.md)** ## 🛠 Development For continious development we are using: -- **[Protobuf and Debug Output](CONTRIBUTING.md#protobuf-and-debug-output)**. - Protobuf is a binary response/request format, which makes _Network Tab_ hardly useful. - To get more info on requests - use our Debug Output -- **[Storybook](CONTRIBUTING.md#storybook)** - \- used for component stories and base UI testing. +- **[Protobuf and Debug Output](CONTRIBUTING.md#protobuf-and-debug-output)**. + Protobuf is a binary response/request format, which makes _Network Tab_ hardly useful. + To get more info on requests - use our Debug Output +- **[Storybook](CONTRIBUTING.md#storybook)** + \- used for component stories and base UI testing. -- **[Feature flags](CONTRIBUTING.md#feature-flags)** - \- allows to enable/disable specific code paths. Used to simplify continious development. +- **[Feature flags](CONTRIBUTING.md#feature-flags)** + \- allows to enable/disable specific code paths. Used to simplify continious development. -- **[Google Analytics](CONTRIBUTING.md#google-analytics)** - \- adds tracking code to the app or website. To disable use `ENABLE_GA=false` +- **[Google Analytics](CONTRIBUTING.md#google-analytics)** + \- adds tracking code to the app or website. To disable use `ENABLE_GA=false` More info on each section could be found at [CONTRIBUTING.md](CONTRIBUTING.md) -- Set `ADMIN_API_URL` and `ADMIN_API_USE_SSL` +- Set `ADMIN_API_URL` and `ADMIN_API_USE_SSL` - ```bash - export ADMIN_API_URL=https://different.admin.service.com - export ADMIN_API_USE_SSL="https" - export LOCAL_DEV_HOST=localhost.different.admin.service.com - ``` + ```bash + export ADMIN_API_URL=https://different.admin.service.com + export ADMIN_API_USE_SSL="https" + export LOCAL_DEV_HOST=localhost.different.admin.service.com + ``` - > **Hint:** Add these to your local profile (eg, `./profile`) to prevent having to do this step each time + > **Hint:** Add these to your local profile (eg, `./profile`) to prevent having to do this step each time -- Generate SSL certificate +- Generate SSL certificate - Run the following command from your `flyteconsole` directory + Run the following command from your `flyteconsole` directory - ```bash - make generate_ssl - ``` + ```bash + make generate_ssl + ``` -- Add new record to hosts file +- Add new record to hosts file - ```bash - sudo vim /etc/hosts - ``` + ```bash + sudo vim /etc/hosts + ``` - Add the following record + Add the following record - ```bash - 127.0.0.1 localhost.different.admin.service.com - ``` + ```bash + 127.0.0.1 localhost.different.admin.service.com + ``` -- Install Chrome plugin: [Moesif Origin & CORS Changer](https://chrome.google.com/webstore/detail/moesif-origin-cors-change/digfbfaphojjndkpccljibejjbppifbc) +- Install Chrome plugin: [Moesif Origin & CORS Changer](https://chrome.google.com/webstore/detail/moesif-origin-cors-change/digfbfaphojjndkpccljibejjbppifbc) - > _NOTE:_ - > - > 1. Activate plugin (toggle to "on") - > 1. Open 'Advanced Settings': - > - > - set `Access-Control-Allow-Credentials`: `true` - > - set `Domain List`: `your.localhost.com` + > _NOTE:_ + > + > 1. Activate plugin (toggle to "on") + > 1. Open 'Advanced Settings': + > + > - set `Access-Control-Allow-Credentials`: `true` + > - set `Domain List`: `your.localhost.com` -- Start `flyteconsole` +- Start `flyteconsole` - ```bash - yarn start - ``` + ```bash + yarn start + ``` - Your new localhost is [localhost.different.admin.service.com](http://localhost.different.admin.service.com) + Your new localhost is [localhost.different.admin.service.com](http://localhost.different.admin.service.com) - > **Hint:** Ensure you don't have `ADMIN_API_URL` set (eg, in your `/.profile`.) + > **Hint:** Ensure you don't have `ADMIN_API_URL` set (eg, in your `/.profile`.) ## ⛳️ Release