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

AIRAVATA 3699 - migration build @vue/compat #188

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
998eebf
Updated slot syntax on Common App Vue files
Dec 29, 2023
cb3bbf0
Updated vue-loader, added vue 3.2 and vue/compat
Dec 29, 2023
712e2f5
Updated 'new Vue' to 'createApp' and import 'h' from vue
Dec 29, 2023
399d4be
moved :key into template tag
Dec 29, 2023
61ed972
updated eslint and eslint-plugin-vue, changed eslint plugin setting t…
Dec 29, 2023
45559b6
used javascrip to define root instead of 'this.'
Dec 29, 2023
87d2623
Updated fortawesome/fontawesome-free
Jan 2, 2024
cf44f63
remove 'props' keyword from h() argument
Jan 2, 2024
79501bd
moved 'div class=btn-group ml-3' from Gateway to Base.html.
Jan 2, 2024
5869e20
Removed mounted hook logging
Jan 2, 2024
240c22a
Upgrad Vue to 3.2 and added @vue/compat migration build
Jan 2, 2024
944f982
Fixed deprecated slot syntax
Jan 2, 2024
e14cb70
Removed deprecated '.native' modifier
Jan 3, 2024
3162e18
Moved ':key' for v-for into template tag
Jan 3, 2024
977ad36
Wrapped div with template tag and v-slot property
Jan 3, 2024
4182c21
Placed ':key' on to <template v-for> tag
Jan 3, 2024
246e58c
Updated Vue 2 api 'Vue' to Vue 3 api 'createApp'
Jan 3, 2024
341b6b3
Added Mitt dependency
Jan 3, 2024
6f19ef1
Updated auth app to vue 3 @vue/compat
Jan 5, 2024
a8066c3
Updated bootstrap vue to version 2.23 compatible with @vue/compat
Jan 5, 2024
bff7ed5
Upgraded dataparsers, groups, workspace to vue 3 and @vue/compat
Jan 5, 2024
21dcbbb
Fixed compile-time errors
Jan 5, 2024
cfb7613
Fixed dprecated vue 2 syntax
Jan 5, 2024
a1830ee
Added vue alias and vue-loader option to webpack
Jan 8, 2024
6c0e756
Upgraded Vue Loader
Jan 8, 2024
5aeb9b6
Upgraded entry points to new API version 'createApp'
Jan 8, 2024
43298f1
Removed redundant Vue instance creation (globalApp is already a Vue i…
Jan 8, 2024
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
12 changes: 7 additions & 5 deletions django_airavata/apps/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@
"lint:visualstudio": "vue-cli-service lint --format visualstudio ./static/django_airavata_admin/src/"
},
"dependencies": {
"@vue/compat": "^3.2.0",
"bootstrap": "^4.3.1",
"bootstrap-vue": "^2.21.2",
"bootstrap-vue": "^2.23.1",
"browserslist": "^4.16.7",
"core-js": "^3.8.3",
"django-airavata-api": "link:../api",
"django-airavata-common-ui": "link:../../static/common/",
"luxon": "^1.16.0",
"mitt": "^3.0.1",
"moment": "^2.22.2",
"terser": "^4.1.2",
"vue": "^2.5.22",
"vue": "^3.2.0",
"vue-datetime": "^1.0.0-beta.10",
"vue-flatpickr-component": "^8.1.2",
"vue-resource": "^1.3.4",
Expand All @@ -42,6 +44,7 @@
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-plugin-unit-jest": "~5.0.0",
"@vue/cli-service": "~5.0.8",
"@vue/compiler-sfc": "^3.4.0",
"@vue/component-compiler-utils": "^2.3.0",
"@vue/test-utils": "^1.1.3",
"@vue/vue2-jest": "^27.0.0-alpha.2",
Expand All @@ -52,8 +55,7 @@
"jest": "^27.0.5",
"prettier": "^2.1.2",
"vue-loader": "^15.5.1",
"vue-template-compiler": "^2.5.22",
"webpack": "^4.28.4",
"webpack": "^5",
"webpack-bundle-tracker": "^0.4.2",
"webpack-dev-middleware": "^3.5.0"
},
Expand All @@ -63,7 +65,7 @@
"node": true
},
"extends": [
"plugin:vue/essential",
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"rules": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
v-model="selectedComputeResource"
:options="computeResourceOptions"
>
<template slot="first">
<template v-slot:first>
<option :value="null">Please select compute resource</option>
</template>
</b-form-select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default {
},
},
created() {
this.$on("input", this.validate);
this.emitter.on("input", this.validate);
this.validate();
},
data: function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
"
>
<template
slot="null-option-label"
slot-scope="nullOptionLabelScope"
v-slot:null-option-label="nullOptionLabelScope"
>
<span v-if="nullOptionLabelScope.defaultCredentialSummary">
Use the default SSH credential for
Expand Down Expand Up @@ -147,14 +146,14 @@
</div>
</div>
<div class="fixed-footer">
<b-button
variant="primary"
@click="save"
<b-button
variant="primary"
@click="save"
:disabled="!valid || !userHasWriteAccess"
>Save</b-button
>
<delete-button
class="ml-2"
<delete-button
class="ml-2"
:disabled="!userHasWriteAccess"
@delete="remove">
Are you sure you want to remove the preferences for compute resource
Expand Down Expand Up @@ -243,8 +242,8 @@ export default {
if (!this.id){
this.userHasWriteAccess=true;
}
this.$on("input", this.validate);
this.emitter.on("input", this.validate);

},
data: function () {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default {
};
},
created() {
this.$on("input", this.valuesChanged);
this.emitter.on("input", this.valuesChanged);
},
computed: {
startTimeAsString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
new-item-button-text="New Reservation"
:newButtonDisabled="readonly"
>
<template slot="additional-buttons">
<template v-slot:additional-buttons>
<delete-button
class="mr-2"
@delete="deleteAllExpiredReservations"
Expand All @@ -16,7 +16,7 @@
Are you sure you want to delete all expired reservations?
</delete-button>
</template>
<template slot="new-item-editor">
<template v-slot:new-item-editor>
<b-card v-if="showNewItemEditor" title="New Reservation">
<compute-resource-reservation-editor
v-model="newReservation"
Expand Down Expand Up @@ -46,20 +46,20 @@
</div>
</b-card>
</template>
<template slot="item-list" slot-scope="slotProps">
<template v-slot:item-list="slotProps">
<b-table hover :fields="fields" :items="slotProps.items">
<template slot="cell(reservationName)" slot-scope="data">
<template v-slot:cell(reservationName)="data">
{{ data.value }}
<b-badge v-if="data.item.isExpired">Expired</b-badge>
<b-badge v-if="data.item.isActive" variant="success">Active</b-badge>
<b-badge v-if="data.item.isUpcoming" variant="info">Upcoming</b-badge>
</template>
<template slot="cell(queueNames)" slot-scope="data">
<template v-slot:cell(queueNames)="data">
<ul v-for="queueName in data.item.queueNames" :key="queueName">
<li>{{ queueName }}</li>
</ul>
</template>
<template slot="cell(action)" slot-scope="data">
<template v-slot:cell(action)="data">
<b-link
v-if="!readonly"
class="action-link"
Expand All @@ -79,7 +79,7 @@
>?
</delete-link>
</template>
<template slot="row-details" slot-scope="row">
<template v-slot:row-details="row">
<b-card>
<compute-resource-reservation-editor
:value="row.item"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,28 @@
new-item-button-text="New Compute Preference"
@add-new-item="createComputePreference"
>
<template slot="item-list" slot-scope="slotProps">
<template v-slot:item-list="slotProps">
<b-table
hover
:fields="computePreferencesFields"
:items="slotProps.items"
sort-by="computeResourceId"
>
<template slot="cell(computeResourceId)" slot-scope="row">
<template v-slot:cell(computeResourceId)="row">
<compute-resource-name
:compute-resource-id="row.item.computeResourceId"
/>
</template>
<template slot="cell(policy)" slot-scope="row">
<template v-slot:cell(policy)="row">
<compute-resource-policy-summary
:compute-resource-id="row.item.computeResourceId"
:group-resource-profile="data"
/>
</template>
<template slot="cell(reservations)" slot-scope="row">
<template v-slot:cell(reservations)="row">
<compute-resource-reservations-summary :reservations="row.value" />
</template>
<template slot="cell(action)" slot-scope="row">
<template v-slot:cell(action)="row">
<router-link
class="action-link"
v-if="userHasWriteAccess"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
@change="defaultQueueChanged"
:disabled="readonly"
>
<template slot="first">
<template v-slot:first>
<option :value="null">Select a Default Queue</option>
</template>
</b-form-select>
Expand Down Expand Up @@ -174,12 +174,12 @@ export default {
};
},
mounted() {
this.$on("input", () => {
this.emitter.on("input", () => {
this.dirty = true;
});
},
destroyed() {
this.$off("input");
unmounted() {
this.emitter.off("input");
},
computed: {
name() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
new-item-button-text="New Deployment"
:new-button-disabled="readonly"
>
<template slot="item-list" slot-scope="slotProps">
<template v-slot:item-list="slotProps">
<b-table
striped
hover
:fields="fields"
:items="slotProps.items"
sort-by="computeHostId"
>
<template slot="cell(action)" slot-scope="data">
<template v-slot:cell(action)="data">
<router-link
class="action-link"
v-if="!data.item.userHasWriteAccess"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<template>
<b-card>
<div class="d-flex align-items-center" slot="header">
<div v-if="!readonly" class="drag-handle mr-1 text-muted">
<i class="fa fa-grip-vertical"></i>
<span class="sr-only">Drag handle for reordering</span>
<template v-slot:header>
<div class="d-flex align-items-center">
<div v-if="!readonly" class="drag-handle mr-1 text-muted">
<i class="fa fa-grip-vertical"></i>
<span class="sr-only">Drag handle for reordering</span>
</div>
<div class="mr-auto">Input Field: {{ data.name }}</div>
<b-link
v-if="!readonly"
class="text-secondary"
@click="deleteApplicationInput"
>
<i class="fa fa-trash"></i>
<span class="sr-only">Delete</span>
</b-link>
</div>
<div class="mr-auto">Input Field: {{ data.name }}</div>
<b-link
v-if="!readonly"
class="text-secondary"
@click="deleteApplicationInput"
>
<i class="fa fa-trash"></i>
<span class="sr-only">Delete</span>
</b-link>
</div>
</template>
<b-collapse :id="id + '-collapse'" :visible="!collapse">
<b-form-group label="Name" :label-for="id + '-name'">
<b-form-input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
:disabled="readonly"
>
</b-form-radio-group>
<div slot="description">
<template v-slot:description>
Show a queue selector along with queue related settings (nodes,
cores, walltime limit).
</div>
</template>
</b-form-group>
<b-form-group
label="Queue Settings Calculator"
Expand All @@ -46,7 +46,7 @@
:options="queueSettingsCalculatorOptions"
:disabled="queueSettingsCalculatorOptions.length === 0"
>
<template slot="first">
<template v-slot:first>
<option :value="null">
If applicable, select a queue settings calculator
</option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<template>
<b-card>
<div class="d-flex align-items-center" slot="header">
<div class="mr-auto">Output Field: {{ data.name }}</div>
<b-link
v-if="!readonly"
class="text-secondary"
@click="deleteApplicationOutput"
>
<i class="fa fa-trash"></i>
<span class="sr-only">Delete</span>
</b-link>
</div>
<template v-slot:header>
<div class="d-flex align-items-center" >
<div class="mr-auto">Output Field: {{ data.name }}</div>
<b-link
v-if="!readonly"
class="text-secondary"
@click="deleteApplicationOutput"
>
<i class="fa fa-trash"></i>
<span class="sr-only">Delete</span>
</b-link>
</div>
</template>
<b-form-group label="Name" :label-for="id + '-name'">
<b-form-input
:id="id + '-name'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
:options="credentialStoreTokenOptions"
:disabled="readonly"
>
<option
<template v-slot:first>
<option
v-if="nullOption"
slot="first"
:value="null"
:disabled="nullOptionDisabled"
>
Expand All @@ -24,6 +24,7 @@
<span v-else> Unset the default SSH credential </span>
</slot>
</option>
</template>
</b-form-select>
<b-input-group-append>
<clipboard-copy-button variant="secondary" :text="copySSHPublicKeyText">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
new-item-button-text="New Application"
:new-button-disabled="!isGatewayAdmin"
>
<template slot="item-list" slot-scope="slotProps">
<template v-slot:item-list="slotProps">
<div class="row">
<application-card
v-for="item in slotProps.items"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
title="Group Resource Profiles"
new-item-button-text="New Group Resource Profile"
>
<template slot="item-list" slot-scope="slotProps">
<template v-slot:item-list="slotProps">
<b-table striped hover :fields="fields" :items="slotProps.items">
<template slot="cell(updatedTime)" slot-scope="data">
<template v-slot:cell(updatedTime)="data">
<human-date :date="data.value" />
</template>
<template slot="cell(action)" slot-scope="data">
<template v-slot:cell(action)="data">
<router-link
class="action-link"
v-if="data.item.userHasWriteAccess"
Expand Down
Loading