Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: Remove some javascript files we no longer use #6853

Merged
merged 2 commits into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions ui-v2/app/components/confirmation-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Component from '@ember/component';

import SlotsMixin from 'block-slots';
import { set } from '@ember/object';
import { inject as service } from '@ember/service';

const cancel = function() {
set(this, 'confirming', false);
Expand All @@ -15,25 +14,10 @@ const confirm = function() {
const [action, ...args] = arguments;
set(this, 'actionName', action);
set(this, 'arguments', args);
if (this._isRegistered('dialog')) {
set(this, 'confirming', true);
} else {
this._confirm
.execute(this.message)
.then(confirmed => {
if (confirmed) {
this.execute();
}
})
.catch(function() {
return this.error.execute(...arguments);
});
}
set(this, 'confirming', true);
};
export default Component.extend(SlotsMixin, {
classNameBindings: ['confirming'],
_confirm: service('confirm'),
error: service('error'),
classNames: ['with-confirmation'],
message: 'Are you sure?',
confirming: false,
Expand Down
1 change: 1 addition & 0 deletions ui-v2/app/models/intention.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const model = Model.extend({
CreateIndex: attr('number'),
ModifyIndex: attr('number'),
});
// TODO: Remove this in favour of just specifying it in the Adapter
export const ATTRS = writable(model, [
'Action',
'SourceName',
Expand Down
1 change: 1 addition & 0 deletions ui-v2/app/models/policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ const model = Model.extend({
defaultValue: '',
}),
});
// TODO: Remove this in favour of just specifying it in the Adapter
export const ATTRS = writable(model, ['Name', 'Description', 'Rules', 'Datacenters']);
export default model;
1 change: 1 addition & 0 deletions ui-v2/app/models/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const model = Model.extend({
CreateIndex: attr('number'),
ModifyIndex: attr('number'),
});
// TODO: Remove this in favour of just specifying it in the Adapter
// Name and Rules is only for legacy tokens
export const ATTRS = writable(model, [
'Name',
Expand Down
8 changes: 0 additions & 8 deletions ui-v2/app/services/confirm.js

This file was deleted.

8 changes: 0 additions & 8 deletions ui-v2/app/services/error.js

This file was deleted.

4 changes: 0 additions & 4 deletions ui-v2/app/utils/confirm.js

This file was deleted.

5 changes: 0 additions & 5 deletions ui-v2/app/utils/error.js

This file was deleted.

33 changes: 0 additions & 33 deletions ui-v2/app/utils/injectableRequestToJQueryAjaxHash.js

This file was deleted.

9 changes: 0 additions & 9 deletions ui-v2/app/utils/makeAttrable.js

This file was deleted.

12 changes: 0 additions & 12 deletions ui-v2/tests/unit/services/confirm-test.js

This file was deleted.

12 changes: 0 additions & 12 deletions ui-v2/tests/unit/services/error-test.js

This file was deleted.

17 changes: 0 additions & 17 deletions ui-v2/tests/unit/utils/confirm-test.js

This file was deleted.

14 changes: 0 additions & 14 deletions ui-v2/tests/unit/utils/makeAttrable-test.js

This file was deleted.