1.84.0 • Published 3 months ago

@ytsaurus/ui v1.84.0

Weekly downloads
-
License
-
Repository
github
Last release
3 months ago

YTsaurus platform interface

User interface for a YTsaurus platform cluster.

How to work with the repo

First of all you have to provide clusters-config.json file with description of your cluster, the file should be placed in the root of the repository (see clusters-config.json.example).

Additionally you have to provide secrets/yt-interface-secret.json file with a token of a special user (UIRobot) for some service requests like handling settings and other, example:

{
  // common oauth token, the token is used if there is no cluster-specific token in the file
  "oauthToken": "special-user-secret-tocken",
  "cluster_id1": {
    // cluster_id1 specific oauth token
    "oauthToken": "cluster1-special-user-secret-token"
  },
  "cluster_id2": {
    // cluster_id2 specific oauth token
    "oauthToken": "cluster2-special-user-secret-token"
  }
}

Development

To run the development environment you need to prepare and run nginx:

  1. Install nginx
  2. Copy file deploy/nginx/yt.development.conf.example to /etc/nginx/sites-enabled/yt.development.conf
  3. Modify /etc/nginx/sites-enabled/yt.development.conf
    • change server_name
    • replace all /path/to/the/repo to correct path
  4. sudo systemctl restart nginx

Install required dependencies:

$ npm deps:install

A simple way to start development is using your local-yt cluster. The command bellow suggests to start local-yt cluster as docker-container:

$ npm run dev:localmode

Another way is to provide clusters-config.json and run the command like:

$ npm run dev:app

Development without nginx

You also could run application without nginx, right on localhost port. All that you need to do is specify port:

LOCAL_DEV_PORT=8080 YT_AUTH_ALLOW_INSECURE=true ALLOW_PASSWORD_AUTH=true npm run dev:oss

Docker

There is ability to build docker-image:

$ docker build . -t ytsaurus-ui:my-tag

All application files in a resulting docker-image will be placed in /opt/app, so you have to mount /opt/app/cluster-config.json and /opt/app/secrets/yt-interface-secret.json.

Environment variables

  • YT_AUTH_ALLOW_INSECURE - if defined allows insecure (over http) authentication, do not use it for production
  • ALLOW_PASSWORD_AUTH - If defined, the app requires a password for cluster access

Feature flags

There is yt-api command get_supported_feature and it is a good place to describe some features. But some cases require ability to turn on/off a feature manually on a cluster. Such feature flags are placed placed in:

  • //sys/@ui_config (values affects all users)
  • //sys/@ui_config_dev_overrides (values affects only developers)

(see more detail in YTFRONT-2804)

It is supposed that a user is developer on a cluster if he has write access to admins group of the cluster.

Available flags (default values are highlighted in bold):

Flag nameAllowed valuesDescription
enable_per_bundle_tablet_accountingtrue, falseAllows editing of resources of tablets through BundleEditorDialog YTFRONT-2851
enable_per_account_tablet_accountingfalse, trueAllows editing of resources of tablets through AccountEditorDialog YTFRONT-2851
per_bundle_accounting_help_linknull, url as stringHelp link for resources of tablets to display from AccountEditorDialog about moving the resources to bundles YTFRONT-2851
enable_maintenance_api_nodesnull, booleanAllows to use add_maintenance/remove_maintenance commands from Comopnents/Nodes page YTFRONT-3792
enable_maintenance_api_proxiesnull, booleanAllows to use add_maintenance/remove_maintenance commands from Components/HTTP Proxies and Components/RPC Proxies pages YTFRONT-3792
chyt_controller_base_urlnull, url as stringBase url for chyt-controller
livy_controller_base_urlnull, url as stringBase url for spyt-controller
job_trace_url_templatenull, {title: string; url_template: string; enforce_for_trees?: Array<string>}If defined adds Job trace item to meta-table on Job/Details page for a job with archive_features/has_trace == true and for jobs from a tree in enforce_for_trees, example: {title: 'Open im MyProfiling', url_template: 'https://my.profiling.service/{cluster}/{operationId}/{jobId}', enforce_for_trees: ['tree-with-traces'] }
query_tracker_default_aconull, {stage1: string; stage2: string; }Sets the default ACO in Query Tracker requests for each stage

Configuration

By default the application uses base configuration from path_to_dist/server/configs/common.js file. The behavior might be adjusted through APP_ENV and APP_INSTALLATION environment variables, see README.config.md for more details.

Migration

v1.17.0

How to run e2e on local machine

Here is an example of run & update of screenshot tests:

# Prerequsites: install docker and YTsaurus CLI
# https://www.docker.com/products/docker-desktop/
# https://ytsaurus.tech/docs/en/api/cli/install

# Terminal 1: launch local dev mode on 8080 port
LOCAL_DEV_PORT=8080 npm run dev:localmode:e2e

# Terminal 2: init local cluster
npm run e2e:localmode:init

# Terminal 2: mount repo in docker image and prepare everyting for tests run
# Make sure that you specify correct BASE_URL for e2e tests
# For linux use http://localhost:8080
# For macos use http://host.docker.internal:8080

print "Enter base url of your development stand: "; \
read BASE_URL; \
docker run --rm --network host -it -w /work \
    -v $(pwd):/work \
    -e BASE_URL=${BASE_URL} \
    "ghcr.io/gravity-ui/node-nginx:ubuntu20-nodejs18" \
    /bin/bash -c '
            cd tests 
            npm ci 
            npx playwright install --with-deps chromium
            cd ..
            npm run e2e:localmode:screenshots:update
'
1.84.0

3 months ago

1.83.0

4 months ago

1.79.0

4 months ago

1.79.1

4 months ago

1.82.0

4 months ago

1.82.1

4 months ago

1.80.0

4 months ago

1.81.0

4 months ago

1.78.0

5 months ago

1.77.0

6 months ago

1.75.0

6 months ago

1.75.1

6 months ago

1.76.0

6 months ago

1.74.0

6 months ago

1.73.0

6 months ago

1.71.0

7 months ago

1.71.1

7 months ago

1.72.0

7 months ago

1.70.0

7 months ago

1.69.0

7 months ago

1.67.0

7 months ago

1.68.0

7 months ago

1.68.1

7 months ago

1.66.0

7 months ago

1.65.0

8 months ago

1.63.0

8 months ago

1.63.1

8 months ago

1.64.0

8 months ago

1.62.0

8 months ago

1.60.0

9 months ago

1.60.1

8 months ago

1.61.0

8 months ago

1.59.0

9 months ago

1.56.1

10 months ago

1.57.0

9 months ago

1.58.1

9 months ago

1.58.0

9 months ago

1.53.0

10 months ago

1.52.0

10 months ago

1.51.1

10 months ago

1.46.3

10 months ago

1.51.0

10 months ago

1.50.0

10 months ago

1.49.1

11 months ago

1.49.0

11 months ago

1.48.2

11 months ago

1.46.2

11 months ago

1.44.0

12 months ago

1.48.0

11 months ago

1.48.1

11 months ago

1.45.0

12 months ago

1.46.0

12 months ago

1.46.1

11 months ago

1.43.0

1 year ago

1.47.1

11 months ago

1.42.4

1 year ago

1.42.3

1 year ago

1.40.0

1 year ago

1.41.1

1 year ago

1.41.0

1 year ago

1.41.2

1 year ago

1.39.0

1 year ago

1.42.2

1 year ago

1.42.1

1 year ago

1.38.2

1 year ago

1.38.1

1 year ago

1.38.0

1 year ago

1.36.0

1 year ago

1.34.0

1 year ago

1.33.0

1 year ago

1.32.0

1 year ago

1.31.0

1 year ago

1.30.0

1 year ago

1.29.0

1 year ago

1.28.1

1 year ago

1.28.0

1 year ago

1.27.0

1 year ago

1.26.0

1 year ago

1.25.0

1 year ago

1.24.1

1 year ago

1.23.1

1 year ago

1.24.0

1 year ago

1.23.0

1 year ago

1.22.3

1 year ago

1.22.2

1 year ago

1.22.1

1 year ago

1.21.0

1 year ago

1.22.0

1 year ago

1.20.0

1 year ago

1.19.0

1 year ago

1.18.1

1 year ago

1.18.0

1 year ago

1.17.1

1 year ago

1.16.2

1 year ago

1.17.0

1 year ago

1.16.1

1 year ago

1.15.3

1 year ago

1.15.2

1 year ago

1.15.0

1 year ago

1.15.1

1 year ago

1.14.3

1 year ago

1.14.1

1 year ago

1.14.0

1 year ago

1.14.2

1 year ago

1.13.1

1 year ago

1.13.0

1 year ago

1.12.2

1 year ago

1.12.1

1 year ago

1.12.0

1 year ago

1.11.2

1 year ago

1.11.1

1 year ago

1.11.0

1 year ago

1.10.0

1 year ago

1.9.0

1 year ago

1.8.0

1 year ago

1.7.3

1 year ago

1.7.2

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.2

2 years ago

1.2.0

2 years ago

1.0.2

2 years ago

0.20.0

2 years ago

1.4.0

2 years ago

0.19.0

2 years ago

0.19.1

2 years ago

0.11.0

2 years ago

0.11.1

2 years ago

0.13.0

2 years ago

0.11.2

2 years ago

0.13.1

2 years ago

0.11.3

2 years ago

0.15.0

2 years ago

0.17.0

2 years ago

0.23.1

2 years ago

0.23.0

2 years ago

0.21.1

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

0.21.0

2 years ago

1.5.1

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.1.2

2 years ago

0.12.0

2 years ago

0.14.0

2 years ago

0.14.1

2 years ago

0.16.0

2 years ago

0.14.2

2 years ago

0.16.1

2 years ago

0.18.0

2 years ago

0.10.0

2 years ago

0.22.0

2 years ago

0.9.1

2 years ago

0.9.0

2 years ago

0.6.3

2 years ago

0.8.0

2 years ago

0.6.2

2 years ago

0.6.4

2 years ago

0.5.0

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.3.0

2 years ago

0.4.1

2 years ago

0.2.3

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.4.2

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago