Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/trunk' into branch-3.0-perf
Browse files Browse the repository at this point in the history
  • Loading branch information
aonishuk committed Sep 28, 2017
2 parents a670750 + 9d802b7 commit be73d16
Show file tree
Hide file tree
Showing 5,307 changed files with 361,304 additions and 361,250 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
17 changes: 17 additions & 0 deletions LICENSE.txt
Expand Up @@ -864,6 +864,23 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For swagger-ui (ambari-web/api-docs/*):
Home: https://github.com/jensoleg/swagger-ui
License: Apache License, Version 2.0

Copyright 2015 Reverb Technologies, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


For simplejson (ambari-common/src/main/python/ambari_simplejson)

simplejson is dual-licensed software. It is available under the terms
Expand Down
Expand Up @@ -55,7 +55,7 @@
<div class="btn-group navbar-views-dropdown" dropdown is-open="viewsdropdown.isopen" ng-mouseover="viewsdropdown.isopen=true" ng-mouseout="viewsdropdown.isopen=false">
<a href="{{fromSiteRoot('/#/main/views')}}" ng-click="gotoViewsDashboard()" class="dropdown-toggle"><i class="fa fa-th"></i></a>
<ul class="dropdown-menu" role="menu">
<li ng-repeat="instance in viewInstances"><a href="{{fromSiteRoot('/#/main/views/' + instance.viewUrl)}}" ng-click="about()">{{instance.label}}</a></li>
<li ng-repeat="instance in viewInstances"><a href="{{fromSiteRoot('/#/main/views/' + instance.viewUrl)}}" target="_blank">{{instance.label}}</a></li>
<li ng-show="!viewInstances.length" class="disabled"><a>{{'common.noViews' | translate}}</a></li>
</ul>
</div>
Expand Down
Expand Up @@ -132,6 +132,26 @@ angular.module('ambariAdminConsole')
}
};

$scope.deleteInstance = function(instance) {
ConfirmationModal.show(
$t('common.delete', {
term: $t('views.viewInstance')
}),
$t('common.deleteConfirmation', {
instanceType: $t('views.viewInstance'),
instanceName: instance.ViewInstanceInfo.label
})
).then(function() {
View.deleteInstance(instance.ViewInstanceInfo.view_name, instance.ViewInstanceInfo.version, instance.ViewInstanceInfo.instance_name)
.then(function() {
loadViews();
})
.catch(function(data) {
Alert.error($t('views.alerts.cannotDeleteInstance'), data.data.message);
});
});
};

$scope.reloadViews = function () {
loadViews();
};
Expand Down
Expand Up @@ -25,9 +25,9 @@ angular.module('ambariAdminConsole')
$scope.isLDAPEnabled = false;
$scope.connectivity = {
trustStore: 'default',
trustStoreOptions: ['authentication.connectivity.trustStore.options.default', 'authentication.connectivity.trustStore.options.custom'],
trustStoreOptions: ['default', 'custom'],
trustStoreType: 'jks',
trustStoreTypeOptions: ['authentication.connectivity.trustStoreType.options.jks', 'authentication.connectivity.trustStoreType.options.jceks', 'authentication.connectivity.trustStoreType.options.pkcs12']
trustStoreTypeOptions: ['jks', 'jceks', 'pkcs12']
};
$scope.attributes = {
detection: 'auto'
Expand Down
Expand Up @@ -37,7 +37,7 @@ angular.module('ambariAdminConsole')
});
var orderedRoles = Cluster.orderedRoles;
var pms = [];
for (var key in orderedRoles) {
for (var key=0;key<orderedRoles.length;key++) {
pms.push($scope.permissions[orderedRoles[key]]);
}
$scope.permissions = pms;
Expand Down
Expand Up @@ -68,6 +68,7 @@ angular.module('ambariAdminConsole')

function loadMembers(){
$scope.group.getMembers().then(function(members) {
$scope.group.groupTypeName = $t(GroupConstants.TYPES[$scope.group.group_type].LABEL_KEY);
$scope.groupMembers = members;
$scope.group.editingUsers = angular.copy($scope.groupMembers);
});
Expand All @@ -81,6 +82,8 @@ angular.module('ambariAdminConsole')
loadMembers();
});

$scope.group.getGroupType();

$scope.deleteGroup = function(group) {
ConfirmationModal.show(
$t('common.delete', {
Expand Down Expand Up @@ -129,6 +132,20 @@ angular.module('ambariAdminConsole')
});
};


$scope.removePrivilege = function(name, privilege) {
var privilegeObject = {
id: privilege.privilege_id,
view_name: privilege.view_name,
version: privilege.version,
instance_name: name
};
View.deletePrivilege(privilegeObject).then(function() {
loadPrivileges();
});
};

function loadPrivileges() {
// Load privileges
Group.getPrivileges($routeParams.id).then(function(data) {
var privileges = {
Expand All @@ -145,6 +162,7 @@ angular.module('ambariAdminConsole')
privileges.views[privilege.instance_name] = privileges.views[privilege.instance_name] || { privileges:[]};
privileges.views[privilege.instance_name].version = privilege.version;
privileges.views[privilege.instance_name].view_name = privilege.view_name;
privileges.views[privilege.instance_name].privilege_id = privilege.privilege_id;
privileges.views[privilege.instance_name].privileges.push(privilege.permission_label);
}
});
Expand All @@ -157,6 +175,6 @@ angular.module('ambariAdminConsole')
}).catch(function(data) {
Alert.error($t('common.alerts.cannotLoadPrivileges'), data.data.message);
});


}
loadPrivileges();
}]);
Expand Up @@ -34,7 +34,6 @@ angular.module('ambariAdminConsole')
$scope.useRedhatSatellite = false;

$scope.clusterName = $routeParams.clusterName;
$scope.subversionPattern = /^\d+\.\d+(-\d+)?$/;
$scope.upgradeStack = {
stack_name: '',
stack_version: '',
Expand Down Expand Up @@ -196,8 +195,7 @@ angular.module('ambariAdminConsole')
if (!existingOSHash[stackOs.OperatingSystems.os_type]) {
stackOs.selected = false;
stackOs.repositories.forEach(function(repo) {
repo.Repositories.base_url = '';
repo.Repositories.initial_base_url = '';
repo.Repositories.initial_base_url = repo.Repositories.default_base_url;
});
$scope.osList.push(stackOs);
}
Expand Down Expand Up @@ -292,6 +290,12 @@ angular.module('ambariAdminConsole')
}
});

if ( $scope.useRedhatSatellite ){
angular.forEach( $scope.osList, function (os) {
os.repositories = [];
} )
}

var skip = $scope.skipValidation || $scope.useRedhatSatellite;
return Stack.validateBaseUrls(skip, $scope.osList, $scope.upgradeStack).then(function (invalidUrls) {
if (invalidUrls.length === 0) {
Expand Down Expand Up @@ -453,8 +457,10 @@ angular.module('ambariAdminConsole')

$scope.setVersionSelected = function (version) {
var response = version;
var stackVersion = response.updateObj.RepositoryVersions || response.updateObj.VersionDefinition;
$scope.id = response.id;
$scope.isPatch = response.type == 'PATCH';
$scope.isPatch = stackVersion.type === 'PATCH';
$scope.isMaint = stackVersion.type === 'MAINT';
$scope.stackNameVersion = response.stackNameVersion || $t('common.NA');
$scope.displayName = response.displayName || $t('common.NA');
$scope.actualVersion = response.repositoryVersion || response.actualVersion || $t('common.NA');
Expand All @@ -465,10 +471,7 @@ angular.module('ambariAdminConsole')
stack_version: response.stackVersion,
display_name: response.displayName || $t('common.NA')
};
$scope.services = response.services.filter(function (service) {
var skipServices = ['MAPREDUCE2', 'GANGLIA', 'KERBEROS'];
return skipServices.indexOf(service.name) === -1;
}) || [];
$scope.activeStackVersion.services = Stack.filterAvailableServices(response);
$scope.repoVersionFullName = response.repoVersionFullName;
$scope.osList = response.osList;

Expand Down
Expand Up @@ -36,9 +36,11 @@ angular.module('ambariAdminConsole')

$scope.loadStackVersionInfo = function () {
return Stack.getRepo($routeParams.versionId, $routeParams.stackName).then(function (response) {
var stackVersion = response.updateObj.RepositoryVersions || response.updateObj.VersionDefinition;
$scope.activeStackVersion = response;
$scope.id = response.id;
$scope.isPatch = response.type == 'PATCH';
$scope.isPatch = stackVersion.type === 'PATCH';
$scope.isMaint = stackVersion.type === 'MAINT';
$scope.stackNameVersion = response.stackNameVersion || $t('common.NA');
$scope.displayName = response.displayName || $t('common.NA');
$scope.version = response.version || $t('common.NA');
Expand All @@ -50,10 +52,7 @@ angular.module('ambariAdminConsole')
stack_version: response.stackVersion,
display_name: response.displayName
};
$scope.services = response.services.filter(function (service) {
var skipServices = ['MAPREDUCE2', 'GANGLIA', 'KERBEROS'];
return skipServices.indexOf(service.name) === -1;
}) || [];
$scope.activeStackVersion.services = Stack.filterAvailableServices(response);
response.updateObj.operating_systems.forEach(function(os) {
$scope.defaulfOSRepos[os.OperatingSystems.os_type] = {};
os.repositories.forEach(function(repo) {
Expand Down
Expand Up @@ -28,6 +28,7 @@ angular.module('ambariAdminConsole')
$scope.filter = {
name: '',
version: '',
type: '',
cluster: {
options: [],
current: null
Expand Down Expand Up @@ -189,7 +190,26 @@ angular.module('ambariAdminConsole')
$scope.$watch('filter', function (filter) {
$scope.isNotEmptyFilter = Boolean(filter.name
|| filter.version
|| filter.type
|| (filter.cluster.current && filter.cluster.current.value)
|| (filter.stack.current && filter.stack.current.value));
}, true);

$scope.toggleVisibility = function (repo) {
repo.isProccessing = true;
var payload = {
RepositoryVersions:{
hidden: repo.hidden
}
}
Stack.updateRepo(repo.stack_name, repo.stack_version, repo.id, payload).then( null, function () {
repo.hidden = !repo.hidden;
}).finally( function () {
delete repo.isProccessing;
});
}

$scope.isHideCheckBoxEnabled = function ( repo ) {
return !repo.isProccessing && ( !repo.cluster || repo.isPatch && ( repo.status === 'installed' || repo.status === 'install_failed') );
}
}]);
Expand Up @@ -184,6 +184,18 @@ angular.module('ambariAdminConsole')
}
};

$scope.removePrivilege = function(name, privilege) {
var privilegeObject = {
id: privilege.privilege_id,
view_name: privilege.view_name,
version: privilege.version,
instance_name: name
};
View.deletePrivilege(privilegeObject).then(function() {
loadPrivileges();
});
};

$scope.deleteUser = function() {
ConfirmationModal.show(
$t('common.delete', {
Expand Down Expand Up @@ -257,6 +269,7 @@ angular.module('ambariAdminConsole')
privileges.views[privilege.instance_name] = privileges.views[privilege.instance_name] || { privileges:[]};
privileges.views[privilege.instance_name].version = privilege.version;
privileges.views[privilege.instance_name].view_name = privilege.view_name;
privileges.views[privilege.instance_name].privilege_id = privilege.privilege_id;
if (privileges.views[privilege.instance_name].privileges.indexOf(privilege.permission_label) == -1) {
privileges.views[privilege.instance_name].privileges.push(privilege.permission_label);
}
Expand Down
Expand Up @@ -159,6 +159,7 @@ angular.module('ambariAdminConsole')
'common.alerts.cannotUpdateAdminStatus': 'Cannot update User Admin status',
'common.alerts.checkFailed': 'CHECK FAILED',
'common.alerts.onlySimpleChars': 'Must contain only simple characters.',
'common.hidden' : 'Hidden',

'main.title': 'Welcome to Apache Ambari',
'main.noClusterDescription': 'Provision a cluster, manage who can access the cluster, and customize views for Ambari users.',
Expand Down Expand Up @@ -307,7 +308,7 @@ angular.module('ambariAdminConsole')
'users.showAll': 'Show all users',
'users.showAdmin': 'Show only admin users',
'users.groupMembership': 'Group Membership',
'users.userNameTip': 'Only alpha-numeric characters, up to 80 characters',
'users.userNameTip': 'Maximum length is 80 characters. \\, &, |, <, >, ` are not allowed.',

'users.changeStatusConfirmation.title': 'Change Status',
'users.changeStatusConfirmation.message': 'Are you sure you want to change status for user "{{userName}}" to {{status}}?',
Expand Down Expand Up @@ -343,7 +344,7 @@ angular.module('ambariAdminConsole')
'users.alerts.usersEffectivePrivilege': '{{user_name}}\'s effective privilege through its Group(s) is higher than your selected privilege.',

'versions.current': 'Current',
'versions.addVersion': 'Add Version',
'versions.addVersion': 'Add Version or Hotfix',
'versions.defaultVersion': '(Default Version Definition)',
'versions.inUse': 'In Use',
'versions.installed': 'Installed',
Expand Down Expand Up @@ -374,7 +375,7 @@ angular.module('ambariAdminConsole')

'versions.deregister': 'Deregister Version',
'versions.deregisterConfirmation': 'Are you sure you want to deregister version <strong>{{versionName}}</strong> ?',
'versions.placeholder': 'Version Number (0.0)',
'versions.placeholder': 'Version Number {{pattern}}',
'versions.repos': 'Repositories',
'versions.os': 'OS',
'versions.baseURL': 'Base URL',
Expand Down Expand Up @@ -434,17 +435,10 @@ angular.module('ambariAdminConsole')

'authentication.connectivity.trustStore.label': 'Trust Store',

'authentication.connectivity.trustStore.options.default': 'JDK Default',
'authentication.connectivity.trustStore.options.custom': 'Custom',

'authentication.connectivity.trustStorePath': 'Trust Store Path',

'authentication.connectivity.trustStoreType.label': 'Trust Store Type',

'authentication.connectivity.trustStoreType.options.jks': 'JKS',
'authentication.connectivity.trustStoreType.options.jceks': 'JCEKS',
'authentication.connectivity.trustStoreType.options.pkcs12': 'PKCS12',

'authentication.connectivity.trustStorePassword': 'Trust Store Password',
'authentication.connectivity.dn': 'Bind DN',
'authentication.connectivity.bindPassword': 'Bind Password',
Expand Down

0 comments on commit be73d16

Please sign in to comment.