mirror of https://github.com/rancher/ui.git
Hide add host for imported cluster
This commit is contained in:
parent
a818089570
commit
a322caa675
|
|
@ -16,7 +16,7 @@
|
||||||
<span>{{t 'clustersPage.newCluster'}}</span>
|
<span>{{t 'clustersPage.newCluster'}}</span>
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
|
|
||||||
{{#link-to "authenticated.clusters.new-project" class="btn bg-primary btn-sm icon-btn"}}
|
{{#link-to "authenticated.clusters.new-project" class="btn bg-primary btn-sm icon-btn" disabled=(eq model.clusters.length 0)}}
|
||||||
<span class="darken"><i class="icon icon-folder"></i></span>
|
<span class="darken"><i class="icon icon-folder"></i></span>
|
||||||
<span>{{t 'clustersPage.newProject'}}</span>
|
<span>{{t 'clustersPage.newProject'}}</span>
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
|
|
@ -46,13 +46,19 @@
|
||||||
pagingLabel="pagination.cluster"
|
pagingLabel="pagination.cluster"
|
||||||
headers=headers as |sortable kind inst dt|
|
headers=headers as |sortable kind inst dt|
|
||||||
}}
|
}}
|
||||||
{{cluster-row
|
{{#if (eq kind "row")}}
|
||||||
model=inst
|
{{cluster-row
|
||||||
fullColspan=sortable.fullColspan
|
model=inst
|
||||||
toggle=(action "toggleExpand" inst.id)
|
fullColspan=sortable.fullColspan
|
||||||
expanded=(array-includes expandedClusters inst.id)
|
toggle=(action "toggleExpand" inst.id)
|
||||||
dt=dt
|
expanded=(array-includes expandedClusters inst.id)
|
||||||
}}
|
dt=dt
|
||||||
|
}}
|
||||||
|
{{else if (eq kind "nomatch")}}
|
||||||
|
<tr><td colspan="{{sortable.fullColspan}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'clusterRow.noClusterMatch'}}</td></tr>
|
||||||
|
{{else if (eq kind "norows")}}
|
||||||
|
<tr><td colspan="{{sortable.fullColspan}}" class="text-center text-muted lacsso pt-20 pb-20">{{t 'clusterRow.noClusterData'}}</td></tr>
|
||||||
|
{{/if}}
|
||||||
{{/sortable-table}}
|
{{/sortable-table}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{project-table model=model.projects showCluster=true}}
|
{{project-table model=model.projects showCluster=true}}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,9 @@
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#link-to "authenticated.clusters.cluster.host-templates.index" projects.currentCluster.id classNames="btn btn-sm bg-primary"}}{{t 'hostsPage.index.addHost'}}{{/link-to}}
|
{{#if projects.current.canAddHost}}
|
||||||
|
{{#link-to "authenticated.clusters.cluster.host-templates.index" projects.currentCluster.id classNames="btn btn-sm bg-primary"}}{{t 'hostsPage.index.addHost'}}{{/link-to}}
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,9 @@ var Project = Resource.extend(PolledResource, {
|
||||||
|
|
||||||
cluster: denormalizeId('clusterId'),
|
cluster: denormalizeId('clusterId'),
|
||||||
|
|
||||||
|
canAddHost: Ember.computed.notEmpty('cluster.registrationToken.hostCommand'),
|
||||||
|
canImport: Ember.computed.notEmpty('cluster.registrationToken.clusterCommand'),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
edit: function() {
|
edit: function() {
|
||||||
this.get('router').transitionTo('authenticated.clusters.project', this.get('id'));
|
this.get('router').transitionTo('authenticated.clusters.project', this.get('id'));
|
||||||
|
|
|
||||||
|
|
@ -1310,9 +1310,11 @@ catalogSettings:
|
||||||
placeholder: 'e.g. master'
|
placeholder: 'e.g. master'
|
||||||
|
|
||||||
clusterRow:
|
clusterRow:
|
||||||
noMatch: No environments match the current search
|
noMatch: No environments match the current search.
|
||||||
noData: This cluster doesn't have any environments yet.
|
noData: This cluster doesn't have any environments yet.
|
||||||
noHosts: External cluster has no hosts
|
noHosts: External cluster has no hosts
|
||||||
|
noClusterMatch: No clusters match the current search.
|
||||||
|
noClusterData: There are no clusters yet.
|
||||||
addHost: Add Hosts
|
addHost: Add Hosts
|
||||||
importCluster: Use existing Kubernetes
|
importCluster: Use existing Kubernetes
|
||||||
loginDefault: Login
|
loginDefault: Login
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue