Browse Source

应用管理 第三个页签下适配选项保存后无法显示 #I5DWS3

应用管理 第三个页签下适配选项保存后无法显示 #I5DWS3
MaxKey 2 years ago
parent
commit
402b56632d

+ 7 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/Apps.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import format from 'date-fns/format';
 
@@ -66,6 +65,10 @@ export class Apps extends BaseEntity {
         if (this.status == 1) {
             this.switch_status = true;
         }
+        this.isAdapter = `${data.isAdapter}`;
+        this.isExtendAttr = `${data.isExtendAttr}`;
+        this.logoutType = `${data.logoutType}`;
+        this.visible = `${data.visible}`;
     }
 
     override trans(): void {

+ 4 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsCasDetails.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import format from 'date-fns/format';
 
@@ -32,6 +31,7 @@ export class AppsCasDetails extends Apps {
 
     override init(data: any): void {
         Object.assign(this, data);
+        super.init(data);
         if (this.status == 1) {
             this.switch_status = true;
         }

+ 4 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsExtendApiDetails.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import format from 'date-fns/format';
 
@@ -26,6 +25,7 @@ export class AppsExtendApiDetails extends Apps {
 
     override init(data: any): void {
         Object.assign(this, data);
+        super.init(data);
         if (this.status == 1) {
             this.switch_status = true;
         }

+ 4 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsFormBasedDetails.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import format from 'date-fns/format';
 
@@ -32,6 +31,7 @@ export class AppsFormBasedDetails extends Apps {
 
     override init(data: any): void {
         Object.assign(this, data);
+        super.init(data);
         if (this.status == 1) {
             this.switch_status = true;
         }

+ 4 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsJwtDetails.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import format from 'date-fns/format';
 
@@ -40,6 +39,7 @@ export class AppsJwtDetails extends Apps {
 
     override init(data: any): void {
         Object.assign(this, data);
+        super.init(data);
         if (this.status == 1) {
             this.switch_status = true;
         }

+ 5 - 5
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsOauth20Details.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import format from 'date-fns/format';
 
@@ -76,7 +75,8 @@ export class AppsOauth20Details extends Apps {
 
     override init(data: any): void {
         Object.assign(this, data);
-        console.log(data);
+        super.init(data);
+        //console.log(data);
         if (this.status == 1) {
             this.switch_status = true;
         }

+ 4 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsSamlDetails.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import format from 'date-fns/format';
 
@@ -77,6 +76,7 @@ export class AppsSamlDetails extends Apps {
 
     override init(data: any): void {
         Object.assign(this, data);
+        super.init(data);
         this.fileType = 'certificate';
         this.metaUrl = '';
         if (this.category == null || this.category == '') {

+ 4 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsTokenBasedDetails.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import format from 'date-fns/format';
 
@@ -33,6 +32,7 @@ export class AppsTokenBasedDetails extends Apps {
 
     override init(data: any): void {
         Object.assign(this, data);
+        super.init(data);
         if (this.status == 1) {
             this.switch_status = true;
         }

+ 5 - 3
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/TreeNodes.ts

@@ -30,10 +30,11 @@ export class TreeNodes {
     }
 
     init(treeAttrs: any) {
+        let nodeType = treeAttrs.rootNode.attrs && treeAttrs.rootNode.attrs.type ? treeAttrs.rootNode.attrs.type : '';
         this._rootNode = {
             title: treeAttrs.rootNode.title,
             key: treeAttrs.rootNode.key,
-            type: treeAttrs.rootNode.attrs.type,
+            type: nodeType,
             expanded: true,
             isLeaf: false
         };
@@ -48,10 +49,11 @@ export class TreeNodes {
         let treeNodes: any[] = [];
         for (let node of this.request) {
             if (node.key != rootNode.key && node.parentKey == rootNode.key) {
-                let treeNode = { title: node.title, key: node.key, type: node.attrs.type, expanded: false, isLeaf: true };
+                let nodeType = node.attrs && node.attrs.type ? node.attrs.type : '';
+                let treeNode = { title: node.title, key: node.key, type: nodeType, expanded: false, isLeaf: true };
                 this.buildTree(treeNode);
                 treeNodes.push(treeNode);
-                console.log(treeNode);
+                //console.log(treeNode);
                 rootNode.isLeaf = false;
             }
         }

+ 109 - 116
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-cas-details-editer/app-cas-details-editer.component.html

@@ -8,24 +8,22 @@
             <nz-form-item style="width: 100%">
               <nz-form-label [nzMd]="8" nzRequired nzFor="id">{{ 'mxk.text.id' | i18n }}</nz-form-label>
               <nz-form-control [nzMd]="16" nzErrorTip="The input is not valid id!">
-                <input [(ngModel)]="form.model.id" readonly [ngModelOptions]="{ standalone: true }" nz-input name="id" id="id" />
+                <input [(ngModel)]="form.model.id" readonly [ngModelOptions]="{ standalone: true }" nz-input name="id"
+                  id="id" />
               </nz-form-control>
             </nz-form-item>
             <nz-form-item style="width: 100%">
-              <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="secret">{{ 'mxk.apps.secret' | i18n }}</nz-form-label>
-              <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid secret!">
+              <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="secret">{{ 'mxk.apps.secret' | i18n }}
+              </nz-form-label>
+              <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+                nzErrorTip="The input is not valid secret!">
                 <nz-input-group nzSearch [nzAddOnAfter]="suffixPasswordButton">
-                  <input
-                    [(ngModel)]="form.model.secret"
-                    readonly
-                    [ngModelOptions]="{ standalone: true }"
-                    nz-input
-                    name="secret"
-                    id="secret"
-                  />
+                  <input [(ngModel)]="form.model.secret" readonly [ngModelOptions]="{ standalone: true }" nz-input
+                    name="secret" id="secret" />
                 </nz-input-group>
                 <ng-template #suffixPasswordButton>
-                  <button nz-button nzType="primary" nzSearch (click)="onGenerateSecret($event)">{{ 'mxk.text.generate' | i18n }}</button>
+                  <button nz-button nzType="primary" nzSearch (click)="onGenerateSecret($event)">{{ 'mxk.text.generate'
+                    | i18n }}</button>
                 </ng-template>
               </nz-form-control>
             </nz-form-item>
@@ -34,43 +32,25 @@
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="icon">{{ 'mxk.apps.icon' | i18n }}</nz-form-label>
             <div nz-col class="clearfix" nzSm="16" nzXs="24">
-              <nz-upload
-                nzAction="file/upload/"
-                nzListType="picture-card"
-                [(nzFileList)]="fileList"
-                nzName="uploadFile"
-                [nzShowButton]="fileList.length < 1"
-                [nzPreview]="handlePreview"
-                (nzChange)="uploadImageChange($event)"
-              >
+              <nz-upload nzAction="file/upload/" nzListType="picture-card" [(nzFileList)]="fileList" nzName="uploadFile"
+                [nzShowButton]="fileList.length < 1" [nzPreview]="handlePreview" (nzChange)="uploadImageChange($event)">
                 <div>
                   <i nz-icon nzType="plus"></i>
                   <div style="margin-top: 8px">Upload</div>
                 </div>
               </nz-upload>
-              <nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
+              <nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null"
+                (nzOnCancel)="previewVisible = false">
                 <ng-template #modalContent>
                   <img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
                 </ng-template>
               </nz-modal>
             </div>
 
-            <nz-form-control
-              style="display: none"
-              [nzSm]="16"
-              [nzMd]="16"
-              [nzXs]="36"
-              [nzXl]="48"
-              nzErrorTip="The input is not valid icon!"
-            >
-              <input
-                [(ngModel)]="form.model.iconId"
-                disabled="true"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="icon"
-                id="icon"
-              />
+            <nz-form-control style="display: none" [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid icon!">
+              <input [(ngModel)]="form.model.iconId" disabled="true" [ngModelOptions]="{ standalone: true }" nz-input
+                name="icon" id="icon" />
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -78,13 +58,16 @@
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="name">{{ 'mxk.apps.name' | i18n }}</nz-form-label>
             <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid name!">
-              <input [(ngModel)]="form.model.name" [ngModelOptions]="{ standalone: true }" nz-input name="name" id="name" />
+              <input [(ngModel)]="form.model.name" [ngModelOptions]="{ standalone: true }" nz-input name="name"
+                id="name" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="frequently">{{ 'mxk.apps.frequently' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid frequently!">
-              <nz-radio-group [(ngModel)]="form.model.frequently" [ngModelOptions]="{ standalone: true }" nzButtonStyle="solid">
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid frequently!">
+              <nz-radio-group [(ngModel)]="form.model.frequently" [ngModelOptions]="{ standalone: true }"
+                nzButtonStyle="solid">
                 <label nz-radio-button nzValue="yes">{{ 'mxk.text.yes' | i18n }}</label>
                 <label nz-radio-button nzValue="no">{{ 'mxk.text.no' | i18n }}</label>
               </nz-radio-group>
@@ -93,15 +76,20 @@
         </div>
         <div nz-row>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="protocol">{{ 'mxk.apps.protocol' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid protocol!">
-              <input [(ngModel)]="form.model.protocol" [ngModelOptions]="{ standalone: true }" nz-input name="protocol" id="protocol" />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="protocol">{{ 'mxk.apps.protocol' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid protocol!">
+              <input [(ngModel)]="form.model.protocol" [ngModelOptions]="{ standalone: true }" nz-input name="protocol"
+                id="protocol" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="category">{{ 'mxk.apps.category' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid category!">
-              <nz-select [(ngModel)]="form.model.category" [ngModelOptions]="{ standalone: true }" name="category" id="category">
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid category!">
+              <nz-select [(ngModel)]="form.model.category" [ngModelOptions]="{ standalone: true }" name="category"
+                id="category">
                 <nz-option nzValue="none" nzLabel="{{ 'mxk.apps.category.none' | i18n }}"></nz-option>
                 <nz-option nzValue="1011" nzLabel="{{ 'mxk.apps.category.1011' | i18n }}"></nz-option>
                 <nz-option nzValue="1012" nzLabel="{{ 'mxk.apps.category.1012' | i18n }}"></nz-option>
@@ -136,9 +124,12 @@
         </div>
         <div nz-row>
           <nz-form-item style="width: 100%">
-            <nz-form-label [nzSm]="4" [nzXs]="24" nzRequired nzFor="loginUrl">{{ 'mxk.apps.loginUrl' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="20" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid loginUrl!">
-              <input [(ngModel)]="form.model.loginUrl" [ngModelOptions]="{ standalone: true }" nz-input name="loginUrl" id="loginUrl" />
+            <nz-form-label [nzSm]="4" [nzXs]="24" nzRequired nzFor="loginUrl">{{ 'mxk.apps.loginUrl' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="20" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid loginUrl!">
+              <input [(ngModel)]="form.model.loginUrl" [ngModelOptions]="{ standalone: true }" nz-input name="loginUrl"
+                id="loginUrl" />
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -146,31 +137,34 @@
       <nz-tab nzTitle="{{ 'mxk.apps.cas.tab' | i18n }}">
         <div nz-row>
           <nz-form-item style="width: 100%">
-            <nz-form-label [nzSm]="4" [nzXs]="24" nzRequired nzFor="service">{{ 'mxk.apps.cas.service' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="20" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid service!">
-              <input [(ngModel)]="form.model.service" [ngModelOptions]="{ standalone: true }" nz-input name="service" id="service" />
+            <nz-form-label [nzSm]="4" [nzXs]="24" nzRequired nzFor="service">{{ 'mxk.apps.cas.service' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="20" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid service!">
+              <input [(ngModel)]="form.model.service" [ngModelOptions]="{ standalone: true }" nz-input name="service"
+                id="service" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item style="width: 100%">
-            <nz-form-label [nzSm]="4" [nzXs]="24" nzRequired nzFor="callbackUrl">{{ 'mxk.apps.cas.callbackUrl' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="20" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid callbackUrl!">
-              <input
-                [(ngModel)]="form.model.callbackUrl"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="callbackUrl"
-                id="callbackUrl"
-              />
+            <nz-form-label [nzSm]="4" [nzXs]="24" nzRequired nzFor="callbackUrl">{{ 'mxk.apps.cas.callbackUrl' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="20" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid callbackUrl!">
+              <input [(ngModel)]="form.model.callbackUrl" [ngModelOptions]="{ standalone: true }" nz-input
+                name="callbackUrl" id="callbackUrl" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="casUser">{{ 'mxk.apps.cas.casUser' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid casUser!">
-              <nz-select [(ngModel)]="form.model.casUser" [ngModelOptions]="{ standalone: true }" name="category" id="category">
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="casUser">{{ 'mxk.apps.cas.casUser' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid casUser!">
+              <nz-select [(ngModel)]="form.model.casUser" [ngModelOptions]="{ standalone: true }" name="category"
+                id="category">
                 <nz-option nzValue="username" nzLabel="{{ 'mxk.users.username' | i18n }}"></nz-option>
                 <nz-option nzValue="employeeNumber" nzLabel="{{ 'mxk.users.employeeNumber' | i18n }}"></nz-option>
                 <nz-option nzValue="email" nzLabel="{{ 'mxk.users.email' | i18n }}"></nz-option>
@@ -181,10 +175,13 @@
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="expires">{{ 'mxk.apps.cas.expires' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid expires!">
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="expires">{{ 'mxk.apps.cas.expires' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid expires!">
               <nz-input-group nzAddOnAfter="{{ 'mxk.text.second' | i18n }}">
-                <input [(ngModel)]="form.model.expires" [ngModelOptions]="{ standalone: true }" nz-input name="expires" id="expires" />
+                <input [(ngModel)]="form.model.expires" [ngModelOptions]="{ standalone: true }" nz-input name="expires"
+                  id="expires" />
               </nz-input-group>
             </nz-form-control>
           </nz-form-item>
@@ -194,14 +191,18 @@
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="logoutUrl">{{ 'mxk.apps.logoutUrl' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid logoutUrl!">
-              <input [(ngModel)]="form.model.logoutUrl" [ngModelOptions]="{ standalone: true }" nz-input name="logoutUrl" id="logoutUrl" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid logoutUrl!">
+              <input [(ngModel)]="form.model.logoutUrl" [ngModelOptions]="{ standalone: true }" nz-input
+                name="logoutUrl" id="logoutUrl" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="logoutType">{{ 'mxk.apps.logoutType' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid logoutType!">
-              <nz-select [(ngModel)]="form.model.logoutType" [ngModelOptions]="{ standalone: true }" name="logoutType" id="logoutType">
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid logoutType!">
+              <nz-select [(ngModel)]="form.model.logoutType" [ngModelOptions]="{ standalone: true }" name="logoutType"
+                id="logoutType">
                 <nz-option nzValue="0" nzLabel="{{ 'mxk.apps.logoutType.none' | i18n }}"></nz-option>
                 <nz-option nzValue="1" nzLabel="{{ 'mxk.apps.logoutType.back_channel' | i18n }}"></nz-option>
                 <nz-option nzValue="2" nzLabel="{{ 'mxk.apps.logoutType.front_channel' | i18n }}"></nz-option>
@@ -213,8 +214,10 @@
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="visible">{{ 'mxk.apps.visible' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid visible!">
-              <nz-select [(ngModel)]="form.model.visible" [ngModelOptions]="{ standalone: true }" name="visible" id="visible">
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid visible!">
+              <nz-select [(ngModel)]="form.model.visible" [ngModelOptions]="{ standalone: true }" name="visible"
+                id="visible">
                 <nz-option nzValue="0" nzLabel="{{ 'mxk.apps.visible.hidden' | i18n }}"></nz-option>
                 <nz-option nzValue="1" nzLabel="{{ 'mxk.apps.visible.all' | i18n }}"></nz-option>
                 <nz-option nzValue="2" nzLabel="{{ 'mxk.apps.visible.internet' | i18n }}"></nz-option>
@@ -224,30 +227,38 @@
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="sortIndex">{{ 'mxk.text.sortIndex' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid sortIndex!">
-              <input [(ngModel)]="form.model.sortIndex" [ngModelOptions]="{ standalone: true }" nz-input name="sortIndex" id="sortIndex" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid sortIndex!">
+              <input [(ngModel)]="form.model.sortIndex" [ngModelOptions]="{ standalone: true }" nz-input
+                name="sortIndex" id="sortIndex" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="vendor">{{ 'mxk.apps.vendor' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid vendor!">
-              <input [(ngModel)]="form.model.vendor" [ngModelOptions]="{ standalone: true }" nz-input name="vendor" id="vendor" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid vendor!">
+              <input [(ngModel)]="form.model.vendor" [ngModelOptions]="{ standalone: true }" nz-input name="vendor"
+                id="vendor" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="vendorUrl">{{ 'mxk.apps.vendor.url' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid vendorUrl!">
-              <input [(ngModel)]="form.model.vendorUrl" [ngModelOptions]="{ standalone: true }" nz-input name="vendorUrl" id="vendorUrl" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid vendorUrl!">
+              <input [(ngModel)]="form.model.vendorUrl" [ngModelOptions]="{ standalone: true }" nz-input
+                name="vendorUrl" id="vendorUrl" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="isAdapter">{{ 'mxk.apps.isAdapter' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid isAdapter!">
-              <nz-select [(ngModel)]="form.model.isAdapter" [ngModelOptions]="{ standalone: true }" name="isAdapter" id="isAdapter">
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid isAdapter!">
+              <nz-select [(ngModel)]="form.model.isAdapter" [ngModelOptions]="{ standalone: true }" name="isAdapter"
+                id="isAdapter">
                 <nz-option nzValue="0" nzLabel="{{ 'mxk.apps.isAdapter.no' | i18n }}"></nz-option>
                 <nz-option nzValue="1" nzLabel="{{ 'mxk.apps.isAdapter.yes' | i18n }}"></nz-option>
               </nz-select>
@@ -255,49 +266,31 @@
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="adapterName">{{ 'mxk.apps.adapter' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid adapterName!">
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid adapterName!">
               <nz-input-group nzSearch [nzAddOnAfter]="suffixAdapterButton">
-                <input
-                  [(ngModel)]="form.model.adapterName"
-                  [ngModelOptions]="{ standalone: true }"
-                  nz-input
-                  name="adapterName"
-                  id="adapterName"
-                />
+                <input [(ngModel)]="form.model.adapterName" [ngModelOptions]="{ standalone: true }" nz-input
+                  name="adapterName" id="adapterName" />
               </nz-input-group>
               <ng-template #suffixAdapterButton>
-                <button nz-button nzType="primary" nzSearch (click)="onSelectAdapter($event)">{{ 'mxk.text.select' | i18n }}</button>
+                <button nz-button nzType="primary" nzSearch (click)="onSelectAdapter($event)">{{ 'mxk.text.select' |
+                  i18n }}</button>
               </ng-template>
-              <input
-                type="hidden"
-                [(ngModel)]="form.model.adapterId"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="adapterId"
-                id="adapterId"
-              />
-              <input
-                type="hidden"
-                [(ngModel)]="form.model.adapter"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="adapter"
-                id="adapter"
-              />
+              <input type="hidden" [(ngModel)]="form.model.adapterId" [ngModelOptions]="{ standalone: true }" nz-input
+                name="adapterId" id="adapterId" />
+              <input type="hidden" [(ngModel)]="form.model.adapter" [ngModelOptions]="{ standalone: true }" nz-input
+                name="adapter" id="adapter" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item style="width: 100%">
-            <nz-form-label [nzSm]="4" [nzXs]="24" nzFor="description">{{ 'mxk.text.description' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="20" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid description!">
-              <input
-                [(ngModel)]="form.model.description"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="description"
-                id="description"
-              />
+            <nz-form-label [nzSm]="4" [nzXs]="24" nzFor="description">{{ 'mxk.text.description' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="20" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid description!">
+              <input [(ngModel)]="form.model.description" [ngModelOptions]="{ standalone: true }" nz-input
+                name="description" id="description" />
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -309,4 +302,4 @@
 <div *nzModalFooter>
   <button nz-button nzType="default" (click)="onClose($event)">{{ 'mxk.text.close' | i18n }}</button>
   <button nz-button nzType="primary" (click)="onSubmit($event)">{{ 'mxk.text.submit' | i18n }}</button>
-</div>
+</div>

+ 1 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-cas-details-editer/app-cas-details-editer.component.ts

@@ -86,6 +86,7 @@ export class AppCasDetailsEditerComponent implements OnInit {
     if (this.isEdit) {
       this.appsCasDetailsService.get(`${this.id}`).subscribe(res => {
         this.form.model.init(res.data);
+        //console.log(this.form.model);
         this.previewImage = this.form.model.iconBase64.toString();
         this.fileList = [
           {