Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
67319c7
perf: change action build
ibuler Jun 20, 2025
52b125a
perf: change action build
ibuler Jun 20, 2025
a81127f
Perf: Unify the styles of directly connected pages and pages that ope…
ZhaoJiSen Jun 23, 2025
22bfd83
Perf: Drawer theme change
ZhaoJiSen Jun 24, 2025
5437a2e
fix: default load password
ibuler Jun 26, 2025
78a3cf5
fix: some div height
ibuler Jun 26, 2025
49b31e5
perf: btn height
ibuler Jun 26, 2025
c062266
Fixed: Fix the adaptive issue of Splitter
ZhaoJiSen Jun 27, 2025
4fda9e7
perf: change build method
ibuler Jun 27, 2025
dd08212
fix: tab blink
ibuler Jun 30, 2025
aa85708
perf: tree scroll
ibuler Jun 30, 2025
c6bc208
Perf: revert drawer
ZhaoJiSen Jun 27, 2025
968a872
Remove drawer
ZhaoJiSen Jun 30, 2025
738eb08
Remove post
ZhaoJiSen Jun 30, 2025
16bf77b
Fixed: Fix the issue where HTTP assets cannot be accessed directly
ZhaoJiSen Jun 30, 2025
c044564
Fixed: Fix the issue of k8s missing the assistant tool
ZhaoJiSen Jun 30, 2025
6e5f60f
Fix the issue with the right-click connection option on k8s nodes
ZhaoJiSen Jul 1, 2025
ec5922a
perf: Share url querys
ZhaoJiSen Jul 4, 2025
65b8431
Fixed: Fix the issue where recordings cannot be played back in histor…
ZhaoJiSen Jul 7, 2025
0d338f9
Perf: Optimize prompt message style
ZhaoJiSen Jul 7, 2025
58f5888
Fixed: Fix the issue where the right split screen sometimes fails to …
ZhaoJiSen Jul 8, 2025
1f83eff
Fixed: chat zindex
ZhaoJiSen Jul 9, 2025
9c5b154
Fixed: Fix style issues in session monitoring.
ZhaoJiSen Jul 11, 2025
64856bb
fix: koko component connectViewCount (#1398)
fit2bot Jul 11, 2025
f9f343f
fix: koko web_cli connectViewCount (#1399)
fit2bot Jul 11, 2025
838b1dd
Fixed: Date show
ZhaoJiSen Jul 14, 2025
4dd14e9
fix: Translate commands (#1401)
fit2bot Jul 14, 2025
55949f4
Fixed: translate
ZhaoJiSen Jul 15, 2025
7245ebe
Merge branch 'dev' into pr@dev@fix_translate
ZhaoJiSen Jul 15, 2025
c710511
Merge pull request #1402 from jumpserver/pr@dev@fix_translate
ZhaoJiSen Jul 15, 2025
c14ae08
Fixed: remove direct setting icon
ZhaoJiSen Jul 15, 2025
e4e581d
restore code
ZhaoJiSen Jul 15, 2025
bec5764
Fixed: Fix the issue of direct connection organizations not synchroni…
ZhaoJiSen Jul 15, 2025
187dcaa
Fixed: replay resize
ZhaoJiSen Jul 16, 2025
b8dcd67
Fixed: Router loaded
ZhaoJiSen Jul 16, 2025
6b3422d
Fixed: Fix the issue of the SFTP sidebar displaying incorrectly under…
ZhaoJiSen Jul 16, 2025
e9a77d7
Fixed: direct connect protocol filter
ZhaoJiSen Jul 16, 2025
c51ac32
Fixed: session title
ZhaoJiSen Jul 16, 2025
04c1d51
Fixed: Fix the issue where chat is initialized twice.
ZhaoJiSen Jul 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
run: |
mkdir -p build
rm -rf build/*
cp -R src/assets/i18n luna/
mv luna luna-${{ steps.get_version.outputs.TAG }}
cp -R src/assets/i18n dist/luna/
mv dist/luna luna-${{ steps.get_version.outputs.TAG }}
tar -czf luna-${{ steps.get_version.outputs.TAG }}.tar.gz luna-${{ steps.get_version.outputs.TAG }}
echo $(md5sum luna-${{ steps.get_version.outputs.TAG }}.tar.gz | awk '{print $1}') > build/luna-${{ steps.get_version.outputs.TAG }}.tar.gz.md5
mv luna-${{ steps.get_version.outputs.TAG }}.tar.gz build/
Expand All @@ -57,5 +57,3 @@ jobs:
build/luna-${{ steps.get_version.outputs.TAG }}.tar.gz.md5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


19 changes: 15 additions & 4 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,19 @@
"scripts": [
"jquery/dist/jquery.min.js",
"@ztree/ztree_v3/js/jquery.ztree.all.min.js",
"@ztree/ztree_v3/js/jquery.ztree.exhide.min.js",
"asciinema-player/dist/bundle/asciinema-player.min.js"
"@ztree/ztree_v3/js/jquery.ztree.exhide.min.js"
]
},
"configurations": {
"production": {
"optimization": true,
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": false
},
"fonts": true
},
"outputHashing": "all",
"baseHref": "/luna/",
"outputPath": {
Expand All @@ -68,8 +74,13 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "5mb",
"maximumWarning": "4mb",
"maximumError": "6mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "200kb",
"maximumError": "300kb"
}
],
"fileReplacements": [
Expand Down
80 changes: 36 additions & 44 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,50 +1,47 @@
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {HttpClient, provideHttpClient} from '@angular/common/http';
import {APP_BASE_HREF, CommonModule} from '@angular/common';
import {FormsModule, ReactiveFormsModule} from '@angular/forms'; // <-- NgModel lives here
import {NGXLogger} from 'ngx-logger';
import {CookieService} from 'ngx-cookie-service';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
import {DragDropModule} from '@angular/cdk/drag-drop';
import {CodeEditorModule} from '@acrodata/code-editor';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClient, provideHttpClient } from '@angular/common/http';
import { APP_BASE_HREF, CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; // <-- NgModel lives here
import { NGXLogger } from 'ngx-logger';
import { CookieService } from 'ngx-cookie-service';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { DragDropModule } from '@angular/cdk/drag-drop';
import { CodeEditorModule } from '@acrodata/code-editor';

// service
import {AllServices} from '@app/services';
import { AllServices } from '@app/services';

// Angular split
import {AppRouterModule} from './router.module';
import {SharedPipeModule} from './pipes/pipes';
import {AppComponent} from './pages/app.component';
import {ElementComponents} from './elements/elements.component';
import {PluginModules} from './plugins/plugins';
import {ClipboardService} from 'ngx-clipboard';
import {version} from '../environments/environment';
import {BehaviorSubject, forkJoin, Observable, of} from 'rxjs';
import {FileInputAccessorModule} from 'file-input-accessor';
import {catchError, mergeMap} from 'rxjs/operators';
import {PagesComponents} from './pages/pages.component';

import { AppRouterModule } from './router.module';
import { SharedPipeModule } from './pipes/pipes';
import { AppComponent } from './pages/app.component';
import { ElementComponents } from './elements/elements.component';
import { PluginModules } from './plugins/plugins';
import { ClipboardService } from 'ngx-clipboard';
import { environment, version } from '../environments/environment';
import { BehaviorSubject, forkJoin, Observable, of } from 'rxjs';
import { FileInputAccessorModule } from 'file-input-accessor';
import { catchError, mergeMap } from 'rxjs/operators';
import { PagesComponents } from './pages/pages.component';

export class CustomLoader implements TranslateLoader {

constructor(private http: HttpClient) {
}
constructor(private http: HttpClient) {}

public getTranslation(lang: String): Observable<any> {
const remote = '/api/v1/settings/i18n/luna/?lang=' + lang + '&v=' + version;
const local = '/luna/assets/i18n/' + lang + '.json';
let local = '/assets/i18n/' + lang + '.json';
const isProd = environment.production;
if (isProd) {
local = '/luna' + local;
}

return forkJoin([
this.http.get(remote).pipe(
catchError(() => of({}))
),
this.http.get(local).pipe(
catchError(() => of({}))
)
this.http.get(remote).pipe(catchError(() => of({}))),
this.http.get(local).pipe(catchError(() => of({})))
]).pipe(
mergeMap((res) => {
mergeMap(res => {
const finalRes = Object.assign({}, res[1], res[0]);
return new BehaviorSubject(finalRes);
})
Expand All @@ -71,22 +68,17 @@ export class CustomLoader implements TranslateLoader {
deps: [HttpClient]
}
}),
...PluginModules,
...PluginModules
],
declarations: [
AppComponent,
...ElementComponents,
...PagesComponents
] as any[],
declarations: [AppComponent, ...ElementComponents, ...PagesComponents] as any[],
bootstrap: [AppComponent],
providers: [
...AllServices,
{provide: APP_BASE_HREF, useValue: '/luna/'},
{ provide: APP_BASE_HREF, useValue: '/luna/' },
CookieService,
NGXLogger,
ClipboardService,
provideHttpClient()
]
})
export class AppModule {
}
export class AppModule {}
23 changes: 14 additions & 9 deletions src/app/elements/asset-tree/asset-tree.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
.tree-type-banner {
position: relative;
display: flex;
height: 31px;
line-height: 31px;
height: 30px;
line-height: 30px;
padding-right: 11px;
padding-left: 15px;
overflow: hidden;
Expand All @@ -42,15 +42,15 @@
.tree-icon-rotate {
@include flex(center);
height: 30px;
padding-top: 3px;
padding-right: 3px;
// padding-top: 3px;
// padding-right: 3px;
font-size: 16px;
color: var(--el-text-color-light);
}

.tree-type-banner-label {
margin-left: 7px;
padding-top: 2px;
// padding-top: 2px;
font-size: 13px;
cursor: pointer;
@include overflowText;
Expand All @@ -69,16 +69,16 @@
// 刷新按钮不需要 padding-right
.fa-refresh.tree-banner-icon {
padding-right: 0;
margin-top: 2px;
// margin-top: 2px;
}

// 批量操作按钮需要给一些 padding-top 使得看上去垂直居中
.fa-square-o.tree-banner-icon {
padding-top: 2px;
// padding-top: 2px;
}

.fa-check-square.tree-banner-icon {
padding-top: 2px;
// padding-top: 2px;
}

.tree-banner-icon {
Expand Down Expand Up @@ -143,9 +143,14 @@
position: relative;
padding: 5px 10px;
min-height: 40px;
overflow-x: auto;
height: calc(100% - 31px);
background-color: var(--el-asset-tree-bg-color);
overflow: hidden;
scrollbar-gutter: stable both-edges;

&:hover {
overflow: auto;
}

.tree-type-loading {
position: absolute;
Expand Down
18 changes: 13 additions & 5 deletions src/app/elements/asset-tree/asset-tree.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ export class ElementAssetTreeComponent implements OnInit {
const treeChecked = tree.setting && tree.setting.check && tree.setting.check.enable;
const viewList = this._viewSrv.viewList;

const isK8s = cnode.meta.data.platform_type === 'k8s';

return [
{
id: 'batch-connect',
Expand All @@ -130,7 +132,7 @@ export class ElementAssetTreeComponent implements OnInit {
id: 'connect',
name: 'Connect',
fa: 'fa-terminal',
hide: cnode.isParent,
hide: cnode.isParent || isK8s,
click: this.onMenuConnect.bind(this)
},
{
Expand All @@ -144,7 +146,7 @@ export class ElementAssetTreeComponent implements OnInit {
id: 'split-connect',
name: 'Split connect',
fa: 'fa-columns',
hide: viewList.length <= 0 || cnode.isParent,
hide: viewList.length <= 0 || cnode.isParent || isK8s,
click: this.onMenuConnect.bind(this, true)
},
{
Expand Down Expand Up @@ -221,21 +223,27 @@ export class ElementAssetTreeComponent implements OnInit {
}

handleMenuClick(menu: any) {
console.log('menu', menu);
menu.click();
this.hideRMenu();
}

onNodeClick(event, treeId, treeNode, clickFlag) {
const ztree = this.trees.find(t => t.name === treeId).ztree;

if (treeNode.isParent) {
ztree.expandNode(treeNode);
return;
}

if (treeNode.chkDisabled) {
this._message.warning(this._i18n.instant('DisabledAsset'));
return;
}

if (treeNode.meta.data.platform_type === 'k8s') {
return connectOnNewPage(treeNode, 'auto');
}

if (this.isOpenNewWindow) {
connectOnNewPage(treeNode, 'auto');
} else {
Expand Down Expand Up @@ -574,13 +582,13 @@ export class ElementAssetTreeComponent implements OnInit {
const i = this.favoriteAssets.indexOf(assetId);
this.favoriteAssets.splice(i, 1);
const msg = this._i18n.instant('Disfavor') + ' ' + this._i18n.instant('success');
this._toastr.success(msg, '');
this._toastr.success(msg, '', { nzClass: 'custom-success-notification' });
});
} else {
this._http.favoriteAsset(assetId, true).subscribe(() => {
this.favoriteAssets.push(assetId);
const msg = this._i18n.instant('Favorite') + ' ' + this._i18n.instant('success');
this._toastr.success(msg, '');
this._toastr.success(msg, '', { nzClass: 'custom-success-notification' });
});
}
}
Expand Down
1 change: 0 additions & 1 deletion src/app/elements/chat/chat.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
</div>
</div>
</div>
<elements-drawer [view]="currentView"></elements-drawer>

<!-- <div [hidden]="!showBtn || chatAIShown || !isShowSetting" id="dragBox"> -->
<!-- <div -->
Expand Down
2 changes: 1 addition & 1 deletion src/app/elements/chat/chat.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ nz-float-button {
position: fixed;
bottom: 200px;
right: 5px;
z-index: 1000;
z-index: 99999;
cursor: move;
user-select: none;
overflow: visible;
Expand Down
15 changes: 7 additions & 8 deletions src/app/elements/chat/chat.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@

get isShowSetting() {
const connectMethods = ['koko', 'lion', 'tinker', 'panda'];

// sftp 或 k8s 不展示设置按钮
if (this.currentView.protocol === 'sftp' || this.currentView.protocol === 'k8s') {
return false;
}

return (
this.currentView.hasOwnProperty('connectMethod') &&
this.currentView.connected &&
Expand Down Expand Up @@ -209,14 +215,7 @@

handleShowDrawer() {
if (this.currentView.iframeElement) {
switch (this.currentView.connectMethod.component) {
case 'koko':
this._drawerStateService.sendComponentMessage({ name: 'OPEN_SETTING' });
break;
default:
this.currentView.iframeElement.postMessage({ name: 'OPEN' }, '*');
break;
}
this.currentView.iframeElement.postMessage({ name: 'OPEN' }, '*');

Check failure

Code scanning / SonarCloud

Origins should be verified during cross-origin communications

<!--SONAR_ISSUE_KEY:AZdoyDRrKIfjLKnit0R9-->Specify a target origin for this message. <p>See more on <a href="https://sonarcloud.io/project/issues?id=jumpserver_luna&issues=AZdoyDRrKIfjLKnit0R9&open=AZdoyDRrKIfjLKnit0R9">SonarQube Cloud</a></p>
}
}

Expand Down
Loading
Loading