The report scores are not aligned to center

shraddha_agrawa
Tera Expert

Hi All,

I am trying to show a Single Score Report on the Service Portal through a Widget. its working fine for all types of Report, but for Single Score type, the content is not aligned to center.

Any help in the below code would be appreciated.

PFB Widget Code:

HTML:

<div class="panel panel-pink">

<!--<div class="panel-heading">Report Name</div> -->

<div class="panel-body">

<iframe class="not-active" ng-src="{{data.report}}" scrolling="no" frameborder="0" height="{{data.height}}" width="100%"></iframe>

<div></div>

CSS:

.panel.panel-pink .panel-heading {

  border-radius: 3px;

  color: #FFF;

  background-color: #D9853B;

}

.panel.panel-pink .panel-body {

  background-color: #e7e7e7;

  color: #4D4D4D;

}

.panel-pink > .panel-body{

 

min-height:100px;

}

.panel-pink > .panel-heading{

height:46px;

}

.panel-pink{

 

margin-top:-15px;

  width:100%;

 

}

Server Script:

(function() {

  /* populate the 'data' object */

  /* e.g., data.table = $sp.getValue('table'); */

  data.report = "show_report.do?report="+options.report;

  if (options.height) {

  data.height = options.height +"px";

  } else {

  data.height = "100px";

  }

})();

Client Script:

function() {

  /* widget controller */

  var c = this;

}

Option Schema:

[{"displayValue":"Report","name":"report","label":"Report","type":"reference","value":"sys_report","ed":{"reference":"sys_report"}},{"name":"height","label":"Height","type":"string"}]

Thanks

8 REPLIES 8

Hi,



I have attached the UI page for show_report in XML here. You can simply import it and use it.



Just add it in under the style tag in HTML itself.( no need to change anything in client script)




.single-score{


text-align: center !important;


}  



find_real_file.png


Thanks a lot for the help gauravbajaj2007 . it worked .



On Wed, Nov 8, 2017 at 2:23 PM, gauravbajaj2007 <


Please mark it Correct


ellencarpen
Tera Contributor

How does the end user center it?