-
Notifications
You must be signed in to change notification settings - Fork 613
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efd2324
commit 397eaaa
Showing
11 changed files
with
177 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { K8sKind } from '@console/internal/module/k8s'; | ||
|
||
export const FooBarModel: K8sKind = { | ||
apiGroup: 'test.io', | ||
apiVersion: 'v1alpha1', | ||
kind: 'FooBar', | ||
label: 'Foo Bar', | ||
labelPlural: 'Foo Bars', | ||
path: 'foobars', | ||
plural: 'foobars', | ||
abbr: 'FOOBAR', | ||
namespaced: true, | ||
id: 'foobar', | ||
crd: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
frontend/packages/console-plugin-sdk/src/typings/models.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Extension } from '.'; | ||
import { K8sKind } from '@console/internal/module/k8s'; | ||
|
||
namespace ExtensionProperties { | ||
export interface ModelDefinition { | ||
models: K8sKind[]; | ||
} | ||
} | ||
|
||
export interface ModelDefinition extends Extension<ExtensionProperties.ModelDefinition> { | ||
type: 'ModelDefinition'; | ||
} | ||
|
||
export function isModelDefinition(e: Extension<any>): e is ModelDefinition { | ||
return e.type === 'ModelDefinition'; | ||
} |
Oops, something went wrong.