Compare commits

..

70 Commits

Author SHA1 Message Date
superman 3d641f63ce Merge pull request #10342 in DEC/decision-webui-dcm from final/11.0 to persist/11.0 4 weeks ago
superman 2c7e4bdcbe Merge pull request #10199 in DEC/decision-webui-dcm from release/11.0 to final/11.0 1 month ago
superman e3925580da Merge pull request #10129 in DEC/decision-webui-dcm from final/11.0 to release/11.0 2 months ago
superman aff9b028cd Merge pull request #10128 in DEC/decision-webui-dcm from persist/11.0 to final/11.0 2 months ago
superman 0a206cfd50 Merge pull request #10120 in DEC/decision-webui-dcm from bugfix/11.0 to release/11.0 2 months ago
superman a8a774e245 Pull request #10113: 无jira任务, feature/x 合 bugfix/11.0 2 months ago
superman 9614f7befa Merge pull request #9985 in DEC/decision-webui-dcm from final/11.0 to persist/11.0 3 months ago
superman ddf79abf67 Pull request #9744: 无jira任务, bugfix/11.0 合 feature/x 4 months ago
superman fae8c8b743 Merge pull request #9743 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 4 months ago
superman 95a142fb36 Merge pull request #9742 in DEC/decision-webui-dcm from final/11.0 to release/11.0 4 months ago
superman 5e74901dd0 Merge pull request #9741 in DEC/decision-webui-dcm from persist/11.0 to final/11.0 4 months ago
superman e38b579294 Merge pull request #9736 in DEC/decision-webui-dcm from final/11.0 to persist/11.0 4 months ago
superman fa47cec090 Merge pull request #9666 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 4 months ago
superman d3da23ed00 Merge pull request #9665 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 4 months ago
superman c99acd797b Merge pull request #9664 in DEC/decision-webui-dcm from final/11.0 to release/11.0 4 months ago
superman d8f36eff4a Merge pull request #9658 in DEC/decision-webui-dcm from release/11.0 to final/11.0 4 months ago
superman fb2842a94e Merge pull request #9641 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 4 months ago
superman 290a4c69d5 Merge pull request #9640 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 4 months ago
superman 76b699c197 Pull request #9631: 无jira任务, final/11.0 合 release/11.0 4 months ago
superman c2bce27ae6 Merge pull request #9630 in DEC/decision-webui-dcm from persist/11.0 to final/11.0 4 months ago
superman 6627357743 Merge pull request #9625 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 4 months ago
superman b066df6bd3 Merge pull request #9619 in DEC/decision-webui-dcm from bugfix/11.0 to release/11.0 4 months ago
superman 7f564a5d41 Merge pull request #9618 in DEC/decision-webui-dcm from feature/x to bugfix/11.0 4 months ago
superman a97abbc859 Merge pull request #9573 in DEC/decision-webui-dcm from final/11.0 to persist/11.0 5 months ago
superman 26dca18095 Merge pull request #9536 in DEC/decision-webui-dcm from release/11.0 to final/11.0 5 months ago
superman 997339a605 Merge pull request #9438 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 6 months ago
superman 902d026e3a Merge pull request #9437 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 6 months ago
superman 6160ca3c58 Merge pull request #9430 in DEC/decision-webui-dcm from bugfix/11.0 to release/11.0 6 months ago
superman f1c4b1a901 Merge pull request #9429 in DEC/decision-webui-dcm from feature/x to bugfix/11.0 6 months ago
superman 8a5983a808 Merge pull request #9386 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 6 months ago
superman 5ff9006436 Merge pull request #9376 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 6 months ago
superman 035b84a38e Merge pull request #9375 in DEC/decision-webui-dcm from final/11.0 to release/11.0 6 months ago
superman eeca4747fa Merge pull request #9374 in DEC/decision-webui-dcm from persist/11.0 to final/11.0 6 months ago
superman eccc736ea4 Merge pull request #9357 in DEC/decision-webui-dcm from final/11.0 to persist/11.0 6 months ago
superman f0d4110b8f Merge pull request #9343 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 6 months ago
superman 57f367d3aa Merge pull request #9304 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 6 months ago
superman 6b30b3bfb0 Merge pull request #9303 in DEC/decision-webui-dcm from final/11.0 to release/11.0 6 months ago
superman 18f979c949 Merge pull request #9297 in DEC/decision-webui-dcm from release/11.0 to final/11.0 6 months ago
superman 352753b9d2 Merge pull request #9228 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 6 months ago
superman 40e174a026 Merge pull request #9227 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 6 months ago
superman c86f19349c Pull request #9218: 无jira任务, final/11.0 合 release/11.0 7 months ago
superman 5d9c786518 Merge pull request #9217 in DEC/decision-webui-dcm from persist/11.0 to final/11.0 7 months ago
superman 02ecf42291 Merge pull request #9212 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 7 months ago
superman a674710088 Merge pull request #9211 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 7 months ago
superman 075ae092ee Merge pull request #9204 in DEC/decision-webui-dcm from bugfix/11.0 to release/11.0 7 months ago
superman c22217e22d Merge pull request #9203 in DEC/decision-webui-dcm from feature/x to bugfix/11.0 7 months ago
superman 6db3736016 Merge pull request #9109 in DEC/decision-webui-dcm from final/11.0 to persist/11.0 8 months ago
superman 7af9ee3416 Merge pull request #9053 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 8 months ago
superman 816138af57 Merge pull request #9052 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 8 months ago
superman 4e63da2f29 Merge pull request #9051 in DEC/decision-webui-dcm from final/11.0 to release/11.0 8 months ago
superman ae401046cf Merge pull request #9045 in DEC/decision-webui-dcm from release/11.0 to final/11.0 8 months ago
superman 2c44d7237b Merge pull request #8963 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 8 months ago
superman d99170420d Merge pull request #8962 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 8 months ago
superman 9c32107d5b Merge pull request #8954 in DEC/decision-webui-dcm from bugfix/11.0 to release/11.0 8 months ago
superman b5e1c42b82 Merge pull request #8953 in DEC/decision-webui-dcm from feature/x to bugfix/11.0 8 months ago
superman c64b818d3d Merge pull request #8869 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 9 months ago
superman 4aeb240a0b Merge pull request #8868 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 9 months ago
superman 102c82fc62 Merge pull request #8867 in DEC/decision-webui-dcm from final/11.0 to release/11.0 9 months ago
superman d151d15312 Merge pull request #8866 in DEC/decision-webui-dcm from persist/11.0 to final/11.0 9 months ago
superman 76b313752f Merge pull request #8850 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 9 months ago
superman 3bd58876a6 Merge pull request #8849 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 9 months ago
superman 4fcb12556b Merge pull request #8848 in DEC/decision-webui-dcm from final/11.0 to release/11.0 9 months ago
superman e76754f5b2 Merge pull request #8842 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 9 months ago
superman 6a6ff1c1a6 Merge pull request #8841 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 9 months ago
superman 3aee05d032 Merge pull request #8839 in DEC/decision-webui-dcm from final/11.0 to release/11.0 9 months ago
superman 4d35886a75 Merge pull request #8790 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 9 months ago
superman 0e8af1c8f2 Merge pull request #8789 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 9 months ago
superman 2da1fec841 Merge pull request #8788 in DEC/decision-webui-dcm from final/11.0 to release/11.0 9 months ago
superman aaa86e2fdd Merge pull request #8773 in DEC/decision-webui-dcm from bugfix/11.0 to feature/x 9 months ago
superman 90e9f66923 Merge pull request #8772 in DEC/decision-webui-dcm from release/11.0 to bugfix/11.0 9 months ago
  1. 2
      assets/scripts/dec.js
  2. 10
      src/modules/constants/env.ts
  3. 6
      src/modules/crud/api.ts
  4. 52
      src/modules/crud/decision.api.ts
  5. 3
      src/modules/pages/maintain/maintain.ts
  6. 4
      types/globals.d.ts

2
assets/scripts/dec.js

@ -16,8 +16,6 @@ window.DecCst = {
EditStatusEvent: {
OPEN: 'getConnectionStatus',
SHUTDOWN: 'shutdownConnectionStatus',
CONNECTION_EDITED: 'connectionEdited',
CONNECTION_RELEASED: 'connectionReleased',
}
},
Hyperlink: {

10
src/modules/constants/env.ts

@ -9,12 +9,10 @@ export const connectionType: {
JNDI: string;
} = DecCst.Connect.ConnectionType;
export const editStatusEvent = {
OPEN: 'getConnectionStatus',
SHUTDOWN: 'shutdownConnectionStatus',
CONNECTION_EDITED: 'connectionEdited',
CONNECTION_RELEASED: 'connectionReleased',
};
export const editStatusEvent: {
OPEN: string;
SHUTDOWN: string;
} = DecCst.Connect.EditStatusEvent;
export const errorCode: {
CONNECTION_DELETED: string;

6
src/modules/crud/api.ts

@ -75,12 +75,6 @@ export interface Api {
*/
getConnectionStatus(name: string): Promise<SocketResult>;
/**
*
* @param name
*/
setEditedConnectionStatus(name: string): void;
/**
*
* @param name

52
src/modules/crud/decision.api.ts

@ -82,20 +82,11 @@ export class DecisionApi implements Api {
}
getConnectionStatus(name: string): Promise<SocketResult> {
// TODO: 当前emit同步回调已无法执行
this.sendEditStatusEvent(name, editStatusEvent.OPEN);
if (!Dec.socket?.connected) {
return Promise.resolve({ data: 'success' });
}
return new Promise((resolve, rejected) => {
this.addEventListener(editStatusEvent.OPEN, res => {
const data = JSON.parse(res.data);
if (data.errorCode) {
return this.sendEditStatusEvent(name, editStatusEvent.OPEN)
.then(re => {
if (re.errorCode) {
let errorMessage = '';
switch (data.errorCode) {
switch (re.errorCode) {
case errorCode.CONNECTION_DELETED:
errorMessage = 'Dec-Dcm_Connection_Deleted';
break;
@ -103,30 +94,29 @@ export class DecisionApi implements Api {
errorMessage = 'Dec-Dcm_Connection_Is_Using';
break;
default:
errorMessage = data.errorMessage;
errorMessage = re.errorMsg;
break;
}
BI.Msg.toast(BI.i18nText(errorMessage, data.errorMessage), {
BI.Msg.toast(BI.i18nText(errorMessage, re.errorMsg), {
level: 'error',
});
rejected(data);
throw re;
} else {
resolve(res);
return re;
}
});
});
}
setEditedConnectionStatus(name: string): Promise<SocketResult> {
return this.sendEditStatusEvent(name, editStatusEvent.CONNECTION_EDITED);
}
shutdownConnectionStatus(name: string): Promise<SocketResult> {
return this.sendEditStatusEvent(name, editStatusEvent.CONNECTION_RELEASED);
return this.sendEditStatusEvent(name, editStatusEvent.SHUTDOWN);
}
getSocketStatus(): boolean {
return !!Dec?.socket?.connected;
if (Dec) {
return Dec.socket.connected;
}
return false;
}
isDriverError(errorCode: string) {
@ -174,8 +164,8 @@ export class DecisionApi implements Api {
private sendEditStatusEvent(name: string, type: string): Promise<SocketResult> {
return new Promise(resolve => {
if (Dec?.socket?.connected) {
Dec.socket.emit(type, BI.encode(name), (re: any) => {
if (Dec && Dec.socket.connected) {
Dec.socketEmit(type, BI.encode(name), (re: any) => {
resolve(re);
});
} else {
@ -183,14 +173,4 @@ export class DecisionApi implements Api {
}
});
}
private addEventListener(name: string, callback: Function) {
if (!Dec.socket) return;
if (Dec.socket.hasListeners(name)) {
Dec.socket.removeListener(name);
}
Dec.socket.originOn(name, callback);
}
}

3
src/modules/pages/maintain/maintain.ts

@ -81,9 +81,6 @@ export class Maintain extends BI.Widget {
});
this.socketTip.setVisible(true);
}
this.model.connectionSelectedOne
&& api.setEditedConnectionStatus(this.model.connectionSelectedOne.connectionName);
}
private renderItems() {

4
types/globals.d.ts vendored

@ -11,10 +11,6 @@ declare const Dec: {
fineServletURL: string;
socket: {
connected: boolean;
emit: Function;
originOn: Function;
hasListeners: Function;
removeListener: Function;
};
system: {};
personal: {

Loading…
Cancel
Save