PM-2314,PM-2331

PM-2314,En ADMIN > Plugins > Enterprise features el status del actionByEmail y el pmConsolidatedCL es "Install now" y este deberíestar como Installed y estas opciones ya deberí estar instaladas
PM-2331,Admin/Plugins/Enterprise Features -> Eliminar columna de status en listado de features

Dentro el tab "Enterprise features" se quito la columna status (PM-2331),
Se agregaran los new features al ejecutar en consola ./processmaker databa-upgrade(PM-2314),
This commit is contained in:
marcelo.cuiza
2015-04-16 14:54:27 -04:00
parent c3b10a782e
commit bd638dde23
3 changed files with 183 additions and 48 deletions

View File

@@ -27,6 +27,59 @@ class PMLicensedFeatures
{
private $featuresDetails = array ();
private $features = array ();
private $newFeatures = array(
0 => array(
"description" => "Enables de Actions By Email feature",
"enabled" => false,
"id" => "actionsByEmail",
"latest_version" => "",
"log" => null,
"name" => "actionsByEmail",
"nick" => "actionsByEmail",
"progress" => 0,
"publisher" => "Colosa",
"release_type" => "localRegistry",
"status" => "ready",
"store" => "00000000000000000000000000010004",
"type" => "features",
"url" => "",
"version" => ""
),
1 => array(
"description" => "Enables de Batch Routing feature",
"enabled" => false,
"id" => "pmConsolidatedCL",
"latest_version" => "",
"log" => null,
"name" => "pmConsolidatedCL",
"nick" => "pmConsolidatedCL",
"progress" => 0,
"publisher" => "Colosa",
"release_type" => "localRegistry",
"status" => "ready",
"store" => "00000000000000000000000000010005",
"type" => "features",
"url" => "",
"version" => ""
),
2 => array(
"description" => "Dashboard with improved charting graphics and optimized to show strategic information like Process Efficiency and User Efficiency indicators.",
"enabled" => false,
"id" => "strategicDashboards",
"latest_version" => "",
"log" => null,
"name" => "strategicDashboards",
"nick" => "Strategic Dashboards",
"progress" => 0,
"publisher" => "Colosa",
"release_type" => "localRegistry",
"status" => "ready",
"store" => "00000000000000000000000000010006",
"type" => "features",
"url" => "",
"version" => ""
)
);
private static $instancefeature = null;
@@ -87,6 +140,132 @@ class PMLicensedFeatures
$this->featuresDetails[$value[0]]->enabled = $enable;
return $enable;
}
public function addNewFeatures ($data)
{
$newFeaturesList = $this->newFeatures;
$newData = array();
$newFeaturesIds = array();
foreach($newFeaturesList as $val) {
$newFeaturesIds[] = $val['id'];
}
$criteria = new Criteria();
$criteria->addSelectColumn(AddonsManagerPeer::ADDON_ID);
$criteria->add(AddonsManagerPeer::ADDON_ID, $newFeaturesIds, Criteria::IN);
$criteria->add(AddonsManagerPeer::ADDON_TYPE, 'features');
$rs = AddonsManagerPeer::doSelectRS($criteria);
$rs->next();
$row = $rs->getRow();
if(sizeof($row)) {
while (is_array($row)) {
$ids[] = $row[0];
$rs->next();
$row = $rs->getRow();
}
$toUpdate = array_diff($newFeaturesIds,$ids);
if(sizeof($toUpdate)){
$newFeaturesListAux = array();
foreach($toUpdate as $index => $v) {
$newFeaturesListAux[] = $newFeaturesList[$index];
}
unset($newFeaturesList);
$newFeaturesList = array_values($newFeaturesListAux);
} else {
return $data;
}
}
foreach($newFeaturesList as $k => $newFeature){
$newData[] = array (
'db' => 'wf',
'table' => 'ADDONS_MANAGER',
'keys' =>
array (
0 => 'ADDON_ID',
),
'data' =>
array (
0 =>
array (
'field' => 'ADDON_DESCRIPTION',
'type' => 'text',
'value' => $newFeature['description'],
),
1 =>
array (
'field' => 'ADDON_ID',
'type' => 'text',
'value' => $newFeature['id'],
),
2 =>
array (
'field' => 'ADDON_NAME',
'type' => 'text',
'value' => $newFeature['name'],
),
3 =>
array (
'field' => 'ADDON_NICK',
'type' => 'text',
'value' => $newFeature['nick'],
),
4 =>
array (
'field' => 'ADDON_PUBLISHER',
'type' => 'text',
'value' => $newFeature['publisher'],
),
5 =>
array (
'field' => 'ADDON_RELEASE_TYPE',
'type' => 'text',
'value' => $newFeature['release_type'],
),
6 =>
array (
'field' => 'ADDON_STATUS',
'type' => 'text',
'value' => $newFeature['status'],
),
7 =>
array (
'field' => 'STORE_ID',
'type' => 'text',
'value' => $newFeature['store'],
),
8 =>
array (
'field' => 'ADDON_TYPE',
'type' => 'text',
'value' => $newFeature['type'],
),
9 =>
array (
'field' => 'ADDON_DOWNLOAD_URL',
'type' => 'text',
'value' => $newFeature['url'],
),
10 =>
array (
'field' => 'ADDON_VERSION',
'type' => 'text',
'value' => $newFeature['version'],
),
11 =>
array (
'field' => 'ADDON_DOWNLOAD_PROGRESS',
'type' => 'text',
'value' => $newFeature['progress'],
)
),
'action' => 1,
);
$i++;
}
return array_merge($data, $newData);
}
/*----------------------------------********---------------------------------*/
}

View File

@@ -912,6 +912,10 @@ class workspaceTools
if (file_exists(PATH_CORE . 'data' . PATH_SEP . 'check.data')) {
$checkData = unserialize(file_get_contents(PATH_CORE . 'data' . PATH_SEP . 'check.data'));
if (is_array($checkData)) {
/*----------------------------------********---------------------------------*/
$licensedFeatures = & PMLicensedFeatures::getSingleton();
$checkData = $licensedFeatures->addNewFeatures($checkData);
/*----------------------------------********---------------------------------*/
foreach ($checkData as $checkThis) {
$this->updateThisRegistry($checkThis);
}

View File

@@ -1443,54 +1443,6 @@ Ext.onReady(function() {
}
return '';
}
},
{
id : "status-feature",
header : _('ID_STATUS'),
width : 60,
sortable : false,
hideable : false,
dataIndex: "status",
renderer: function (val) {
var str = "";
var text = "";
switch (val) {
case "available": text = _('ID_BUY_NOW'); break;
case "installed": text = _('ID_INSTALLED'); break;
case "ready": text = _('ID_INSTALL_NOW'); break;
case "upgrade": text = _('ID_UPGRADE_NOW'); break;
case "download": text = _('ID_CANCEL'); break;
case "install": text = _('ID_INSTALLING'); break;
case "cancel": text = _('ID_CANCELLING'); break;
case "disabled": text = _('ID_DISABLED'); break;
case "download-start": text = "<img src=\"/images/enterprise/loader.gif\" />"; break;
default: text = val; break;
}
switch (val) {
case "available":
case "ready":
case "upgrade":
case "download":
case "install":
case "cancel":
case "download-start":
str = "<div class=\"" + val + " roundedCorners\">" + text + "</div>";
break;
case "installed":
case "disabled":
str = "<div style=\"margin-right: 0.85em; font-weight: bold; text-align: center;\">" + text + "</div>";
break;
default:
str = "<div class=\"" + val + " roundedCorners\">" + text + "</div>";
break;
}
return (str);
}
}
]
});