-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: Redesign - Create ConsulExternalSource (#7632)
* Create ConsulExternalSource with test and styling * Implement ConsulExternalSource to Service list page * Update icons for redesign * Refactor ListCollection and CompositeRow styling
- Loading branch information
Showing
16 changed files
with
110 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{#let (if _externalSource _externalSource (service/external-source item)) as |externalSource|}} | ||
{{#if externalSource}} | ||
{{#if (has-block)}} | ||
{{yield | ||
(component 'consul-external-source' item=item _externalSource=externalSource) | ||
}} | ||
{{else}} | ||
<span data-test-external-source={{externalSource}} class="consul-external-source source-{{externalSource}}"> | ||
{{#if (eq externalSource 'aws')}} | ||
<span>Synced from {{uppercase externalSource}}</span> | ||
{{else}} | ||
<span>Synced from {{capitalize externalSource}}</span> | ||
{{/if}} | ||
</span> | ||
{{/if}} | ||
{{/if}} | ||
{{/let}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Component from '@ember/component'; | ||
|
||
export default Component.extend({ | ||
tagName: '', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.consul-external-source { | ||
background-color: $gray-100; | ||
padding: 0 8px; | ||
height: 16px; | ||
line-height: 12px; | ||
margin-top: 3px; | ||
border-radius: $decor-radius-100; | ||
} | ||
.consul-external-source > span { | ||
position: relative; | ||
top: -1px; | ||
} | ||
.consul-external-source::before { | ||
font-size: 0.7em; | ||
margin-right: 2px; | ||
position: relative; | ||
top: 2px; | ||
} | ||
.source-kubernetes::before { | ||
@extend %with-kubernetes-logo-color-icon, %as-pseudo; | ||
} | ||
.source-terraform::before { | ||
@extend %with-terraform-logo-color-icon, %as-pseudo; | ||
} | ||
.source-nomad::before { | ||
@extend %with-nomad-logo-color-icon, %as-pseudo; | ||
} | ||
.source-consul::before { | ||
@extend %with-consul-logo-color-icon, %as-pseudo; | ||
} | ||
.source-aws::before { | ||
@extend %with-logo-aws-color-icon, %as-pseudo; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
height: 500px; | ||
position: relative; | ||
} | ||
.list-collection > ul { | ||
overflow-x: hidden !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
ui-v2/tests/integration/components/consul-external-source-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { module, skip } from 'qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import { render } from '@ember/test-helpers'; | ||
import { hbs } from 'ember-cli-htmlbars'; | ||
|
||
module('Integration | Component | consul-external-source', function(hooks) { | ||
setupRenderingTest(hooks); | ||
|
||
skip('it renders', async function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.set('myAction', function(val) { ... }); | ||
|
||
await render(hbs`<ConsulExternalSource />`); | ||
|
||
assert.equal(this.element.textContent.trim(), ''); | ||
|
||
// Template block usage: | ||
await render(hbs` | ||
<ConsulExternalSource> | ||
template block text | ||
</ConsulExternalSource> | ||
`); | ||
|
||
assert.equal(this.element.textContent.trim(), 'template block text'); | ||
}); | ||
}); |