diff --git a/README.md b/README.md
index 9f14ab0..c5dfb1f 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ where your disk space has gone to help you to clean it up.
1. Download the [latest release](https://github.com/GaelGirodon/dir-stat/releases)
2. Start **DirStat**
3. Set the path of the directory to scan
-4. Click on the ๐ **Scan** button
+4. Click on the **Scan** button (or press Enter)
5. Navigate in the treemap to show where your disk space has gone
### CLI usage
@@ -30,8 +30,11 @@ dirstat --port 8000
Install global dependencies:
- Node.js >= 8
+- NPM >= 5
- Go >= 1.11
+- [Dep](https://github.com/golang/dep) >= 0.5.0
- [Packr](https://github.com/gobuffalo/packr) >= 1.15
+- PowerShell
Then, install project dependencies:
@@ -48,7 +51,7 @@ npm run build
### Package
```shell
-./scripts/package.ps1
+npm run package
```
### Release
diff --git a/assets/js/dirstat.js b/assets/js/dirstat.js
index f3181ef..1d50e2b 100644
--- a/assets/js/dirstat.js
+++ b/assets/js/dirstat.js
@@ -47,8 +47,12 @@ var app = new Vue({
this.$http.get('stat?path=' + this.dir).then(function (data) {
var entry = data.body;
this.path = [entry];
+ document.getElementById('treemap-container').innerHTML = '';
this.graph = new d3plus.Treemap()
- .select('#treemap')
+ .select('#treemap-container')
+ .detectResize(true)
+ .detectResizeDelay(250)
+ .height(640)
.data(this.entries)
.groupBy('name').sum(this.mode)
.tooltipConfig({
@@ -61,13 +65,15 @@ var app = new Vue({
this.processing = false;
}).catch(function (err) {
this.processing = false;
- this.error = 'Unable to analyse the given directory: ' + err.body.message;
+ this.error = 'Unable to scan the given directory'
+ + (err.body.message ? ': ' + err.body.message : '') + '.';
});
},
// Map entry stats to a string
mapStats: function (d) {
- return Math.round(d.size / (1024 * 1024)) + ' MB'
- + ' / ' + d.count + ' entries / depth ' + d.depth
+ return 'Size: ' + Math.round(d.size / (1024 * 1024)) + ' MB
'
+ + 'Count: ' + d.count + ' entries
'
+ + 'Depth: ' + d.depth
},
// Render the tree map
renderTreemap: function () {
diff --git a/assets/sass/dirstat.scss b/assets/sass/dirstat.scss
index ae9728d..7ebe979 100644
--- a/assets/sass/dirstat.scss
+++ b/assets/sass/dirstat.scss
@@ -5,4 +5,15 @@
[v-cloak] {
display: none;
-}
\ No newline at end of file
+}
+
+body {
+ background: #f5f5f5;
+}
+
+.breadcrumb {
+ background: #ffffff;
+ border: solid 1px #ced4da;
+ padding-top: 0.4rem !important;
+ padding-bottom: 0.4rem !important;
+}
diff --git a/dirstat.go b/dirstat.go
index 677d4b8..c24d5d8 100644
--- a/dirstat.go
+++ b/dirstat.go
@@ -81,6 +81,7 @@ func statHandler(res http.ResponseWriter, req *http.Request) {
// Send a success response with a body content
func sendSuccess(res http.ResponseWriter, body []byte) {
+ log.Println("OK")
res.Header().Set("Content-Type", "application/json")
res.WriteHeader(http.StatusOK)
res.Write(body)
diff --git a/package-lock.json b/package-lock.json
index 95c2d54..526a011 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "dir-stat",
- "version": "0.1.0",
+ "version": "0.2.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 012f74e..eebe898 100644
--- a/package.json
+++ b/package.json
@@ -1,12 +1,13 @@
{
"name": "dir-stat",
- "version": "0.1.0",
+ "version": "0.2.0",
"description": "Simple directory statistics",
"scripts": {
"build:assets": "gulp",
"build": "npm run build:assets && packr build -i -o dirstat.exe .",
"ensure": "npm install && dep ensure",
- "start": "dirstat"
+ "start": "dirstat",
+ "package": "powershell.exe ./scripts/package.ps1"
},
"repository": {
"type": "git",
diff --git a/web/index.html b/web/index.html
index a595fba..d0fc61c 100644
--- a/web/index.html
+++ b/web/index.html
@@ -12,38 +12,37 @@
- DirStat is a simple graphical web application to show
+