Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 02f1632

Browse files
Merge pull request #350 from MicrosoftDX/dev
Merge from dev for 0.2.2
2 parents 0996691 + 5ecf607 commit 02f1632

File tree

116 files changed

+6612
-586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+6612
-586
lines changed

.dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
DeploymentTools/
2+
desktop/
3+
.vscode/
4+
Tests/
5+
node_modules/
6+
Contributing.md
7+
Readme.md
8+
azuredeploy.json
9+
azuredeploy-parameters.json
10+
deploy.cmd
11+
build-docker-image.sh
12+
VorlonNodeWrapper/
13+
client samples/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ sync.bat
88
/.vs/
99
bin/
1010
**/control.css
11+
!Plugins/Vorlon/plugins/office/control.css
1112
sync.bat
1213
.settings/launch.json
1314
*.dat

.vscode/launch.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
// Type of configuration. Possible values: "node", "mono".
1010
"type": "node",
1111
// Workspace relative or absolute path to the program.
12-
"program": "Server/server.js",
12+
"program": "${workspaceRoot}/Server/server.js",
1313
// Automatically stop program after launch.
1414
"stopOnEntry": false,
1515
// Command line arguments passed to the program.
1616
"args": [],
1717
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
18-
"cwd": ".",
18+
"cwd": "${workspaceRoot}",
1919
// Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
2020
"runtimeExecutable": null,
2121
// Optional arguments passed to the runtime executable.
@@ -42,25 +42,25 @@
4242
// not working since latest vs code and electron versions :-(
4343
"name": "Launch desktop App",
4444
"type": "node",
45-
"program": "desktop/app/background.js",
45+
"program": "${workspaceRoot}/desktop/app/background.js",
4646
"stopOnEntry": false,
4747
"args": [
4848
"--dev"
4949
],
50-
"cwd": ".",
51-
"runtimeExecutable": "desktop/node_modules/electron-prebuilt/dist/electron.exe",
50+
"cwd": "${workspaceRoot}",
51+
"runtimeExecutable": "${workspaceRoot}/desktop/node_modules/electron-prebuilt/dist/electron.exe",
5252
"env": {}
5353
},
5454
{
5555
// not working since latest vs code and electron versions :-(
5656
"name": "Launch node.js sample",
5757
"type": "node",
58-
"program": "client samples/nodejs/app.js",
58+
"program": "${workspaceRoot}/client samples/nodejs/app.js",
5959
"stopOnEntry": false,
6060
"args": [
6161
"--nolazy"
6262
],
63-
"cwd": ".",
63+
"cwd": "${workspaceRoot}",
6464
"runtimeExecutable": null,
6565
"env": {}
6666
},
@@ -70,13 +70,13 @@
7070
// Type of configuration. Possible values: "node", "mono".
7171
"type": "node",
7272
// Workspace relative or absolute path to the program.
73-
"program": "Server/server.ts",
73+
"program": "${workspaceRoot}/Server/server.ts",
7474
// Automatically stop program after launch.
7575
"stopOnEntry": false,
7676
// Command line arguments passed to the program.
7777
"args": [],
7878
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
79-
"cwd": ".",
79+
"cwd": "${workspaceRoot}",
8080
// Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
8181
"runtimeExecutable": null,
8282
// Optional arguments passed to the runtime executable.

DeploymentTools/Dockerfile

Lines changed: 0 additions & 29 deletions
This file was deleted.

DeploymentTools/build-docker-image.cmd

Lines changed: 0 additions & 28 deletions
This file was deleted.

Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# use the node argon (4.4.3) image as base
2+
FROM node:argon
3+
4+
# Set the Vorlon.JS Docker Image maintainer
5+
MAINTAINER Julien Corioland (Microsoft, DX)
6+
7+
# Expose port 1337
8+
EXPOSE 1337
9+
10+
# Set the entry point
11+
ENTRYPOINT ["npm", "start"]
12+
13+
# Create the application directory
14+
RUN mkdir -p /usr/src/vorlonjs
15+
16+
# Copy the application content
17+
COPY . /usr/src/vorlonjs/
18+
19+
# Set app root as working directory
20+
WORKDIR /usr/src/vorlonjs
21+
22+
# Upgrade to last NPM version
23+
RUN npm upgrade -g npm
24+
25+
# Install gulp
26+
RUN npm install -g gulp
27+
28+
# Run npm install
29+
RUN npm install
30+
31+
# Run gulp
32+
RUN gulp

Plugins/Vorlon/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
*.js
21
*.js.map
32
*.min.js
43
!verge.min.js

Plugins/Vorlon/plugins/device/control.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<div id="device-information">
22
<h1>Device Information</h1>
3-
<table>
3+
<table id="viewport">
44
<!-- Viewport -->
55
<tr class="viewport-header">
6-
<th colspan="2">Viewport</th>
6+
<th class="header" scope="col" colspan="2">Viewport</th>
77
</tr>
88
<tr>
99
<td>Aspect Ratio</td>
@@ -21,10 +21,11 @@ <h1>Device Information</h1>
2121
<td>Meta Viewport Tag</td>
2222
<td class="meta-viewport-tag"></td>
2323
</tr>
24-
24+
</table>
25+
<table id="screensize">
2526
<!-- Screen Size -->
2627
<tr class="screen-size-header">
27-
<th colspan="2">Screen Size</th>
28+
<th class="header" scope="col" colspan="2">Screen Size</th>
2829
</tr>
2930
<tr>
3031
<td>Screen Width</td>
@@ -42,10 +43,11 @@ <h1>Device Information</h1>
4243
<td>Body Client Width</td>
4344
<td class="body-client-width"></td>
4445
</tr>
45-
46+
</table>
47+
<table id="resolution">
4648
<!-- Resolution -->
4749
<tr class="resolution-header">
48-
<th colspan="2">Resolution</th>
50+
<th class="header" scope="col" colspan="2">Resolution</th>
4951
</tr>
5052
<tr>
5153
<td>Dots Per Inch (DPI)</td>
@@ -59,10 +61,11 @@ <h1>Device Information</h1>
5961
<td>Dots Per Centimeter (DPCM)</td>
6062
<td class="dpcm"></td>
6163
</tr>
62-
64+
</table>
65+
<table id="misc">
6366
<!-- Miscellaneous -->
6467
<tr class="misc-header">
65-
<th colspan="2">Miscellaneous</th>
68+
<th class="header" scope="col" colspan="2">Miscellaneous</th>
6669
</tr>
6770
<tr>
6871
<td>Root Font Size</td>

Plugins/Vorlon/plugins/device/control.less

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@
1010
text-align: left;
1111
}
1212

13-
th {
14-
background: #f7f7f7;
15-
border-bottom: 1px solid #ddd;
16-
font-weight: 400;
17-
}
18-
1913
td {
2014
border-bottom: 1px solid #eee;
2115

2216
&:first-child {
2317
width: 30%;
2418
}
2519
}
20+
21+
.header {
22+
background: #f7f7f7;
23+
border-bottom: 1px solid #ddd;
24+
font-weight: 400;
25+
}
2626
}
27-
}
27+
}
28+

Plugins/Vorlon/plugins/device/vorlon.device.dashboard.ts

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,32 @@
1919
// Start dashboard code
2020
// uses _insertHtmlContentAsync to insert the control.html content
2121
// into the dashboard
22-
private _table: HTMLTableElement;
22+
private _resolutionTable: HTMLTableElement;
23+
private _miscTable: HTMLTableElement;
24+
private _viewportTable: HTMLTableElement;
25+
private _screensizeTable: HTMLTableElement;
2326

2427
public startDashboardSide(div: HTMLDivElement = null): void {
2528
this._insertHtmlContentAsync(div, (filledDiv) => {
26-
this._table = <HTMLTableElement>filledDiv.querySelector('table');
29+
this._resolutionTable = <HTMLTableElement>filledDiv.querySelector('#resolution');
30+
this._miscTable = <HTMLTableElement>filledDiv.querySelector('#misc');
31+
this._viewportTable = <HTMLTableElement>filledDiv.querySelector('#viewport');
32+
this._screensizeTable = <HTMLTableElement>filledDiv.querySelector('#screensize');
2733
})
2834
}
2935

3036
// called to update the HTML with a complete set of data
3137
public update(data: any): void {
3238
// resolution
3339
var resolution = data.resolution;
34-
this.setTableValue('dpi', this.round2decimals(resolution.dpi).toString());
35-
this.setTableValue('dppx', this.round2decimals(resolution.dppx).toString());
36-
this.setTableValue('dpcm', this.round2decimals(resolution.dpcm).toString());
40+
this.setTableValue(this._resolutionTable, 'dpi', this.round2decimals(resolution.dpi).toString());
41+
this.setTableValue(this._resolutionTable,'dppx', this.round2decimals(resolution.dppx).toString());
42+
this.setTableValue(this._resolutionTable,'dpcm', this.round2decimals(resolution.dpcm).toString());
3743

3844
// miscellaneous
39-
this.setTableValue('root-font-size', data.rootFontSize + 'px');
40-
this.setTableValue('pixel-ratio', this.round2decimals(data.pixelRatio).toString());
41-
this.setTableValue('user-agent', data.userAgent);
45+
this.setTableValue(this._miscTable, 'root-font-size', data.rootFontSize + 'px');
46+
this.setTableValue(this._miscTable,'pixel-ratio', this.round2decimals(data.pixelRatio).toString());
47+
this.setTableValue(this._miscTable,'user-agent', data.userAgent);
4248

4349

4450
this.updateResize(data);
@@ -48,22 +54,24 @@
4854
public updateResize(data: any): void {
4955
// viewport
5056
var viewport = data.viewport;
51-
this.setTableValue('aspect-ratio', this.round2decimals(viewport.aspectRatio).toString());
52-
this.setTableValue('width', viewport.width + 'px');
53-
this.setTableValue('width-em', viewport.widthEm + 'em');
54-
this.setTableValue('meta-viewport-tag', data.metaViewport);
57+
this.setTableValue(this._viewportTable, 'aspect-ratio', this.round2decimals(viewport.aspectRatio).toString());
58+
this.setTableValue(this._viewportTable, 'width', viewport.width + 'px');
59+
this.setTableValue(this._viewportTable, 'width-em', viewport.widthEm + 'em');
60+
if(data.metaViewport){
61+
this.setTableValue(this._viewportTable, 'meta-viewport-tag', data.metaViewport);
62+
}
5563

5664
// screen width
5765
var screenWidths = data.screenWidths
58-
this.setTableValue('screen-width', screenWidths.screenWidth + 'px');
59-
this.setTableValue('screen-available-width', screenWidths.screenAvailWidth + 'px');
60-
this.setTableValue('window-inner-width', screenWidths.windowInnerWidth + 'px');
61-
this.setTableValue('body-client-width', screenWidths.bodyClientWidth + 'px');
66+
this.setTableValue(this._screensizeTable, 'screen-width', screenWidths.screenWidth + 'px');
67+
this.setTableValue(this._screensizeTable, 'screen-available-width', screenWidths.screenAvailWidth + 'px');
68+
this.setTableValue(this._screensizeTable, 'window-inner-width', screenWidths.windowInnerWidth + 'px');
69+
this.setTableValue(this._screensizeTable, 'body-client-width', screenWidths.bodyClientWidth + 'px');
6270
}
6371

64-
public setTableValue(cssClass: string, value: string): void {
65-
if (this._table)
66-
this._table.querySelector('.' + cssClass).textContent = value;
72+
public setTableValue(table: HTMLTableElement, cssClass: string, value: string): void {
73+
if (table)
74+
table.querySelector('.' + cssClass).textContent = value;
6775
}
6876

6977
private round2decimals(value: any):number{

0 commit comments

Comments
 (0)