Browse Source

HDFS-14832. RBF: Add Icon for ReadOnly False. Contributed by hemanthboyina

Takanobu Asanuma 5 years ago
parent
commit
bdaaa3bbf2

+ 8 - 2
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/federationhealth.html

@@ -384,6 +384,12 @@
 <!-- Mount table -->
 <script type="text/x-dust-template" id="tmpl-mounttable">
 <div class="page-header"><h1>Mount Table</h1></div>
+<div>
+  <ul class="federationhealth-mounttable-legend">
+    <li class="federationhealth-mounttable-icon federationhealth-mounttable-readonly">Read Only</li>
+    <li class="federationhealth-mounttable-icon federationhealth-mounttable-readwrite">Read Write</li>
+  </ul>
+</div>
 <small>
 <table class="table">
   <thead>
@@ -392,7 +398,7 @@
       <th>Target nameservice</th>
       <th>Target path</th>
       <th>Order</th>
-      <th>Read only</th>
+      <th>Mount option</th>
       <th>Fault tolerant</th>
       <th>Owner</th>
       <th>Group</th>
@@ -409,7 +415,7 @@
       <td>{nameserviceId}</td>
       <td>{path}</td>
       <td>{order}</td>
-      <td align="center" class="mount-table-icon mount-table-read-only-{readonly}" title="{status}"/>
+      <td align="center" class="federationhealth-mounttable-icon federationhealth-mounttable-{readonly}" title="{status}"/>
       <td align="center" class="mount-table-icon mount-table-fault-tolerant-{faulttolerant}" title="{ftStatus}"></td>
       <td>{ownerName}</td>
       <td>{groupName}</td>

+ 4 - 3
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/router/federationhealth.js

@@ -315,10 +315,11 @@
       function augment_read_only(mountTable) {
         for (var i = 0, e = mountTable.length; i < e; ++i) {
           if (mountTable[i].readonly == true) {
-            mountTable[i].readonly = "true"
-            mountTable[i].status = "Read only"
+            mountTable[i].readonly = "readonly"
+            mountTable[i].status = "Read Only"
           } else {
-            mountTable[i].readonly = "false"
+            mountTable[i].readonly = "readwrite"
+            mountTable[i].status = "Read Write"
           }
         }
       }

+ 23 - 3
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/webapps/static/rbf.css

@@ -120,7 +120,7 @@
     padding-right: 5pt;
 }
 
-.mount-table-icon:before {
+.federationhealth-mounttable-icon:before {
     font-size: 10pt;
     padding-right: 1pt;
     font-family: 'Glyphicons Halflings';
@@ -131,11 +131,31 @@
     -moz-osx-font-smoothing: grayscale;
 }
 
-.mount-table-read-only-true:before {
-    color: #5fa341;
+.federationhealth-mounttable-readonly:before {
+    color: #000000;
     content: "\e033";
 }
 
+.federationhealth-mounttable-readwrite:before {
+    color: #000000;
+    content: "\e065";
+}
+
+.federationhealth-mounttable-legend {
+    list-style-type: none;
+    text-align: right;
+}
+
+.federationhealth-mounttable-legend li {
+    display: inline;
+    padding: 10pt;
+    padding-left: 10pt;
+}
+
+.federationhealth-mounttable-legend li:before {
+    padding-right: 5pt;
+}
+
 .mount-table-fault-tolerant-true:before {
     color: #5fa341;
     content: "\e033";