Skip to content

Commit

Permalink
ui: Remove some javascript files we no longer use (#6853)
Browse files Browse the repository at this point in the history
  • Loading branch information
johncowen authored and John Cowen committed Dec 18, 2019
1 parent 8017b5a commit 7f2a1e8
Show file tree
Hide file tree
Showing 14 changed files with 4 additions and 139 deletions.
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.

0 comments on commit 7f2a1e8

Please sign in to comment.