ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhew...@apache.org
Subject ambari git commit: AMBARI-17230 VDF: when registering version using Default Vers Def, need to set Name (zhewang)
Date Tue, 14 Jun 2016 17:14:10 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 03260b60a -> ceb2a24c6


AMBARI-17230 VDF: when registering version using Default Vers Def, need to set Name (zhewang)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ceb2a24c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ceb2a24c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ceb2a24c

Branch: refs/heads/trunk
Commit: ceb2a24c69a6a09abddfa51dbce06d6e1ded71d4
Parents: 03260b6
Author: Zhe (Joe) Wang <zhewang@apache.org>
Authored: Tue Jun 14 10:13:29 2016 -0700
Committer: Zhe (Joe) Wang <zhewang@apache.org>
Committed: Tue Jun 14 10:13:46 2016 -0700

----------------------------------------------------------------------
 .../stackVersions/StackVersionsCreateCtrl.js    |  13 +-
 .../app/scripts/services/AddVersionModal.js     |   2 +
 .../ui/admin-web/app/scripts/services/Stack.js  |   6 +
 .../views/stackVersions/stackVersionPage.html   | 345 ++++++++++---------
 4 files changed, 201 insertions(+), 165 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ceb2a24c/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
index cc42abb..6cf6849 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
@@ -315,6 +315,10 @@ angular.module('ambariAdminConsole')
           var isXMLdata = $scope.isXMLdata;
         }
 
+        if (!isXMLdata) {
+          data.VersionDefinition.display_name = $scope.activeStackVersion.displayName;
+        }
+
         var repoUpdate = {
           operating_systems: $scope.updateObj.operating_systems
         };
@@ -322,10 +326,9 @@ angular.module('ambariAdminConsole')
           var versionInfo = response.resources[0].VersionDefinition;
           if (versionInfo.id && versionInfo.stack_name && versionInfo.stack_version)
{
             Stack.updateRepo(versionInfo.stack_name, versionInfo.stack_version, versionInfo.id,
repoUpdate).then(function () {
-              Alert.success($t('versions.alerts.versionEdited', {
+              Alert.success($t('versions.alerts.versionCreated', {
                 stackName: $scope.upgradeStack.stack_name,
-                versionName: $scope.actualVersion,
-                displayName: $scope.displayName
+                versionName: $scope.actualVersion
               }));
               $location.path('/stackVersions');
             }).catch(function (data) {
@@ -570,6 +573,10 @@ angular.module('ambariAdminConsole')
     });
   };
 
+  $scope.updateCurrentVersionInput = function () {
+    $scope.activeStackVersion.displayName = $scope.activeStackVersion.stackNameVersion +
"." + angular.element('[name="version"]')[0].value;
+  };
+
   $scope.fetchPublicVersions = function () {
     return Stack.allPublicStackVersions().then(function (versions) {
       if (versions && versions.length) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ceb2a24c/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/AddVersionModal.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/AddVersionModal.js
b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/AddVersionModal.js
index 26b3558..3345b0b 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/AddVersionModal.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/AddVersionModal.js
@@ -113,6 +113,8 @@ angular.module('ambariAdminConsole')
                 version: repo.VersionDefinition.release ? repo.VersionDefinition.release.version:
null, /// 2.3.4.0
                 releaseNotes: repo.VersionDefinition.release ? repo.VersionDefinition.release.release_notes:
null,
                 displayName: repo.VersionDefinition.stack_name + '-' + repo.VersionDefinition.repository_version,
//HDP-2.3.4.0
+                editableDisplayName: repo.VersionDefinition.repository_version.substring(4),
+                isNonXMLdata: !isXMLdata,
                 repoVersionFullName : repo.VersionDefinition.stack_name + '-' + repo.VersionDefinition.release
? repo.VersionDefinition.release.version: repo.VersionDefinition.repository_version,
                 ambari_managed_repositories: repo.operating_systems[0].OperatingSystems.ambari_managed_repositories
!== false,
                 osList: repo.operating_systems,

http://git-wip-us.apache.org/repos/asf/ambari/blob/ceb2a24c/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
index 7e76859..9b8fdfa 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/services/Stack.js
@@ -96,12 +96,18 @@ angular.module('ambariAdminConsole')
               stackNameVersion:  version.VersionDefinition.stack_name + '-' + version.VersionDefinition.stack_version,
               displayName: version.VersionDefinition.stack_name + '-' + version.VersionDefinition.repository_version.split('-')[0],
//HDP-2.3.4.0
               displayNameFull: version.VersionDefinition.stack_name + '-' + version.VersionDefinition.repository_version,
//HDP-2.3.4.0-23
+              editableDisplayName: version.VersionDefinition.repository_version.substring(4),
+              isNonXMLdata: true,
               repositoryVersion: version.VersionDefinition.repository_version,
               stackNameRepositoryVersion: version.VersionDefinition.stack_name + '-' + version.VersionDefinition.repository_version,
               showAvailable: version.VersionDefinition.show_available,
               osList: version.operating_systems,
               updateObj: version
             };
+            //hard code to not show stack name box for ECS stack
+            if (isNaN(versionObj.editableDisplayName.charAt(0))) {
+              versionObj.isNonXMLdata = false;
+            }
             var services = [];
             angular.forEach(version.VersionDefinition.stack_services, function (service)
{
               // services that should not be shown on UI

http://git-wip-us.apache.org/repos/asf/ambari/blob/ceb2a24c/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
----------------------------------------------------------------------
diff --git a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
index 83f54fd..e7bf01d 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
+++ b/ambari-admin/src/main/resources/ui/admin-web/app/views/stackVersions/stackVersionPage.html
@@ -32,190 +32,211 @@
 <hr>
 
 
+<form class="form-horizontal register-version-form" role="form" name="versionRegForm"
novalidate>
+  <!-- left tabs begins -->

+  <div class="col-sm-2" id="list-stack-id" ng-if="createController">

+    <ul class="nav nav-tabs tabs-left"> 

+      <li ng-repeat="stack in stackIds" ng-click="onStackIdChange()" ng-class="{'active'
: stack.isSelected}">
+        <a href="javascript:void(0);">{{stack.stackNameVersion}}</a>
+      </li>

+    </ul>

+  </div>

 
-<!-- left tabs begins -->

-<div class="col-sm-2" id="list-stack-id" ng-if="createController">

-  <ul class="nav nav-tabs tabs-left"> 

-    <li ng-repeat="stack in stackIds" ng-click="onStackIdChange()" ng-class="{'active'
: stack.isSelected}">
-      <a href="javascript:void(0);">{{stack.stackNameVersion}}</a>
-    </li>

-  </ul>

-</div>

-
-<div ng-class="{'col-sm-10': createController}">
-  <div class="tab-content">
-    <div class="panel panel-default details-panel">
-      <div class="panel-body">
-        <div class="col-sm-3 .pull-left" id="current-stack-details" ng-if="editController">

-          <table class='table table-borderless alert alert-info'>
-            <tr>
-              <td>{{'common.stack' | translate}}</td>
-              <td><strong>{{activeStackVersion.stackNameVersion}}</strong></td>
-            </tr>
-            <tr>
-              <td>{{'common.name' | translate}}</td>
-              <td><strong>{{activeStackVersion.displayName}}</strong></td>
-            </tr>
-            <tr>
-              <td>{{'common.version' | translate}}</td>
-              <td><strong>{{activeStackVersion.actualVersion}}</strong></td>
-            </tr>
-          </table>
-        </div>
+  <div ng-class="{'col-sm-10': createController}">
+    <div class="tab-content">
+      <div class="panel panel-default details-panel">
+        <div class="panel-body">
+          <div class="col-sm-3 .pull-left" id="current-stack-details" ng-if="editController">

+            <table class='table table-borderless alert alert-info'>
+              <tr>
+                <td>{{'common.stack' | translate}}</td>
+                <td><strong>{{activeStackVersion.stackNameVersion}}</strong></td>
+              </tr>
+              <tr>
+                <td>{{'common.name' | translate}}</td>
+                <td><strong>{{activeStackVersion.displayName}}</strong></td>
+              </tr>
+              <tr>
+                <td>{{'common.version' | translate}}</td>
+                <td><strong>{{activeStackVersion.actualVersion}}</strong></td>
+              </tr>
+            </table>
+          </div>
 
-        <div class="version-info" ng-if="createController">
-          <div class="btn-group" dropdown>
-            <button type="button" data-toggle="dropdown" class="btn dropdown-toggle btn-info">
-              {{activeStackVersion.stackNameRepositoryVersion}}
-              <span class="caret"></span>
-            </button>
-            <ul class="dropdown-menu">
-              <li ng-repeat="version in allVersions" ng-click="setActiveVersion()" ng-if="version.visible">
-                <a href="javascript:void(0);">
-                  {{version.stackNameRepositoryVersion}}
-                  <span ng-if="version.stackDefault">{{'versions.defaultVersion' |
translate}}</span>
-                </a>
-              </li>
-              <li>
-                <a href="javascript:void(0);" ng-click="addVersion()">
-                  {{'versions.addVersion' | translate}} ...
-                </a>
-              </li>
-            </ul>
+          <div class="version-info" ng-if="createController">
+            <div class="btn-group" dropdown>
+              <button type="button" data-toggle="dropdown" class="btn dropdown-toggle
btn-info">
+                {{activeStackVersion.stackNameRepositoryVersion}}
+                <span class="caret"></span>
+              </button>
+              <ul class="dropdown-menu">
+                <li ng-repeat="version in allVersions" ng-click="setActiveVersion()" ng-if="version.visible">
+                  <a href="javascript:void(0);">
+                    {{version.stackNameRepositoryVersion}}
+                    <span ng-if="version.stackDefault">{{'versions.defaultVersion'
| translate}}</span>
+                  </a>
+                </li>
+                <li>
+                  <a href="javascript:void(0);" ng-click="addVersion()">
+                    {{'versions.addVersion' | translate}} ...
+                  </a>
+                </li>
+              </ul>
+            </div>
+            <div class="col-sm-8 pull-right form-inline repo-version-inline" ng-if="activeStackVersion.isNonXMLdata">
+              <label class="control-label col-sm-2 repo-version-label">Name</label>
+              <div class="col-sm-10">
+                <span>
+                  {{activeStackVersion.stackNameVersion}}
+                </span>
+                <span class="bold-dot">.</span>
+                <div class="form-group" ng-class="{'has-error' : versionRegForm.version.$error.pattern}">
+                  <input class="form-control" name="version" type="text" ng-model="activeStackVersion.editableDisplayName"
ng-pattern="subversionPattern"
+                         placeholder="Version Number (0.0)" ng-change="updateCurrentVersionInput()"
required/>
+                </div>
+                <div class="text-danger" ng-show="versionRegForm.version.$error.pattern">
+                    &nbsp{{activeStackVersion.displayName}} Invalid.
+                </div>
+              </div>
+            </div>
+          </div>
+          <br>
+          <div class="version-contents-section" ng-class="{'version-contents-section-register-version':
createController}">
+            <table class="table table-striped table-condensed">
+              <tr ng-repeat="service in activeStackVersion.services">
+                <td class="col-sm-4">{{service.displayName}}</td>
+                <td class="col-sm-8">{{service.version}}</td>
+              </tr>
+            </table>
           </div>
-        </div>
-        <div class="version-contents-section" ng-class="{'version-contents-section-register-version':
createController}">
-          <table class="table table-striped table-condensed">
-            <tr ng-repeat="service in activeStackVersion.services">
-              <td class="col-sm-4">{{service.displayName}}</td>
-              <td class="col-sm-8">{{service.version}}</td>
-            </tr>
-          </table>
         </div>
       </div>
     </div>
   </div>
-</div>
 
-<div id="upload-definition-file-panel" ng-if="createController">
+  <div id="upload-definition-file-panel" ng-if="createController">
 
-  <div class="col-sm-12 big-radio clearfix" ng-class="{'disabled' : networkLost || useRedhatSatellite}">
-    <input type="radio" ng-model="selectedOption.index" value="1" ng-change="togglePublicLocalOptionSelect()"
ng-disabled="networkLost || useRedhatSatellite">
-    <span>{{'versions.usePublic' | translate}}</span>
-    <a id="public-disabled-link" href="javascript:void(0);" ng-if="networkLost" ng-click="showPublicRepoDisabledDialog()">{{'versions.networkIssues.networkLost'|
translate}}</a>
-  </div>
-  <div class="col-sm-12 big-radio clearfix">
-    <input type="radio" ng-model="selectedOption.index" value="2" ng-change="togglePublicLocalOptionSelect()">
-    {{'versions.useLocal' | translate}}
+    <div class="col-sm-12 big-radio clearfix" ng-class="{'disabled' : networkLost || useRedhatSatellite}">
+      <input type="radio" ng-model="selectedOption.index" value="1" ng-change="togglePublicLocalOptionSelect()"
ng-disabled="networkLost || useRedhatSatellite">
+      <span>{{'versions.usePublic' | translate}}</span>
+      <a id="public-disabled-link" href="javascript:void(0);" ng-if="networkLost" ng-click="showPublicRepoDisabledDialog()">{{'versions.networkIssues.networkLost'|
translate}}</a>
+    </div>
+    <div class="col-sm-12 big-radio clearfix">
+      <input type="radio" ng-model="selectedOption.index" value="2" ng-change="togglePublicLocalOptionSelect()">
+      {{'versions.useLocal' | translate}}
+    </div>
   </div>
-</div>
 
-<div class="clearfix bottom-margin"></div>
+  <div class="clearfix bottom-margin"></div>
 
-<form ng-class="{'visible': !allInfoCategoriesBlank()}" class="form-horizontal register-version-form
hide-soft"
-      role="form" name="repoRegForm" novalidate>
-  <div class="panel panel-default repos-panel">
-    <div class="panel-heading">
-      <h3 class="panel-title">
-        {{'versions.repos' | translate}}
-        <button ng-show="supports.addingNewRepository" class="btn btn-primary pull-right
btn-xs pull-up"
-                ng-click="addRepository()">
-          <span class="glyphicon glyphicon-plus"></span>
-          {{'common.add' | translate:'{ term: "Repository" }'}}
-        </button>
-      </h3>
-    </div>
-    <div class="panel-body">
-      <div class="panel-inner">
-        <div class="alert alert-info" role="alert">{{'versions.alerts.baseURLs' | translate}}</div>
-        <div class="alert alert-warning hide-soft" ng-class="{'visible' : hasValidationErrors()}"
role="alert">
-          {{'versions.alerts.validationFailed' | translate}}
-        </div>
-        <div class="clearfix repo-table-title row-fluid">
-          <div class="col-sm-2" id="os-label"><label>{{'versions.os' | translate}}</label></div>
-          <div class="col-sm-2" id="name-label-adjust"><label>{{'common.name'
| translate}}</label></div>
-          <div class="col-sm-6" id="repo-base-url-label"><label>{{'versions.baseURL'
| translate}} </label></div>
-          <div class="btn-group pull-right tooltip-wrapper"
-               tooltip="{{(isAddOsButtonDisabled() && !useRedhatSatellite)? ('versions.alerts.allOsAdded'
| translate) : ''}}"
-               dropdown>
-            <button class="btn add-os-button dropdown-toggle" ng-disabled="isAddOsButtonDisabled()">
-              <i class="fa fa-plus" aria-hidden="true"></i> {{'common.add' |
translate}} &nbsp;<span
-                    class="caret"></span></button>
-            <ul class="dropdown-menu" ng-class="{'hidden': hasNotDeletedRepo()}">
-              <li ng-repeat="os in osList"><a ng-if="os.selected==false" ng-click="addOS($event)">{{os.OperatingSystems.os_type}}</a>
-              </li>
-            </ul>
+  <form ng-class="{'visible': !allInfoCategoriesBlank()}" class="form-horizontal register-version-form
hide-soft"
+        role="form" name="repoRegForm" novalidate>
+    <div class="panel panel-default repos-panel">
+      <div class="panel-heading">
+        <h3 class="panel-title">
+          {{'versions.repos' | translate}}
+          <button ng-show="supports.addingNewRepository" class="btn btn-primary pull-right
btn-xs pull-up"
+                  ng-click="addRepository()">
+            <span class="glyphicon glyphicon-plus"></span>
+            {{'common.add' | translate:'{ term: "Repository" }'}}
+          </button>
+        </h3>
+      </div>
+      <div class="panel-body">
+        <div class="panel-inner">
+          <div class="alert alert-info" role="alert">{{'versions.alerts.baseURLs' |
translate}}</div>
+          <div class="alert alert-warning hide-soft" ng-class="{'visible' : hasValidationErrors()}"
role="alert">
+            {{'versions.alerts.validationFailed' | translate}}
           </div>
+          <div class="clearfix repo-table-title row-fluid">
+            <div class="col-sm-2" id="os-label"><label>{{'versions.os' | translate}}</label></div>
+            <div class="col-sm-2" id="name-label-adjust"><label>{{'common.name'
| translate}}</label></div>
+            <div class="col-sm-6" id="repo-base-url-label"><label>{{'versions.baseURL'
| translate}} </label></div>
+            <div class="btn-group pull-right tooltip-wrapper"
+                 tooltip="{{(isAddOsButtonDisabled() && !useRedhatSatellite)? ('versions.alerts.allOsAdded'
| translate) : ''}}"
+                 dropdown>
+              <button class="btn add-os-button dropdown-toggle" ng-disabled="isAddOsButtonDisabled()">
+                <i class="fa fa-plus" aria-hidden="true"></i> {{'common.add'
| translate}} &nbsp;<span
+                      class="caret"></span></button>
+              <ul class="dropdown-menu" ng-class="{'hidden': hasNotDeletedRepo()}">
+                <li ng-repeat="os in osList"><a ng-if="os.selected==false" ng-click="addOS($event)">{{os.OperatingSystems.os_type}}</a>
+                </li>
+              </ul>
+            </div>
 
-        </div>
-        <div class="alert alert-info hide-soft" ng-class="{'visible' : !osList || !osList.length}"
role="alert">
-          {{'versions.contents.empty' | translate}}
-        </div>
-        <div class="" ng-repeat="os in osList">
-          <div ng-if="os.selected==true">
-            <div class="clearfix border-bottom">
-              <!-- show selected os in list table-->
-              <div class="col-sm-2 os-type-label">
-                <label>{{os.OperatingSystems.os_type}}</label>
-              </div>
-              <div class="col-sm-9">
-                <div class="form-group repo-name-url {{repository.Repositories.repo_name}}"
-                     ng-class="{'has-error': repository.hasError }" ng-repeat="repository
in os.repositories">
-                  <span class="repo-name-label control-label col-sm-3">{{repository.Repositories.repo_id}}</span>
-                  <div class="col-sm-7 repo-url">
-                    <input type="text" class="form-control"
-                           placeholder="{{(repository.Repositories.repo_name.indexOf('UTILS')
< 0 )?('versions.repository.placeholder' | translate) : ''}}"
-                           ng-model="repository.Repositories.base_url"
-                           ng-change="onRepoUrlChange(repository)" ng-disabled="useRedhatSatellite">
+          </div>
+          <div class="alert alert-info hide-soft" ng-class="{'visible' : !osList || !osList.length}"
role="alert">
+            {{'versions.contents.empty' | translate}}
+          </div>
+          <div class="" ng-repeat="os in osList">
+            <div ng-if="os.selected==true">
+              <div class="clearfix border-bottom">
+                <!-- show selected os in list table-->
+                <div class="col-sm-2 os-type-label">
+                  <label>{{os.OperatingSystems.os_type}}</label>
+                </div>
+                <div class="col-sm-9">
+                  <div class="form-group repo-name-url {{repository.Repositories.repo_name}}"
+                       ng-class="{'has-error': repository.hasError }" ng-repeat="repository
in os.repositories">
+                    <span class="repo-name-label control-label col-sm-3">{{repository.Repositories.repo_id}}</span>
+                    <div class="col-sm-7 repo-url">
+                      <input type="text" class="form-control"
+                             placeholder="{{(repository.Repositories.repo_name.indexOf('UTILS')
< 0 )?('versions.repository.placeholder' | translate) : ''}}"
+                             ng-model="repository.Repositories.base_url"
+                             ng-change="onRepoUrlChange(repository)" ng-disabled="useRedhatSatellite">
+                    </div>
+                    <i class="fa fa-undo orange-icon cursor-pointer"
+                       ng-if="selectedOption.index == 1 && repository.Repositories.base_url
!= repository.Repositories.initial_base_url
+                       || selectedOption.index == 2 && repository.Repositories.base_url
!= ''
+                       || editController && repository.Repositories.base_url != repository.Repositories.initial_base_url"
+                       ng-click="undoChange(repository)"
+                       tooltip-html-unsafe="{{'common.undo' | translate}}"
+                       aria-hidden="true"></i>
                   </div>
-                  <i class="fa fa-undo orange-icon cursor-pointer"
-                     ng-if="selectedOption.index == 1 && repository.Repositories.base_url
!= repository.Repositories.initial_base_url
-                     || selectedOption.index == 2 && repository.Repositories.base_url
!= ''
-                     || editController && repository.Repositories.base_url != repository.Repositories.initial_base_url"
-                     ng-click="undoChange(repository)"
-                     tooltip-html-unsafe="{{'common.undo' | translate}}"
-                     aria-hidden="true"></i>
                 </div>
-              </div>
-              <div class="col-sm-1 remove-icon" ng-click="removeOS()" ng-class="{'disabled'
: useRedhatSatellite}"><i
-                      class="fa fa-minus" aria-hidden="true"></i>{{'common.controls.remove'
| translate}}
+                <div class="col-sm-1 remove-icon" ng-click="removeOS()" ng-class="{'disabled'
: useRedhatSatellite}"><i
+                        class="fa fa-minus" aria-hidden="true"></i>{{'common.controls.remove'
| translate}}
+                </div>
               </div>
             </div>
           </div>
-        </div>
-        <div class="clearfix advanced-radio-buttons">
-          <div class="col-sm-9" id="skip-validation">
-            <div class="checkbox">
-              <label>
-                <input type="checkbox" ng-model="skipValidation" ng-change="clearErrors()"
-                       ng-disabled="useRedhatSatellite">
-                <span ng-class="{'disabled' : useRedhatSatellite}">{{'versions.skipValidation'
| translate}}</span>
-                <i class="fa fa-question-circle"
-                   tooltip-html-unsafe="{{'versions.alerts.skipValidationWarning' | translate}}"
aria-hidden="true"></i>
-              </label>
+          <div class="clearfix advanced-radio-buttons">
+            <div class="col-sm-9" id="skip-validation">
+              <div class="checkbox">
+                <label>
+                  <input type="checkbox" ng-model="skipValidation" ng-change="clearErrors()"
+                         ng-disabled="useRedhatSatellite">
+                  <span ng-class="{'disabled' : useRedhatSatellite}">{{'versions.skipValidation'
| translate}}</span>
+                  <i class="fa fa-question-circle"
+                     tooltip-html-unsafe="{{'versions.alerts.skipValidationWarning' | translate}}"
aria-hidden="true"></i>
+                </label>
+              </div>
             </div>
-          </div>
-          <div class="col-sm-9" id="use-redhat">
-            <div class="checkbox">
-              <label>
-                <input type="checkbox" ng-model="useRedhatSatellite" ng-change="clearErrors()"
-                       ng-disabled="isPublicRepoSelected()">
-                <span ng-class="{'disabled' : isPublicRepoSelected()}"
-                      tooltip="{{(isPublicRepoSelected())? ('versions.useRedhatSatellite.disabledMsg'
| translate) : ''}}">{{'versions.useRedhatSatellite.title' | translate}}</span>
-                <i class="fa fa-question-circle"
-                   tooltip-html-unsafe="{{'versions.alerts.useRedhatSatelliteWarning' | translate}}"
-                   aria-hidden="true"></i>
-              </label>
+            <div class="col-sm-9" id="use-redhat">
+              <div class="checkbox">
+                <label>
+                  <input type="checkbox" ng-model="useRedhatSatellite" ng-change="clearErrors()"
+                         ng-disabled="isPublicRepoSelected()">
+                  <span ng-class="{'disabled' : isPublicRepoSelected()}"
+                        tooltip="{{(isPublicRepoSelected())? ('versions.useRedhatSatellite.disabledMsg'
| translate) : ''}}">{{'versions.useRedhatSatellite.title' | translate}}</span>
+                  <i class="fa fa-question-circle"
+                     tooltip-html-unsafe="{{'versions.alerts.useRedhatSatelliteWarning' |
translate}}"
+                     aria-hidden="true"></i>
+                </label>
+              </div>
             </div>
           </div>
         </div>
       </div>
     </div>
-  </div>
-  <div class="col-sm-12">
-    <button class="btn btn-primary pull-right left-margin" ng-click="save()"
-            ng-disabled="isSaveButtonDisabled()">{{'common.controls.save' | translate}}
-    </button>
-    <button class="btn btn-default pull-right" ng-click="cancel()">{{'common.controls.cancel'
| translate}}</button>
-  </div>
-</form>
+    <div>
+      {{versionRegForm.version.$invalid}}
+    </div>
+    <div class="col-sm-12">
+      <button class="btn btn-primary pull-right left-margin" ng-click="save()"
+              ng-disabled="isSaveButtonDisabled() || (createController && versionRegForm.version.$invalid)">{{'common.controls.save'
| translate}}
+      </button>
+      <button class="btn btn-default pull-right" ng-click="cancel()">{{'common.controls.cancel'
| translate}}</button>
+    </div>
+  </form>
+</form>
\ No newline at end of file


Mime
View raw message