Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dceb63e

Browse files
rakillenrobertpatrick
authored andcommitted
Support adding SAML2 initialization data files to archive
1 parent 73d8af0 commit dceb63e

File tree

5 files changed

+44
-16
lines changed

5 files changed

+44
-16
lines changed

‎electron/app/js/wdtArchive.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ function getEntryTypes() {
154154
fileHelp: i18n.t('wdt-archiveType-opssWallet-fileHelp'),
155155
pathPrefix: 'wlsdeploy/opsswallet/'
156156
},
157+
'saml2InitializationData': {
158+
name: i18n.t('wdt-archiveType-saml2InitializationData'),
159+
subtype: 'file',
160+
fileLabel: i18n.t('wdt-archiveType-saml2InitializationData-fileLabel'),
161+
fileHelp: i18n.t('wdt-archiveType-saml2InitializationData-fileHelp'),
162+
pathPrefix: 'wlsdeploy/security/saml2/'
163+
},
157164
'script': {
158165
name: i18n.t('wdt-archiveType-script'),
159166
subtype: 'file',
@@ -590,6 +597,7 @@ async function _validateArchiveEntryData(targetWindow, entryType, typeDetail, en
590597
case 'nodeManagerKeystore':
591598
case 'script':
592599
case 'sharedLibraryDeploymentPlan':
600+
case 'saml2InitializationData':
593601
_validateArchiveEntryFile(targetWindow, entryType, 'file', entryData.fileName).then(result => {
594602
resolve(result);
595603
});

‎electron/app/locales/en/electron.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,10 @@
469469
"wdt-archiveType-opssWallet-fileLabel": "OPSS Wallet File",
470470
"wdt-archiveType-opssWallet-fileHelp": "Choose the full path to the OPSS wallet file to add to the OPSS wallet",
471471

472+
"wdt-archiveType-saml2InitializationData": "SAML2 Initialization Data",
473+
"wdt-archiveType-saml2InitializationData-fileLabel": "SAML2 Initialization Data File",
474+
"wdt-archiveType-saml2InitializationData-fileHelp": "Choose the full path to the SAML2 initialization data file",
475+
472476
"wdt-archiveType-script": "Script",
473477
"wdt-archiveType-script-fileLabel": "Script File",
474478
"wdt-archiveType-script-fileHelp": "Choose the full path to the script file",

‎webui/src/css/app.css‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,28 @@
8787

8888
/* collapsible console panel, on every page */
8989

90-
.wkt-console-header {
91-
box-sizing: border-box;
90+
.wkt-console-section .oj-collapsible-header-wrapper {
9291
background-color: var(--oj-badge-bg-color);
9392
color: var(--oj-badge-text-color);
94-
flex: 0 0 auto;
95-
padding: 0 8px;
96-
font-size: 1em;
97-
font-weight: 600;
93+
padding: 0;
9894
}
9995

100-
.oj-collapsible .wkt-console-header.oj-collapsible-header .oj-collapsible-header-icon {
101-
margin: 0;
96+
.wkt-console-section.oj-collapsible-header-wrapper .oj-collapsible-header-icon {
97+
margin: 0!important;
10298
padding: 2px 0;
10399
color: var(--oj-badge-text-color);
104100
}
105101

102+
.wkt-console-section .oj-collapsible-header-wrapper .oj-collapsible-header-icon:hover {
103+
color: var(--oj-badge-text-color);
104+
}
105+
106+
.wkt-console-header {
107+
color: var(--oj-badge-text-color);
108+
padding: 0 2px;
109+
font-weight: bold;
110+
}
111+
106112
.wkt-console-content {
107113
box-sizing: border-box;
108114
flex: 1 1 auto;

‎webui/src/js/viewModels/add-to-archive-selection-dialog.js‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
'use strict';
77

88
define(['accUtils', 'knockout', 'utils/i18n', 'models/wkt-project', 'utils/dialog-helper', 'utils/wdt-archive-helper',
9-
'ojs/ojarraydataprovider', 'utils/wkt-logger', 'ojs/ojknockout', 'ojs/ojinputtext', 'ojs/ojlabel', 'ojs/ojbutton',
10-
'ojs/ojdialog', 'ojs/ojformlayout', 'ojs/ojselectsingle', 'ojs/ojvalidationgroup', 'ojs/ojradioset'],
11-
function(accUtils, ko, i18n, project, dialogHelper, archiveHelper, ArrayDataProvider, wktLogger) {
9+
'utils/view-helper', 'ojs/ojarraydataprovider', 'utils/wkt-logger', 'ojs/ojknockout', 'ojs/ojinputtext',
10+
'ojs/ojlabel', 'ojs/ojbutton', 'ojs/ojdialog', 'ojs/ojformlayout', 'ojs/ojselectsingle', 'ojs/ojvalidationgroup',
11+
'ojs/ojradioset'],
12+
function(accUtils, ko, i18n, project, dialogHelper, archiveHelper, viewHelper, ArrayDataProvider, wktLogger) {
1213

1314
const jqueryDialogName = '#addToArchiveSelectionDialog';
1415

16+
// static - remember the last selected type between invocations
17+
let lastSelectedType = null;
18+
1519
function AddToArchiveSelectionDialogModel() {
1620

1721
let subscriptions = [];
@@ -23,11 +27,11 @@ function(accUtils, ko, i18n, project, dialogHelper, archiveHelper, ArrayDataProv
2327
this.handleArchiveEntryTypeChange(newEntryKey);
2428
}));
2529

26-
// open the dialog after the current thread, which is loading this view model.
30+
// open the dialog when the container is ready.
2731
// using oj-dialog initial-visibility="show" causes vertical centering issues.
28-
setTimeout(function() {
32+
viewHelper.componentReady(this.dialogContainer).then(()=> {
2933
$(jqueryDialogName)[0].open();
30-
},1);
34+
});
3135
};
3236

3337
this.disconnected = () => {
@@ -67,6 +71,11 @@ function(accUtils, ko, i18n, project, dialogHelper, archiveHelper, ArrayDataProv
6771
this.archiveEntryTypes.push({key: key, label: value.name, ...value});
6872
this.archiveEntryTypes.sort((a, b) => (a.label > b.label) ? 1 : -1);
6973
}
74+
75+
// entryTypesMap must be established before setting this
76+
if(lastSelectedType) {
77+
this.archiveEntryType(lastSelectedType);
78+
}
7079
});
7180

7281
this.archiveEntryType = ko.observable();
@@ -228,6 +237,7 @@ function(accUtils, ko, i18n, project, dialogHelper, archiveHelper, ArrayDataProv
228237

229238
wktLogger.debug(`Calling addToArchive for entry type ${this.archiveEntryType()} with options: ${JSON.stringify(options)}`);
230239
archiveHelper.addToArchive(this.archiveEntryType(), options).then(() => {
240+
lastSelectedType = this.archiveEntryType();
231241
$(jqueryDialogName)[0].close();
232242
}).catch(err => {
233243
dialogHelper.displayCatchAllError('add-archive-entry', err).then();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (c) 2021, 2022, Oracle and/or its affiliates.
2+
Copyright (c) 2021, 2023, 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

@@ -37,7 +37,7 @@
3737
<oj-module role="main" id="wktMainPane" class="wkt-main-pane" config="[[moduleAdapter.koObservableConfig]]">
3838
</oj-module>
3939

40-
<oj-collapsible expanded='{{wktConsole.show}}'>
40+
<oj-collapsible class="wkt-console-section" expanded='{{wktConsole.show}}'>
4141
<span class="wkt-console-header" slot='header'><oj-bind-text value="{{consoleLabel}}"></oj-bind-text></span>
4242
<div id="wkt-console-content" class="wkt-console-content">
4343
</div>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /