-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move deployment information from basic information block.
- Loading branch information
Showing
14 changed files
with
492 additions
and
38 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,32 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* SPDX-FileCopyrightText: Huawei Inc. | ||
*/ | ||
|
||
import { Button, Popover } from 'antd'; | ||
import React from 'react'; | ||
import YAML from 'yaml'; | ||
import oclDisplayStyles from '../../../../styles/ocl-display.module.css'; | ||
import { Deployment } from '../../../../xpanse-api/generated'; | ||
|
||
export function DeploymentScriptText({ deployment }: { deployment: Deployment }): React.JSX.Element { | ||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
if (deployment) { | ||
const yamlDocument = new YAML.Document(); | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-expect-error | ||
yamlDocument.contents = deployment.deployer; | ||
return ( | ||
<Popover | ||
content={<pre className={oclDisplayStyles.oclDeploymentScript}>{yamlDocument.toString()}</pre>} | ||
title={'Deployment Script'} | ||
trigger='hover' | ||
> | ||
<Button className={oclDisplayStyles.oclDataHover} type={'link'}> | ||
{'scripts'} | ||
</Button> | ||
</Popover> | ||
); | ||
} | ||
return <></>; | ||
} |
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
Oops, something went wrong.