Skip to content

Commit

Permalink
Refactor move cleanup models into cleanup namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Jan 27, 2022
1 parent 8b91fbb commit 83cd083
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion client/src/components/User/DiskUsage/DiskUsageSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import _l from "utils/localization";
import { bytesToString } from "utils/utils";
import CurrentUser from "components/providers/CurrentUser";
import ConfigProvider from "components/providers/ConfigProvider";
import QuotaUsageSummary from "components/User/DiskUsage/QuotaUsageSummary";
import QuotaUsageSummary from "components/User/DiskUsage/Quota/QuotaUsageSummary";
export default {
components: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import _l from "utils/localization";
import { bytesToString } from "utils/utils";
import LoadingSpan from "components/LoadingSpan";
import { CleanupOperation } from "../../model";
import { CleanupOperation } from "./model";
export default {
components: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script>
import _l from "utils/localization";
import { bytesToString } from "utils/utils";
import { CleanupResult } from "../../model";
import { CleanupResult } from "./model";
export default {
props: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CleanupCategory } from "../../model";
import { cleanupCategories } from "./categories";
import { CleanupCategory } from "./model";

export class ResourceCleanupManager {
constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
import _l from "utils/localization";
import { bytesToString } from "utils/utils";
import UtcDate from "components/UtcDate";
import { CleanupOperation } from "../../model";
import { CleanupOperation } from "./model";
export default {
components: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CleanupOperation } from "../model";
import { CleanupOperation } from ".";

export class CleanupCategory {
constructor(data) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from "axios";
import { getAppRoot } from "onload/loadConfig";
import { rethrowSimple } from "utils/simple-error";
import { CleanableSummary, CleanupResult } from "../model";
import { CleanableSummary, CleanupResult } from "./Cleanup/model";

const datasetKeys = "id,name,size,update_time,hda_ldda";
const isDataset = "q=history_content_type-eq&qv=dataset";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { bytesToString } from "utils/utils";
export default {
props: {
user: {
quotaUsage: {
type: Object,
required: true,
},
Expand All @@ -36,15 +36,15 @@ export default {
computed: {
/** @returns {String} */
totalQuotaString() {
return this.user.quota;
return this.quotaUsage.quota;
},
/** @returns {String} */
usedQuotaString() {
return bytesToString(this.user.total_disk_usage, true);
return bytesToString(this.quotaUsage.total_disk_usage, true);
},
/** @returns {float} */
usedQuotaPercent() {
return this.user.quota_percent;
return this.quotaUsage.quota_percent;
},
/** @returns {String} */
progressVariant() {
Expand Down

0 comments on commit 83cd083

Please sign in to comment.