Forum Stats

  • 3,839,599 Users
  • 2,262,512 Discussions
  • 7,901,013 Comments

Discussions

Creating a Very Simple Linux Dashboard with Oracle Jet

neounix
neounix Member Posts: 28
edited Oct 23, 2018 4:13AM in Oracle JET

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

Tagged:
neounix

Best Answer

  • neounix
    neounix Member Posts: 28
    edited Oct 22, 2018 11:45AM Answer ✓

    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.

Answers

  • neounix
    neounix Member Posts: 28
    edited Oct 22, 2018 11:45AM Answer ✓

    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.

  • Andrew Bennett
    Andrew Bennett Member Posts: 240 Silver Badge
    edited Oct 22, 2018 1:57PM

    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

    neounixneounix
  • neounix
    neounix Member Posts: 28
    edited Oct 23, 2018 4:13AM

    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