mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-30 22:50:10 +03:00
Feature #4363: Add dashboard menu item
This commit is contained in:
parent
ee7d095de5
commit
8e991daf7a
@ -460,6 +460,7 @@ define(function(require) {
|
||||
QuotaWidgets.initEmptyQuotas(user);
|
||||
|
||||
if (!$.isEmptyObject(user.VM_QUOTA)){
|
||||
$("#provision_quotas_dashboard").show();
|
||||
var default_user_quotas = QuotaDefaults.default_quotas(user.DEFAULT_USER_QUOTAS);
|
||||
|
||||
var vms = QuotaWidgets.quotaInfo(
|
||||
@ -491,6 +492,8 @@ define(function(require) {
|
||||
$("#provision_dashboard_cpu_percentage").html(cpu["percentage"]);
|
||||
$("#provision_dashboard_cpu_str").html(cpu["str"]);
|
||||
$("#provision_dashboard_cpu_meter").val(cpu["percentage"]);
|
||||
} else {
|
||||
$("#provision_quotas_dashboard").hide();
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -692,11 +695,6 @@ define(function(require) {
|
||||
// Dashboard
|
||||
//
|
||||
|
||||
$(".provision_image_header").on("click", function(){
|
||||
Sunstone.showTab(TAB_ID);
|
||||
$('li', '.provision-header').removeClass("active");
|
||||
show_provision_dashboard();
|
||||
})
|
||||
|
||||
$(".configuration").on("click", function(){
|
||||
$('li', '.provision-header').removeClass("active");
|
||||
@ -704,11 +702,16 @@ define(function(require) {
|
||||
|
||||
show_provision_dashboard();
|
||||
|
||||
$('.provision-header').on('click', 'li', function(){
|
||||
$('.provision-header').on('click', 'a', function(){
|
||||
Sunstone.showTab(TAB_ID);
|
||||
$('li', '.provision-header').removeClass("active");
|
||||
$(this).closest('li').addClass("active");
|
||||
})
|
||||
});
|
||||
|
||||
$(document).on("click", ".provision_dashboard_button", function(){
|
||||
OpenNebula.Action.clear_cache("VM");
|
||||
show_provision_dashboard();
|
||||
});
|
||||
|
||||
$(document).on("click", ".provision_vms_list_button", function(){
|
||||
OpenNebula.Action.clear_cache("VM");
|
||||
|
@ -13,6 +13,7 @@
|
||||
{{! See the License for the specific language governing permissions and }}
|
||||
{{! limitations under the License. }}
|
||||
{{! -------------------------------------------------------------------------- }}
|
||||
<div id="provision_quotas_dashboard" hidden>
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<h4>{{tr "Quotas"}}</h2>
|
||||
@ -65,4 +66,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -19,24 +19,26 @@
|
||||
<div class="small-12 medium-8 columns">
|
||||
<ul class="menu provision-header text-center">
|
||||
<li>
|
||||
<a href="#" class="provision_image_header" >
|
||||
<img src="{{logo}}">
|
||||
</li>
|
||||
<li class="active">
|
||||
<a href"#" class="provision_dashboard_button" id=""> <i class="fa fa-lg fa-fw fa-dashboard"/>{{tr "Dashboard"}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href"#" class="provision_vms_list_button" id=""> <i class="fa fa-fw fa-th"/>{{tr "VMs"}}
|
||||
<a href"#" class="provision_vms_list_button" id=""> <i class="fa fa-lg fa-fw fa-th"/>{{tr "VMs"}}
|
||||
</a>
|
||||
</li>
|
||||
{{#isProvisionTabEnabled "provision-tab" "templates"}}
|
||||
<li>
|
||||
<a href"#" class="provision_templates_list_button"> <i class="fa fa-fw fa-save"/>{{tr "Templates"}}
|
||||
<a href"#" class="provision_templates_list_button"> <i class="fa fa-lg fa-fw fa-save"/>{{tr "Templates"}}
|
||||
</a>
|
||||
</li>
|
||||
{{/isProvisionTabEnabled}}
|
||||
{{#isProvisionTabEnabled "provision-tab" "flows"}}
|
||||
<li>
|
||||
<a href"#" class="provision_flows_list_button" id="">
|
||||
<i class="fa fa-fw fa-cubes"/>
|
||||
<i class="fa fa-lg fa-fw fa-cubes"/>
|
||||
{{tr "Services"}}
|
||||
</a>
|
||||
</li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user