3 Replies Latest reply on Oct 23, 2018 8:13 AM by neounix

    Creating a Very Simple Linux Dashboard with Oracle Jet

    neounix

      Oracle JET is great.  Some people say that "dashboards" are the "sweetspot" for Oracle JET.  I agree.

       

      Here is a simple Linux dashboard I created for a LAMP server during the online Oracle JET "Soaring with JET" video tutorial.

       

      My first post is to share the simple PHP code used on the server side.  Then, I will followup by sharing the Oracle JET code (done) all code shared and

      free to use as you wish at the link below:

       

      https://www.unix.com/web-programming/280168-creating-simple-linux-dashboard-oracle-jet.html

       

      The image below is what the simple dashboard looks like.  Of course, the sky is the limit adding new

      indicators and Oracle JET makes building this kind of useful dashboard very simple.   Make me wish

      I had of discovered Oracle JET years ago, but better late than never, as they say.

       

      Screen Shot 2018-10-22 at 2.16.43 PM.png

        • 1. Re: Creating a Very Simple Linux Dashboard with Oracle Jet
          neounix

          Update:

           

          All the Oracle JET module code has been posted for the Linux dashboard.  Feel  free to use anything you find useful if building a server monitoring dashboard.

           

          Happy to give a little back to the Oracle JET community after the great free video tutorials and the excellent help in this community forum.

           

          Thanks again.

          • 2. Re: Creating a Very Simple Linux Dashboard with Oracle Jet
            Andrew Bennett

            Looks like a nice project to get stuck in with learning! And actually has a use at the end of the day

             

            Just a quick comment, it's not exactly advertised too much in the cookbook etc but instead of relying on jquery to do a lot of DOM manipulation to classes, styles, and attributes you can do it in a nicer way with dynamic properties.

             

            For example, under a certain condition I want to add a class to an element. Declare an observable variable to hold the dynamic class name, e.g bold-text / largest-text. In the html for that element you can do :class="[[variable]]" and any time you update the observable it will update that html property. This runs true for any attribute on elements, just prefix it with : and remember the square braces to be able to reference Javascript. It protects your application from any accidental ID changes and you can scan through the HTML easily seeing if any properties would be manipulated without sifting through the JS file.

             

            Andy

            1 person found this helpful
            • 3. Re: Creating a Very Simple Linux Dashboard with Oracle Jet
              neounix

              Hi Andrew,

               

              Yeah, thanks.  Honestly, I did look into that.

               

              I looked at such a method and also using Computed Observables i.e. ko.computed() and I seem to prefer using jQuery more (because the looping /[ polling nature of my %.getJSON() method; and have no issues with DOM element ids.  

               

              Thanks again for the suggestion.  I guess I'm just a overly simple guy and prefer the old-fashioned jQuery way to update DOM attributes compared to doing "everything" in knockout.js, especially when I can do it so easily in jQuery.

               

              I'm sure using knockout.js for "everything we can" is a good idea, especially if not looping with an interval timer, and I'm sure there is a much better way to code my little dashboard.  

               

              Also, thanks again, the Oracle JET team, for all the support. Much appreciated.

               

              PS:  Please hire someone to create a VS Code auto-completion Intellisense extension for JET and release it in October 2018