MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.24.0 is available! For more information about this release, check out this topic.

    Extend table / insert TD - please help

    Development
    5
    10
    537
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Cetax last edited by Cetax

      Hello everybody,
      I have the module MMM-fronius (PV system) here.
      The builder of this module writes the data in a table in a row.
      Can someone help me put the name in a cell and put the data in a cell?

      Tabelle.jpg

      I can hardly deal with JS.
      In line 152 in the code, you can see that

      var row = this.config.singleLine? document.createElement (" span "): document.createElement (" tr ");
      

      I hope you understand what I mean, I want the NAME in a field and the DATA in a field so that I can adjust the whole thing via CSS.

      Who knows JS and tables and would like to help me?
      How do I get that into individual fields?

      Attached is a picture of how it looks.
      Fronius_MM.jpg
      And here is the code: https://pastebin.com/vJkKt29L

      many thanks for your help

      greeting
      Stefan

      A 1 Reply Last reply Reply Quote 0
      • C
        c1olli last edited by c1olli

        Hi Stefan,

        I have also since 1 Month the Fronius Inverter and installed the MMM-Fronius, but the text is bad to read. So I like to install your code, but I have no permission to open or download it.
        Can you help me?

        Greetings
        c1olli

        1 Reply Last reply Reply Quote 0
        • A
          ashishtank @Cetax last edited by

          @Cetax Your pastebin is private so others can not access the code. you want to have your data as below ?

          aa50db42-32f9-4783-acf1-690aa137c42f-image.png

          1 Reply Last reply Reply Quote 0
          • C
            c1olli last edited by

            Is it possible to tell me how it works with the table?
            In that case on the original code.

            A 1 Reply Last reply Reply Quote 0
            • A
              ashishtank @c1olli last edited by

              @c1olli Not sure what exactly you are asking.

              1 Reply Last reply Reply Quote 0
              • C
                c1olli last edited by

                How to get the MMM-Fronius results in a table?
                It would be nicer with the code from @Cetax but at the moment it would be ok for me when I know what I have to change to get the result in a nicer form.

                S 1 Reply Last reply Reply Quote 0
                • S
                  sdetweil @c1olli last edited by sdetweil

                  @c1olli the author did not create columns (td) on the row… (tr)

                  table
                    th (header row with column labels
                       td, td, td, td (for each column)
                  repeat below for each row
                    tr 
                       td, td, td, td (data for each column)
                  

                  he just appended the strings together for the one value on each row

                  Sam

                  Create a working config
                  How to add modules

                  ? 1 Reply Last reply Reply Quote 0
                  • ?
                    A Former User @sdetweil last edited by

                    @sdetweil

                    Why not using div and flex?

                    S 1 Reply Last reply Reply Quote 0
                    • S
                      sdetweil @Guest last edited by

                      @Bugsounet I wasn’t proposing anything… I was answering the question

                      that is how a table looks and the author didn’t use it right…

                      div and flex is a lot more work, but u get a lot of flexibility

                      Sam

                      Create a working config
                      How to add modules

                      ? 1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User @sdetweil last edited by

                        @sdetweil dix and flex is for lazy man like me mouahah

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy