JSFiddle - React, Tailwind, and code Playground

by victorhooi

HTML

<h1>localhost Hadoop Map/Reduce Administration</h1>

<div id="quicklinks">
  <a href="#quicklinks" onclick="toggle('quicklinks-list'); return false;">Quick Links</a>
  <ul id="quicklinks-list">
    <li><a href="#scheduling_info">Scheduling Info</a></li>
    <li><a href="#running_jobs">Running Jobs</a></li>
    <li><a href="#retired_jobs">Retired Jobs</a></li>
    <li><a href="#local_logs">Local Logs</a></li>
  </ul>
</div>

<b>State:</b> RUNNING<br>
<b>Started:</b> Wed Sep 18 03:47:37 UTC 2013<br>
<b>Version:</b> 1.2.1,
                r1503152<br>
<b>Compiled:</b> Mon Jul 22 15:23:09 PDT 2013 by 
                 mattf<br>
<b>Identifier:</b> 201309180347<br>                 
<b>SafeMode:</b> OFF<br>                    
<hr>
<h2>Cluster Summary (Heap Size is 62.37 MB/966.69 MB)</h2>
<table border="1" cellpadding="5" cellspacing="0">
<tr><th>Running Map Tasks</th><th>Running Reduce Tasks</th><th>Total Submissions</th><th>Nodes</th><th>Occupied Map Slots</th><th>Occupied Reduce Slots</th><th>Reserved Map Slots</th><th>Reserved Reduce Slots</th><th>Map Task Capacity</th><th>Reduce Task Capacity</th><th>Avg. Tasks/Node</th><th>Blacklisted Nodes</th><th>Graylisted Nodes</th><th>Excluded Nodes</th></tr>
<tr><td>1</td><td>0</td><td>429</td><td><a href="machines.jsp?type=active">1</a></td><td>1</td><td>0</td><td>0</td><td>0</td><td>2</td><td>2</td><td>4.00</td><td><a href="machines.jsp?type=blacklisted">0</a></td><td><a href="machines.jsp?type=graylisted">0</a></td><td><a href="machines.jsp?type=excluded">0</a></td></tr></table>
<br>
<hr>
<h2 id="scheduling_info">Scheduling Information</h2>
<table border="2" cellpadding="5" cellspacing="2" class="sortable">
<thead style="font-weight: bold">
<tr>
<td> Queue Name </td>
<td> State </td>
<td> Scheduling Information</td>
</tr>
</thead>
<tbody>

<tr>
<td><a href="jobqueue_details.jsp?queueName=default">default</a></td>
<td>running</td>
<td>N/A
</td>
</tr>

</tbody>
</table>
<hr/>
<b>Filter (Jobid, Priority, User, Name)</b>...

CSS

/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

body {
  background-color : #ffffff;
  font-family : sans-serif;
}

.small {
  font-size : smaller;
}

div#dfsnodetable tr#row1, div#dfstable td#col1 {
	font-weight : bolder;
}

div#dfstable td#col1 {
	vertical-align : top;
}

div#dfstable td#col3 {
	text-align : right;
}

div#dfsnodetable caption {
	text-align : left;
}

div#dfsnodetable a#title {
	font-size : larger;
	font-weight : bolder;
}

div#dfsnodetable td, th {
	border-bottom-style : none;
        padding-bottom : 4px;
        padding-top : 4px;       
}

div#dfsnodetable A:link, A:visited {
	text-decoration : none;       
}

div#dfsnodetable th.header, th.headerASC, th.headerDSC {
        padding-bottom : 8px;
        padding-top : 8px;       
}
div#dfsnodetable th.header:hover, th.headerASC:hover, th.headerDSC:hover,
                 td.name:hover {
        text-decoration : underline;
	cursor : pointer;
}

div#dfsnodetable td.blocks, td.size, td.pcused, td.adminstate, td.lastcontact {
	text-align : right;
}

div#dfsnodetable .rowNormal .header {
	background-color : #ffffff;
}
div#dfsnodetable .rowAlt, .headerASC, .headerDSC {
	background-color : lightyellow;
}

.warning {
        font-weight : bolder;
        color :...

JavaScript

/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements.  See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

function checkButtonVerbage()
{
  var inputs = document.getElementsByName("jobCheckBox");
  var check = getCheckStatus(inputs);

  setCheckButtonVerbage(! check);
}

function selectAll()
{
  var inputs = document.getElementsByName("jobCheckBox");
  var check = getCheckStatus(inputs);

  for (var i in inputs) {
    if ('jobCheckBox' == inputs[i].name) {
      if ( inputs[i].parentNode.parentNode.style.display != 'none') {
        inputs[i].checked = ! check;
      }
    }
  }

  setCheckButtonVerbage(check);
}

function getCheckStatus(inputs)
{
  var check = true;

  for (var i in inputs) {
    if ('jobCheckBox' == inputs[i].name) {
      if ( inputs[i].parentNode.parentNode.style.display != 'none') {
        check = (inputs[i].checked && check);
      }
    }
  }

  return check;
}


function setCheckButtonVerbage(check)
{
  var op = document.getElementById("checkEm");
  op.value = check ? "Select All" : "Deselect All";
}

function applyfilter()
{
  var cols = ["job","priority","user","name"];
  var nodes = [];
  var filters = [];

  for (var i = 0; i < cols.length; ++i) {
    nodes[i] = document.getElementById(cols[i] + "_0" );
  }

  var filter = document.getElementById("filter");
 ...