Replace usage of action factories with types

https://fedorahosted.org/freeipa/ticket/3235
This commit is contained in:
Petr Vobornik 2013-04-17 11:07:37 +02:00
parent 5be709bf9d
commit 7a3f08002d
12 changed files with 61 additions and 61 deletions

View File

@ -766,7 +766,7 @@ IPA.association_facet = function (spec, no_init) {
//default buttons and their actions //default buttons and their actions
spec.actions = spec.actions || []; spec.actions = spec.actions || [];
spec.actions.unshift( spec.actions.unshift(
IPA.refresh_action, 'refresh',
{ {
name: 'remove', name: 'remove',
hide_cond: ['read-only'], hide_cond: ['read-only'],
@ -1151,7 +1151,7 @@ IPA.attribute_facet = function(spec, no_init) {
//default buttons and their actions //default buttons and their actions
spec.actions = spec.actions || []; spec.actions = spec.actions || [];
spec.actions.unshift( spec.actions.unshift(
IPA.refresh_action, 'refresh',
{ {
name: 'remove', name: 'remove',
hide_cond: ['read-only'], hide_cond: ['read-only'],

View File

@ -1130,8 +1130,8 @@ IPA.cert.entity = function(spec) {
$factory: IPA.cert.details_facet, $factory: IPA.cert.details_facet,
no_update: true, no_update: true,
actions: [ actions: [
IPA.cert.revoke_action, 'cert_revoke',
IPA.cert.restore_action 'cert_restore'
], ],
state: { state: {
evaluators: [ evaluators: [

View File

@ -244,9 +244,9 @@ exp.details_facet = IPA.details_facet = function(spec, no_init) {
spec.actions = spec.actions || []; spec.actions = spec.actions || [];
spec.actions.unshift( spec.actions.unshift(
IPA.refresh_action, 'refresh',
IPA.reset_action, 'reset',
IPA.update_action); 'update');
spec.control_buttons = spec.control_buttons || []; spec.control_buttons = spec.control_buttons || [];

View File

@ -129,8 +129,8 @@ IPA.dns.zone_entity = function(spec) {
} }
], ],
actions: [ actions: [
IPA.batch_disable_action, 'batch_disable',
IPA.batch_enable_action 'batch_enable'
], ],
control_buttons: [ control_buttons: [
{ {
@ -233,12 +233,12 @@ IPA.dns.zone_entity = function(spec) {
] ]
}], }],
actions: [ actions: [
IPA.select_action, 'select',
IPA.enable_action, 'enable',
IPA.disable_action, 'disable',
IPA.delete_action, 'delete',
IPA.dns.add_permission_action, 'dns_add_permission',
IPA.dns.remove_permission_action 'dns_remove_permission'
], ],
header_actions: ['select_action', 'enable', 'disable', 'delete', header_actions: ['select_action', 'enable', 'disable', 'delete',
'add_permission', 'remove_permission'], 'add_permission', 'remove_permission'],

View File

@ -73,10 +73,10 @@ IPA.group.entity = function(spec) {
} }
], ],
actions: [ actions: [
IPA.select_action, 'select',
IPA.group.make_posix_action, 'make_posix',
IPA.group.make_external_action, 'make_external',
IPA.delete_action 'delete'
], ],
header_actions: ['select_action', 'make_posix', 'make_external', 'delete'], header_actions: ['select_action', 'make_posix', 'make_external', 'delete'],
state: { state: {

View File

@ -47,8 +47,8 @@ IPA.hbac.rule_entity = function(spec) {
'description' 'description'
], ],
actions: [ actions: [
IPA.batch_disable_action, 'batch_disable',
IPA.batch_enable_action 'batch_enable'
], ],
control_buttons: [ control_buttons: [
{ {
@ -68,10 +68,10 @@ IPA.hbac.rule_entity = function(spec) {
entity: that, entity: that,
command_mode: 'info', command_mode: 'info',
actions: [ actions: [
IPA.select_action, 'select',
IPA.enable_action, 'enable',
IPA.disable_action, 'disable',
IPA.delete_action 'delete'
], ],
header_actions: ['select_action', 'enable', 'disable', 'delete'], header_actions: ['select_action', 'enable', 'disable', 'delete'],
state: { state: {

View File

@ -145,26 +145,26 @@ IPA.host.entity = function(spec) {
} }
], ],
actions: [ actions: [
IPA.host.unprovision_action, 'host_unprovision',
{ {
$factory: IPA.host.set_otp_action, $type: 'set_otp',
name: 'set_otp', name: 'set_otp',
label: '@i18n:objects.host.password_set_title', label: '@i18n:objects.host.password_set_title',
status: 'missing', status: 'missing',
hide_cond: ['has_password'] hide_cond: ['has_password']
}, },
{ {
$factory: IPA.host.set_otp_action, $type: 'set_otp',
name: 'reset_otp', name: 'reset_otp',
label: '@i18n:objects.host.password_reset_title', label: '@i18n:objects.host.password_reset_title',
status: 'present', status: 'present',
show_cond: ['has_password'] show_cond: ['has_password']
}, },
IPA.cert.view_action, 'cert_view',
IPA.cert.get_action, 'cert_get',
IPA.cert.request_action, 'cert_request',
IPA.cert.revoke_action, 'cert_revoke',
IPA.cert.restore_action 'cert_restore'
], ],
state: { state: {
evaluators: [ evaluators: [

View File

@ -46,9 +46,9 @@ IPA.search_facet = function(spec, no_init) {
spec.actions = spec.actions || []; spec.actions = spec.actions || [];
spec.actions.unshift( spec.actions.unshift(
IPA.refresh_action, 'refresh',
IPA.batch_remove_action, 'batch_remove',
IPA.add_action); 'add');
spec.control_buttons = spec.control_buttons || []; spec.control_buttons = spec.control_buttons || [];

View File

@ -46,8 +46,8 @@ IPA.selinux.selinuxusermap_entity = function(spec) {
'description' 'description'
], ],
actions: [ actions: [
IPA.batch_disable_action, 'batch_disable',
IPA.batch_enable_action 'batch_enable'
], ],
control_buttons: [ control_buttons: [
{ {
@ -67,10 +67,10 @@ IPA.selinux.selinuxusermap_entity = function(spec) {
entity: that, entity: that,
command_mode: 'info', command_mode: 'info',
actions: [ actions: [
IPA.select_action, 'select',
IPA.enable_action, 'enable',
IPA.disable_action, 'disable',
IPA.delete_action 'delete'
], ],
header_actions: ['select_action', 'enable', 'disable', 'delete'], header_actions: ['select_action', 'enable', 'disable', 'delete'],
state: { state: {

View File

@ -149,12 +149,12 @@ IPA.service.entity = function(spec) {
} }
], ],
actions: [ actions: [
IPA.service.unprovision_action, 'service_unprovision',
IPA.cert.view_action, 'cert_view',
IPA.cert.get_action, 'cert_get',
IPA.cert.request_action, 'cert_request',
IPA.cert.revoke_action, 'cert_revoke',
IPA.cert.restore_action 'cert_restore'
], ],
state: { state: {
evaluators: [ evaluators: [

View File

@ -45,8 +45,8 @@ IPA.sudo.rule_entity = function(spec) {
'description' 'description'
], ],
actions: [ actions: [
IPA.batch_disable_action, 'batch_disable',
IPA.batch_enable_action 'batch_enable'
], ],
control_buttons: [ control_buttons: [
{ {
@ -66,10 +66,10 @@ IPA.sudo.rule_entity = function(spec) {
entity: that, entity: that,
command_mode: 'info', command_mode: 'info',
actions: [ actions: [
IPA.select_action, 'select',
IPA.enable_action, 'enable',
IPA.disable_action, 'disable',
IPA.delete_action 'delete'
], ],
header_actions: ['select_action', 'enable', 'disable', 'delete'], header_actions: ['select_action', 'enable', 'disable', 'delete'],
state: { state: {

View File

@ -67,11 +67,11 @@ IPA.user.entity = function(spec) {
], ],
actions: [ actions: [
{ {
$factory: IPA.batch_disable_action, $type: 'batch_disable',
hide_cond: ['self-service'] hide_cond: ['self-service']
}, },
{ {
$factory: IPA.batch_enable_action, $type: 'batch_enable',
hide_cond: ['self-service'] hide_cond: ['self-service']
} }
], ],
@ -234,11 +234,11 @@ IPA.user.entity = function(spec) {
} }
], ],
actions: [ actions: [
IPA.select_action, 'select',
IPA.enable_action, 'enable',
IPA.disable_action, 'disable',
IPA.delete_action, 'delete',
IPA.user.reset_password_action 'reset_password'
], ],
header_actions: ['select_action', 'enable', 'disable', 'delete'], header_actions: ['select_action', 'enable', 'disable', 'delete'],
state: { state: {