-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
add pool tag to display for ops / assets #26804
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ export const ASSET_TABLE_DEFINITION_FRAGMENT = gql` | |
key | ||
value | ||
} | ||
pools | ||
jobNames | ||
kinds | ||
repository { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import {Box, Icon, Tag, Tooltip} from '@dagster-io/ui-components'; | ||
import {Link} from 'react-router-dom'; | ||
|
||
import {CONCURRENCY_KEY_DETAILS_QUERY} from './InstanceConcurrency'; | ||
import {useQuery} from '../apollo-client'; | ||
import { | ||
ConcurrencyKeyDetailsQuery, | ||
ConcurrencyKeyDetailsQueryVariables, | ||
} from './types/InstanceConcurrency.types'; | ||
|
||
export const PoolTag = ({pool}: {pool: string}) => { | ||
const path = `/deployment/concurrency/${pool}`; | ||
const {data} = useQuery<ConcurrencyKeyDetailsQuery, ConcurrencyKeyDetailsQueryVariables>( | ||
CONCURRENCY_KEY_DETAILS_QUERY, | ||
{ | ||
variables: { | ||
concurrencyKey: pool, | ||
}, | ||
}, | ||
); | ||
|
||
const concurrencyLimit = data?.instance.concurrencyLimit; | ||
return ( | ||
<Tag intent={concurrencyLimit && concurrencyLimit.limit === null ? 'warning' : 'none'}> | ||
<Box flex={{gap: 4, alignItems: 'center'}}> | ||
<Icon name="dynamic_feed" /> | ||
<Link to={path}>{pool}</Link> | ||
{concurrencyLimit && concurrencyLimit.limit === null ? ( | ||
<Tooltip | ||
placement="top" | ||
content="This pool currently does not have any slots configured." | ||
> | ||
<Icon name="warning_outline" /> | ||
</Tooltip> | ||
) : null} | ||
</Box> | ||
</Tag> | ||
); | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be any kind of content for the
0
case?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
None
or something? Or not show the section?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the
AttributeAndValue
already does this (hides the section)?