mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +03:00
AC-997 enable activity stream for non-privileged users.
This commit is contained in:
parent
926ec500e2
commit
47ad240b99
@ -30,8 +30,7 @@ function Home ($scope, $compile, $routeParams, $rootScope, $location, Wait, Obje
|
||||
stream: {
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
}
|
||||
};
|
||||
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].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].source = (scope.home_groups[i].summary_fields.inventory_source) ?
|
||||
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: {
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'edit',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'edit'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -127,21 +127,6 @@ angular.module('GroupFormDefinition', [])
|
||||
dataContainer: 'body',
|
||||
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: {
|
||||
label: 'Update Options',
|
||||
type: 'checkbox_group',
|
||||
|
@ -23,8 +23,7 @@ angular.module('InventoryFormDefinition', [])
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -112,8 +112,7 @@ angular.module('InventoryHostsFormDefinition', [])
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -24,8 +24,7 @@ angular.module('JobTemplateFormDefinition', [])
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -23,8 +23,7 @@ angular.module('OrganizationFormDefinition', [])
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -24,8 +24,7 @@ angular.module('PermissionFormDefinition', [])
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
iconSize: 'large'
|
||||
},
|
||||
|
||||
fields: {
|
||||
|
@ -25,8 +25,7 @@ angular.module('ProjectFormDefinition', [])
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -27,8 +27,7 @@ angular.module('TeamFormDefinition', [])
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -24,8 +24,7 @@ angular.module('UserFormDefinition', [])
|
||||
dataPlacement: "top",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'edit',
|
||||
iconSize: 'large',
|
||||
ngShow: "user_is_superuser"
|
||||
iconSize: 'large'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -64,14 +64,14 @@ angular.module('AccessHelper', ['RestServices', 'Utilities', 'ngCookies'])
|
||||
status = 'alert-danger';
|
||||
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 ' +
|
||||
'the file.<p>' + purchase_msg;
|
||||
'the file.</p>' + purchase_msg;
|
||||
Alert(hdr, msg, status, null, false, true);
|
||||
}
|
||||
else if (license['demo'] !== undefined && license['demo'] == true) {
|
||||
// demo
|
||||
status = 'alert-info';
|
||||
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;
|
||||
Alert(hdr, msg, status);
|
||||
}
|
||||
@ -80,7 +80,7 @@ angular.module('AccessHelper', ['RestServices', 'Utilities', 'ngCookies'])
|
||||
status = 'alert-info';
|
||||
hdr = 'License Expired';
|
||||
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);
|
||||
}
|
||||
else if (license['date_warning'] !== undefined && license['date_warning'] == true) {
|
||||
|
@ -62,8 +62,7 @@ angular.module('CredentialsListDefinition', [])
|
||||
stream: {
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -32,46 +32,6 @@ angular.module('HomeGroupListDefinition', [])
|
||||
columnClass: 'col-lg-3 col-md2 col-sm-2 hidden-xs elllipsis',
|
||||
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: {
|
||||
label: 'Source',
|
||||
searchType: 'select',
|
||||
@ -164,8 +124,7 @@ angular.module('HomeGroupListDefinition', [])
|
||||
stream: {
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,8 +92,7 @@ angular.module('HomeHostListDefinition', [])
|
||||
stream: {
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,8 +62,7 @@ angular.module('InventoriesListDefinition', [])
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
}
|
||||
},
|
||||
|
||||
@ -94,17 +93,5 @@ angular.module('InventoriesListDefinition', [])
|
||||
awToolTip: 'Delete inventory',
|
||||
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: {
|
||||
ngClick: "showGroupActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
},
|
||||
help: {
|
||||
mode: 'all',
|
||||
|
@ -31,14 +31,6 @@ angular.module('InventoryHostsDefinition', [])
|
||||
dataType: "host",
|
||||
awDraggable: "true"
|
||||
},
|
||||
/*groups: {
|
||||
label: 'Groups',
|
||||
searchable: true,
|
||||
sourceModel: 'groups',
|
||||
sourceField: 'name',
|
||||
nosort: true,
|
||||
searchPlaceholder: "search_place_holder"
|
||||
},*/
|
||||
enabled: {
|
||||
label: 'Disabled?',
|
||||
searchSingleValue: true,
|
||||
@ -100,8 +92,7 @@ angular.module('InventoryHostsDefinition', [])
|
||||
stream: {
|
||||
ngClick: "showHostActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,8 +39,7 @@ angular.module('JobTemplatesListDefinition', [])
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
icon: "icon-comments-alt",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -36,8 +36,7 @@ angular.module('OrganizationListDefinition', [])
|
||||
stream: {
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -51,8 +51,7 @@ angular.module('PermissionListDefinition', [])
|
||||
stream: {
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -84,8 +84,7 @@ angular.module('ProjectsListDefinition', [])
|
||||
stream: {
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -43,8 +43,7 @@ angular.module('TeamsListDefinition', [])
|
||||
stream: {
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -45,8 +45,7 @@ angular.module('UserListDefinition', [])
|
||||
stream: {
|
||||
ngClick: "showActivity()",
|
||||
awToolTip: "View Activity Stream",
|
||||
mode: 'all',
|
||||
ngShow: "user_is_superuser"
|
||||
mode: 'all'
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user