katello 4.4.0 → 4.4.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e193a2273fbdeccfaeb286b7a86738e7bbb1bb78120a663e4309aac912ef4501
4
- data.tar.gz: afbec4d28494d215e8b7c318cd403a632d3c8c14ccff79f809cc01f4fc713f3d
3
+ metadata.gz: 2b7c14fb8d3608a0596bbe874028ed8966b14c2d530e8f22dd33253e678e7f7b
4
+ data.tar.gz: 4d762d2ac2cbe0c7362b52901c4fdf671421aae11fe9c3fdf6146b8729221895
5
5
  SHA512:
6
- metadata.gz: da5af110e6327f56eff8c5f72eb1e80936142b534e68d9bdc9f081efa9838f35b0eb03d99e461e59f9c0f2be1a55f7955f2fee6d97b8874f35ce4ba60bb4c1df
7
- data.tar.gz: 6c6db26dac3ffa0ace7837e9774d56d93cba08df34fee0616bde18816a6785e5c54d697768d2f5a39bbd40a67b990462bb9e2e7e2d44cfdd74043221ca820dd6
6
+ metadata.gz: 63470c8748cb2f52087d0e6afb152b3e1d7ac7b0985f755ea662189acf807945fba766f6def46417995b665a914adfcf62d5041bb2ea1381c03031a07d34ac34
7
+ data.tar.gz: 39dfbe4fe023dd34b8f371b2df102ffe8a9318c7f8ee0e67aa37b371c06ac171a8ab73fe6359ca17209209c73e7d083caf91e301b9e3ff040bb68069d48103c0
@@ -12,7 +12,7 @@ class RemoveDuplicateErrata < ActiveRecord::Migration[6.0]
12
12
  #For duplicate errata,
13
13
  # a) update all RepositoryErrata to point to unique errata,
14
14
  # b) if repo-errata association for that combination exists, delete duplicate errata association
15
- # c) Delete all duplicate errata
15
+ # c) Delete all duplicate errata and child records
16
16
  ::Katello::Erratum.group(:errata_id).having("count(errata_id) > 1").pluck(:errata_id).each do |original_errata_id|
17
17
  errata_to_keep = ::Katello::Erratum.find_by(pulp_id: original_errata_id)
18
18
  errata_all = ::Katello::Erratum.where(errata_id: original_errata_id)
@@ -24,7 +24,13 @@ class RemoveDuplicateErrata < ActiveRecord::Migration[6.0]
24
24
  repo_erratum.update(erratum_id: errata_to_keep.id)
25
25
  end
26
26
  end
27
- ::Katello::Erratum.delete(dup_errata&.pluck(:id))
27
+ dup_errata_ids = dup_errata&.pluck(:id)
28
+ if dup_errata_ids&.present?
29
+ ::Katello::ErratumPackage.where(:erratum_id => dup_errata_ids).delete_all
30
+ ::Katello::ErratumBugzilla.where(:erratum_id => dup_errata_ids).delete_all
31
+ ::Katello::ErratumCve.where(:erratum_id => dup_errata_ids).delete_all
32
+ ::Katello::Erratum.where(:id => dup_errata_ids).delete_all
33
+ end
28
34
  end
29
35
  end
30
36
 
@@ -1,3 +1,3 @@
1
1
  module Katello
2
- VERSION = "4.4.0".freeze
2
+ VERSION = "4.4.0.1".freeze
3
3
  end
@@ -1,18 +1,33 @@
1
1
  import React from 'react';
2
2
  import { shape, string, number, element, arrayOf } from 'prop-types';
3
3
  import { Tab, Tabs, TabTitleText } from '@patternfly/react-core';
4
- import { Switch, Route, Redirect, useLocation, withRouter, HashRouter } from 'react-router-dom';
4
+ import { Switch, Route, Redirect, useHistory, useLocation, withRouter, HashRouter } from 'react-router-dom';
5
5
  import { head, last } from 'lodash';
6
6
 
7
7
  const RoutedTabs = ({
8
8
  tabs, defaultTabIndex,
9
9
  }) => {
10
+ const { push } = useHistory();
10
11
  const {
11
12
  hash, key: locationKey,
12
13
  } = useLocation();
13
14
 
14
15
  // The below transforms #/history/6 to history
15
16
  const currentTabFromUrl = head(last(hash.split('#/')).split('/'));
17
+ // Allows navigation back to mainTab
18
+ const onSubTab = currentTabFromUrl !== last(last(hash.split('#/')).split('/'));
19
+
20
+ const onSelect = (e, key) => {
21
+ e.preventDefault();
22
+ // See the below links for understanding of this mouseEvent
23
+ // https://www.w3schools.com/jsref/event_which.asp
24
+ // https://www.w3schools.com/jsref/event_button.asp
25
+ const middleMouseButtonNotUsed = !(e.button === 1 || e.buttons === 4 || e.which === 2);
26
+ const notCurrentTab = currentTabFromUrl !== key;
27
+ if (middleMouseButtonNotUsed && (notCurrentTab || !!onSubTab)) {
28
+ push(`#/${key}`);
29
+ }
30
+ };
16
31
 
17
32
  return (
18
33
  <>
@@ -24,6 +39,7 @@ const RoutedTabs = ({
24
39
  <a
25
40
  key={key}
26
41
  href={`#/${key}`}
42
+ onMouseUp={e => onSelect(e, key)}
27
43
  style={{ textDecoration: 'none' }}
28
44
  >
29
45
  <Tab
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katello
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.0
4
+ version: 4.4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - N/A
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-18 00:00:00.000000000 Z
11
+ date: 2022-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails