the files of the about panel of Mellanox Dashboard
this commit contains about panel files, that show information about Mellanox Change-Id: Ie05238d14d19d8b79dbd1cd1e8f96217652a75b4
This commit is contained in:
parent
f8ca946ba1
commit
b80ec46ea1
0
horizon_mellanox/aboutpanel/__init__.py
Normal file
0
horizon_mellanox/aboutpanel/__init__.py
Normal file
28
horizon_mellanox/aboutpanel/panel.py
Normal file
28
horizon_mellanox/aboutpanel/panel.py
Normal file
@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2016 Mellanox Technologies, Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import horizon
|
||||
from horizon_mellanox import dashboard
|
||||
|
||||
|
||||
class Aboutpanel(horizon.Panel):
|
||||
name = _("About")
|
||||
slug = "aboutpanel"
|
||||
|
||||
|
||||
dashboard.MlnxDashboard.register(Aboutpanel)
|
40
horizon_mellanox/aboutpanel/templates/aboutpanel/index.html
Normal file
40
horizon_mellanox/aboutpanel/templates/aboutpanel/index.html
Normal file
@ -0,0 +1,40 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "NEO" %}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<style>
|
||||
|
||||
#content_body .container-fluid{
|
||||
height: 100% !important;
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
#content_body .container-fluid .row{
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
#content_body .container-fluid .row .col-xs-12{
|
||||
height: 100% !important;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
#content_body .container-fluid .row .col-xs-12 .page-header{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
iframe#about_iframe{
|
||||
width: 100%;
|
||||
height: 99%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<iframe id="about_iframe" src="https://wiki.openstack.org/wiki/Mellanox-Neutron">
|
||||
<p>Your browser does not support iframes.</p>
|
||||
</iframe>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
26
horizon_mellanox/aboutpanel/urls.py
Normal file
26
horizon_mellanox/aboutpanel/urls.py
Normal file
@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2016 Mellanox Technologies, Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.conf.urls import patterns
|
||||
from django.conf.urls import url
|
||||
|
||||
from horizon_mellanox.aboutpanel.views import IndexView
|
||||
|
||||
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', IndexView.as_view(), name='index'),
|
||||
)
|
26
horizon_mellanox/aboutpanel/views.py
Normal file
26
horizon_mellanox/aboutpanel/views.py
Normal file
@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2016 Mellanox Technologies, Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from horizon import views
|
||||
|
||||
|
||||
class IndexView(views.APIView):
|
||||
# A very simple class-based view...
|
||||
template_name = 'horizon_mellanox/aboutpanel/index.html'
|
||||
|
||||
def get_data(self, request, context, *args, **kwargs):
|
||||
# Add data to the context here...
|
||||
return context
|
Loading…
x
Reference in New Issue
Block a user