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 2fd652b

Browse files
Improving K8s domain dialog format (#185)
* Improve formatting on k8s domain status dialog * Update secret username correctly
1 parent d481db6 commit 2fd652b

File tree

3 files changed

+28
-35
lines changed

3 files changed

+28
-35
lines changed

‎webui/src/js/models/k8s-domain-definition.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ define(['knockout', 'utils/observable-properties', 'utils/common-utilities', 'ut
235235
};
236236

237237
this.handlePrepareModelSecrets = (secrets) => {
238-
if (secrets && secrets.secrets&&secrets.secrets.length) {
239-
wktLogger.debug('handlePrepareModelSecrets() working on %d secrets', secrets.secrets.length);
240-
for (const secret of secrets.secrets) {
238+
if (secrets && secrets.length) {
239+
wktLogger.debug('handlePrepareModelSecrets() working on %d secrets', secrets.length);
240+
for (const secret of secrets) {
241241
wktLogger.debug('working on secret %s', secret.name);
242242

243243
// The secret should always exist already because prepare model updated the model first,

‎webui/src/js/viewModels/domain-status-dialog.js‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
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';
77

8-
define(['accUtils', 'knockout', 'js-yaml', 'utils/i18n', 'models/wkt-project', 'ojs/ojinputtext',
8+
define(['accUtils', 'knockout', 'js-yaml', 'utils/i18n', 'models/wkt-project', 'utils/view-helper','ojs/ojinputtext',
99
'ojs/ojlabel', 'ojs/ojbutton', 'ojs/ojdialog', 'ojs/ojformlayout', 'ojs/ojvalidationgroup'],
10-
function(accUtils, ko, jsyaml, i18n, project) {
10+
function(accUtils, ko, jsyaml, i18n, project,viewHelper) {
1111
function DomainStatusDialogModel(args) {
1212
const DIALOG_SELECTOR = '#domainStatusDialog';
1313

@@ -20,11 +20,13 @@ function(accUtils, ko, jsyaml, i18n, project) {
2020
this.connected = () => {
2121
accUtils.announce('Show domain status dialog loaded.', 'assertive');
2222

23+
this.dialogContainer = $(DIALOG_SELECTOR)[0];
24+
2325
// open the dialog after the current thread, which is loading this view model.
2426
// using oj-dialog initial-visibility="show" causes vertical centering issues.
25-
setTimeout(function() {
26-
$(DIALOG_SELECTOR)[0].open();
27-
},1);
27+
viewHelper.componentReady(this.dialogContainer).then(()=> {
28+
this.dialogContainer.open();
29+
});
2830
};
2931

3032
this.labelMapper = (labelId) => {
@@ -36,7 +38,7 @@ function(accUtils, ko, jsyaml, i18n, project) {
3638
};
3739

3840
this.okInput = () => {
39-
$(DIALOG_SELECTOR)[0].close();
41+
this.dialogContainer.close();
4042
};
4143

4244
this.makeYamlOutput = (data) => {

‎webui/src/js/views/domain-status-dialog.html‎

Lines changed: 16 additions & 25 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
<oj-dialog id="domainStatusDialog" class="wkt-route-edit-dialog" initial-visibility="hide">
@@ -13,11 +13,12 @@
1313
<oj-label for="overallstatus">
1414
<oj-bind-text value="{{labelMapper('domain-status-overallstatus')}}"></oj-bind-text>
1515
</oj-label>
16-
<br>
17-
<oj-input-text id="overallstatus" value="{{domainOverallStatus}}" readonly="true"></oj-input-text>
16+
<p class="wkt-status-paragraph" id="overallstatus">
17+
<oj-bind-text value="{{domainOverallStatus}}"></oj-bind-text>
18+
</p>
1819
</div>
1920

20-
<div class="oj-panel wkt-notop">
21+
<div class="oj-panel">
2122
<oj-bind-if test="[[isOperatorVersion4orHigher === false]]">
2223
<oj-label for="introspectJobFailureCount">
2324
<oj-bind-text value="{{labelMapper('domain-status-introspectJobFailureCount')}}"></oj-bind-text>
@@ -30,54 +31,44 @@
3031
</oj-label>
3132
</oj-bind-if>
3233

33-
<br>
34-
<oj-input-text id="introspectJobFailureCount" value="{{introspectJobFailureCount}}" readonly="true"></oj-input-text>
34+
<p class="wkt-status-paragraph" id="introspectJobFailureCount">
35+
<oj-bind-text value="{{introspectJobFailureCount}}"></oj-bind-text>
36+
</p>
3537
</div>
3638

3739
<oj-bind-if test="[[domainHasError === true]]">
3840
<div class="oj-panel">
3941
<oj-label for="error-message">
4042
<oj-bind-text value="{{labelMapper('domain-status-message')}}"></oj-bind-text>
4143
</oj-label>
42-
<br>
43-
<oj-text-area class="domainError" id="error-message" max-rows="100000" value="{{domainErrorMessage}}"
44-
readonly="true">
45-
</oj-text-area>
44+
<p class="wkt-status-paragraph preformat domainError" id="error-message"
45+
><oj-bind-text class="domainError" value="{{domainErrorMessage}}"></oj-bind-text></p>
4646
</div>
4747
</oj-bind-if>
4848

4949
<div class="oj-panel">
5050
<oj-label for="conditions">
5151
<oj-bind-text value="{{labelMapper('domain-status-conditions')}}"></oj-bind-text>
5252
</oj-label>
53-
<br>
54-
<oj-text-area id="conditions" max-rows="100000"
55-
value="{{domainConditions}}"
56-
readonly="true">
57-
</oj-text-area>
53+
<p class="wkt-status-paragraph preformat" id="conditions"
54+
><oj-bind-text value="{{domainConditions}}"></oj-bind-text></p>
5855
</div>
5956

6057
<div class="oj-panel">
61-
6258
<oj-label for="clusterstatus">
6359
<oj-bind-text value="{{labelMapper('domain-status-clusterstatus')}}"></oj-bind-text>
6460
</oj-label>
65-
<br>
66-
<oj-text-area id="clusterstatus" max-rows="100000" value="{{domainClusterStatus}}"
67-
readonly="true">
68-
</oj-text-area>
69-
61+
<p class="wkt-status-paragraph preformat" id="clusterstatus"
62+
><oj-bind-text value="{{domainClusterStatus}}"></oj-bind-text></p>
7063
</div>
7164

7265
<div class="oj-panel">
7366
<oj-label for="serverstatus">
7467
<oj-bind-text value="{{labelMapper('domain-status-serverstatus')}}"></oj-bind-text>
7568
</oj-label>
76-
<br>
77-
<oj-text-area id="serverstatus" max-rows="100000" value="{{domainServerStatus}}" readonly="true">
78-
</oj-text-area>
69+
<p class="wkt-status-paragraph preformat" id="serverstatus"
70+
><oj-bind-text value="{{domainServerStatus}}"></oj-bind-text></p>
7971
</div>
80-
8172
</div>
8273

8374
<div slot="footer">

0 commit comments

Comments
(0)

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