error 500 web interface

764 views
Skip to first unread message

sergio...@gigas.com

unread,
Aug 10, 2017, 6:11:02 AM8/10/17
to Fujitsu RunMyProcess Developer Community
hi team:




We do not work a script in the web interface in today a script that before if it did and we have not modified anything. The browser shows us a 500 error

The script that does not work now is as follows:




if (RMPApplication.validate()) {
var calcResult;

id_calc_spinner.setVisible(true);
id_btn_calcular.setEnabled(false);
//Se llama a la composite API que devuelve la informacion del resultado del excel
id_calc_dc_price.trigger(
{
'numero_de_vcores_amd': RMPApplication.get('numero_de_vcores_amd') ? RMPApplication.get('numero_de_vcores_amd') : '',
'numero_de_vcores_intel': RMPApplication.get('numero_de_vcores_intel') ? RMPApplication.get('numero_de_vcores_intel') : '',
'numero_de_vcores_intel_oracle_sin_licencia': RMPApplication.get('numero_de_vcores_intel_oracle_sin_licencia') ? RMPApplication.get('numero_de_vcores_intel_oracle_sin_licencia') : '',
'numero_de_vcores_intel_oracle_con_licencia': RMPApplication.get('numero_de_vcores_intel_oracle_con_licencia') ? RMPApplication.get('numero_de_vcores_intel_oracle_con_licencia') : '',
'memoria': RMPApplication.get('memoria') ? RMPApplication.get('memoria') : '',
'disco_ssd': RMPApplication.get('disco_ssd') ? RMPApplication.get('disco_ssd') : '',
'disco_sas': RMPApplication.get('disco_sas') ? RMPApplication.get('disco_sas') : '',
'disco_sata': RMPApplication.get('disco_sata') ? RMPApplication.get('disco_sata') : '',
//'descuento_comercial': RMPApplication.get('descuento_comercial') ? (parseFloat(RMPApplication.get('descuento_comercial')) / 100).toString() : ''
'descuento_comercial': RMPApplication.get('descuento_comercial') ? RMPApplication.get('descuento_comercial') : '',
'pais': RMPApplication.get('pais') ? RMPApplication.get('pais') : '',
'moneda': RMPApplication.get('moneda') ? RMPApplication.get('moneda') : '',
'descuento_partner': RMPApplication.get('descuento_partner') ? RMPApplication.get('descuento_partner').toUpperCase() : '',
'cliente_name': RMPApplication.get('cliente_name') ? RMPApplication.get('cliente_name') : ''
},{},
function (result) {
id_calc_spinner.setVisible(false);
id_btn_calcular.setEnabled(true);

//Se pintan las tablas en formato HTML
printTable(result.composite_api_result.resources, 'table-resources');
printTable(result.composite_api_result.prices, 'table-prices');
//Se guarda el resultado html de las tablas en variables para pasar al servidor
RMPApplication.set('html_table_resources', $('#table-resources')[0].outerHTML);
RMPApplication.set('html_table_prices', $('#table-prices')[0].outerHTML);

//Se definen las variables de las imágenes creadas y se proporciona un link para su descarga
convertToCanvas('#table-resources table', 'canvas_resources');
convertToCanvas('#table-prices table', 'canvas_prices');

}, function (error) {
id_calc_spinner.setVisible(false);
id_btn_calcular.setEnabled(true);
//console.log('Error: ' + JSON.stringify(error));
}
);
} else {
alert('Te faltan datos por completar: ' + RMPGigasExtensions.getInvalidWidgetsString());
}


function printTable(calcResult, tableHtmlId) {
var minRow = 0;
var maxRow = 0;
var minCol = 0;
var maxCol = 0;
var entryArray = calcResult.feed.entry;
for (var eent = 0; eent < entryArray.length; eent++) {
var eachEntry = entryArray[eent];

//Se calculan los limites de la tabla a partir de los datos devueltos
if (eent === 0) {
minRow = parseInt(eachEntry.cell["@row"]);
maxRow = parseInt(eachEntry.cell["@row"]);
minCol = parseInt(eachEntry.cell["@col"]);
maxCol = parseInt(eachEntry.cell["@col"]);
}
if (parseInt(eachEntry.cell["@row"]) < minRow) minRow = parseInt(eachEntry.cell["@row"]);
if (parseInt(eachEntry.cell["@row"]) > maxRow) maxRow = parseInt(eachEntry.cell["@row"]);
if (parseInt(eachEntry.cell["@col"]) < minCol) minCol = parseInt(eachEntry.cell["@col"]);
if (parseInt(eachEntry.cell["@col"]) > maxCol) maxCol = parseInt(eachEntry.cell["@col"]);
}
//Se define el resultado del ancho y alto de la tabla
calcTableWidth = (maxCol - minCol) + 1;
calcTableHeight = (maxRow - minRow) + 1;

//Se genera una tabla html a partir de los datos recibidos del excel
var newTable = document.createElement('table');
newTable.className += 'calc-table1 red-footer';
for (var erow = 0; erow < calcTableHeight; erow++) {
var tr = document.createElement('tr');
for (var ecol = 0; ecol < calcTableWidth; ecol++) {
var td = document.createElement('td');
var text = entryArray.find(function(entry) {
return parseInt(entry.cell['@row']) === (erow + minRow) && parseInt(entry.cell['@col']) === (ecol + minCol);
});

if (typeof text !== 'undefined' && typeof text.cell.P_value !== 'undefined') {
var tdSpanElement = document.createElement('span');
tdSpanElement.innerHTML = text.cell.P_value.replace(/(\n)+/g, '<br />');
td.appendChild(tdSpanElement);
}
tr.appendChild(td);
}
newTable.appendChild(tr);
}
document.getElementById(tableHtmlId).innerHTML = newTable.outerHTML;

//Se formatea la tabla html con los colores especificados
formatPricesTable();
formatResourcesTable();
}

function formatResourcesTable() {
//Primer Row del título
var firstTitleRow = '#table-resources tr:nth-child(1) td:nth-child(1)';
$(firstTitleRow).siblings().remove();
$(firstTitleRow).attr('colspan', 3);
$(firstTitleRow).addClass('t-header-1');

$('#table-resources tr:nth-child(3) td, #table-resources tr:nth-child(5) td, #table-resources tr:nth-child(11) td, #table-resources tr:nth-child(16) td, #table-resources tr:nth-child(17) td, #table-resources tr:nth-child(18) td, #table-resources tr:nth-child(19) td').addClass('t-header-2');
$('#table-resources tr:nth-child(n+2) td:nth-child(1)').addClass('t-align-left');
$('#table-resources tr:nth-child(3) td, #table-resources tr:nth-child(16) td, #table-resources tr:nth-child(17) td, #table-resources tr:nth-child(18) td').addClass('t-bb-white');
$('#table-resources tr:nth-child(2) td, #table-resources tr:nth-child(4) td, #table-resources tr:nth-child(10) td, #table-resources tr:nth-child(15) td').css({'padding':'0', 'height':'0', 'margin':'0'});
}

function formatPricesTable() {
//Primer Row del título
//$('#table-prices tr:nth-child(1) td:nth-child(1)').siblings().remove();
//$('#table-prices tr:nth-child(1) td:nth-child(1)').attr('colspan', 4);
$('#table-prices tr:nth-child(1) td').addClass('t-header-1');

$('#table-prices tr:nth-child(2) td').addClass('t-header-2');
$('#table-prices tr:nth-child(4) td').addClass('t-green');
$('#table-prices tr:nth-child(n+3) td:nth-child(1)').addClass('t-align-left');

//$('#table-prices tr:nth-child(1) td').html('Precios (' + RMPApplication.get('moneda') + ')' + ' IMPUESTOS NO INCLUIDOS');
}


//Para forzar al navegador a renderizar correctamente la tabla
function setpixelated(context){
context['imageSmoothingEnabled'] = false; /* standard */
context['mozImageSmoothingEnabled'] = false; /* Firefox */
context['oImageSmoothingEnabled'] = false; /* Opera */
context['webkitImageSmoothingEnabled'] = false; /* Safari */
context['msImageSmoothingEnabled'] = false; /* IE */
}

//Para convertir la tabla html en un canvas, y el canvas en un archivo png
function convertToCanvas(tableId, canvasVarName) {
var tabla = $(tableId); // global variable
var resultCanvas;
html2canvas(tabla, {
onrendered: function (canvas) {
setpixelated(canvas.getContext('2d'));
RMPApplication.set(canvasVarName, canvas.toDataURL('image/png', 1.0));
}
});
}



a greeting




sergio...@gigas.com

unread,
Aug 10, 2017, 9:27:02 AM8/10/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
On Thursday, August 10, 2017 at 12:11:02 PM UTC+2, sergio...@gigas.com wrote:
> hi team:
>
this is my url

https://live.runmyprocess.com/live/117241439829670022/appli/280496?P_mode=LIVE&P_version=216563

sergio...@gigas.com

unread,
Aug 11, 2017, 8:32:23 AM8/11/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
On Thursday, August 10, 2017 at 12:11:02 PM UTC+2, sergio...@gigas.com wrote:
> hi team:
>
> hi team:

Please this is very serious and affects the operation of our company


A greeting

Abhilash Sambhare

unread,
Aug 11, 2017, 9:01:03 AM8/11/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
Hi there,

We are investigating on your issue.Will update you soon.

Thanks & Regards,
Abhilash Sambhare
Fujitsu RunMyProcess Support

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/55a90eea-21b0-4f2f-b62d-cb781b40ff68%40runmyprocess.com.

Abhilash Sambhare

unread,
Aug 13, 2017, 9:48:20 PM8/13/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
Hi there,

We have check your issue with our product team.Please check you are still facing the issue.

Thanks & Regards,
Abhilash Sambhare
Fujitsu RunMyProcess Support

sergio...@gigas.com

unread,
Aug 14, 2017, 2:49:13 AM8/14/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
On Monday, August 14, 2017 at 3:48:20 AM UTC+2, abhilash.sambhare wrote:
> Hi there,
>

Hi abhilash

The error continues to happen
> To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
Selección_070.png

Sergio Pinto Jimenez

unread,
Aug 15, 2017, 12:37:03 PM8/15/17
to Fujitsu RunMyProcess Developer Community

Hi, have a news?

sergio...@gigas.com

unread,
Aug 16, 2017, 3:32:47 AM8/16/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
On Tuesday, August 15, 2017 at 6:37:03 PM UTC+2, Sergio Pinto Jimenez wrote:
> Hi, have a news?
>
>
good morning,

Everything works perfectly, why has it happened? a greeting

Abhilash Sambhare

unread,
Aug 16, 2017, 3:38:49 AM8/16/17
to Fujitsu RunMyProcess Developer Community, sergio...@gigas.com
Hi there,

Glad to know your issue is resolved.Please don't hesitate to contact us.

Thanks & Regards,
Abhilash Sambhare
Fujitsu RunMyProcess Support



To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
Reply all
Reply to author
Forward
0 new messages