<commit_before>	include "csp-header.txt";
	include "csp-main.txt";

	function ShowContract( $contract, $provider )
	{
		$m = "<tr>";
		$n = $contract["occi.contract.name"];
		$na = $n / "-";
		$nn = $na[0];
		$m = $m#"<td>"#$n;
		$pn = $contract["occi.contract.profile"];
		$m = $m#"<td>"#$pn;
		$n = $contract["occi.contract.hostname"];
		$nid = $contract["occi.contract.node"];
		$hostname = NodeEntry( $nid, $n );
		if ( $hostname != $n )
		{ 	$m = $m#"<td><a href='"#$hostname#"'>"#$hostname#"</a>";	}
		else
		{	$m = $m#"<td>"#$hostname;					}
		$kool="&nbsp;";
		$n = $contract["occi.contract.state"];
		if ( $n > 0 )
		{	$m = $m#"<td>Deployed since";		}
		else
		{	$m = $m#"<td>&nbsp;";		}
		$n = $contract["occi.contract.stamp"];
		$n = $n.date();
		$m = $m#"<td>"#$kool#"<td>"#$n;
		$m.display();
		$pr = $provider.get();
		$pp = "occi."#$pn#".price";
		$prix = $pr[$pp];
		if ( $prix.length() > 0 )
		{	
			$price = $prix.get();
			$fixed = $price["occi.price.fixed"];
			$rate  = $price["occi.price.rate"];
			$rate = $rate.round(2);
			if ( $fixed == "yes" )
			{
				$m = "<td><div align=right>"#$rate#"</right>";
				$m.display();
			}
			else
			{
				$period = $price["occi.price.period"];
				$m = "<td><div align=right>"#$rate#" / "#$period#"</right>";
				$m.display();
			}
		}
		else
		{
			"<td>&nbsp;".display();
		}

	}

	HtmlHeader("Accords Platform Service Report",$1);

	$service = $2;
	$working = 0;

	if ($service.length() > 0 )
	{
		$record = $service.get();
		$sid    = $record["occi.core.id"];

		$m = "<tr><td class=title colspan=7>Service</td></tr>";
		$m.display();
		$m = "<tr><td><b>Service Reference</b><td colspan=4>"#$service#"</td>";
		$m.display();
		$state = $record["occi.service.state"];
		$m = "<td>&nbsp;<td><form action='dashboard.php' method=POST><input type=hidden name=service value='service/"#$sid#"'>";
		$m.display();
		if ( $record.length() > 0 )
		{
		switch ( $state )
		{
		case	1	:
			"<input type=submit class=redaction name=action value='stop service'>".display();
			"<br><input type=submit class=action name=action value='save service'>".display();
			"<br><input type=submit class=greenaction name=action value='scaleup service'>".display();
			"<br><input type=submit class=action name=action value='scaledown service'></form></tr>".display();
			break;
		case	0	:
			"<input type=submit class=greenaction name=action value='start service'></form></tr>".display();
			break;
		default		:
			"<span class=action>working</span></form></tr>".display();
			$working = $working + 1;
		}
		}
		else
		{
			"<span class=action>deleted</span></form></tr>".display();
		}

		$aid     = $record["occi.service.account"];
		$account = $aid.get();
		$vid     = $record["occi.service.vender"];
		$vender  = $vid.get();
		$slaid   = $record["occi.service.sla"];
		$sla     = $slaid.get();
		$manid   = $record["occi.service.manifest"];<commit_msg>improved display of recover button<commit_after>	include "csp-header.txt";
	include "csp-main.txt";

	function ShowContract( $contract, $provider )
	{
		$m = "<tr>";
		$n = $contract["occi.contract.name"];
		$na = $n / "-";
		$nn = $na[0];
		$m = $m#"<td>"#$n;
		$pn = $contract["occi.contract.profile"];
		$m = $m#"<td>"#$pn;
		$n = $contract["occi.contract.hostname"];
		$nid = $contract["occi.contract.node"];
		$hostname = NodeEntry( $nid, $n );
		if ( $hostname != $n )
		{ 	$m = $m#"<td><a href='"#$hostname#"'>"#$hostname#"</a>";	}
		else
		{	$m = $m#"<td>"#$hostname;					}
		$kool="&nbsp;";
		$n = $contract["occi.contract.state"];
		if ( $n > 0 )
		{	$m = $m#"<td>Deployed since";		}
		else
		{	$m = $m#"<td>&nbsp;";		}
		$n = $contract["occi.contract.stamp"];
		$n = $n.date();
		$m = $m#"<td>"#$kool#"<td>"#$n;
		$m.display();
		$pr = $provider.get();
		$pp = "occi."#$pn#".price";
		$prix = $pr[$pp];
		if ( $prix.length() > 0 )
		{	
			$price = $prix.get();
			$fixed = $price["occi.price.fixed"];
			$rate  = $price["occi.price.rate"];
			$rate = $rate.round(2);
			if ( $fixed == "yes" )
			{
				$m = "<td><div align=right>"#$rate#"</right>";
				$m.display();
			}
			else
			{
				$period = $price["occi.price.period"];
				$m = "<td><div align=right>"#$rate#" / "#$period#"</right>";
				$m.display();
			}
		}
		else
		{
			"<td>&nbsp;".display();
		}

	}

	HtmlHeader("Accords Platform Service Report",$1);

	$service = $2;
	$working = 0;

	if ($service.length() > 0 )
	{
		$record = $service.get();
		$sid    = $record["occi.core.id"];

		$m = "<tr><td class=title colspan=7>Service</td></tr>";
		$m.display();
		$m = "<tr><td><b>Service Reference</b><td colspan=4>"#$service#"</td>";
		$m.display();
		$state = $record["occi.service.state"];
		$m = "<td>&nbsp;<td><form action='dashboard.php' method=POST><input type=hidden name=service value='service/"#$sid#"'>";
		$m.display();
		if ( $record.length() > 0 )
		{
		switch ( $state )
		{
		case	1	:
			"<input type=submit class=redaction name=action value='stop service'>".display();
			"<br><input type=submit class=action name=action value='save service'>".display();
			"<br><input type=submit class=greenaction name=action value='scaleup service'>".display();
			"<br><input type=submit class=action name=action value='scaledown service'></form></tr>".display();
			break;
		case	0	:
			"<input type=submit class=greenaction name=action value='start service'></form></tr>".display();
			break;
		default		:
			"<br><input type=submit class=redaction name=action value='recover service'>".display();
			"<br>&nbsp;<br><center><span class=action>working</span></center></form></tr>".display();
			$working = $working + 1;
		}
		}
		else
		{
			"<span class=action>deleted</span></form></tr>".display();
		}

		$aid     = $record["occi.service.account"];
		$account = $aid.get();
		$vid     = $record["occi.service.vender"];
		$vender  = $vid.get();
		$slaid   = $record["occi.service.sla"];
		$sla     = $slaid.get();
		$manid   = $record["occi.service.manifest"];
{'fraction_non_alphanumeric': 0.2558100370495116, 'fraction_numerical': 0.004715392388009431, 'mean_word_length': 3.7134920634920636, 'pattern_counts': {'":': 0, '<': 113, '<?xml version=': 0, '>': 121, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4524133', 'n_tokens_mistral': 2662, 'n_tokens_neox': 2399, 'n_words': 393}