Skip to content
Permalink
Browse files

Merge pull request #38 from recena/JENKINS-34259

[JENKINS-34259] Some links are broken in the Welcome page
  • Loading branch information...
stephenc committed Apr 29, 2016
2 parents 3e8a70c + f2ae21f commit e5363900cc94bff2674adee2f59f3ff6d2cd5d00
@@ -32,6 +32,14 @@ public boolean isDefault() {
return equals(getOwnerPrimaryView());
}

/**
* {@inheritDoc}
*/
@Override
public boolean isEditable() {
return false;
}

/**
* Equal to any view of the same class and owner.
* {@inheritDoc}
@@ -554,7 +554,7 @@ protected void submit(StaplerRequest req, StaplerResponse rsp)
@Override
public View getPrimaryView() {
if (getItems().isEmpty()) {
// when there's no branches to show, switch to the special welcome view
// when there are no branches nor pull requests to show, switch to the special welcome view
return getWelcomeView();
}
return super.getPrimaryView();
@@ -567,6 +567,11 @@ protected View getWelcomeView() {
return new MultiBranchProjectEmptyView(this);
}

@Override
public View getView(String name) {
return getPrimaryView();
}

/**
* Represents the branch indexing job.
*
@@ -252,7 +252,8 @@ public SCMSourceCriteria getSCMSourceCriteria(SCMSource source) {
}

/**
* Will create an specialized view when there are no repositories found, which contain a Jenkinsfile
* Will create an specialized view when there are no repositories or branches found, which contain a Jenkinsfile
* or other MARKER file.
*/
@Override
public View getPrimaryView() {
@@ -262,6 +263,11 @@ public View getPrimaryView() {
return super.getPrimaryView();
}

@Override
public View getView(String name) {
return getPrimaryView();
}

@Extension
public static class DescriptorImpl extends AbstractFolderDescriptor {

0 comments on commit e536390

Please sign in to comment.
You can’t perform that action at this time.