Add dashboard
This commit is contained in:
51
dashboards/home.erb
Normal file
51
dashboards/home.erb
Normal file
@@ -0,0 +1,51 @@
|
||||
<script type='text/javascript'>
|
||||
$(function() {
|
||||
// These settings override the defaults set in application.coffee. You can do this on a per dashboard basis.
|
||||
Dashing.gridsterLayout('[{"col":3,"row":1,"size_x":1,"size_y":1},{"col":1,"row":1,"size_x":2,"size_y":2},{"col":1,"row":3,"size_x":1,"size_y":1},{"col":4,"row":2,"size_x":2,"size_y":1},{"col":4,"row":3,"size_x":2,"size_y":1},{"col":2,"row":3,"size_x":1,"size_y":1},{"col":4,"row":1,"size_x":2,"size_y":1},{"col":3,"row":2,"size_x":1,"size_y":2}]')
|
||||
Dashing.widget_base_dimensions = [370, 340]
|
||||
Dashing.numColumns = 5
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<% content_for :title do %>mg36-dashboard<% end %>
|
||||
|
||||
<div class="gridster">
|
||||
<ul>
|
||||
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
|
||||
<div data-view="Clock"></div>
|
||||
<i class="far fa-clock icon-background"></i>
|
||||
</li>
|
||||
|
||||
<li data-row="1" data-col="1" data-sizex="2" data-sizey="2">
|
||||
<div data-id="aww" data-view="RandomAww"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
|
||||
<div data-id="server_status" data-view="ServerStatus" data-title="Server Status"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="3" data-col="4" data-sizex="2" data-sizey="1">
|
||||
<div data-id="NationalRail_1" data-view="NationalRail" data-unordered="true" data-title="Trains (1)" style="background-color: #0f516b"></div>
|
||||
<i class="fa fa-train icon-background"></i>
|
||||
</li>
|
||||
|
||||
<li data-row="3" data-col="4" data-sizex="2" data-sizey="1">
|
||||
<div data-id="NationalRail_2" data-view="NationalRail" data-unordered="true" data-title="Trains (2)" style="background-color: #0f516b"></div>
|
||||
<i class="fa fa-train icon-background"></i>
|
||||
</li>
|
||||
|
||||
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
|
||||
<div data-id="quote" data-view="Quote"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="1" data-col="1" data-sizex="2" data-sizey="1">
|
||||
<div data-view="DailyXKCD" data-id="xkcd-of-the-day"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="1" data-col="1" data-sizex="1" data-sizey="2">
|
||||
<div data-id="a_timeline" data-view="Timeline" data-title=""></div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
36
dashboards/layout.erb
Normal file
36
dashboards/layout.erb
Normal file
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
|
||||
<title><%= yield_content(:title) %></title>
|
||||
|
||||
<!-- The javascript and css are managed by sprockets. The files can be found in the /assets folder-->
|
||||
<script type="text/javascript" src="/assets/application.js"></script>
|
||||
<link rel="stylesheet" href="/assets/application.css">
|
||||
|
||||
<link href='//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700' rel='stylesheet' type='text/css'>
|
||||
<link rel="icon" href="/logo.png">
|
||||
|
||||
<script type="text/javascript" src="/assets/moment.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/d3-3.2.8.js"></script>
|
||||
<script type="text/javascript" src="/assets/timeknots.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<%= yield %>
|
||||
<div data-id="fullscreen" data-view="Fullscreen"></div>
|
||||
</div>
|
||||
|
||||
<% if development? %>
|
||||
<div id="saving-instructions">
|
||||
<p>Paste the following at the top of <i><%= params[:dashboard] %>.erb</i></p>
|
||||
<textarea id="gridster-code"></textarea>
|
||||
</div>
|
||||
<a href="#saving-instructions" id="save-gridster">Save this layout</a>
|
||||
<% end %>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user