mirror of https://github.com/rancher/ui.git
More less windows
This commit is contained in:
parent
4cf7b3abfb
commit
9f4ea6a8f0
|
|
@ -5,9 +5,11 @@ import ManageLabels from 'ui/mixins/manage-labels';
|
||||||
// Remember the last value and use that for new one
|
// Remember the last value and use that for new one
|
||||||
var lastContainer = 'ubuntu:14.04.3';
|
var lastContainer = 'ubuntu:14.04.3';
|
||||||
var lastVm = 'rancher/vm-ubuntu';
|
var lastVm = 'rancher/vm-ubuntu';
|
||||||
|
var lastWindows = 'microsoft/iis';
|
||||||
|
|
||||||
export default Ember.Component.extend(ManageLabels, {
|
export default Ember.Component.extend(ManageLabels, {
|
||||||
settings: Ember.inject.service(),
|
settings: Ember.inject.service(),
|
||||||
|
projects: Ember.inject.service(),
|
||||||
|
|
||||||
// Inputs
|
// Inputs
|
||||||
initialValue: null,
|
initialValue: null,
|
||||||
|
|
@ -40,8 +42,12 @@ export default Ember.Component.extend(ManageLabels, {
|
||||||
|
|
||||||
if ( !initial )
|
if ( !initial )
|
||||||
{
|
{
|
||||||
|
if ( this.get('projects.current.isWindows') ) {
|
||||||
|
initial = lastWindows
|
||||||
|
} else {
|
||||||
initial = ( this.get('isVm') ? lastVm : lastContainer);
|
initial = ( this.get('isVm') ? lastVm : lastContainer);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Ember.run.scheduleOnce('afterRender', () => {
|
Ember.run.scheduleOnce('afterRender', () => {
|
||||||
this.set('userInput', initial);
|
this.set('userInput', initial);
|
||||||
|
|
@ -75,7 +81,9 @@ export default Ember.Component.extend(ManageLabels, {
|
||||||
}
|
}
|
||||||
else if ( input && input.length )
|
else if ( input && input.length )
|
||||||
{
|
{
|
||||||
if ( this.get('isVm') )
|
if ( this.get('projects.current.isWindows') ) {
|
||||||
|
lastWindows = input;
|
||||||
|
} else if ( this.get('isVm') )
|
||||||
{
|
{
|
||||||
lastVm = input;
|
lastVm = input;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ export default Ember.Component.extend(ManageLabels, {
|
||||||
let url = this.get('model.registrationUrl');
|
let url = this.get('model.registrationUrl');
|
||||||
|
|
||||||
return `New-Item -Path 'C:\\Program Files\\rancher' -Type Directory
|
return `New-Item -Path 'C:\\Program Files\\rancher' -Type Directory
|
||||||
Invoke-WebRequest -UseBasicParsing 'https://github.com/rancher/agent/releases/download/v0.3.0/agent.exe' -OutFile 'C:\\Program Files\\rancher\\agent.exe'
|
Invoke-WebRequest -UseBasicParsing 'https://github.com/rancher/agent/releases/download/v0.6.0/agent.exe' -OutFile 'C:\\Program Files\\rancher\\agent.exe'
|
||||||
& 'C:\\Program Files\\rancher\\agent.exe' -register-service ${url}
|
& 'C:\\Program Files\\rancher\\agent.exe' -register-service ${url}
|
||||||
Start-Service rancher-agent`;
|
Start-Service rancher-agent`;
|
||||||
}.property('model.command'),
|
}.property('model.command'),
|
||||||
|
|
|
||||||
|
|
@ -10,21 +10,14 @@
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<i>2</i>
|
<i>2</i>
|
||||||
{{t 'machine.driverCustom.step2'}}
|
{{t 'machine.driverCustom.windows.step2' appName=settings.appName}}
|
||||||
<ul>
|
|
||||||
<li>{{format-html-message 'machine.driverCustom.step2li'}}</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<i>3</i>
|
|
||||||
{{t 'machine.driverCustom.windows.step3' appName=settings.appName}}
|
|
||||||
<div class="copy-pre">
|
<div class="copy-pre">
|
||||||
<pre id="registration-command">{{registrationCommandWindows}}</pre>
|
<pre id="registration-command">{{registrationCommandWindows}}</pre>
|
||||||
{{copy-to-clipboard clipboardText=registrationCommandWindows}}
|
{{copy-to-clipboard clipboardText=registrationCommandWindows}}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<i>4</i>
|
<i>3</i>
|
||||||
{{t 'machine.driverCustom.step5Close.part1'}} {{#link-to "hosts"}}{{t 'machine.driverCustom.step5Close.link'}}{{/link-to}} {{t 'machine.driverCustom.step5Close.part2'}}
|
{{t 'machine.driverCustom.step5Close.part1'}} {{#link-to "hosts"}}{{t 'machine.driverCustom.step5Close.link'}}{{/link-to}} {{t 'machine.driverCustom.step5Close.part2'}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -107,9 +107,9 @@
|
||||||
<div class="lacsso banner-icon" style="width: 68px;"><span class="icon icon-2x icon-alert"></span></div>
|
<div class="lacsso banner-icon" style="width: 68px;"><span class="icon icon-2x icon-alert"></span></div>
|
||||||
<div class="lacsso banner-message">
|
<div class="lacsso banner-message">
|
||||||
<p class="lacsso mt-15 mb-15">
|
<p class="lacsso mt-15 mb-15">
|
||||||
{{~t 'nav.noHosts.prefix' appName=settings.appName minVersion=settings.minDockerVersion~}}
|
{{~t (if projects.current.isWindows 'nav.noHostsWindows.prefix' 'nav.noHosts.prefix') appName=settings.appName minVersion=settings.minDockerVersion~}}
|
||||||
<a href="{{href-to 'hosts.new'}}">{{~t 'nav.noHosts.link' appName=settings.appName minVersion=settings.minDockerVersion~}}</a>
|
<a href="{{href-to 'hosts.new'}}">{{~t (if projects.current.isWindows 'nav.noHostsWindows.link' 'nav.noHosts.link') appName=settings.appName minVersion=settings.minDockerVersion~}}</a>
|
||||||
{{~t 'nav.noHosts.suffix' appName=settings.appName minVersion=settings.minDockerVersion~}}
|
{{~t (if projects.current.isWindows 'nav.noHostsWindows.suffix' 'nav.noHosts.suffix') appName=settings.appName minVersion=settings.minDockerVersion~}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
<div class="btn-group r-ml10">
|
<div class="btn-group r-ml10">
|
||||||
{{#link-to "service.new" (query-params stackId=model.id) classNames="btn btn-primary btn-sm"}}{{t 'stackHeader.add.service'}}{{/link-to}}
|
{{#link-to "service.new" (query-params stackId=model.id) classNames="btn btn-primary btn-sm"}}{{t 'stackHeader.add.service'}}{{/link-to}}
|
||||||
|
{{#unless projects.current.isWindows}}
|
||||||
<button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
<button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||||
<i class="icon icon-chevron-down"></i>
|
<i class="icon icon-chevron-down"></i>
|
||||||
<span class="sr-only">{{t 'nav.srToggleNav'}}</span>
|
<span class="sr-only">{{t 'nav.srToggleNav'}}</span>
|
||||||
|
|
@ -34,6 +35,7 @@
|
||||||
<li>{{#link-to "service.new-virtualmachine" (query-params stackId=model.id)}}{{t 'stackHeader.add.vm'}}{{/link-to}}</li>
|
<li>{{#link-to "service.new-virtualmachine" (query-params stackId=model.id)}}{{t 'stackHeader.add.vm'}}{{/link-to}}</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{action-menu model=model classNames="r-ml10 pull-right" size="sm"}}
|
{{action-menu model=model classNames="r-ml10 pull-right" size="sm"}}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@
|
||||||
{{#if showAddService}}
|
{{#if showAddService}}
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
{{#link-to "service.new" (query-params stackId=model.id) classNames="btn btn-default btn-sm"}}{{t 'stackSection.add.service'}}{{/link-to}}
|
{{#link-to "service.new" (query-params stackId=model.id) classNames="btn btn-default btn-sm"}}{{t 'stackSection.add.service'}}{{/link-to}}
|
||||||
|
{{#unless projects.current.isWindows}}
|
||||||
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
|
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
|
||||||
<i class="icon icon-fw icon-chevron-down"></i>
|
<i class="icon icon-fw icon-chevron-down"></i>
|
||||||
<span class="sr-only">{{t 'nav.srToggleDropdown'}}</span>
|
<span class="sr-only">{{t 'nav.srToggleDropdown'}}</span>
|
||||||
|
|
@ -65,6 +66,7 @@
|
||||||
<li>{{#link-to "service.new-virtualmachine" (query-params stackId=model.id)}}{{t 'stackSection.add.virtualMachine'}}{{/link-to}}</li>
|
<li>{{#link-to "service.new-virtualmachine" (query-params stackId=model.id)}}{{t 'stackSection.add.virtualMachine'}}{{/link-to}}</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
|
{{/unless}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "ui",
|
"name": "ui",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"directories": {
|
"directories": {
|
||||||
"doc": "doc",
|
"doc": "doc",
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
"forever-agent": "^0.6.1",
|
"forever-agent": "^0.6.1",
|
||||||
"glob": "^5.0.3",
|
"glob": "^5.0.3",
|
||||||
"http-proxy": "^1.11.1",
|
"http-proxy": "^1.11.1",
|
||||||
"lacsso": "0.0.35",
|
"lacsso": "0.0.36",
|
||||||
"liquid-fire": "0.26.4",
|
"liquid-fire": "0.26.4",
|
||||||
"loader.js": "^4.0.10",
|
"loader.js": "^4.0.10",
|
||||||
"shell-quote": "^1.4.3",
|
"shell-quote": "^1.4.3",
|
||||||
|
|
|
||||||
|
|
@ -2465,8 +2465,7 @@ machine:
|
||||||
close: Close
|
close: Close
|
||||||
windows:
|
windows:
|
||||||
step1: Start up a Windows Server 2016 machine somewhere and install the latest version of <a href="https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_server" target="_blank" rel="noreferrer nofollow">Docker</a> on it.
|
step1: Start up a Windows Server 2016 machine somewhere and install the latest version of <a href="https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_server" target="_blank" rel="noreferrer nofollow">Docker</a> on it.
|
||||||
step2: "Make sure any security groups or firewalls allow traffic:"
|
step2: Copy, paste, and run the command below in PowerShell to start the {appName} agent.
|
||||||
step3: Copy, paste, and run the command below in PowerShell to start the {appName} agent.
|
|
||||||
|
|
||||||
driverDigitalocean:
|
driverDigitalocean:
|
||||||
sizeLabel: |
|
sizeLabel: |
|
||||||
|
|
@ -3283,6 +3282,10 @@ nav:
|
||||||
prefix: "Before adding your first service or launching a container, you'll need to add a Linux host that supports Docker {minVersion} or higher. "
|
prefix: "Before adding your first service or launching a container, you'll need to add a Linux host that supports Docker {minVersion} or higher. "
|
||||||
link: "Add a host"
|
link: "Add a host"
|
||||||
suffix: ""
|
suffix: ""
|
||||||
|
noHostsWindows:
|
||||||
|
prefix: "Before adding your first service or launching a container, you'll need to add a Windows host. "
|
||||||
|
link: "Add a host"
|
||||||
|
suffix: ""
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
# Resource Actions
|
# Resource Actions
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue