BVB Source Codes

mongo-express Show index.html Source code

Return Download mongo-express: download index.html Source code - Download mongo-express Source code - Type:.html
  1. {% extends 'layout.html' %}
  2.  
  3. {% block title %}Home{% endblock %}
  4.  
  5. {% block breadcrumb %}
  6.   <li class="dropdown">
  7.     <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Database<span class="caret"></span></a>
  8.     <ul class="dropdown-menu">
  9.       {% for db in databases %}
  10.       <li><a href="{{ baseHref }}db/{{ db }}/">{{ db }}</a></li>
  11.       {% endfor %}
  12.     </ul>
  13.   </li>
  14. {% endblock %}
  15.  
  16.  
  17. {% block content %}
  18. <div class="panel panel-default">
  19.   <div class="panel-heading">
  20.     <div style="display: inline-block;">
  21.       <h4 style="font-weight: bold;">Databases</h4>
  22.     </div>
  23.     {% if !settings.read_only %}
  24.     <form class="form-inline" method="POST" style="float:right;">
  25.       <div class="input-group">
  26.         <input class="form-control" type="text" id="database" name="database" placeholder="Database Name" title="Database Name">
  27.         <span class="input-group-btn">
  28.       <button type="submit" class="btn btn-primary pull-right">
  29.         <span class="glyphicon glyphicon-plus"></span>
  30.         Create Database
  31.       </button>
  32.         </span>
  33.       </div>
  34.     </form>
  35.     {% endif %}
  36.     </div>
  37.   <div class="panel-body no-padding">
  38. <table class="table table-bordered table-striped table-condensed no-margin">
  39.   {% for db in databases %}
  40.   <tr>
  41.     <td class="col-md-2">
  42.       <a href="{{ baseHref }}db/{{ db }}/" class="btn btn-success btn-block" >
  43.         <span class="glyphicon glyphicon-eye-open"></span><br>View
  44.       </a>
  45.     </td>
  46.     <td><h3><a href="{{ baseHref }}db/{{ db }}/">{{ db }}</a></h3></td>
  47.     {% if !settings.read_only %}
  48.     <td class="col-md-2">
  49.       <form method="POST" id="db-{{ db }}" action="{{ baseHref }}{{ db }}" style="margin: 0px;">
  50.         <input type="hidden" name="_method" value="delete">
  51.         <button type="submit" class="hidden"></button>
  52.       </form>
  53.       <button class="btn btn-danger btn-block deleteButton" database-name="{{ db }}" childof="db-{{ db }}">
  54.         <span class="glyphicon glyphicon-trash"></span><br>Del
  55.       </button>
  56.     </td>
  57.     {% endif %}
  58.   </tr>
  59.   {% endfor %}
  60. </table>
  61. </div>
  62.   </div>
  63. {% if !settings.read_only %}
  64. <div id="confirm-deletion" class="modal fade" role="dialog" aria-labelledby="confirmDeletionLabel">
  65.   <div class="modal-dialog" role="document">
  66.     <div class="modal-content">
  67.  
  68.       <div class="modal-header">
  69.         <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
  70.         <h4 class="modal-title" id="myModalLabel">Delete database</h4>
  71.       </div>
  72.  
  73.       <div class="modal-body">
  74.         <p>
  75.           Be careful! You are about to delete whole <strong><span id="modal-database-name"></span></strong> database.
  76.         </p>
  77.         <p>
  78.           <label for="confirmation-input">Type the database name to proceed.</label>
  79.           <input type="text" id="confirmation-input" name="confirmation-input" shouldbe="" value="" />
  80.         </p>
  81.       </div>
  82.  
  83.       <div class="modal-footer">
  84.         <button type="button" data-dismiss="modal" class="btn" id="delete">Delete</button>
  85.         <button type="button" data-dismiss="modal" class="btn btn-primary">Cancel</button>
  86.       </div>
  87.     </div>
  88.   </div>
  89. </div>
  90.  
  91. <!--h2>Create Database</h2>
  92. <form class="well form-inline" method="POST">
  93.    <div class="form-group">
  94.      <input class="input-medium" type="text" id="database" name="database" placeholder="Database Name" title="Database Name">
  95.    </div>
  96.    <button type="submit" class="btn btn-primary pull-right">
  97.      <span class="glyphicon glyphicon-plus"></span>
  98.      Create Database
  99.    </button>
  100. </form-->
  101. {% endif %}
  102.  
  103. {% if info == false %}
  104.  
  105. <h2>Server Status</h2>
  106. <p>
  107.   Turn on admin in config.js to view server stats!
  108. </p>
  109.  
  110. {% else %}
  111. <div class="panel panel-default stats">
  112.   <div class="panel-heading">
  113.     <h4 style="font-weight: bold;">Server Status</h4>
  114.   </div>
  115. <table class="table table-bordered table-striped">
  116.   <tr>
  117.     <td class="span2"><strong>Hostname</strong></td>
  118.     <td class="span3" id="dbHost">{{ info.host }}</td>
  119.     <td class="span2"><strong>MongoDB Version</strong></td>
  120.     <td class="span3" id="dbVersion">{{ info.version }}</td>
  121.   </tr>
  122.   <tr>
  123.     <td><strong>Uptime</strong></td>
  124.     <td>{{ info.uptime }} seconds {% if info.uptime > 86400 %} ({{ Math.floor( info.uptime/86400 ) }} days) {% endif %}</td>
  125.     <td><strong>Server Time</strong></td>
  126.     <td>{{ info.localTime|date('r') }}</td>
  127.   </tr>
  128.   <tr><td colspan="4">&nbsp;</td></tr>
  129.   <tr>
  130.     <td><strong>Current Connections</strong></td>
  131.     <td>{{ info.connections.current }}</td>
  132.     <td><strong>Available Connections</strong></td>
  133.     <td>{{ info.connections.available }}</td>
  134.   </tr>
  135.   <tr>
  136.     <td><strong>Active Clients</strong></td>
  137.     <td>{{ info.globalLock.activeClients.total }}</td>
  138.     <td><strong>Queued Operations</strong></td>
  139.     <td>{{ info.globalLock.currentQueue.total }}</td>
  140.   </tr>
  141.   <tr>
  142.     <td><strong>Clients Reading</strong></td>
  143.     <td>{{ info.globalLock.activeClients.readers }}</td>
  144.     <td><strong>Clients Writing</strong></td>
  145.     <td>{{ info.globalLock.activeClients.writers}}</td>
  146.   </tr>
  147.   <tr>
  148.     <td><strong>Read Lock Queue</strong></td>
  149.     <td>{{ info.globalLock.currentQueue.readers }}</td>
  150.     <td><strong>Write Lock Queue</strong></td>
  151.     <td>{{ info.globalLock.currentQueue.writers}}</td>
  152.   </tr>
  153.   <tr><td colspan="4">&nbsp;</td></tr>
  154.   <tr>
  155.     <td><strong>Disk Flushes</strong></td>
  156.     <td>{{ info.backgroundFlushing.flushes }}</td>
  157.     <td><strong>Last Flush</strong></td>
  158.     <td>{{ info.backgroundFlushing ? info.backgroundFlushing.last_finished|date('r') : '' }}</td>
  159.   </tr>
  160.   <tr>
  161.     <td><strong>Time Spent Flushing</strong></td>
  162.     <td>{{ info.backgroundFlushing.total_ms }} ms</td>
  163.     <td><strong>Average Flush Time</strong></td>
  164.     <td>{{ info.backgroundFlushing.average_ms }} ms</td>
  165.   </tr>
  166.   <tr><td colspan="4">&nbsp;</td></tr>
  167.   <tr>
  168.     <td><strong>Total Inserts</strong></td>
  169.     <td>{{ info.opcounters.insert }}</td>
  170.     <td><strong>Total Queries</strong></td>
  171.     <td>{{ info.opcounters.query}}</td>
  172.   </tr>
  173.   <tr>
  174.     <td><strong>Total Updates</strong></td>
  175.     <td>{{ info.opcounters.update}}</td>
  176.     <td><strong>Total Deletes</strong></td>
  177.     <td>{{ info.opcounters.delete}}</td>
  178.   </tr>
  179. </table>
  180. </div>
  181. {% endif %}
  182.  
  183. {#
  184.   # Still need to add global lock time stats and replica set stats
  185. #}
  186.  
  187. {% endblock %}
  188.  
  189.  
  190. {% block scripts %}
  191. {% if !settings.read_only %}
  192. <script src="{{ baseHref }}{{ assets.index.js }}"></script>
  193. {% endif %}
  194. {% endblock %}
  195.  
downloadindex.html Source code - Download mongo-express Source code
Related Source Codes/Software:
XCL-Charts - Android charting libraries (XCL-Charts is a free c... 2017-05-17
scrollMonitor - A simple and fast API to monitor elements as you s... 2017-05-16
XCDYouTubeKit - YouTube video player for iOS, tvOS and macOS 2017-05-16
rails-erd - Generate Entity-Relationship Diagrams for Rails ap... 2017-05-16
np - A better `npm publish` 2017-05-16
kaminari - A Scope & Engine based, clean, powerful, custo... 2017-06-04
python-fire - Python Fire is a library for automatically generat... 2017-06-04
Dapper - Dapper - a simple object mapper for .Net 2017-06-05
pkg - Package your Node.js project into an executable ... 2017-06-05
packer - Packer is a tool for creating identical machine im... 2017-06-05
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top