-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating templates for the new DisplayService release.
- Loading branch information
Wojtek Oledzki
committed
Jan 16, 2012
1 parent
c6c60e4
commit 62f9e7c
Showing
31 changed files
with
3,359 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
## Hoborg Dashboard - what is it? | ||
|
||
It's FREE and open dashboard system writen by and for developers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
### This is how to add dashboard to your website | ||
|
||
This blog describes how I added dashboard to hoborglabs.com website. | ||
|
||
First I need a folder for 3rd party vendors - easy!! | ||
~~~~ | ||
cd hoborglabs.com | ||
mkdir -p vendors/dashboard | ||
cd vendors/dashboard | ||
~~~~ | ||
|
||
Now I can download dashboard | ||
~~~~ | ||
wget http://dashboard.hoborglabs.com/downloads/dashboard.phar | ||
wget http://dashboard.hoborglabs.com/downloads/dashboard-assets.tgz | ||
~~~~ | ||
|
||
Now ... dashboard.phar does not serves assets. But the default assets set comes | ||
in nice tgz. I will unzip it in vendors folder and symlink it from my public | ||
folder. | ||
~~~~ | ||
mkdir assets | ||
tar -xzf dashboard-assets.tgz -C assets/ | ||
cd ../../htdocs/ | ||
ln -s ../vendors/dashboard/assets/ dashboard-assets | ||
~~~~ | ||
|
||
Now let's make our dashboard page. (We are still in htdocs/ folder) | ||
~~~~ | ||
mkdir dashboard | ||
vim dashboard/index.php | ||
~~~~ | ||
|
||
And this is what you put inside | ||
~~~~ | ||
<?php | ||
define('HD_PUBLIC', '/dashboard-assets'); | ||
define('CONFIG_DIR', __DIR__ . '/../../conf/'); | ||
include_once __DIR__ . '/../../vendors/dashboard/dashboard.phar'; | ||
$kernel = new \Hoborg\Dashboard\Kernel('prod'); | ||
$kernel->setPath('data', array(__DIR__ . '/../../data')); | ||
$kernel->setDefaultParam('conf', 'hoborglabs-dashboard'); | ||
// and go, go, go... | ||
$kernel->handle($_GET); | ||
~~~~ | ||
|
||
|
||
Now Configuration | ||
|
||
|
||
And Crontab ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
## Dashboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## All About Widgets | ||
|
||
It's all about widgets here! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
### Widget - What is it? | ||
|
||
Widget is simply JSON object which represents it's data. It is then | ||
rendered using {mustache} template. Widget can provide it's own | ||
template or a default one will be used. | ||
|
||
By default Dashboard comes with WidgetProvider which allows you | ||
dynamically extend widget's JSON using PHP files or any external CGI | ||
scripts or simply static files. | ||
|
||
#### Reserverd Fields | ||
|
||
There are few reserved json fields - we try to keep it at minimum. | ||
|
||
##### template | ||
|
||
This field needs to contain valid mustache template. If it's present | ||
it will be used instead of default template. | ||
|
||
##### tick | ||
|
||
This field define how often (in seconds) this widget should be | ||
refreshed. | ||
|
||
|
||
|
||
### Life Cycle | ||
|
||
It all starts with config file with a list of widgets. Each widget is | ||
loaded and bootstraped (back-end), and added to WidgetManager | ||
(frontend). | ||
|
||
WidgetManager starts, renders widgets and from now on it decides when | ||
to refresh each widget. | ||
|
||
Each widget is as simple JSON object. Hoborg Widgets comes with some | ||
default fields, but it's totally up to you how will it look. No | ||
constrains! We recommend to always have at least name and body. | ||
|
||
~~~ | ||
{ | ||
"name" : "This is My widget" | ||
"body" : "<span class=\"warn\">I am a widget.</span>", | ||
} | ||
~~~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<page name="page"> | ||
<component name="google-analytics"> | ||
<data> | ||
<enabled>0</enabled> | ||
<account>UA-26727070-1</account> | ||
</data> | ||
</component> | ||
<component name="header"> | ||
<data> | ||
<navigation> | ||
<page href="/">Home</page> | ||
<page href="/doc" class="active">Documentation</page> | ||
<page href="/demo">Demo</page> | ||
</navigation> | ||
</data> | ||
</component> | ||
|
||
<component name="body"> | ||
<data> | ||
<type></type> | ||
</data> | ||
<component name="paragraph"> | ||
<data> | ||
<size>side</size> | ||
<markdown file="/var/www/dashboard.local/includes/doc/dev/intro.intro.md" /> | ||
</data> | ||
</component> | ||
<component name="paragraph"> | ||
<data> | ||
<size>content</size> | ||
<markdown file="/var/www/dashboard.local/includes/doc/dev/intro.md" /> | ||
</data> | ||
</component> | ||
</component> | ||
|
||
<component name="body"> | ||
<data> | ||
<type>highlight</type> | ||
</data> | ||
<component name="paragraph"> | ||
<data> | ||
<size>side</size> | ||
<markdown file="/var/www/dashboard.local/includes/doc/dev/widget.intro.md" /> | ||
</data> | ||
</component> | ||
<component name="paragraph"> | ||
<data> | ||
<size>content</size> | ||
<markdown file="/var/www/dashboard.local/includes/doc/dev/widget.md" /> | ||
</data> | ||
</component> | ||
</component> | ||
</page> |
Oops, something went wrong.