Archive for December, 2014


Further to a post over 3 years ago https://tickett.wordpress.com/2011/09/27/updateable-excel-frontend-for-sql-view/ – I have finally given up the search for a ready made solution and built something myself.

I work with a number of systems which have functionality gaps and/or need a simpler (quicker) interface for data entry. The solution is essentially a SQL view (or stored procedure) with a simple grid (excel like) front-end. If any data needs to be captured not currently handled by the system a custom table is created to hold the fields.

My previous Excel based solution works rather well, but is starting to show it’s age. I am now beta testing a web based solution i have built;

Screen Shot 2014-12-11 at 20.34.43

The application is extremely simple to configure- enter the SQL to retrieve & update the data;

Screen Shot 2014-12-11 at 20.43.43

And list the columns with some attributes (ReadOnly, Hidden, Title, Width etc);

Screen Shot 2014-12-11 at 20.42.10

And you’re all set!

Functionality currently includes;

  • Easy configuration
  • Simple/fast data entry (with validation)
  • Column resizing (non-persistent)
  • Sort on any column

Next steps;

  • Test (find and fix bugs)
  • Optimise code
  • Allow parameters in select SQL

That’s better!

After discovering last night that my newly acquired Broadcom 57810A Dual Port 10Gb PCIE Copper (RJ45) Ethernet NICs didn’t fit my Supermicro AS-2022TG-HIBQRF, I was pleased to find they do fit my Supermicro AS-1042G-LTF.

And best of all, absolutely no setup/configuration was necessary. I simply powered down the host, replaced the NIC and powered back up. The ports automatically assigned the same as the NIC I removed.

Screen Shot 2014-12-05 at 09.08.19

Doh! It doesn’t fit!

Looking for a cheaper alternative to the Intel X540-T2 (Dual Port 10Gb PCIE Copper (RJ45) Ethernet NIC) I purchased a Broadcom 57810A (Dual Port 10Gb PCIE Copper (RJ45) Ethernet NIC).

I eagerly opened up my server (Supermicro AS-2022TG-HIBQRF) but it doesn’t quite fit!

Screen Shot 2014-12-04 at 22.14.11

You can see the plastic RAM shroud just touching, and the CPU heatsink just touching but unfortunately the problem is the heatsink screw (just below the back end of the card);

Screen Shot 2014-12-04 at 22.14.36

Very frustrating! If the screw lay where the 20 pin connector / holes were i’d consider getting out the dremel. You can clearly see some chips where i’d need to cut though!

I have had a look and can’t find any alternative heatsinks that might free up the space either!

Guess i’ll have to stick with the Intel X540-T2 for now (admittedly I don’t even know if the Broadcom 57810A is compatible with the server & ESX yet… although I will be sure to try it in my Supermicro AS-1042G-LTF later (watch this space).

Here’s the X540-T2;

Screen Shot 2014-12-04 at 22.23.05

I have just setup an SSRS report for my helpdesk to show open calls, unread e-mails, some KPIs and graphs. I bought a cheap monitor, wall mounted and attached a raspberry pi.

I started with the latest Raspbian image and spent some time tweaking it to boot into x and launch chromium with the homepage set to the URL of my report. Unfortunately it was pretty flakey and always prompted for username/password so I had to VNC in every morning to authenticate.

Yesterday morning chromium decided it no longer wanted to load the report. I tried running;

sudo apt-get update
sudo apt-get upgrade
sudo raspi-update

And rebooted… Or at least I tried to but it would no longer boot- hanging on a message along the lines of;

mmcblk0: error -110

Rather than start again from scratch I decided someone else must have already tackled this “kiosk” style scenario and went on the hunt. Enter Raspberry Webkiosk; http://www.binaryemotions.com/raspberry-webkiosk/ (after a quick trial I paid the €9.90 “donation” to get the full version).

The image took care of the operating system, booting straight into full screen chromium with the home page set to the report URL but I was still stuck with the authentication prompt.

I hoped I could simply enable Anonymous Authentication in IIS, but the report server virtual directories don’t appear in IIS and the information available online all suggests this can’t be done.

The next idea was to try and configure chromium to remember the login credentials. Whilst I was able to save the username and password the prompt still persisted.

Final idea was to try and use an asp/html script of some sort. I then remembered a site I stumbled across recently with some sample/demo reports; http://www.reportsurfer.com/ which didn’t require authentication. I took a look at the html source and could see some simple javascript being used to pass the credentials.

So I built a simple “proxy” page in the default IIS site to redirect to the SSRS report and pass the username & password (the script must be on the same hostname/port to work).

<html>
  <head>
   <script>
var _0x1751=["\x61\x66","\x76\x76"];

function getHTTPObject() {
    if (typeof XMLHttpRequest != 'undefined') {
        return new XMLHttpRequest();
    }
    try {
        return new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try {
            return new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {}
    }
    return false;
}	

function runReport() {
  var http = getHTTPObject();
  var url= "http://rs-01/ReportServer/Pages/ReportViewer.aspx?%2fTEL+Wall+Thing%2fWallDash&rs:Command=Render";
  http.onreadystatechange = function() {
    if (http.readyState == 4) {
      if (http.status == 401) {
        runReport(); 
      }
      if (http.status == 200) {
        document.location = url;
      }
    }
  };
  http.open("get", url, true, _0x1751[0x0], _0x1751[0x1]);
  http.send(null);
  return false;
}
    </script>
  </head>
  <body onload="runReport();">
  </body>
</html>

To use the script yourself, you essentially need to amend the top line;

var _0x1751=["\x61\x66","\x76\x76"];

The first value is the username and the second value is the password (hex encoded just to add some really basic obfuscation). Obviously this is easily reversible so you should create a new account with only permission for the specific report(s) they should be able to access. You can use http://string-functions.com/string-hex.aspx to convert your login details to hex.

Then simply update the report URL;

var url= "http://rs-01/ReportServer/Pages/ReportViewer.aspx?%2fTEL+Wall+Thing%2fWallDash&rs:Command=Render";

And you’re all set!

helpdesk

%d bloggers like this: