import { isLoggedIn } from '../../../helpers/users';
import { getCurrentUser, Store } from '../../../store/rootReducer';
import { BranchLike } from '../../../types/branch-like';
+import { ComponentQualifier } from '../../../types/component';
import AnalyzeTutorial from '../../tutorials/analyzeProject/AnalyzeTutorial';
interface Props {
export function EmptyOverview(props: Props) {
const { branchLike, branchLikes, component, currentUser, hasAnalyses } = props;
- if (!isBranch(branchLike)) {
+ if (component.qualifier === ComponentQualifier.Application) {
+ return (
+ <div className="page page-limited">
+ <Alert variant="warning">{translate('provisioning.no_analysis.application')}</Alert>
+ </div>
+ );
+ } else if (!isBranch(branchLike)) {
return null;
}
(branchLikes.length === 2 && branchLikes.some(branch => isBranch(branch)));
const showWarning = isMainBranch(branchLike) && hasBranches;
- const showTutorial =
- isMainBranch(branchLike) && !hasBranches && !hasAnalyses && component.qualifier !== 'APP';
+ const showTutorial = isMainBranch(branchLike) && !hasBranches && !hasAnalyses;
let warning;
if (isLoggedIn(currentUser) && showWarning && hasBadBranchConfig) {
provisioning.no_analysis_on_main_branch.bad_configuration="{branchName}" branch has not been analyzed yet and you have multiple branches already. It looks like it is not your {branchType}, check your configuration.
provisioning.only_provisioned=Only Provisioned
provisioning.only_provisioned.tooltip=Provisioned projects are projects that have been created, but have not been analyzed yet.
+provisioning.no_analysis.application=No analysis has been performed since creation. Analyze a project to see information here.
#------------------------------------------------------------------------------