Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
luna
Commits
0a2f6c41
Unverified
Commit
0a2f6c41
authored
Jan 21, 2018
by
liuzheng712
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
publish
parent
e439b6f7
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
87 additions
and
41 deletions
+87
-41
cleftbar.component.ts
src/app/ControlPage/cleftbar/cleftbar.component.ts
+3
-3
control.component.css
src/app/ControlPage/control/control.component.css
+4
-1
control.component.html
src/app/ControlPage/control/control.component.html
+6
-3
control.component.ts
src/app/ControlPage/control/control.component.ts
+3
-1
controlnav.component.css
...p/ControlPage/control/controlnav/controlnav.component.css
+16
-0
controlnav.component.ts
...pp/ControlPage/control/controlnav/controlnav.component.ts
+0
-4
app.module.ts
src/app/app.module.ts
+2
-2
guacamole.component.html
src/app/elements/guacamole/guacamole.component.html
+0
-3
guacamole.component.scss
src/app/elements/guacamole/guacamole.component.scss
+0
-0
guacamole.component.ts
src/app/elements/guacamole/guacamole.component.ts
+0
-18
iframe.component.html
src/app/elements/iframe/iframe.component.html
+1
-0
iframe.component.scss
src/app/elements/iframe/iframe.component.scss
+6
-0
iframe.component.spec.ts
src/app/elements/iframe/iframe.component.spec.ts
+6
-6
iframe.component.ts
src/app/elements/iframe/iframe.component.ts
+30
-0
build.sh
tools/build.sh
+10
-0
No files found.
src/app/ControlPage/cleftbar/cleftbar.component.ts
View file @
0a2f6c41
...
@@ -9,13 +9,13 @@
...
@@ -9,13 +9,13 @@
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Logger
}
from
'angular2-logger/core'
;
import
{
Logger
}
from
'angular2-logger/core'
;
import
{
AppService
,
HttpService
}
from
'../../app.service'
;
import
{
AppService
,
HttpService
}
from
'../../app.service'
;
import
{
SearchComponent
}
from
'../search/search.component'
;
import
{
SearchComponent
}
from
'../search/search.component'
;
import
{
DataStore
}
from
'../../globals'
;
import
{
DataStore
}
from
'../../globals'
;
import
{
version
}
from
'../../../environments/environment'
;
import
{
version
}
from
'../../../environments/environment'
;
import
*
as
jQuery
from
'jquery/dist/jquery.min.js'
;
import
*
as
jQuery
from
'jquery/dist/jquery.min.js'
;
import
*
as
layer
from
'layui-layer/src/layer.js'
;
import
*
as
layer
from
'layui-layer/src/layer.js'
;
import
*
as
UUID
from
'uuid-js/lib/uuid.js'
;
import
{
ElementServerMenuComponent
}
from
'../../elements/server-menu/server-menu.component'
;
import
{
ElementServerMenuComponent
}
from
'../../elements/server-menu/server-menu.component'
;
import
{
NavList
,
View
}
from
'../control/control.component'
;
import
{
NavList
,
View
}
from
'../control/control.component'
;
...
@@ -119,9 +119,9 @@ export class CleftbarComponent implements OnInit {
...
@@ -119,9 +119,9 @@ export class CleftbarComponent implements OnInit {
Connect
(
host
)
{
Connect
(
host
)
{
// console.log(host);
// console.log(host);
let
user
:
any
;
let
user
:
any
;
let
options
=
''
;
const
that
=
this
;
const
that
=
this
;
if
(
host
.
system_users_granted
.
length
>
1
)
{
if
(
host
.
system_users_granted
.
length
>
1
)
{
let
options
=
''
;
user
=
this
.
checkPriority
(
host
.
system_users_granted
);
user
=
this
.
checkPriority
(
host
.
system_users_granted
);
if
(
user
)
{
if
(
user
)
{
this
.
login
(
host
,
user
);
this
.
login
(
host
,
user
);
...
@@ -162,8 +162,8 @@ export class CleftbarComponent implements OnInit {
...
@@ -162,8 +162,8 @@ export class CleftbarComponent implements OnInit {
}
}
login
(
host
,
user
)
{
login
(
host
,
user
)
{
const
id
=
NavList
.
List
.
length
-
1
;
if
(
user
)
{
if
(
user
)
{
const
id
=
NavList
.
List
.
length
-
1
;
NavList
.
List
[
id
].
nick
=
host
.
hostname
;
NavList
.
List
[
id
].
nick
=
host
.
hostname
;
NavList
.
List
[
id
].
connected
=
true
;
NavList
.
List
[
id
].
connected
=
true
;
NavList
.
List
[
id
].
edit
=
false
;
NavList
.
List
[
id
].
edit
=
false
;
...
...
src/app/ControlPage/control/control.component.css
View file @
0a2f6c41
app-element-term
,
div
{
div
,
app-element-term
,
app-element-guacamole
{
height
:
100%
;
height
:
100%
;
}
div
{
display
:
none
;
display
:
none
;
}
}
...
...
src/app/ControlPage/control/control.component.html
View file @
0a2f6c41
<app-controlnav></app-controlnav>
<app-controlnav></app-controlnav>
<!--<app-ssh></app-ssh>-->
<!--<app-rdp></app-rdp>-->
<div
*
ngFor=
"let m of NavList.List;let i=index"
<div
*
ngFor=
"let m of NavList.List;let i=index"
[
ngClass
]="{'
active
'
:i=
=NavList.Active}"
[
ngClass
]="{'
active
'
:i=
=NavList.Active}"
>
>
<app-element-term
[
host
]="
m
.
host
"
<app-element-term
[
host
]="
m
.
host
"
[
userid
]="
m
.
user
.
id
"
[
userid
]="
m
.
user
.
id
"
[
index
]="
i
"
[
index
]="
i
"
[
ngClass
]="{'
active
'
:i=
=NavList.Active}"
*
ngIf=
"m.type=='ssh'"
>
*
ngIf=
"m.type=='ssh'"
>
</app-element-term>
</app-element-term>
<app-element-iframe
[
host
]="
m
.
host
"
[
userid
]="
m
.
user
.
id
"
[
index
]="
i
"
*
ngIf=
"m.type=='rdp'"
>
</app-element-iframe>
</div>
</div>
src/app/ControlPage/control/control.component.ts
View file @
0a2f6c41
...
@@ -65,7 +65,6 @@ export class ControlComponent implements OnInit {
...
@@ -65,7 +65,6 @@ export class ControlComponent implements OnInit {
}
}
static
TerminalDisconnect
(
id
)
{
static
TerminalDisconnect
(
id
)
{
console
.
log
(
id
);
if
(
NavList
.
List
[
id
].
connected
)
{
if
(
NavList
.
List
[
id
].
connected
)
{
NavList
.
List
[
id
].
connected
=
false
;
NavList
.
List
[
id
].
connected
=
false
;
NavList
.
List
[
id
].
Term
.
write
(
'
\
r
\
n
\
x1b[31mBye Bye!
\
x1b[m
\
r
\
n'
);
NavList
.
List
[
id
].
Term
.
write
(
'
\
r
\
n
\
x1b[31mBye Bye!
\
x1b[m
\
r
\
n'
);
...
@@ -90,4 +89,7 @@ export class ControlComponent implements OnInit {
...
@@ -90,4 +89,7 @@ export class ControlComponent implements OnInit {
ngOnInit
()
{
ngOnInit
()
{
}
}
// trackByFn(index: number, item: View) {
// return item.id;
// }
}
}
src/app/ControlPage/control/controlnav/controlnav.component.css
View file @
0a2f6c41
...
@@ -81,3 +81,19 @@
...
@@ -81,3 +81,19 @@
padding
:
5px
20px
4px
15px
;
padding
:
5px
20px
4px
15px
;
height
:
18px
;
height
:
18px
;
}
}
/*
* scrollbar
*/
.tabs
::-webkit-scrollbar-track
{
-webkit-box-shadow
:
inset
0
0
6px
rgba
(
0
,
0
,
0
,
0.3
);
background-color
:
#F5F5F5
;
}
.tabs
::-webkit-scrollbar
{
height
:
1px
;
}
.tabs
::-webkit-scrollbar-thumb
{
background-color
:
#19aa8d
;
}
src/app/ControlPage/control/controlnav/controlnav.component.ts
View file @
0a2f6c41
...
@@ -42,12 +42,8 @@ export class ControlnavComponent implements OnInit {
...
@@ -42,12 +42,8 @@ export class ControlnavComponent implements OnInit {
NavList
.
List
[
index
].
hide
=
false
;
NavList
.
List
[
index
].
hide
=
false
;
NavList
.
Active
=
index
;
NavList
.
Active
=
index
;
if
(
NavList
.
List
[
index
].
type
===
'ssh'
)
{
if
(
NavList
.
List
[
index
].
type
===
'ssh'
)
{
jQuery
(
'app-ssh'
).
show
();
jQuery
(
'app-rdp'
).
hide
();
NavList
.
List
[
index
].
Term
.
focus
();
NavList
.
List
[
index
].
Term
.
focus
();
}
else
if
(
NavList
.
List
[
index
].
type
===
'rdp'
)
{
}
else
if
(
NavList
.
List
[
index
].
type
===
'rdp'
)
{
jQuery
(
'app-ssh'
).
hide
();
jQuery
(
'app-rdp'
).
show
();
}
}
}
}
...
...
src/app/app.module.ts
View file @
0a2f6c41
...
@@ -27,7 +27,7 @@ import {LoginComponent} from './BasicPage/login/login.component';
...
@@ -27,7 +27,7 @@ import {LoginComponent} from './BasicPage/login/login.component';
import
{
ElementPopupComponent
}
from
'./elements/popup/popup.component'
;
import
{
ElementPopupComponent
}
from
'./elements/popup/popup.component'
;
import
{
ElementRdpComponent
}
from
'./elements/rdp/rdp.component'
;
import
{
ElementRdpComponent
}
from
'./elements/rdp/rdp.component'
;
import
{
ElementServerMenuComponent
}
from
'./elements/server-menu/server-menu.component'
;
import
{
ElementServerMenuComponent
}
from
'./elements/server-menu/server-menu.component'
;
import
{
Element
GuacamoleComponent
}
from
'./elements/guacamole/guacamol
e.component'
;
import
{
Element
IframeComponent
}
from
'./elements/iframe/ifram
e.component'
;
// pages
// pages
import
{
IleftbarComponent
}
from
'./IndexPage/ileftbar/ileftbar.component'
;
import
{
IleftbarComponent
}
from
'./IndexPage/ileftbar/ileftbar.component'
;
import
{
SearchComponent
,
SearchFilter
}
from
'./ControlPage/search/search.component'
;
import
{
SearchComponent
,
SearchFilter
}
from
'./ControlPage/search/search.component'
;
...
@@ -63,7 +63,7 @@ import {WindowsComponent} from './monitor-page/windows/windows.component';
...
@@ -63,7 +63,7 @@ import {WindowsComponent} from './monitor-page/windows/windows.component';
ElementInteractiveComponent
,
ElementInteractiveComponent
,
ElementRdpComponent
,
ElementRdpComponent
,
ElementServerMenuComponent
,
ElementServerMenuComponent
,
Element
Guacamol
eComponent
,
Element
Ifram
eComponent
,
LoginComponent
,
LoginComponent
,
SearchComponent
,
SearchComponent
,
SearchFilter
,
SearchFilter
,
...
...
src/app/elements/guacamole/guacamole.component.html
deleted
100644 → 0
View file @
e439b6f7
<div>
<iframe
src=
"{{target}}"
></iframe>
</div>
src/app/elements/guacamole/guacamole.component.scss
deleted
100644 → 0
View file @
e439b6f7
src/app/elements/guacamole/guacamole.component.ts
deleted
100644 → 0
View file @
e439b6f7
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'app-element-guacamole'
,
templateUrl
:
'./guacamole.component.html'
,
styleUrls
:
[
'./guacamole.component.scss'
]
})
export
class
ElementGuacamoleComponent
implements
OnInit
{
@
Input
()
target
:
string
;
constructor
()
{
}
ngOnInit
()
{
this
.
target
=
'/guacamole/?asset_id='
+
'&system_user_id='
+
''
;
}
}
src/app/elements/iframe/iframe.component.html
0 → 100644
View file @
0a2f6c41
<iframe
[
src
]="
trust
(
target
)"
></iframe>
src/app/elements/iframe/iframe.component.scss
0 → 100644
View file @
0a2f6c41
iframe
{
width
:
100%
;
height
:
100%
;
border
:
none
;
background-color
:
white
;
}
src/app/elements/
guacamole/guacamol
e.component.spec.ts
→
src/app/elements/
iframe/ifram
e.component.spec.ts
View file @
0a2f6c41
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
async
,
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
Element
GuacamoleComponent
}
from
'./guacamol
e.component'
;
import
{
Element
IframeComponent
}
from
'./ifram
e.component'
;
describe
(
'Element
Guacamol
eComponent'
,
()
=>
{
describe
(
'Element
Ifram
eComponent'
,
()
=>
{
let
component
:
Element
Guacamol
eComponent
;
let
component
:
Element
Ifram
eComponent
;
let
fixture
:
ComponentFixture
<
Element
Guacamol
eComponent
>
;
let
fixture
:
ComponentFixture
<
Element
Ifram
eComponent
>
;
beforeEach
(
async
(()
=>
{
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
TestBed
.
configureTestingModule
({
declarations
:
[
Element
Guacamol
eComponent
]
declarations
:
[
Element
Ifram
eComponent
]
})
})
.
compileComponents
();
.
compileComponents
();
}));
}));
beforeEach
(()
=>
{
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
Element
Guacamol
eComponent
);
fixture
=
TestBed
.
createComponent
(
Element
Ifram
eComponent
);
component
=
fixture
.
componentInstance
;
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
fixture
.
detectChanges
();
});
});
...
...
src/app/elements/iframe/iframe.component.ts
0 → 100644
View file @
0a2f6c41
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
DomSanitizer
}
from
'@angular/platform-browser'
;
import
{
NavList
}
from
'../../ControlPage/control/control.component'
;
@
Component
({
selector
:
'app-element-iframe'
,
templateUrl
:
'./iframe.component.html'
,
styleUrls
:
[
'./iframe.component.scss'
]
})
export
class
ElementIframeComponent
implements
OnInit
{
@
Input
()
host
:
any
;
@
Input
()
userid
:
any
;
@
Input
()
index
:
number
;
target
:
string
;
constructor
(
private
sanitizer
:
DomSanitizer
)
{
}
ngOnInit
()
{
this
.
target
=
'http://ilz.me/'
;
}
trust
(
url
)
{
return
this
.
sanitizer
.
bypassSecurityTrustResourceUrl
(
url
);
}
Disconnect
()
{
NavList
.
List
[
this
.
index
].
connected
=
false
;
}
}
tools/build.sh
0 → 100644
View file @
0a2f6c41
#!/bin/bash
set
-ex
npm run-script build
rm
-fr
luna
*
mv
dist luna
tar
czf luna.tar.gz luna
md5 luna.tar.gz
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment