chore: 🤖 create storage bucket route (#95)

* chore: 🤖 create storage bucket route

Create `storage-bucket` route and update `yaml` files

✅ Closes: ICU-8132

* refactor: 💡 removed future translations

Removed translations tha will be coming for new storage-bucket form.

✅ Closes: ICU-8217
This commit is contained in:
Devon Anderson authored and GitHub committed 2023-03-03 12:43:47 -05:00
1 parent 75f0192540
commit c30bc3a554
17 files changed
+164 -1

No files matched your search

@@ -220,6 +220,8 @@ session-recording:
storage-bucket:
title: Storage Bucket
title_plural: Storage Buckets
titles:
new: New Storage Bucket
project:
title: Project
title_plural: Projects
+8 -1
View File
@@ -148,7 +148,14 @@ Router.map(function () {
}
);
});
this.route('storage-buckets', function () {});
this.route('storage-buckets', function () {
this.route('new');
this.route(
'storage-bucket',
{ path: ':storage_bucket_id' },
function () {}
);
});
});
});
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Route from '@ember/routing/route';
export default class ScopesScopeStorageBucketsRoute extends Route {}
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Route from '@ember/routing/route';
export default class ScopesScopeStorageBucketsIndexRoute extends Route {}
@@ -0,0 +1,26 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default class ScopesScopeStorageBucketsNewRoute extends Route {
// =services
@service store;
// =methods
/**
* Creates a new unsaved storage bucket.
* @return {StorageBucket}
*/
model() {
const scopeModel = this.modelFor('scopes.scope');
const record = this.store.createRecord('storage-bucket');
record.scopeModel = scopeModel;
return record;
}
}
@@ -0,0 +1,14 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Route from '@ember/routing/route';
export default class ScopesScopeStorageBucketsStorageBucketRoute extends Route {
model() {
return {
scope_id: 'sb_1234567890',
};
}
}
@@ -0,0 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Route from '@ember/routing/route';
export default class ScopesScopeStorageBucketsStorageBucketIndexRoute extends Route {}
@@ -1,3 +1,8 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
{{page-title (t 'resources.storage-bucket.title_plural')}}
{{outlet}}
@@ -0,0 +1,4 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
@@ -0,0 +1,6 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
{{page-title (t 'titles.new')}}
@@ -0,0 +1,9 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
{{page-title @model.displayName}}
<p>{{@model.scope_id}}</p>
{{outlet}}
@@ -0,0 +1,4 @@
{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { module, test } from 'qunit';
import { setupTest } from 'admin/tests/helpers';
@@ -1,3 +1,8 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { module, test } from 'qunit';
import { setupTest } from 'admin/tests/helpers';
@@ -0,0 +1,16 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { module, test } from 'qunit';
import { setupTest } from 'admin/tests/helpers';
module('Unit | Route | scopes/scope/storage-buckets/new', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let route = this.owner.lookup('route:scopes/scope/storage-buckets/new');
assert.ok(route);
});
});
@@ -0,0 +1,21 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { module, test } from 'qunit';
import { setupTest } from 'admin/tests/helpers';
module(
'Unit | Route | scopes/scope/storage-buckets/storage-bucket',
function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let route = this.owner.lookup(
'route:scopes/scope/storage-buckets/storage-bucket'
);
assert.ok(route);
});
}
);
@@ -0,0 +1,21 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { module, test } from 'qunit';
import { setupTest } from 'admin/tests/helpers';
module(
'Unit | Route | scopes/scope/storage-buckets/storage-bucket/index',
function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let route = this.owner.lookup(
'route:scopes/scope/storage-buckets/storage-bucket/index'
);
assert.ok(route);
});
}
);