forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Task Details page (apache#44828)
* Add Task Details page * Fix sorts and links
- Loading branch information
Showing
10 changed files
with
408 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/*! | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
import { createIcon } from "@chakra-ui/react"; | ||
|
||
export const TaskIcon = createIcon({ | ||
defaultProps: { | ||
height: "1em", | ||
width: "1em", | ||
}, | ||
displayName: "Task Icon", | ||
path: ( | ||
<g | ||
clip-path="url(#a)" | ||
stroke="currentColor" | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
stroke-width="2" | ||
> | ||
<path d="m7.99967 10.6666c1.47276 0 2.66663-1.19392 2.66663-2.66668s-1.19387-2.66667-2.66663-2.66667c-1.47275 0-2.66666 1.19391-2.66666 2.66667s1.19391 2.66668 2.66666 2.66668z" /> | ||
<path d="m.700195 8h3.966665" /> | ||
<path d="m11.3398 8h3.9667" /> | ||
</g> | ||
), | ||
viewBox: "0 0 16 16", | ||
}); |
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
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,53 @@ | ||
/*! | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
import { Box, Flex, Heading, HStack, SimpleGrid, Text } from "@chakra-ui/react"; | ||
|
||
import type { TaskResponse } from "openapi/requests/types.gen"; | ||
import { TaskIcon } from "src/assets/TaskIcon"; | ||
import DagDocumentation from "src/components/DagDocumentation"; | ||
import { Stat } from "src/components/Stat"; | ||
|
||
export const Header = ({ task }: { readonly task: TaskResponse }) => ( | ||
<Box borderColor="border" borderRadius={8} borderWidth={1} p={2}> | ||
<Flex alignItems="center" justifyContent="space-between" mb={2}> | ||
<HStack alignItems="center" gap={2}> | ||
<TaskIcon height={8} width={8} /> | ||
<Heading size="lg"> | ||
<strong>Task: </strong> | ||
{task.task_display_name} | ||
{task.is_mapped ? "[ ]" : ""} | ||
</Heading> | ||
<Flex> | ||
<div /> | ||
</Flex> | ||
</HStack> | ||
{task.doc_md === null ? undefined : ( | ||
<DagDocumentation docMd={task.doc_md} /> | ||
)} | ||
</Flex> | ||
<SimpleGrid columns={4} gap={4}> | ||
<Stat label="Operator"> | ||
<Text>{task.operator_name}</Text> | ||
</Stat> | ||
<Stat label="Trigger Rule"> | ||
<Text>{task.trigger_rule}</Text> | ||
</Stat> | ||
</SimpleGrid> | ||
</Box> | ||
); |
Oops, something went wrong.