aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/system
diff options
context:
space:
mode:
authorSiegfried Ehret <siegfried.ehret@sonarsource.com>2019-07-25 11:47:28 +0200
committerSonarTech <sonartech@sonarsource.com>2019-08-05 20:21:12 +0200
commit1b2ae497dcc8e926906ec09bcecee9088fe44119 (patch)
treebde7eb2c052d6727cbe9dbb5c0b5413987caef0f /server/sonar-web/src/main/js/apps/system
parent09534faa716dc27bdcc9597cbe27cbae672267f5 (diff)
downloadsonarqube-1b2ae497dcc8e926906ec09bcecee9088fe44119.tar.gz
sonarqube-1b2ae497dcc8e926906ec09bcecee9088fe44119.zip
SONAR-12199 Add Copy button to file header and update ClipboardButton
usage
Diffstat (limited to 'server/sonar-web/src/main/js/apps/system')
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageHeader-test.tsx.snap5
2 files changed, 7 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx
index 7f508bb9810..d5e15b0c58d 100644
--- a/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx
+++ b/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import ClipboardButton from 'sonar-ui-common/components/controls/ClipboardButton';
+import { ClipboardButton } from 'sonar-ui-common/components/controls/clipboard';
import { toShortNotSoISOString } from 'sonar-ui-common/helpers/dates';
import { translate } from 'sonar-ui-common/helpers/l10n';
import PageActions from './PageActions';
@@ -79,9 +79,9 @@ export default function PageHeader(props: Props) {
Server ID: ${serverId}
Version: ${version}
Date: ${toShortNotSoISOString(Date.now())}
-`}
- label={translate('system.copy_id_info')}
- />
+`}>
+ {translate('system.copy_id_info')}
+ </ClipboardButton>
</div>
)}
</header>
diff --git a/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageHeader-test.tsx.snap b/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageHeader-test.tsx.snap
index 84f459faba7..b9fce7a55af 100644
--- a/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageHeader-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/system/components/__tests__/__snapshots__/PageHeader-test.tsx.snap
@@ -95,8 +95,9 @@ Server ID: foo-bar
Version: 7.7.0.1234
Date: 2019-01-01
"
- label="system.copy_id_info"
- />
+ >
+ system.copy_id_info
+ </ClipboardButton>
</div>
</header>
`;