From b61b6f40a52106247838f18152c096fe500c9dbf Mon Sep 17 00:00:00 2001 From: lvuch Date: Wed, 22 Aug 2018 13:33:42 -0700 Subject: [PATCH] cleanup dropdown, input group on form val --- .../cluster/quotas/index/template.hbs | 2 +- .../storage/classes/index/template.hbs | 2 +- app/components/modal-edit-host/template.hbs | 4 +- .../page-header-environment/template.hbs | 24 ++++----- app/components/page-header/template.hbs | 26 +++++++--- app/styles/components/_alerts.scss | 1 - app/styles/components/_button.scss | 2 + app/styles/components/_dropdown.scss | 8 ++- app/styles/components/over-hr.scss | 2 + app/styles/pages/_host.scss | 10 ++-- .../components/form-value-array/template.hbs | 50 ++++++++++--------- .../components/sortable-table/template.hbs | 38 ++++++++------ translations/en-us.yaml | 4 +- yarn.lock | 11 ++++ 14 files changed, 114 insertions(+), 70 deletions(-) diff --git a/app/authenticated/cluster/quotas/index/template.hbs b/app/authenticated/cluster/quotas/index/template.hbs index b03ba44cc..2b0ae5fd7 100644 --- a/app/authenticated/cluster/quotas/index/template.hbs +++ b/app/authenticated/cluster/quotas/index/template.hbs @@ -30,7 +30,7 @@ {{/if}} - {{#if obj.isDefault}}{{/if}} + {{#if obj.isDefault}}{{/if}} {{date-calendar obj.created}} diff --git a/app/authenticated/cluster/storage/classes/index/template.hbs b/app/authenticated/cluster/storage/classes/index/template.hbs index 8ecdef71d..862b2f96e 100644 --- a/app/authenticated/cluster/storage/classes/index/template.hbs +++ b/app/authenticated/cluster/storage/classes/index/template.hbs @@ -34,7 +34,7 @@ {{obj.displayProvisioner}} - {{#if obj.isDefault}}{{/if}} + {{#if obj.isDefault}}{{/if}} {{action-menu model=obj}} diff --git a/app/components/modal-edit-host/template.hbs b/app/components/modal-edit-host/template.hbs index f24302e19..fd3c76bc2 100644 --- a/app/components/modal-edit-host/template.hbs +++ b/app/components/modal-edit-host/template.hbs @@ -2,7 +2,7 @@

{{t 'editHost.title'}}

-
+
@@ -42,4 +42,4 @@
{{top-errors errors=errors}} -{{save-cancel editing=editing save="save" cancel="cancel"}} +{{save-cancel editing=editing save="save" cancel="cancel"}} \ No newline at end of file diff --git a/app/components/page-header-environment/template.hbs b/app/components/page-header-environment/template.hbs index 05731e0b0..4b1f4c230 100644 --- a/app/components/page-header-environment/template.hbs +++ b/app/components/page-header-environment/template.hbs @@ -10,36 +10,37 @@ {{#if (eq pageScope "project")}}
+ {{project.cluster.displayName}} - {{project.cluster.displayName}}
+ {{project.displayName}} - {{project.displayName}}
{{else if (eq pageScope "cluster")}}
+ {{cluster.displayName}} - {{cluster.displayName}}
{{else if (eq pageScope "clusters")}}
- {{t 'nav.environment.manage'}} + {{t 'nav.environment.manage'}}
{{else if (eq pageScope "global")}}
+ {{t 'nav.admin.tab'}} - {{t 'nav.admin.tab'}}
{{else}}
+ {{pageScope}} - {{pageScope}}
{{/if}} - {{t 'nav.srToggleDropdown'}} + +
{{/dd.trigger}} @@ -50,8 +51,8 @@
  • - - {{t 'nav.admin.tab'}} + {{t 'nav.admin.tab'}} +
  • @@ -64,8 +65,8 @@
  • {{#link-to 'authenticated.cluster' entry.cluster.id}} + {{t 'generic.cluster'}}: {{entry.cluster.displayName}} - {{t 'generic.cluster'}}: {{entry.cluster.displayName}} {{/link-to}}
  • @@ -75,9 +76,8 @@
  • {{#link-to 'authenticated.project' p.id class="clip project-link"}} + {{p.displayName}} - - {{p.displayName}} {{/link-to}}
  • diff --git a/app/components/page-header/template.hbs b/app/components/page-header/template.hbs index dd90ea8a8..8a516b9ea 100644 --- a/app/components/page-header/template.hbs +++ b/app/components/page-header/template.hbs @@ -50,7 +50,8 @@ qp=subitem.qp activeParent="LI" }} - {{maybe-t subitem.localizedLabel subitem.label}} + {{maybe-t subitem.localizedLabel subitem.label}} + {{/link-to-as-attrs}} {{/if}} @@ -59,7 +60,8 @@ {{else}} {{! Just a label }} {{/if}} {{/each}} @@ -131,12 +133,24 @@ {{/if}} -
  • {{#link-to "authenticated.apikeys"}}{{t 'nav.api.link'}} {{/link-to}}
  • -
  • {{#link-to "nodes.node-templates"}}{{t 'nav.nodeTemplates.link'}} {{/link-to}}
  • +
  • {{#link-to "authenticated.apikeys"}} + {{t 'nav.api.link'}} + {{/link-to}} +
  • +
  • {{#link-to "nodes.node-templates"}} + {{t 'nav.nodeTemplates.link'}} + {{/link-to}} +
  • -
  • {{#link-to "authenticated.prefs"}}{{t 'nav.userPreferences.link'}} {{/link-to}}
  • +
  • {{#link-to "authenticated.prefs"}} + {{t 'nav.userPreferences.link'}} + {{/link-to}} +
  • -
  • {{#link-to "logout" class="user-logout"}}{{t 'nav.user.logout'}} {{/link-to}}
  • +
  • {{#link-to "logout" class="user-logout"}} + {{t 'nav.user.logout'}} + {{/link-to}} +
  • {{/dd.content}} {{!-- --}} {{/hover-dropdown}} diff --git a/app/styles/components/_alerts.scss b/app/styles/components/_alerts.scss index d207fc2eb..9ec047cf2 100644 --- a/app/styles/components/_alerts.scss +++ b/app/styles/components/_alerts.scss @@ -1,5 +1,4 @@ .alert { - border: solid 2px $border; padding: 40px; .alert-header { diff --git a/app/styles/components/_button.scss b/app/styles/components/_button.scss index d38e4cb39..6149bffb9 100755 --- a/app/styles/components/_button.scss +++ b/app/styles/components/_button.scss @@ -169,6 +169,8 @@ fieldset[disabled] .btn { display: inline-block; vertical-align: middle; text-align: center; + padding: 0; + .btn:first-child { border-radius: 2px 0 0 2px; diff --git a/app/styles/components/_dropdown.scss b/app/styles/components/_dropdown.scss index 12f858ffa..562125e0d 100644 --- a/app/styles/components/_dropdown.scss +++ b/app/styles/components/_dropdown.scss @@ -64,7 +64,9 @@ $ember-basic-dropdown-content-z-index: 1500; // Links within the dropdown menu > li > a { - display: block; + display: flex; + align-items: center; + justify-content: space-between; padding: 6px 12px; clear: both; font-weight: normal; @@ -73,6 +75,10 @@ $ember-basic-dropdown-content-z-index: 1500; cursor: pointer; @extend .clip; + .icon { + font-size: 12px; + } + // Hover/Focus state &:hover, &:focus { diff --git a/app/styles/components/over-hr.scss b/app/styles/components/over-hr.scss index 4bd65d218..d78497745 100644 --- a/app/styles/components/over-hr.scss +++ b/app/styles/components/over-hr.scss @@ -3,6 +3,8 @@ text-align : center; overflow : hidden; white-space : nowrap; + @extend .pt-10; + @extend .pb-10; & > span { position : relative; diff --git a/app/styles/pages/_host.scss b/app/styles/pages/_host.scss index 9f8a315fb..3e462876b 100644 --- a/app/styles/pages/_host.scss +++ b/app/styles/pages/_host.scss @@ -179,11 +179,11 @@ ol > li::before { content: counter(li); counter-increment: li; position: absolute; - top: calc(50% - 20px); - left: -20px; - width: 40px; - height: 40px; - line-height: 40px; + // top: calc(50% - 20px); + left: -14.5px; + width: 25px; + height: 25px; + line-height: 26px; margin-right: 8px; border-radius: 50%; text-align: center; diff --git a/lib/shared/addon/components/form-value-array/template.hbs b/lib/shared/addon/components/form-value-array/template.hbs index 3bedba70a..2e6b0159d 100644 --- a/lib/shared/addon/components/form-value-array/template.hbs +++ b/lib/shared/addon/components/form-value-array/template.hbs @@ -1,30 +1,34 @@ + {{#if ary.length}} - - {{#each ary as |row|}} - - - {{#if editing}} - - {{/if}} - - {{/each}} -
    - {{#if hasBlock}} - {{yield this row}} - {{else if editing}} - {{input-paste pasted="pastedValues" class="form-control input-sm value" type="text" value=row.value placeholder=valuePlaceholder}} - {{else}} - {{row.value}} - {{/if}} - - -
    + + +{{#each ary as |row|}} +
    + + {{#if hasBlock}} + {{yield this row}} + {{else if editing}} + {{input-paste pasted="pastedValues" class="form-control input-sm value" type="text" value=row.value placeholder=valuePlaceholder}} + {{else}} + {{row.value}} + {{/if}} + + {{#if editing}} + + + + {{/if}} +
    +{{/each}} + + {{else if (not editing)}} - {{t noDataLabel}} +

    {{t noDataLabel}}

    {{/if}} {{#if editing}} - + + {{#if ary.length}} {{#if showProTip}} @@ -33,4 +37,4 @@ {{/if}} {{/if}} -{{/if}} +{{/if}} \ No newline at end of file diff --git a/lib/shared/addon/components/sortable-table/template.hbs b/lib/shared/addon/components/sortable-table/template.hbs index 6c3df218e..165a74e99 100644 --- a/lib/shared/addon/components/sortable-table/template.hbs +++ b/lib/shared/addon/components/sortable-table/template.hbs @@ -33,23 +33,29 @@ {{/if}} {{/if}} - {{#if rightActions}} -
    - {{yield this 'right-actions'}} -
    - {{/if}} - {{#if search}} - {{#ember-wormhole to=searchToWormhole renderInPlace=(not searchToWormhole)}} -
    - {{input value=searchText aria-title=(t 'generic.search') type="search" class="input-sm pull-right" placeholder=(t 'generic.search')}} - {{#if searchText}} - - - - {{/if}} + +
    + {{#if search}} +
    + {{#ember-wormhole to=searchToWormhole renderInPlace=(not searchToWormhole)}} +
    + {{input value=searchText aria-title=(t 'generic.search') type="search" class="input-sm pull-right" placeholder=(t 'generic.search')}} + {{#if searchText}} + + + + {{/if}} +
    + {{/ember-wormhole}}
    - {{/ember-wormhole}} - {{/if}} + {{/if}} + + {{#if rightActions}} +
    + {{yield this 'right-actions'}} +
    + {{/if}} +
    {{/if}} diff --git a/translations/en-us.yaml b/translations/en-us.yaml index 102138453..40faade0d 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -1791,8 +1791,8 @@ catalogSettings: help-name: Unique name help-repo: 'Repository URL :' help-branch: "Optional : If using a GIT based catalog, a branch name is also required" - help-git: "GIT based catalog URL, e.g. https://github.com/{appName}/charts.git" - help-chart: 'Helm Charts server URL, e.g. https://kubernetes-charts.storage.googleapis.com/ (see Hosting Chart Repositories for specifics)' + help-git: "GIT based catalog URL, e.g. https://github.com/{appName}/charts.git" + help-chart: 'Helm Charts server URL, e.g. https://kubernetes-charts.storage.googleapis.com/ (see Hosting Chart Repositories for specifics)' addActionLabel: Add Catalog noMatch: No catalogs match the current search. noData: There are no custom catalogs defined. diff --git a/yarn.lock b/yarn.lock index b70a615ae..ba946a2b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2090,6 +2090,10 @@ commander@2.9.0: dependencies: graceful-readlink ">= 1.0.0" +commander@^2.10.0: + version "2.17.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" + commander@^2.5.0, commander@^2.6.0, commander@^2.9.0: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" @@ -2578,6 +2582,13 @@ domain-browser@~1.1.0: version "1.1.7" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" +dot-object@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/dot-object/-/dot-object-1.7.0.tgz#3b8ecda78b0f2aa52b8871c180fe1b3e09926a41" + dependencies: + commander "^2.10.0" + glob "^7.1.2" + dot-prop@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57"