Commit 50514109 authored by wangqinghua's avatar wangqinghua

服务器

parent e921b293
......@@ -4,7 +4,7 @@ import {BehaviorSubject, Subscription} from 'rxjs';
@Injectable()
export class AppService {
private themeSource:BehaviorSubject<string> = new BehaviorSubject('dark');
private themeSource:BehaviorSubject<string> = new BehaviorSubject('white');
public theme = this.themeSource.asObservable();
public setTheme(value: string){
......
......@@ -158,8 +158,10 @@ export class HomeComponent implements OnInit, AfterViewInit {
);
this.layoutSer.findItemStatisticsByGroupid(this.obj.leftGroupId).subscribe(
(res) => {
this.leftTwoData = res.data;
this.setLeftTwo(res.data);
if(res){
this.leftTwoData = res.data;
this.setLeftTwo(res.data);
}
}
);
}
......
......@@ -11,11 +11,11 @@
</span>
</div>
<div nz-col [nzSpan]="12" style="text-align: right">
<!-- <nz-select style="width: 150px;margin-right: 20px" [(ngModel)]="theme" (ngModelChange)="changeTheme()">-->
<!-- <ng-container *ngFor="let item of themeList">-->
<!-- <nz-option [nzValue]="item.value" [nzLabel]="item.label"></nz-option>-->
<!-- </ng-container>-->
<!-- </nz-select>-->
<nz-select style="width: 150px;margin-right: 20px" [(ngModel)]="theme" (ngModelChange)="changeTheme()">
<ng-container *ngFor="let item of themeList">
<nz-option [nzValue]="item.value" [nzLabel]="item.label"></nz-option>
</ng-container>
</nz-select>
<nz-dropdown [nzTrigger]="'click'">
<a nz-dropdown>{{user.loginName}}<i class="anticon anticon-down"></i>
</a>
......
......@@ -37,7 +37,7 @@
<div nz-row class="layui-layout layui-layout-admin header-bar">
<div nz-col nzSpan="12" class="layui-header ">
<ng-container *ngIf="editType == '只读模式'">
<nz-select style="width: 200px;" nzPlaceHolder="选择背景色" [(ngModel)]="backgroundColor" (ngModelChange)="changeColor()">
<nz-select style="width: 200px;" nzPlaceHolder="选择背景色123" [(ngModel)]="backgroundColor" (ngModelChange)="changeColor()">
<nz-option nzLabel="深蓝" nzValue="#3d76ab"></nz-option>
<nz-option nzLabel="白色" nzValue="#ffffff"></nz-option>
<nz-option nzLabel="淡绿" nzValue="#cadf91"></nz-option>
......
......@@ -135,8 +135,9 @@ export class NeTopologyComponent implements OnInit, DoCheck, AfterViewInit, OnDe
}
ngAfterViewInit() {
const canvasWidth = this.topologyBody.nativeElement.clientWidth;
const canvasWidth = this.topologyBody.nativeElement.clientWidth -200;
const canvasHeight = this.topologyBody.nativeElement.clientHeight;
console.log(canvasWidth,canvasHeight)
let myCanvas = this.topologyCanvas.nativeElement;
let context = myCanvas.getContext('2d');
let ratio = this.getPixelRatio(context);
......
......@@ -171,8 +171,8 @@ function TopologyEditor() {
eagleEyeVsibleDefault: false, // 是否显示鹰眼对象
// Node属性
nodeAlpha: 1, // 节点透明度,取值范围[0-1]
nodeStrokeColor: '22,124,255', // 节点描边的颜色
nodeFillColor: '22,124,255', // 节点填充颜色
nodeStrokeColor: '177,209,239', // 节点描边的颜色
nodeFillColor: '177,209,239', // 节点填充颜色
nodeShadow: false, // 节点是否显示阴影
nodeShadowColor: 'rgba(0,0,0,0.5)', // 节点阴影的颜色
nodeFont: '18px Consolas', // 节点字体
......@@ -189,8 +189,8 @@ function TopologyEditor() {
linkFillColor: '177,209,239',
linkShadow: false, // 是否显示连线阴影
linkShadowColor: 'rgba(0,0,0,0.5)',
linkFont: '25px Consolas', // 节点字体
linkFontColor: 'red', // 连线文字颜色,如"255,255,0"
linkFont: '18px Consolas', // 节点字体
linkFontColor: '177,209,239', // 连线文字颜色,如"255,255,0"
linkArrowsRadius: 0, // 线条箭头半径
linkDefaultWidth: 1, // 连线宽度
linkOffsetGap: 80, // 折线拐角处的长度
......@@ -515,8 +515,9 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson,ca
this.topologyGuid = topologyGuid
// 创建jTopo舞台屏幕对象
var canvas = document.getElementById('topology-canvas');
// canvas.width = canvasWidth;
// canvas.height = canvasHeight;
console.log(canvasWidth,canvasHeight)
canvas.width = canvasWidth;
canvas.height = canvasHeight;
// 加载空白的编辑器
if (topologyJson === '-1') {
this.stage = new JTopo.Stage(canvas) // 定义舞台对象
......@@ -542,11 +543,6 @@ TopologyEditor.prototype.init = function (topologyGuid, backImg, topologyJson,ca
this.link = null
var self = this
// 模拟告警
if(editor.utils.getAllNodes().length > 0){
debugger
editor.utils.getAllNodes()[0].alarm = "告警";
}
// 初始化菜单
......
.white {
.ant-layout-header{
background-color: #fff;
border-bottom: 1px solid #eeeeee;
}
//自己写的
//主机详情
.host-item-title {
......
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