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
56cc3958
Commit
56cc3958
authored
May 02, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改适配
parent
6b4f6349
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
175 additions
and
46 deletions
+175
-46
asset-tree.component.scss
src/app/elements/asset-tree/asset-tree.component.scss
+4
-0
term.component.css
src/app/elements/term/term.component.css
+15
-3
term.component.html
src/app/elements/term/term.component.html
+1
-1
term.component.ts
src/app/elements/term/term.component.ts
+28
-22
tree.module.ts
src/app/elements/tree/tree.module.ts
+14
-0
globals.ts
src/app/globals.ts
+5
-4
cleftbar.component.html
src/app/pages/control/cleftbar/cleftbar.component.html
+3
-3
cleftbar.component.scss
src/app/pages/control/cleftbar/cleftbar.component.scss
+30
-1
control.component.css
src/app/pages/control/control.component.css
+1
-1
control.component.css
src/app/pages/control/control/control.component.css
+1
-1
nav.component.html
src/app/pages/control/control/controlnav/nav.component.html
+1
-3
ileftbar.module.ts
src/app/pages/index/ileftbar/ileftbar.module.ts
+14
-0
settings.module.ts
src/app/pages/setting/settings.module.ts
+22
-0
styles.css
src/styles.css
+36
-7
No files found.
src/app/elements/asset-tree/asset-tree.component.scss
View file @
56cc3958
...
...
@@ -5,3 +5,7 @@
height
:
100%
;
background-color
:
inherit
;
}
.ztree
*
{
font-family
:
'Monaco'
,
'Consolas'
,
'monospace'
!
important
;
}
src/app/elements/term/term.component.css
View file @
56cc3958
...
...
@@ -2,20 +2,32 @@
div
{
width
:
100%
;
height
:
100%
;
padding
:
15px
;
padding
:
15px
0
15px
15px
;
}
.terminal
{
.terminal
.xterm-rows
{
border
:
#000
solid
5px
;
color
:
#f0f0f0
;
box-shadow
:
rgba
(
0
,
0
,
0
,
0.8
)
2px
2px
20px
;
white-space
:
nowrap
;
display
:
inline-block
;
height
:
100%
;
background
:
#0d8ddb
;
font-size
:
11px
;
}
div
.terminal
div
span
{
min-width
:
12px
;
}
.terminal
div
{
user-select
:
text
;
}
/*.terminal, .terminal .xterm-viewport {*/
/*background-color: inherit;*/
/*}*/
.terminal
.xterm-rows
{
background-color
:
#1f1b1b
;
}
src/app/elements/term/term.component.html
View file @
56cc3958
<div
#
term
(
mouseenter
)="
active
()"
></div>
<div
id=
"term"
#
term
(
mouseenter
)="
active
()"
></div>
src/app/elements/term/term.component.ts
View file @
56cc3958
import
{
AfterViewInit
,
Component
,
Input
,
OnInit
,
ViewChild
}
from
'@angular/core'
;
import
{
ElementRef
}
from
'@angular/core'
;
import
{
term
,
Terminal
,
TermWS
}
from
'../../globals'
;
import
{
term
,
TermWS
}
from
'../../globals'
;
import
*
as
Terminal
from
'xterm/dist/xterm'
;
// import { Terminal } from 'xterm';
import
{
NavList
}
from
'../../pages/control/control/control.component'
;
import
*
as
jQuery
from
'jquery/dist/jquery.min.js'
;
import
{
UUIDService
}
from
'../../app.service'
;
...
...
@@ -21,6 +23,8 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
@
ViewChild
(
'term'
)
el
:
ElementRef
;
secret
:
string
;
term
:
any
;
col
=
80
;
row
=
24
;
constructor
(
private
_uuid
:
UUIDService
,
private
_cookie
:
CookieService
)
{
...
...
@@ -28,7 +32,7 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
ngOnInit
()
{
this
.
secret
=
this
.
_uuid
.
gen
();
this
.
term
=
Terminal
({
this
.
term
=
new
Terminal
({
cols
:
80
,
rows
:
24
,
useStyle
:
true
,
...
...
@@ -38,34 +42,36 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
}
ngAfterViewInit
()
{
if
(
this
.
host
||
this
.
token
)
{
if
(
this
.
_cookie
.
get
(
'cols'
))
{
term
.
col
=
parseInt
(
this
.
_cookie
.
get
(
'cols'
),
10
);
}
if
(
this
.
_cookie
.
get
(
'rows'
))
{
term
.
row
=
parseInt
(
this
.
_cookie
.
get
(
'rows'
),
10
);
}
}
else
{
t
erm
.
col
=
Math
.
floor
(
jQuery
(
this
.
el
.
nativeElement
).
width
()
/
jQuery
(
'#marker'
).
width
()
*
6
)
-
3
;
t
erm
.
row
=
Math
.
floor
(
jQuery
(
this
.
el
.
nativeElement
).
height
()
/
jQuery
(
'#marker'
).
height
())
-
3
;
term
.
term
=
this
.
term
;
}
//
if (this.host || this.token) {
//
if (this._cookie.get('cols')) {
// this
.col = parseInt(this._cookie.get('cols'), 10);
//
}
//
if (this._cookie.get('rows')) {
// this
.row = parseInt(this._cookie.get('rows'), 10);
//
}
//
} else {
t
his
.
col
=
Math
.
floor
(
jQuery
(
'.content'
).
width
()
/
jQuery
(
'#marker'
).
width
()
*
6
)
-
8
;
t
his
.
row
=
Math
.
floor
(
jQuery
(
'.content'
).
height
()
/
jQuery
(
'#marker'
).
height
())
-
3
;
//
term.term = this.term;
//
}
this
.
term
.
open
(
this
.
el
.
nativeElement
,
true
);
const
that
=
this
;
window
.
onresize
=
function
()
{
term
.
col
=
Math
.
floor
(
jQuery
(
that
.
el
.
nativeElement
).
width
()
/
jQuery
(
'#marker'
).
width
()
*
6
)
-
3
;
term
.
row
=
Math
.
floor
(
jQuery
(
that
.
el
.
nativeElement
).
height
()
/
jQuery
(
'#marker'
).
height
());
if
(
term
.
col
<
80
)
{
term
.
col
=
80
;
console
.
log
(
'Height: '
,
jQuery
(
'.content'
).
height
(),
jQuery
(
'#marker'
).
height
());
that
.
col
=
Math
.
floor
(
jQuery
(
'.content'
).
width
()
/
jQuery
(
'#marker'
).
width
()
*
6
)
-
8
;
that
.
row
=
Math
.
floor
(
jQuery
(
'.content'
).
height
()
/
jQuery
(
'#marker'
).
height
())
-
3
;
if
(
that
.
col
<
80
)
{
that
.
col
=
80
;
}
if
(
t
erm
.
row
<
24
)
{
t
erm
.
row
=
24
;
if
(
t
hat
.
row
<
24
)
{
t
hat
.
row
=
24
;
}
that
.
term
.
resize
(
t
erm
.
col
,
term
.
row
);
that
.
term
.
resize
(
t
hat
.
col
,
that
.
row
);
if
(
that
.
host
)
{
that
.
_cookie
.
set
(
'cols'
,
term
.
col
.
toString
(),
99
,
'/'
,
document
.
domain
);
that
.
_cookie
.
set
(
'rows'
,
term
.
row
.
toString
(),
99
,
'/'
,
document
.
domain
);
TermWS
.
emit
(
'resize'
,
{
'cols'
:
t
erm
.
col
,
'rows'
:
term
.
row
});
TermWS
.
emit
(
'resize'
,
{
'cols'
:
t
hat
.
col
,
'rows'
:
that
.
row
});
}
};
jQuery
(
window
).
resize
();
...
...
src/app/elements/tree/tree.module.ts
View file @
56cc3958
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
ElementTreeComponent
}
from
'./tree.component'
;
@
NgModule
({
imports
:
[
CommonModule
],
declarations
:
[
ElementTreeComponent
]
})
export
class
TreeModule
{
}
src/app/globals.ts
View file @
56cc3958
'use strict'
;
import
*
as
t
erminal
from
'xterm/dist/xterm'
;
import
*
as
T
erminal
from
'xterm/dist/xterm'
;
import
*
as
io
from
'socket.io-client'
;
export
function
Terminal
(
xargs
:
any
)
{
return
terminal
(
xargs
);
}
//
export function Terminal(xargs: any) {
//
return terminal(xargs);
//
}
export
const
TermWS
=
io
.
connect
(
'/ssh'
);
export
let
term
:
{
...
...
@@ -17,6 +17,7 @@ export let term: {
rows
:
24
,
useStyle
:
true
,
screenKeys
:
true
,
scrollback
:
10
}),
col
:
80
,
row
:
24
,
...
...
src/app/pages/control/cleftbar/cleftbar.component.html
View file @
56cc3958
<div
class=
"sidebar"
fxLayout=
"column"
ngxSplit=
"column"
>
<div
fxflex=
"0 0
5
0px"
class=
"search"
>
<div
fxflex=
"0 0
3
0px"
class=
"search"
>
<input
id=
"keyword"
class=
"left-search"
placeholder=
" {{'Search'| trans }} ..."
maxlength=
"2048"
name=
"q"
autocomplete=
"off"
title=
"Search"
type=
"text"
tabindex=
"1"
spellcheck=
"false"
autofocus
[(
ngModel
)]="
q
"
(
keyup
.
enter
)="
Search
(
q
)"
>
</div>
<div
class=
"overflow ngx-scroll-overlay"
fxflex=
"1 1
10
0%"
>
<div
class=
"overflow ngx-scroll-overlay"
fxflex=
"1 1
9
0%"
>
<elements-asset-tree
[
Data
]="
zNodes
"
[
query
]="
q
"
></elements-asset-tree>
</div>
<div
class=
"footer-version"
fxflex=
"0 0
40
px"
>
<div
class=
"footer-version"
fxflex=
"0 0
26
px"
>
<p>
Version
<strong>
{{version}}
</strong></p>
</div>
</div>
...
...
src/app/pages/control/cleftbar/cleftbar.component.scss
View file @
56cc3958
.sidebar
{
height
:
100%
;
width
:
100%
;
overflow
:
auto
;
}
:root
{
...
...
@@ -110,4 +111,32 @@ label {
padding-bottom
:
2px
;
}
@import
"~@swimlane/ngx-ui/release/styles/components/scrollbars"
;
//@import "~@swimlane/ngx-ui/release/styles/components/scrollbars";
.ngx-scroll-overlay
{
overflow
:
auto
;
// for FF
//-ms-overflow-style: -ms-autohiding-scrollbar;
//
//&::-webkit-scrollbar {
// display: none;
//}
//
//&:hover::-webkit-scrollbar {
// display: initial;
//}
}
//.sidebar::-webkit-scrollbar-track {
// -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3);
// background-color: #676a6c;
//}
//
//.sidebar::-webkit-scrollbar {
// width: 8px;
//}
//
//.sidebar::-webkit-scrollbar-thumb {
// background-color: #F5F5F5;
// border-radius: 6px;
// border: 2px solid transparent;
//}
src/app/pages/control/control.component.css
View file @
56cc3958
...
...
@@ -2,7 +2,7 @@ div {
height
:
100%
;
width
:
100%
;
padding
:
0
;
background-color
:
black
;
background-color
:
#1f1b1b
;
margin
:
0
;
position
:
initial
;
}
...
...
src/app/pages/control/control/control.component.css
View file @
56cc3958
div
,
elements-term
,
elements-guacamole
,
elements-settings
{
height
:
100%
;
/*height: 100%;*/
}
elements-term
,
elements-guacamole
,
elements-settings
{
...
...
src/app/pages/control/control/controlnav/nav.component.html
View file @
56cc3958
<div
class=
"scroll-botton"
>
<div
class=
"scroll-botton"
style=
"padding: 0 5px"
>
<a
class=
"left"
(
click
)="
scrollleft
()"
><i
class=
"fa fa-caret-left"
></i></a>
<a
class=
"right"
(
click
)="
scrollright
()"
><i
class=
"fa fa-caret-right"
></i></a>
</div>
<div
class=
"tabs"
>
<ul
[
ngStyle
]="{'
width
'
:150
*
NavList
.
List
.
length
+'
px
'}"
>
...
...
src/app/pages/index/ileftbar/ileftbar.module.ts
View file @
56cc3958
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
IleftbarComponent
}
from
'./ileftbar.component'
;
@
NgModule
({
imports
:
[
CommonModule
],
declarations
:
[
IleftbarComponent
]
})
export
class
IleftbarModule
{
}
src/app/pages/setting/settings.module.ts
View file @
56cc3958
import
{
NgModule
}
from
'@angular/core'
;
import
{
SettingPageS3Component
}
from
'./s3/s3.component'
;
import
{
SettingPageTerminalComponent
}
from
'./terminal/terminal.component'
;
import
{
SettingPageLdapComponent
}
from
'./ldap/ldap.component'
;
import
{
SettingPageEmailComponent
}
from
'./email/email.component'
;
import
{
SettingPageBasicComponent
}
from
'./basic/basic.component'
;
import
{
PagesSettingComponent
}
from
'./setting.component'
;
@
NgModule
({
imports
:
[
],
declarations
:
[
SettingPageS3Component
,
SettingPageTerminalComponent
,
SettingPageLdapComponent
,
SettingPageEmailComponent
,
SettingPageBasicComponent
,
PagesSettingComponent
]
})
export
class
SettingsModule
{
}
src/styles.css
View file @
56cc3958
...
...
@@ -23,25 +23,54 @@ app-root {
z-index
:
-1
;
font-size
:
11px
!important
;
padding-bottom
:
16px
!important
;
font-family
:
'Monaco'
,
'Consolas'
!important
;
font-family
:
'Monaco'
,
'Consolas'
,
'monospace'
!important
;
color
:
white
;
}
.terminal
{
font-family
:
'Monaco'
,
'Consolas'
!important
;
font-family
:
'Monaco'
,
'Consolas'
,
'monospace'
!important
;
font-size
:
11px
;
white-space
:
nowrap
;
display
:
inline-block
;
/*display: inline-block;*/
/*background-color: #1f1b1b;*/
}
.terminal
div
{
user-select
:
text
;
}
.terminal
,
.terminal
.xterm-viewport
{
background-color
:
inherit
;
.terminal
.xterm-rows
{
background-color
:
#1f1b1b
;
}
.terminal
.xterm-rows
{
background-color
:
black
;
.terminal
.xterm-viewport
{
background-color
:
#1f1b1b
;
overflow
:
auto
;
}
body
::-webkit-scrollbar-track
{
-webkit-box-shadow
:
inset
0
0
2px
rgba
(
0
,
0
,
0
,
0.3
);
background-color
:
#676a6c
;
}
body
::-webkit-scrollbar
{
width
:
8px
;
height
:
8px
;
}
body
::-webkit-scrollbar-thumb
{
background-color
:
#F5F5F5
;
}
.ztree
*
{
font-family
:
'Monaco'
,
'Consolas'
,
'monospace'
!important
;
}
/*.scroll-botton {*/
/*font-size: 20px;*/
/*float: left;*/
/*height: 30px;*/
/*overflow: hidden;*/
/*background-color: #3a3333;*/
/*color: white*/
/*}*/
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