underpost 2.8.635 → 2.8.641

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.
Files changed (38) hide show
  1. package/Dockerfile +9 -10
  2. package/bin/build.js +2 -2
  3. package/bin/deploy.js +2 -1
  4. package/bin/index.js +14 -8
  5. package/docker-compose.yml +1 -1
  6. package/package.json +1 -3
  7. package/src/api/default/default.service.js +1 -1
  8. package/src/api/user/user.service.js +1 -1
  9. package/src/cli/cron.js +39 -8
  10. package/src/cli/deploy.js +63 -10
  11. package/src/cli/fs.js +7 -6
  12. package/src/cli/image.js +40 -34
  13. package/src/cli/monitor.js +62 -38
  14. package/src/client/components/core/Account.js +25 -21
  15. package/src/client/components/core/Blockchain.js +1 -1
  16. package/src/client/components/core/CalendarCore.js +14 -84
  17. package/src/client/components/core/CommonJs.js +2 -1
  18. package/src/client/components/core/CssCore.js +8 -2
  19. package/src/client/components/core/EventsUI.js +2 -2
  20. package/src/client/components/core/FileExplorer.js +86 -78
  21. package/src/client/components/core/LoadingAnimation.js +1 -17
  22. package/src/client/components/core/LogIn.js +3 -3
  23. package/src/client/components/core/LogOut.js +1 -1
  24. package/src/client/components/core/Modal.js +12 -7
  25. package/src/client/components/core/Panel.js +19 -61
  26. package/src/client/components/core/PanelForm.js +13 -22
  27. package/src/client/components/core/Recover.js +3 -3
  28. package/src/client/components/core/Router.js +3 -1
  29. package/src/client/components/core/SignUp.js +2 -2
  30. package/src/client/components/default/RoutesDefault.js +3 -2
  31. package/src/client/services/default/default.management.js +45 -38
  32. package/src/client/ssr/Render.js +2 -0
  33. package/src/index.js +10 -3
  34. package/src/runtime/lampp/Dockerfile +65 -0
  35. package/src/server/dns.js +9 -1
  36. package/src/server/json-schema.js +77 -0
  37. package/src/server/network.js +7 -122
  38. package/src/server/runtime.js +1 -3
@@ -75,28 +75,12 @@ const LoadingAnimation = {
75
75
  const style = {
76
76
  'text-align': 'center',
77
77
  };
78
- if (s(container).classList) {
79
- const classes = Array.from(s(container).classList);
80
- if (classes.find((e) => e.match('management-table-btn-mini'))) {
81
- style.top = '-2px';
82
- style.left = '-2px';
83
- } else if (classes.find((e) => e.match('-btn-tool'))) {
84
- style.top = '-26px';
85
- style.left = '-10px';
86
- } else if (classes.find((e) => e.match('main-btn-')) && !classes.find((e) => e.match('main-btn-square-menu'))) {
87
- style.top = '-8px';
88
- style.left = '-10px';
89
- } else if (classes.find((e) => e.match('action-bar-box'))) {
90
- style.top = '-30px';
91
- style.left = '-12px';
92
- }
93
- }
94
78
 
95
79
  append(
96
80
  container,
97
81
  html`
98
82
  <div
99
- class="in ${id}"
83
+ class="abs center ${id}"
100
84
  style="${renderCssAttr({
101
85
  style,
102
86
  })}"
@@ -135,7 +135,7 @@ const LogIn = {
135
135
  return html`
136
136
  <div class="in">
137
137
  ${await BtnIcon.Render({
138
- class: 'section-mp form-button btn-log-in-i-not-have-account',
138
+ class: 'in section-mp form-button btn-log-in-i-not-have-account',
139
139
  label: html`<i class="fas fa-user-plus"></i> ${Translate.Render(`i-not-have-account`)}
140
140
  <br />
141
141
  ${Translate.Render(`sign-up`)}`,
@@ -165,7 +165,7 @@ const LogIn = {
165
165
  </div>
166
166
  <div class="in">
167
167
  ${await BtnIcon.Render({
168
- class: 'section-mp form-button btn-log-in-forgot-password',
168
+ class: 'in section-mp form-button btn-log-in-forgot-password',
169
169
  label: html`<i class="fas fa-question-circle"></i> ${Translate.Render(`forgot-password`)}`,
170
170
  type: 'button',
171
171
  })}
@@ -181,7 +181,7 @@ const LogIn = {
181
181
 
182
182
  <div class="in">
183
183
  ${await BtnIcon.Render({
184
- class: 'section-mp form-button btn-log-in',
184
+ class: 'in section-mp form-button btn-log-in',
185
185
  label: Translate.Render('log-in'),
186
186
  type: 'submit',
187
187
  })}
@@ -47,7 +47,7 @@ const LogOut = {
47
47
  return html` <form class="in">
48
48
  <div class="in">
49
49
  ${await BtnIcon.Render({
50
- class: 'section-mp btn-custom btn-log-out',
50
+ class: 'inl section-mp btn-custom btn-log-out',
51
51
  label: html`<i class="fa-solid fa-power-off"></i> ${Translate.Render('log-out')}`,
52
52
  type: 'submit',
53
53
  })}
@@ -85,6 +85,7 @@ const Modal = {
85
85
  onExpandUiListener: {},
86
86
  onBarUiOpen: {},
87
87
  onBarUiClose: {},
88
+ onHome: {},
88
89
  query: options.query ? `${window.location.search}` : undefined,
89
90
  };
90
91
  const setCenterRestore = () => {
@@ -1010,14 +1011,15 @@ const Modal = {
1010
1011
  e.preventDefault();
1011
1012
  window.history.forward();
1012
1013
  });
1013
- EventsUI.onClick(`.action-btn-home`, () => s(`.main-btn-home`).click());
1014
- EventsUI.onClick(`.action-btn-app-icon`, () => s(`.action-btn-home`).click());
1014
+ EventsUI.onClick(`.action-btn-home`, async () => {
1015
+ await Modal.onHomeRouterEvent();
1016
+ Object.keys(this.Data[idModal].onHome).map((keyListener) => this.Data[idModal].onHome[keyListener]());
1017
+ });
1018
+ EventsUI.onClick(`.action-btn-app-icon`, () => Modal.onHomeRouterEvent());
1015
1019
  Keyboard.instanceMultiPressKey({
1016
1020
  id: 'input-shortcut-global-escape',
1017
1021
  keys: ['Escape'],
1018
1022
  eventCallBack: () => {
1019
- // if (s(`.main-btn-home`)) s(`.main-btn-home`).click();
1020
-
1021
1023
  if (s(`.btn-close-${this.currentTopModalId}`)) s(`.btn-close-${this.currentTopModalId}`).click();
1022
1024
  },
1023
1025
  });
@@ -1343,7 +1345,7 @@ const Modal = {
1343
1345
  s(`.btn-icon-menu-back`).classList.add('hide');
1344
1346
  if (s(`.menu-btn-container-main`)) s(`.menu-btn-container-main`).classList.remove('hide');
1345
1347
  };
1346
- s(`.main-btn-home`).onclick = () => {
1348
+ this.onHomeRouterEvent = async () => {
1347
1349
  for (const keyModal of Object.keys(this.Data)) {
1348
1350
  if (
1349
1351
  ![idModal, 'main-body-top', 'main-body']
@@ -1357,6 +1359,9 @@ const Modal = {
1357
1359
  setPath(getProxyPath());
1358
1360
  setDocTitle({ ...options.RouterInstance, route: '' });
1359
1361
  };
1362
+ s(`.main-btn-home`).onclick = async () => {
1363
+ await this.onHomeRouterEvent();
1364
+ };
1360
1365
  EventsUI.onClick(`.btn-icon-menu-back`, backMenuButtonEvent);
1361
1366
  EventsUI.onClick(`.btn-icon-menu-mode`, () => {
1362
1367
  if (s(`.btn-icon-menu-mode-right`).classList.contains('hide')) {
@@ -1620,6 +1625,7 @@ const Modal = {
1620
1625
  ...this.Data[idModal],
1621
1626
  };
1622
1627
  },
1628
+ onHomeRouterEvent: () => {},
1623
1629
  currentTopModalId: '',
1624
1630
  zIndexSync: function ({ idModal }) {
1625
1631
  setTimeout(() => {
@@ -1731,7 +1737,7 @@ const Modal = {
1731
1737
  titleClass: 'hide',
1732
1738
  style: {
1733
1739
  width: '300px',
1734
- height: '350px',
1740
+ height: '400px',
1735
1741
  overflow: 'hidden',
1736
1742
  'z-index': '11',
1737
1743
  resize: 'none',
@@ -1765,7 +1771,6 @@ const Modal = {
1765
1771
  },
1766
1772
  headerTitleHeight: 40,
1767
1773
  actionBtnCenter: function () {
1768
- // if (!s(`.btn-close-modal-menu`).classList.contains('hide')) return s(`.main-btn-home`).click();
1769
1774
  if (!s(`.btn-close-modal-menu`).classList.contains('hide')) {
1770
1775
  return s(`.btn-close-modal-menu`).click();
1771
1776
  }
@@ -55,7 +55,7 @@ const Panel = {
55
55
  const openPanelForm = () => {
56
56
  s(`.${idPanel}-form-body`).classList.remove('hide');
57
57
  s(`.btn-${idPanel}-add`).classList.add('hide');
58
- s(`.${scrollClassContainer}`).style.overflow = 'hidden';
58
+ // s(`.${scrollClassContainer}`).style.overflow = 'hidden';
59
59
  if (options.customButtons) {
60
60
  let customBtnIndex = -1;
61
61
  for (const dataBtn of options.customButtons) {
@@ -89,12 +89,16 @@ const Panel = {
89
89
  htmls(`.${idPanel}-cell-col-a-${id}`, render);
90
90
  },
91
91
  });
92
- EventsUI.onClick(`.${idPanel}-btn-delete-${id}`, async (e) => {
93
- logger.warn('delete', obj);
94
- const { status } = await options.on.remove({ e, data: obj });
95
- if (status === 'error') return;
96
- if (s(`.${idPanel}-${id}`)) s(`.${idPanel}-${id}`).remove();
97
- });
92
+ EventsUI.onClick(
93
+ `.${idPanel}-btn-delete-${id}`,
94
+ async (e) => {
95
+ logger.warn('delete', obj);
96
+ const { status } = await options.on.remove({ e, data: obj });
97
+ if (status === 'error') return;
98
+ if (s(`.${idPanel}-${id}`)) s(`.${idPanel}-${id}`).remove();
99
+ },
100
+ { context: 'modal' },
101
+ );
98
102
  EventsUI.onClick(`.${idPanel}-btn-edit-${id}`, async () => {
99
103
  logger.warn('edit', obj);
100
104
  if (obj._id) Panel.Tokens[idPanel].editId = obj._id;
@@ -121,7 +125,7 @@ const Panel = {
121
125
  if (options.onClick) await options.onClick({ payload });
122
126
  };
123
127
  });
124
-
128
+ if (s(`.${idPanel}-${id}`)) s(`.${idPanel}-${id}`).remove();
125
129
  return html` <div class="in box-shadow ${idPanel} ${idPanel}-${id}">
126
130
  <div class="fl ${idPanel}-tools session-fl-log-in ${obj.tools ? '' : 'hide'}">
127
131
  ${await BtnIcon.Render({
@@ -244,9 +248,9 @@ const Panel = {
244
248
  };
245
249
 
246
250
  let render = '';
247
- let renderForm = html` <div class="in modal stq" style="top: 0px; z-index: 1; padding-bottom: 5px">
251
+ let renderForm = html` <div class="in modal" style="top: 0px; z-index: 1; padding-bottom: 5px">
248
252
  ${await BtnIcon.Render({
249
- class: `section-mp btn-custom btn-${idPanel}-close`,
253
+ class: `inl section-mp btn-custom btn-${idPanel}-close`,
250
254
  label: html`<i class="fa-solid fa-xmark"></i> ${Translate.Render('close')}`,
251
255
  type: 'button',
252
256
  })}
@@ -404,62 +408,19 @@ const Panel = {
404
408
  }
405
409
  let renderFormBtn = html`
406
410
  ${await BtnIcon.Render({
407
- class: `section-mp btn-custom btn-${idPanel}-submit`,
411
+ class: `inl section-mp btn-custom btn-${idPanel}-submit`,
408
412
  label: html`<span class="btn-${idPanel}-label-add"><i class="fas fa-plus"></i> ${Translate.Render('add')}</span
409
413
  ><span class="btn-${idPanel}-label-edit hide"><i class="fas fa-edit"></i> ${Translate.Render('edit')}</span>`,
410
414
  type: 'submit',
411
415
  })}
412
416
  ${await BtnIcon.Render({
413
- class: `section-mp btn-custom btn-${idPanel}-clean`,
417
+ class: `inl section-mp btn-custom btn-${idPanel}-clean`,
414
418
  label: html`<i class="fa-solid fa-broom"></i> ${Translate.Render('clear')}`,
415
419
  type: 'button',
416
420
  })}
417
421
  `;
418
422
 
419
423
  setTimeout(async () => {
420
- const resizeParentModal = () => {
421
- if (options.parentIdModal) {
422
- Modal.Data[options.parentIdModal].onObserverListener[`form-panel-${options.parentIdModal}`] = () => {
423
- if (s(`.${idPanel}-form-container`))
424
- s(`.${idPanel}-form-container`).style.maxHeight = `${
425
- s(`.${options.parentIdModal}`).offsetHeight - Modal.headerTitleHeight
426
- }px`;
427
- };
428
- Modal.Data[options.parentIdModal].onObserverListener[`form-panel-${options.parentIdModal}`]();
429
- } else {
430
- Responsive.Event[`${idPanel}-responsive`] = () => {
431
- if (s(`.${idPanel}-form-container`))
432
- s(`.${idPanel}-form-container`).style.maxHeight =
433
- options.route === 'home' &&
434
- s(`.${idPanel}-form-body`) &&
435
- !s(`.${idPanel}-form-body`).classList.contains('hide') &&
436
- !s(`.main-body-btn-ui-open`).classList.contains('hide')
437
- ? `${window.innerHeight}px`
438
- : `${window.innerHeight - heightTopBar - heightBottomBar}px`;
439
- };
440
- Responsive.Event[`${idPanel}-responsive`]();
441
- }
442
- };
443
- if (options.route === 'home') {
444
- Modal.Data['modal-menu'].onBarUiClose[`${idPanel}-responsive`] = () => {
445
- resizeParentModal();
446
- };
447
-
448
- Modal.Data['modal-menu'].onBarUiOpen[`${idPanel}-responsive`] = () => {
449
- resizeParentModal();
450
- };
451
- }
452
- setTimeout(resizeParentModal);
453
- if (options.route) {
454
- RouterEvents[options.parentIdModal] = ({ route }) => {
455
- if (route === options.route) {
456
- setTimeout(() => {
457
- resizeParentModal();
458
- }, 350);
459
- }
460
- };
461
- }
462
-
463
424
  const validators = await Validator.instance(formData);
464
425
 
465
426
  s(`.${idPanel}-form`).onsubmit = (e) => {
@@ -546,7 +507,7 @@ const Panel = {
546
507
  s(`.${btnSelector}`).onclick = () => dataBtn.onClick();
547
508
  });
548
509
  customButtonsRender += ` ${await BtnIcon.Render({
549
- class: `section-mp btn-custom ${btnSelector}`,
510
+ class: `inl section-mp btn-custom ${btnSelector}`,
550
511
  label: dataBtn.label,
551
512
  type: 'button',
552
513
  })}`;
@@ -581,7 +542,6 @@ const Panel = {
581
542
  padding: 10px;
582
543
  cursor: pointer;
583
544
  min-height: 400px;
584
- overflow: hidden;
585
545
  }
586
546
  .${idPanel}:hover {
587
547
  background: #ffffff;
@@ -651,12 +611,10 @@ const Panel = {
651
611
  }
652
612
  </style>
653
613
  <div class="${idPanel}-container">
654
- <div
655
- class="stq modal ${idPanel}-form-container ${options.formContainerClass ? options.formContainerClass : ''}"
656
- >
614
+ <div class="in modal ${idPanel}-form-container ${options.formContainerClass ? options.formContainerClass : ''}">
657
615
  <div class="in ${idPanel}-form-header">
658
616
  ${await BtnIcon.Render({
659
- class: `section-mp btn-custom btn-${idPanel}-add ${
617
+ class: `inl section-mp btn-custom btn-${idPanel}-add ${
660
618
  options?.role?.add ? (!options.role.add() ? 'hide' : '') : ''
661
619
  }`,
662
620
  label: html`<i class="fas fa-plus"></i> ${Translate.Render('add')}`,
@@ -1,4 +1,4 @@
1
- import { getCapVariableName, getId, newInstance, random, range, timer, uniqueArray } from './CommonJs.js';
1
+ import { getCapVariableName, newInstance, random, range, uniqueArray } from './CommonJs.js';
2
2
  import { marked } from 'marked';
3
3
  import {
4
4
  getBlobFromUint8ArrayFile,
@@ -12,7 +12,6 @@ import { NotificationManager } from './NotificationManager.js';
12
12
  import { DocumentService } from '../../services/document/document.service.js';
13
13
  import { FileService } from '../../services/file/file.service.js';
14
14
  import { getSrcFromFileData } from './Input.js';
15
- import { Auth } from './Auth.js';
16
15
  import { imageShimmer, renderCssAttr } from './Css.js';
17
16
  import { Translate } from './Translate.js';
18
17
  import { Modal } from './Modal.js';
@@ -383,7 +382,7 @@ const PanelForm = {
383
382
  };
384
383
  const renderSrrPanelData = async () =>
385
384
  await panelRender({
386
- data: range(0, 5).map((i) => ({
385
+ data: range(0, 0).map((i) => ({
387
386
  id: i,
388
387
  title: html`<div class="fl">
389
388
  <div
@@ -424,17 +423,12 @@ const PanelForm = {
424
423
  ssr: true,
425
424
  })),
426
425
  });
427
- let delayBlock = false;
428
426
  let firsUpdateEvent = false;
427
+ let lastCid;
429
428
  this.Data[idPanel].updatePanel = async () => {
430
- if (delayBlock) return;
431
- else {
432
- delayBlock = true;
433
- setTimeout(() => {
434
- delayBlock = false;
435
- }, 500);
436
- }
437
429
  const cid = getQueryParams().cid ? getQueryParams().cid : '';
430
+ if (lastCid === cid) return;
431
+ lastCid = cid;
438
432
  if (options.route === 'home') Modal.homeCid = newInstance(cid);
439
433
  htmls(`.${options.parentIdModal ? 'html-' + options.parentIdModal : 'main-body'}`, await renderSrrPanelData());
440
434
  await getPanelData();
@@ -447,24 +441,21 @@ const PanelForm = {
447
441
  await options.firsUpdateEvent();
448
442
  }
449
443
  };
450
- if (options.route)
444
+ if (options.route) {
451
445
  listenQueryPathInstance({
452
446
  id: options.parentIdModal ? 'html-' + options.parentIdModal : 'main-body',
453
447
  routeId: options.route,
454
448
  event: async (path) => {
455
- // if (!PanelForm.Data[idPanel].sessionIn)
456
449
  await this.Data[idPanel].updatePanel();
457
450
  },
458
451
  });
459
-
460
- // if (options.route === 'home') setTimeout(this.Data[idPanel].updatePanel);
461
- setTimeout(() => {
462
- // if (
463
- // options.route !== 'home' &&
464
- // (!PanelForm.Data[idPanel].originData || PanelForm.Data[idPanel].originData.length === 0)
465
- // )
466
- this.Data[idPanel].updatePanel();
467
- });
452
+ if (!options.parentIdModal)
453
+ Modal.Data['modal-menu'].onHome[idPanel] = async () => {
454
+ lastCid = undefined;
455
+ setQueryPath({ path: options.route, queryPath: '' });
456
+ await this.Data[idPanel].updatePanel();
457
+ };
458
+ }
468
459
 
469
460
  if (options.parentIdModal) {
470
461
  htmls(`.html-${options.parentIdModal}`, await renderSrrPanelData());
@@ -126,7 +126,7 @@ const Recover = {
126
126
  });
127
127
  return html`
128
128
  ${await BtnIcon.Render({
129
- class: 'section-mp form-button btn-recover-log-in hide',
129
+ class: 'in section-mp form-button btn-recover-log-in hide',
130
130
  label: Translate.Render('log-in'),
131
131
  type: 'button',
132
132
  })}
@@ -181,7 +181,7 @@ const Recover = {
181
181
  ${options?.bottomRender ? await options.bottomRender() : ``}
182
182
  <div class="in recover-send-btn-container">
183
183
  ${await BtnIcon.Render({
184
- class: 'section-mp form-button btn-recover',
184
+ class: 'in section-mp form-button btn-recover',
185
185
  label: Translate.Render(mode === 'recover-verify-email' ? 'send-recover-verify-email' : 'change-password'),
186
186
  type: 'button',
187
187
  })}
@@ -191,7 +191,7 @@ const Recover = {
191
191
  <i class="fa-solid fa-triangle-exclamation"></i> ${Translate.Render('15-min-valid-recover-email')}
192
192
  </div>
193
193
  ${await BtnIcon.Render({
194
- class: 'section-mp form-button btn-recover-resend',
194
+ class: 'in section-mp form-button btn-recover-resend',
195
195
  label: html`${Translate.Render('resend')} ${Translate.Render('recover-verify-email')}`,
196
196
  type: 'submit',
197
197
  })}
@@ -52,7 +52,9 @@ const LoadRouter = function (RouterInstance) {
52
52
 
53
53
  const setQueryPath = (options = { path: '', queryPath: '' }, queryKey = 'cid') => {
54
54
  const { queryPath, path } = options;
55
- const newUri = `${getProxyPath()}${path === 'home' ? '' : `${path}/`}${queryPath ? `?${queryKey}=${queryPath}` : ''}`;
55
+ const newUri = `${getProxyPath()}${path === 'home' ? '' : `${path}/`}${
56
+ typeof queryPath === 'string' ? `?${queryKey}=${queryPath}` : ''
57
+ }`;
56
58
  const currentUri = `${window.location.pathname}${location.search}`;
57
59
  if (currentUri !== newUri && currentUri !== `${newUri}/`) setPath(newUri);
58
60
  };
@@ -63,7 +63,7 @@ const SignUp = {
63
63
  });
64
64
  return html`
65
65
  ${await BtnIcon.Render({
66
- class: 'section-mp form-button btn-sign-up-i-have-account',
66
+ class: 'in section-mp form-button btn-sign-up-i-have-account',
67
67
  label: html`<i class="fas fa-sign-in-alt"></i> ${Translate.Render('i-have-account')}<br />${Translate.Render(
68
68
  'log-in',
69
69
  )}`,
@@ -112,7 +112,7 @@ const SignUp = {
112
112
  ${options?.bottomRender ? await options.bottomRender() : ``}
113
113
  <div class="in">
114
114
  ${await BtnIcon.Render({
115
- class: 'section-mp form-button btn-sign-up',
115
+ class: 'in section-mp form-button btn-sign-up',
116
116
  label: Translate.Render('sign-up'),
117
117
  type: 'submit',
118
118
  })}
@@ -1,4 +1,5 @@
1
1
  import { loggerFactory } from '../core/Logger.js';
2
+ import { Modal } from '../core/Modal.js';
2
3
  import { getProxyPath, s } from '../core/VanillaJs.js';
3
4
 
4
5
  const logger = loggerFactory(import.meta);
@@ -10,10 +11,10 @@ const RoutesDefault = () => {
10
11
  return {
11
12
  '/': {
12
13
  title: 'Home',
13
- render: () => s(`.main-btn-home`).click(),
14
+ render: () => Modal.onHomeRouterEvent(),
14
15
  upperCase: false,
15
16
  },
16
- '/home': { title: 'home', render: () => s(`.main-btn-home`).click() },
17
+ '/home': { title: 'home', render: () => Modal.onHomeRouterEvent() },
17
18
  '/settings': { title: 'settings', render: () => s(`.main-btn-settings`).click(), translateTitle: true },
18
19
  '/log-in': { title: 'log-in', render: () => s(`.main-btn-log-in`).click(), translateTitle: true },
19
20
  '/sign-up': { title: 'sign-up', render: () => s(`.main-btn-sign-up`).click(), translateTitle: true },
@@ -80,36 +80,40 @@ const DefaultManagement = {
80
80
  class: `in fll section-mp management-table-btn-mini management-table-btn-remove-${id}-${cellRenderId}`,
81
81
  })}`;
82
82
  setTimeout(() => {
83
- EventsUI.onClick(`.management-table-btn-remove-${id}-${cellRenderId}`, async () => {
84
- const confirmResult = await Modal.RenderConfirm({
85
- html: async () => {
86
- return html`
87
- <div class="in section-mp" style="text-align: center">
88
- ${Translate.Render('confirm-delete-item')}
89
- ${Object.keys(params.data).length > 0
90
- ? html`<br />
91
- "${options.defaultColKeyFocus
92
- ? getValueFromJoinString(params.data, options.defaultColKeyFocus)
93
- : params.data[Object.keys(params.data)[0]]}"`
94
- : ''}
95
- </div>
96
- `;
97
- },
98
- id: `delete-${params.data._id}`,
99
- });
100
- if (confirmResult.status !== 'confirm') return;
101
- let result;
102
- if (params.data._id) result = await ServiceProvider.delete({ id: params.data._id });
103
- else result = { status: 'success' };
83
+ EventsUI.onClick(
84
+ `.management-table-btn-remove-${id}-${cellRenderId}`,
85
+ async () => {
86
+ const confirmResult = await Modal.RenderConfirm({
87
+ html: async () => {
88
+ return html`
89
+ <div class="in section-mp" style="text-align: center">
90
+ ${Translate.Render('confirm-delete-item')}
91
+ ${Object.keys(params.data).length > 0
92
+ ? html`<br />
93
+ "${options.defaultColKeyFocus
94
+ ? getValueFromJoinString(params.data, options.defaultColKeyFocus)
95
+ : params.data[Object.keys(params.data)[0]]}"`
96
+ : ''}
97
+ </div>
98
+ `;
99
+ },
100
+ id: `delete-${params.data._id}`,
101
+ });
102
+ if (confirmResult.status !== 'confirm') return;
103
+ let result;
104
+ if (params.data._id) result = await ServiceProvider.delete({ id: params.data._id });
105
+ else result = { status: 'success' };
104
106
 
105
- NotificationManager.Push({
106
- html: result.status === 'error' ? result.message : Translate.Render('item-success-delete'),
107
- status: result.status,
108
- });
109
- if (result.status === 'success') {
110
- AgGrid.grids[gridId].applyTransaction({ remove: [params.data] });
111
- }
112
- });
107
+ NotificationManager.Push({
108
+ html: result.status === 'error' ? result.message : Translate.Render('item-success-delete'),
109
+ status: result.status,
110
+ });
111
+ if (result.status === 'success') {
112
+ AgGrid.grids[gridId].applyTransaction({ remove: [params.data] });
113
+ }
114
+ },
115
+ { context: 'modal' },
116
+ );
113
117
  });
114
118
  }
115
119
 
@@ -220,16 +224,19 @@ const DefaultManagement = {
220
224
  });
221
225
  });
222
226
  EventsUI.onClick(`.management-table-btn-clean-${id}`, async () => {
223
- const confirmResult = await Modal.RenderConfirm({
224
- html: async () => {
225
- return html`
226
- <div class="in section-mp" style="text-align: center;">
227
- <strong>${Translate.Render('confirm-delete-all-data')}</strong>
228
- </div>
229
- `;
227
+ const confirmResult = await Modal.RenderConfirm(
228
+ {
229
+ html: async () => {
230
+ return html`
231
+ <div class="in section-mp" style="text-align: center;">
232
+ <strong>${Translate.Render('confirm-delete-all-data')}</strong>
233
+ </div>
234
+ `;
235
+ },
236
+ id: `clean-table-${id}`,
230
237
  },
231
- id: `clean-table-${id}`,
232
- });
238
+ { context: 'modal' },
239
+ );
233
240
  if (confirmResult.status === 'cancelled') return;
234
241
  const result = await ServiceProvider.delete();
235
242
  NotificationManager.Push({
@@ -133,6 +133,8 @@ SrrComponent = ({ title, ssrPath, buildId, ssrHeadComponents, ssrBodyComponents,
133
133
  border: none;
134
134
  padding-block: 0;
135
135
  padding-inline: 0;
136
+ height: 30px;
137
+ line-height: 30px;
136
138
  }
137
139
  input::file-selector-button {
138
140
  outline: none !important;
package/src/index.js CHANGED
@@ -29,7 +29,7 @@ class Underpost {
29
29
  * @type {String}
30
30
  * @memberof Underpost
31
31
  */
32
- static version = 'v2.8.635';
32
+ static version = 'v2.8.641';
33
33
  /**
34
34
  * Repository cli API
35
35
  * @static
@@ -93,6 +93,13 @@ class Underpost {
93
93
  * @memberof Underpost
94
94
  */
95
95
  static deploy = UnderpostDeploy.API;
96
+ /**
97
+ * Deployment cli NETWORK
98
+ * @static
99
+ * @type {UnderpostDeploy.NETWORK}
100
+ * @memberof Underpost
101
+ */
102
+ static deployNetwork = UnderpostDeploy.NETWORK;
96
103
  /**
97
104
  * Cron cli API
98
105
  * @static
@@ -104,14 +111,14 @@ class Underpost {
104
111
  * File Storage cli API
105
112
  * @static
106
113
  * @type {UnderpostFileStorage.API}
107
- * @memberof UnderpostFileStorage
114
+ * @memberof Underpost
108
115
  */
109
116
  static fs = UnderpostFileStorage.API;
110
117
  /**
111
118
  * Monitor cli API
112
119
  * @static
113
120
  * @type {UnderpostMonitor.API}
114
- * @memberof UnderpostMonitor
121
+ * @memberof Underpost
115
122
  */
116
123
  static monitor = UnderpostMonitor.API;
117
124
  }
@@ -0,0 +1,65 @@
1
+ ARG BASE_DEBIAN=buster
2
+
3
+ USER root
4
+
5
+ FROM debian:${BASE_DEBIAN}
6
+
7
+ ENV DEBIAN_FRONTEND=noninteractive
8
+
9
+ # Set root password to root, format is 'user:password'.
10
+ RUN echo 'root:root' | chpasswd
11
+
12
+ RUN apt-get update --fix-missing
13
+ RUN apt-get upgrade -y
14
+ # install sudo
15
+ RUN apt-get -y install sudo
16
+ # net-tools provides netstat commands
17
+ RUN apt-get -y install curl net-tools
18
+ RUN apt-get -yq install openssh-server supervisor
19
+ # Few handy utilities which are nice to have
20
+ RUN apt-get -y install nano vim less --no-install-recommends
21
+ RUN apt-get clean
22
+
23
+ # install ssh
24
+ RUN mkdir -p /var/run/sshd
25
+ # Allow root login via password
26
+ RUN sed -ri 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
27
+
28
+ # install open ssl git and others tools
29
+ RUN apt-get install -yq --no-install-recommends libssl-dev curl wget git gnupg
30
+
31
+ # install lampp
32
+ RUN curl -Lo xampp-linux-installer.run https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/7.4.33/xampp-linux-x64-7.4.33-0-installer.run?from_af=true
33
+ RUN chmod +x xampp-linux-installer.run
34
+ RUN bash -c './xampp-linux-installer.run'
35
+ RUN ln -sf /opt/lampp/lampp /usr/bin/lampp
36
+ # Enable XAMPP web interface(remove security checks)
37
+ RUN sed -i.bak s'/Require local/Require all granted/g' /opt/lampp/etc/extra/httpd-xampp.conf
38
+ # Enable error display in php
39
+ RUN sed -i.bak s'/display_errors=Off/display_errors=On/g' /opt/lampp/etc/php.ini
40
+ # Enable includes of several configuration files
41
+ RUN mkdir /opt/lampp/apache2/conf.d
42
+ RUN echo "IncludeOptional /opt/lampp/apache2/conf.d/*.conf" >>/opt/lampp/etc/httpd.conf
43
+ # Create a /www folder and a symbolic link to it in /opt/lampp/htdocs. It'll be accessible via http://localhost:[port]/www/
44
+ # This is convenient because it doesn't interfere with xampp, phpmyadmin or other tools in /opt/lampp/htdocs
45
+ # /opt/lampp/etc/httpd.conf
46
+ RUN mkdir /www
47
+ RUN ln -s /www /opt/lampp/htdocs
48
+
49
+ # install nodejs https://github.com/nodesource/distributions/blob/master/README.md#deb
50
+ RUN curl -fsSL https://deb.nodesource.com/setup_23.x | bash -
51
+ RUN apt-get install -y nodejs build-essential
52
+ RUN node --version
53
+ RUN npm --version
54
+
55
+ WORKDIR /home/dd
56
+
57
+ EXPOSE 22
58
+
59
+ EXPOSE 80
60
+
61
+ EXPOSE 443
62
+
63
+ EXPOSE 3000-3100
64
+
65
+ EXPOSE 4000-4100