From 20c13b724ef6932c584afb2d4589bfbdbb192532 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Fri, 9 Jan 2009 23:38:57 +0000 Subject: [PATCH] If for some reason "All" view is deleted, allow people to create it again. (report) git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14322 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/model/AllView.java | 5 ++++- .../main/resources/hudson/model/AllView/newViewDetail.jelly | 3 +++ .../resources/hudson/model/AllView/newViewDetail.properties | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 core/src/main/resources/hudson/model/AllView/newViewDetail.jelly create mode 100644 core/src/main/resources/hudson/model/AllView/newViewDetail.properties diff --git a/core/src/main/java/hudson/model/AllView.java b/core/src/main/java/hudson/model/AllView.java index 4f701e4e93..af8143a678 100644 --- a/core/src/main/java/hudson/model/AllView.java +++ b/core/src/main/java/hudson/model/AllView.java @@ -75,7 +75,10 @@ public class AllView extends View { @Override public boolean isInstantiable() { - return false; + for (View v : Hudson.getInstance().getViews()) + if(v instanceof AllView) + return false; + return true; } public String getDisplayName() { diff --git a/core/src/main/resources/hudson/model/AllView/newViewDetail.jelly b/core/src/main/resources/hudson/model/AllView/newViewDetail.jelly new file mode 100644 index 0000000000..50c4e73d38 --- /dev/null +++ b/core/src/main/resources/hudson/model/AllView/newViewDetail.jelly @@ -0,0 +1,3 @@ +
+ ${%blurb} +
\ No newline at end of file diff --git a/core/src/main/resources/hudson/model/AllView/newViewDetail.properties b/core/src/main/resources/hudson/model/AllView/newViewDetail.properties new file mode 100644 index 0000000000..7a7baafbe6 --- /dev/null +++ b/core/src/main/resources/hudson/model/AllView/newViewDetail.properties @@ -0,0 +1 @@ +blurb=This view shows all the jobs on Hudson. \ No newline at end of file