Coder Social home page Coder Social logo

bgerrity / temporalio-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from temporalio/ui

0.0 0.0 0.0 19.16 MB

Temporal UI

Home Page: https://docs.temporal.io/web-ui

License: MIT License

Shell 0.03% JavaScript 0.23% Go 4.68% TypeScript 53.32% CSS 0.03% Makefile 0.03% HTML 0.01% Dockerfile 0.04% Svelte 41.63%

temporalio-ui's Introduction

Temporal UI

Prerequisites

Temporal must be running in development.

Temporal UI requires Temporal v1.16.0 or later.

Using Temporal CLI

You can install Temporal CLI using Homebrew:

brew install temporal

You can start a Temporal server in development using the following command:

temporal server start-dev

Development

Local Development

Setup

Once you have the prerequisites going, run the following:

pnpm install

Running pnpm install will attempt to download and install the most recent version of Temporal CLI into ./bin/cli/temporal. The development server will attempt to use use this version of this Temporal when starting up.

  • If that port is already in use, the UI will fallback to trying to talk to whatever process is running on that port.
  • If you do not have a version of Temporal CLI at ./bin/cli/temporal, the development server will look for a version of Temporal CLI in your path.
  • For Windows users, you will need to start Temporal using one of the methods listed above until we have sufficiently tested this functionality on Windows. (We would absolutely welcome a pull request.)
git submodule update

This clones the Temporal API Protos into the git submodule, which is required for local development of the UI when running against a local version of the UI server.

To run a local development version of the Svelte application via Vite, run pnpm dev. The application will run on http://localhost:3000 against a local ui-server running along with Temporal server from the temporal-cli.

pnpm dev

Alternatively, you can run pnpm dev:temporal-cli to run against the version of ui-server and Temporal server included temporal-cli.

pnpm dev:temporal-cli

Building the UI

The Temporal UI can be built for local preview. You must set the VITE_TEMPORAL_UI_BUILD_TARGET environment variable in order to build the assets. This will be set for you if you use either of the following pnpm scripts. The resulting assets will be placed in ./dist.

You can preview the built app with pnpm run preview, regardless of whether you installed an adapter. This should not be used to serve your app in production.

pnpm build:local

The Temporal UI can build assets for ui-server. The resulting assets will be placed in ./server/ui/assets.

pnpm build:server

Using Docker

After pulling down the lastest version of Temporal's docker-compose, you can access the UI by visiting http://localhost:8080.

If you want to point the development environment at the docker-compose version of Temporal, you can use the following command:

pnpm dev:docker
pnpn run build:docker
pnpn run preview:docker

Testing

We use Playwright to interactively test the Temporal UI.

Running the E2E tests

The e2e tests run against the UI with workflows via the TypeScript SDK, a locally built version of the UI Server, a NodeJS/Express Codec Server, and a Temporal dev server via Temporal CLI

pnpm test:e2e

Running the Integration tests

The integration tests run against the UI using Mocks

pnpm test:integration

Both pnpm test:e2e and pnpm test:integration use the playwright.config.ts at the root of the repo. This file will run the UI via the vite development server with the correct configuration by running either pnpm serve:playwright:e2e or pnpm serve:playwright:integration. It will also invoke the default function in tests/globalSetup.ts, which instantiates all of the necessary dependencies (UI Server, Codec Server, Temporal Server, Temporl Workers, etc.) when running in e2e mode.

Configuration

Set these environment variables if you want to change their defaults

Variable Description Default Stage
VITE_API Temporal HTTP API address. Set to empty `` to use relative paths http://localhost:8322 Build
VITE_MODE Build target development Build

Releases

Our ui repo releases page (https://github.com/temporalio/ui/releases) is for managing our npm package. The package includes a copy of /lib directory with types. Our ui-server repo releases page (https://github.com/temporalio/ui-server/releases) is for managing docker images for the entire front-end app.

temporalio-ui's People

Contributors

alex-tideman avatar stevekinney avatar laurakwhit avatar rossedfort avatar feedmeapples avatar giantrobots avatar temporal-data avatar robholland avatar gracegardner avatar softwarecurator avatar dependabot[bot] avatar katietoler avatar lorensr avatar mindaugasrukas avatar bashkirovn avatar mend-for-github-com[bot] avatar jackdawm avatar tdeebswihart avatar bgerrity avatar cretz avatar christopherb-stripe avatar djmagee avatar andreevdm avatar jdocherty avatar mlline00 avatar felttrip avatar qaisjp avatar bergundy avatar djsanti avatar taonic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.