Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/stage-stable' into prod-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
dlabrecq committed Aug 26, 2021
2 parents f261eb7 + 9bbdaed commit ab2d494
Show file tree
Hide file tree
Showing 64 changed files with 465 additions and 159 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@
"no-eval": "error",
"no-new-wrappers": "error",
"no-prototype-builtins": "off",
"no-restricted-imports": ["error", {
"patterns": ["../*/**"]
}],
"no-shadow": "error",
"no-throw-literal": "error",
"no-trailing-spaces": "off",
Expand Down
5 changes: 3 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ module.exports = {
clearMocks: true,
timers: 'fake',
transform: {
'^.+\\.(ts|tsx)$': '<rootDir>/test/transformTS.js',
'^.+\\.[jt]sx?$': '<rootDir>/test/transformTS.js',
'^.+\\.(jpg)$': '<rootDir>/test/transformFile.js',
},
transformIgnorePatterns: ['node_modules/(?!@patternfly/react-icons/dist/esm)'],
setupFiles: ['./test/test.env.ts'],
testRegex: '\\.test\\.(jsx?|tsx?)$',
moduleFileExtensions: ['ts', 'tsx', 'js'],
moduleDirectories: ['node_modules', '<rootDir>/src'],
moduleNameMapper: {
'\\.(css|less|sass|scss)$': '<rootDir>/test/styleMock.js',
},
roots: ['<rootDir>/src'],
snapshotSerializers: ['enzyme-to-json/serializer'],
testPathIgnorePatterns: ['<rootDir>/archive/'],
testURL: 'http://localhost/',
};
13 changes: 13 additions & 0 deletions koku-ui-manifest
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,25 @@ mgmt_services/cost-mgmt:koku-ui/@formatjs/cli:4.2.12.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/ecma402-abstract:1.7.1.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/ecma402-abstract:1.8.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/ecma402-abstract:1.9.6.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/ecma402-abstract:1.9.7.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/fast-memoize:1.1.1.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/fast-memoize:1.2.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/icu-messageformat-parser:2.0.1.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/icu-messageformat-parser:2.0.10.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/icu-messageformat-parser:2.0.2.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/icu-messageformat-parser:2.0.9.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/icu-skeleton-parser:1.2.10.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/icu-skeleton-parser:1.2.11.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/icu-skeleton-parser:1.2.2.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/icu-skeleton-parser:1.2.3.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/intl-displaynames:5.1.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/intl-displaynames:5.2.2.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/intl-listformat:6.1.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/intl-listformat:6.3.2.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/intl-localematcher:0.2.19.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/intl-localematcher:0.2.20.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/intl:1.10.8.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/intl:1.14.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/ts-transformer:3.3.12.yarnlock
mgmt_services/cost-mgmt:koku-ui/@formatjs/ts-transformer:3.4.7.yarnlock
mgmt_services/cost-mgmt:koku-ui/@fortawesome/fontawesome-common-types:0.2.35.yarnlock
Expand Down Expand Up @@ -127,6 +135,7 @@ mgmt_services/cost-mgmt:koku-ui/@patternfly/react-tokens:4.12.9.yarnlock
mgmt_services/cost-mgmt:koku-ui/@popperjs/core:2.9.2.yarnlock
mgmt_services/cost-mgmt:koku-ui/@redhat-cloud-services/frontend-components-config-utilities:1.4.6.yarnlock
mgmt_services/cost-mgmt:koku-ui/@redhat-cloud-services/frontend-components-notifications:3.2.2.yarnlock
mgmt_services/cost-mgmt:koku-ui/@redhat-cloud-services/frontend-components-translations:3.2.2.yarnlock
mgmt_services/cost-mgmt:koku-ui/@redhat-cloud-services/frontend-components-utilities:3.2.3.yarnlock
mgmt_services/cost-mgmt:koku-ui/@redhat-cloud-services/frontend-components-utilities:3.2.3.yarnlock
mgmt_services/cost-mgmt:koku-ui/@redhat-cloud-services/frontend-components-utilities:3.2.3.yarnlock
Expand Down Expand Up @@ -210,6 +219,7 @@ mgmt_services/cost-mgmt:koku-ui/@types/react-transition-group:4.4.2.yarnlock
mgmt_services/cost-mgmt:koku-ui/@types/react:17.0.14.yarnlock
mgmt_services/cost-mgmt:koku-ui/@types/react:17.0.14.yarnlock
mgmt_services/cost-mgmt:koku-ui/@types/react:17.0.14.yarnlock
mgmt_services/cost-mgmt:koku-ui/@types/react:17.0.18.yarnlock
mgmt_services/cost-mgmt:koku-ui/@types/react:17.0.2.yarnlock
mgmt_services/cost-mgmt:koku-ui/@types/scheduler:0.16.2.yarnlock
mgmt_services/cost-mgmt:koku-ui/@types/source-list-map:0.1.2.yarnlock
Expand Down Expand Up @@ -444,6 +454,7 @@ mgmt_services/cost-mgmt:koku-ui/commander:8.0.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/commander:2.20.3.yarnlock
mgmt_services/cost-mgmt:koku-ui/commander:2.20.3.yarnlock
mgmt_services/cost-mgmt:koku-ui/commander:4.1.1.yarnlock
mgmt_services/cost-mgmt:koku-ui/commander:8.1.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/comment-parser:1.1.6-beta.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/component-emitter:1.3.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/compressible:2.0.18.yarnlock
Expand Down Expand Up @@ -844,6 +855,7 @@ mgmt_services/cost-mgmt:koku-ui/internal-ip:4.3.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/internal-slot:1.0.3.yarnlock
mgmt_services/cost-mgmt:koku-ui/interpret:2.2.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/intl-messageformat:9.6.14.yarnlock
mgmt_services/cost-mgmt:koku-ui/intl-messageformat:9.9.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/invariant:2.2.4.yarnlock
mgmt_services/cost-mgmt:koku-ui/ip-regex:2.1.0.yarnlock
mgmt_services/cost-mgmt:koku-ui/ip:1.1.5.yarnlock
Expand Down Expand Up @@ -1282,6 +1294,7 @@ mgmt_services/cost-mgmt:koku-ui/react-fast-compare:2.0.4.yarnlock
mgmt_services/cost-mgmt:koku-ui/react-i18next:11.11.3.yarnlock
mgmt_services/cost-mgmt:koku-ui/react-i18next:11.8.15.yarnlock
mgmt_services/cost-mgmt:koku-ui/react-intl:5.17.7.yarnlock
mgmt_services/cost-mgmt:koku-ui/react-intl:5.20.9.yarnlock
mgmt_services/cost-mgmt:koku-ui/react-is:16.13.1.yarnlock
mgmt_services/cost-mgmt:koku-ui/react-is:16.13.1.yarnlock
mgmt_services/cost-mgmt:koku-ui/react-is:16.13.1.yarnlock
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"start": "node scripts/start-dev-server.js",
"start:dev": "NODE_OPTIONS=--max-old-space-size=8192 webpack serve -c ./webpack.config.js",
"stats": "yarn build:client --profile --json > stats.json",
"test": "jest",
"test": "jest --clearCache && jest",
"manifest:update": "node scripts/createManifest",
"codemods:test": "yarn pf-codemods ./src",
"container:test": "docker stop -t 0 koku-ui-test >/dev/null; docker build -t koku-ui-test . && docker run -i --rm -p 8080:8080 --name koku-ui-test koku-ui-test",
Expand All @@ -41,6 +41,7 @@
"@patternfly/react-tokens": "^4.12.9",
"@redhat-cloud-services/frontend-components": "^3.3.8",
"@redhat-cloud-services/frontend-components-notifications": "^3.2.2",
"@redhat-cloud-services/frontend-components-translations": "^3.2.2",
"@redhat-cloud-services/frontend-components-utilities": "^3.2.3",
"@redhat-cloud-services/rbac-client": "^1.0.100",
"@types/date-fns": "2.6.0",
Expand All @@ -67,6 +68,7 @@
"react-bootstrap": "1.5.0",
"react-dom": "17.0.1",
"react-i18next": "11.8.15",
"react-intl": "5.17.7",
"react-redux": "7.2.2",
"react-router-dom": "5.2.0",
"redux": "4.0.5",
Expand All @@ -88,6 +90,7 @@
"@xstate/test": "0.4.2",
"@yarnpkg/lockfile": "1.1.0",
"aphrodite": "2.4.0",
"commander": "^8.1.0",
"copy-webpack-plugin": "7.0.0",
"css-loader": "6.2.0",
"enzyme": "3.11.0",
Expand Down Expand Up @@ -116,7 +119,6 @@
"nodesi": "^1.16.0",
"null-loader": "4.0.1",
"prettier": "2.3.2",
"react-intl": "5.17.7",
"rimraf": "^3.0.2",
"sass": "^1.32.7",
"sass-loader": "^11.0.1",
Expand Down
79 changes: 0 additions & 79 deletions scripts/rebase-branch.sh

This file was deleted.

108 changes: 108 additions & 0 deletions scripts/release-branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#!/bin/sh

default()
{
PATH=/usr/bin:/usr/sbin:${PATH}
export PATH

SCRIPT=`basename $0`
SCRIPT_DIR=`dirname $0`
SCRIPT_DIR=`cd $SCRIPT_DIR; pwd`

MAIN_BRANCH="master"
PROD_BETA_BRANCH="prod-beta"
PROD_STABLE_BRANCH="prod-stable"
STAGE_STABLE_BRANCH="stage-stable"

KOKU_UI_REPO="[email protected]:project-koku/koku-ui.git"

TMP_DIR="/tmp/$SCRIPT.$$"
KOKU_UI_DIR="$TMP_DIR/koku-ui"
}

usage()
{
cat <<- EEOOFF
This script will release the selected branch by merging the following branches
stage-stage is merged from stage-beta
prod-beta is merged from stage-stable
prod-stable is merged from prod-beta
sh [-x] $SCRIPT [-h] -<b|p|s>
OPTIONS:
h Display this message
b Prod beta
p Prod stable
s Stage stable
EEOOFF
}

clone()
{
mkdir $TMP_DIR
cd $TMP_DIR

git clone $KOKU_UI_REPO
}


merge()
{
cd $KOKU_UI_DIR

git checkout $BRANCH

git fetch origin $REMOTE_BRANCH
git merge origin/$REMOTE_BRANCH --commit --no-edit
}

push()
{
read -p "You are pushing to the $BRANCH branch. Continue?" YN

case $YN in
[Yy]* ) git push -u origin $BRANCH;;
[Nn]* ) exit 0;;
* ) echo "Please answer yes or no."; push;;
esac
}

# main()
{
default

while getopts hbps c; do
case $c in
b) BRANCH=$PROD_BETA_BRANCH
REMOTE_BRANCH=$STAGE_STABLE_BRANCH;;
p) BRANCH=$PROD_STABLE_BRANCH
REMOTE_BRANCH=$PROD_BETA_BRANCH;;
s) BRANCH=$STAGE_STABLE_BRANCH
REMOTE_BRANCH=$MAIN_BRANCH;;
h) usage; exit 0;;
\?) usage; exit 1;;
esac
done

if [ -z "$BRANCH" ]; then
usage
exit 1
fi

echo "\nMerging $BRANCH from $REMOTE_BRANCH\n"

clone
merge

if [ "$?" -eq 0 ]; then
push
else
echo "Cannot not push. No changes or check for conflicts"
fi

rm -rf $TMP_DIR
}
6 changes: 6 additions & 0 deletions src/api/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export interface ProviderCostModel {
uuid: string;
}

export interface ProviderInfrastructure {
type?: string;
uuid?: string;
}

export interface Provider {
active?: boolean;
authentication?: ProviderAuthentication;
Expand All @@ -40,6 +45,7 @@ export interface Provider {
current_month_data?: boolean;
customer?: ProviderCustomer;
has_data?: boolean;
infrastructure?: ProviderInfrastructure;
name?: string;
previous_month_data?: boolean;
type?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/components/state/emptyFilterState/emptyFilterState.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EmptyState, EmptyStateBody, EmptyStateIcon, Title, TitleSizes } from '@patternfly/react-core';
import { SearchIcon } from '@patternfly/react-icons/dist/js/icons/search-icon';
import { SearchIcon } from '@patternfly/react-icons/dist/esm/icons/search-icon';
import { OcpCloudQuery, parseQuery } from 'api/queries/ocpCloudQuery';
import React from 'react';
import { WithTranslation, withTranslation } from 'react-i18next';
Expand Down
2 changes: 1 addition & 1 deletion src/components/state/emptyValueState/emptyValueState.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './emptyValueState.scss';

import { MinusIcon } from '@patternfly/react-icons/dist/js/icons/minus-icon';
import { MinusIcon } from '@patternfly/react-icons/dist/esm/icons/minus-icon';
import React from 'react';

export const EmptyValueState: React.SFC = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/state/errorState/errorState.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateVariant, Title } from '@patternfly/react-core';
import { ErrorCircleOIcon } from '@patternfly/react-icons/dist/js/icons/error-circle-o-icon';
import { LockIcon } from '@patternfly/react-icons/dist/js/icons/lock-icon';
import { ErrorCircleOIcon } from '@patternfly/react-icons/dist/esm/icons/error-circle-o-icon';
import { LockIcon } from '@patternfly/react-icons/dist/esm/icons/lock-icon';
import { AxiosError } from 'axios';
import React from 'react';
import { WithTranslation, withTranslation } from 'react-i18next';
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@
"ibm": "IBM Cloud",
"label": "Perspective",
"ocp_all": "All OpenShift",
"ocp_ocp": "All cloud filtered by OpenShift"
"ocp_cloud": "All cloud filtered by OpenShift"
}
},
"page_cost_models": {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/costModels/components/errorState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Title,
TitleSizes,
} from '@patternfly/react-core';
import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
import global_DangerColor_100 from '@patternfly/react-tokens/dist/js/global_danger_color_100';
import React from 'react';
import { Trans, useTranslation } from 'react-i18next';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/costModels/components/inputs/rateInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
TextInput,
TextInputProps,
} from '@patternfly/react-core';
import { DollarSignIcon } from '@patternfly/react-icons/dist/js/icons/dollar-sign-icon';
import { DollarSignIcon } from '@patternfly/react-icons/dist/esm/icons/dollar-sign-icon';
import React from 'react';
import { useTranslation } from 'react-i18next';

Expand Down
Loading

0 comments on commit ab2d494

Please sign in to comment.