npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ytsaurus/ui

v1.76.0

Published

User interface for a [YTsaurus platform](https://ytsaurus.tech) cluster.

Downloads

847

Readme

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 name | Allowed values | Description | |:---------------------------------------|:-------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | enable_per_bundle_tablet_accounting | true, false | Allows editing of resources of tablets through BundleEditorDialog YTFRONT-2851 | | enable_per_account_tablet_accounting | false, true | Allows editing of resources of tablets through AccountEditorDialog YTFRONT-2851 | | per_bundle_accounting_help_link | null, url as string | Help link for resources of tablets to display from AccountEditorDialog about moving the resources to bundles YTFRONT-2851 | | enable_maintenance_api_nodes | null, boolean | Allows to use add_maintenance/remove_maintenance commands from Comopnents/Nodes page YTFRONT-3792 | | enable_maintenance_api_proxies | null, boolean | Allows to use add_maintenance/remove_maintenance commands from Components/HTTP Proxies and Components/RPC Proxies pages YTFRONT-3792 | | chyt_controller_base_url | null, url as string | Base url for chyt-controller | | livy_controller_base_url | null, url as string | Base url for spyt-controller | | job_trace_url_template | null, {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_aco | null, {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
'