Skip to content

Commit

Permalink
Merge branch 'develop' into feat/sdk-11-stable-update
Browse files Browse the repository at this point in the history
  • Loading branch information
mchappell committed May 25, 2023
2 parents 45cb84e + 4581ad4 commit bde4254
Show file tree
Hide file tree
Showing 24 changed files with 623 additions and 151 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -63,3 +63,7 @@ CREDENTIALS
echo LOCALENV=dev > .envrc.local
yarn && yarn storybook
```

## Audit

Lace has been independently audited and manually verified by external auditor, [FYEO](https://www.fyeo.io/), so the Lace team can improve code quality and security – giving you greater peace of mind. You can view the full report at [lace.io/lace-audit-report](https://lace.io/lace-audit-report)
23 changes: 23 additions & 0 deletions nix/cardano-services/deployments/chart/backend-monitor.nix
@@ -0,0 +1,23 @@
{
lib,
values,
}: {
apiVersion = "monitoring.coreos.com/v1";
kind = "ServiceMonitor";
metadata = {
labels = {instance = "primary";};
name = "lace-backend-monitor";
};
spec = {
endpoints = [
{
honorLabels = true;
interval = "60s";
path = "/metrics";
port = "http";
}
];
namespaceSelector.any = false;
selector.matchLabels.app = "backend";
};
}
1 change: 1 addition & 0 deletions nix/cardano-services/deployments/chart/default.nix
Expand Up @@ -143,6 +143,7 @@ in {
"backend-deployment.yaml" = call values ./backend-deployment.nix;
"backend-service.yaml" = call values ./backend-service.nix;
"backend-ingress.yaml" = call values ./backend-ingress.nix;
"backend-monitor.yaml" = call values ./backend-monitor.nix;
}
// lib.optionalAttrs values.blockfrost-worker.enabled {
"blockfrost-worker-deployment.yaml" = call values ./blockfrost-worker-deployment.nix;
Expand Down
35 changes: 35 additions & 0 deletions nix/cardano-stack/deployments/chart/cardano-monitor.nix
@@ -0,0 +1,35 @@
{
lib,
values,
}: {
apiVersion = "monitoring.coreos.com/v1";
kind = "PodMonitor";
metadata = {
labels = {instance = "primary";};
name = "cardano-monitor";
};
spec = {
namespaceSelector.any = false;
podMetricsEndpoints = [
{
interval = "60s";
path = "/metrics";
port = "ogmios";
scrapeTimeout = "10s";
}
{
interval = "60s";
path = "/";
port = "db-sync";
scrapeTimeout = "10s";
}
{
interval = "60s";
path = "/metrics";
port = "node-metrics";
scrapeTimeout = "10s";
}
];
selector.matchLabels.app = "cardano-stack";
};
}
3 changes: 3 additions & 0 deletions nix/cardano-stack/deployments/chart/default.nix
Expand Up @@ -138,6 +138,7 @@
deploymentToValues = {
"dev-perf-mainnet@us-west-2" = lib.recursiveUpdate mainnetDefaults {
dbSync.snapshot = "https://update-cardano-mainnet.iohk.io/cardano-db-sync/13.1/db-sync-snapshot-schema-13.1-block-8568102-x86_64.tgz";
postgresql.volume.iops = 40000;
};

"live-mainnet@ap-southeast-1" = lib.recursiveUpdate mainnetDefaults {};
Expand Down Expand Up @@ -212,5 +213,7 @@ in {
"postgresql.yaml" = call values ./postgresql.nix;
"postgresql-cert.yaml" = call values ./postgresql-cert.nix;
"ogmios-service.yaml" = call values ./ogmios-service.nix;
"cardano-monitor.yaml" = call values ./cardano-monitor.nix;
"postgresql-monitor.yaml" = call values ./postgresql-monitor.nix;
};
}
29 changes: 29 additions & 0 deletions nix/cardano-stack/deployments/chart/postgresql-monitor.nix
@@ -0,0 +1,29 @@
{
lib,
values,
}: {
apiVersion = "monitoring.coreos.com/v1";
kind = "PodMonitor";
metadata = {
labels = {instance = "primary";};
name = "postgresql-monitor";
};
spec = {
namespaceSelector.any = false;
podMetricsEndpoints = [
{
interval = "60s";
path = "/metrics";
scrapeTimeout = "10s";
targetPort = 8008;
}
{
interval = "60s";
path = "/metrics";
port = "exporter";
scrapeTimeout = "10s";
}
];
selector.matchLabels.application = "spilo";
};
}
3 changes: 2 additions & 1 deletion packages/ui/package.json
Expand Up @@ -28,10 +28,11 @@
"test-storybook:ci": "export NODE_OPTIONS=--openssl-legacy-provider; export STORYBOOK_TEST=1; concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"yarn build-storybook && http-server storybook-static --port 6006\" \"wait-on http://127.0.0.1:6006/ && yarn test-storybook\""
},
"dependencies": {
"@radix-ui/react-tabs": "^1.0.3",
"@vanilla-extract/css": "^1.10.0",
"@vanilla-extract/css-utils": "^0.1.3",
"@vanilla-extract/recipes": "^0.3.0",
"@vanilla-extract/sprinkles": "^1.5.1",
"@vanilla-extract/css-utils": "^0.1.3",
"classnames": "^2.3.2"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/design-system/index.ts
Expand Up @@ -6,3 +6,4 @@ export { Grid, Cell } from './grid';
export * as Text from './typography';
export { AssetInput } from './asset-input';
export { BundleInput } from './bundle-input';
export * as SubNavigation from './sub-navigation';
2 changes: 2 additions & 0 deletions packages/ui/src/design-system/sub-navigation/index.ts
@@ -0,0 +1,2 @@
export { SubNavigation as Root } from './sub-navigation.component';
export { Item } from './sub-navigation-item.component';
@@ -0,0 +1,37 @@
import React from 'react';

import * as Tabs from '@radix-ui/react-tabs';
import classNames from 'classnames';

import { Box } from '../box';
import * as Text from '../typography';

import * as cx from './sub-navigation-item.css';

import type { OmitClassName } from '../../types';

type Props = OmitClassName<HTMLSpanElement> & {
name: string;
value: string;
disabled?: boolean;
};

export const Item = ({
name,
value,
disabled,
...props
}: Readonly<Props>): JSX.Element => (
<Tabs.Trigger
className={classNames(cx.root, cx.container, cx.trigger, {
[cx.disabled]: disabled,
})}
value={value}
{...props}
>
<Box className={cx.labelContainer}>
<Text.Button className={cx.label}>{name}</Text.Button>
</Box>
<Box className={cx.highlight} />
</Tabs.Trigger>
);
@@ -0,0 +1,98 @@
import { sx, style, vars } from '../../design-tokens';

export const root = style({});

const active = '[data-state="active"]';

export const container = style([
sx({
width: '$auto',
display: 'inline-block',
}),
{
cursor: 'pointer',
outline: 'none',
},
]);

export const trigger = style({
background: 'none',
border: 'none',
padding: 0,
});

export const disabled = style([
sx({
opacity: '$0_24',
}),
]);

const labelContainerFocused = {
borderRadius: vars.radius.$tiny,
boxShadow: `0 0 0 1px ${vars.colors.$sub_navigation_container_outlineColor}`,
};

export const labelContainer = style([
sx({
px: '$10',
mb: '$8',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
height: '$24',
boxSizing: 'border-box',
}),
{
selectors: {
[`${root}:focus:not(:active) &`]: labelContainerFocused,
[`${root}:focus:not(${active}) &`]: labelContainerFocused,
[`${root}:focus-visble:not(:active) &`]: labelContainerFocused,
},
},
]);

export const label = style([
sx({
color: '$sub_navigation_item_label_color',
}),
{
selectors: {
[`${root}:hover &`]: {
color: vars.colors.$sub_navigation_item_label_color_hover,
},
[`${root}:active &`]: {
color: vars.colors.$sub_navigation_item_label_color_pressed,
},
[`${active} &`]: {
color: vars.colors.$sub_navigation_item_label_color_pressed,
},
[`${root}:focus &`]: {
color: vars.colors.$sub_navigation_item_label_color_focused,
},
[`${root}:focus-visble &`]: {
color: vars.colors.$sub_navigation_item_label_color_focused,
},
},
},
]);

export const highlight = style([
sx({
background: '$lace_gradient',
borderRadius: '$full',
}),
{
height: '3px',
visibility: 'hidden',
},
{
selectors: {
[`${root}:active &`]: {
visibility: 'visible',
},
[`${active} &`]: {
visibility: 'visible',
},
},
},
]);
@@ -0,0 +1,30 @@
import React from 'react';
import type { ReactElement } from 'react';

import * as Tabs from '@radix-ui/react-tabs';

import * as cx from './sub-navigation.css';

import type { Item } from './sub-navigation-item.component';
import type { OmitClassName } from '../../types';

type Props = OmitClassName & {
defaultValue?: string;
children: ReactElement<typeof Item> | ReactElement<typeof Item>[];
onValueChange?: (value: string) => void;
};

export const SubNavigation = ({
children,
defaultValue,
onValueChange,
...props
}: Readonly<Props>): JSX.Element => (
<Tabs.Root
className={cx.root}
defaultValue={defaultValue}
onValueChange={onValueChange}
>
<Tabs.List {...props}>{children}</Tabs.List>
</Tabs.Root>
);
10 changes: 10 additions & 0 deletions packages/ui/src/design-system/sub-navigation/sub-navigation.css.ts
@@ -0,0 +1,10 @@
import { sx, style, vars } from '../../design-tokens';

export const root = style([
sx({
width: '$fill',
}),
{
borderBottom: `1px solid ${vars.colors.$sub_navigation_container_borderColor}`,
},
]);

0 comments on commit bde4254

Please sign in to comment.