.venv/
venv/
ENV/
+node_modules/
predefined-parameters: |
BUILD_DIRECTORY=apex-verify-gate-{stream}
OPNFV_CLEAN=yes
+ current-parameters: true
git-revision: false
block: true
same-node: true
--- /dev/null
+#VNF_Catalogue Nodejs + Jade + MySql server
+
+
+## Quickstart
+
+First install the dependencies
+
+ ```npm install```
+
+Then Start the Server
+
+ ```npm start```
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2017 Kumar Rishabh and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Apache License, Version 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *******************************************************************************/
+
+var express = require('express');
+var path = require('path');
+var favicon = require('serve-favicon');
+var logger = require('morgan');
+var cookieParser = require('cookie-parser');
+var bodyParser = require('body-parser');
+
+var routes = require('./routes/index');
+var search_projects = require('./routes/search_projects');
+
+var app = express();
+
+// view engine setup
+app.set('views', path.join(__dirname, 'views'));
+app.set('view engine', 'jade');
+
+// Database
+var db = require('mysql2');
+
+// uncomment after placing your favicon in /public
+//app.use(favicon(__dirname + '/public/favicon.ico'));
+app.use(logger('dev'));
+app.use(bodyParser.json());
+app.use(bodyParser.urlencoded({ extended: false }));
+app.use(cookieParser());
+app.use(express.static(path.join(__dirname, 'public')));
+
+// Make our db accessible to our router
+app.use(function(req,res,next){
+ req.db = db;
+ next();
+});
+
+app.use('/', routes);
+app.use('/search_projects', search_projects);
+
+
+// Some Error handling for now #TODO Remove
+
+/// catch 404 and forwarding to error handler
+app.use(function(req, res, next) {
+ var err = new Error('Not Found');
+ err.status = 404;
+ next(err);
+});
+
+
+// development error handler
+// will print stacktrace
+if (app.get('env') === 'development') {
+ app.use(function(err, req, res, next) {
+ res.status(err.status || 500);
+ res.render('error', {
+ message: err.message,
+ error: err
+ });
+ });
+}
+
+// production error handler
+// no stacktraces leaked to user
+app.use(function(err, req, res, next) {
+ res.status(err.status || 500);
+ res.render('error', {
+ message: err.message,
+ error: {}
+ });
+});
+
+module.exports = app;
--- /dev/null
+#!/usr/bin/env node
+var debug = require('debug')('my-application');
+var app = require('../app');
+
+app.set('port', process.env.PORT || 3000);
+
+var server = app.listen(app.get('port'), function() {
+ debug('Express server listening on port ' + server.address().port);
+});
--- /dev/null
+{
+ "name": "VNF_Catalogue",
+ "version": "0.0.1",
+ "private": true,
+ "scripts": {
+ "start": "node ./bin/www"
+ },
+ "dependencies": {
+ "body-parser": "~1.15.1",
+ "cookie-parser": "~1.4.3",
+ "debug": "~2.2.0",
+ "express": "~4.13.4",
+ "jade": "~1.11.0",
+ "morgan": "~1.7.0",
+ "serve-favicon": "~2.3.0",
+ "mysql2": "*"
+ }
+}
\ No newline at end of file
--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2017 Kumar Rishabh and others.\r
+ *\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Apache License, Version 2.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *******************************************************************************/\r
+\r
+$(document).ready( function() {\r
+ $('#Search').click(function() {\r
+ var tags = $('#Tags').val().toLowerCase().split(/[ ,]+/);\r
+ window.location.href = '/search_projects?tags=' + tags;\r
+ return false;\r
+ });\r
+});\r
}
header .logo
{
- background: url(../images/logo.png) no-repeat;
+ background: url(../../images/logo.png) no-repeat;
background-size: cover;
width: 155px;
height: 34px;
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2017 Kumar Rishabh and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Apache License, Version 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *******************************************************************************/
+
+var express = require('express');
+var router = express.Router();
+
+/* GET VNF_Catalogue Home Page. */
+router.get('/', function(req, res) {
+ res.render('index', { title: 'Express' });
+});
+
+module.exports = router;
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2017 Kumar Rishabh and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Apache License, Version 2.0
+ * which accompanies this distribution, and is available at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *******************************************************************************/
+
+var express = require('express');
+var router = express.Router();
+
+router.get('/', function(req, res) {
+ var tags = req.param('tags');
+ console.log(tags);
+ res.render('search_projects', { title: 'Express' });
+});
+
+module.exports = router;
--- /dev/null
+//
+ Copyright (c) 2017 Kumar Rishabh and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+extends layout
+
+block content
+ h1= message
+ h2= error.status
+ pre #{error.stack}
--- /dev/null
+doctype html
+//
+ Copyright (c) 2017 Kumar Rishabh and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+html(lang='en')
+ head
+ meta(charset='UTF-8')
+ title Document
+ link(rel='stylesheet', href='/stylesheets/3rd_party/bootstrap.css')
+ link(rel='stylesheet', href='/stylesheets/style.css')
+ body
+ script(type='text/javascript' src='http://code.jquery.com/jquery.min.js')
+ script(src='/javascripts/global.js')
+ header
+ ul.navigation
+ li.logo
+ li.links
+ a(href='#') Projects
+ li.links
+ a(href='#') People
+ li.links
+ a(href='#') About
+ ul.navigation-right
+ li.signup
+ a(href='#') Sign up
+ li.option or
+ li.signin
+ a(href='#') Sign in
+ .search-box
+ h1 VNF Catalogue
+ form.search-form
+ input.search-input(type='text', placeholder='Search...', id='Tags')
+ .space-10
+ button.search-button(type='submit', value='Search', id='Search') Search
+ .content
+ ul.most-menu
+ li.items.active
+ a(href='#') Most Popular
+ li.items
+ a(href='#') Most Active
+ li.items
+ a(href='#') Most Active Contributions
+ .container
+ .row
+ .box-container
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ footer
+ | © 2017 OPNFV
+script.
--- /dev/null
+doctype html
+//
+ Copyright (c) 2017 Kumar Rishabh and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+html
+ head
+ title= title
+ link(rel='stylesheet', href='/stylesheets/style.css')
+ body
+ block content
+ script(src='http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js')
+ script(src='/javascripts/global.js')
--- /dev/null
+doctype html
+//
+ Copyright (c) 2017 Kumar Rishabh and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Apache License, Version 2.0
+ which accompanies this distribution, and is available at
+ http://www.apache.org/licenses/LICENSE-2.0
+html(lang='en')
+ head
+ meta(charset='UTF-8')
+ title Document
+ link(rel='stylesheet', href='/stylesheets/3rd_party/bootstrap.css')
+ link(rel='stylesheet', href='/stylesheets/style.css')
+ body
+ header
+ ul.navigation
+ li.logo
+ li.links
+ a(href='#') Projects
+ li.links
+ a(href='#') People
+ li.links
+ a(href='#') About
+ ul.navigation-right
+ li.signup
+ a(href='#') Sign up
+ li.option or
+ li.signin
+ a(href='#') Sign in
+ .search-box
+ h1 VNF Catalogue
+ form.search-form
+ input.search-input(type='text', placeholder='Search...')
+ .space-10
+ button.search-button(type='submit', value='Search') Search
+ .content
+ ul.most-menu
+ li.items.active
+ a(href='#') Most Popular
+ li.items
+ a(href='#') Most Active
+ li.items
+ a(href='#') Most Active Contributions
+ .container
+ .row
+ .box-container
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ .col-md-3
+ .content-box
+ .content-data
+ h1.content-title AAA
+ .box
+ img.commit-icon(src='/images/3rd_party/commits.png')
+ h3.commits
+ | 4,845
+ br
+ | commits
+ footer
+ | © 2017 OPNFV
+++ /dev/null
-<!--
- Copyright (c) 2017 Kumar Rishabh and others.
-
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Apache License, Version 2.0
- which accompanies this distribution, and is available at
- http://www.apache.org/licenses/LICENSE-2.0
--->
-
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <title>Document</title>
- <link rel="stylesheet" href="assets/css/3rd_party/bootstrap.css">
- <link rel="stylesheet" href="assets/css/style.css">
-</head>
-<body>
-<header>
- <ul class="navigation">
- <li class="logo"></li>
- <li class="links"><a href="#">Projects</a></li>
- <li class="links"><a href="#">People</a></li>
- <li class="links"><a href="#">About</a></li>
- </ul>
- <ul class="navigation-right">
- <li class="signup"><a href="#">Sign up</a></li>
- <li class="option">or</li>
- <li class="signin"><a href="#">Sign in</a></li>
- </ul>
-</header>
-<div class="search-box">
- <h1>VNF Catalogue</h1>
- <form class="search-form">
- <input type="text" placeholder="Search..." class="search-input">
- <div class="space-10"></div>
- <button type="submit" value="Search" class="search-button">Search</button>
- </form>
-</div>
-<div class="content">
-<ul class="most-menu">
- <li class="items active"><a href="#">Most Popular</a></li>
- <li class="items"><a href="#">Most Active</a></li>
- <li class="items"><a href="#">Most Active Contributions</a></li>
-</ul>
-<div class="container">
- <div class="row">
- <div class="box-container">
- <div class="col-md-3">
- <div class="content-box">
- <div class="content-data">
- <h1 class="content-title">AAA</h1>
- <div class="box">
- <img src="assets/images/3rd_party/commits.png" class="commit-icon">
- <h3 class="commits">4,845<br>commits</h3>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-3">
- <div class="content-box">
- <div class="content-data">
- <h1 class="content-title">AAA</h1>
- <div class="box">
- <img src="assets/images/3rd_party/commits.png" class="commit-icon">
- <h3 class="commits">4,845<br>commits</h3>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-3">
- <div class="content-box">
- <div class="content-data">
- <h1 class="content-title">AAA</h1>
- <div class="box">
- <img src="assets/images/3rd_party/commits.png" class="commit-icon">
- <h3 class="commits">4,845<br>commits</h3>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-3">
- <div class="content-box">
- <div class="content-data">
- <h1 class="content-title">AAA</h1>
- <div class="box">
- <img src="assets/images/3rd_party/commits.png" class="commit-icon">
- <h3 class="commits">4,845<br>commits</h3>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-3">
- <div class="content-box">
- <div class="content-data">
- <h1 class="content-title">AAA</h1>
- <div class="box">
- <img src="assets/images/3rd_party/commits.png" class="commit-icon">
- <h3 class="commits">4,845<br>commits</h3>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-3">
- <div class="content-box">
- <div class="content-data">
- <h1 class="content-title">AAA</h1>
- <div class="box">
- <img src="assets/images/3rd_party/commits.png" class="commit-icon">
- <h3 class="commits">4,845<br>commits</h3>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-3">
- <div class="content-box">
- <div class="content-data">
- <h1 class="content-title">AAA</h1>
- <div class="box">
- <img src="assets/images/3rd_party/commits.png" class="commit-icon">
- <h3 class="commits">4,845<br>commits</h3>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-3">
- <div class="content-box">
- <div class="content-data">
- <h1 class="content-title">AAA</h1>
- <div class="box">
- <img src="assets/images/3rd_party/commits.png" class="commit-icon">
- <h3 class="commits">4,845<br>commits</h3>
- </div>
- </div>
- </div>
- </div>
- </div>
-</div>
-<footer>
- © 2017 OPNFV
-</footer>
-</div>
-</body>
-</html>