From f38f41124db707b390e8f21c1a91e1022b3633ab Mon Sep 17 00:00:00 2001 From: Eddie Arrage Date: Thu, 28 Jun 2018 17:42:28 +0000 Subject: Implement initial clover-controller service - First pass of clover-controller which resides within the k8s cluster and provides interfaces to all Clover services - Only service that should need to be exposed outside of cluster - Docker build of container that uses stack of nginx, gunicorn and flask to provide REST interface - REST interface is intended to serve cloverctl CLI and dashboard browser UI - Implements GRPC messaging to clover-collector and snort - GRPC interfaces files for snort/nginx are added to container from repo. Collector GRPC files will be removed from controller/control/api once patch below is merged https://gerrit.opnfv.org/gerrit/#/c/57245/ and added similarly - Provides first pass callback for file upload from clover-server. - Some REST messages implement JSON for passing params to internal services - Redis interface added to obtain data from services. Currently, a simple interface to retrieve snort event information - YAML manifest renderer to add to k8s. Uses NodePort service currently, defaulting to port 32044. - Removed collector gRPC interface files with merge of collector - Expose tracing and monitoring host/port parameters, as these vary depending on Istio version and Jaeger version - Add logging to flask blueprints - Added jmeter blueprint interface with REST for testplan generation, start test and result retrieval - Added flask Response to REST reply messages - Retrieve some basic stats from collector in json response Change-Id: I59eaeb860445ade4b45bba22747a61fb0cf0bbd4 Signed-off-by: Eddie Arrage --- clover/controller/control/views/dashboard.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 clover/controller/control/views/dashboard.py (limited to 'clover/controller/control/views/dashboard.py') diff --git a/clover/controller/control/views/dashboard.py b/clover/controller/control/views/dashboard.py new file mode 100644 index 0000000..8b6969c --- /dev/null +++ b/clover/controller/control/views/dashboard.py @@ -0,0 +1,19 @@ +# Copyright (c) Authors of Clover +# +# 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 + +from flask import Blueprint, render_template, abort +from jinja2 import TemplateNotFound + +simple_page = Blueprint('simple_page', __name__) + + +@simple_page.route('/dashboard', defaults={'page': 'index'}) +def show(page): + try: + return render_template('home.html') + except TemplateNotFound: + abort(404) -- cgit 1.2.3-korg