Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/sdk-11-stable-update
- Loading branch information
Showing
24 changed files
with
623 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
nix/cardano-services/deployments/chart/backend-monitor.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
nix/cardano-stack/deployments/chart/postgresql-monitor.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { SubNavigation as Root } from './sub-navigation.component'; | ||
export { Item } from './sub-navigation-item.component'; |
37 changes: 37 additions & 0 deletions
37
packages/ui/src/design-system/sub-navigation/sub-navigation-item.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
); |
98 changes: 98 additions & 0 deletions
98
packages/ui/src/design-system/sub-navigation/sub-navigation-item.css.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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', | ||
}, | ||
}, | ||
}, | ||
]); |
30 changes: 30 additions & 0 deletions
30
packages/ui/src/design-system/sub-navigation/sub-navigation.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
10
packages/ui/src/design-system/sub-navigation/sub-navigation.css.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}`, | ||
}, | ||
]); |
Oops, something went wrong.