underpost 2.8.62 → 2.8.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +9 -10
- package/bin/build.js +2 -2
- package/bin/deploy.js +40 -2
- package/bin/index.js +39 -18
- package/docker-compose.yml +1 -1
- package/package.json +2 -9
- package/src/api/default/default.service.js +1 -1
- package/src/api/user/user.service.js +14 -11
- package/src/cli/cluster.js +45 -2
- package/src/cli/cron.js +39 -8
- package/src/cli/db.js +18 -8
- package/src/cli/deploy.js +173 -80
- package/src/cli/fs.js +7 -6
- package/src/cli/image.js +39 -101
- package/src/cli/monitor.js +182 -0
- package/src/cli/repository.js +5 -2
- package/src/client/components/core/Account.js +28 -24
- package/src/client/components/core/Blockchain.js +1 -1
- package/src/client/components/core/CalendarCore.js +14 -84
- package/src/client/components/core/CommonJs.js +2 -1
- package/src/client/components/core/Css.js +0 -1
- package/src/client/components/core/CssCore.js +10 -2
- package/src/client/components/core/Docs.js +1 -1
- package/src/client/components/core/EventsUI.js +3 -3
- package/src/client/components/core/FileExplorer.js +86 -78
- package/src/client/components/core/LoadingAnimation.js +1 -17
- package/src/client/components/core/LogIn.js +3 -3
- package/src/client/components/core/LogOut.js +1 -1
- package/src/client/components/core/Modal.js +12 -7
- package/src/client/components/core/Panel.js +19 -61
- package/src/client/components/core/PanelForm.js +13 -22
- package/src/client/components/core/Recover.js +3 -3
- package/src/client/components/core/RichText.js +1 -11
- package/src/client/components/core/Router.js +3 -1
- package/src/client/components/core/SignUp.js +2 -2
- package/src/client/components/default/RoutesDefault.js +3 -2
- package/src/client/services/default/default.management.js +45 -38
- package/src/client/ssr/Render.js +2 -0
- package/src/index.js +18 -2
- package/src/mailer/MailerProvider.js +3 -0
- package/src/runtime/lampp/Dockerfile +65 -0
- package/src/server/conf.js +89 -1
- package/src/server/dns.js +9 -1
- package/src/server/json-schema.js +77 -0
- package/src/server/network.js +7 -122
- package/src/server/peer.js +2 -2
- package/src/server/proxy.js +4 -4
- package/src/server/runtime.js +22 -11
- package/src/server/start.js +123 -0
- package/src/server/valkey.js +25 -11
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { loadReplicas, pathPortAssignmentFactory } from '../server/conf.js';
|
|
2
|
+
import { loggerFactory } from '../server/logger.js';
|
|
3
|
+
import UnderpostDeploy from './deploy.js';
|
|
4
|
+
import axios from 'axios';
|
|
5
|
+
import UnderpostRootEnv from './env.js';
|
|
6
|
+
import fs from 'fs-extra';
|
|
7
|
+
import { shellExec } from '../server/process.js';
|
|
8
|
+
|
|
9
|
+
const logger = loggerFactory(import.meta);
|
|
10
|
+
|
|
11
|
+
class UnderpostMonitor {
|
|
12
|
+
static API = {
|
|
13
|
+
async callback(
|
|
14
|
+
deployId,
|
|
15
|
+
env = 'development',
|
|
16
|
+
options = { now: false, single: false, msInterval: '', type: '' },
|
|
17
|
+
auxRouter,
|
|
18
|
+
) {
|
|
19
|
+
if (deployId === 'dd' && fs.existsSync(`./engine-private/deploy/dd.router`)) {
|
|
20
|
+
for (const _deployId of fs.readFileSync(`./engine-private/deploy/dd.router`, 'utf8').split(','))
|
|
21
|
+
UnderpostMonitor.API.callback(
|
|
22
|
+
_deployId.trim(),
|
|
23
|
+
env,
|
|
24
|
+
options,
|
|
25
|
+
await UnderpostDeploy.API.routerFactory(_deployId, env),
|
|
26
|
+
);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const router = auxRouter ?? (await UnderpostDeploy.API.routerFactory(deployId, env));
|
|
31
|
+
|
|
32
|
+
const confServer = loadReplicas(
|
|
33
|
+
JSON.parse(fs.readFileSync(`./engine-private/conf/${deployId}/conf.server.json`, 'utf8')),
|
|
34
|
+
'proxy',
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const pathPortAssignmentData = pathPortAssignmentFactory(router, confServer);
|
|
38
|
+
|
|
39
|
+
logger.info(`${deployId} ${env}`, pathPortAssignmentData);
|
|
40
|
+
|
|
41
|
+
let errorPayloads = [];
|
|
42
|
+
let traffic = 'blue';
|
|
43
|
+
const maxAttempts = Object.keys(pathPortAssignmentData)
|
|
44
|
+
.map((host) => pathPortAssignmentData[host].length)
|
|
45
|
+
.reduce((accumulator, value) => accumulator + value, 0);
|
|
46
|
+
|
|
47
|
+
const monitor = async (reject) => {
|
|
48
|
+
logger.info(`[${deployId}-${env}] Check server health`);
|
|
49
|
+
for (const host of Object.keys(pathPortAssignmentData)) {
|
|
50
|
+
for (const instance of pathPortAssignmentData[host]) {
|
|
51
|
+
const { port, path } = instance;
|
|
52
|
+
if (path.match('peer') || path.match('socket')) continue;
|
|
53
|
+
let urlTest = `http://localhost:${port}${path}`;
|
|
54
|
+
switch (options.type) {
|
|
55
|
+
case 'blue-green':
|
|
56
|
+
urlTest = `https://${host}${path}`;
|
|
57
|
+
break;
|
|
58
|
+
|
|
59
|
+
default:
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
// logger.info('Test instance', urlTest);
|
|
63
|
+
await axios.get(urlTest, { timeout: 10000 }).catch((error) => {
|
|
64
|
+
// console.log(error);
|
|
65
|
+
const errorPayload = {
|
|
66
|
+
urlTest,
|
|
67
|
+
host,
|
|
68
|
+
port,
|
|
69
|
+
path,
|
|
70
|
+
name: error.name,
|
|
71
|
+
status: error.status,
|
|
72
|
+
code: error.code,
|
|
73
|
+
errors: error.errors,
|
|
74
|
+
};
|
|
75
|
+
if (errorPayload.status !== 404) {
|
|
76
|
+
errorPayloads.push(errorPayload);
|
|
77
|
+
if (errorPayloads.length >= maxAttempts) {
|
|
78
|
+
const message = JSON.stringify(errorPayloads, null, 4);
|
|
79
|
+
logger.error(
|
|
80
|
+
`Deployment ${deployId} ${env} has been reached max attempts error payloads`,
|
|
81
|
+
errorPayloads,
|
|
82
|
+
);
|
|
83
|
+
switch (options.type) {
|
|
84
|
+
case 'blue-green':
|
|
85
|
+
{
|
|
86
|
+
const confServer = JSON.parse(
|
|
87
|
+
fs.readFileSync(`./engine-private/conf/${deployId}/conf.server.json`, 'utf8'),
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
for (const host of Object.keys(confServer)) {
|
|
91
|
+
shellExec(`sudo kubectl delete HTTPProxy ${host}`);
|
|
92
|
+
}
|
|
93
|
+
shellExec(`sudo kubectl rollout restart deployment/${deployId}-${env}-${traffic}`);
|
|
94
|
+
|
|
95
|
+
if (traffic === 'blue') traffic = 'green';
|
|
96
|
+
else traffic = 'blue';
|
|
97
|
+
|
|
98
|
+
shellExec(
|
|
99
|
+
`node bin deploy --info-router --build-manifest --traffic ${traffic} ${deployId} ${env}`,
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
shellExec(`sudo kubectl apply -f ./engine-private/conf/${deployId}/build/${env}/proxy.yaml`);
|
|
103
|
+
errorPayloads = [];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
break;
|
|
107
|
+
|
|
108
|
+
default:
|
|
109
|
+
if (reject) reject(message);
|
|
110
|
+
else throw new Error(message);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
logger.error('Error accumulator', errorPayloads.length);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
if (options.now === true) await monitor();
|
|
120
|
+
if (options.single === true) return;
|
|
121
|
+
let optionsMsTimeout = parseInt(options.msInterval);
|
|
122
|
+
if (isNaN(optionsMsTimeout)) optionsMsTimeout = 30000;
|
|
123
|
+
let monitorTrafficName;
|
|
124
|
+
let monitorPodName;
|
|
125
|
+
const monitorCallBack = (resolve, reject) => {
|
|
126
|
+
const envMsTimeout = UnderpostRootEnv.API.get(`${deployId}-${env}-monitor-ms`);
|
|
127
|
+
setTimeout(
|
|
128
|
+
async () => {
|
|
129
|
+
switch (options.type) {
|
|
130
|
+
case 'blue-green':
|
|
131
|
+
{
|
|
132
|
+
if (monitorTrafficName !== traffic) {
|
|
133
|
+
monitorTrafficName = undefined;
|
|
134
|
+
monitorPodName = undefined;
|
|
135
|
+
}
|
|
136
|
+
const cmd = `underpost config get container-status`;
|
|
137
|
+
const checkDeploymentReadyStatus = () => {
|
|
138
|
+
const [podName] = UnderpostDeploy.API.get(`${deployId}-${env}-${traffic}`);
|
|
139
|
+
if (
|
|
140
|
+
shellExec(`sudo kubectl exec -i ${podName} -- sh -c "${cmd}"`, { stdout: true }).match(
|
|
141
|
+
`${deployId}-${env}-running-deployment`,
|
|
142
|
+
)
|
|
143
|
+
) {
|
|
144
|
+
monitorPodName = podName;
|
|
145
|
+
monitorTrafficName = `${traffic}`;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
if (!monitorPodName) {
|
|
149
|
+
checkDeploymentReadyStatus();
|
|
150
|
+
monitorCallBack(resolve, reject);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
break;
|
|
156
|
+
|
|
157
|
+
default:
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
switch (UnderpostRootEnv.API.get(`${deployId}-${env}-monitor-input`)) {
|
|
161
|
+
case 'pause':
|
|
162
|
+
monitorCallBack(resolve, reject);
|
|
163
|
+
return;
|
|
164
|
+
case 'restart':
|
|
165
|
+
return reject();
|
|
166
|
+
case 'stop':
|
|
167
|
+
return resolve();
|
|
168
|
+
default:
|
|
169
|
+
await monitor(reject);
|
|
170
|
+
monitorCallBack(resolve, reject);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
!isNaN(envMsTimeout) ? envMsTimeout : optionsMsTimeout,
|
|
175
|
+
);
|
|
176
|
+
};
|
|
177
|
+
return new Promise((...args) => monitorCallBack(...args));
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export default UnderpostMonitor;
|
package/src/cli/repository.js
CHANGED
|
@@ -4,7 +4,7 @@ import { pbcopy, shellExec } from '../server/process.js';
|
|
|
4
4
|
import { actionInitLog, loggerFactory } from '../server/logger.js';
|
|
5
5
|
import fs from 'fs-extra';
|
|
6
6
|
import { getNpmRootPath } from '../server/conf.js';
|
|
7
|
-
import
|
|
7
|
+
import UnderpostStartUp from '../server/start.js';
|
|
8
8
|
|
|
9
9
|
dotenv.config();
|
|
10
10
|
|
|
@@ -78,7 +78,10 @@ class UnderpostRepository {
|
|
|
78
78
|
return new Promise(async (resolve, reject) => {
|
|
79
79
|
try {
|
|
80
80
|
await logger.setUpInfo();
|
|
81
|
-
if (repositoryName === 'service')
|
|
81
|
+
if (repositoryName === 'service')
|
|
82
|
+
return resolve(
|
|
83
|
+
await UnderpostStartUp.API.listenPortController(UnderpostStartUp.API.listenServerFactory(), ':'),
|
|
84
|
+
);
|
|
82
85
|
else actionInitLog();
|
|
83
86
|
const exeRootPath = `${getNpmRootPath()}/underpost`;
|
|
84
87
|
const destFolder = `./${repositoryName}`;
|
|
@@ -151,23 +151,27 @@ const Account = {
|
|
|
151
151
|
// s(`.btn-close-modal-account`).click();
|
|
152
152
|
s(`.main-btn-recover`).click();
|
|
153
153
|
};
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
154
|
+
EventsUI.onClick(
|
|
155
|
+
`.btn-account-delete-confirm`,
|
|
156
|
+
async (e) => {
|
|
157
|
+
e.preventDefault();
|
|
158
|
+
const confirmResult = await Modal.RenderConfirm({
|
|
159
|
+
html: async () => {
|
|
160
|
+
return html`
|
|
161
|
+
<div class="in section-mp" style="text-align: center">
|
|
162
|
+
${Translate.Render('confirm-delete-account')}
|
|
163
|
+
</div>
|
|
164
|
+
`;
|
|
165
|
+
},
|
|
166
|
+
id: 'delete-account-modal',
|
|
167
|
+
});
|
|
168
|
+
if (confirmResult.status === 'cancelled') return;
|
|
169
|
+
s(`.btn-account-delete-confirm`).classList.add('hide');
|
|
170
|
+
s(`.btn-account-delete`).classList.remove('hide');
|
|
171
|
+
s(`.btn-account-delete`).click();
|
|
172
|
+
},
|
|
173
|
+
{ context: 'modal' },
|
|
174
|
+
);
|
|
171
175
|
EventsUI.onClick(`.btn-account-delete`, async (e) => {
|
|
172
176
|
e.preventDefault();
|
|
173
177
|
const result = await UserService.delete({ id: user._id });
|
|
@@ -178,7 +182,7 @@ const Account = {
|
|
|
178
182
|
s(`.btn-account-delete-confirm`).classList.remove('hide');
|
|
179
183
|
s(`.btn-account-delete`).classList.add('hide');
|
|
180
184
|
if (result.status === 'success') {
|
|
181
|
-
|
|
185
|
+
Modal.onHomeRouterEvent();
|
|
182
186
|
await Auth.sessionOut();
|
|
183
187
|
}
|
|
184
188
|
});
|
|
@@ -200,7 +204,7 @@ const Account = {
|
|
|
200
204
|
disabled: false,
|
|
201
205
|
extension: async () =>
|
|
202
206
|
html`${await BtnIcon.Render({
|
|
203
|
-
class: `wfa btn-input-extension btn-account-update-username`,
|
|
207
|
+
class: `in wfa btn-input-extension btn-account-update-username`,
|
|
204
208
|
type: 'button',
|
|
205
209
|
style: 'text-align: left',
|
|
206
210
|
label: html`${Translate.Render(`update`)}`,
|
|
@@ -219,7 +223,7 @@ const Account = {
|
|
|
219
223
|
extension: !(options && options.disabled && options.disabled.includes('emailConfirm'))
|
|
220
224
|
? async () => html`<div class="in verify-email-status"></div>
|
|
221
225
|
${await BtnIcon.Render({
|
|
222
|
-
class: `wfa btn-input-extension btn-confirm-email`,
|
|
226
|
+
class: `in wfa btn-input-extension btn-confirm-email`,
|
|
223
227
|
type: 'button',
|
|
224
228
|
style: 'text-align: left',
|
|
225
229
|
label: html`<div class="in">
|
|
@@ -242,7 +246,7 @@ const Account = {
|
|
|
242
246
|
disabledEye: true,
|
|
243
247
|
extension: async () =>
|
|
244
248
|
html`${await BtnIcon.Render({
|
|
245
|
-
class: `wfa btn-input-extension btn-account-change-password`,
|
|
249
|
+
class: `in wfa btn-input-extension btn-account-change-password`,
|
|
246
250
|
type: 'button',
|
|
247
251
|
style: 'text-align: left',
|
|
248
252
|
label: html`${Translate.Render(`change-password`)}`,
|
|
@@ -252,7 +256,7 @@ const Account = {
|
|
|
252
256
|
${options?.bottomRender ? await options.bottomRender() : ``}
|
|
253
257
|
<div class="in hide">
|
|
254
258
|
${await BtnIcon.Render({
|
|
255
|
-
class: 'section-mp form-button btn-account',
|
|
259
|
+
class: 'in section-mp form-button btn-account',
|
|
256
260
|
label: Translate.Render('update'),
|
|
257
261
|
type: 'submit',
|
|
258
262
|
})}
|
|
@@ -260,13 +264,13 @@ const Account = {
|
|
|
260
264
|
</form>
|
|
261
265
|
<div class="in">
|
|
262
266
|
${await BtnIcon.Render({
|
|
263
|
-
class: 'section-mp form-button btn-account-delete hide',
|
|
267
|
+
class: 'in section-mp form-button btn-account-delete hide',
|
|
264
268
|
label: html` ${Translate.Render(`delete-account`)}`,
|
|
265
269
|
type: 'button',
|
|
266
270
|
style: 'color: #5f5f5f',
|
|
267
271
|
})}
|
|
268
272
|
${await BtnIcon.Render({
|
|
269
|
-
class: 'section-mp form-button btn-account-delete-confirm',
|
|
273
|
+
class: 'in section-mp form-button btn-account-delete-confirm',
|
|
270
274
|
label: html` ${Translate.Render(`delete-account`)}`,
|
|
271
275
|
type: 'button',
|
|
272
276
|
style: 'color: #5f5f5f',
|
|
@@ -25,7 +25,7 @@ const BlockChainManagement = {
|
|
|
25
25
|
placeholder: true,
|
|
26
26
|
})}
|
|
27
27
|
${await BtnIcon.Render({
|
|
28
|
-
class: `section-mp btn-custom btn-upload-blockchain`,
|
|
28
|
+
class: `inl section-mp btn-custom btn-upload-blockchain`,
|
|
29
29
|
label: html`<i class="fas fa-plus"></i> ${Translate.Render(`create`)}`,
|
|
30
30
|
})}
|
|
31
31
|
</div>
|
|
@@ -40,18 +40,6 @@ const CalendarCore = {
|
|
|
40
40
|
|
|
41
41
|
const titleIcon = html`<i class="fas fa-calendar-alt"></i>`;
|
|
42
42
|
|
|
43
|
-
const getSrrData = () => {
|
|
44
|
-
this.Data[options.idModal].data = range(0, 5).map((i) => {
|
|
45
|
-
return {
|
|
46
|
-
id: `event-${i}`,
|
|
47
|
-
description: `Event ${s4()}${s4()}${s4()}`,
|
|
48
|
-
start: new Date().toTimeString(),
|
|
49
|
-
end: new Date().toTimeString(),
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
getSrrData();
|
|
54
|
-
|
|
55
43
|
const getPanelData = async () => {
|
|
56
44
|
const result = await EventSchedulerService.get({
|
|
57
45
|
id: `${getQueryParams().cid ? getQueryParams().cid : Auth.getToken() ? 'creatorUser' : ''}`,
|
|
@@ -235,35 +223,9 @@ const CalendarCore = {
|
|
|
235
223
|
];
|
|
236
224
|
|
|
237
225
|
setTimeout(() => {
|
|
238
|
-
const resizeModal = () => {
|
|
239
|
-
Modal.Data[options.idModal].onObserverListener[options.idModal] = () => {
|
|
240
|
-
if (s(`.main-body-calendar-${options.idModal}`))
|
|
241
|
-
s(`.main-body-calendar-${options.idModal}`).style.height = `${
|
|
242
|
-
s(`.${options.idModal}`).offsetHeight - Modal.headerTitleHeight
|
|
243
|
-
}px`;
|
|
244
|
-
};
|
|
245
|
-
Modal.Data[options.idModal].onObserverListener[options.idModal]();
|
|
246
|
-
};
|
|
247
|
-
setTimeout(resizeModal);
|
|
248
|
-
RouterEvents[`${options.idModal}-main-body`] = ({ route }) => {
|
|
249
|
-
if (route === 'calendar') {
|
|
250
|
-
setTimeout(() => {
|
|
251
|
-
resizeModal();
|
|
252
|
-
}, 400);
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
|
|
256
226
|
s(`.close-calendar-container`).onclick = () => {
|
|
257
227
|
s(`.calendar-container`).classList.add('hide');
|
|
258
228
|
s(`.main-body-calendar-${options.idModal}`).classList.remove('hide');
|
|
259
|
-
htmls(
|
|
260
|
-
`.style-calendar`,
|
|
261
|
-
html`<style>
|
|
262
|
-
.modal-calendar {
|
|
263
|
-
overflow: hidden;
|
|
264
|
-
}
|
|
265
|
-
</style>`,
|
|
266
|
-
);
|
|
267
229
|
};
|
|
268
230
|
});
|
|
269
231
|
|
|
@@ -305,14 +267,6 @@ const CalendarCore = {
|
|
|
305
267
|
// renderCalendar();
|
|
306
268
|
CalendarCore.Data[options.idModal].calendar.setOption('height', 700);
|
|
307
269
|
Translate.Event['fullcalendar-lang']();
|
|
308
|
-
htmls(
|
|
309
|
-
`.style-calendar`,
|
|
310
|
-
html`<style>
|
|
311
|
-
.modal-calendar {
|
|
312
|
-
overflow: auto;
|
|
313
|
-
}
|
|
314
|
-
</style>`,
|
|
315
|
-
);
|
|
316
270
|
},
|
|
317
271
|
},
|
|
318
272
|
],
|
|
@@ -404,16 +358,11 @@ const CalendarCore = {
|
|
|
404
358
|
<div class="in" style="margin-bottom: 100px"></div>`;
|
|
405
359
|
};
|
|
406
360
|
|
|
407
|
-
let
|
|
361
|
+
let lastCid;
|
|
408
362
|
this.Data[options.idModal].updatePanel = async () => {
|
|
409
|
-
if (delayBlock) return;
|
|
410
|
-
else {
|
|
411
|
-
delayBlock = true;
|
|
412
|
-
setTimeout(() => {
|
|
413
|
-
delayBlock = false;
|
|
414
|
-
}, 500);
|
|
415
|
-
}
|
|
416
363
|
const cid = getQueryParams().cid ? getQueryParams().cid : '';
|
|
364
|
+
if (lastCid === cid) return;
|
|
365
|
+
lastCid = cid;
|
|
417
366
|
if (options.route === 'home') Modal.homeCid = newInstance(cid);
|
|
418
367
|
if (s(`.main-body-calendar-${options.idModal}`)) {
|
|
419
368
|
// if (Auth.getToken())
|
|
@@ -423,39 +372,22 @@ const CalendarCore = {
|
|
|
423
372
|
}
|
|
424
373
|
};
|
|
425
374
|
|
|
426
|
-
if (options.route)
|
|
375
|
+
if (options.route) {
|
|
427
376
|
listenQueryPathInstance({
|
|
428
377
|
id: options.parentIdModal ? 'html-' + options.parentIdModal : 'main-body',
|
|
429
378
|
routeId: options.route,
|
|
430
379
|
event: async (path) => {
|
|
431
|
-
|
|
432
|
-
CalendarCore.Data[options.idModal].updatePanel();
|
|
433
|
-
});
|
|
380
|
+
CalendarCore.Data[options.idModal].updatePanel();
|
|
434
381
|
},
|
|
435
382
|
});
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
383
|
+
if (!options.parentIdModal)
|
|
384
|
+
Modal.Data['modal-menu'].onHome[idPanel] = async () => {
|
|
385
|
+
lastCid = undefined;
|
|
386
|
+
setQueryPath({ path: options.route, queryPath: '' });
|
|
387
|
+
await this.Data[idPanel].updatePanel();
|
|
388
|
+
};
|
|
389
|
+
}
|
|
442
390
|
return html`
|
|
443
|
-
<style>
|
|
444
|
-
.main-body-calendar-${options.idModal} {
|
|
445
|
-
overflow: auto;
|
|
446
|
-
}
|
|
447
|
-
.${idPanel}-form {
|
|
448
|
-
max-width: 750px !important;
|
|
449
|
-
}
|
|
450
|
-
</style>
|
|
451
|
-
<div class="style-calendar">
|
|
452
|
-
<style>
|
|
453
|
-
.modal-calendar {
|
|
454
|
-
overflow: hidden;
|
|
455
|
-
}
|
|
456
|
-
</style>
|
|
457
|
-
</div>
|
|
458
|
-
|
|
459
391
|
<div class="in main-body-calendar-${options.idModal}">${await panelRender()}</div>
|
|
460
392
|
<style>
|
|
461
393
|
.calendar-container {
|
|
@@ -513,15 +445,13 @@ const CalendarCore = {
|
|
|
513
445
|
|
|
514
446
|
.calendar-buttons-container {
|
|
515
447
|
padding-bottom: 15px;
|
|
516
|
-
top: ${Modal.headerTitleHeight}px;
|
|
517
448
|
height: 60px;
|
|
518
|
-
z-index: 4;
|
|
519
449
|
}
|
|
520
450
|
</style>
|
|
521
451
|
<div class="in calendar-container hide">
|
|
522
|
-
<div class="
|
|
452
|
+
<div class="in modal calendar-buttons-container">
|
|
523
453
|
${await BtnIcon.Render({
|
|
524
|
-
class: `section-mp btn-custom close-calendar-container flr`,
|
|
454
|
+
class: `inl section-mp btn-custom close-calendar-container flr`,
|
|
525
455
|
label: html`<i class="fa-solid fa-xmark"></i> ${Translate.Render('close')}`,
|
|
526
456
|
type: 'button',
|
|
527
457
|
})}
|
|
@@ -761,7 +761,6 @@ const renderWave = ({ id }) => {
|
|
|
761
761
|
const cssTokensEffect = {};
|
|
762
762
|
const cssTokensContainer = {};
|
|
763
763
|
const cssEffect = async (containerSelector, event) => {
|
|
764
|
-
return;
|
|
765
764
|
// Array.from(event.target.classList)
|
|
766
765
|
let offsetX, offsetY;
|
|
767
766
|
if (Array.from(event.srcElement.classList).includes('ripple') && cssTokensContainer[containerSelector]) {
|
|
@@ -396,7 +396,8 @@ const CssCoreDark = {
|
|
|
396
396
|
text-align: center;
|
|
397
397
|
background: #1a1a1a;
|
|
398
398
|
font-size: 17px;
|
|
399
|
-
height:
|
|
399
|
+
height: 30px;
|
|
400
|
+
padding: 5px 0px 5px 0px;
|
|
400
401
|
}
|
|
401
402
|
::placeholder {
|
|
402
403
|
color: #c6c4c4;
|
|
@@ -471,6 +472,7 @@ const CssCoreDark = {
|
|
|
471
472
|
width: 260px;
|
|
472
473
|
font-size: 20px;
|
|
473
474
|
padding: 10px;
|
|
475
|
+
min-height: 45px;
|
|
474
476
|
}
|
|
475
477
|
.toggle-form-container {
|
|
476
478
|
border: 2px solid #313131;
|
|
@@ -494,6 +496,7 @@ const CssCoreDark = {
|
|
|
494
496
|
font-size: 20px;
|
|
495
497
|
padding: 10px;
|
|
496
498
|
text-align: center;
|
|
499
|
+
min-height: 45px;
|
|
497
500
|
}
|
|
498
501
|
.drop-zone-file-explorer {
|
|
499
502
|
min-height: 300px;
|
|
@@ -521,6 +524,7 @@ const CssCoreDark = {
|
|
|
521
524
|
margin: 5px 0 0 0;
|
|
522
525
|
padding: 5px;
|
|
523
526
|
font-size: 16px;
|
|
527
|
+
min-height: 40px;
|
|
524
528
|
}
|
|
525
529
|
.btn-input-extension:hover {
|
|
526
530
|
}
|
|
@@ -700,7 +704,8 @@ const CssCoreLight = {
|
|
|
700
704
|
text-align: center;
|
|
701
705
|
background: #eaeaea;
|
|
702
706
|
font-size: 17px;
|
|
703
|
-
height:
|
|
707
|
+
height: 30px;
|
|
708
|
+
padding: 5px 0px 5px 0px;
|
|
704
709
|
}
|
|
705
710
|
::placeholder {
|
|
706
711
|
color: #333;
|
|
@@ -776,6 +781,7 @@ const CssCoreLight = {
|
|
|
776
781
|
width: 260px;
|
|
777
782
|
font-size: 20px;
|
|
778
783
|
padding: 10px;
|
|
784
|
+
min-height: 45px;
|
|
779
785
|
}
|
|
780
786
|
.toggle-form-container {
|
|
781
787
|
border-radius: 5px;
|
|
@@ -800,6 +806,7 @@ const CssCoreLight = {
|
|
|
800
806
|
font-size: 20px;
|
|
801
807
|
padding: 10px;
|
|
802
808
|
text-align: center;
|
|
809
|
+
min-height: 45px;
|
|
803
810
|
}
|
|
804
811
|
.input-container-width {
|
|
805
812
|
cursor: pointer;
|
|
@@ -837,6 +844,7 @@ const CssCoreLight = {
|
|
|
837
844
|
margin: 5px 0 0 0;
|
|
838
845
|
padding: 5px;
|
|
839
846
|
font-size: 16px;
|
|
847
|
+
min-height: 40px;
|
|
840
848
|
}
|
|
841
849
|
.btn-input-extension:hover {
|
|
842
850
|
}
|
|
@@ -79,7 +79,7 @@ const Docs = {
|
|
|
79
79
|
icon: html`<i class="fa-brands fa-osi"></i>`,
|
|
80
80
|
text: 'Source Docs',
|
|
81
81
|
url: function () {
|
|
82
|
-
return `${getProxyPath()}docs/engine/${window.renderPayload.version}`;
|
|
82
|
+
return `${getProxyPath()}docs/engine/${window.renderPayload.version.replace('v', '')}`;
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
85
|
{
|
|
@@ -12,11 +12,11 @@ const EventsUI = {
|
|
|
12
12
|
if (!s(id)) return;
|
|
13
13
|
let complete = true;
|
|
14
14
|
s(id)[type] = async function (e) {
|
|
15
|
-
cssEffect(id, e);
|
|
15
|
+
if (options.clickEffect) cssEffect(id, e);
|
|
16
16
|
if (complete) {
|
|
17
17
|
complete = false;
|
|
18
18
|
await LoadingAnimation.spinner.play(loadingContainer ? loadingContainer : id);
|
|
19
|
-
await LoadingAnimation.bar.play(id);
|
|
19
|
+
if (options.context !== 'modal') await LoadingAnimation.bar.play(id);
|
|
20
20
|
try {
|
|
21
21
|
await logic(e);
|
|
22
22
|
} catch (error) {
|
|
@@ -26,7 +26,7 @@ const EventsUI = {
|
|
|
26
26
|
html: error?.message ? error.message : error ? error : 'Event error',
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
LoadingAnimation.bar.stop(id);
|
|
29
|
+
if (options.context !== 'modal') LoadingAnimation.bar.stop(id);
|
|
30
30
|
await LoadingAnimation.spinner.stop(loadingContainer ? loadingContainer : id);
|
|
31
31
|
complete = true;
|
|
32
32
|
return;
|