diff --git a/components/dashboard/.eslintrc.js b/components/dashboard/.eslintrc.js index 6a17f156776f27..8b0658d9306c4c 100644 --- a/components/dashboard/.eslintrc.js +++ b/components/dashboard/.eslintrc.js @@ -7,4 +7,7 @@ module.exports = { root: true, extends: ['react-app'], + rules: { + "import/no-anonymous-default-export": "off", + } } diff --git a/components/dashboard/src/App.tsx b/components/dashboard/src/App.tsx index cb928766d56776..bc61e206a75e5f 100644 --- a/components/dashboard/src/App.tsx +++ b/components/dashboard/src/App.tsx @@ -42,7 +42,7 @@ const Projects = React.lazy(() => import(/* webpackPrefetch: true */ './projects const Project = React.lazy(() => import(/* webpackPrefetch: true */ './projects/Project')); const Prebuilds = React.lazy(() => import(/* webpackPrefetch: true */ './projects/Prebuilds')); const Prebuild = React.lazy(() => import(/* webpackPrefetch: true */ './projects/Prebuild')); -const InstallGitHubApp = React.lazy(() => import(/* webpackPrefetch: true */ './prebuilds/InstallGitHubApp')); +const InstallGitHubApp = React.lazy(() => import(/* webpackPrefetch: true */ './projects/InstallGitHubApp')); const FromReferrer = React.lazy(() => import(/* webpackPrefetch: true */ './FromReferrer')); const UserSearch = React.lazy(() => import(/* webpackPrefetch: true */ './admin/UserSearch')); const WorkspacesSearch = React.lazy(() => import(/* webpackPrefetch: true */ './admin/WorkspacesSearch')); diff --git a/components/dashboard/src/prebuilds/InstallGitHubApp.tsx b/components/dashboard/src/projects/InstallGitHubApp.tsx similarity index 100% rename from components/dashboard/src/prebuilds/InstallGitHubApp.tsx rename to components/dashboard/src/projects/InstallGitHubApp.tsx diff --git a/components/dashboard/src/projects/Prebuilds.tsx b/components/dashboard/src/projects/Prebuilds.tsx index 625d3bdab5d99d..2bf8fb228b7899 100644 --- a/components/dashboard/src/projects/Prebuilds.tsx +++ b/components/dashboard/src/projects/Prebuilds.tsx @@ -37,6 +37,7 @@ export default function () { const [searchFilter, setSearchFilter] = useState(); const [statusFilter, setStatusFilter] = useState(); + const [isLoadingPrebuilds, setIsLoadingPrebuilds] = useState(true); const [prebuilds, setPrebuilds] = useState([]); useEffect(() => { @@ -47,13 +48,16 @@ export default function () { onPrebuildUpdate: (update: PrebuildWithStatus) => { if (update.info.projectId === project.id) { setPrebuilds(prev => [update, ...prev.filter(p => p.info.id !== update.info.id)]); + setIsLoadingPrebuilds(false); } } }); (async () => { + setIsLoadingPrebuilds(true); const prebuilds = await getGitpodService().server.findPrebuilds({ projectId: project.id }); setPrebuilds(prebuilds); + setIsLoadingPrebuilds(false); })(); return () => { @@ -78,7 +82,7 @@ export default function () { setProject(newProject); } })(); - }, [teams]); + }, [projectSlug, team, teams]); const prebuildContextMenu = (p: PrebuildWithStatus) => { const isFailed = p.status === "aborted" || p.status === "timeout" || !!p.error; @@ -166,7 +170,7 @@ export default function () {
- {(!!project && prebuilds.length === 0) && + {(!isLoadingPrebuilds && prebuilds.length === 0) && } @@ -181,6 +185,10 @@ export default function () { Branch + {isLoadingPrebuilds &&
+ + Fetching prebuilds... +
} {prebuilds.filter(filter).sort(prebuildSorter).map((p, index) => diff --git a/components/dashboard/src/projects/Project.tsx b/components/dashboard/src/projects/Project.tsx index 00fd96061dd62e..61732b5c3379d4 100644 --- a/components/dashboard/src/projects/Project.tsx +++ b/components/dashboard/src/projects/Project.tsx @@ -181,7 +181,7 @@ export default function () { {showAuthBanner ? (
- +
No Access