diff options
54 files changed, 163 insertions, 153 deletions
diff --git a/horizon/static/framework/util/tech-debt/image-file-on-change.directive.js b/horizon/static/framework/util/tech-debt/image-file-on-change.directive.js index e6df46c0c..64c46cb51 100644 --- a/horizon/static/framework/util/tech-debt/image-file-on-change.directive.js +++ b/horizon/static/framework/util/tech-debt/image-file-on-change.directive.js @@ -29,7 +29,7 @@ return directive; function link($scope, element, attrs, ngModel) { - element.bind('change', function (event) { + element.on('change', function (event) { var files = event.target.files; var file = files[0]; ngModel.$setViewValue(file); diff --git a/horizon/static/framework/widgets/headers/hz-page-header.html b/horizon/static/framework/widgets/headers/hz-page-header.html index 4b586cf9a..0172f7128 100644 --- a/horizon/static/framework/widgets/headers/hz-page-header.html +++ b/horizon/static/framework/widgets/headers/hz-page-header.html @@ -1,5 +1,5 @@ -<div class='page-header'> +<div class="page-header"> <h1>{$ ::header $}</h1> <p>{$ ::description $}</p> <ng-transclude></ng-transclude> -</div>
\ No newline at end of file +</div> diff --git a/horizon/static/framework/widgets/metadata/tree/metadata-tree.html b/horizon/static/framework/widgets/metadata/tree/metadata-tree.html index 185c81346..48263059e 100644 --- a/horizon/static/framework/widgets/metadata/tree/metadata-tree.html +++ b/horizon/static/framework/widgets/metadata/tree/metadata-tree.html @@ -34,7 +34,7 @@ ng-model="ctrl.customItem" validate-unique="ctrl.checkNameUnique"/> <span class="input-group-btn"> - <button type='button' class="btn btn-primary" + <button type="button" class="btn btn-primary" ng-click="ctrl.tree.addCustom(ctrl.customItem); ctrl.customItem=''" ng-disabled="!ctrl.customItem || customItemForm.$invalid"> <span class="fa fa-plus"></span> diff --git a/horizon/static/framework/widgets/property/hz-resource-property.html b/horizon/static/framework/widgets/property/hz-resource-property.html index eac545fe6..45762f154 100644 --- a/horizon/static/framework/widgets/property/hz-resource-property.html +++ b/horizon/static/framework/widgets/property/hz-resource-property.html @@ -1,5 +1,5 @@ <dt>{$ ctrl.config.label $}</dt> <dd> - <hz-field config='ctrl.config' item='ctrl.item'></hz-field> + <hz-field config="ctrl.config" item="ctrl.item"></hz-field> </dd> diff --git a/horizon/static/horizon/js/horizon.d3linechart.js b/horizon/static/horizon/js/horizon.d3linechart.js index f01b81992..d2dba8202 100644 --- a/horizon/static/horizon/js/horizon.d3linechart.js +++ b/horizon/static/horizon/js/horizon.d3linechart.js @@ -755,7 +755,7 @@ horizon.d3_line_chart = { * @param settings An object containing settings of the chart. */ var delegate_event_and_refresh_charts = function(selector, event_name, settings) { - $('form').delegate(selector, event_name, function() { + $('form').on(selector, event_name, function() { /* Registering 'any event' on form element by delegating. This way it can be easily overridden / enhanced when some special functionality diff --git a/horizon/static/horizon/js/horizon.forms.js b/horizon/static/horizon/js/horizon.forms.js index 8fff1d0f5..00e41478e 100644 --- a/horizon/static/horizon/js/horizon.forms.js +++ b/horizon/static/horizon/js/horizon.forms.js @@ -168,11 +168,11 @@ horizon.forms = { endDate.hide(); }).data('datepicker'); - $("#id_start").mousedown(function(){ + $("#id_start").on("mousedown", function() { endDate.hide(); }); - $("#id_end").mousedown(function(){ + $("#id_end").on("mousedown", function() { startDate.hide(); }); @@ -184,12 +184,12 @@ horizon.forms = { horizon.forms.handle_submit = function (el) { var $form = $(el).find("form"); - $form.submit(function () { + $form.on('submit', function () { var $this = $(this); // Disable multiple submissions when launching a form. var button = $this.find('[type="submit"]'); if (button.hasClass('btn-primary') && !button.hasClass('always-enabled')){ - $this.submit(function () { + $this.on('submit', function () { return false; }); button.removeClass('primary').addClass('disabled'); diff --git a/horizon/static/horizon/js/horizon.hacks.js b/horizon/static/horizon/js/horizon.hacks.js index d1db9fa93..6df69894b 100644 --- a/horizon/static/horizon/js/horizon.hacks.js +++ b/horizon/static/horizon/js/horizon.hacks.js @@ -15,7 +15,7 @@ // Added so that we can break Firefox and Safari bfcache to // prevent loading previous page from cache. horizon.addInitFunction(function () { - $(window).bind('pageshow', function(event) { + $(window).on('pageshow', function(event) { if (event.originalEvent.persisted) { window.location.reload(); } diff --git a/horizon/static/horizon/js/horizon.membership.js b/horizon/static/horizon/js/horizon.membership.js index 7d453c556..4c3799b1f 100644 --- a/horizon/static/horizon/js/horizon.membership.js +++ b/horizon/static/horizon/js/horizon.membership.js @@ -415,7 +415,7 @@ horizon.membership = { **/ list_filtering: function (step_slug) { // remove previous lists' quicksearch events - $('input.' + step_slug + '_filter').unbind(); + $('input.' + step_slug + '_filter').off(); // set up quicksearch to filter on input $('.' + step_slug + '_filterable').each(function () { @@ -490,7 +490,7 @@ horizon.membership = { } // prevent filter inputs from submitting form on 'enter' - $form.find('.' + step_slug + '_membership').keydown(function(event){ + $form.find('.' + step_slug + '_membership').on('keydown', function(event){ if (event.keyCode === 13) { event.preventDefault(); return false; diff --git a/horizon/static/horizon/js/horizon.messages.js b/horizon/static/horizon/js/horizon.messages.js index 94d654efe..2e8484585 100644 --- a/horizon/static/horizon/js/horizon.messages.js +++ b/horizon/static/horizon/js/horizon.messages.js @@ -93,14 +93,14 @@ horizon.autoDismissAlert = function ($alert) { horizon.addInitFunction(function () { // Bind AJAX message handling. $(document).ajaxComplete(function(event, request){ - var message_array = $.parseJSON(horizon.ajax.get_messages(request)); + var message_array = JSON.parse(horizon.ajax.get_messages(request)); $(message_array).each(function (index, item) { horizon.alert(item[0], item[1], item[2]); }); }); // Dismiss alert messages when moving on to a new type of action. - $('a.ajax-modal').click(function() { + $('a.ajax-modal').on('click', function() { horizon.clearAllMessages(); }); diff --git a/horizon/static/horizon/js/horizon.modals.js b/horizon/static/horizon/js/horizon.modals.js index e6ade213d..a7d5cb4b4 100644 --- a/horizon/static/horizon/js/horizon.modals.js +++ b/horizon/static/horizon/js/horizon.modals.js @@ -346,7 +346,7 @@ horizon.addInitFunction(horizon.modals.init = function() { } else if (redirect_header) { location.href = redirect_header; } else if (add_to_field_header) { - json_data = $.parseJSON(data); + json_data = JSON.parse(data); field_to_update = $("#" + add_to_field_header); field_to_update.append("<option value='" + json_data[0] + "'>" + json_data[1] + "</option>"); field_to_update.change(); diff --git a/horizon/static/horizon/lib/jquery/jquery.bootstrap.wizard.js b/horizon/static/horizon/lib/jquery/jquery.bootstrap.wizard.js index 9678b51f8..3978af5f3 100644 --- a/horizon/static/horizon/lib/jquery/jquery.bootstrap.wizard.js +++ b/horizon/static/horizon/lib/jquery/jquery.bootstrap.wizard.js @@ -38,7 +38,7 @@ var bootstrapWizardCreate = function(element, options) { this.rebindClick = function(selector, fn) { - selector.unbind('click', fn).bind('click', fn); + selector.off('click', fn).bind('click', fn); } this.fixNavigationButtons = function() { diff --git a/horizon/templates/auth/_login_form.html b/horizon/templates/auth/_login_form.html index a4a4abad5..92c216756 100644 --- a/horizon/templates/auth/_login_form.html +++ b/horizon/templates/auth/_login_form.html @@ -26,8 +26,8 @@ {% endcomment %} {% if HORIZON_CONFIG.password_autocomplete != "on" %} <div class="fake_credentials" style="display: none"> - <input type="text" name="fake_email" value="" /> - <input type="password" name="fake_password" value="" /> + <input type="text" name="fake_email" value="" autocomplete="new-password"/> + <input type="password" name="fake_password" value="" autocomplete="new-password"/> </div> {%endif%} {% if show_sso_opts %} diff --git a/horizon/templates/horizon/_nav_list.html b/horizon/templates/horizon/_nav_list.html index 2218fc544..95a2f8182 100644 --- a/horizon/templates/horizon/_nav_list.html +++ b/horizon/templates/horizon/_nav_list.html @@ -5,7 +5,7 @@ {% for component in components %} {% if user|has_permissions:component %} <li{% if current.slug == component.slug %} class="active"{% endif %}> - <a href="{{ component.get_absolute_url }}" tabindex='1'>{{ component.name }}</a> + <a href="{{ component.get_absolute_url }}" tabindex="1">{{ component.name }}</a> </li> {% endif %} {% endfor %} diff --git a/horizon/templates/horizon/_subnav_list.html b/horizon/templates/horizon/_subnav_list.html index c4d800150..1dd21fe79 100644 --- a/horizon/templates/horizon/_subnav_list.html +++ b/horizon/templates/horizon/_subnav_list.html @@ -10,7 +10,7 @@ {% for panel in filtered_panels %} {% if panel in accessible_panels or current == panel.slug %} <li> - <a href="{{ panel.get_absolute_url }}" {% if current == panel.slug %}class="active"{% endif %} tabindex='1'>{{ panel.name }}</a> + <a href="{{ panel.get_absolute_url }}" {% if current == panel.slug %}class="active"{% endif %} tabindex="1">{{ panel.name }}</a> </li> {% endif %} {% endfor %} diff --git a/horizon/templates/horizon/client_side/_modal.html b/horizon/templates/horizon/client_side/_modal.html index 8560e076e..47b804718 100644 --- a/horizon/templates/horizon/client_side/_modal.html +++ b/horizon/templates/horizon/client_side/_modal.html @@ -7,18 +7,18 @@ <div class="modal" data-backdrop="[[modal_backdrop]]"> <div class="modal-dialog"> <div class="modal-content"> - <div class='modal-header'> - <a class='close' data-dismiss='modal' href="#"> + <div class="modal-header"> + <a class="close" data-dismiss="modal" href="#"> <span class="fa fa-times"></span> </a> <h3 class="modal-title">[[title]]</h3> </div> - <div class='modal-body'> + <div class="modal-body"> [[[body]]] </div> - <div class='modal-footer'> - <a href='#' class='btn btn-default cancel' data-dismiss='modal'>[[cancel]]</a> - <a href='#' class='btn [[confirmCssClass]]'>[[confirm]]</a> + <div class="modal-footer"> + <a href="#" class="btn btn-default cancel" data-dismiss="modal">[[cancel]]</a> + <a href="#" class="btn [[confirmCssClass]]">[[confirm]]</a> </div> </div> </div> diff --git a/horizon/templates/horizon/common/_data_table.html b/horizon/templates/horizon/common/_data_table.html index d29ff7c65..38db26fb7 100644 --- a/horizon/templates/horizon/common/_data_table.html +++ b/horizon/templates/horizon/common/_data_table.html @@ -8,7 +8,7 @@ {% block table_caption %} <caption> {% if not hidden_title %} - <span class='table-title'>{{ table }}</span> + <span class="table-title">{{ table }}</span> {% endif %} {{ table.render_table_actions }} </caption> diff --git a/horizon/templates/horizon/common/_data_table_row_action_row.html b/horizon/templates/horizon/common/_data_table_row_action_row.html index 2fdbb6ca1..4cdd83418 100644 --- a/horizon/templates/horizon/common/_data_table_row_action_row.html +++ b/horizon/templates/horizon/common/_data_table_row_action_row.html @@ -4,7 +4,7 @@ {{ action.verbose_name }} </button> {% else %} - <a href='{{ action.bound_url }}' title='{{ action.verbose_name }}' {{ action.attr_string|safe }}> + <a href="{{ action.bound_url }}" title="{{ action.verbose_name }}" {{ action.attr_string|safe }}> {% if action.icon != None %}<span class="fa fa-{{ action.icon }}"></span> {% endif %} {{ action.verbose_name }} </a> diff --git a/horizon/templates/horizon/common/_datepicker.html b/horizon/templates/horizon/common/_datepicker.html index efac7fdd9..507376192 100644 --- a/horizon/templates/horizon/common/_datepicker.html +++ b/horizon/templates/horizon/common/_datepicker.html @@ -1,7 +1,7 @@ {% load i18n %} {% block trimmed %} - <div class='input-group date'> + <div class="input-group date"> {{ datepicker_input }} <label class="sr-only">{{ datepicker_label }}</label> <span class="input-group-addon datepicker-addon"> diff --git a/horizon/templates/horizon/common/_detail_header.html b/horizon/templates/horizon/common/_detail_header.html index be12cb65f..db99156f9 100644 --- a/horizon/templates/horizon/common/_detail_header.html +++ b/horizon/templates/horizon/common/_detail_header.html @@ -1,4 +1,4 @@ -<div class='page-header detail-header'> +<div class="page-header detail-header"> <div class="row"> <div class="detail-title col-xs-12 col-sm-9"> <span class="h1 word-wrap">{{ page_title }}</span> @@ -6,7 +6,7 @@ <div class="detail-actions col-xs-12 col-sm-3 text-right"> {% if actions %} - <form class='detail-actions-form actions_column' action='{{ url }}' method="POST"> + <form class="detail-actions-form actions_column" action="{{ url }}" method="POST"> {% csrf_token %} {{ actions }} </form> diff --git a/horizon/templates/horizon/common/_domain_page_header.html b/horizon/templates/horizon/common/_domain_page_header.html index b77ce87c8..149fbf28c 100644 --- a/horizon/templates/horizon/common/_domain_page_header.html +++ b/horizon/templates/horizon/common/_domain_page_header.html @@ -1,6 +1,6 @@ {% load i18n %} {% block page_header %} - <div class='page-header'> + <div class="page-header"> <h1> {% if 'domain_context_name' in request.session %} <em>{% blocktrans with context_name=request.session.domain_context_name %}{{ context_name }}:{% endblocktrans %}</em> diff --git a/horizon/templates/horizon/common/_form_field.html b/horizon/templates/horizon/common/_form_field.html index c521fc0d6..5b3a3b2a8 100644 --- a/horizon/templates/horizon/common/_form_field.html +++ b/horizon/templates/horizon/common/_form_field.html @@ -17,10 +17,10 @@ <div class="{{ classes.value }} {{ field|wrapper_classes }}"> {% with add_item_link=field|add_item_url %} {% if add_item_link %} - <div class='input-group'> + <div class="input-group"> {{ field|add_bootstrap_class }} <span class="input-group-btn"> - <a href="{{ add_item_link }}" data-add-to-field="{{ field.auto_id }}" class='btn btn-default ajax-add ajax-modal'> + <a href="{{ add_item_link }}" data-add-to-field="{{ field.auto_id }}" class="btn btn-default ajax-add ajax-modal"> <span class="fa fa-plus"></span> </a> </span> diff --git a/horizon/templates/horizon/common/_page_header.html b/horizon/templates/horizon/common/_page_header.html index 9491a55ac..ab8585b8b 100644 --- a/horizon/templates/horizon/common/_page_header.html +++ b/horizon/templates/horizon/common/_page_header.html @@ -1,9 +1,9 @@ {% load i18n %} {% block page_header %} - <div class='page-header'> + <div class="page-header"> <h1>{{ title }}</h1> {% if actions %} - <form class='actions_column pull-right' action='{{ url }}' method="POST"> + <form class="actions_column pull-right" action="{{ url }}" method="POST"> {% csrf_token %} {{ actions }} </form> diff --git a/horizon/templates/horizon/common/_sidebar.html b/horizon/templates/horizon/common/_sidebar.html index d55251ab5..73aec7bfd 100644 --- a/horizon/templates/horizon/common/_sidebar.html +++ b/horizon/templates/horizon/common/_sidebar.html @@ -1,5 +1,5 @@ {% load branding horizon i18n %} -<nav id='sidebar'> +<nav id="sidebar"> {% horizon_nav %} </nav> diff --git a/horizon/templates/horizon/common/_tab_group.html b/horizon/templates/horizon/common/_tab_group.html index 8f3aa47fe..05c062f82 100644 --- a/horizon/templates/horizon/common/_tab_group.html +++ b/horizon/templates/horizon/common/_tab_group.html @@ -6,7 +6,7 @@ <ul id="{{ tab_group.get_id }}" {{ tab_group.attr_string|safe }}> {% for tab in tabs %} <li {{ tab.attr_string|safe }}> - <a href="?{{ tab_group.param_name }}={{ tab.get_id }}" data-toggle="tab" data-target="#{{ tab.get_id }}" data-loaded='{{ tab.load|yesno:"true,false" }}'>{{ tab.name }}</a> + <a href="?{{ tab_group.param_name }}={{ tab.get_id }}" data-toggle="tab" data-target="#{{ tab.get_id }}" data-loaded="{{ tab.load|yesno:"true,false" }}">{{ tab.name }}</a> </li> {% endfor %} </ul> diff --git a/horizon/templates/horizon/jasmine/jasmine.html b/horizon/templates/horizon/jasmine/jasmine.html index 76573879a..05ddbe62c 100644 --- a/horizon/templates/horizon/jasmine/jasmine.html +++ b/horizon/templates/horizon/jasmine/jasmine.html @@ -27,7 +27,7 @@ <!-- source files --> {% for file in HORIZON_CONFIG.js_files %} - <script src='{{ STATIC_URL }}{{ file }}'></script> + <script src="{{ STATIC_URL }}{{ file }}"></script> {% endfor %} {% block source %} @@ -36,7 +36,7 @@ <!-- test files - mock and spec --> {% block spec %} {% for file in HORIZON_CONFIG.js_spec_files %} - <script src='{{ STATIC_URL }}{{ file }}'></script> + <script src="{{ STATIC_URL }}{{ file }}"></script> {% endfor %} {% endblock %} diff --git a/horizon/templates/horizon/jasmine/jasmine_legacy.html b/horizon/templates/horizon/jasmine/jasmine_legacy.html index a3a92c601..6d5232656 100644 --- a/horizon/templates/horizon/jasmine/jasmine_legacy.html +++ b/horizon/templates/horizon/jasmine/jasmine_legacy.html @@ -7,17 +7,17 @@ <script src="{{ STATIC_URL }}bootstrap/js/bootstrap.js"></script> <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.tablesorter.js"></script> <script src="{{ STATIC_URL }}horizon/lib/hogan.js"></script> - <script src='{{ STATIC_URL }}horizon/lib/jsencrypt/jsencrypt.js'></script> + <script src="{{ STATIC_URL }}horizon/lib/jsencrypt/jsencrypt.js"></script> <script src="{{ STATIC_URL }}horizon/js/horizon.templates.js"></script> <script src="{{ STATIC_URL }}horizon/js/horizon.instances.js"></script> - <script src='{{ STATIC_URL }}horizon/js/horizon.tabs.js'></script> - <script src='{{ STATIC_URL }}horizon/js/horizon.forms.js'></script> - <script src='{{ STATIC_URL }}horizon/js/horizon.formset_table.js'></script> - <script src='{{ STATIC_URL }}horizon/js/horizon.messages.js'></script> - <script src='{{ STATIC_URL }}horizon/js/horizon.modals.js'></script> - <script src='{{ STATIC_URL }}horizon/js/horizon.tables.js'></script> - <script src='{{ STATIC_URL }}horizon/js/horizon.quota.js'></script> - <script src='{{ STATIC_URL }}horizon/js/horizon.string.js'></script> + <script src="{{ STATIC_URL }}horizon/js/horizon.tabs.js"></script> + <script src="{{ STATIC_URL }}horizon/js/horizon.forms.js"></script> + <script src="{{ STATIC_URL }}horizon/js/horizon.formset_table.js"></script> + <script src="{{ STATIC_URL }}horizon/js/horizon.messages.js"></script> + <script src="{{ STATIC_URL }}horizon/js/horizon.modals.js"></script> + <script src="{{ STATIC_URL }}horizon/js/horizon.tables.js"></script> + <script src="{{ STATIC_URL }}horizon/js/horizon.quota.js"></script> + <script src="{{ STATIC_URL }}horizon/js/horizon.string.js"></script> {% include "horizon/client_side/templates.html" %} @@ -94,9 +94,9 @@ <table id="flavors" class= "table table-bordered table-striped datatable"> <thead> - <tr class='table_caption'> - <th class='table_header' colspan='8'> - <h3 class='table_title'>Flavors</h3> + <tr class="table_caption"> + <th class="table_header" colspan="8"> + <h3 class="table_title">Flavors</h3> <div class="table_actions clearfix"></div> </th> diff --git a/horizon/test/templates/base.html b/horizon/test/templates/base.html index d3379035e..4b516276b 100644 --- a/horizon/test/templates/base.html +++ b/horizon/test/templates/base.html @@ -8,15 +8,15 @@ window.STATIC_URL = '{{ STATIC_URL }}'; window.WEBROOT = '{{ WEBROOT }}'; </script> - <script src='{{ STATIC_URL }}horizon/lib/jquery/jquery.js' type='text/javascript' charset="utf-8"></script> - <script src='{{ STATIC_URL }}horizon/lib/jquery-ui/ui/jquery-ui.js' type='text/javascript' charset="utf-8"></script> - <script src='{{ STATIC_URL }}horizon/lib/jquery/jquery-migrate.js' type='text/javascript' charset="utf-8"></script> + <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.js" type="text/javascript" charset="utf-8"></script> + <script src="{{ STATIC_URL }}horizon/lib/jquery-ui/ui/jquery-ui.js" type="text/javascript" charset="utf-8"></script> + <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery-migrate.js' type="text/javascript" charset="utf-8"></script> <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.tablesorter.js"></script> <script src="{{ STATIC_URL }}horizon/lib/angular/angular.js" type="text/javascript" charset="utf-8"></script> - <script src='{{ STATIC_URL }}horizon/js/horizon.js' type='text/javascript' charset='utf-8'></script> + <script src="{{ STATIC_URL }}horizon/js/horizon.js" type="text/javascript" charset="utf-8"></script> - <script type='text/javascript' charset='utf-8'> + <script type="text/javascript" charset="utf-8"> (function (global) { 'use strict'; @@ -63,9 +63,9 @@ <script src="{{ STATIC_URL }}horizon/lib/spin.js"></script> <script src="{{ STATIC_URL }}horizon/lib/spin.jquery.js"></script> - <script src='{{ STATIC_URL }}horizon/js/horizon.modals.js'></script> - <script src='{{ STATIC_URL }}horizon/js/horizon.tables.js'></script> - <script src='{{ STATIC_URL }}horizon/js/horizon.tabs.js'></script> + <script src="{{ STATIC_URL }}horizon/js/horizon.modals.js"></script> + <script src="{{ STATIC_URL }}horizon/js/horizon.tables.js"></script> + <script src="{{ STATIC_URL }}horizon/js/horizon.tabs.js"></script> <script> angular.module('test_app', []).run(updateHorizon); diff --git a/horizon/test/unit/tables/test_tables.py b/horizon/test/unit/tables/test_tables.py index d6b4581c2..8a82f9e7e 100644 --- a/horizon/test/unit/tables/test_tables.py +++ b/horizon/test/unit/tables/test_tables.py @@ -713,13 +713,13 @@ class DataTableTests(test.TestCase): self.assertContains(resp, update_string, 4) self.assertContains(resp, "data-update-interval", 4) # Verify no table heading - self.assertNotContains(resp, "<h3 class='table_title'") + self.assertNotContains(resp, '<h3 class="table_title"') # Verify our XSS protection self.assertContains(resp, '<strong>evil</strong>', 1) # Hidden Title = False shows the table title self.table._meta.hidden_title = False resp = http.HttpResponse(self.table.render()) - self.assertContains(resp, "<span class='table-title'>", 1) + self.assertContains(resp, '<span class="table-title">', 1) # Filter = False hides the search box self.table._meta.filter = False diff --git a/horizon/test/unit/templatetags/test_templatetags.py b/horizon/test/unit/templatetags/test_templatetags.py index f858e924c..2f3448b81 100644 --- a/horizon/test/unit/templatetags/test_templatetags.py +++ b/horizon/test/unit/templatetags/test_templatetags.py @@ -139,12 +139,12 @@ class TemplateTagTests(test.TestCase): text = "{% horizon_main_nav %}" expected = """ <div> - <ul class=\"nav nav-tabs\" role=\"tablist\"> + <ul class="nav nav-tabs" role="tablist"> <li> - <a href=\"/cats/\" tabindex='1'>Cats</a> + <a href="/cats/" tabindex="1">Cats</a> </li> <li> - <a href=\"/dogs/\" tabindex='1'>Dogs</a> + <a href="/dogs/" tabindex="1">Dogs</a> </li> </ul></div>""" diff --git a/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.directive.js b/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.directive.js index f7abf562a..fc67dcc7c 100644 --- a/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.directive.js +++ b/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.directive.js @@ -43,7 +43,7 @@ function link(scope, element) { //TODO(tqtran) Use angular, not jQuery - $('a[href="#"]').click(function(e) { + $('a[href="#"]').on('click', function(e) { e.preventDefault(); }); @@ -51,7 +51,7 @@ var $pre = $uibModal.find('pre'); var $button = $('<div id="source-button" class="btn btn-primary btn-xs"><span class="fa fa-code"></span></div>') - .click(function(){ + .on('click', function(){ var $parent = $(this).parent(); var $fragment = stripAngular($parent.clone()); diff --git a/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html b/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html index bf19efeee..eddf798a3 100644 --- a/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html +++ b/openstack_dashboard/contrib/developer/static/dashboard/developer/theme-preview/theme-preview.html @@ -679,7 +679,7 @@ <div class="form-group"> <label translate class="col-lg-2 control-label" for="datepicker">Datepicker</label> <div class="col-lg-10"> - <div class='input-group'> + <div class="input-group"> <input type="text" class="form-control" id="datepicker"> <span class="input-group-addon datepicker-addon"> <span class="fa fa-calendar"></span> diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_console.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_console.html index 15cf53701..10cd22586 100644 --- a/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_console.html +++ b/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_console.html @@ -2,7 +2,7 @@ <h3>{% trans "Instance Console" %}</h3> {% if console_url %} -<p class='alert alert-info'> +<p class="alert alert-info"> {% if console_type != 'SERIAL' %} {% blocktrans %}If console is not responding to keyboard input: click the grey status bar below.{% endblocktrans %} {% endif %} diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_instance_flavor.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_instance_flavor.html index ac2bc4167..b71600fd0 100644 --- a/openstack_dashboard/dashboards/project/instances/templates/instances/_instance_flavor.html +++ b/openstack_dashboard/dashboards/project/instances/templates/instances/_instance_flavor.html @@ -1,12 +1,12 @@ {% load i18n %} <a href="#" id="flavor_details_{{ id }}" class="link-popover" rel="popover" tabindex="0" data-trigger="focus" data-content=" -<table class='table table-bordered'> +<table class="table table-bordered"> <tr><th>{% trans 'ID' %}</th><td>{{ flavor_id }}</td></tr> <tr><th>{% trans 'VCPUs' %}</th><td>{{ vcpus }}</td></tr> <tr><th>{% trans 'RAM' %}</th><td>{{ size_ram }}</td></tr> <tr><th>{% trans 'Size' %}</th><td>{{ size_disk }}</td></tr> </table> -" data-original-title="{% blocktrans %}<span class='word-wrap'>Flavor Details: {{ name }}</span>">{{ name }}{% endblocktrans %}</a> +" data-original-title="{% blocktrans %}<span class="word-wrap">Flavor Details: {{ name }}</span>">{{ name }}{% endblocktrans %}</a> <script type="text/javascript" charset="utf-8"> $(function () { var $flavor = $("#flavor_details_{{ id }}"); diff --git a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/_graph_view.html b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/_graph_view.html index da1b2527d..8f5ab2572 100644 --- a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/_graph_view.html +++ b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/_graph_view.html @@ -1,6 +1,6 @@ {% load i18n %} -<div class='description'> +<div class="description"> {% blocktrans trimmed %} Resize the canvas by scrolling up/down with your mouse/trackpad on the topology. Pan around the canvas by clicking and dragging the space behind the topology. diff --git a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/_post_massage.html b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/_post_massage.html index be1448d66..053894e3f 100644 --- a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/_post_massage.html +++ b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/_post_massage.html @@ -1,4 +1,4 @@ -<script type='text/javascript'> +<script type="text/javascript"> (function(){ $(window).on('message',function(e){ var message = JSON.parse(e.originalEvent.data); diff --git a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/_svg_element.html b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/_svg_element.html index 2a38b2063..6eb4ccf5d 100644 --- a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/_svg_element.html +++ b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/_svg_element.html @@ -10,7 +10,7 @@ <pattern id="device_normal_bg_loading" patternUnits="userSpaceOnUse" x="0" y="0" width="20" height="20"> <g> <rect width="20" height="20" class="loading_bg_normal"></rect> - <path d='M0 20L20 0ZM22 18L18 22ZM-2 2L2 -2Z' stroke-linecap="square" stroke='rgba(0, 0, 0, 0.3)' stroke-width="7"></path> + <path d="M0 20L20 0ZM22 18L18 22ZM-2 2L2 -2Z" stroke-linecap="square" stroke="rgba(0, 0, 0, 0.3)" stroke-width="7"></path> </g> <animate attributeName="x" attributeType="XML" begin="0s" dur="0.5s" from="0" to="-20" repeatCount="indefinite"></animate> </pattern> @@ -22,7 +22,7 @@ <pattern id="device_small_bg_loading" patternUnits="userSpaceOnUse" x="0" y="0" width="5" height="5"> <g> <rect width="5" height="5" class="loading_bg_small"></rect> - <path d='M0 5L5 0ZM6 4L4 6ZM-1 1L1 -1Z' stroke-linecap="square" stroke='rgba(0, 0, 0, 0.4)' stroke-width="1.5"></path> + <path d="M0 5L5 0ZM6 4L4 6ZM-1 1L1 -1Z" stroke-linecap="square" stroke="rgba(0, 0, 0, 0.4)" stroke-width="1.5"></path> </g> <animate attributeName="x" attributeType="XML" begin="0s" dur="0.5s" from="0" to="-5" repeatCount="indefinite"></animate> </pattern> diff --git a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/iframe.html b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/iframe.html index 63ad0d114..2b0758fa7 100644 --- a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/iframe.html +++ b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/iframe.html @@ -1,8 +1,8 @@ <!DOCTYPE html> <html> <head> - <meta content='text/html; charset=utf-8' http-equiv='Content-Type' /> - <script src='{{ STATIC_URL }}horizon/lib/jquery/jquery.js' type='text/javascript' charset="utf-8"></script> + <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> + <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.js" type="text/javascript" charset="utf-8"></script> </head> <body> {% include "horizon/_messages.html" %} diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.html b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.html index d1bd5e958..183c838f5 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.html +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/keypair/keypair.html @@ -26,7 +26,7 @@ </hz-dynamic-table> </transfer-table> <!-- End Key Pairs Table --> - <settings-service hz-if-settings='["OPENSTACK_HYPERVISOR_FEATURES.can_set_password"]'> + <settings-service hz-if-settings="["OPENSTACK_HYPERVISOR_FEATURES.can_set_password"]"> <div class="admin-password"> <div class="themable-checkbox"> <input ng-change="ctrl.setAdminPasswordChange()" diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/source/source.html b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/source/source.html index 32efb82a3..a9a750792 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/source/source.html +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/source/source.html @@ -93,7 +93,7 @@ </div> </div> - <div hz-if-settings='["OPENSTACK_HYPERVISOR_FEATURES.can_set_mount_point"]' + <div hz-if-settings="["OPENSTACK_HYPERVISOR_FEATURES.can_set_mount_point"]" ng-if="model.newInstanceSpec.vol_create === true"> <label translate>Device Name</label> <input class="form-control" diff --git a/openstack_dashboard/static/js/angular/directives/serialConsole.js b/openstack_dashboard/static/js/angular/directives/serialConsole.js index df48e6b89..97a691038 100644 --- a/openstack_dashboard/static/js/angular/directives/serialConsole.js +++ b/openstack_dashboard/static/js/angular/directives/serialConsole.js @@ -77,7 +77,7 @@ limitations under the License. scope.cols = 80; scope.rows = 24; // event handler to resize console according to window resize. - angular.element(window).bind('resize', resizeTerminal); + angular.element(window).on('resize', resizeTerminal); function resizeTerminal() { var terminal = angular.element('.terminal')[0]; // take margin for scroll-bars on window. diff --git a/openstack_dashboard/static/js/horizon.flatnetworktopology.js b/openstack_dashboard/static/js/horizon.flatnetworktopology.js index 944b6f4f1..9bb271d1d 100644 --- a/openstack_dashboard/static/js/horizon.flatnetworktopology.js +++ b/openstack_dashboard/static/js/horizon.flatnetworktopology.js @@ -105,12 +105,12 @@ horizon.flat_network_topology = { e.stopImmediatePropagation(); var vnc_window = window.open($(this).attr('href'), vnc_window, 'width=760,height=560'); self.delete_balloon(); - }) - .click(function(){ + }); + $(document).on('click', function(){ self.delete_balloon(); }); - $('.toggle-view > .btn').click(function(){ + $('.toggle-view > .btn').on('click', function(){ self.draw_mode = $(this).data('value'); $('g.network').remove(); horizon.cookies.put('ntp_draw_mode',self.draw_mode); @@ -382,7 +382,7 @@ horizon.flat_network_topology = { this._portdata.port_margin = d.port_margin; this._portdata.left = 0; this._portdata.right = 0; - $(this).mouseenter(function(e){ + $(this).on('mouseenter', function(e){ e.stopPropagation(); }); }); @@ -621,20 +621,20 @@ horizon.flat_network_topology = { 'left': x + 'px' }).show(); - $balloon.find('.delete-device').click(function(){ + $balloon.find('.delete-device').on('click', function(){ var $this = $(this); var delete_modal = horizon.datatables.confirm($this); - delete_modal.find('.btn.btn-danger').click(function () { + delete_modal.find('.btn.btn-danger').on('click', function () { $this.prop('disabled', true); d3.select('#id_' + $this.data('device-id')).classed('loading',true); self.delete_device($this.data('type'),$this.data('device-id')); horizon.modals.spinner.modal('hide'); }); }); - $balloon.find('.delete-port').click(function(){ + $balloon.find('.delete-port').on('click', function(){ var $this = $(this); var delete_modal = horizon.datatables.confirm($this); - delete_modal.find('.btn.btn-danger').click(function () { + delete_modal.find('.btn.btn-danger').on('click', function () { $this.prop('disabled', true); self.delete_port($this.data('router-id'),$this.data('port-id'),$this.data('network-id')); horizon.modals.spinner.modal('hide'); diff --git a/openstack_dashboard/static/js/horizon.networktopology.js b/openstack_dashboard/static/js/horizon.networktopology.js index c94da2953..bcccb7bc1 100644 --- a/openstack_dashboard/static/js/horizon.networktopology.js +++ b/openstack_dashboard/static/js/horizon.networktopology.js @@ -142,7 +142,7 @@ horizon.network_topology = { self.refresh_labels(); }); - angular.element('#center_topology').click(function() { + angular.element('#center_topology').on('click', function() { this.blur(); // remove btn focus after click self.delete_balloon(); // move visualization to the center and reset scale @@ -157,7 +157,7 @@ horizon.network_topology = { self.translate = null; }); angular.element(window).on('message', function(e) { - var message = angular.element.parseJSON(e.originalEvent.data); + var message = JSON.parse(e.originalEvent.data); if (self.previous_message !== message.message) { horizon.alert(message.type, message.message); self.previous_message = message.message; @@ -1101,19 +1101,19 @@ horizon.network_topology = { }) .addClass('leftPosition'); } - _balloon.find('.delete-device').click(function() { + _balloon.find('.delete-device').on('click', function() { var _this = angular.element(this); var delete_modal = horizon.datatables.confirm(_this); - delete_modal.find('.btn.btn-danger').click(function () { + delete_modal.find('.btn.btn-danger').on('click', function () { _this.prop('disabled', true); d3.select('#id_' + _this.data('device-id')).classed('loading',true); self.delete_device(_this.data('type'),_this.data('device-id')); }); }); - _balloon.find('.delete-port').click(function() { + _balloon.find('.delete-port').on('click', function() { var _this = angular.element(this); var delete_modal = horizon.datatables.confirm(_this); - delete_modal.find('.btn.btn-danger').click(function () { + delete_modal.find('.btn.btn-danger').on('click', function () { _this.prop('disabled', true); self.delete_port(_this.data('router-id'),_this.data('port-id'),_this.data('network-id')); }); diff --git a/openstack_dashboard/static/js/horizon.networktopologycommon.js b/openstack_dashboard/static/js/horizon.networktopologycommon.js index a2722e8fe..417b028dc 100644 --- a/openstack_dashboard/static/js/horizon.networktopologycommon.js +++ b/openstack_dashboard/static/js/horizon.networktopologycommon.js @@ -88,7 +88,7 @@ horizon.networktopologymessager = { // listens for message events angular.element(window).on('message', function(e) { - var message = angular.element.parseJSON(e.originalEvent.data); + var message = JSON.parse(e.originalEvent.data); if (self.previous_message !== message.message) { horizon.toast.add(message.type, message.message); self.previous_message = message.message; diff --git a/openstack_dashboard/templates/500.html b/openstack_dashboard/templates/500.html index 739514297..a63e96ddf 100644 --- a/openstack_dashboard/templates/500.html +++ b/openstack_dashboard/templates/500.html @@ -15,7 +15,7 @@ <!DOCTYPE html> <html> <head> - <meta content='text/html; charset=utf-8' http-equiv='Content-Type' /> + <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <link rel="shortcut icon" href="{% static "dashboard/img/favicon.ico" %}"/> <link rel="apple-touch-icon" sizes="180x180" href="{% static 'dashboard/img/apple-touch-icon.png' %}" /> <link rel="mask-icon" href="{% static 'dashboard/img/safari-pinned-tab.svg' %}" color="#5bbad5" /> diff --git a/openstack_dashboard/templates/_stylesheets.html b/openstack_dashboard/templates/_stylesheets.html index 6de226f93..98e33114b 100644 --- a/openstack_dashboard/templates/_stylesheets.html +++ b/openstack_dashboard/templates/_stylesheets.html @@ -2,8 +2,8 @@ {% load themes %} {% compress css %} -<link href='{{ STATIC_URL }}horizon/lib/bootstrap_datepicker/datepicker3.css' type='text/css' media='screen' rel='stylesheet' /> -<link href='{{ STATIC_URL }}horizon/lib/rickshaw/rickshaw.css' type='text/css' media='screen' rel='stylesheet' /> +<link href="{{ STATIC_URL }}horizon/lib/bootstrap_datepicker/datepicker3.css" type="text/css" media="screen" rel="stylesheet" /> +<link href="{{ STATIC_URL }}horizon/lib/rickshaw/rickshaw.css" type="text/css" media="screen" rel="stylesheet" /> {% endcompress %} diff --git a/openstack_dashboard/templates/angular/angular_templates.html b/openstack_dashboard/templates/angular/angular_templates.html index 9fe6c2827..5155e94cd 100644 --- a/openstack_dashboard/templates/angular/angular_templates.html +++ b/openstack_dashboard/templates/angular/angular_templates.html @@ -1,5 +1,5 @@ {% for static_path, template_html in angular_templates %} - <script type='text/javascript' id='{{ static_path }}'> + <script type="text/javascript" id="{{ static_path }}"> {% include 'angular/angular_templates.js' %} </script> {% endfor %} diff --git a/openstack_dashboard/templates/base.html b/openstack_dashboard/templates/base.html index ddc70ffc9..9851a681a 100644 --- a/openstack_dashboard/templates/base.html +++ b/openstack_dashboard/templates/base.html @@ -7,8 +7,8 @@ <head> {% block custom_analytics %} {% endblock %} - <meta content='IE=edge' http-equiv='X-UA-Compatible' /> - <meta content='text/html; charset=utf-8' http-equiv='Content-Type' /> + <meta content="IE=edge" http-equiv="X-UA-Compatible" /> + <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <meta name="viewport" content="width=device-width, initial-scale=1"> {% block custom_metadata %} {% include "horizon/_custom_meta.html" %} @@ -26,23 +26,23 @@ {% endblock %} {% block ng_route_base %} {% endblock %} </head> - <body id="{% block body_id %}{% endblock %}" ng-app='horizon.app' ng-strict-di> + <body id="{% block body_id %}{% endblock %}" ng-app="horizon.app" ng-strict-di> <noscript> <div class="alert alert-danger text-center javascript-disabled"> {% trans "This application requires JavaScript to be enabled in your web browser." %} </div> </noscript> {% block content %} - <div class='topbar'> + <div class="topbar"> {% include "header/_header.html" %} </div> - <div id='main_content'> + <div id="main_content"> {% include "horizon/_messages.html" %} {% block sidebar %} {% include 'horizon/common/_sidebar.html' %} {% endblock %} - <div id='content_body'> - <div class='container-fluid'> + <div id="content_body"> + <div class="container-fluid"> <div class="row"> <div class="col-xs-12"> <div class="page-breadcrumb"> diff --git a/openstack_dashboard/templates/context_selection/_anti_clickjack.html b/openstack_dashboard/templates/context_selection/_anti_clickjack.html index 62e456830..725a986ea 100644 --- a/openstack_dashboard/templates/context_selection/_anti_clickjack.html +++ b/openstack_dashboard/templates/context_selection/_anti_clickjack.html @@ -1,7 +1,7 @@ {% if disallow_iframe_embed %} <style id="anti-clickjack">body{display:none !important;}</style> - <script type='text/javascript' charset="utf-8"> + <script type="text/javascript" charset="utf-8"> if (self === top) { var antiClickjack = document.getElementById("anti-clickjack"); antiClickjack.parentNode.removeChild(antiClickjack); diff --git a/openstack_dashboard/templates/horizon/_conf.html b/openstack_dashboard/templates/horizon/_conf.html index 631825fb1..233f329f7 100644 --- a/openstack_dashboard/templates/horizon/_conf.html +++ b/openstack_dashboard/templates/horizon/_conf.html @@ -6,12 +6,12 @@ {% comment %} Compress 3rd-party (jquery, angular, etc) and top-level Horizon JS. {% endcomment %} {% compress js %} {% for file in HORIZON_CONFIG.xstatic_lib_files %} - <script src='{{ STATIC_URL }}{{ file }}'></script> + <script src="{{ STATIC_URL }}{{ file }}"></script> {% endfor %} -<script src='{{ STATIC_URL }}horizon/js/horizon.js' type='text/javascript' charset='utf-8'></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.js" type="text/javascript" charset="utf-8"></script> {% endcompress %} -<script type='text/javascript' charset='utf-8'> +<script type="text/javascript" charset="utf-8"> (function (global) { 'use strict'; diff --git a/openstack_dashboard/templates/horizon/_scripts.html b/openstack_dashboard/templates/horizon/_scripts.html index a400a2eab..d857fcd6c 100644 --- a/openstack_dashboard/templates/horizon/_scripts.html +++ b/openstack_dashboard/templates/horizon/_scripts.html @@ -18,44 +18,44 @@ var WEBROOT = "{{ WEBROOT }}"; </script> <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.bootstrap.wizard.js"></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.string.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.lists.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.communication.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.datepickers.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.forms.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.formset_table.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.loader.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.messages.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.modals.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.hacks.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.uuid.js'></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.string.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.lists.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.communication.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.datepickers.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.forms.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.formset_table.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.loader.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.messages.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.modals.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.hacks.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.uuid.js"></script> <script type="text/javascript"> horizon.modals.MODAL_BACKDROP = "{% firstof HORIZON_CONFIG.modal_backdrop 'static' %}"; </script> {% if HORIZON_CONFIG.integration_tests_support %} -<script src='{{ STATIC_URL }}horizon/js/horizon.selenium.js'></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.selenium.js"></script> {% endif %} -<script src='{{ STATIC_URL }}horizon/js/horizon.tables.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.tabs.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.templates.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.users.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.membership.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.d3piechart.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.heattop.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.d3linechart.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.d3barchart.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.sidebar.js'></script> -<script src='{{ STATIC_URL }}horizon/js/horizon.extensible_header.js'></script> -<script src='{{ STATIC_URL }}js/horizon.instances.js'></script> -<script src='{{ STATIC_URL }}js/horizon.quota.js'></script> -<script src='{{ STATIC_URL }}js/horizon.metering.js'></script> -<script src='{{ STATIC_URL }}js/horizon.networktopologycommon.js'></script> -<script src='{{ STATIC_URL }}js/horizon.flatnetworktopology.js'></script> -<script src='{{ STATIC_URL }}js/horizon.networktopology.js'></script> -<script src='{{ STATIC_URL }}js/horizon.volumes.js'></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.tables.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.tabs.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.templates.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.users.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.membership.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.d3piechart.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.heattop.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.d3linechart.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.d3barchart.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.sidebar.js"></script> +<script src="{{ STATIC_URL }}horizon/js/horizon.extensible_header.js"></script> +<script src="{{ STATIC_URL }}js/horizon.instances.js"></script> +<script src="{{ STATIC_URL }}js/horizon.quota.js"></script> +<script src="{{ STATIC_URL }}js/horizon.metering.js"></script> +<script src="{{ STATIC_URL }}js/horizon.networktopologycommon.js"></script> +<script src="{{ STATIC_URL }}js/horizon.flatnetworktopology.js"></script> +<script src="{{ STATIC_URL }}js/horizon.networktopology.js"></script> +<script src="{{ STATIC_URL }}js/horizon.volumes.js"></script> {% for file in HORIZON_CONFIG.js_files %} - <script src='{{ STATIC_URL }}{{ file }}'></script> + <script src="{{ STATIC_URL }}{{ file }}"></script> {% endfor %} {% block custom_js_files %}{% endblock %} @@ -84,7 +84,7 @@ {% comment %}Locale sensitive js needs to be included outisde the "compress" tag{% endcomment %} {% if DATEPICKER_LOCALE and DATEPICKER_LOCALE != 'en' %} -<script src='{{ STATIC_URL }}horizon/lib/bootstrap_datepicker/locales/bootstrap-datepicker.{{ DATEPICKER_LOCALE }}.js'></script> +<script src="{{ STATIC_URL }}horizon/lib/bootstrap_datepicker/locales/bootstrap-datepicker.{{ DATEPICKER_LOCALE }}.js"></script> {% endif %} {% comment %}Go!{% endcomment %} diff --git a/openstack_dashboard/templates/serial_console.html b/openstack_dashboard/templates/serial_console.html index d1434e7b4..491c90b46 100644 --- a/openstack_dashboard/templates/serial_console.html +++ b/openstack_dashboard/templates/serial_console.html @@ -2,25 +2,25 @@ <!DOCTYPE html> <html> <head> - <meta content='IE=edge' http-equiv='X-UA-Compatible' /> - <meta content='text/html; charset=utf-8' http-equiv='Content-Type' /> + <meta content="IE=edge" http-equiv="X-UA-Compatible" /> + <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>{{page_title}}</title> {% load compress %} {% compress css %} <link rel="stylesheet" href="{{ STATIC_URL }}dashboard/scss/serial_console.scss" type="text/scss" media="screen" /> {% endcompress %} <script src="{% url 'horizon:jsi18n' 'horizon' %}"></script> - <script src='{{ STATIC_URL }}horizon/lib/termjs/term.js'></script> + <script src="{{ STATIC_URL }}horizon/lib/termjs/term.js"></script> <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.js"></script> <script src="{{ STATIC_URL }}horizon/lib/angular/angular.js"></script> <script src="{{ STATIC_URL }}js/angular/directives/serialConsole.js"></script> </head> -<body ng-app='serialConsoleApp'> +<body ng-app="serialConsoleApp"> {% if error_message %} {{ error_message }} {% else %} - <serial-console connection='"{{console_url}}"' protocols='{{protocols}}'></serial-console> + <serial-console connection=""{{console_url}}"" protocols="{{protocols}}"></serial-console> {% endif %} </body> diff --git a/openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py b/openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py index 92a292347..274fbb09c 100644 --- a/openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py +++ b/openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py @@ -9,7 +9,11 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. + +import time + import netaddr + from selenium.common import exceptions from selenium.webdriver.common import by @@ -75,8 +79,14 @@ class InstancesPage(basepage.BaseNavigationPage): self._page_title = "Instances" def _get_row_with_instance_name(self, name): - return self.instances_table.get_row(self.INSTANCES_TABLE_NAME_COLUMN, - name) + for attempt in range(4): + row = self.instances_table.get_row( + self.INSTANCES_TABLE_NAME_COLUMN, name) + if row is not None: + return row + else: + time.sleep(0.5) + return None def _get_rows_with_instances_names(self, names): return [ diff --git a/openstack_dashboard/themes/example/templates/base.html b/openstack_dashboard/themes/example/templates/base.html index ee7ab74c8..337fcd256 100644 --- a/openstack_dashboard/themes/example/templates/base.html +++ b/openstack_dashboard/themes/example/templates/base.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block custom_analytics %} - <script src='{{ STATIC_URL }}/themes/example/js/my_analytics_js.js' type='text/javascript' charset='utf-8'></script> + <script src="{{ STATIC_URL }}/themes/example/js/my_analytics_js.js" type="text/javascript" charset="utf-8"></script> {% endblock %} {% block custom_metadata %} @@ -9,7 +9,7 @@ {% endblock %} {% block custom_head_js %} - <script src='{{ STATIC_URL }}/themes/example/js/my_custom_js.js' type='text/javascript' charset='utf-8'></script> + <script src="{{ STATIC_URL }}/themes/example/js/my_custom_js.js" type="text/javascript" charset="utf-8"></script> {% endblock %} {% block footer %} diff --git a/openstack_dashboard/themes/material/templates/header/_header.html b/openstack_dashboard/themes/material/templates/header/_header.html index 07d4bd60d..f60189c1e 100644 --- a/openstack_dashboard/themes/material/templates/header/_header.html +++ b/openstack_dashboard/themes/material/templates/header/_header.html @@ -17,7 +17,7 @@ <span class="md-hamburger-layer md-hamburger-menu"></span> </button> {% theme_dir as theme_dir %} - <script src='{{ STATIC_URL }}{{ theme_dir }}/material/js/material.hamburger.js'></script> + <script src="{{ STATIC_URL }}{{ theme_dir }}/material/js/material.hamburger.js"></script> </div> {% include "header/_brand.html" %} </div> |