index.html 14.3 KB
Newer Older
1 2 3
<!DOCTYPE html>
<html>
<head>
4 5 6 7 8
    <title></title>
    <link href="static/css/bootstrap.min.css" rel="stylesheet"/>
    <style type="text/css" media="screen">
        [class*="span"] h3 { text-align: center; }
        .dashboard{ text-align: center; }
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
        .catalog-item{
            display: inline-block;
            padding: 20px 30px 20px 30px;
        }
        .catalog-item img{
            max-width: 150px;
        }
        .buy-btn{
            display: inline-block;
            padding: 2px 0px 2px 0px;
            text-align: center;
            width: 100%;
            opacity: 0.6;
            background-color: rgba(0, 175, 219, 1);
            color: white;
            -webkit-transition:opacity .2s ease-in-out;
            -moz-transition:opacity .2s ease-in-out;
            -ms-transition:opacity .2s ease-in-out;
            -o-transition:opacity .2s ease-in-out;
            transition:opacity .2s ease-in-out;
            box-shadow:0px 0px 7px 1px rgba(0,0,0,0.2);
            border-radius:2px;
        }
        .buy-btn:hover{
            text-decoration: none;
            color: white;
            opacity: 1;
        }
37
    </style>
38

39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
    <script id="dashboard" type="text/html">
        <div class="row-fluid">
            <div class="span12">
                <div id="carousel" class="carousel slide">
                    <div class="carousel-inner">
                        <div class="item active" style="min-height: 200px; background-color: red">
                            image 1
                            <div class="carousel-caption">
                                <h4>Order online applications that are hosted in Vifib's distributed cloud.</h4>
                            </div>
                        </div>
                        <div class="item" style="min-height: 200px; background-color: green">
                            image 2
                            <div class="carousel-caption">
                                <h4>Bring your own servers to the clouds and extend Vifib's distributed cloud with your own machines.</h4>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span6 dashboard">
                <h3>Get a Virtual Machine from Vifib for 1/month</h3>
                <a class="btn btn-info" href="#/">Order a KVM now</a>
            </div>
            <div class="span6 dashboard">
                <h3>Explore the world of Vifib provided software</h3>
                <a class="btn btn-info" href="#/">Browse the Catalog</a>
            </div>
        </div>
    </script>
71

72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
    <script id="catalog.preview" type="text/html">
        <h2>Brand new softwares</h2>
        <ul id="catalog-new"></ul>
        <h2>Most downloads</h2>
        <ul id="catalog-most"></ul>
        <h2>Categories</h2>
        <ul id="catalog-categories"></ul>
    </script>

    <script id="catalog.all" type="text/html">
        <h2>All available softwares</h2>
        <ul id="catalog-all"></ul>
    </script>

    <script id="catalog.item" type="text/html">
        <li class="catalog-item">
            <div>
                <img src="http://www.afpy.org/Members/nexedi/Dev%20ERP5/logo_medium">
                <h4>Name</h4>
                <h6>Categories</h6>
                <a href="#/buy" class="buy-btn">1 Buy</a>
            </div>
        </li>
    </script>

    <script id="catalog.categorie" type="text/html">
        <li class="catalog-item">
            <a href="#"><h4>Categorie</h4></a>
        </li>
    </script>
 
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
    <script id="server.list" type="text/html">
        <article>
            <table class="table table-condensed">
            <caption><h2>Computers list</h2></caption>
            <tr><th>Name</th><th>Reference</th><th>State</th></tr>
            <tr><td>Couscous</td><td>Comp-1</td><td><span class="label label-success">Started</span></td></tr>
            <tr><td>Merguez</td><td>Comp-3</td><td><span class="label label-success">Started</span></td></tr>
            <tr><td>Plop</td><td>Comp-5</td><td><span class="label label-important">Stopped</span></td></tr>
            </table>
        </article>
    </script>
    
    <script id="instance.list" type="text/html">
            <table class="table table-condensed" id="instance-table">
            <caption><h2>Instances list</h2></caption>
            </table>
    </script>
120

121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
    <script id="instance.list.elem" type="text/html">
        <td><a href="{{ url }}">{{ title }}</a></td><td>{{ status }}</td>
    </script>
    
    <script id="invoice.list" type="text/html">
        <article>
            <table class="table table-condensed">
            <caption><h2>Invoices</h2></caption>
            <tr><th>Number</th><th>Total price</th><th>Currency</th><th>Payment</th></tr>
            <tr><td>43</td><td>1.0</td><td>Euro</td><td><span class="label label-warning">Waiting</span></td></th>
            <tr><td>44</td><td>0.0</td><td>Euro</td><td><span class="label label-success">Payed</span></td></th>
            <tr><td>45</td><td>1.0</td><td>Euro</td><td><span class="label label-success">Payed</span></td></th>
            <tr><td>01</td><td></td><td>Euro</td><td><span class="label label-important">Ongoing</span></td></th>
            </table>
        </article>
    </script>
137

138 139 140 141 142 143 144 145 146
    <script id="form.bang.instance" type="text/html">
        <form class="form-horizontal" id="form-bang">
            <label>Why do you want to bang this instance ?</label>
            <input class="input-large" name="log" type="text">
            <button class="btn btn-primary" type="submit" name="submit">Bang</button>
            <button class="btn">Cancel</button>
        </form>
    </script>

147 148 149 150 151 152 153 154 155 156 157 158
    <script id="form.new.instance" type="text/html">
    <article>
        <form class="form-horizontal">
            <fieldset>
                <legend>Request a new instance</legend>
                <div class="control-group">
                    <label class="control-label">Name</label>
                    <div class="controls">
                        <input type="text" class="input-large" required name="title"/>
                    </div>
                </div>
                <div class="control-group">
159
                    <label class="control-label">Software release</label>
160 161 162 163 164 165 166 167 168 169 170
                    <div class="controls">
                        <input type="text" class="input-xlarge" required name="software_release"/>
                    </div>
                </div>
                <div class="form-actions">
                    <button type="submit" class="btn btn-primary" name="submit">Request</button>
                </div>
            </fieldset>
        </form>
    </article>
    </script>
171

172 173 174 175 176 177
    <script id="auth" type="text/html">
    <article>
        <p>Authentification needed. Are you agree to be redirect to login ?</p>
        <a href="{{ host }}?response_type=token&client_id={{ client_id  }}&redirect_uri={{ redirect }}">Redirect</a>
    </article>
    </script>
178

179 180
    <script id="instance" type="text/html">
        {{! Service page template }}
181 182 183 184 185 186 187
        <div class="subnav">
            <ul class="nav nav-pills">
                {{# actions }}
                <li><a href="{{ url }}">{{ name }}</a></li>
                {{/ actions}}
            </ul>
        </div>
188
        <form class="form-horizontal" id="instance-form">
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
        <fieldset>
            <legend>
                {{ title }}
            </legend>
            <div class="control-group">
                <label class="control-label">Reference</label>
                <div class="controls">
                    <input name="title" type="text" value="{{ title }}" readOnly></input>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">Software release</label>
                <div class="controls">
                    <input type="text" name="software_release" value="{{ software_release }}" readOnly></input>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">Software type</label>
                <div class="controls">
                    <input type="text" name="software_type" value="{{ software_type }}"></input>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">Status</label>
                <div class="controls" id="instanceStatus">
                    {{{ status }}}
                </div>
            </div>
        </fieldset>
218

219 220 221 222 223 224
        <table class="table">
            <caption>Connection parameters</caption>
            {{# parameter}}
            <tr><td>{{parameter.0}}</td><td></td></tr>
            {{/ parameter}}
        </table>
225

226 227
            <fieldset>
                <legend>
228 229 230 231 232
                    Parameter XML
                    <div class="pull-right">
                        <button type="submit" class="btn btn-primary">Save changes</button>
                        <button class="btn">Cancel</button>
                    </div>
233
                </legend>
234
                        <textarea name="xml" style="width: 98%; height: 110px;">
235 236
<?xml version="1.0" encoding="utf-8"?>
<instance>
237 238
    <parameter id="nbd_ip">2a01:e35:2e27:460:e2cb:4eff:fed9:48dc</parameter>
    <parameter id="nbd_port">1024</parameter>
239
</instance>
240
                        </textarea>
241
            </fieldset>
242 243
        </form>
    </script>
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264

    <script id="instance.stop_requested" type="text/html">
        <div class="btn-group">
            <button class="btn btn-danger disabled" disabled="disabled" id="stopInstance">Stopped</button>
            <button class="btn" id="startInstance">Start</button>
        </div>
    </script>
    
    <script id="instance.draft" type="text/html">
        <div class="btn-group">
            <button class="btn disabled" disabled="disabled">Stop</button>
            <button class="btn disabled" disabled="disabled">Start</button>
        </div>
    </script>

    <script id="instance.start_requested" type="text/html">
        <div class="btn-group">
            <button class="btn" id="stopInstance">Stop</button>
            <button class="btn btn-success disabled" disabled="disabled" id="startInstance">Started</button>
        </div>
    </script>
265 266 267 268 269 270 271 272 273 274 275
    
    <script id="simple-form" type="text/html">
        <form class="form-inline">
            <fieldset>
                <div class="input-append">
                    <input required class="span2" size="16" type="text"/>
                    <button class="btn" type="submit">Go !</button>
                </div>
            </fieldset>
        </form>
    </script>
276

277 278 279 280
    <script id="error" type="text/html">
        <div class="alert alert-{{ state }}">
            <a class="close" data-dismiss="alert" href="#">×</a>
            <h4 class="alert-heading">{{ state }} - {{ date }}</h4>
281
            {{ message }}
282 283
        </div>
    </script>
284

285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
    <script id="root" type="text/html">
        <div id="loading" style="position: absolute; right: 20px; top: 20px;"></div>
        <div class="navbar">
            <div class="navbar-inner">
                <div class="container-fluid">
                    <div class="row-fluid">
                        <div class="span2">
                            <!--<a href="#" class="brand">Vifib</a>-->
                            <img src="static/img/vifib_logo.gray.png" style="max-height: 40px" />
                        </div>
                        <div class="span10">
                            <ul class="nav">
                                <li><a href="#/dashboard">Dashboard</a></li>
                                <li><a href="#/about">About</a></li>
                                <li><a href="#/contact">Contact</a></li>
                            </ul>
                        </div>
302 303 304 305
                    </div>
                </div>
            </div>
        </div>
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span3">
                    <div class="well" style="padding:0">
                        <ul class="nav nav-list">
                            <li class="nav-header">Softwares</li>
                            <li><a href="#/catalog"><i class="icon-"></i>Browse catalog</a></li>
                            <li><a href="#/catalog/all"><i class="icon-"></i>Softwares availables</a></li>
                            <li class="nav-header">Servers</li>
                            <li><a href="#/computers"><i class="icon-list"></i>List all servers</a></li>
                            <li><a href="#/computer"><i class="icon-plus-sign"></i>Add new server</a></li>
                            <li class="nav-header">Services</li>
                            <li><a href="#/instances"><i class="icon-list"></i>List all instances</a></li>
                            <li><a href="#/instance"><i class="icon-plus-sign"></i>Add new instance</a></li>
                            <li class="nav-header">Account</li>
                            <li><a href="#/invoices"><i class="icon-inbox"></i>Invoices</a></li>
                            <li><a href="#/settings"><i class="icon-cog"></i>Settings</a></li>
                        </ul>
                    </div>
325
                </div>
326 327 328
                <section class="span9" id="main" style="min-height: 200px">
                    <!--Body content-->
                </section>
329 330
            </div>
        </div>
331 332 333
    </script>
</head>
<body>
334 335 336 337 338 339 340 341 342 343 344 345 346
    <script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
    <script type="text/javascript" src="static/js/bootstrap-transition.js"></script>
    <script type="text/javascript" src="static/js/bootstrap-alert.js"></script>
    <script type="text/javascript" src="static/js/bootstrap-carousel.js"></script>
    <script type="text/javascript" src="static/js/spin.js"></script>
    <script type="text/javascript" src="static/js/jquery-spin.js"></script>
    <script type="text/javascript" src="static/js/ICanHaz.min.js"></script>
    <script type="text/javascript" src="static/js/modernizr-2.5.3.js"></script>
    <script type="text/javascript" src="static/js/sinon-1.3.2.js"></script>
    <script type="text/javascript" src="static/js/jquery.slapos.js"></script>
    <script type="text/javascript" src="static/js/jquery.urljs.js"></script>
    <!--<script type="text/javascript" src="static/js/fake.js"></script>-->
    <script type="text/javascript" src="static/js/core.js"></script>
347 348
</body>
</html>