Răsfoiți Sursa

Z991239-5462 #comment fea: update startup page size

chenliangyu 1 an în urmă
părinte
comite
1f878009e5

+ 1 - 1
Module/mod_chromium/CModTools.cpp

@@ -804,7 +804,7 @@ namespace Chromium {
 		 else if (reason._to_integral() == ERR_PAGE_REASON::startup)
 		{
 			auto url = std::string(R"(file:///)") + getErrUrl(reason).second;
-			auto strCmdline = generateCommonPage(url, (+ERR_PAGE_REASON::startup)._to_string(), "600*310", "", (int)HWND_NOTOPMOST);
+			auto strCmdline = generateCommonPage(url, (+ERR_PAGE_REASON::startup)._to_string(), "800*600", "", (int)HWND_NOTOPMOST);
 			auto openCefRet = openCef(strCmdline, false);
 			if (Error_Succeed == openCefRet.first)
 				return std::make_pair(Error_Succeed, openCefRet.second);

+ 0 - 2
addin/res/ManagerDesktop/js/entityService.js

@@ -769,8 +769,6 @@ var GUIConsoleService={
 		req.class = this._serviceBase.className;
 		req.methodID = this._methodID.GetBasicInformation;
         req.signature = this._methodSignature.GetBasicInformation;
-        console.log('GetBasicInformation callback',req)
-
 		WebSocketBase.sendMsg(req, function(data) {
             var jsondata = JSON.parse(data);
             callback(jsondata);

+ 41 - 12
addin/res/ManagerDesktop/startPage.html

@@ -11,13 +11,13 @@
 
 		<style>
 			.start_page .logo{
-				height: 15px;
-				margin: 12px 30px;
+				height: 25px;
+    			margin: 10px 30px;
 				padding: 13px 0px;
 			}
 			h3{
 				font-family: PingFangSC-Semibold;
-				font-size: 12px;
+				font-size: 20px;
 				color: #333333;
 				letter-spacing: 0;
 				font-weight: 600;
@@ -26,20 +26,37 @@
 			}
 			.entity_list{
 				padding: 15px 30px;
-				height: 120px;
+				height: 380px;
 				overflow: auto;
 			}
 			.entity_list li{
 				font-family: HYQiHei-EES;
-				font-size: 8px;
+				font-size: 14px;
 				color: #555555;
 				font-weight: 400;
-				padding: 2px 0px;
+				padding: 3px 0px;
 				
 			}
 			.entity_list li:last-child{
 				background: #D8D8D8;
 			}
+			.entity_list .warn{
+				color: #ff9d58;
+			}
+			.entity_list .warn:last-child{
+				color: #4D7BFE;
+				background: #ff9d58;
+			}
+			.entity_list .error{
+				color: #f4616c;
+			}
+			.entity_list .error:last-child{
+				color: #333;
+				background: #f4616c;
+			}
+			.entity_list::-webkit-scrollbar{
+				width: 0;
+			}
 			.start_page .footer{
 				display: flex;
 				justify-content: space-between;
@@ -47,7 +64,7 @@
 			}
 			.start_page .footer button{
 				font-family: HYQiHei-FES;
-				font-size: 10px;
+				font-size: 16px;
 				color: #4D7BFE;
 				letter-spacing: 0;
 				text-align: center;
@@ -55,7 +72,7 @@
 			}
 			.start_page .footer ul li{
 				font-family: HYQiHei-EES;
-				font-size: 8px;
+				font-size: 14px;
 				color: #555555;
 				text-align: right;
 				font-weight: 400;
@@ -82,7 +99,7 @@
 			<ul>
 				<li id="versionNo">V7.5.1.1</li>
 				<li id="terminalNo">7555980183</li>
-				<li>-TESTver</li>
+				<li id="env">-TESTver</li>
 			</ul>
 		</div>
 	</body>
@@ -108,13 +125,15 @@
 			req.reserved2 = 0;
 			req.reserved3 = '';
 			GUIConsoleService.GetBasicInformation(req,function(ret){
-				console.log('GetBasicInformation---',ret)
+				// console.log('GetBasicInformation---',ret)
 				if(ret.errorCode===0){
 					let data = JSON.parse(ret['{e12a3dc0-3a0b-47c4-a8c3-75190a42ae68}'])
-					console.log('GetBasicInformation---data',data)
+					// console.log('GetBasicInformation---data',data)
 					document.getElementById('entityNum').innerHTML = '正在启动('+data.Idle_entityNum+'/'+data.total_entityNum+')'
 					document.getElementById('terminalNo').innerHTML = data.terminalNo
 					document.getElementById('versionNo').innerHTML = 'V'+data.versionNo
+					document.getElementById('env').innerHTML = '-'+data.Env
+					
 				}
 			})
 		}
@@ -147,8 +166,18 @@
 		EventEmitter.subscribe('LogInfo', eventID, (evt)=> {
 			console.log("LogInfo data:"+ evt['{e12a3dc0-3a0b-47c4-a8c3-75190a42ae68}']);
 			let result = JSON.parse(evt['{e12a3dc0-3a0b-47c4-a8c3-75190a42ae68}'])
-			thread+='<li>'+result.timeStr+' '+result.entityName+'  '+result.message+'</li>'
+			if(result.LogType==='Error'||result.LogType==='Fault'){
+				thread+='<li class="error">'+result.timeStr+' '+result.entityName+'  '+result.message+'</li>'
+			}
+			else if(result.LogType==='Warn'){
+				thread+='<li class="warn">'+result.timeStr+' '+result.entityName+'  '+result.message+'</li>'
+			}else{
+				thread+='<li>'+result.timeStr+' '+result.entityName+'  '+result.message+'</li>'
+			}
+			let logList = document.getElementById('logList')
 			logList.innerHTML = thread
+			// 最新的内容在可视窗口
+			logList.scrollTop = logList.scrollHeight - logList.clientHeight
 		});
         
 	</script>