ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [23/50] [abbrv] ambari git commit: Merge branch 'trunk' into branch-dev-patch-upgrade
Date Wed, 24 Feb 2016 15:08:10 GMT
Merge branch 'trunk' into branch-dev-patch-upgrade


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

Branch: refs/heads/trunk
Commit: c543ef8b23f75c828d87e6d0fc4866b567dd5dd7
Parents: 697c309 46bbbf9
Author: Nate Cole <ncole@hortonworks.com>
Authored: Wed Feb 10 11:12:38 2016 -0500
Committer: Nate Cole <ncole@hortonworks.com>
Committed: Wed Feb 10 11:12:38 2016 -0500

----------------------------------------------------------------------
 .../stackVersions/StackVersionsCreateCtrl.js    |   7 +-
 .../main/python/ambari_agent/PythonExecutor.py  |   5 +-
 ambari-metrics/ambari-metrics-assembly/pom.xml  |  12 +-
 .../server/controller/AuthToLocalBuilder.java   | 287 ++++++++++-------
 .../server/controller/KerberosHelperImpl.java   |  23 +-
 .../internal/ServiceResourceProvider.java       | 197 ++++++------
 .../ambari/server/state/quicklinks/Link.java    |  19 +-
 .../main/python/ambari_server/serverSetup.py    |  17 -
 ambari-server/src/main/python/bootstrap.py      |   4 +-
 .../0.1.0/package/scripts/metrics_grafana.py    |   2 +
 .../package/scripts/metrics_grafana_util.py     | 131 ++++++++
 .../metrics_grafana_datasource.json.j2          |  33 ++
 .../FALCON/0.5.0.2.1/quicklinks/quicklinks.json |   1 -
 .../1.10.3-10/configuration/kerberos-env.xml    |  14 +
 .../OOZIE/4.0.0.2.0/package/scripts/oozie.py    |  71 ++++-
 .../4.0.0.2.0/package/scripts/oozie_server.py   |   3 +-
 .../package/scripts/oozie_server_upgrade.py     |  18 +-
 .../PXF/3.0.0/package/scripts/params.py         |  17 +-
 .../PXF/3.0.0/package/scripts/service_check.py  |  81 +++--
 .../RANGER/0.4.0/package/scripts/params.py      |   2 +
 .../0.4.0/package/scripts/ranger_admin.py       |  50 +--
 .../0.4.0/package/scripts/service_check.py      |  12 +-
 .../0.4.0/package/scripts/status_params.py      |  27 ++
 .../STORM/0.9.1.2.1/quicklinks/quicklinks.json  |   1 -
 .../main/resources/scripts/Ambaripreupload.py   |  31 +-
 .../HDP/2.0.6/services/HBASE/metainfo.xml       |   7 +
 .../services/HBASE/quicklinks/quicklinks.json   |  97 ++++++
 .../stacks/HDP/2.0.6/services/HDFS/metainfo.xml |   7 +
 .../services/HDFS/quicklinks/quicklinks.json    |  76 +++++
 .../HDP/2.0.6/services/OOZIE/metainfo.xml       |   5 +-
 .../services/OOZIE/quicklinks/quicklinks.json   |   1 -
 .../stacks/HDP/2.0.6/services/YARN/metainfo.xml |  13 +
 .../YARN/quicklinks-mapred/quicklinks.json      |  76 +++++
 .../services/YARN/quicklinks/quicklinks.json    |  76 +++++
 .../main/resources/stacks/HDP/2.1/metainfo.xml  |   2 +-
 .../services/RANGER/quicklinks/quicklinks.json  |   1 -
 .../services/RANGER/themes/theme_version_1.json |  20 +-
 .../services/SPARK/quicklinks/quicklinks.json   |   1 -
 .../ACCUMULO/quicklinks/quicklinks.json         |   1 -
 .../services/ATLAS/quicklinks/quicklinks.json   |   1 -
 .../services/HBASE/quicklinks/quicklinks.json   |   6 -
 .../services/HDFS/quicklinks/quicklinks.json    |   4 -
 .../services/OOZIE/quicklinks/quicklinks.json   |   1 -
 .../services/RANGER/quicklinks/quicklinks.json  |   1 -
 .../services/RANGER/themes/theme_version_2.json |  40 ++-
 .../services/SPARK/quicklinks/quicklinks.json   |   1 -
 .../YARN/quicklinks-mapred/quicklinks.json      |   4 -
 .../services/YARN/quicklinks/quicklinks.json    |   4 -
 .../controller/AuthToLocalBuilderTest.java      | 315 ++++++++++++-------
 .../AMBARI_METRICS/test_metrics_grafana.py      |  19 +-
 .../stacks/2.0.6/OOZIE/test_oozie_server.py     | 172 +++++-----
 .../resources/child_quicklinks_to_merge.json    |   3 -
 .../resources/child_quicklinks_to_override.json |   4 -
 .../src/test/resources/parent_quicklinks.json   |   4 -
 .../assets/data/configurations/quicklinks.json  |   4 -
 .../app/controllers/global/update_controller.js |   8 +-
 .../manage_alert_notifications_controller.js    |  74 +++--
 .../app/controllers/wizard/step4_controller.js  | 122 +++++--
 ambari-web/app/data/HDP2/site_properties.js     |   7 +
 ambari-web/app/router.js                        |  59 ++--
 .../app/views/common/quick_view_link_view.js    |  10 +-
 ambari-web/app/views/main/dashboard/widgets.js  |   5 +
 ...anage_alert_notifications_controller_test.js | 121 ++++---
 .../test/controllers/wizard/step4_test.js       |  40 ++-
 .../views/common/log_file_search_view_test.js   |   3 +-
 .../test/views/main/dashboard/widgets_test.js   |  42 ++-
 66 files changed, 1730 insertions(+), 792 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c543ef8b/ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
----------------------------------------------------------------------
diff --cc ambari-admin/src/main/resources/ui/admin-web/app/scripts/controllers/stackVersions/StackVersionsCreateCtrl.js
index df344e6,532e5f4..931b7ec
--- 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
@@@ -27,167 -29,38 +27,166 @@@ angular.module('ambariAdminConsole'
    $scope.clusterName = $routeParams.clusterName;
    $scope.subversionPattern = /^\d+\.\d+(-\d+)?$/;
    $scope.upgradeStack = {
 -    selected: null,
 -    options: []
 -  };
 -  $scope.fetchStackVersionFilterList = function () {
 -    return Stack.allStackVersions()
 -    .then(function (allStackVersions) {
 -      var versions = [];
 -      angular.forEach(allStackVersions, function (version) {
 -        if (version.upgrade_packs.length > 0 && version.active) {
 -          versions.push(version);
 -        }
 +    stack_name: '',
 +    stack_version: '',
 +    display_name: ''
 +  };
 +
 +  $scope.option1 = {
 +    index: 1,
 +    displayName: 'Upload Version Definition File',
 +    url: 'files://',
 +    hasError: false
 +  };
 +  $scope.option2 = {
 +    index: 2,
 +    displayName: 'Version Definition File URL',
 +    url: 'https://',
 +    hasError: false
 +  };
 +  $scope.selectedOption = 1;
 +
 +  /**
 +   * User can select ONLY one option to upload version definition file
 +   */
 +  $scope.toggleOptionSelect = function () {
 +    $scope.option1.hasError = false;
 +    $scope.option2.hasError = false;
 +  };
 +  $scope.clearOptionsError = function () {
 +    $scope.option1.hasError = false;
 +    $scope.option2.hasError = false;
 +  };
 +  $scope.readInfoButtonDisabled = function () {
 +    return $scope.option1.selected ? !$scope.option1.url : !$scope.option2.url;
 +  };
 +
 +  $scope.onFileSelect = function(){
 +    return {
 +      link: function($scope,el){
 +        el.bind("change", function(e){
 +          $scope.file = (e.srcElement || e.target).files[0];
 +          $scope.getFile();
 +        })
 +      }
 +    }
 +  };
 +
 +//  $scope.uploadFile = function(){
 +//    var file = $scope.myFile;
 +//    console.log('file is ' );
 +//    console.dir(file);
 +//    var uploadUrl = "/fileUpload";
 +//    fileUpload.uploadFileToUrl(file, uploadUrl);
 +//  };
 +
 +  /**
 +   * Load selected file to current page content
 +   */
 +  $scope.readVersionInfo = function(){
 +    if ($scope.option2.selected) {
 +      var url = $scope.option2.url;
 +    }
 +    /// POST url first then get the version definition info
 +    return Stack.getLatestRepo('HDP').then(function (response) {
 +      $scope.id = response.id;
 +      $scope.isPatch = response.type == 'PATCH';
 +      $scope.stackNameVersion = response.stackNameVersion || 'n/a';
 +      $scope.displayName = response.displayName || 'n/a';
 +      $scope.version = response.version || 'n/a';
 +      $scope.actualVersion = response.actualVersion || 'n/a';
 +      $scope.upgradeStack = {
 +        stack_name: response.stackName,
 +        stack_version: response.stackVersion,
 +        display_name: response.displayName
 +      };
 +      $scope.services = response.services || [];
 +      //save default values of repos to check if they were changed
 +      $scope.defaulfOSRepos = {};
 +      response.updateObj.operating_systems.forEach(function(os) {
 +        $scope.defaulfOSRepos[os.OperatingSystems.os_type] = {
 +          defaultBaseUrl: os.repositories[0].Repositories.base_url,
 +          defaultUtilsUrl: os.repositories[1].Repositories.base_url
 +        };
        });
 -      $scope.upgradeStack.options = versions;
 -      $scope.upgradeStack.selected = versions[versions.length - 1];
 -      $scope.afterStackVersionChange().then(function(){
 -        $scope.disableUnusedOS();
 +      $scope.repoVersionFullName = response.repoVersionFullName;
 +      angular.forEach(response.osList, function (os) {
 +        os.selected = true;
        });
 -    })
 -    .catch(function (data) {
 -      Alert.error($t('versions.alerts.filterListError'), data.message);
 +      $scope.osList = response.osList;
 +      // load supported os type base on stack version
 +      $scope.afterStackVersionRead();
      });
    };
 -  $scope.fetchStackVersionFilterList();
 +
 +  /**
 +   * Load supported OS list
 +   */
 +  $scope.afterStackVersionRead = function () {
 +    Stack.getSupportedOSList($scope.upgradeStack.stack_name, $scope.upgradeStack.stack_version)
 +      .then(function (data) {
 +        var operatingSystems = data.operating_systems;
 +        operatingSystems.map(function (os) {
 +          var existingOSHash = {};
 +          angular.forEach($scope.osList, function (os) {
 +            existingOSHash[os.OperatingSystems.os_type] = os;
 +          });
 +          // if os not in the list, mark as un-selected, add this to the osList
 +          if (!existingOSHash[os.OperatingSystems.os_type]) {
 +            os.selected = false;
 +            os.repositories.forEach(function(repo) {
 +              repo.Repositories.base_url = '';
 +            });
 +            $scope.osList.push(os);
 +          }
 +        });
 +      })
 +      .catch(function (data) {
 +        Alert.error($t('versions.alerts.osListError'), data.message);
 +      });
 +  };
 +
 +  /**
 +   * On click handler for removing OS
 +   */
 +  $scope.removeOS = function() {
 +    this.os.selected = false;
 +    if (this.os.repositories) {
 +      this.os.repositories.forEach(function(repo) {
 +        repo.hasError = false;
 +      });
 +    }
 +  };
 +  /**
 +   * On click handler for adding new OS
 +   */
 +  $scope.addOS = function() {
 +    this.os.selected = true;
 +    if (this.os.repositories) {
 +      this.os.repositories.forEach(function(repo) {
 +        repo.hasError = false;
 +      });
 +    }
 +  };
 +
 +  $scope.isSaveButtonDisabled = function() {
 +    var enabled = false;
 +    $scope.osList.forEach(function(os) {
 +      if (os.selected) {
 +        enabled = true
 +      }
 +    });
 +    return !enabled;
 +  }
  
    $scope.save = function () {
 -    return Stack.validateBaseUrls($scope.skipValidation, $scope.osList, $scope.upgradeStack.selected).then(function
(invalidUrls) {
 +    return Stack.validateBaseUrls($scope.skipValidation, $scope.osList, $scope.upgradeStack).then(function
(invalidUrls) {
        if (invalidUrls.length === 0) {
 -        Stack.addRepo($scope.upgradeStack.selected, $scope.repoSubversion, $scope.osList)
 +        Stack.addRepo($scope.upgradeStack, $scope.actualVersion, $scope.osList)
            .success(function () {
-             Alert.success($t('versions.alerts.versionCreated', {
-               stackName: $scope.upgradeStack.stack_name,
-               versionName: $scope.actualVersion
-             }));
+             var versionName = $scope.upgradeStack.selected.stack_version + '.' + $scope.repoSubversion;
+             var stackName = $scope.upgradeStack.selected.stack_name;
+             Alert.success($t('versions.alerts.versionCreated', {stackName: stackName, versionName:
versionName}));
              $location.path('/stackVersions');
            })
            .error(function (data) {


Mime
View raw message