Skip to content

Commit

Permalink
Merge pull request #3478 from dtaylor113/report-model-api-v1
Browse files Browse the repository at this point in the history
Bug 1772694: default template for metering report for editor should use v1
  • Loading branch information
openshift-merge-robot committed Nov 23, 2019
2 parents 9d2692f + a5778ad commit 42ba816
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions frontend/public/components/chargeback.tsx
Expand Up @@ -8,7 +8,7 @@ import { FLAGS } from '../const';
import { Conditions } from './conditions';
import { DetailsPage, ListPage, Table, TableRow, TableData } from './factory';
import { coFetchJSON } from '../co-fetch';
import { ChargebackReportModel } from '../models';
import { ChargebackReportModel, ReportQueryModel } from '../models';
import { LoadError, LoadingInline, MsgBox } from './utils/status-box';
import { GroupVersionKind, K8sResourceKind, modelFor, referenceForModel } from '../module/k8s';
import {
Expand All @@ -27,8 +27,7 @@ import {

export const ReportReference: GroupVersionKind = referenceForModel(ChargebackReportModel);
export const ScheduledReportReference: GroupVersionKind = 'metering.openshift.io~ScheduledReport';
export const ReportGenerationQueryReference: GroupVersionKind =
'metering.openshift.io~v1alpha1~ReportQuery';
export const ReportGenerationQueryReference: GroupVersionKind = referenceForModel(ReportQueryModel);

const reportPages = [
{ name: 'All Reports', href: ReportReference },
Expand Down
4 changes: 2 additions & 2 deletions frontend/public/models/index.ts
Expand Up @@ -44,7 +44,7 @@ export const ChargebackReportModel: K8sKind = {
label: 'Report',
labelPlural: 'Reports',
apiGroup: 'metering.openshift.io',
apiVersion: 'v1alpha1',
apiVersion: 'v1',
crd: true,
plural: 'reports',
abbr: 'R',
Expand All @@ -58,7 +58,7 @@ export const ReportQueryModel: K8sKind = {
apiGroup: 'metering.openshift.io',
apiVersion: 'v1',
crd: true,
plural: 'report queries',
plural: 'reportqueries',
abbr: 'RQ',
namespaced: true,
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/models/yaml-templates.ts
Expand Up @@ -194,7 +194,7 @@ spec:
.setIn(
[referenceForModel(k8sModels.ChargebackReportModel), 'default'],
`
apiVersion: metering.openshift.io/v1alpha1
apiVersion: metering.openshift.io/v1
kind: Report
metadata:
name: namespace-memory-request
Expand Down

0 comments on commit 42ba816

Please sign in to comment.