" + gettext("Welcome to the template tutorial. In this quick tour, we gonna show you how to do the steps described above.") + "
" + - "" + gettext('For the next tour step press the "Next" button or the right arrow (or "Back" button/left arrow for the previous step).') + "
" + - "" + gettext("During the tour please don't try the functions because it may lead to graphical glitches, however " + - "you can end the tour any time you want with the End Tour button!") + "
", - placement: "bottom", - backdrop: true, - }); - ttour.addStep({ - backdrop: true, - element: 'a[href="#home"]', - title: gettext("Home tab"), - content: gettext("In this tab you can tag your virtual machine and modify the name and description."), - placement: 'top', - onShow: function() { - $('a[href="#home"]').trigger("click"); +function get_steps() { + // if an activity is running the #ops will be refreshed + // and the intro will break + deploy_selector = "#ops"; + save_as_selector = "#ops"; + if(!$('.timeline .activity i').hasClass('fa-spin')) { + vm_status = $("#vm-details-state").data("status"); + if(vm_status === "PENDING") + deploy_selector += ' a[class*="operation-deploy"]'; + if(vm_status === "RUNNING" || vm_status === "STOPPED") + save_as_selector += ' a[class*="operation-save_as_template"]'; + } + + steps = [ + { + element: document.querySelector("#vm-details-start-template-tour"), + intro: "" + gettext("Welcome to the template tutorial. In this quick tour, we are going to show you how to do the steps described above.") + "
" + + "" + gettext('For the next tour step press the "Next" button or the right arrow (or "Back" button/left arrow for the previous step).') + "
" }, - }); - - ttour.addStep({ - element: 'a[href="#resources"]', - title: gettext("Resources tab"), - backdrop: true, - placement: 'top', - content: gettext("On the resources tab you can edit the CPU/RAM options and add/remove disks!"), - onShow: function() { - $('a[href="#resources"]').trigger("click"); + { + element: document.querySelector('a[href="#home"]'), + intro: gettext("In this tab you can extend the expiration date of your virtual machine, add tags and modify the name and description."), }, - }); - - ttour.addStep({ - element: '#vm-details-resources-form', - placement: 'top', - backdrop: true, - title: gettext("Resources"), - content: '' + gettext("CPU priority") + ": " + gettext("higher is better") + "
" + - '' + gettext("CPU count") + ": " + gettext("number of CPU cores.") + "
" + - '' + gettext("RAM amount") + ": " + gettext("amount of RAM.") + "
", - onShow: function() { - $('a[href="#resources"]').trigger("click"); + { + element: document.querySelector('#home_name_and_description'), + intro: gettext("Please add a meaningful description to the virtual machine. Changing the name is also recommended, however you can choose a new name when saving the template."), }, - }); - - ttour.addStep({ - element: '#vm-details-resources-disk', - backdrop: true, - placement: 'top', - title: gettext("Disks"), - content: gettext("You can add empty disks, download new ones and remove existing ones here."), - onShow: function() { - $('a[href="#resources"]').trigger("click"); + { + element: document.querySelector('#home_expiration_and_lease'), + intro: gettext("You can change the lease to extend the expiration date. This will be the lease of the new template."), }, - }); - - ttour.addStep({ - element: 'a[href="#network"]', - backdrop: true, - placement: 'top', - title: gettext("Network tab"), - content: gettext('You can add new network interfaces or remove existing ones here.'), - onShow: function() { - $('a[href="#network"]').trigger("click"); + { + element: document.querySelector('a[href="#resources"]'), + intro: gettext("On the resources tab you can edit the CPU/RAM options and add/remove disks if you have required permissions."), + } + ]; + + if($("#vm-details-resources-save").length) { + steps.push( + { + element: document.querySelector('#vm-details-resources-form'), + intro: '' + gettext("CPU priority") + ": " + + gettext("higher is better") + "
" + + "" + gettext("CPU count") + ": " + + gettext("number of CPU cores.") + "
" + + "" + gettext("RAM amount") + ": " + + gettext("amount of RAM.") + "
", + position: "top", + } + ); + } + + if($(".operation-create_disk").length || $(".operation-download_disk").length) { + steps.push( + { + element: document.querySelector('#vm-details-resources-disk'), + intro: gettext("You can add empty disks, download new ones and remove existing ones here."), + position: "top", + } + ); + } + + steps.push( + { + element: document.querySelector('a[href="#network"]'), + intro: gettext('You can add new network interfaces or remove existing ones here.'), }, - }); - - - ttour.addStep({ - element: "#ops", - title: ' ' + gettext("Deploy"), - placement: "left", - backdrop: true, - content: gettext("Deploy the virtual machine."), - }); - - ttour.addStep({ - element: "#vm-info-pane", - title: gettext("Connect"), - placement: "top", - backdrop: true, - content: gettext("Use the connection string or connect with your choice of client!"), - - }); - - ttour.addStep({ - element: "#vm-info-pane", - placement: "top", - title: gettext("Customize the virtual machine"), - content: gettext("After you have connected to the virtual machine do your modifications then log off."), - }); - - ttour.addStep({ - element: "#ops", - title: ' ' + gettext("Save as"), - placement: "left", - backdrop: true, - content: gettext('Press the "Save as template" button and wait until the activity finishes.'), - }); - - - ttour.addStep({ - element: ".alert-new-template", - title: gettext("Finish"), - backdrop: true, - placement: "bottom", - content: gettext("This is the last message, if something is not clear you can do the the tour again!"), - }); - - return ttour; + { + element: document.querySelector(deploy_selector), + intro: gettext("Deploy the virtual machine."), + }, + { + element: document.querySelector("#vm-info-pane"), + intro: gettext("Use the CIRCLE client or the connection string to connect to the virtual machine."), + }, + { + element: document.querySelector("#vm-info-pane"), + intro: gettext("After you have connected to the virtual machine do your modifications then log off."), + }, + { + element: document.querySelector(save_as_selector), + intro: gettext('Press the "Save as template" button and wait until the activity finishes.'), + }, + { + element: document.querySelector(".alert-new-template"), + intro: gettext("This is the last message, if something is not clear you can do the the tour again."), + } + ); + return steps; } diff --git a/circle/dashboard/static/local-logo.png b/circle/dashboard/static/local-logo.png new file mode 100644 index 0000000..b3c1c1f Binary files /dev/null and b/circle/dashboard/static/local-logo.png differ diff --git a/circle/dashboard/tables.py b/circle/dashboard/tables.py index 27dc8e1..063ada3 100644 --- a/circle/dashboard/tables.py +++ b/circle/dashboard/tables.py @@ -88,18 +88,21 @@ class GroupListTable(Table): number_of_users = TemplateColumn( orderable=False, + verbose_name=_("Number of users"), template_name='dashboard/group-list/column-users.html', attrs={'th': {'class': 'group-list-table-admin'}}, ) admin = TemplateColumn( orderable=False, + verbose_name=_("Admin"), template_name='dashboard/group-list/column-admin.html', attrs={'th': {'class': 'group-list-table-admin'}}, ) actions = TemplateColumn( orderable=False, + verbose_name=_("Actions"), attrs={'th': {'class': 'group-list-table-thin'}}, template_code=('{% include "dashboard/group-list/column-' 'actions.html" with btn_size="btn-xs" %}'), diff --git a/circle/dashboard/templates/branding.html b/circle/dashboard/templates/branding.html new file mode 100644 index 0000000..500b248 --- /dev/null +++ b/circle/dashboard/templates/branding.html @@ -0,0 +1,2 @@ +@@ -13,24 +14,27 @@ Choose a compute node to migrate {{obj}} to. {% block formfields %}