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>
|
||||
{{/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>{{t 'clustersPage.newProject'}}</span>
|
||||
{{/link-to}}
|
||||
|
|
@ -46,13 +46,19 @@
|
|||
pagingLabel="pagination.cluster"
|
||||
headers=headers as |sortable kind inst dt|
|
||||
}}
|
||||
{{cluster-row
|
||||
model=inst
|
||||
fullColspan=sortable.fullColspan
|
||||
toggle=(action "toggleExpand" inst.id)
|
||||
expanded=(array-includes expandedClusters inst.id)
|
||||
dt=dt
|
||||
}}
|
||||
{{#if (eq kind "row")}}
|
||||
{{cluster-row
|
||||
model=inst
|
||||
fullColspan=sortable.fullColspan
|
||||
toggle=(action "toggleExpand" inst.id)
|
||||
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}}
|
||||
{{else}}
|
||||
{{project-table model=model.projects showCluster=true}}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@
|
|||
</div>
|
||||
{{/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>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ var Project = Resource.extend(PolledResource, {
|
|||
|
||||
cluster: denormalizeId('clusterId'),
|
||||
|
||||
canAddHost: Ember.computed.notEmpty('cluster.registrationToken.hostCommand'),
|
||||
canImport: Ember.computed.notEmpty('cluster.registrationToken.clusterCommand'),
|
||||
|
||||
actions: {
|
||||
edit: function() {
|
||||
this.get('router').transitionTo('authenticated.clusters.project', this.get('id'));
|
||||
|
|
|
|||
|
|
@ -1310,9 +1310,11 @@ catalogSettings:
|
|||
placeholder: 'e.g. master'
|
||||
|
||||
clusterRow:
|
||||
noMatch: No environments match the current search
|
||||
noMatch: No environments match the current search.
|
||||
noData: This cluster doesn't have any environments yet.
|
||||
noHosts: External cluster has no hosts
|
||||
noClusterMatch: No clusters match the current search.
|
||||
noClusterData: There are no clusters yet.
|
||||
addHost: Add Hosts
|
||||
importCluster: Use existing Kubernetes
|
||||
loginDefault: Login
|
||||
|
|
|
|||
Loading…
Reference in New Issue