diff --git a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/Apps.ts b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/Apps.ts index f56314092..f0f66e300 100644 --- a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/Apps.ts +++ b/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 { diff --git a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsCasDetails.ts b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsCasDetails.ts index 1c283c574..373ed6326 100644 --- a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsCasDetails.ts +++ b/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; } diff --git a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsExtendApiDetails.ts b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsExtendApiDetails.ts index 6a92181f9..c33fdf8de 100644 --- a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsExtendApiDetails.ts +++ b/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; } diff --git a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsFormBasedDetails.ts b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsFormBasedDetails.ts index a635a989f..e2842150b 100644 --- a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsFormBasedDetails.ts +++ b/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; } diff --git a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsJwtDetails.ts b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsJwtDetails.ts index e9307fc3d..0cc59399e 100644 --- a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsJwtDetails.ts +++ b/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; } diff --git a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsOauth20Details.ts b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsOauth20Details.ts index 166b1912f..795deaf95 100644 --- a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsOauth20Details.ts +++ b/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; } diff --git a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsSamlDetails.ts b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsSamlDetails.ts index 4055c62cd..785a7dea3 100644 --- a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsSamlDetails.ts +++ b/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 == '') { diff --git a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsTokenBasedDetails.ts b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsTokenBasedDetails.ts index b8f1d7bb4..b82661954 100644 --- a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/AppsTokenBasedDetails.ts +++ b/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; } diff --git a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/TreeNodes.ts b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/TreeNodes.ts index fe3bfd8c4..f6dd50772 100644 --- a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/TreeNodes.ts +++ b/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; } } diff --git a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-cas-details-editer/app-cas-details-editer.component.html b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-cas-details-editer/app-cas-details-editer.component.html index eb577b692..189d03b60 100644 --- a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-cas-details-editer/app-cas-details-editer.component.html +++ b/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 @@ {{ 'mxk.text.id' | i18n }} - + - {{ 'mxk.apps.secret' | i18n }} - + {{ 'mxk.apps.secret' | i18n }} + + - + - + @@ -34,43 +32,25 @@ {{ 'mxk.apps.icon' | i18n }}
- +
Upload
- +
- - + +
@@ -78,13 +58,16 @@ {{ 'mxk.apps.name' | i18n }} - + {{ 'mxk.apps.frequently' | i18n }} - - + + @@ -93,15 +76,20 @@
- {{ 'mxk.apps.protocol' | i18n }} - - + {{ 'mxk.apps.protocol' | i18n }} + + + {{ 'mxk.apps.category' | i18n }} - - + + @@ -136,9 +124,12 @@
- {{ 'mxk.apps.loginUrl' | i18n }} - - + {{ 'mxk.apps.loginUrl' | i18n }} + + +
@@ -146,31 +137,34 @@
- {{ 'mxk.apps.cas.service' | i18n }} - - + {{ 'mxk.apps.cas.service' | i18n }} + + +
- {{ 'mxk.apps.cas.callbackUrl' | i18n }} - - + {{ 'mxk.apps.cas.callbackUrl' | i18n }} + + +
- {{ 'mxk.apps.cas.casUser' | i18n }} - - + {{ 'mxk.apps.cas.casUser' | i18n }} + + + @@ -181,10 +175,13 @@ - {{ 'mxk.apps.cas.expires' | i18n }} - + {{ 'mxk.apps.cas.expires' | i18n }} + + - + @@ -194,14 +191,18 @@
{{ 'mxk.apps.logoutUrl' | i18n }} - - + + {{ 'mxk.apps.logoutType' | i18n }} - - + + @@ -213,8 +214,10 @@
{{ 'mxk.apps.visible' | i18n }} - - + + @@ -224,30 +227,38 @@ {{ 'mxk.text.sortIndex' | i18n }} - - + +
{{ 'mxk.apps.vendor' | i18n }} - - + + {{ 'mxk.apps.vendor.url' | i18n }} - - + +
{{ 'mxk.apps.isAdapter' | i18n }} - - + + @@ -255,49 +266,31 @@ {{ 'mxk.apps.adapter' | i18n }} - + - + - + - - + +
- {{ 'mxk.text.description' | i18n }} - - + {{ 'mxk.text.description' | i18n }} + + +
@@ -309,4 +302,4 @@
-
+
\ No newline at end of file diff --git a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-cas-details-editer/app-cas-details-editer.component.ts b/maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-cas-details-editer/app-cas-details-editer.component.ts index ca6b2cc4e..0cb853130 100644 --- a/maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/app-cas-details-editer/app-cas-details-editer.component.ts +++ b/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 = [ {