implement UI sketch for simple trigger
authorEugene.Petrenko <eugene.petrenko@gmail.com>
Tue, 12 Jul 2011 11:15:25 +0000 (15:15 +0400)
committerEugene.Petrenko <eugene.petrenko@gmail.com>
Wed, 13 Jul 2011 16:50:46 +0000 (20:50 +0400)
nuget-server/resources/trigger/editSimpleTrigger.jsp [new file with mode: 0644]
nuget-server/src/META-INF/build-server-plugin-nuget.xml
nuget-server/src/jetbrains/buildServer/nuget/server/trigger/NuGetSimpleTrigger.java [moved from nuget-server/src/jetbrains/buildServer/nuget/server/trigger/NuGetTrigger.java with 72% similarity]
nuget-server/src/jetbrains/buildServer/nuget/server/trigger/TriggerBean.java [new file with mode: 0644]
nuget-server/src/jetbrains/buildServer/nuget/server/trigger/TriggerConstants.java [new file with mode: 0644]

diff --git a/nuget-server/resources/trigger/editSimpleTrigger.jsp b/nuget-server/resources/trigger/editSimpleTrigger.jsp
new file mode 100644 (file)
index 0000000..8178369
--- /dev/null
@@ -0,0 +1,47 @@
+<%--\r
+  ~ Copyright 2000-2011 JetBrains s.r.o.\r
+  ~\r
+  ~ Licensed under the Apache License, Version 2.0 (the "License");\r
+  ~ you may not use this file except in compliance with the License.\r
+  ~ You may obtain a copy of the License at\r
+  ~\r
+  ~ http://www.apache.org/licenses/LICENSE-2.0\r
+  ~\r
+  ~ Unless required by applicable law or agreed to in writing, software\r
+  ~ distributed under the License is distributed on an "AS IS" BASIS,\r
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  ~ See the License for the specific language governing permissions and\r
+  ~ limitations under the License.\r
+  --%>\r
+<%@ taglib prefix="forms" tagdir="/WEB-INF/tags/forms" %>\r
+<%@ taglib prefix="props" tagdir="/WEB-INF/tags/props" %>\r
+<%@ taglib prefix="l" tagdir="/WEB-INF/tags/layout" %>\r
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>\r
+<jsp:useBean id="ib" class="jetbrains.buildServer.nuget.server.trigger.TriggerBean" scope="request"/>\r
+\r
+<tr>\r
+  <th>NuGet package source:<l:star/></th>\r
+  <td>\r
+    <props:textProperty name="${ib.sourceKey}" className="longField" />\r
+    <span class="smallNote">Specify NuGet packages repository to monitor packages changes</span>\r
+    <span class="error" id="error_${ib.sourceKey}"></span>\r
+  </td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>Package Ids<l:star/>:</th>\r
+  <td>\r
+    <props:textProperty name="${ib.packageKey}" className="longField">\r
+    <span class="smallNote">Specify package Id to check for updates.</span>\r
+    <span class="error" id="error_${ib.packageKey}"></span>\r
+  </td>\r
+</tr>\r
+\r
+<tr>\r
+  <th>Package Version Spec:</th>\r
+  <td>\r
+    <props:textProperty name="${ib.versionKey}" className="longField"/>\r
+    <span class="smallNote">Specify package version to check. Leave empty to check for latest version</span>\r
+    <span class="error" id="error_${ib.versionKey}"></span>\r
+  </td>\r
+</tr>\r
index b01cadd283a27112fe19c4c27bbef502b478ab12..8bcb497381c7152557fae9622696aaadcfc20719 100644 (file)
@@ -15,5 +15,5 @@
   <bean class="jetbrains.buildServer.nuget.server.install.PackagesInstallerRunType"/>\r
 \r
 \r
-  <bean class="jetbrains.buildServer.nuget.server.trigger.NuGetTrigger"/>\r
+  <bean class="jetbrains.buildServer.nuget.server.trigger.NuGetSimpleTrigger"/>\r
 </beans>
\ No newline at end of file
similarity index 72%
rename from nuget-server/src/jetbrains/buildServer/nuget/server/trigger/NuGetTrigger.java
rename to nuget-server/src/jetbrains/buildServer/nuget/server/trigger/NuGetSimpleTrigger.java
index 685d0cbeb8e07fbcd333e6924ba4e1499086f75e..ad56245055af15007dca86ddc1c1a50564579b33 100644 (file)
@@ -8,17 +8,17 @@ import org.jetbrains.annotations.NotNull;
  * @author Eugene Petrenko (eugene.petrenko@gmail.com)\r
  *         Date: 03.05.11 15:25\r
  */\r
-public class NuGetTrigger extends BuildTriggerService {\r
+public class NuGetSimpleTrigger extends BuildTriggerService {\r
   private final PluginDescriptor myDescriptor;\r
 \r
-  public NuGetTrigger(final PluginDescriptor descriptor) {\r
+  public NuGetSimpleTrigger(@NotNull final PluginDescriptor descriptor) {\r
     myDescriptor = descriptor;\r
   }\r
 \r
   @NotNull\r
   @Override\r
   public String getName() {\r
-    return "NuGet";\r
+    return TriggerConstants.TRIGGER_ID;\r
   }\r
 \r
   @NotNull\r
@@ -30,7 +30,7 @@ public class NuGetTrigger extends BuildTriggerService {
   @NotNull\r
   @Override\r
   public String describeTrigger(@NotNull final BuildTriggerDescriptor trigger) {\r
-    return "Trigger build on NuGet dependency change";\r
+    return "Triggers build on NuGet dependency change";\r
   }\r
 \r
   @NotNull\r
@@ -45,6 +45,6 @@ public class NuGetTrigger extends BuildTriggerService {
 \r
   @Override\r
   public String getEditParametersUrl() {\r
-    return myDescriptor.getPluginResourcesPath("NuGetTrigger.jsp");\r
+    return myDescriptor.getPluginResourcesPath("trigger/editSimpleTrigger.jsp");\r
   }\r
 }\r
diff --git a/nuget-server/src/jetbrains/buildServer/nuget/server/trigger/TriggerBean.java b/nuget-server/src/jetbrains/buildServer/nuget/server/trigger/TriggerBean.java
new file mode 100644 (file)
index 0000000..5c6d1ab
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * Copyright 2000-2011 JetBrains s.r.o.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package jetbrains.buildServer.nuget.server.trigger;\r
+\r
+/**\r
+ * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ * Date: 12.07.11 14:56\r
+ */\r
+public class TriggerBean {\r
+  public String getSourceKey() {  return TriggerConstants.SOURCE;   }\r
+  public String getPackageKey() {  return TriggerConstants.PACKAGE;   }\r
+  public String getVersionKey() {  return TriggerConstants.VERSION;   }\r
+}\r
diff --git a/nuget-server/src/jetbrains/buildServer/nuget/server/trigger/TriggerConstants.java b/nuget-server/src/jetbrains/buildServer/nuget/server/trigger/TriggerConstants.java
new file mode 100644 (file)
index 0000000..e796ad4
--- /dev/null
@@ -0,0 +1,29 @@
+/*\r
+ * Copyright 2000-2011 JetBrains s.r.o.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package jetbrains.buildServer.nuget.server.trigger;\r
+\r
+/**\r
+ * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ * Date: 12.07.11 15:00\r
+ */\r
+public interface TriggerConstants {\r
+  public static final String TRIGGER_ID = "nuget.simple";\r
+\r
+  public static final String SOURCE = "nuget.source";\r
+  public static final String PACKAGE = "nuget.package";\r
+  public static final String VERSION = "nuget.version";\r
+}\r