Commit 68412c3b authored by liuzheng712's avatar liuzheng712

feat: public

parent c77c955e
......@@ -26,3 +26,28 @@ Before running the tests make sure you are serving the app via `ng serve`.
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
## Running On Your Server
Untar the luna release tar file, and put it under the folder you like.
Nginx config:
```
location /luna/ {
index index.html;
alias /path/of/your/luna/;
}
location ^~ /ws/ {
proxy_pass http://localhost:3000/ws/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# WebSocket support (nginx 1.4)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
```
......@@ -5,7 +5,7 @@
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"build": "ng build",
"build": "ng build -prod --base-href=/luna/ --deploy '/luna/'",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
......
......@@ -22,6 +22,7 @@
.filetree li {
list-style: none;
cursor: pointer;
color: #ffffff;
}
.filetree label {
......@@ -69,4 +70,5 @@
width: 100%;
border: none;
height: 28px;
background: #2f2a2a;
}
<div id="rdp">
<div *ngFor="let m of NavList.List;let i=index"
[ngClass]="{'disconnected':!m.connected,'hidden': m.hide,'hidden':m.type!='rdp'}" id="rdp-{{i}}">
[ngClass]="{'disconnected':!m.connected,'hidden': m.hide || m.type!='rdp'}" id="rdp-{{i}}">
<canvas id="canvas-{{i}}"></canvas>
</div>
</div>
<div id="term">
<div *ngFor="let m of NavList.List;let i=index"
[ngClass]="{'disconnected':!m.connected,'hidden': m.hide,'hidden':m.type!='ssh'}" id="term-{{i}}">
[ngClass]="{'disconnected':!m.connected,'hidden': m.hide || m.type!='ssh'}" id="term-{{i}}">
</div>
</div>
<span id="liuzheng">liuzheng</span>
......@@ -10,8 +10,9 @@ div {
}
app-cleftbar {
background-color: white;
padding: 0;
background: #2f2a2a;
color: #d6cbcb;
}
app-control {
......
......@@ -19,7 +19,7 @@ export let Q: string = '';
styleUrls: ['./search.component.css']
})
export class SearchComponent implements OnChanges {
q: string;
@Input() input;
searchrequest: any;
......
......@@ -20,10 +20,9 @@ const appRoutes: Routes = [
// { path: 'crisis-center', component: CrisisListComponent },
// {path: 'welcome', component: IndexPageComponent}, // <-- delete this line
{path: 'users/login', component: LoginComponent},
{path: 'control', component: ControlPageComponent},
{path: 'rdp/:token', component: RdppageComponent},
{path: 'term/:token', component: TermpageComponent},
{path: '', redirectTo: '/control', pathMatch: 'full'},
{path: '', component: ControlPageComponent},
{path: '**', component: NotFoundComponent}
];
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>JumpServer</title>
<base href="/">
<base href="/luna">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment