mirror of
https://github.com/ansible/awx.git
synced 2026-03-08 05:01:09 -02:30
AC-997 enable activity stream for non-privileged users.
This commit is contained in:
@@ -30,8 +30,7 @@ function Home ($scope, $compile, $routeParams, $rootScope, $location, Wait, Obje
|
|||||||
stream: {
|
stream: {
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var html = Button({ btn: buttons.refresh, action: 'refresh', toolbar: true });
|
var html = Button({ btn: buttons.refresh, action: 'refresh', toolbar: true });
|
||||||
@@ -136,15 +135,11 @@ function HomeGroups ($location, $routeParams, HomeGroupList, GenerateList, Proce
|
|||||||
scope['home_groups'][i].show_failures = hosts_status['failures'],
|
scope['home_groups'][i].show_failures = hosts_status['failures'],
|
||||||
scope['home_groups'][i].hosts_status_class = hosts_status['class'],
|
scope['home_groups'][i].hosts_status_class = hosts_status['class'],
|
||||||
|
|
||||||
//scope.home_groups[i].failed_hosts_tip = msg['tooltip'];
|
|
||||||
//scope.home_groups[i].failed_hosts_link = msg['url'];
|
|
||||||
//scope.home_groups[i].failed_hosts_class = msg['class'];
|
|
||||||
scope.home_groups[i].status = scope.home_groups[i].summary_fields.inventory_source.status;
|
scope.home_groups[i].status = scope.home_groups[i].summary_fields.inventory_source.status;
|
||||||
scope.home_groups[i].source = (scope.home_groups[i].summary_fields.inventory_source) ?
|
scope.home_groups[i].source = (scope.home_groups[i].summary_fields.inventory_source) ?
|
||||||
scope.home_groups[i].summary_fields.inventory_source.source : null;
|
scope.home_groups[i].summary_fields.inventory_source.source : null;
|
||||||
//scope.home_groups[i].last_updated = last_update;
|
|
||||||
//scope.home_groups[i].status_badge_class = update_status['class'];
|
|
||||||
//scope.home_groups[i].status_badge_tooltip = update_status['tooltip'];
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,7 @@ angular.module('CredentialFormDefinition', [])
|
|||||||
stream: {
|
stream: {
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
mode: 'edit',
|
mode: 'edit'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -127,21 +127,6 @@ angular.module('GroupFormDefinition', [])
|
|||||||
dataContainer: 'body',
|
dataContainer: 'body',
|
||||||
tab: 'source'
|
tab: 'source'
|
||||||
},
|
},
|
||||||
/*update_interval: {
|
|
||||||
label: 'Update Interval',
|
|
||||||
type: 'select',
|
|
||||||
ngOptions: 'interval.label for interval in update_interval_options',
|
|
||||||
ngShow: "source.value !== '' && source.value !== null",
|
|
||||||
editRequired: false,
|
|
||||||
addRequired: false,
|
|
||||||
'default': { label: 'none', value: 0 },
|
|
||||||
dataTitle: 'Update Interval',
|
|
||||||
dataPlacement: 'left',
|
|
||||||
awPopOver: "<p>Automatically run the inventory update process the selected number of minutes from " +
|
|
||||||
"the last run.</p><p>With a value set, task manager will periodically compare the amount of elapsed time from the last run. If enough time " +
|
|
||||||
"has elapsed, it will go ahead and start an inventory update process.</p>",
|
|
||||||
dataContainer: 'body'
|
|
||||||
},*/
|
|
||||||
checkbox_group: {
|
checkbox_group: {
|
||||||
label: 'Update Options',
|
label: 'Update Options',
|
||||||
type: 'checkbox_group',
|
type: 'checkbox_group',
|
||||||
|
|||||||
@@ -23,8 +23,7 @@ angular.module('InventoryFormDefinition', [])
|
|||||||
dataPlacement: "top",
|
dataPlacement: "top",
|
||||||
icon: "icon-comments-alt",
|
icon: "icon-comments-alt",
|
||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
iconSize: 'large',
|
iconSize: 'large'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -112,8 +112,7 @@ angular.module('InventoryHostsFormDefinition', [])
|
|||||||
dataPlacement: "top",
|
dataPlacement: "top",
|
||||||
icon: "icon-comments-alt",
|
icon: "icon-comments-alt",
|
||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
iconSize: 'large',
|
iconSize: 'large'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ angular.module('JobTemplateFormDefinition', [])
|
|||||||
dataPlacement: "top",
|
dataPlacement: "top",
|
||||||
icon: "icon-comments-alt",
|
icon: "icon-comments-alt",
|
||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
iconSize: 'large',
|
iconSize: 'large'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,7 @@ angular.module('OrganizationFormDefinition', [])
|
|||||||
dataPlacement: "top",
|
dataPlacement: "top",
|
||||||
icon: "icon-comments-alt",
|
icon: "icon-comments-alt",
|
||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
iconSize: 'large',
|
iconSize: 'large'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ angular.module('PermissionFormDefinition', [])
|
|||||||
dataPlacement: "top",
|
dataPlacement: "top",
|
||||||
icon: "icon-comments-alt",
|
icon: "icon-comments-alt",
|
||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
iconSize: 'large',
|
iconSize: 'large'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
|
|||||||
@@ -25,8 +25,7 @@ angular.module('ProjectFormDefinition', [])
|
|||||||
dataPlacement: "top",
|
dataPlacement: "top",
|
||||||
icon: "icon-comments-alt",
|
icon: "icon-comments-alt",
|
||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
iconSize: 'large',
|
iconSize: 'large'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -27,8 +27,7 @@ angular.module('TeamFormDefinition', [])
|
|||||||
dataPlacement: "top",
|
dataPlacement: "top",
|
||||||
icon: "icon-comments-alt",
|
icon: "icon-comments-alt",
|
||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
iconSize: 'large',
|
iconSize: 'large'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ angular.module('UserFormDefinition', [])
|
|||||||
dataPlacement: "top",
|
dataPlacement: "top",
|
||||||
icon: "icon-comments-alt",
|
icon: "icon-comments-alt",
|
||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
iconSize: 'large',
|
iconSize: 'large'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -64,14 +64,14 @@ angular.module('AccessHelper', ['RestServices', 'Utilities', 'ngCookies'])
|
|||||||
status = 'alert-danger';
|
status = 'alert-danger';
|
||||||
hdr = 'License Error';
|
hdr = 'License Error';
|
||||||
msg = '<p>There is a problem with the /etc/awx/license file on your Tower server. Check to make sure Tower can access ' +
|
msg = '<p>There is a problem with the /etc/awx/license file on your Tower server. Check to make sure Tower can access ' +
|
||||||
'the file.<p>' + purchase_msg;
|
'the file.</p>' + purchase_msg;
|
||||||
Alert(hdr, msg, status, null, false, true);
|
Alert(hdr, msg, status, null, false, true);
|
||||||
}
|
}
|
||||||
else if (license['demo'] !== undefined && license['demo'] == true) {
|
else if (license['demo'] !== undefined && license['demo'] == true) {
|
||||||
// demo
|
// demo
|
||||||
status = 'alert-info';
|
status = 'alert-info';
|
||||||
hdr = 'Tower Demo';
|
hdr = 'Tower Demo';
|
||||||
msg = '<p>Thank you for trying Ansible Tower. You can use this edition to manage up to 10 hosts free.<p>' +
|
msg = '<p>Thank you for trying Ansible Tower. You can use this edition to manage up to 10 hosts free.</p>' +
|
||||||
purchase_msg;
|
purchase_msg;
|
||||||
Alert(hdr, msg, status);
|
Alert(hdr, msg, status);
|
||||||
}
|
}
|
||||||
@@ -80,7 +80,7 @@ angular.module('AccessHelper', ['RestServices', 'Utilities', 'ngCookies'])
|
|||||||
status = 'alert-info';
|
status = 'alert-info';
|
||||||
hdr = 'License Expired';
|
hdr = 'License Expired';
|
||||||
msg = '<p>Your Ansible Tower License has expired and is no longer compliant. You can continue, but you will be ' +
|
msg = '<p>Your Ansible Tower License has expired and is no longer compliant. You can continue, but you will be ' +
|
||||||
'unable to add any additional hosts.<p>' + purchase_msg;
|
'unable to add any additional hosts.</p>' + purchase_msg;
|
||||||
Alert(hdr, msg, status);
|
Alert(hdr, msg, status);
|
||||||
}
|
}
|
||||||
else if (license['date_warning'] !== undefined && license['date_warning'] == true) {
|
else if (license['date_warning'] !== undefined && license['date_warning'] == true) {
|
||||||
|
|||||||
@@ -62,8 +62,7 @@ angular.module('CredentialsListDefinition', [])
|
|||||||
stream: {
|
stream: {
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -32,46 +32,6 @@ angular.module('HomeGroupListDefinition', [])
|
|||||||
columnClass: 'col-lg-3 col-md2 col-sm-2 hidden-xs elllipsis',
|
columnClass: 'col-lg-3 col-md2 col-sm-2 hidden-xs elllipsis',
|
||||||
linkTo: "\{\{ '/#/inventories/' + group.inventory + '/' \}\}"
|
linkTo: "\{\{ '/#/inventories/' + group.inventory + '/' \}\}"
|
||||||
},
|
},
|
||||||
/*failed_hosts: {
|
|
||||||
label: 'Failed Hosts',
|
|
||||||
ngHref: "\{\{ group.failed_hosts_link \}\}",
|
|
||||||
badgeIcon: "\{\{ 'fa icon-failures-' + group.failed_hosts_class \}\}",
|
|
||||||
badgeNgHref: "\{\{ group.failed_hosts_link \}\}",
|
|
||||||
badgePlacement: 'left',
|
|
||||||
badgeToolTip: "\{\{ group.failed_hosts_tip \}\}",
|
|
||||||
badgeTipPlacement: 'top',
|
|
||||||
awToolTip: "\{\{ group.failed_hosts_tip \}\}",
|
|
||||||
dataPlacement: "top",
|
|
||||||
searchable: false,
|
|
||||||
excludeModal: true,
|
|
||||||
sortField: "hosts_with_active_failures"
|
|
||||||
},*/
|
|
||||||
/*status: {
|
|
||||||
label: 'Status',
|
|
||||||
ngClick: "viewUpdateStatus(\{\{ group.id \}\})",
|
|
||||||
searchType: 'select',
|
|
||||||
badgeIcon: "\{\{ 'fa fa-cloud ' + group.status_badge_class \}\}",
|
|
||||||
badgeToolTip: "\{\{ group.status_badge_tooltip \}\}",
|
|
||||||
awToolTip: "\{\{ group.status_badge_tooltip \}\}",
|
|
||||||
dataPlacement: 'top',
|
|
||||||
badgeTipPlacement: 'top',
|
|
||||||
badgePlacement: 'left',
|
|
||||||
searchOptions: [
|
|
||||||
{ name: "failed", value: "failed" },
|
|
||||||
{ name: "never", value: "never updated" },
|
|
||||||
{ name: "n/a", value: "none" },
|
|
||||||
{ name: "successful", value: "successful" },
|
|
||||||
{ name: "updating", value: "updating" }],
|
|
||||||
sourceModel: 'inventory_source',
|
|
||||||
sourceField: 'status'
|
|
||||||
},*/
|
|
||||||
/*last_updated: {
|
|
||||||
label: 'Last<br>Updated',
|
|
||||||
sourceModel: 'inventory_source',
|
|
||||||
sourceField: 'last_updated',
|
|
||||||
searchable: false,
|
|
||||||
nosort: false
|
|
||||||
},*/
|
|
||||||
source: {
|
source: {
|
||||||
label: 'Source',
|
label: 'Source',
|
||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
@@ -164,8 +124,7 @@ angular.module('HomeGroupListDefinition', [])
|
|||||||
stream: {
|
stream: {
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,8 +92,7 @@ angular.module('HomeHostListDefinition', [])
|
|||||||
stream: {
|
stream: {
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,8 +62,7 @@ angular.module('InventoriesListDefinition', [])
|
|||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
icon: "icon-comments-alt",
|
icon: "icon-comments-alt",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -94,17 +93,5 @@ angular.module('InventoriesListDefinition', [])
|
|||||||
awToolTip: 'Delete inventory',
|
awToolTip: 'Delete inventory',
|
||||||
dataPlacement: 'top'
|
dataPlacement: 'top'
|
||||||
}
|
}
|
||||||
/*,
|
|
||||||
dropdown: {
|
|
||||||
type: 'DropDown',
|
|
||||||
label: 'Jobs',
|
|
||||||
icon: 'icon-zoom-in',
|
|
||||||
'class': 'btn-default btn-xs',
|
|
||||||
options: [
|
|
||||||
{ ngClick: 'viewJobs(\{\{ inventory.id \}\})', label: 'All' },
|
|
||||||
{ ngClick: "viewFailedJobs(\{\{ inventory.id \}\})", label: 'Failed' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -59,8 +59,7 @@ angular.module('InventoryGroupsDefinition', [])
|
|||||||
stream: {
|
stream: {
|
||||||
ngClick: "showGroupActivity()",
|
ngClick: "showGroupActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
},
|
},
|
||||||
help: {
|
help: {
|
||||||
mode: 'all',
|
mode: 'all',
|
||||||
|
|||||||
@@ -31,14 +31,6 @@ angular.module('InventoryHostsDefinition', [])
|
|||||||
dataType: "host",
|
dataType: "host",
|
||||||
awDraggable: "true"
|
awDraggable: "true"
|
||||||
},
|
},
|
||||||
/*groups: {
|
|
||||||
label: 'Groups',
|
|
||||||
searchable: true,
|
|
||||||
sourceModel: 'groups',
|
|
||||||
sourceField: 'name',
|
|
||||||
nosort: true,
|
|
||||||
searchPlaceholder: "search_place_holder"
|
|
||||||
},*/
|
|
||||||
enabled: {
|
enabled: {
|
||||||
label: 'Disabled?',
|
label: 'Disabled?',
|
||||||
searchSingleValue: true,
|
searchSingleValue: true,
|
||||||
@@ -100,8 +92,7 @@ angular.module('InventoryHostsDefinition', [])
|
|||||||
stream: {
|
stream: {
|
||||||
ngClick: "showHostActivity()",
|
ngClick: "showHostActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,7 @@ angular.module('JobTemplatesListDefinition', [])
|
|||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
icon: "icon-comments-alt",
|
icon: "icon-comments-alt",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ angular.module('OrganizationListDefinition', [])
|
|||||||
stream: {
|
stream: {
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -51,8 +51,7 @@ angular.module('PermissionListDefinition', [])
|
|||||||
stream: {
|
stream: {
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -84,8 +84,7 @@ angular.module('ProjectsListDefinition', [])
|
|||||||
stream: {
|
stream: {
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,7 @@ angular.module('TeamsListDefinition', [])
|
|||||||
stream: {
|
stream: {
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -45,8 +45,7 @@ angular.module('UserListDefinition', [])
|
|||||||
stream: {
|
stream: {
|
||||||
ngClick: "showActivity()",
|
ngClick: "showActivity()",
|
||||||
awToolTip: "View Activity Stream",
|
awToolTip: "View Activity Stream",
|
||||||
mode: 'all',
|
mode: 'all'
|
||||||
ngShow: "user_is_superuser"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user