-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ICU-15718] Add worker filter route, template for empty state (#2576)
* feat: 🎸 Vault Credential Store Worker Filter The Worker Filters tab will display the associated worker filter and have an empty state for when there is no worker filter assigned. * add template * Add missing copyright headers * update styling, remove Rose component * color primary is already default, remove * add rose component, remove custom css * fix test * singularize lang --------- Co-authored-by: laurenolivia <laurenolivia@users.noreply.github.com>
- Loading branch information
1 parent
b027109
commit f873412
Showing
8 changed files
with
123 additions
and
0 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
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
10 changes: 10 additions & 0 deletions
10
ui/admin/app/controllers/scopes/scope/credential-stores/credential-store/worker-filter.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,10 @@ | ||
/** | ||
* Copyright (c) HashiCorp, Inc. | ||
* SPDX-License-Identifier: BUSL-1.1 | ||
*/ | ||
|
||
import Controller, { inject as controller } from '@ember/controller'; | ||
|
||
export default class ScopesScopeCredentialStoresCredentialStoreWorkerFilterController extends Controller { | ||
@controller('scopes/scope/credential-stores/index') credentialStores; | ||
} |
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
8 changes: 8 additions & 0 deletions
8
ui/admin/app/routes/scopes/scope/credential-stores/credential-store/worker-filter.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,8 @@ | ||
/** | ||
* Copyright (c) HashiCorp, Inc. | ||
* SPDX-License-Identifier: BUSL-1.1 | ||
*/ | ||
|
||
import Route from '@ember/routing/route'; | ||
|
||
export default class ScopesScopeCredentialStoresCredentialStoreWorkerFilterRoute extends Route {} |
49 changes: 49 additions & 0 deletions
49
ui/admin/app/templates/scopes/scope/credential-stores/credential-store/worker-filter.hbs
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,49 @@ | ||
{{! | ||
Copyright (c) HashiCorp, Inc. | ||
SPDX-License-Identifier: BUSL-1.1 | ||
}} | ||
|
||
{{page-title (t 'resources.credential-store.titles.worker-filter')}} | ||
|
||
<Rose::Layout::Page as |page|> | ||
<page.breadcrumbs> | ||
<Breadcrumbs::Container /> | ||
</page.breadcrumbs> | ||
|
||
<page.header> | ||
<CredentialStores::CredentialStore::Header @model={{@model}} /> | ||
</page.header> | ||
|
||
<page.navigation> | ||
<CredentialStores::CredentialStore::Nav @model={{@model}} /> | ||
</page.navigation> | ||
|
||
<page.actions> | ||
<CredentialStores::CredentialStore::Actions | ||
@model={{@model}} | ||
@delete={{fn this.credentialStores.delete @model}} | ||
/> | ||
</page.actions> | ||
|
||
<page.body> | ||
<Rose::Layout::Centered> | ||
<Hds::ApplicationState as |A|> | ||
<A.Header | ||
@title={{t 'resources.credential-store.messages.no-filter.title'}} | ||
/> | ||
<A.Body | ||
@text={{t | ||
'resources.credential-store.messages.no-filter.description' | ||
}} | ||
/> | ||
<A.Footer as |F|> | ||
<F.LinkStandalone | ||
@icon='plus-circle' | ||
@text={{t 'resources.credential-store.actions.add'}} | ||
@route='scopes.scope.credential-stores.credential-store.index' | ||
/> | ||
</A.Footer> | ||
</Hds::ApplicationState> | ||
</Rose::Layout::Centered> | ||
</page.body> | ||
</Rose::Layout::Page> |
22 changes: 22 additions & 0 deletions
22
...ts/unit/controllers/scopes/scope/credential-stores/credential-store/worker-filter-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,22 @@ | ||
/** | ||
* Copyright (c) HashiCorp, Inc. | ||
* SPDX-License-Identifier: BUSL-1.1 | ||
*/ | ||
|
||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
|
||
module( | ||
'Unit | Controller | scopes/scope/credential-stores/credential-store/worker-filter', | ||
function (hooks) { | ||
setupTest(hooks); | ||
|
||
test('it exists', function (assert) { | ||
let controller = this.owner.lookup( | ||
'controller:scopes/scope/credential-stores/credential-store/worker-filter', | ||
); | ||
assert.ok(controller); | ||
assert.ok(controller.credentialStores); | ||
}); | ||
}, | ||
); |
21 changes: 21 additions & 0 deletions
21
...n/tests/unit/routes/scopes/scope/credential-stores/credential-store/worker-filter-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,21 @@ | ||
/** | ||
* Copyright (c) HashiCorp, Inc. | ||
* SPDX-License-Identifier: BUSL-1.1 | ||
*/ | ||
|
||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'admin/tests/helpers'; | ||
|
||
module( | ||
'Unit | Route | scopes/scope/credential-stores/credential-store/worker-filter', | ||
function (hooks) { | ||
setupTest(hooks); | ||
|
||
test('it exists', function (assert) { | ||
let route = this.owner.lookup( | ||
'route:scopes/scope/credential-stores/credential-store/worker-filter', | ||
); | ||
assert.ok(route); | ||
}); | ||
}, | ||
); |