create UI for update packages feature
authorEugene.Petrenko <eugene.petrenko@gmail.com>
Sun, 10 Jul 2011 07:59:48 +0000 (11:59 +0400)
committerEugene.Petrenko <eugene.petrenko@gmail.com>
Sun, 10 Jul 2011 08:18:02 +0000 (12:18 +0400)
nuget-common/src/jetbrains/buildServer/nuget/common/PackagesInstallerConstants.java
nuget-server/resources/install/editInstallPackage.jsp
nuget-server/resources/install/viewInstallPackage.jsp
nuget-server/src/jetbrains/buildServer/nuget/server/install/InstallBean.java

index f442f3e6d567be336f085bd03d5e51667ac13a28..29e056afd0471d0554fbc3927dbb51f8b304541b 100644 (file)
@@ -27,5 +27,9 @@ public interface PackagesInstallerConstants {
   public static final String NUGET_PATH = "nuget.path";\r
   public static final String NUGET_SOURCES = "nuget.sources";\r
   public static final String NUGET_EXCLUDE_VERSION = "nuget.excludeVersion";\r
+\r
+  public static final String NUGET_UPDATE_PACKAGES = "nuget.updatePackages";\r
+  public static final String NUGET_UPDATE_PACKAGES_SAFE = "nuget.updatePackages.safe";\r
+\r
   public static final String SLN_PATH = "sln.path";\r
 }\r
index 02b2cfc6fcaf1128a57d4bcf5c9f635c1039a2a0..e43df9bad929c73b2f3b9a80ea9830405b5f5be9 100644 (file)
     <td>\r
       <props:checkboxProperty name="${ib.excludeVersionKey}"/>\r
       Exclude version from package folder names\r
-      <span class="smallNote">Makes NuGet exlude package version from package folders. Equivalent of -ExcludeVersion commandline argument</span>\r
-      <span class="error" id="error_${ib.excludeVersionKey}"></span>\r
+      <span class="smallNote">Makes NuGet exlude package version from package folders.\r
+                              Equivalent of -ExcludeVersion commandline argument</span>\r
+\r
+      <props:checkboxProperty name="${ib.updatePackagesKey}"/>\r
+      Update packages with help of NuGet update command\r
+      <span class="smallNote">Uses NuGet update command to update all packages under solution.\r
+                              Package versions and constraints are taken from\r
+                              packages.config files</span>\r
+\r
+      <div style="margin-left: 2em;">\r
+        <props:checkboxProperty name="${ib.updatePackagesSafeKey}"/>\r
+        Perform safe update.\r
+        <span class="smallNote">Equivalent to -Safe NuGet option</span>\r
+      </div>\r
     </td>\r
   </tr>\r
 \r
+  <script type="text/javascript">\r
+    (function() {\r
+    var handler = function() {\r
+      $('${ib.updatePackagesSafeKey}').disabled = !$('${ib.updatePackagesKey}').checked;\r
+    };\r
+    Event.observe($('${ib.updatePackagesKey}'), 'change', handler);\r
+    handler();\r
+    })();\r
+  </script>\r
+\r
 </l:settingsGroup>\r
index ce99f151083e146cb3156e4cab83af0d7e3e8a5b..a2a87150a1d66898e5bd3aa35daefac2bcd75ab9 100644 (file)
 <div class="parameter">\r
   Exclude Version: <strong><props:displayCheckboxValue name="${ib.excludeVersionKey}"/></strong>\r
 </div>\r
+<div class="parameter">\r
+  Update packages:\r
+  <strong>\r
+    <props:displayCheckboxValue name="${ib.updatePackagesKey}"/>\r
+  </strong>\r
+</div>\r
+<div class="parameter">\r
+  Use safe packages update:\r
+  <strong>\r
+    <props:displayCheckboxValue name="${ib.updatePackagesSafeKey}"/>\r
+  </strong>\r
+</div>\r
index b7388b8e4e46d9d7d8b9746ee2e1e0695fce18af..f3e5e7a93b11398b5b95d32e11566461ee8104ac 100644 (file)
@@ -27,4 +27,6 @@ public class InstallBean {
   public String getNuGetSourcesKey() { return PackagesInstallerConstants.NUGET_SOURCES; }\r
   public String getSolutionPathKey() { return PackagesInstallerConstants.SLN_PATH; }\r
   public String getExcludeVersionKey() { return PackagesInstallerConstants.NUGET_EXCLUDE_VERSION;}\r
+  public String getUpdatePackagesKey() { return PackagesInstallerConstants.NUGET_UPDATE_PACKAGES;}\r
+  public String getUpdatePackagesSafeKey() { return PackagesInstallerConstants.NUGET_UPDATE_PACKAGES_SAFE;}\r
 }\r