-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9367 from avivtur/cnv_8975_enable_online_snapshots
cnv-8975: Enable online VM snapshots in the UI
- Loading branch information
Showing
8 changed files
with
73 additions
and
27 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
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
27 changes: 27 additions & 0 deletions
27
frontend/packages/kubevirt-plugin/src/components/vm-snapshots/VMRunningSnapshotLabel.tsx
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,27 @@ | ||
import * as React from 'react'; | ||
import { Label, Tooltip } from '@patternfly/react-core'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
type VMTemplateLabelProps = { | ||
isOnlineSnapshot: boolean; | ||
className?: string; | ||
}; | ||
|
||
export const VMRunningSnapshotLabel: React.FC<VMTemplateLabelProps> = ({ | ||
isOnlineSnapshot, | ||
className, | ||
}) => { | ||
const { t } = useTranslation(); | ||
|
||
if (!isOnlineSnapshot) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<Tooltip content={t('kubevirt-plugin~This snapshot was created while vm is running')}> | ||
<Label color="green" className={className} isTruncated> | ||
{t('kubevirt-plugin~Online snapshot')} | ||
</Label> | ||
</Tooltip> | ||
); | ||
}; |
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
2 changes: 1 addition & 1 deletion
2
frontend/packages/kubevirt-plugin/src/components/vm-snapshots/utils.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { Kebab } from '@console/internal/components/utils'; | ||
|
||
export const snapshotsTableColumnClasses = ['', '', '', '', '', Kebab.columnClass]; | ||
export const snapshotsTableColumnClasses = ['', '', '', '', '', '', Kebab.columnClass]; |
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