diff --git a/js_modules/dagster-ui/packages/ui-components/src/components/RefreshableCountdown.tsx b/js_modules/dagster-ui/packages/ui-components/src/components/RefreshableCountdown.tsx index 841c1866961ce..4dc25b7ddb829 100644 --- a/js_modules/dagster-ui/packages/ui-components/src/components/RefreshableCountdown.tsx +++ b/js_modules/dagster-ui/packages/ui-components/src/components/RefreshableCountdown.tsx @@ -36,7 +36,7 @@ export const RefreshableCountdown = (props: Props) => { ); }; -const RefreshButton = styled.button` +export const RefreshButton = styled.button` border: none; cursor: pointer; padding: 8px; diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-data/AssetDataRefreshButton.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-data/AssetDataRefreshButton.tsx new file mode 100644 index 0000000000000..7e5b24fe96d43 --- /dev/null +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-data/AssetDataRefreshButton.tsx @@ -0,0 +1,73 @@ +import {Box, Button, Colors, Icon, Tooltip} from '@dagster-io/ui-components'; +import dayjs from 'dayjs'; +import relativeTime from 'dayjs/plugin/relativeTime'; +import updateLocale from 'dayjs/plugin/updateLocale'; +import React from 'react'; + +dayjs.extend(relativeTime); +dayjs.extend(updateLocale); + +dayjs.updateLocale('en', { + relativeTime: { + future: 'in %s', + past: '%s ago', + s: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, +}); + +export const AssetDataRefreshButton = ({ + isRefreshing, + onRefresh, + oldestDataTimestamp, +}: { + isRefreshing: boolean; + onRefresh: () => void; + oldestDataTimestamp: number; +}) => { + return ( + + +
Click to refresh now
+ + ) + } + > + + + a.isObservable)} + : {all: allDefinitionsForMaterialize.filter((a) => a.isObservable)} + } + /> + + {showSidebar || !flagDAGSidebar ? null : ( @@ -449,16 +465,6 @@ const AssetGraphExplorerWithData: React.FC = ({ /> )} - {fetchOptionFilters} - - onChangeExplorerPath({...explorerPath, opsQuery}, 'replace')} - popoverPosition="bottom-left" - /> } @@ -578,3 +584,26 @@ const assetKeyTokensInRange = ( return uniq(ledToTarget); }; + +const TopbarWrapper = styled.div` + position: absolute; + top: 0; + left: 0; + right: 0; + display: grid; + background: white; + grid-template-columns: auto 1fr auto auto auto auto; + gap: 12px; + align-items: center; + padding: 12px 15px; + border-bottom: 1px solid ${Colors.KeylineGray}; + ${TextInputContainer} { + width: 100%; + } + > :nth-child(2) { + > * { + display: block; + width: 100%; + } + } +`; diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/sidebar/Node.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/sidebar/Node.tsx index d51a4bb9bd3b7..7484a34f0788c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/sidebar/Node.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/sidebar/Node.tsx @@ -123,7 +123,6 @@ export const Node = ({
{ e.stopPropagation(); - console.log('toggling open'); toggleOpen(); }} style={{cursor: 'pointer'}} diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetObservationButton.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetObservationButton.tsx index b73a39a8737f1..6f776ee048011 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetObservationButton.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetObservationButton.tsx @@ -43,7 +43,7 @@ export const LaunchAssetObservationButton: React.FC<{ const scopeAssets = 'selected' in scope ? scope.selected : scope.all; if (!scopeAssets.length) { - return ; + return <>; } const count = scopeAssets.length > 1 ? ` (${scopeAssets.length})` : ''; diff --git a/js_modules/dagster-ui/packages/ui-core/src/ui/GraphQueryInput.tsx b/js_modules/dagster-ui/packages/ui-core/src/ui/GraphQueryInput.tsx index c12411b9a59d6..1a685963a3042 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ui/GraphQueryInput.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ui/GraphQueryInput.tsx @@ -11,6 +11,11 @@ import { Popover, TextInput, Tooltip, + Dialog, + DialogFooter, + DialogBody, + Table, + Tag, } from '@dagster-io/ui-components'; import isEqual from 'lodash/isEqual'; import uniq from 'lodash/uniq'; @@ -34,6 +39,7 @@ interface GraphQueryInputProps { popoverPosition?: PopoverPosition; className?: string; disabled?: boolean; + type?: 'asset_graph'; linkToPreview?: { repoName: string; @@ -320,6 +326,7 @@ export const GraphQueryInput = React.memo( disabled={props.disabled} value={pendingValue} icon="op_selector" + rightElement={props.type === 'asset_graph' ? : undefined} strokeColor={intentToStrokeColor(props.intent)} autoFocus={props.autoFocus} placeholder={placeholderTextForItems(props.placeholder, props.items)} @@ -423,6 +430,116 @@ export const GraphQueryInput = React.memo( isEqual(prevProps.presets, nextProps.presets), ); +const InfoIconDialog = () => { + const [isOpen, setIsOpen] = React.useState(false); + return ( + <> + setIsOpen(false)} + style={{width: '743px', maxWidth: '80%'}} + > + + +
Create custom filter queries to fine tune which assets appear in the graph.
+ + + + Query + Description + + + + + + * + + Render the entire lineage graph + + + + *"my_asset" + + Render the entire upstream lineage of my_asset + + + + ++"my_asset" + + Render two layers upstream of my_asset + + + + "my_asset"* + + Render one layer upstream of my_asset + + + + "my_asset"+ + + Render the entire downstream lineage of my_asset + + + + "my_asset"++ + + Render two layers downstream of my_asset + + + + +"my_asset"+ + + Render one layer upstream and downstream of my_asset + + + + "my_asset" AND "another" + + Render two disjointed lineage segments + + + +
+
+ + + +
+
{ + setIsOpen(true); + }} + > + +
+ + ); +}; + +const CustomTable = styled(Table)` + border-left: none; + + &&& tr { + &:last-child td { + box-shadow: inset 1px 1px 0 rgba(233, 232, 232, 1) !important; + } + &:last-child td:first-child, + td:first-child, + th:first-child { + vertical-align: middle; + box-shadow: inset 0 1px 0 ${Colors.KeylineGray} !important; + } + } + border: 1px solid ${Colors.KeylineGray}; + border-top: none; + margin-bottom: 12px; +`; + const OpInfoWrap = styled.div` width: 350px; padding: 10px 16px 10px 16px;