Project

General

Profile

Bug #3351 » pfsense-svg-increase-resolution-4.5x.patch

Bill McGonigle, 12/04/2013 12:36 AM

View differences:

graph.php-improved 2013-12-04 00:54:52.000000000 -0500
69 69

  
70 70
//SVG attributes
71 71
$attribs['axis']='fill="black" stroke="black"';
72
$attribs['in']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="7"';
73
$attribs['out']='fill="#000000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="7"';
74
$attribs['graph_in']='fill="none" stroke="#FF0000" stroke-opacity="0.8"';
75
$attribs['graph_out']='fill="none" stroke="#000000" stroke-opacity="0.8"';
76
$attribs['legend']='fill="black" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"';
77
$attribs['graphname']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="8"';
78
$attribs['grid_txt']='fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="6"';
79
$attribs['grid']='stroke="gray" stroke-opacity="0.5"';
80
$attribs['switch_unit']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4" text-decoration="underline"';
81
$attribs['switch_scale']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4" text-decoration="underline"';
82
$attribs['error']='fill="blue" font-family="Arial" font-size="4"';
83
$attribs['collect_initial']='fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="4"';
72
$attribs['in']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="32"';
73
$attribs['out']='fill="#000000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="32"';
74
$attribs['graph_in']='fill="none" stroke="#FF0000" stroke-opacity="0.8" stroke-width="4.5"';
75
$attribs['graph_out']='fill="none" stroke="#000000" stroke-opacity="0.8" stroke-width="4.5"';
76
$attribs['legend']='fill="black" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="18"';
77
$attribs['graphname']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="36"';
78
$attribs['grid_txt']='fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="26"';
79
$attribs['grid']='stroke="gray" stroke-opacity="0.5" stroke-width="4.5"';
80
$attribs['switch_unit']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="24" text-decoration="underline"';
81
$attribs['switch_scale']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="24" text-decoration="underline"';
82
$attribs['error']='fill="blue" font-family="Arial" font-size="24"';
83
$attribs['collect_initial']='fill="gray" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="24"';
84 84

  
85 85
//Error text if we cannot fetch data : depends on which method is used
86 86
$error_text = "Cannot get data about interface " . htmlspecialchars($ifnum);
87 87

  
88
$height=100;            //SVG internal height : do not modify
89
$width=200;             //SVG internal width : do not modify
88
$height=450;            //SVG internal height : do not modify
89
$width=900;             //SVG internal width : do not modify
90 90

  
91 91
$fetch_link = "ifstats.php?if=" . htmlspecialchars($ifnum);
92 92

  
......
109 109
    <text id="grid_txt1" x="<?=$width?>" y="<?=$height/4*1?>" <?=$attribs['grid_txt']?> text-anchor="end"> </text>
110 110
    <text id="grid_txt2" x="<?=$width?>" y="<?=$height/4*2?>" <?=$attribs['grid_txt']?> text-anchor="end"> </text>
111 111
    <text id="grid_txt3" x="<?=$width?>" y="<?=$height/4*3?>" <?=$attribs['grid_txt']?> text-anchor="end"> </text>
112
    <text id="graph_in_lbl" x="5" y="8" <?=$attribs['in']?>><?=gettext("In"); ?></text>
113
    <text id="graph_out_lbl" x="5" y="16" <?=$attribs['out']?>><?=gettext("Out"); ?></text>
114
    <text id="graph_in_txt" x="20" y="8" <?=$attribs['in']?>> </text>
115
    <text id="graph_out_txt" x="20" y="16" <?=$attribs['out']?>> </text>
116
    <text id="ifname" x="<?=$width?>" y="8" <?=$attribs['graphname']?> text-anchor="end"><?=htmlspecialchars($ifname)?></text>
117
    <text id="switch_unit" x="<?=$width*0.55?>" y="5" <?=$attribs['switch_unit']?>><?=gettext("Switch to bytes/s"); ?></text>
118
    <text id="switch_scale" x="<?=$width*0.55?>" y="11" <?=$attribs['switch_scale']?>><?=gettext("AutoScale"); ?> (<?=$scale_type?>)</text>
119
    <text id="datetime" x="<?=$width*0.33?>" y="5" <?=$attribs['legend']?>> </text>
120
    <text id="graphlast" x="<?=$width*0.55?>" y="17" <?=$attribs['legend']?>><?=gettext("Graph shows last"); ?> <?=$time_interval*$nb_plot?> <?=gettext("seconds"); ?></text>
121
    <polygon id="axis_arrow_x" <?=$attribs['axis']?> points="<?=($width) . "," . ($height)?> <?=($width-2) . "," . ($height-2)?> <?=($width-2) . "," . $height?>"/>
112
    <text id="graph_in_lbl" x="23" y="36" <?=$attribs['in']?>><?=gettext("In"); ?></text>
113
    <text id="graph_out_lbl" x="23" y="72" <?=$attribs['out']?>><?=gettext("Out"); ?></text>
114
    <text id="graph_in_txt" x="90" y="36" <?=$attribs['in']?>> </text>
115
    <text id="graph_out_txt" x="90" y="72" <?=$attribs['out']?>> </text>
116
    <text id="ifname" x="<?=$width?>" y="36" <?=$attribs['graphname']?> text-anchor="end"><?=htmlspecialchars($ifname)?></text>
117
    <text id="switch_unit" x="<?=$width*0.55?>" y="28" <?=$attribs['switch_unit']?>><?=gettext("Switch to bytes/s"); ?></text>
118
    <text id="switch_scale" x="<?=$width*0.55?>" y="60" <?=$attribs['switch_scale']?>><?=gettext("AutoScale"); ?> (<?=$scale_type?>)</text>
119
    <text id="datetime" x="<?=$width*0.33?>" y="23" <?=$attribs['legend']?>> </text>
120
    <text id="graphlast" x="<?=$width*0.55?>" y="91" <?=$attribs['legend']?>><?=gettext("Graph shows last"); ?> <?=$time_interval*$nb_plot?> <?=gettext("seconds"); ?></text>
121
    <polygon id="axis_arrow_x" <?=$attribs['axis']?> points="<?=($width) . "," . ($height)?> <?=($width-9) . "," . ($height-9)?> <?=($width-9) . "," . $height?>"/>
122 122
    <text id="error" x="<?=$width*0.5?>" y="<?=$height*0.5?>"  visibility="hidden" <?=$attribs['error']?> text-anchor="middle"><?=$error_text?></text>
123 123
    <text id="collect_initial" x="<?=$width*0.5?>" y="<?=$height*0.5?>"  visibility="hidden" <?=$attribs['collect_initial']?> text-anchor="middle"><?=gettext("Collecting initial data, please wait"); ?>...</text>
124 124
  </g>
(3-3/3)