Skip to content
This repository was archived by the owner on Jul 21, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added New Text Document.txt
Empty file.
4 changes: 3 additions & 1 deletion moc_ui/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def save(self, force_insert=False, force_update=False, commit=True):
class CreateVM(forms.Form):
name = forms.CharField()

def create(self):
#def create(self):



Expand All @@ -148,3 +148,5 @@ class DeleteVM(forms.Form):
class ControlVM(forms.Form):
name = forms.CharField()
action = forms.CharField()


26 changes: 26 additions & 0 deletions moc_ui/templates/haas.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
{% extends "base.html" %}
{% load staticfiles %}

{% block title %}HaaS{% endblock %}

{% block content %}
<div class="row vert-padded"></div>

<div class="container-fluid">
<div class="col-md-8 col-centered">
<div class="panel-group" id="accordion">
<div class="panel panel-default floating-block">

<div class="panel-heading">

<div class="row">
<iframe id="haas_iframe" height="750px" frameBorder="0" width="100%" src="http://0.0.0.0:9000" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, iframe looks really nice 👍

</div

</div>
</div>
</div>
</div>
</div>
{% endblock%}
5 changes: 5 additions & 0 deletions moc_ui/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
<ul class="nav navbar-nav">
<li><a href="/clouds">Cloud</a></li>
</ul>
<!-- Haas -->
<ul class="nav navbar-nav">
<li><a href="/haas">HaaS</a></li>
</ul>
<!-- End Haas -->
<div class="dropdown navbar-right">
<button class="btn glyphicon glyphicon-user" style="font-size:1.5em" id="userProfile" data-toggle="dropdown" aria-expanded="true">
{{ request.session.user_name }}
Expand Down
3 changes: 3 additions & 0 deletions moc_ui/urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.views.generic import TemplateView
from views import *

##Template Rendering and querying state
Expand All @@ -20,6 +21,8 @@
## DB dusting
url(r'^create/(?P<object_class>.+)', create_object),
url(r'^delete/(?P<object_class>.+)', delete_object),
# haas plugin
url(r'^haas',haas),
# # vm control
# url(r'^createVM', createVM),
# url(r'^deleteVM', deleteVM),
Expand Down
5 changes: 5 additions & 0 deletions moc_ui/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,8 @@ def control_vm(request, action, vm_name):
# check that the user has privalidge on vm
# actually do the action
pass


#Haas Plugin page
def haas(request):
return render(request, 'haas.html')