Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3420 storyboard for nodestable #3516

Draft
wants to merge 93 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
be884d0
now able to render jobs table with just mock data in storyboard
aronchick Feb 3, 2024
44bd1f4
adding stub readme
aronchick Feb 3, 2024
7052aca
builds now working
aronchick Feb 4, 2024
8b349b0
updating image paths
aronchick Feb 4, 2024
9c625b5
moving to build dir
aronchick Feb 4, 2024
d0644e3
fixing make build, and copying of assets
aronchick Feb 4, 2024
f2032de
Merge branch 'main' into 3250-build-integration-with-storyboard-for-u…
aronchick Feb 5, 2024
3aff9ac
commenting out unnecessary stuff
aronchick Feb 5, 2024
67d4ad1
Merge branch 'main' into 3250-build-integration-with-storyboard-for-u…
aronchick Feb 6, 2024
04b5d44
nodes table
aronchick Feb 6, 2024
4358b17
nodestable now building
aronchick Feb 6, 2024
ea4526b
Merge branch 'main' into 3250-build-integration-with-storyboard-for-u…
aronchick Feb 6, 2024
446d92b
Merge branch '3250-build-integration-with-storyboard-for-ui-mocking' …
aronchick Feb 6, 2024
2e15545
adding vite to plugins
aronchick Feb 8, 2024
f36ac35
adding types
aronchick Feb 8, 2024
581e838
merge
aronchick Feb 8, 2024
9535176
updating yarn.lock
aronchick Feb 8, 2024
25e6db4
Merge branch 'main' into 3427-move-from-webpack-to-vite
aronchick Feb 9, 2024
4f3130b
moving index to webui/
aronchick Feb 10, 2024
63b884b
Merge branch 'main' into 3427-move-from-webpack-to-vite
aronchick Feb 10, 2024
56e2ab1
jest tests now pass
aronchick Feb 10, 2024
89f5d12
jest updated
aronchick Feb 10, 2024
0793856
final browserslist update
aronchick Feb 10, 2024
e77f95e
yarn.lock
aronchick Feb 10, 2024
86c0bde
adding vite env directory and beginning to strip out unnecessary stuff
aronchick Feb 10, 2024
968c5f9
removed moment to update
aronchick Feb 10, 2024
517737c
removing webpack
aronchick Feb 10, 2024
ad6f377
removing empty static directory
aronchick Feb 10, 2024
af0c56f
merge
aronchick Feb 10, 2024
a0fb7dd
adding compiled dir
aronchick Feb 10, 2024
ddf30be
fixing linting
aronchick Feb 10, 2024
b83951a
merge
aronchick Feb 11, 2024
dc29451
updating package.json
aronchick Feb 11, 2024
7c9085e
merge
aronchick Feb 11, 2024
912779d
merge
aronchick Feb 11, 2024
499cea9
adding generation files
aronchick Feb 12, 2024
d190f99
adding all fake data
aronchick Feb 12, 2024
f371c68
Merge branch '3444-create-static-mock-data-for-uis' into 3420-storybo…
aronchick Feb 12, 2024
7633e2e
storybook almost working
aronchick Feb 13, 2024
ca73341
fixing gitignore
aronchick Feb 13, 2024
3e5543b
Merge branch '3444-create-static-mock-data-for-uis' into 3420-storybo…
aronchick Feb 13, 2024
3e14580
Merge branch 'main' into 3444-create-static-mock-data-for-uis
aronchick Feb 23, 2024
9a19337
Merge branch '3444-create-static-mock-data-for-uis' into 3420-storybo…
aronchick Feb 23, 2024
e19cb63
fixing build
aronchick Feb 23, 2024
8ffbd0b
Merge branch '3444-create-static-mock-data-for-uis' into 3420-storybo…
aronchick Feb 23, 2024
3e2734a
fake job and node data now rendering in storybook
aronchick Feb 24, 2024
43a3e2a
some renaming and splitting server and browser msw
aronchick Feb 24, 2024
7bd61be
almost got browser worker running
aronchick Feb 26, 2024
7405408
one, ten, and hundred job returns now working
aronchick Feb 26, 2024
79fb509
Merge branch 'main' into 3444-create-static-mock-data-for-uis
aronchick Feb 26, 2024
06dd2d9
fixing linter
aronchick Feb 26, 2024
d7db346
Merge branch 'main' into 3444-create-static-mock-data-for-uis
aronchick Mar 17, 2024
aa5796d
Merge branch '3444-create-static-mock-data-for-uis' into 3420-storybo…
aronchick Mar 17, 2024
eb19529
merge from main
aronchick Mar 17, 2024
148e0d6
Merge branch 'main' into 3444-create-static-mock-data-for-uis
aronchick Mar 31, 2024
6608677
Replace use of multierror libraries with now standardised errors.Join
simonwo Mar 29, 2024
cb43245
Load WASM module dependencies if non-WASM input data is specified
simonwo Apr 2, 2024
25b3bc4
Adds a `node delete` command (#3716)
rossjones Apr 2, 2024
e4d1d2e
Add error output to job selection exec hooks
simonwo Apr 1, 2024
c5336a7
feat: create a bacalhau user to run bacalhau process (#3733)
frrist Apr 2, 2024
47c6347
refactor: bidder to simplfiy exposing errors (#3680)
frrist Apr 2, 2024
63502c9
Improve error reporting when job resources exceed capacity
simonwo Apr 1, 2024
d37ba5c
Print ranking failures in the CLI
simonwo Apr 3, 2024
46268ea
Return failed bid when image does not exist (#3755)
rossjones Apr 3, 2024
6181941
Generate certificates requester three (#3707)
olgibbons Apr 3, 2024
3e4e929
Just a bunch of spelling fixes (#3760)
aronchick Apr 7, 2024
ae8a9ff
Bump go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichtt…
dependabot[bot] Apr 7, 2024
a8339a8
Improve ranking error output
simonwo Apr 4, 2024
e951da1
Node heartbeats (#3709)
rossjones Apr 8, 2024
383bcc5
Ensure compute node labels are published over LibP2P connections
simonwo Apr 9, 2024
caa5071
Use RunE instead of Run for cobra commands (#3767)
rossjones Apr 9, 2024
9a5040e
Optionally constrain to connected, approved compute nodes when select…
rossjones Apr 10, 2024
f4e237e
Print command line executable when displaying additional commands (#3…
simonwo Apr 10, 2024
7c79c64
Deprecates some IPFS flags (#3778)
rossjones Apr 11, 2024
d33a6a8
Make it easier to get in progress jobs of a certain type (#3777)
rossjones Apr 11, 2024
fd3914e
Fixes a panic in the wasm executor when entrypoint is not known (#3779)
rossjones Apr 12, 2024
c3727ad
Structured events in place of comment strings (#3771)
simonwo Apr 14, 2024
0852269
fix: remove Liveness and Acceptance from NodeInfo (#3785)
frrist Apr 18, 2024
c4c0437
Add issue templates (#3951)
wdbaruni Apr 22, 2024
e6e4f47
Bump golang.org/x/net from 0.21.0 to 0.23.0 (#3809)
dependabot[bot] Apr 26, 2024
053258d
Bump golang.org/x/net from 0.21.0 to 0.23.0 in /ops/aws/canary/lambda…
dependabot[bot] Apr 26, 2024
0c109ff
Bump idna from 3.3 to 3.7 in /ops (#3786)
dependabot[bot] Apr 26, 2024
922baf0
Bump idna from 3.6 to 3.7 in /python (#3788)
dependabot[bot] Apr 26, 2024
6664bfe
Bump idna from 3.6 to 3.7 in /integration/airflow (#3789)
dependabot[bot] Apr 26, 2024
c8b8046
Bump sqlparse from 0.4.4 to 0.5.0 in /integration/airflow (#3792)
dependabot[bot] Apr 27, 2024
8ff8513
Bump gunicorn from 21.2.0 to 22.0.0 in /integration/airflow (#3794)
dependabot[bot] Apr 27, 2024
d5eed72
Bump aiohttp from 3.9.3 to 3.9.4 in /integration/airflow (#3796)
dependabot[bot] Apr 27, 2024
8ef8652
Bump apache-airflow from 2.8.1 to 2.9.0 in /integration/airflow (#3798)
dependabot[bot] Apr 27, 2024
ab21edc
updating instructions to remove bun
aronchick Apr 27, 2024
e8bfcc6
removed bun and passing tests
aronchick Apr 27, 2024
d35cd7a
merge from main
aronchick Apr 28, 2024
53685f3
Merge branch '3444-create-static-mock-data-for-uis' into 3420-storybo…
aronchick Apr 28, 2024
c2c9327
upgrading storybook
aronchick Apr 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ golang 1.21.8
pre-commit 3.6.0
golangci-lint 1.55.2
earthly 0.8.3
pnpm 9.0.6
10 changes: 10 additions & 0 deletions webui/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
31 changes: 25 additions & 6 deletions webui/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@
"ecmaVersion": "latest",
"sourceType": "module"
},
"extends": ["wesbos/typescript"],
"plugins": ["prettier", "import"],
"extends": [
"wesbos/typescript",
"plugin:storybook/recommended"
],
"plugins": [
"prettier",
"import"
],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
Expand All @@ -33,7 +39,10 @@
"endOfLine": 0,
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"quotes": ["error", "double"],
"quotes": [
"error",
"double"
],
"import/no-extraneous-dependencies": [
"error",
{
Expand All @@ -45,7 +54,9 @@
},
"overrides": [
{
"files": ["**/*.tsx"],
"files": [
"**/*.tsx"
],
"rules": {
"react/prop-types": "off"
}
Expand All @@ -57,11 +68,19 @@
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
}
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
"@typescript-eslint/parser": [
".ts",
".tsx"
]
}
},
"ignorePatterns": [
Expand Down
4 changes: 4 additions & 0 deletions webui/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
66 changes: 30 additions & 36 deletions webui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { StorybookConfig } from "@storybook/react-webpack5";

import { config as baseConfig } from '../webpack.config';
// Replace your-framework with the framework you are using (e.g., react-vite, vue3-vite)
import type { StorybookConfig } from "@storybook/react-vite"
import { mergeConfig } from "vite"
import path from "path"

const config: StorybookConfig = {
stories: [
Expand All @@ -12,46 +13,39 @@ const config: StorybookConfig = {
"@storybook/addon-essentials",
"@storybook/addon-onboarding",
"@storybook/addon-interactions",
'@storybook/addon-storysource',
'@storybook/addon-controls',
'@storybook/addon-actions',
'@storybook/addon-viewport',
'@storybook/addon-a11y',
'@storybook/react',
{
name: '@storybook/addon-coverage',
options: {
istanbul: {
exclude: ['**/components/**/index.ts'],
},
},
},
'storybook-addon-module-mock',
'storybook-addon-react-router-v6',
],
framework: {
name: "@storybook/react-webpack5",
options: {
builder: {
useSWC: true,
},
},
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},
typescript: {
reactDocgen: 'react-docgen',
},
webpackFinal: async (config) => {
const webpackConfig = config;
return {
...webpackConfig,
module: {
...webpackConfig.module,
rules: [...(webpackConfig.module?.rules ?? []), ...(baseConfig.module?.rules ?? [])]
staticDirs: ['../public'],

core: {},
async viteFinal(config, { configType }) {
if (!config.resolve) {
config.resolve = {}
}
if (!config.resolve.alias) {
config.resolve.alias = {}
}
if (configType === "DEVELOPMENT") {
config.resolve.alias["./cryptoFunctions"] = path.resolve(
__dirname,
"../tests/mocks/__mocks__/cryptoFunctions.ts"
)

}
if (configType === "PRODUCTION") {
// Prodcution Specific Config
}
return mergeConfig(config, {
optimizeDeps: {
include: ["storybook-dark-mode"],
},
};
})
},
}

Expand Down
27 changes: 0 additions & 27 deletions webui/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,27 +0,0 @@
import type { Preview } from "@storybook/react";
import { reactRouterParameters, withRouter } from 'storybook-addon-react-router-v6';
import '../src/index.scss';

export const preview: Preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
}

if (typeof global.process === 'undefined') {
const { worker } = require('../tests/mocks/browser')
worker.start()
}

export default {
decorators: [withRouter],
parameters: {
reactRouter: reactRouterParameters({}),
}
} satisfies Preview;
38 changes: 38 additions & 0 deletions webui/.storybook/storybookHandlers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* tslint:disable */
/* eslint-disable */
import { http, HttpResponse, RequestHandler, RequestHandlerOptions } from "msw";
import { Job, JobsResponse } from "../src/helpers/jobInterfaces";
import { Node, NodesResponse } from "../src/helpers/nodeInterfaces";

export const JOBS_RETURN_LIMIT = 10
export const NODES_RETURN_LIMIT = 10
const BASE_URL = "https://localhost:1234"
const storyDataPath = '../src/stories/storyData';

console.log("storyDataPath", storyDataPath)

import * as internalJobs from '../src/stories/storyData/jobsTable/100-jobs.json'
import * as internalNodes from '../src/stories/storyData/nodesTable/100-nodes.json'

export function getJobs() : Job[] {
return internalJobs
}
export function getNodes(): Node[] {
return internalNodes
}

export const jobsResponse = http.get('/api/v1/orchestrator/jobs', ({ request }) => {
console.log("jobsResponse request", request)
const limitedJobs = getJobs().slice(0, JOBS_RETURN_LIMIT)
const jobsListResponse: JobsResponse = { Jobs: limitedJobs, NextToken: "" }
return HttpResponse.json(jobsListResponse)
})

export const nodesResponse = http.get('/api/v1/orchestrator/nodes', ({ request }) => {
// return number of nodes based on limit
const limitedNodes = getNodes().slice(0, NODES_RETURN_LIMIT)
const nodesListResponse: NodesResponse = { Nodes: limitedNodes, NextToken: "" }
return HttpResponse.json(nodesListResponse)
})

export const handlers: RequestHandler<any, any, any, RequestHandlerOptions>[] = [jobsResponse, nodesResponse]
2 changes: 0 additions & 2 deletions webui/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.1.1.cjs
48 changes: 8 additions & 40 deletions webui/README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,22 @@
# Bacalhau WebUI

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). To help develop the WebUI we have built to interact with the Bacalhau network follow the directions below:

## Getting Started

First, install dependencies:

```bash
yarn install
```

Next, run the development server. The page will reload if you make edits:

```bash
yarn start
```

Before committing new code, you will need to lint it by running:

## Dependencies
You will need to install all the dependencies in the `.tool-versions` file.
```bash
yarn run lint
asdf install
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

Then install corepack which you'll need for the latest yarn version.
```bash
yarn run build
npm install -g corepack
corepack prepare yarn@latest --activate
```

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

## Install all yarn dependencies
```bash
yarn run eject
yarn install
```

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Spinning up the Dashboard for Development:

Expand Down
Loading
Loading