Skip to content

Commit 92219bc

Browse files
committed
feat: add silent workspace
1 parent 4d1fabd commit 92219bc

File tree

7 files changed

+49
-31
lines changed

7 files changed

+49
-31
lines changed

public/img/f0.svg

Lines changed: 1 addition & 1 deletion
Loading

public/img/f1.svg

Lines changed: 1 addition & 1 deletion
Loading

public/js/dragmap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5972,7 +5972,7 @@ var $author$project$Dragmap$hostModelDecoder = A3(
59725972
function (hostlist) {
59735973
var mapsettings = function () {
59745974
if (maybemapsettings.$ === 'Nothing') {
5975-
return A4($author$project$Dragmap$MapSettings, 1325, 1026, 60, 25);
5975+
return A4($author$project$Dragmap$MapSettings, 1625, 1026, 60, 25);
59765976
} else {
59775977
var settings = maybemapsettings.a;
59785978
return settings;
@@ -5993,7 +5993,7 @@ var $author$project$Dragmap$getHosts = function (hostfile) {
59935993
var hostlist = result2.a;
59945994
var hostmodel = {
59955995
hostList: hostlist,
5996-
mapSettings: A4($author$project$Dragmap$MapSettings, 1325, 1026, 60, 25),
5996+
mapSettings: A4($author$project$Dragmap$MapSettings, 1625, 1026, 60, 25),
59975997
movingHost: $elm$core$Maybe$Nothing
59985998
};
59995999
return $elm$core$Maybe$Just(hostmodel);
@@ -6012,7 +6012,7 @@ var $author$project$Dragmap$init = F2(
60126012
var hostmodel = $author$project$Dragmap$getHosts(hostfile);
60136013
var mapset = function () {
60146014
if (hostmodel.$ === 'Nothing') {
6015-
return A4($author$project$Dragmap$MapSettings, 1325, 1026, 60, 25);
6015+
return A4($author$project$Dragmap$MapSettings, 1625, 1026, 60, 25);
60166016
} else {
60176017
var hmodel = hostmodel.a;
60186018
return hmodel.mapSettings;
@@ -7648,4 +7648,4 @@ var $author$project$Main$view = function (model) {
76487648
var $author$project$Main$main = $elm$browser$Browser$element(
76497649
{init: $author$project$Main$init, subscriptions: $author$project$Main$subscriptions, update: $author$project$Main$update, view: $author$project$Main$view});
76507650
_Platform_export({'Main':{'init':$author$project$Main$main(
7651-
$elm$json$Json$Decode$succeed(_Utils_Tuple0))(0)}});}(this));
7651+
$elm$json$Json$Decode$succeed(_Utils_Tuple0))(0)}});}(this));

public/js/interactive_maps.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5393,9 +5393,9 @@ var $author$project$Main$calcMapSettings = F2(
53935393
var _class = _v0.dw;
53945394
var orientation = _v0.a1;
53955395
var preheight = $elm$core$Basics$round(window.aR * 0.93);
5396-
var prewidth = $elm$core$Basics$round(preheight * 0.77);
5396+
var prewidth = $elm$core$Basics$round(preheight * 0.63);
53975397
var width = (_Utils_cmp(prewidth, window.bc) > -1) ? $elm$core$Basics$round(window.bc * 0.95) : prewidth;
5398-
var height = (_Utils_cmp(prewidth, window.bc) > -1) ? $elm$core$Basics$round(width * 1.299) : preheight;
5398+
var height = (_Utils_cmp(prewidth, window.bc) > -1) ? $elm$core$Basics$round(width * 1.584) : preheight;
53995399
switch (_class) {
54005400
case 0:
54015401
if (!orientation) {

public/json/clusterf0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"mapsettings": {
3-
"heigth": 1325,
3+
"heigth": 1625,
44
"width": 1026,
55
"active-size": 60,
66
"empty-size": 20
@@ -608,4 +608,4 @@
608608
"top": 681
609609
}
610610
]
611-
}
611+
}

public/json/clusterf1.json

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,36 @@
11
{
22
"mapsettings": {
3-
"heigth": 1325,
3+
"heigth": 1625,
44
"width": 1026,
55
"active-size": 60,
66
"empty-size": 20
77
},
8-
"hosts":
9-
[
8+
"hosts": [
9+
{
10+
"hostname": "f1r5s7.codam.nl",
11+
"left": 148,
12+
"top": 971
13+
},
14+
{
15+
"hostname": "f1r7s4.codam.nl",
16+
"left": 186,
17+
"top": 1555
18+
},
19+
{
20+
"hostname": "f1r7s3.codam.nl",
21+
"left": 187,
22+
"top": 1472
23+
},
24+
{
25+
"hostname": "f1r7s2.codam.nl",
26+
"left": 89,
27+
"top": 1472
28+
},
29+
{
30+
"hostname": "f1r7s1.codam.nl",
31+
"left": 89,
32+
"top": 1555
33+
},
1034
{
1135
"hostname": "f1r1s10.codam.nl",
1236
"left": 899,
@@ -432,11 +456,6 @@
432456
"left": 207,
433457
"top": 1079
434458
},
435-
{
436-
"hostname": "f1r5s7.codam.nl",
437-
"left": 147,
438-
"top": 970
439-
},
440459
{
441460
"hostname": "f1r5s6.codam.nl",
442461
"left": 206,
@@ -608,4 +627,4 @@
608627
"top": 98
609628
}
610629
]
611-
}
630+
}

src/elm/clustermap/Main.elm

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ type alias Model =
5050
}
5151

5252

53-
{-|
53+
{-|
5454
On initial loading we use the values passed from the flags to determine a map
5555
size. I found that taking 90% of the width and hight values gives better
56-
results.
56+
results.
5757
5858
Firefox loads nicely with the width and hight from the flags, but chrome
5959
doesn't. Also, performing getViewport in Firefox before the map is fully loaded
@@ -66,7 +66,7 @@ init { width, height, isFirefox } =
6666
let
6767
width90 =
6868
round (toFloat width * 0.9)
69-
69+
7070
height90 =
7171
round (toFloat height * 0.9)
7272

@@ -81,15 +81,15 @@ init { width, height, isFirefox } =
8181

8282
( f1model, f1cmd ) =
8383
Clustermap.init Endpoint.clusterf1 Endpoint.activeSessions Asset.clusterf1 mapsettings
84-
84+
8585
resizeTask =
8686
if isFirefox then
8787
Cmd.none
8888
else
8989
Task.perform BeResponsive BD.getViewport
9090
in
9191
( Model f0model f1model (Window width90 height90) device
92-
, Platform.Cmd.batch
92+
, Platform.Cmd.batch
9393
[ Platform.Cmd.map Mapf0Msg f0cmd
9494
, Platform.Cmd.map Mapf1Msg f1cmd
9595
, resizeTask
@@ -125,7 +125,7 @@ calcMapSettings window { class, orientation } =
125125
round (toFloat window.height * 0.93)
126126

127127
prewidth =
128-
round (toFloat preheight * 0.77)
128+
round (toFloat preheight * 0.63)
129129

130130
width =
131131
if prewidth >= window.width then
@@ -136,7 +136,7 @@ calcMapSettings window { class, orientation } =
136136

137137
height =
138138
if prewidth >= window.width then
139-
round (toFloat width * 1.299)
139+
round (toFloat width * 1.584)
140140

141141
else
142142
preheight
@@ -319,15 +319,14 @@ classifyDevice window =
319319
}
320320

321321
{-| Every 30 seconds both clusters are updated, also there is a listener for
322-
onResize events.
322+
onResize events.
323323
-}
324324
subscriptions : Model -> Sub Msg
325325
subscriptions _ =
326-
Sub.batch
327-
[ Sub.map Mapf0Msg
326+
Sub.batch
327+
[ Sub.map Mapf0Msg
328328
<| Time.every (5 * 1000) Clustermap.FetchSessions
329-
, Sub.map Mapf1Msg
329+
, Sub.map Mapf1Msg
330330
<| Time.every (5 * 1000) Clustermap.FetchSessions
331331
, BE.onResize OnResize
332332
]
333-

0 commit comments

Comments
 (0)