You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by is...@apache.org on 2021/07/17 14:04:46 UTC
[airavata-custos-portal] branch master updated: gh-121: Enabling
view/hide and copy option on SSH secret entity fields
This is an automated email from the ASF dual-hosted git repository.
isjarana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-custos-portal.git
The following commit(s) were added to refs/heads/master by this push:
new 1651fcf gh-121: Enabling view/hide and copy option on SSH secret entity fields
new 59d1441 Merge pull request #123 from dinukadesilva/gh-121-enabling-copy-and-view-on-secret-fields
1651fcf is described below
commit 1651fcfd1b123f8e425587e999c34cbe5dfd53a7
Author: Dinuka De Silva <l....@gmail.com>
AuthorDate: Sat Jul 17 06:27:45 2021 -0400
gh-121: Enabling view/hide and copy option on SSH secret entity fields
This fixes #121
---
.../block/entity-view/entity-view-secret.vue | 92 ++++++++++++++++------
1 file changed, 69 insertions(+), 23 deletions(-)
diff --git a/src/lib/components/block/entity-view/entity-view-secret.vue b/src/lib/components/block/entity-view/entity-view-secret.vue
index 7f780d7..a69739e 100644
--- a/src/lib/components/block/entity-view/entity-view-secret.vue
+++ b/src/lib/components/block/entity-view/entity-view-secret.vue
@@ -2,41 +2,84 @@
<div>
<div style="flex: 1;" class="ml-2">
<label class="form-label" for="passphrase">Passphrase</label>
- <b-form-textarea
- v-model="entity.ext.passphrase"
- id="passphrase"
- trim
- size="sm"
- readonly>
- </b-form-textarea>
+ <div style="display: flex; flex-direction: row;">
+ <button-view style="flex: 1;">
+ <template #content-when-hide>
+ <b-form-input
+ v-model="entity.ext.passphrase"
+ type="password"
+ id="clientId"
+ size="sm"
+ readonly>
+ </b-form-input>
+ </template>
+ <template #content-when-view>
+ <b-form-input
+ v-model="entity.ext.passphrase"
+ id="clientId"
+ size="sm"
+ readonly>
+ </b-form-input>
+ </template>
+ </button-view>
+ <button-copy :value="entity.ext.passphrase"/>
+ </div>
<b-form-invalid-feedback>
</b-form-invalid-feedback>
</div>
<div style="flex: 1;" class="ml-2">
<label class="form-label" for="public_key">Public Key</label>
- <b-form-textarea
- v-model="entity.ext.public_key"
- id="public_key"
- trim
- size="sm"
- readonly
- style="min-height: 100px;">
- </b-form-textarea>
+ <div style="display: flex; flex-direction: row;">
+ <button-view style="flex: 1;">
+ <template #content-when-hide>
+ <b-form-input
+ v-model="entity.ext.public_key"
+ type="password"
+ id="public_key"
+ size="sm"
+ readonly>
+ </b-form-input>
+ </template>
+ <template #content-when-view>
+ <b-form-input
+ v-model="entity.ext.public_key"
+ id="public_key"
+ size="sm"
+ readonly>
+ </b-form-input>
+ </template>
+ </button-view>
+ <button-copy :value="entity.ext.public_key"/>
+ </div>
<b-form-invalid-feedback>
</b-form-invalid-feedback>
</div>
<div style="flex: 1;" class="ml-2">
<label class="form-label" for="private_key">Private Key</label>
- <b-form-textarea
- v-model="entity.ext.private_key"
- id="private_key"
- trim
- size="sm"
- readonly
- style="min-height: 300px;">
- </b-form-textarea>
+ <div style="display: flex; flex-direction: row;">
+ <button-view style="flex: 1;">
+ <template #content-when-hide>
+ <b-form-input
+ v-model="entity.ext.private_key"
+ type="password"
+ id="private_key"
+ size="sm"
+ readonly>
+ </b-form-input>
+ </template>
+ <template #content-when-view>
+ <b-form-input
+ v-model="entity.ext.private_key"
+ id="private_key"
+ size="sm"
+ readonly>
+ </b-form-input>
+ </template>
+ </button-view>
+ <button-copy :value="entity.ext.private_key"/>
+ </div>
<b-form-invalid-feedback>
</b-form-invalid-feedback>
</div>
@@ -46,9 +89,12 @@
<script>
import store from "../../../store";
+import ButtonView from "@/lib/components/button/button-view";
+import ButtonCopy from "@/lib/components/button/button-copy";
export default {
name: "entity-view-secret",
+ components: {ButtonView, ButtonCopy},
store: store,
props: {
clientId: {},