Css files refactored, some classes renamed
This commit is contained in:
parent
1429335695
commit
6201469a07
20
pom.xml
20
pom.xml
|
@ -1,7 +1,7 @@
|
|||
<?xml version = "1.0" encoding = "UTF-8"?>
|
||||
<project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<name>Ward</name>
|
||||
<description>Server dashboard</description>
|
||||
<description>Server Dashboard</description>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
|
@ -13,7 +13,8 @@
|
|||
<version>1.0.0</version>
|
||||
<packaging>war</packaging>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<oshiVersion>5.0.1</oshiVersion>
|
||||
<jnaVersion>5.5.0</jnaVersion>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -24,6 +25,21 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core</artifactId>
|
||||
<version>${oshiVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
<version>${jnaVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna-platform</artifactId>
|
||||
<version>${jnaVersion}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.bsoftware.ward.controllers;
|
||||
|
||||
import org.bsoftware.ward.services.InfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -7,11 +9,20 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
|
||||
@Controller
|
||||
@RequestMapping(value = "/")
|
||||
public class Dashboard
|
||||
public class IndexController
|
||||
{
|
||||
private InfoService infoService;
|
||||
|
||||
@GetMapping
|
||||
public String getDashboard(Model model)
|
||||
{
|
||||
return "dashboard";
|
||||
infoService.getProcessorInfo();
|
||||
return "index";
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public IndexController(InfoService infoService)
|
||||
{
|
||||
this.infoService = infoService;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package org.bsoftware.ward.services;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import oshi.SystemInfo;
|
||||
import oshi.hardware.CentralProcessor;
|
||||
import oshi.hardware.HardwareAbstractionLayer;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class InfoService
|
||||
{
|
||||
public Map<String, String> getProcessorInfo()
|
||||
{
|
||||
HardwareAbstractionLayer hardwareAbstractionLayer = (new SystemInfo()).getHardware();
|
||||
CentralProcessor centralProcessor = hardwareAbstractionLayer.getProcessor();
|
||||
System.out.println(centralProcessor.getMaxFreq());
|
||||
System.out.println(centralProcessor.getLogicalProcessorCount());
|
||||
System.out.println(centralProcessor.getProcessorIdentifier().getName());
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
# Server
|
||||
server.port = 9000
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
Every entry must follow convention:
|
||||
* Entry name must begins with palette name.
|
||||
* Pallete name must be followed by tint.
|
||||
* Palette name must be followed by tint.
|
||||
* Use dashes to separate words.
|
||||
|
||||
By example: --grey-light
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
--uptime-rectangle-grid-left-spacing: 2.781rem;
|
||||
|
||||
/* values-grid > div */
|
||||
--values-grid-div-margin-right: 0.375rem;
|
||||
--values-grid-div-margin-right: 0.125rem;
|
||||
--values-grid-div-height: 3.188rem;
|
||||
--values-grid-div-width: 3.75rem;
|
||||
|
||||
|
@ -170,14 +170,6 @@
|
|||
--chart-container-width: 42.625rem;
|
||||
--chart-container-border-thickness: 0.063rem;
|
||||
|
||||
/* font-size */
|
||||
--font-size-9pt: 0.563em;
|
||||
--font-size-12pt: 0.75em;
|
||||
--font-size-14pt: 0.875em;
|
||||
--font-size-18pt: 1.125em;
|
||||
--font-size-42pt: 2.625em;
|
||||
--font-size-62pt: 3.875em;
|
||||
|
||||
/* letter-spacing */
|
||||
--letter-spacing-10px: 0.625rem;
|
||||
--letter-spacing-2px: 0.125rem;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* Category name must be followed by font attribute name.
|
||||
* Use dashes to separate words.
|
||||
|
||||
By example: --font-weigth-regular
|
||||
By example: --font-weight-regular
|
||||
*/
|
||||
|
||||
:root
|
||||
|
@ -18,21 +18,29 @@
|
|||
/* font-family */
|
||||
--font-family-roboto: roboto;
|
||||
|
||||
/* font-size */
|
||||
--font-size-9pt: 0.563em;
|
||||
--font-size-12pt: 0.75em;
|
||||
--font-size-14pt: 0.875em;
|
||||
--font-size-18pt: 1.125em;
|
||||
--font-size-42pt: 2.625em;
|
||||
--font-size-62pt: 3.875em;
|
||||
|
||||
/* font-weight */
|
||||
--font-weigth-regular: 400;
|
||||
--font-weigth-bold: 700;
|
||||
--font-weight-regular: 400;
|
||||
--font-weight-bold: 700;
|
||||
}
|
||||
|
||||
@font-face
|
||||
{
|
||||
font-family: var(--font-family-roboto);
|
||||
font-weight: var(--font-weigth-regular);
|
||||
font-weight: var(--font-weight-regular);
|
||||
src: url(../fonts/roboto/regular.ttf);
|
||||
}
|
||||
|
||||
@font-face
|
||||
{
|
||||
font-family: var(--font-family-roboto);
|
||||
font-weight: var(--font-weigth-bold);
|
||||
font-weight: var(--font-weight-bold);
|
||||
src: url(../fonts/roboto/bold.ttf);
|
||||
}
|
|
@ -65,14 +65,14 @@ body
|
|||
.hw-type
|
||||
{
|
||||
font-size: var(--font-size-18pt);
|
||||
font-weight: var(--font-weigth-bold);
|
||||
font-weight: var(--font-weight-bold);
|
||||
color: var(--black);
|
||||
}
|
||||
|
||||
.hw-name
|
||||
{
|
||||
font-size: var(--font-size-14pt);
|
||||
font-weight: var(--font-weigth-regular);
|
||||
font-weight: var(--font-weight-regular);
|
||||
color: var(--grey);
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ body
|
|||
right: 0;
|
||||
bottom: var(--hw-utilization-value-bottom-spacing);
|
||||
font-size: var(--font-size-62pt);
|
||||
font-weight: var(--font-weigth-bold);
|
||||
font-weight: var(--font-weight-bold);
|
||||
color: var(--black);
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ body
|
|||
width: var(--underline-width);
|
||||
text-align: center;
|
||||
font-size: var(--font-size-9pt);
|
||||
font-weight: var(--font-weigth-regular);
|
||||
font-weight: var(--font-weight-regular);
|
||||
color: var(--grey-light);
|
||||
background: var(--white-opacity-90);
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ body
|
|||
width: var(--detailed-hw-info-div-width);
|
||||
text-align: center;
|
||||
font-size: var(--font-size-14pt);
|
||||
font-weight: var(--font-weigth-regular);
|
||||
font-weight: var(--font-weight-regular);
|
||||
color: var(--grey);
|
||||
}
|
||||
|
||||
|
@ -257,7 +257,7 @@ body
|
|||
text-align: center;
|
||||
letter-spacing: var(--letter-spacing-10px);
|
||||
font-size: var(--font-size-42pt);
|
||||
font-weight: var(--font-weigth-regular);
|
||||
font-weight: var(--font-weight-regular);
|
||||
color: var(--grey-light);
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ body
|
|||
text-align: center;
|
||||
letter-spacing: var(--letter-spacing-2px);
|
||||
font-size: var(--font-size-9pt);
|
||||
font-weight: var(--font-weigth-regular);
|
||||
font-weight: var(--font-weight-regular);
|
||||
color: var(--grey-light);
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ body
|
|||
width: var(--values-grid-div-width);
|
||||
text-align: center;
|
||||
font-size: var(--font-size-42pt);
|
||||
font-weight: var(--font-weigth-bold);
|
||||
font-weight: var(--font-weight-bold);
|
||||
color: var(--grey);
|
||||
background: var(--white-opacity-70);
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ body
|
|||
top: var(--card-spacing);
|
||||
left: var(--card-spacing);
|
||||
font-size: var(--font-size-18pt);
|
||||
font-weight: var(--font-weigth-bold);
|
||||
font-weight: var(--font-weight-bold);
|
||||
color: var(--black);
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,12 @@
|
|||
<div class = "green-light"></div>
|
||||
</div>
|
||||
<div class = "uptime-rectangle-grid">
|
||||
<div class = "values-grid"></div>
|
||||
<div class = "values-grid">
|
||||
<div><p id = "uptime-days">00</p></div>
|
||||
<div><p id = "uptime-hours">00</p></div>
|
||||
<div><p id = "uptime-minutes">00</p></div>
|
||||
<div><p id = "uptime-seconds">00</p></div>
|
||||
</div>
|
||||
<div class = "labels-grid">
|
||||
<div>DAYS</div>
|
||||
<div>HOURS</div>
|
Loading…
Reference in New Issue