Skip to content

Commit 122568b

Browse files
Merge pull request #71 from oracle/regenerate-encryption-value
adding button to regenerate the runtime encryption secret value
2 parents d900078 + 24ab03c commit 122568b

File tree

9 files changed

+50
-27
lines changed

9 files changed

+50
-27
lines changed

electron/app/locales/en/webui.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"copyright-footer-text": "Copyright (c) 2021, {{currentYear}}, Oracle and/or its affiliates. Licensed under The Universal Permissive License (UPL), Version 1.0, as shown at",
3+
24
"nav-model": "Model",
35
"nav-project-settings": "Project Settings",
46
"nav-image": "Image",
@@ -551,6 +553,7 @@
551553
"domain-design-encryption-secret-help": "The name of the Kubernetes secret which holds the password used to encrypt the domain.",
552554
"domain-design-encryption-value-label": "Runtime Encryption Secret Value",
553555
"domain-design-encryption-value-help": "The password used to encrypt the domain.",
556+
"domain-design-regenerate-encryption-value-label": "Regenerate Runtime Encryption Secret Value",
554557
"domain-design-introspection-title": "WebLogic Kubernetes Operator Introspection Configuration",
555558
"domain-design-introspector-job-active-deadline-label": "Introspection Job Active Deadline Seconds",
556559
"domain-design-introspector-job-active-deadline-help": "The WebLogic Kubernetes Operator introspection job timeout value, measured in seconds. The default value is 120 seconds, if not specified",

electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"productName": "WebLogic Kubernetes Toolkit UI",
44
"version": "1.1.0",
55
"description": "WebLogic Kubernetes Toolkit UI",
6-
"copyright": "Copyright (c) 2021, Oracle and/or its affiliates.",
6+
"copyright": "Copyright (c) 2021, 2022, Oracle and/or its affiliates.",
77
"homepage": "https://github.com/oracle/weblogic-toolkit-ui",
88
"main": "app/main.js",
99
"scripts": {

webui/package-lock.json

Lines changed: 23 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webui/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"private": true,
3+
"copyright": "Copyright (c) 2021, 2022, Oracle and/or its affiliates.",
34
"scripts": {
45
"test": "mocha --timeout 10000 --reporter spec src/test/*-test.js",
56
"start": "ojet serve web --server-only",
@@ -8,7 +9,7 @@
89
"jet-audit": "ojaf"
910
},
1011
"dependencies": {
11-
"@oracle/oraclejet": "^11.1.4",
12+
"@oracle/oraclejet": "^11.1.5",
1213
"i18next": "^21.6.3",
1314
"jquery": "^3.6.0",
1415
"js-yaml": "^4.1.0"

webui/src/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html>
22
<!--
3-
Copyright (c) 2014, 2021, Oracle and/or its affiliates.
3+
Copyright (c) 2014, 2022, Oracle and/or its affiliates.
44
Licensed under The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/
55
-->
66
<html lang="en-us">
@@ -17,7 +17,7 @@
1717
<!-- endinjector -->
1818

1919
<!-- This contains icon fonts used by the starter template -->
20-
<link rel="stylesheet" id="uxiconFont" href="https://static.oracle.com/cdn/fnd/gallery/2201.0.0/images/iconfont/ojuxIconFont.min.css">
20+
<link rel="stylesheet" id="uxiconFont" href="https://static.oracle.com/cdn/fnd/gallery/2204.2.0/images/iconfont/ojuxIconFont.min.css">
2121

2222
<!-- This is where you would add any app specific styling -->
2323
<link rel="stylesheet" href="css/app.css" type="text/css"/>

webui/src/js/viewModels/app-main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2021, Oracle and/or its affiliates.
3+
* Copyright (c) 2021, 2022, Oracle and/or its affiliates.
44
* Licensed under The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/
55
*/
66
'use strict';
@@ -61,6 +61,9 @@ function(accUtils, ko, i18n, project, wktConsole, dialogHelper, viewHelper, Arra
6161
this.navCollapsed(!isWide);
6262
});
6363

64+
this.copyrightTextForFooter = ko.observable(i18n.t('copyright-footer-text',
65+
{ currentYear: new Date().getUTCFullYear() }));
66+
6467
// route data for page content views
6568

6669
let routeData = [

webui/src/js/viewModels/domain-design-view.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2021, Oracle and/or its affiliates.
3+
* Copyright (c) 2021, 2022, Oracle and/or its affiliates.
44
* Licensed under The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/
55
*/
66
define(['models/wkt-project', 'accUtils', 'utils/common-utilities', 'knockout', 'utils/i18n',
@@ -167,6 +167,11 @@ function (project, accUtils, utils, ko, i18n, BufferingDataProvider,
167167
return this.isModelInImage();
168168
};
169169

170+
this.handleRegenerateEncryptionValue = () => {
171+
const newValue = window.api.utils.generateUuid();
172+
this.project.k8sDomain.runtimeSecretValue.observable(newValue);
173+
};
174+
170175
this.secretsTableColumnMetadata = () => {
171176
return [
172177
{'headerText': this.labelMapper('secretname-header'), 'sortProperty': 'name', 'resizable': 'enabled'},

webui/src/js/views/app-main.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (c) 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2021, 2022, Oracle and/or its affiliates.
33
Licensed under The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/
44
-->
55

@@ -47,9 +47,8 @@
4747

4848
<footer class="oj-web-applayout-footer" role="contentinfo">
4949
<div id="windowFooter" class="oj-web-applayout-footer-item oj-text-color-secondary oj-line-clamp-1 oj-typography-body-sm wkt-link-container">
50-
Copyright (c) 2021, Oracle and/or its affiliates.
51-
Licensed under The Universal Permissive License (UPL), Version 1.0,
52-
as shown at &nbsp; <a href="https://oss.oracle.com/licenses/upl/" target="_blank">https://oss.oracle.com/licenses/upl/</a>
50+
<oj-bind-text value="{{copyrightTextForFooter}}"></oj-bind-text>
51+
<a href="https://oss.oracle.com/licenses/upl/" target="_blank">https://oss.oracle.com/licenses/upl/</a>
5352
</div>
5453
</footer>
5554

webui/src/js/views/domain-design-view.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (c) 2021, Oracle and/or its affiliates.
2+
Copyright (c) 2021, 2022, Oracle and/or its affiliates.
33
Licensed under The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/
44
-->
55
<h6 class="wkt-subheading"><oj-bind-text value="[[labelMapper('title')]]"></oj-bind-text></h6>
@@ -354,7 +354,7 @@ <h6 slot="header" class="wkt-subheading"><oj-bind-text value="[[labelMapper('pag
354354
<oj-bind-if test="[[hasEncryptionSecret()]]">
355355
<div class="oj-panel">
356356
<h6 class="wkt-subheading"><oj-bind-text value="[[labelMapper('encryption-secret-title')]]"></oj-bind-text></h6>
357-
<oj-form-layout max-columns="2" direction="row">
357+
<oj-form-layout max-columns="3" direction="row">
358358
<oj-input-text label-hint="[[labelMapper('encryption-secret-label')]]"
359359
value="{{project.k8sDomain.runtimeSecretName.observable}}"
360360
help.instruction="[[labelMapper('encryption-secret-help')]]">
@@ -364,6 +364,10 @@ <h6 class="wkt-subheading"><oj-bind-text value="[[labelMapper('encryption-secret
364364
mask-icon="visible"
365365
help.instruction="[[labelMapper('encryption-value-help')]]">
366366
</oj-input-password>
367+
<oj-button display="icons" chroming="borderless" on-oj-action="[[handleRegenerateEncryptionValue]]">
368+
<oj-bind-text value="[[labelMapper('regenerate-encryption-value-label')]]"></oj-bind-text>
369+
<span slot='startIcon' class="oj-ux-ico-replay"></span>
370+
</oj-button>
367371
</oj-form-layout>
368372
</div>
369373
</oj-bind-if>

0 commit comments

Comments
 (0)