Skip to content
Snippets Groups Projects
  1. Apr 28, 2019
    • Adrian Turjak's avatar
      Correctly set content-type for workflow response · 8516de8f
      Adrian Turjak authored
      The default content-type is html, and under certain
      circumstances like devstack the html has some additional
      comments added. Because this specific content is meant
      to be parsed as json those extra html comments break the
      modal.js code.
      
      We can't set the content-type to json without rewriting parts of
      modal.js, as it will will parse it into an object early and then
      modal.js will fail as it attempts to parse an object into json.
      
      Change-Id: If5a9ee7fe4273dc368dec7767a55d4467bf6a1a7
      Closes-bug: #1824484
      8516de8f
  2. Apr 24, 2019
  3. Apr 22, 2019
    • BubaVV's avatar
      Periodically check item status if it in transition state · ff464426
      BubaVV authored
      Several Angular based dashboards, such as images and snapshots,
      not regenerated after some item on this page changes its status
      from transition state.
      For example, an image may be shown forever in the "Creating" state
      with running progress bar. To improve UI this patch re-upload items
      list until some item in transition state.
      If status of item changed, then 'trackBy' field changed and
      Angular will re-render row with this particular item with
      ng-repeat-start directive and won't re-render all entire page.
      
      Change-Id: I2308baebb65b11180d66bd69d834386022c2ad84
      Closes-bug: #1797592
      ff464426
  4. Apr 05, 2019
    • francotseng's avatar
      Complete angular translation extract pattern · 5de40b3f
      francotseng authored
      Currently AngularGettextHTMLParser parses translations of form
      {$ 'content' | translate $}. However, there is another form in
      projects' html files: {$ ::'content' | translate $}.
      
      This commit fine-tunes the filter_regex and related handle_xxx
      functions to extract both forms of translations.
      
      Change-Id: I7129a13d046b699328b77267ae4936d31af8144c
      5de40b3f
  5. Apr 01, 2019
  6. Mar 20, 2019
  7. Mar 18, 2019
  8. Mar 11, 2019
  9. Mar 02, 2019
  10. Mar 01, 2019
    • David Lyle's avatar
      Fix policy function check error · 78de5478
      David Lyle authored
      Change in I8a346e55bb98e4e22e0c14a614c45d493d20feb4 to make
      POLICY_CHECK_FUNCTION a string rather than a function was incomplete.
      
      The case in horizon/tables/base.py is problematic in particular and results in
      raising the TypeError: 'str' object is not callable error.
      
      There is another instance that is not problematic, but is changed for
      consistency sake.
      
      Change-Id: Ifc616e322eb38ec7e5ac218f7f3c5ccec52e40f4
      Closes-Bug: #1818292
      78de5478
  11. Feb 09, 2019
    • wangliangyu's avatar
      Table checkbox display problem when updating row · 3ac90376
      wangliangyu authored
      Multi-process:
        If there only one table action, DeleteAction.
        Assume the first time retrieving an empty table in one
        process, the checkbox is hidden.
        In the other process, creating a item, like a instance.
        Now, the checkbox is shown in second process.
        Then updating the item state in first process, the checkbox
        will be hidden. In second process, the checkbox will be shown.
      
        For above case, we need set the checkbox visibility every time
        when updating single row by ajax.
      
      Change-Id: Ib230ad775070ee089c8f82e7df3ec30c1cda7aa0
      Closes-Bug: #1799151
      3ac90376
  12. Feb 08, 2019
  13. Jan 31, 2019
    • Michal Arbet's avatar
      Fix osprofiler support in horizon · e531b7ba
      Michal Arbet authored
      This patch is fixing usage of osprofiler in horizon.
      It has been merged once, but after merge to master,
      manage.py compress starts to fail with python2.7.
      
      This fail was caused by "TypeError: 'encoding' is an
      invalid keyword argument for this function" which is
      now fixed by using six library.
      
      Change-Id: I21aa8d49833bef9e7673958d15674faec82a0925
      Closes-Bug: #1814028
      Related-Bug: #1811261
      e531b7ba
    • Akihiro Motoki's avatar
      UT: Detect template rendering errors · 28b457bc
      Akihiro Motoki authored
      This commit enables template debug option to detect errors
      in template rendering in unit tests.
      
      Several errors in template rendering are found by enabling the
      debug option and they are fixed in this commit.
      
      Related-Bug: #1809983
      Change-Id: I1a2d19f2eae62e16f02d3386abd65527bac4e7a0
      28b457bc
    • Akihiro Motoki's avatar
      Revert "Fix osprofiler support in horizon" · 508818d9
      Akihiro Motoki authored
      This reverts commit 96aded3c.
      
      The reverted commit breaks "manage.py compress" in python 2.7 env.
      python 2.7 support is more important than osprofiler support,
      so we revert this once and then tackle the original osprofiler issue.
      
      Change-Id: Iff497a96fd62b447906a0c58fdcd6ce717d6fabe
      Related-Bug: #1814028
      Related-Bug: #1811261
      508818d9
  14. Jan 30, 2019
    • Akihiro Motoki's avatar
      Fix gate failures by a new pycodestyle · b06657b0
      Akihiro Motoki authored
      pycodestyle 2.5.0 introduces E117 over-indented.
      This commit fixes E117 errors.
      
      pycodestyle 2.5.0 also drops pep8.py. As a result,
      horizon/test/unit/hacking/test_checks.py starts to fail.
      The equivalent elements are provided by pycodestyle.py,
      so we can consume pycodestyle instead of pep8 module.
      
      Change-Id: Ib103998f42ce7c901a10669b771a898783ca1a92
      b06657b0
  15. Jan 21, 2019
  16. Jan 16, 2019
    • Akihiro Motoki's avatar
      pylint: fix unexpected-keyword-arg error · 9518f7a5
      Akihiro Motoki authored
      horizon/forms/fields.py:
      ThemableCheckboxSelectMultiple.__init__ does not have
      arguments "name" and "value". They were specified before somehow.
      
      openstack_dashboard/dashboards/project/instances/forms.py:
      messages.error() does not have "redirect" argument.
      We need to redirect explicitly.
      
      Change-Id: Ib51abf136fb49e3be65005c5f48715f004379178
      9518f7a5
    • Akihiro Motoki's avatar
      pylint: Ignore existing misplaced-bare-raise error · 0d39a5c3
      Akihiro Motoki authored
      Change-Id: I8bb2b64cb51f297cac53bf042d4d2bd1fdb0a159
      0d39a5c3
    • Akihiro Motoki's avatar
      pylint: fix some refactor recommendations · 7c585e26
      Akihiro Motoki authored
      openstack_dashboard/dashboards/project/security_groups/forms.py:393:13: R1714: Consider merging these comparisons with "in" to "rule_menu in ('tcp', 'udp')" (consider-using-in)
      openstack_dashboard/api/rest/json_encoder.py:61:15: R0124: Redundant comparison - o != o (comparison-with-itself)
      openstack_dashboard/api/keystone.py:904:15: R1714: Consider merging these comparisons with "in" to 'default in (role.id, role.name)' (consider-using-in)
      horizon/templatetags/truncate_filter.py:30:7: R1716: Simplify chained comparison between the operands (chained-comparison)
      
      Change-Id: I6cf8602f88c4027ff12aaa4ea5a9f2069ae2e2a6
      7c585e26
    • Akihiro Motoki's avatar
      pylint: fix too-many-nested-blocks/redefined-argument-from-local · 95789496
      Akihiro Motoki authored
      openstack_dashboard/dashboards/project/cgroups/workflows.py:313:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
      openstack_auth/plugin/base.py:221:12: R1704: Redefining argument with the local name 'domain_name' (redefined-argument-from-local)
      horizon/tables/formset.py:59:16: R1704: Redefining argument with the local name 'column' (redefined-argument-from-local)
      
      Change-Id: Ifeb192efac83c0b2d5399c51f66c8fb8f8969fc0
      95789496
    • Akihiro Motoki's avatar
      pylint: fix several coding convention violations · ac7ac272
      Akihiro Motoki authored
      openstack_dashboard/context_processors.py:94:15: C0122: Comparison should be link['url'] != 'horizon:project:api_access:openrcv2' (misplaced-comparison-constant)
      openstack_dashboard/settings.py:467:4: C0412: Imports from package horizon are not grouped (ungrouped-imports)
      openstack_dashboard/enabled/_1370_project_vg_snapshots.py:9:0: C0301: Line too long (86/80) (line-too-long)
      openstack_dashboard/enabled/_1360_project_volume_groups.py:9:0: C0301: Line too long (85/80) (line-too-long)
      openstack_dashboard/usage/base.py:62:8: W0106: Expression "[instance_list.extend(u.server_usages) for u in self.usage_list]" is assigned to nothing (expression-not-assigned)
      openstack_dashboard/dashboards/project/images/utils.py:43:12: W0106: Expression "[public_images.append(image) for image in images]" is assigned to nothing (expression-not-assigned)
      openstack_dashboard/dashboards/project/images/utils.py:75:12: W0106: Expression "[community_images.append(image) for image in images]" is assigned to nothing (expression-not-assigned)
      openstack_dashboard/api/glance.py:47:4: C0412: Imports from package glanceclient are not grouped (ungrouped-imports)
      openstack_dashboard/api/cinder.py:60:4: C0412: Imports from package cinderclient are not grouped (ungrouped-imports)
      openstack_auth/user.py:358:4: E0211: Method has no argument (no-method-argument)
      openstack_auth/user.py:362:4: E0211: Method has no argument (no-method-argument)
      openstack_dashboard/api/keystone.py:75:4: C0412: Imports from package keystoneclient are not grouped (ungrouped-imports)
      horizon/loaders.py:43:16: W0706: The except handler raises immediately (try-except-raise)
      horizon/themes.py:174:8: W0706: The except handler raises immediately (try-except-raise)
      
      Change-Id: I40cf3ffbc4519657e11180d2e2fe7401387c5556
      ac7ac272
    • Akihiro Motoki's avatar
      pylint: fix bad-mcs-classmethod-argument warning · 4dd8e3d4
      Akihiro Motoki authored
      Change-Id: Idfa421774ac23f673007fe7a7381c5199ccda5e0
      4dd8e3d4
    • Akihiro Motoki's avatar
      pylint: fix unnecessary-pass warning · f6e1338c
      Akihiro Motoki authored
      Change-Id: Ie2e5c6482a19553f6c73c50555d65834bb62ca9e
      f6e1338c
    • Akihiro Motoki's avatar
      pylint: fix simplifiable-if-statement/expression · a8edb505
      Akihiro Motoki authored
      Change-Id: I9af66f886c47d3d2be61cba22b6c84460a178b8e
      a8edb505
    • Akihiro Motoki's avatar
      pylint: fix trailing-comma-tuple warning · 786fb183
      Akihiro Motoki authored
      Change-Id: I72fa6cacef70e80f95b76e2aa3cefbffad73edb5
      786fb183
    • Akihiro Motoki's avatar
      pylint: fix len-as-condition warning · c076db20
      Akihiro Motoki authored
      Change-Id: Ib89c1854ad42b96e4caf281160d568fe98430afe
      c076db20
  17. Jan 15, 2019
    • Akihiro Motoki's avatar
      pylint: fixes several errors · 6ce32330
      Akihiro Motoki authored
      openstack_dashboard/hooks.py:16:0: E0611: No name 'command' in module 'distutils' (no-name-in-module)
      
      openstack_dashboard/dashboards/project/networks/ports/sg_base.py:52:12: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)
      BaseSecurityGroupsAction._get_initial_security_groups() is now marked
      as abstract method because this method must be implemented in subclasses.
      BaseSecurityGroupsAction.handle() is now dropped because there is
      no difference from the parent class (horizon.workflows.Action).
      
      openstack_auth/views.py:211:4: E1206: Not enough arguments for logging format string (logging-too-few-args)
      openstack_auth/views.py:269:8: E1206: Not enough arguments for logging format string (logging-too-few-args)
      openstack_auth/plugin/base.py:237:20: E1206: Not enough arguments for logging format string (logging-too-few-args)
      
      horizon/base.py:166:24: E1133: Non-iterable value self.policy_rules is used in an iterating context (not-an-iterable)
      horizon/tabs/base.py:489:40: E1133: Non-iterable value self.table_classes is used in an iterating context (not-an-iterable)
      
      Change-Id: I0b045d04af251854b5017c9f698e3b40503a0724
      6ce32330
  18. Jan 14, 2019
    • Akihiro Motoki's avatar
      pylint: fix bad-super-call · f3bd271f
      Akihiro Motoki authored
      Change-Id: Ia81e5c8b77dbfcb48630b1736d581cdff73278ef
      f3bd271f
    • Akihiro Motoki's avatar
      pylint: Drop non-existing IPAddressField · 51251d9d
      Akihiro Motoki authored
      horizon/forms/__init__.py exposed IPAddressField via __all__,
      but IPAddressField does not exist in Django code.
      It addresses pylint undefined-all-variable error.
      
      Change-Id: I5e5cc802c0d75e91fad769cc381368b532561476
      51251d9d
    • Akihiro Motoki's avatar
      pylint: ignore access-member-before-definition explicitly · 86d1826a
      Akihiro Motoki authored
      In case of Cell.status property, the code has a good readability,
      so it sounds reasonable to ignore access-member-before-definition,
      although access-member-before-definition itself is a useful check.
      
      Change-Id: Ic6f2ec42bac41c62265e6b0e744c256007093ce6
      86d1826a
    • Akihiro Motoki's avatar
      pylint: fix several warnings · 6e1348d0
      Akihiro Motoki authored
      openstack_dashboard/theme_settings.py:63:8: W1201: Specify string format arguments as logging function parameters (logging-not-lazy)
      openstack_dashboard/settings.py:412:24: W0122: Use of exec (exec-used)
      openstack_dashboard/dashboards/identity/domains/workflows.py:476:44: W0640: Cell variable group_id defined in loop (cell-var-from-loop)
      openstack_dashboard/dashboards/identity/projects/workflows.py:906:49: W0640: Cell variable group_id defined in loop (cell-var-from-loop)
      openstack_dashboard/dashboards/admin/networks/views.py:42:0: W0404: Reimport 'views' (imported line 28) (reimported)
      openstack_dashboard/api/swift.py:204:0: W0102: Dangerous default value {} as argument (dangerous-default-value)
      openstack_dashboard/api/swift.py:214:0: W0102: Dangerous default value {} as argument (dangerous-default-value)
      openstack_dashboard/api/cinder.py:248:30: W0631: Using possibly undefined loop variable 'cinder_url' (undefined-loop-variable)
      openstack_auth/backend.py:123:28: W0631: Using possibly undefined loop variable 'plugin' (undefined-loop-variable)
      openstack_auth/backend.py:129:39: W0631: Using possibly undefined loop variable 'plugin' (undefined-loop-variable)
      openstack_auth/backend.py:131:39: W0631: Using possibly undefined loop variable 'plugin' (undefined-loop-variable)
      openstack_auth/views.py:39:0: W0611: Unused Login imported from openstack_auth.forms (unused-import)
      horizon/exceptions.py:348:8: W0125: Using a conditional statement with a constant value (using-constant-test)
      horizon/tables/base.py:353:12: W0715: Exception arguments suggest string formatting might be intended (raising-format-tuple)
      
      Change-Id: Icf4f22abda77c9dbf98c780de876b7836c31d669
      6e1348d0
  19. Jan 12, 2019
  20. Jan 11, 2019
    • pengyuesheng's avatar
      The name is too long and will exceed the page range · 643021a9
      pengyuesheng authored
      in delete the image page. If the image name is too long,
      it will exceed the page range.
      Of the deletion is successful,
      the prompt information will be out of scope.
      
      Change-Id: I629eeee0a54172120f07392dfd39bcd105e2d017
      643021a9
  21. Jan 09, 2019
  22. Jan 07, 2019
    • Sam Wright's avatar
      SG creation user taken straight to edit rules · 90aa4b2b
      Sam Wright authored
      When the user creates a security group they are taken straight to
      manage security group and can select and make changes to rules.
      
      Change-Id: I2b3422e7816fabf59aca87a76f19cba96f01bddc
      closes-bug: #1292084
      90aa4b2b
    • pengyuesheng's avatar
      the name needs to be word wrap · 3d899d90
      pengyuesheng authored
      if the name is too long,
      it will affect the display.
      
      Change-Id: Ib1e35d32b0b3f82a0f949d94a2f4c8bcfd4eff41
      Closes-Bug: #1801862
      3d899d90
  23. Jan 06, 2019
  24. Jan 03, 2019
Loading