Ad Widget

Collapse

screen cell customization

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zabbix_gunner
    Member
    • Feb 2015
    • 38

    #16
    sortable does "work" for me in the normal sense. That is if i use it some html code and deploy it independently in a browser , i get expected results.
    The problem is when the same html code is sent as a table to a zabbix screen , there is no sign of 'sortable' in the resulting table. It is as if 'sortable' was not used in the first place.

    regards

    AK

    Comment

    • steveboyson
      Senior Member
      • Jul 2013
      • 582

      #17
      Do the tags (class="sortable") appear in the output generated by zabbix? If not, you have a different problem.

      Comment

      • zabbix_gunner
        Member
        • Feb 2015
        • 38

        #18
        actually , I use 2 classes in table tag , as follows - class='mystyle sortable'. And yes they both appear in the source of the zabbix page.

        regards

        AK

        Comment

        • steveboyson
          Senior Member
          • Jul 2013
          • 582

          #19
          Again, works here, even with two classes specified.

          Comment

          • zabbix_gunner
            Member
            • Feb 2015
            • 38

            #20
            hmm... can you please post some screenshots and the relevant portion of your html code ?

            regards

            AK

            Comment

            • steveboyson
              Senior Member
              • Jul 2013
              • 582

              #21
              Code:
              <td>vdp: vdp backup data (all clients) [yellow if older than 1 day]</td></tr><tr class="even_row" origClass="even_row"><td>29 Jun 2015 12:15:29</td><td class="pre"><script src="/zabbix/sorttable.js"></script>
              <table class="sortable nwa" border="1" style="nwa">
              <style type="text/css">
              .nwa {
              table { border-spacing: 5px; border-collapse: collapse; font-family: Arial, Helvetia, sans-serif; }
              tr { vertical-align:top; text-align:left; }
              tr:hover { background-color: lightgray; }
              }
              table.nwa tr:hover { background-color: lightgray; }
              th { padding: 5px; display:table-cell; vertical-align:top; text-align:left; color:white; background-color:#000099; }
              td { padding: 5px; display:table-cell; vertical-align:top; text-align:left; }
              </style>
              Attached Files

              Comment

              • zabbix_gunner
                Member
                • Feb 2015
                • 38

                #22
                my code is pretty similar to yours and yet i still can't get sortable to work with zabbix screens. Does the path to sorttable.js make a difference ? I have kept it in the same path where the datafile is being generated.
                Also the data file also contains the hostname and date time in addition to the html table format being sent to zabbix ( the zabbix sender format ). Will that be a problem in calling sorrtable.js ?

                regards

                AK

                Comment

                • zabbix_gunner
                  Member
                  • Feb 2015
                  • 38

                  #23
                  Steve , anything on this please ?

                  regards

                  AK

                  Comment

                  • steveboyson
                    Senior Member
                    • Jul 2013
                    • 582

                    #24
                    Nope. Don't know what's going wrong at your code.
                    An example or code snippet would ease things quite pretty much...

                    Comment

                    • zabbix_gunner
                      Member
                      • Feb 2015
                      • 38

                      #25
                      Code:
                      <script src="sorttable.js" type="text/javascript"></script><table class="sortable mystyle" border="1" style="mystyle"><style type="text/css"> .mystyle { table{ border-spacing: 5px; border-collapse: collapse;} tr { vertical-align:top; text-align:middle; } } table.mystyle td { border-left:2px solid green; padding: 3px; display:table-cell; vertical-align:top; text-align:centre; } </style><tr class="sortable mystyle">
                      followed by th tags and tr tags.
                      Do i need to use the sortable class in my th and tr tags as well ?

                      regards

                      AK

                      Comment

                      • steveboyson
                        Senior Member
                        • Jul 2013
                        • 582

                        #26
                        Your <style> definition is after the first usage. Will this really work?

                        <tr> tags don't need the "sortable" class tag AFAIK.

                        I would first try to omit the self-defined clases/styles and see if it works. Then step-by-step include your own definitions.

                        Comment

                        Working...