You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/25 17:25:12 UTC

[GitHub] [airflow] ryanahamilton commented on a change in pull request #15007: UI layout containers + navigation

ryanahamilton commented on a change in pull request #15007:
URL: https://github.com/apache/airflow/pull/15007#discussion_r601655374



##########
File path: yarn.lock
##########
@@ -0,0 +1,4 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.

Review comment:
       Whoops, no. I just ran the command in the wrong directory and accidentally added.

##########
File path: airflow/ui/src/views/Docs.tsx
##########
@@ -18,12 +18,160 @@
  */
 
 import React from 'react';
-import { Center, Heading } from '@chakra-ui/react';
+import {
+  Box,
+  Button,
+  Flex,
+  Heading,
+  Icon,
+  Link,
+  List,
+  ListItem,
+  Text,
+  useColorModeValue,
+} from '@chakra-ui/react';
+import { FaGithub } from 'react-icons/fa';
+import { FiExternalLink, FiGlobe } from 'react-icons/fi';
+
+import AppContainer from 'containers/AppContainer';
 
 const Docs: React.FC = () => (
-  <Center height="100vh">
-    <Heading>Docs</Heading>
-  </Center>
+  <AppContainer>
+    <Box mx="auto" my={8} maxWidth="900px">
+      <Flex mt={8}>
+        <Box flex="1">
+          <Heading as="h1">Documentation</Heading>
+          <Text mt={4}>
+            Apache Airflow Core, which includes webserver, scheduler, CLI and other components that
+            are needed for minimal Airflow&nbsp;installation.
+          </Text>
+          <Button
+            as="a"
+            href="https://airflow.apache.org/docs/apache-airflow/stable/index.html"
+            variant="solid"
+            rightIcon={<FiExternalLink />}
+            mt={4}
+            target="_blank"
+            rel="noopener noreferrer"
+          >
+            Apache Airflow Docs
+          </Button>
+        </Box>
+        <Box ml={8} p={4} bg={useColorModeValue('gray.100', 'gray.700')} borderRadius="md">
+          <Heading as="h3" size="sm">Links</Heading>
+          <List mt={4} spacing={2}>
+            <ListItem>
+              <Link href="https://airflow.apache.org/" isExternal color="teal.500">
+                <Icon as={FiGlobe} mr={1} />
+                Apache Airflow Website
+              </Link>
+            </ListItem>
+            <ListItem>
+              <Link href="https://github.com/apache/airflow" isExternal color="teal.500">
+                <Icon as={FaGithub} mr={1} />
+                apache/airflow on GitHub
+              </Link>
+            </ListItem>
+          </List>
+        </Box>
+      </Flex>
+      <Box mt={10}>
+        <Heading as="h3" size="lg">REST API Reference</Heading>
+        <Flex mt={4}>
+          <Button
+            as="a"
+            href="http://127.0.0.1:28080/api/v1/ui/"
+            variant="outline"
+            rightIcon={<FiExternalLink />}
+            mr={2}
+          >
+            Swagger
+          </Button>
+          <Button
+            as="a"
+            href="http://127.0.0.1:28080/redoc"
+            variant="outline"
+            rightIcon={<FiExternalLink />}
+          >
+            Redoc
+          </Button>
+        </Flex>
+      </Box>
+      <Box mt={10}>
+        <Heading as="h3" size="lg">Providers Packages</Heading>
+        <Text mt={4}>
+          Providers packages include integrations with third party integrations.
+          They are updated independently of the Apache Airflow&nbsp;core.
+        </Text>
+
+        <List spacing={2} mt={4} style={{ columns: 3 }}>
+          <ListItem><Link href="https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/index.html" isExternal color="teal.500">Amazon</Link></ListItem>

Review comment:
       Yeah, that's good idea. We'll need an API endpoint if we actually want to go live with this and that will transition better.

##########
File path: airflow/ui/.neutrinorc.js
##########
@@ -42,6 +42,7 @@ module.exports = {
       neutrino.config.resolve.alias.set('utils', resolve(__dirname, 'src/utils'));
       neutrino.config.resolve.alias.set('auth', resolve(__dirname, 'src/auth'));
       neutrino.config.resolve.alias.set('components', resolve(__dirname, 'src/components'));
+      neutrino.config.resolve.alias.set('containers', resolve(__dirname, 'src/containers'));

Review comment:
       Yeah, I like that approach. It will simplify the overall organization a bit.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org