Hello,

i am trying to create some usefull maps for our display in our department.

Background: we have several locations where we monitor our servers, wlan controllers, temperature sensors, etc. So I am trying to create a combination of a data table and a status icon (Errors, Warning, Unusual, Paused).

Now working: the created object worked as one object so each location has it own object and i can change the complete size of the table and the table shows only "warnings" and "errors".

What i am trying to do:

  • Change the font-size of the rows in the table (I only can change the column headline with html/css)
  • if an error is in the data table (For example: Location XYZ), the hole data table schould turn red (background color?) if this is not possible maybe the error line schould be darker red so everyone in the office see "oh crap. there is something wrong"

below you find my current html code.

I hope someone can help.

With regards

Christopher Weber


<div class="map_object map_table" id="<@itemid>" objectid="<@objectid>" subid="<@subid>" style="overflow:auto;font-size:20px;<#mapobject type="coordinates" subid="<@subid>" mode="<@editmode>">"> 


              <#mapobject type="objectgrip" mode="<@editmode>">
              <#mapobject type="htmlbefore" subid="<@subid>">
              <#checkobjecttype objecttype="probenode,group,device" nicemessage="true" id="<@objectid>">
                  


                <div style="overflow:hidden;font-size: 20px;background-color;font-wight: bold">
                    
                    <span class="label"><#objectproperty name="Name" id="<@objectid>">:</span>
                        <#objectstatus name="downsens" id="<@objectid>">
                        <#objectstatus name="partialdownsens" id="<@objectid>">
                        <#objectstatus name="downacksens" id="<@objectid>">
                        <#objectstatus name="warnsens" id="<@objectid>">
                        <#objectstatus name="upsens" id="<@objectid>">
                        <#objectstatus name="pausedsens" id="<@objectid>">
                        <#objectstatus name="unusualsens" id="<@objectid>">
                        <#objectstatus name="undefinedsens" id="<@objectid>">
                    </span>

                    <!--<#lang key="html.mapobjects.tablea3.tabletitle" default="WARNING Sensors (@@@@)" var="tabletitle">-->
                    <div style="font-size: 1em;"
                    <#table tableid="sensortable"
                    id="<@objectid>"
                    content="sensors"
                    columns="sensor,probegroupdevice,message"
                    sortby="probegroupdevice"
                    infoheader="true"
                    links="false"
                    sortable="false"
                    varexpand="tabletitle"
                    tabletitle="@tabletitle"
                    filter_tags="@tag(<@tagfilterstring>)"
                    filter_status="4"
                    filter_status="5"
                    filter_status="13"
                    filter_status="14"
                    >
                    </div>
                </div>

            <#mapobject type="htmlafter" subid="<@subid>">
</div>

Article Comments

Hi,

I had the same problem regarding the font-size. The people of Paessler really helped me out htere so why not spread the love? I added the following to the custom_styles.css:

 .customalarms_biggerfont td {
    font-size: 22px !important;
}

Then in your HTML you just add customalarms_biggerfont to the div class right at the beginning:

<div class="map_object map_table customalarms_biggerfont" id="<@itemid>" objectid="<@objectid>" subid="<@subid>" style="overflow:auto;font-size:20px;<#mapobject type="coordinates" subid="<@subid>" mode="<@editmode>">"> 


              <#mapobject type="objectgrip" mode="<@editmode>">
              <#mapobject type="htmlbefore" subid="<@subid>">
              <#checkobjecttype objecttype="probenode,group,device" nicemessage="true" id="<@objectid>">
                  


                <div style="overflow:hidden;font-size: 20px;background-color;font-wight: bold">
                    
                    <span class="label"><#objectproperty name="Name" id="<@objectid>">:</span>
                        <#objectstatus name="downsens" id="<@objectid>">
                        <#objectstatus name="partialdownsens" id="<@objectid>">
                        <#objectstatus name="downacksens" id="<@objectid>">
                        <#objectstatus name="warnsens" id="<@objectid>">
                        <#objectstatus name="upsens" id="<@objectid>">
                        <#objectstatus name="pausedsens" id="<@objectid>">
                        <#objectstatus name="unusualsens" id="<@objectid>">
                        <#objectstatus name="undefinedsens" id="<@objectid>">
                    </span>

                    <!--<#lang key="html.mapobjects.tablea3.tabletitle" default="WARNING Sensors (@@@@)" var="tabletitle">-->
                    <div style="font-size: 1em;"
                    <#table tableid="sensortable"
                    id="<@objectid>"
                    content="sensors"
                    columns="sensor,probegroupdevice,message"
                    sortby="probegroupdevice"
                    infoheader="true"
                    links="false"
                    sortable="false"
                    varexpand="tabletitle"
                    tabletitle="@tabletitle"
                    filter_tags="@tag(<@tagfilterstring>)"
                    filter_status="4"
                    filter_status="5"
                    filter_status="13"
                    filter_status="14"
                    >
                    </div>
                </div>

            <#mapobject type="htmlafter" subid="<@subid>">
</div>

For me that did the trick. I hope it helps you, too.

Remember: This changes only the tds so don't forget the font-size in the div style Tag or add it to css.

Best regards,

Frank


Jul, 2015 - Permalink

Thank you! It works :)

And i found the color state in the .css files for the "error color red". Its in the file prtg.tables.css. I changed it in my custom_styles so it is realy good to see

table.table tr.sr td, table.table tr.sq td, table.table tr.so td {
  background-color: #e70000 !important;
  border-bottom: 0px solid #C1073F;
  border-top: 0px solid #C1073F;
}

* UPDATE * I added a class and update my map object. it now changed only the color of the map table.

but it also changed the color of all tables. How can i change it that only my map table use this color and not all tables in PRTG?

Kind regards Christopher Weber


Jul, 2015 - Permalink