Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Wed, Oct 22, 3:15 AM

in-portal

Index: branches/RC/core/units/agents/agents_config.php
===================================================================
--- branches/RC/core/units/agents/agents_config.php (revision 10943)
+++ branches/RC/core/units/agents/agents_config.php (revision 10944)
@@ -1,134 +1,134 @@
<?php
$config = Array (
'Prefix' => 'agent',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'AgentEventHandler', 'file' => 'agent_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'event',
4 => 'mode',
),
'Hooks' => Array (
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'adm',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterCacheRebuild'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnRefreshAgents',
),
),
'IDField' => 'AgentId',
'TableName' => TABLE_PREFIX . 'Agents',
'TitleField' => 'AgentName',
'StatusField' => Array ('Status'),
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('agent' => '!la_title_AddingAgent!'),
'edit_status_labels' => Array ('agent' => '!la_title_EditingAgent!'),
'new_titlefield' => Array ('agent' => '!la_title_NewAgent!'),
),
'agent_list' => Array ('prefixes' => Array ('agent_List'), 'format' => "!la_title_Agents! (#agent_recordcount#)"),
'agent_edit' => Array ('prefixes' => Array ('agent'), 'format' => "#agent_status# '#agent_titlefield#'"),
),
'PermSection' => Array('main' => 'in-portal:agents'),
'Sections' => Array (
'in-portal:agents' => Array (
'parent' => 'in-portal:system',
- 'icon' => 'custom',
+ 'icon' => 'agents',
'label' => 'la_title_Agents',
'url' => Array('t' => 'agents/agent_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
'priority' => 6,
'type' => stTREE,
),
),
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s FROM %1$s',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('AgentName' => 'asc'),
)
),
'Fields' => Array (
'AgentId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'AgentName' => Array (
'type' => 'string', 'max_len' => 255,
'unique' => Array (),
'required' => 1, 'not_null' => 1, 'default' => ''
),
'AgentType' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_User', 2 => 'la_opt_System'), 'use_phrases' => 1,
'required' => 1, 'not_null' => 1, 'default' => 1
),
'Status' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Active', 0 => 'la_opt_Disabled'), 'use_phrases' => 1,
'required' => 1, 'not_null' => 1, 'default' => 1
),
'Event' => Array (
'type' => 'string', 'max_len' => 255,
'formatter' => 'kFormatter', 'regexp' => '/^[a-z-]*[.]{0,1}[a-z-]*:On[A-Za-z]*$/',
'required' => 1, 'not_null' => 1, 'default' => ''
),
'RunInterval' => Array ('type' => 'int', 'required' => 1, 'not_null' => 1, 'default' => 0),
'RunMode' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (reBEFORE => 'la_opt_Before', reAFTER => 'la_opt_After'), 'use_phrases' => 1,
'required' => 1, 'not_null' => 1, 'default' => 2
),
'LastRunOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => NULL),
'LastRunStatus' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Success', 0 => 'la_opt_Failed', 2 => 'la_opt_Running'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
'NextRunOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
'RunTime' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default' => 'icon16_custom.gif'),
'Fields' => Array (
'AgentId' => Array ('title' => 'la_col_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', ),
'AgentName' => Array ('title' => 'la_col_Name', 'filter_block' => 'grid_like_filter',),
'AgentType' => Array ('title' => 'la_col_Type', 'filter_block' => 'grid_options_filter',),
'Status' => Array ('title' => 'la_col_Status', 'filter_block' => 'grid_options_filter',),
'Event' => Array ('title' => 'la_col_Event', 'filter_block' => 'grid_like_filter',),
'RunInterval' => Array ('title' => 'la_col_RunInterval', 'filter_block' => 'grid_range_filter',),
'RunMode' => Array ('title' => 'la_col_RunMode', 'filter_block' => 'grid_options_filter',),
'LastRunOn' => Array ('title' => 'la_col_LastRunOn', 'filter_block' => 'grid_date_range_filter',),
'LastRunStatus' => Array ('title' => 'la_col_LastRunStatus', 'filter_block' => 'grid_options_filter',),
'NextRunOn' => Array ('title' => 'la_col_NextRunOn', 'filter_block' => 'grid_date_range_filter',),
),
),
),
);
\ No newline at end of file
Property changes on: branches/RC/core/units/agents/agents_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/RC/core/admin_templates/agents/agent_edit.tpl
===================================================================
--- branches/RC/core/admin_templates/agents/agent_edit.tpl (revision 10943)
+++ branches/RC/core/admin_templates/agents/agent_edit.tpl (revision 10944)
@@ -1,90 +1,90 @@
<inp2:adm_SetPopupSize width="550" height="400"/>
<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" section="in-portal:agents" prefix="agent" title_preset="agent_edit"/>
+<inp2:m_RenderElement name="combined_header" section="in-portal:agents" prefix="agent" title_preset="agent_edit" module="core"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('agent', '<inp2:agent_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
cancel_edit('agent', 'OnCancelEdit','<inp2:agent_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
reset_form('agent', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('agent', '<inp2:agent_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('agent', '<inp2:agent_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if check="agent_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="agent_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="agent_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:agent_SaveWarning name="grid_save_warning"/>
<inp2:agent_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="inp_id_label" prefix="agent" field="AgentId" title="la_fld_Id"/>
<inp2:m_if check="agent_Field" name="AgentType" equals_to="1" db="db">
<inp2:m_RenderElement name="inp_edit_box" prefix="agent" field="AgentName" title="la_fld_Name"/>
<inp2:m_RenderElement name="inp_label" prefix="agent" field="AgentType" title="la_fld_Type" has_empty="1"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="agent" field="Status" title="la_fld_Status" has_empty="1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="agent" field="Event" title="la_fld_Event"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="agent" field="AgentName" title="la_fld_Name"/>
<inp2:m_RenderElement name="inp_label" prefix="agent" field="AgentType" title="la_fld_Type" has_empty="1"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="agent" field="Status" title="la_fld_Status" has_empty="1"/>
<inp2:m_RenderElement name="inp_label" prefix="agent" field="Event" title="la_fld_Event"/>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_box" prefix="agent" field="RunInterval" title="la_fld_RunInterval"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="agent" field="RunMode" title="la_fld_RunMode" has_empty="1"/>
<inp2:m_RenderElement name="inp_label" prefix="agent" field="LastRunOn" title="la_fld_LastRunOn"/>
<inp2:m_RenderElement name="inp_label" prefix="agent" field="LastRunStatus" title="la_fld_LastRunStatus"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="agent" field="NextRunOn" title="la_fld_NextRunOn"/>
<inp2:m_RenderElement name="inp_label" prefix="agent" field="RunTime" title="la_fld_RunTime"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<inp2:m_include t="incs/footer"/>
Property changes on: branches/RC/core/admin_templates/agents/agent_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/RC/core/admin_templates/agents/agent_list.tpl
===================================================================
--- branches/RC/core/admin_templates/agents/agent_list.tpl (revision 10943)
+++ branches/RC/core/admin_templates/agents/agent_list.tpl (revision 10944)
@@ -1,79 +1,79 @@
<inp2:m_include t="incs/header"/>
-<inp2:m_RenderElement name="combined_header" section="in-portal:agents" prefix="agent" title_preset="agent_list" />
+<inp2:m_RenderElement name="combined_header" section="in-portal:agents" prefix="agent" title_preset="agent_list" module="core" />
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
//do not rename - this function is used in default grid for double click!
function edit()
{
std_edit_item('agent', 'agents/agent_edit');
}
var a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('new_item', '<inp2:m_phrase label="la_ToolTip_Add" escape="1"/>',
function() {
std_precreate_item('agent', 'agents/agent_edit');
} ) );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>::<inp2:m_phrase label="la_ShortToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
std_delete_items('agent')
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton(
new ToolBarButton(
'approve',
'<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>',
function() {
submit_event('agent', 'OnMassApprove');
}
)
);
a_toolbar.AddButton(
new ToolBarButton(
'decline',
'<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>',
function() {
submit_event('agent', 'OnMassDecline');
}
)
);
a_toolbar.AddButton(
new ToolBarButton(
'cancel',
'<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>',
function() {
submit_event('agent', 'OnMassCancel');
}
)
);
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="agent" grid="Default"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="grid" PrefixSpecial="agent" IdField="AgentId" grid="Default" grid_filters="1"/>
<script type="text/javascript">
Grids['agent'].SetDependantToolbarButtons( new Array('edit','delete', 'approve', 'decline', 'cancel') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Property changes on: branches/RC/core/admin_templates/agents/agent_list.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/RC/core/admin_templates/img/icons/icon24_agents.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/RC/core/admin_templates/img/icons/icon24_agents.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: branches/RC/core/admin_templates/img/icons/icon46_agents.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/RC/core/admin_templates/img/icons/icon46_agents.gif
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property

Event Timeline