underpost 2.8.845 → 2.8.847
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/README.md +13 -2
- package/bin/build.js +7 -1
- package/bin/deploy.js +7 -1
- package/cli.md +19 -3
- package/docker-compose.yml +1 -1
- package/manifests/deployment/dd-template-development/deployment.yaml +2 -2
- package/package.json +1 -1
- package/src/cli/cluster.js +6 -0
- package/src/cli/deploy.js +2 -1
- package/src/cli/index.js +8 -7
- package/src/cli/run.js +9 -1
- package/src/cli/ssh.js +32 -0
- package/src/client/Default.index.js +1 -1
- package/src/client/components/core/Chat.js +1 -1
- package/src/client/components/core/CommonJs.js +24 -22
- package/src/client/components/core/Content.js +1 -5
- package/src/client/components/core/Css.js +16 -2
- package/src/client/components/core/CssCore.js +7 -3
- package/src/client/components/core/DropDown.js +21 -12
- package/src/client/components/core/Modal.js +137 -15
- package/src/client/components/core/ObjectLayerEngine.js +638 -0
- package/src/client/components/core/Panel.js +156 -32
- package/src/client/components/core/Translate.js +4 -0
- package/src/client/components/default/MenuDefault.js +27 -1
- package/src/client/public/default/android-chrome-144x144.png +0 -0
- package/src/client/public/default/android-chrome-192x192.png +0 -0
- package/src/client/public/default/android-chrome-256x256.png +0 -0
- package/src/client/public/default/android-chrome-36x36.png +0 -0
- package/src/client/public/default/android-chrome-48x48.png +0 -0
- package/src/client/public/default/android-chrome-72x72.png +0 -0
- package/src/client/public/default/android-chrome-96x96.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/default/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon.png +0 -0
- package/src/client/public/default/assets/background/dark.jpg +0 -0
- package/src/client/public/default/assets/logo/base-icon.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-check.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-invalid-token.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-recover.png +0 -0
- package/src/client/public/default/favicon-16x16.png +0 -0
- package/src/client/public/default/favicon-32x32.png +0 -0
- package/src/client/public/default/favicon.ico +0 -0
- package/src/client/public/default/mstile-144x144.png +0 -0
- package/src/client/public/default/mstile-150x150.png +0 -0
- package/src/client/public/default/mstile-310x150.png +0 -0
- package/src/client/public/default/mstile-310x310.png +0 -0
- package/src/client/public/default/mstile-70x70.png +0 -0
- package/src/client/public/default/safari-pinned-tab.svg +24 -0
- package/src/client/ssr/body/DefaultSplashScreen.js +2 -2
- package/src/index.js +9 -1
- package/src/server/client-build.js +4 -18
- package/src/server/conf.js +12 -5
package/README.md
CHANGED
|
@@ -36,12 +36,17 @@ template
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
39
44
|
|
|
40
45
|
|
|
41
46
|
<!-- badges -->
|
|
42
47
|
|
|
43
48
|
|
|
44
|
-
[](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [](https://github.com/underpostnet/engine/actions/workflows/coverall.yml) [](https://www.npmjs.com/package/underpost) [](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [](https://github.com/underpostnet/engine/actions/workflows/coverall.yml) [](https://www.npmjs.com/package/underpost) [](https://socket.dev/npm/package/underpost/overview/2.8.847) [](https://coveralls.io/github/underpostnet/engine?branch=master) [](https://www.npmjs.org/package/underpost) [](https://www.npmjs.com/package/underpost)
|
|
45
50
|
|
|
46
51
|
|
|
47
52
|
<!-- end-badges -->
|
|
@@ -60,6 +65,11 @@ template
|
|
|
60
65
|
|
|
61
66
|
|
|
62
67
|
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
63
73
|
|
|
64
74
|
|
|
65
75
|
</div>
|
|
@@ -106,7 +116,7 @@ Run dev client server
|
|
|
106
116
|
npm run dev
|
|
107
117
|
```
|
|
108
118
|
<!-- -->
|
|
109
|
-
## underpost ci/cd cli v2.8.
|
|
119
|
+
## underpost ci/cd cli v2.8.847
|
|
110
120
|
|
|
111
121
|
### Usage: `underpost [options] [command]`
|
|
112
122
|
```
|
|
@@ -136,6 +146,7 @@ Commands:
|
|
|
136
146
|
fs [options] [path] Manages file storage, defaulting to file upload operations.
|
|
137
147
|
test [options] [deploy-list] Manages and runs tests, defaulting to the current Underpost default test suite.
|
|
138
148
|
monitor [options] <deploy-id> [env] Manages health server monitoring for specified deployments.
|
|
149
|
+
ssh [options] Import and start ssh server and client based on current default deployment ID.
|
|
139
150
|
run [options] <runner-id> [path] Runs a script from the specified path.
|
|
140
151
|
lxd [options] Manages LXD containers and virtual machines.
|
|
141
152
|
baremetal [options] [workflow-id] [hostname] [ip-address] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
|
package/bin/build.js
CHANGED
|
@@ -53,7 +53,9 @@ if (process.argv.includes('conf')) {
|
|
|
53
53
|
fs.removeSync(toPath);
|
|
54
54
|
fs.mkdirSync(toPath, { recursive: true });
|
|
55
55
|
fs.copySync(`./engine-private/conf/${_confName}`, toPath);
|
|
56
|
-
if (fs.existsSync(
|
|
56
|
+
if (process.argv.includes('remove-replica') && fs.existsSync(`../${privateRepoName}/replica`)) {
|
|
57
|
+
fs.removeSync(`../${privateRepoName}/replica`);
|
|
58
|
+
} else if (fs.existsSync(`./engine-private/replica`)) {
|
|
57
59
|
const replicas = await fs.readdir(`./engine-private/replica`);
|
|
58
60
|
for (const replica of replicas)
|
|
59
61
|
if (replica.match(_confName))
|
|
@@ -187,4 +189,8 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
|
|
|
187
189
|
|
|
188
190
|
fs.copyFileSync(`./.github/workflows/${repoName}.ci.yml`, `${basePath}/.github/workflows/${repoName}.ci.yml`);
|
|
189
191
|
fs.copyFileSync(`./.github/workflows/${repoName}.cd.yml`, `${basePath}/.github/workflows/${repoName}.cd.yml`);
|
|
192
|
+
|
|
193
|
+
if (fs.existsSync(`./src/ws/${confName.split('-')[1]}`)) {
|
|
194
|
+
fs.copySync(`./src/ws/${confName.split('-')[1]}`, `${basePath}/src/ws/${confName.split('-')[1]}`);
|
|
195
|
+
}
|
|
190
196
|
}
|
package/bin/deploy.js
CHANGED
|
@@ -835,6 +835,12 @@ ${shellExec(`git log | grep Author: | sort -u`, { stdout: true }).split(`\n`).jo
|
|
|
835
835
|
}
|
|
836
836
|
|
|
837
837
|
case 'ssh': {
|
|
838
|
+
// only import + start
|
|
839
|
+
// node bin/deploy ssh root@<host> <password> import
|
|
840
|
+
|
|
841
|
+
// generate + import + start
|
|
842
|
+
// node bin/deploy ssh root@<host> <password>
|
|
843
|
+
|
|
838
844
|
const host = process.argv[3] ?? `root@${await ip.public.ipv4()}`;
|
|
839
845
|
const domain = host.split('@')[1];
|
|
840
846
|
const user = 'root'; // host.split('@')[0];
|
|
@@ -907,7 +913,7 @@ EOF`);
|
|
|
907
913
|
// shellExec(`sudo echo "" > ~/.ssh/known_hosts`);
|
|
908
914
|
|
|
909
915
|
// ssh-copy-id -i ~/.ssh/id_rsa.pub -p <port_number> <username>@<host>
|
|
910
|
-
shellExec(`ssh-copy-id -i ~/.ssh/id_rsa.pub -p ${port} ${host}`);
|
|
916
|
+
// shellExec(`ssh-copy-id -i ~/.ssh/id_rsa.pub -p ${port} ${host}`);
|
|
911
917
|
// debug:
|
|
912
918
|
// shellExec(`ssh -vvv ${host}`);
|
|
913
919
|
|
package/cli.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## underpost ci/cd cli v2.8.
|
|
1
|
+
## underpost ci/cd cli v2.8.847
|
|
2
2
|
|
|
3
3
|
### Usage: `underpost [options] [command]`
|
|
4
4
|
```
|
|
@@ -28,6 +28,7 @@ Commands:
|
|
|
28
28
|
fs [options] [path] Manages file storage, defaulting to file upload operations.
|
|
29
29
|
test [options] [deploy-list] Manages and runs tests, defaulting to the current Underpost default test suite.
|
|
30
30
|
monitor [options] <deploy-id> [env] Manages health server monitoring for specified deployments.
|
|
31
|
+
ssh [options] Import and start ssh server and client based on current default deployment ID.
|
|
31
32
|
run [options] <runner-id> [path] Runs a script from the specified path.
|
|
32
33
|
lxd [options] Manages LXD containers and virtual machines.
|
|
33
34
|
baremetal [options] [workflow-id] [hostname] [ip-address] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
|
|
@@ -118,7 +119,8 @@ options.
|
|
|
118
119
|
Arguments:
|
|
119
120
|
path The absolute or relative directory path of the repository.
|
|
120
121
|
commit-type The type of commit to perform. Options: feat, fix, docs, style,
|
|
121
|
-
refactor, perf, cd,
|
|
122
|
+
refactor, perf, ci, cd, infra, build, test, chore, revert,
|
|
123
|
+
backup.
|
|
122
124
|
module-tag Optional: Sets a specific module tag for the commit.
|
|
123
125
|
message Optional: Provides an additional custom message for the commit.
|
|
124
126
|
|
|
@@ -551,6 +553,20 @@ Options:
|
|
|
551
553
|
```
|
|
552
554
|
|
|
553
555
|
|
|
556
|
+
### `ssh` :
|
|
557
|
+
```
|
|
558
|
+
Usage: underpost ssh [options]
|
|
559
|
+
|
|
560
|
+
Import and start ssh server and client based on current default deployment ID.
|
|
561
|
+
|
|
562
|
+
Options:
|
|
563
|
+
--generate Generates new ssh credential and stores it in current private
|
|
564
|
+
keys file storage.
|
|
565
|
+
-h, --help display help for command
|
|
566
|
+
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
|
|
554
570
|
### `run` :
|
|
555
571
|
```
|
|
556
572
|
Usage: underpost run [options] <runner-id> [path]
|
|
@@ -558,7 +574,7 @@ Options:
|
|
|
558
574
|
Runs a script from the specified path.
|
|
559
575
|
|
|
560
576
|
Arguments:
|
|
561
|
-
runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, gpu-env, tf-gpu-test, dev-cluster, cyberia-ide, engine-ide, ide, monitor, db-client, cluster, deploy, tf-vae-test, deploy-job.
|
|
577
|
+
runner-id The runner ID to run. Options: spark-template, rmi, kill, secret, gpu-env, tf-gpu-test, dev-cluster, cyberia-ide, engine-ide, ssh-deploy, ide, monitor, db-client, cluster, deploy, tf-vae-test, deploy-job.
|
|
562
578
|
path The absolute or relative directory path where the script is located.
|
|
563
579
|
|
|
564
580
|
Options:
|
package/docker-compose.yml
CHANGED
|
@@ -17,7 +17,7 @@ spec:
|
|
|
17
17
|
spec:
|
|
18
18
|
containers:
|
|
19
19
|
- name: dd-template-development-blue
|
|
20
|
-
image: localhost/rockylinux9-underpost:v2.8.
|
|
20
|
+
image: localhost/rockylinux9-underpost:v2.8.847
|
|
21
21
|
# resources:
|
|
22
22
|
# requests:
|
|
23
23
|
# memory: "124Ki"
|
|
@@ -100,7 +100,7 @@ spec:
|
|
|
100
100
|
spec:
|
|
101
101
|
containers:
|
|
102
102
|
- name: dd-template-development-green
|
|
103
|
-
image: localhost/rockylinux9-underpost:v2.8.
|
|
103
|
+
image: localhost/rockylinux9-underpost:v2.8.847
|
|
104
104
|
# resources:
|
|
105
105
|
# requests:
|
|
106
106
|
# memory: "124Ki"
|
package/package.json
CHANGED
package/src/cli/cluster.js
CHANGED
|
@@ -476,6 +476,12 @@ net.bridge.bridge-nf-call-arptables = 1
|
|
|
476
476
|
net.ipv4.ip_forward = 1' | sudo tee ${iptableConfPath}`,
|
|
477
477
|
{ silent: true },
|
|
478
478
|
);
|
|
479
|
+
|
|
480
|
+
// Increase inotify limits
|
|
481
|
+
shellExec(`sudo sysctl -w fs.inotify.max_user_watches=2099999999`);
|
|
482
|
+
shellExec(`sudo sysctl -w fs.inotify.max_user_instances=2099999999`);
|
|
483
|
+
shellExec(`sudo sysctl -w fs.inotify.max_queued_events=2099999999`);
|
|
484
|
+
|
|
479
485
|
// shellExec(`sudo sysctl --system`); // Apply sysctl changes immediately
|
|
480
486
|
// Apply NAT iptables rules.
|
|
481
487
|
shellExec(`${underpostRoot}/manifests/maas/nat-iptables.sh`, { silent: true });
|
package/src/cli/deploy.js
CHANGED
|
@@ -528,13 +528,14 @@ node bin/deploy build-full-client ${deployId}
|
|
|
528
528
|
}).trim(),
|
|
529
529
|
);
|
|
530
530
|
},
|
|
531
|
-
checkDeploymentReadyStatus(deployId, env, traffic) {
|
|
531
|
+
checkDeploymentReadyStatus(deployId, env, traffic, ignoresNames = []) {
|
|
532
532
|
const cmd = `underpost config get container-status`;
|
|
533
533
|
const pods = UnderpostDeploy.API.get(`${deployId}-${env}-${traffic}`);
|
|
534
534
|
const readyPods = [];
|
|
535
535
|
const notReadyPods = [];
|
|
536
536
|
for (const pod of pods) {
|
|
537
537
|
const { NAME } = pod;
|
|
538
|
+
if (ignoresNames && ignoresNames.find((t) => NAME.trim().toLowerCase().match(t.trim().toLowerCase()))) continue;
|
|
538
539
|
if (
|
|
539
540
|
shellExec(`sudo kubectl exec -i ${NAME} -- sh -c "${cmd}"`, { stdout: true }).match(
|
|
540
541
|
`${deployId}-${env}-running-deployment`,
|
package/src/cli/index.js
CHANGED
|
@@ -86,13 +86,7 @@ program
|
|
|
86
86
|
.argument('<deploy-id>', `The deployment configuration ID. Use 'clean' to restore default environment settings.`)
|
|
87
87
|
.argument('[env]', 'Optional: The environment to set (e.g., "production", "development"). Defaults to "production".')
|
|
88
88
|
.description('Sets environment variables and configurations related to a specific deployment ID.')
|
|
89
|
-
.action(
|
|
90
|
-
if (args[0] === 'current') {
|
|
91
|
-
console.log(process.env.DEPLOY_ID);
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
loadConf(...args);
|
|
95
|
-
});
|
|
89
|
+
.action(loadConf);
|
|
96
90
|
|
|
97
91
|
// 'config' command: Manage Underpost configurations
|
|
98
92
|
program
|
|
@@ -322,6 +316,13 @@ program
|
|
|
322
316
|
.description('Manages health server monitoring for specified deployments.')
|
|
323
317
|
.action(Underpost.monitor.callback);
|
|
324
318
|
|
|
319
|
+
// 'ssh' command: SSH management
|
|
320
|
+
program
|
|
321
|
+
.command('ssh')
|
|
322
|
+
.option('--generate', 'Generates new ssh credential and stores it in current private keys file storage.')
|
|
323
|
+
.description('Import and start ssh server and client based on current default deployment ID.')
|
|
324
|
+
.action(Underpost.ssh.callback);
|
|
325
|
+
|
|
325
326
|
// 'run' command: Run a script
|
|
326
327
|
program
|
|
327
328
|
.command('run')
|
package/src/cli/run.js
CHANGED
|
@@ -86,6 +86,13 @@ class UnderpostRun {
|
|
|
86
86
|
shellExec(`${baseCommand} run ide /home/dd/engine`);
|
|
87
87
|
shellExec(`${baseCommand} run ide /home/dd/engine/engine-private`);
|
|
88
88
|
},
|
|
89
|
+
'ssh-deploy': (path, options = UnderpostRun.DEFAULT_OPTION) => {
|
|
90
|
+
const baseCommand = options.dev || true ? 'node bin' : 'underpost';
|
|
91
|
+
shellCd('/home/dd/engine');
|
|
92
|
+
shellExec(`git reset`);
|
|
93
|
+
shellExec(`${baseCommand} cmt . --empty cd ssh-${path}`);
|
|
94
|
+
shellExec(`${baseCommand} push . underpostnet/engine`);
|
|
95
|
+
},
|
|
89
96
|
ide: (path, options = UnderpostRun.DEFAULT_OPTION) => {
|
|
90
97
|
const { underpostRoot } = options;
|
|
91
98
|
shellExec(`node ${underpostRoot}/bin/vs ${path}`);
|
|
@@ -199,12 +206,13 @@ class UnderpostRun {
|
|
|
199
206
|
const currentTraffic = UnderpostDeploy.API.getCurrentTraffic(deployId);
|
|
200
207
|
const targetTraffic = currentTraffic === 'blue' ? 'green' : 'blue';
|
|
201
208
|
const env = 'production';
|
|
209
|
+
const ignorePods = UnderpostDeploy.API.get(`${deployId}-${env}-${targetTraffic}`).map((p) => p.NAME);
|
|
202
210
|
shellExec(`sudo kubectl rollout restart deployment/${deployId}-${env}-${targetTraffic}`);
|
|
203
211
|
|
|
204
212
|
let secondsElapsed = 0;
|
|
205
213
|
logger.info('Deployment init', { deployId, env, targetTraffic });
|
|
206
214
|
|
|
207
|
-
while (!UnderpostDeploy.API.checkDeploymentReadyStatus(deployId, env, targetTraffic).ready) {
|
|
215
|
+
while (!UnderpostDeploy.API.checkDeploymentReadyStatus(deployId, env, targetTraffic, ignorePods).ready) {
|
|
208
216
|
await timer(1000);
|
|
209
217
|
secondsElapsed++;
|
|
210
218
|
logger.info(`Deployment in progress, seconds elapsed: ${secondsElapsed}`);
|
package/src/cli/ssh.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { getNpmRootPath } from '../server/conf.js';
|
|
2
|
+
import { shellExec } from '../server/process.js';
|
|
3
|
+
|
|
4
|
+
class UnderpostSSH {
|
|
5
|
+
static API = {
|
|
6
|
+
/**
|
|
7
|
+
* @method callback
|
|
8
|
+
* @param {object} options
|
|
9
|
+
* @param {boolean} options.generate - Generates new ssh credential and stores it in current private keys file storage.
|
|
10
|
+
* @description Import and start ssh server and client based on current default deployment ID.
|
|
11
|
+
*/
|
|
12
|
+
callback: async (
|
|
13
|
+
options = {
|
|
14
|
+
generate: false,
|
|
15
|
+
},
|
|
16
|
+
) => {
|
|
17
|
+
// only import + start
|
|
18
|
+
// node bin/deploy ssh root@<host> <password> import
|
|
19
|
+
|
|
20
|
+
// generate + import + start
|
|
21
|
+
// node bin/deploy ssh root@<host> <password>
|
|
22
|
+
|
|
23
|
+
shellExec(
|
|
24
|
+
`node bin/deploy ssh root@${process.env.DEFAULT_DEPLOY_HOST} ${process.env.DEFAULT_DEPLOY_PASSWORD ?? `''`}${
|
|
25
|
+
options.generate === true ? '' : ' import'
|
|
26
|
+
}`,
|
|
27
|
+
);
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default UnderpostSSH;
|
|
@@ -18,7 +18,7 @@ import { ElementsDefault } from './components/default/ElementsDefault.js';
|
|
|
18
18
|
import { Scroll } from './components/core/Scroll.js';
|
|
19
19
|
|
|
20
20
|
const htmlMainBody = async () => {
|
|
21
|
-
return html`<span
|
|
21
|
+
return html`<span>Hello World!!</span>`;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
window.onload = () =>
|
|
@@ -822,70 +822,72 @@ const generateRandomPasswordSelection = (length) => {
|
|
|
822
822
|
|
|
823
823
|
const commitData = {
|
|
824
824
|
feat: {
|
|
825
|
-
description: '
|
|
825
|
+
description: 'New feature or enhancement (frontend, backend, API, or UX)',
|
|
826
826
|
title: 'Features',
|
|
827
827
|
emoji: '✨',
|
|
828
828
|
},
|
|
829
829
|
fix: {
|
|
830
|
-
description: '
|
|
830
|
+
description: 'Fix a bug',
|
|
831
831
|
title: 'Bug Fixes',
|
|
832
832
|
emoji: '🐛',
|
|
833
833
|
},
|
|
834
834
|
docs: {
|
|
835
|
-
description: 'Documentation
|
|
835
|
+
description: 'Documentation changes',
|
|
836
836
|
title: 'Documentation',
|
|
837
837
|
emoji: '📚',
|
|
838
838
|
},
|
|
839
839
|
style: {
|
|
840
|
-
description:
|
|
841
|
-
'Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)',
|
|
840
|
+
description: 'Formatting, whitespace, semicolons, code style',
|
|
842
841
|
title: 'Styles',
|
|
843
842
|
emoji: '💎',
|
|
844
843
|
},
|
|
845
844
|
refactor: {
|
|
846
|
-
description: '
|
|
845
|
+
description: 'Code refactor.',
|
|
847
846
|
title: 'Code Refactoring',
|
|
848
847
|
emoji: '📦',
|
|
849
848
|
},
|
|
850
849
|
perf: {
|
|
851
|
-
description: '
|
|
850
|
+
description: 'Performance improvements across the stack.',
|
|
852
851
|
title: 'Performance Improvements',
|
|
853
852
|
emoji: '⚡️',
|
|
854
853
|
},
|
|
854
|
+
ci: {
|
|
855
|
+
description: 'CI pipeline changes (GitHub Actions, runners, caching)',
|
|
856
|
+
title: 'Continuous Integration',
|
|
857
|
+
emoji: '⚙️',
|
|
858
|
+
},
|
|
855
859
|
cd: {
|
|
856
|
-
description:
|
|
857
|
-
'Changes to our Continuous Delivery configuration files and scripts (example scopes: Jenkins, Spinnaker, ArgoCD)',
|
|
860
|
+
description: 'CD / deployment changes (Remote ssh deployment scripts)',
|
|
858
861
|
title: 'Continuous Delivery',
|
|
859
862
|
emoji: '🚀',
|
|
860
863
|
},
|
|
861
|
-
|
|
862
|
-
description: '
|
|
863
|
-
title: '
|
|
864
|
-
emoji: '
|
|
864
|
+
infra: {
|
|
865
|
+
description: 'Infrastructure changes (MAAS, LXD, cloud infra, networking, provisioning).',
|
|
866
|
+
title: 'Infrastructure',
|
|
867
|
+
emoji: '🏗️',
|
|
865
868
|
},
|
|
866
869
|
build: {
|
|
867
|
-
description: '
|
|
870
|
+
description: 'Build system or dependency changes (tooling, bundler, build scripts).',
|
|
868
871
|
title: 'Builds',
|
|
869
872
|
emoji: '🛠',
|
|
870
873
|
},
|
|
871
|
-
|
|
872
|
-
description:
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
emoji: '⚙️',
|
|
874
|
+
test: {
|
|
875
|
+
description: 'Unit or integration tests added/updated, test helpers, flake fixes.',
|
|
876
|
+
title: 'Tests',
|
|
877
|
+
emoji: '🚨',
|
|
876
878
|
},
|
|
877
879
|
chore: {
|
|
878
|
-
description: "Other changes that don't modify src or
|
|
880
|
+
description: "Other changes that don't modify src or tests (automation, housekeeping).",
|
|
879
881
|
title: 'Chores',
|
|
880
882
|
emoji: '♻️',
|
|
881
883
|
},
|
|
882
884
|
revert: {
|
|
883
|
-
description: '
|
|
885
|
+
description: 'Revert a previous commit or change.',
|
|
884
886
|
title: 'Reverts',
|
|
885
887
|
emoji: '🗑',
|
|
886
888
|
},
|
|
887
889
|
backup: {
|
|
888
|
-
description: '
|
|
890
|
+
description: 'Backups, snapshotting, restore scripts, or backup docs.',
|
|
889
891
|
title: 'Backups',
|
|
890
892
|
emoji: '💾',
|
|
891
893
|
},
|
|
@@ -105,7 +105,6 @@ const Content = {
|
|
|
105
105
|
class: '',
|
|
106
106
|
container: '',
|
|
107
107
|
url: '',
|
|
108
|
-
aHrefOptions: { disable: false },
|
|
109
108
|
raw: false,
|
|
110
109
|
},
|
|
111
110
|
) {
|
|
@@ -143,10 +142,7 @@ const Content = {
|
|
|
143
142
|
? getApiBaseUrl({ id: file._id, endpoint: 'file/blob' })
|
|
144
143
|
: URL.createObjectURL(getBlobFromUint8ArrayFile(file.data.data, file.mimetype));
|
|
145
144
|
const imgRender = html`<img class="in ${options.class}" ${options.style} src="${url}" />`;
|
|
146
|
-
render +=
|
|
147
|
-
? imgRender
|
|
148
|
-
: html`<a href="${url}" target="_top">${imgRender}</a>`}`;
|
|
149
|
-
|
|
145
|
+
render += imgRender;
|
|
150
146
|
break;
|
|
151
147
|
}
|
|
152
148
|
case 'pdf': {
|
|
@@ -212,13 +212,13 @@ const addTheme = (options) => {
|
|
|
212
212
|
};
|
|
213
213
|
};
|
|
214
214
|
|
|
215
|
-
const borderChar = (px, color, selectors) => {
|
|
215
|
+
const borderChar = (px, color, selectors, hover = false) => {
|
|
216
216
|
if (selectors) {
|
|
217
217
|
return selectors
|
|
218
218
|
.map(
|
|
219
219
|
(selector) => html`
|
|
220
220
|
<style>
|
|
221
|
-
${selector} {
|
|
221
|
+
${selector}${hover ? ':hover' : ''} {
|
|
222
222
|
text-shadow: ${px}px -${px}px ${px}px ${color}, -${px}px ${px}px ${px}px ${color},
|
|
223
223
|
-${px}px -${px}px ${px}px ${color}, ${px}px ${px}px ${px}px ${color};
|
|
224
224
|
}
|
|
@@ -854,6 +854,18 @@ const imageShimmer = () => html`<div
|
|
|
854
854
|
</div>
|
|
855
855
|
</div>`;
|
|
856
856
|
|
|
857
|
+
const renderChessPattern = () => `background: repeating-conic-gradient(#808080 0 25%, #0000 0 50%) 50% / 20px 20px`;
|
|
858
|
+
|
|
859
|
+
const extractBackgroundImageUrl = (element) => {
|
|
860
|
+
const style = window.getComputedStyle(element);
|
|
861
|
+
const imageString = style.backgroundImage;
|
|
862
|
+
const foundUrlRaw = imageString.match(/^url\(?(.+)\)$/i)[1];
|
|
863
|
+
if (!foundUrlRaw) return null;
|
|
864
|
+
const foundUrl = foundUrlRaw.replace(/^['|"| ]*/, '').replace(/['" ]*$/, '');
|
|
865
|
+
if (!foundUrl) return null;
|
|
866
|
+
return foundUrl;
|
|
867
|
+
};
|
|
868
|
+
|
|
857
869
|
const simpleIconsRender = (selector) => {
|
|
858
870
|
sa(selector).forEach((el) => {
|
|
859
871
|
el.src = `https://cdn.simpleicons.org/coveralls/${rgbToHex(window.getComputedStyle(s('html')).color)}`;
|
|
@@ -893,4 +905,6 @@ export {
|
|
|
893
905
|
cssEffect,
|
|
894
906
|
imageShimmer,
|
|
895
907
|
simpleIconsRender,
|
|
908
|
+
extractBackgroundImageUrl,
|
|
909
|
+
renderChessPattern,
|
|
896
910
|
};
|
|
@@ -17,8 +17,8 @@ const CssCommonCore = async () => {
|
|
|
17
17
|
await AgGrid.RenderStyle();
|
|
18
18
|
return html`<style>
|
|
19
19
|
.top-bar-app-icon {
|
|
20
|
-
width:
|
|
21
|
-
height:
|
|
20
|
+
width: 40px;
|
|
21
|
+
height: 40px;
|
|
22
22
|
}
|
|
23
23
|
.mini-title {
|
|
24
24
|
font-size: 15px;
|
|
@@ -51,7 +51,6 @@ const CssCommonCore = async () => {
|
|
|
51
51
|
cursor: grabbing !important;
|
|
52
52
|
}
|
|
53
53
|
.btn-label-content {
|
|
54
|
-
height: 100%;
|
|
55
54
|
top: 15px;
|
|
56
55
|
}
|
|
57
56
|
.badge {
|
|
@@ -122,6 +121,7 @@ const CssCommonCore = async () => {
|
|
|
122
121
|
left: 0;
|
|
123
122
|
width: 100%;
|
|
124
123
|
z-index: 1;
|
|
124
|
+
transition: 0.3s;
|
|
125
125
|
}
|
|
126
126
|
@keyframes ripple {
|
|
127
127
|
to {
|
|
@@ -607,6 +607,10 @@ const CssCoreLight = {
|
|
|
607
607
|
background: gray;
|
|
608
608
|
transition: 0.3s;
|
|
609
609
|
}
|
|
610
|
+
.bar-default-modal-icon {
|
|
611
|
+
width: 15px;
|
|
612
|
+
height: 15px;
|
|
613
|
+
}
|
|
610
614
|
.slide-menu-top-bar {
|
|
611
615
|
width: 100%;
|
|
612
616
|
top: 0;
|
|
@@ -8,7 +8,12 @@ const DropDown = {
|
|
|
8
8
|
Tokens: {},
|
|
9
9
|
Render: async function (options) {
|
|
10
10
|
const id = options.id ? options.id : getId(this.Tokens, 'dropdown-');
|
|
11
|
-
this.Tokens[id] = {
|
|
11
|
+
this.Tokens[id] = {
|
|
12
|
+
onClickEvents: {},
|
|
13
|
+
lastSelectValue: undefined,
|
|
14
|
+
oncheckvalues: {},
|
|
15
|
+
originData: options.data ? newInstance(options.data) : [],
|
|
16
|
+
};
|
|
12
17
|
|
|
13
18
|
options.data.push({
|
|
14
19
|
value: 'reset',
|
|
@@ -65,17 +70,21 @@ const DropDown = {
|
|
|
65
70
|
if (options.type === 'checkbox' && ToggleSwitch.Tokens[`checkbox-role-${valueDisplay}`])
|
|
66
71
|
ToggleSwitch.Tokens[`checkbox-role-${valueDisplay}`].click();
|
|
67
72
|
if (optionData.value !== 'close') {
|
|
68
|
-
if (optionData.value !== 'reset')
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
if (optionData.value !== 'reset') {
|
|
74
|
+
if (options.type === 'checkbox') {
|
|
75
|
+
// const _instanValue = data
|
|
76
|
+
// .filter((d) => d.checked)
|
|
77
|
+
// .map((v, i, a) => `${v.display}${i < a.length - 1 ? ',' : ''}`)
|
|
78
|
+
// .join('');
|
|
79
|
+
const value = Object.keys(DropDown.Tokens[id].oncheckvalues);
|
|
80
|
+
htmls(
|
|
81
|
+
`.dropdown-current-${id}`,
|
|
82
|
+
value.map((v) => DropDown.Tokens[id].originData.find((_v) => _v.value === v).display),
|
|
83
|
+
);
|
|
84
|
+
} else {
|
|
85
|
+
htmls(`.dropdown-current-${id}`, optionData.display);
|
|
86
|
+
}
|
|
87
|
+
} else htmls(`.dropdown-current-${id}`, '');
|
|
79
88
|
|
|
80
89
|
this.Tokens[id].value =
|
|
81
90
|
options.type === 'checkbox' ? data.filter((d) => d.checked).map((d) => d.data) : optionData.data;
|