You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2020/09/17 21:37:31 UTC
[airavata-django-portal] branch develop updated: Applying Prettier
formatting to all code
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
The following commit(s) were added to refs/heads/develop by this push:
new 568fa97 Applying Prettier formatting to all code
568fa97 is described below
commit 568fa973a4f04162e6ac1c36366b349bce290dc7
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Sep 17 17:34:17 2020 -0400
Applying Prettier formatting to all code
---
django_airavata/apps/admin/README.md | 4 +
django_airavata/apps/admin/babel.config.js | 6 +-
.../admin/static/django_airavata_admin/src/App.vue | 4 +-
.../src/components/admin/ComputeResourcesModal.vue | 42 +-
.../BatchQueueResourcePolicy.vue | 20 +-
.../ComputePreference.vue | 86 ++--
.../ComputeResourcePolicyEditor.vue | 40 +-
.../ComputeResourcePolicySummary.vue | 83 ++--
.../ComputeResourceReservationEditor.vue | 24 +-
.../ComputeResourceReservationList.vue | 38 +-
.../ComputeResourceReservationsSummary.vue | 18 +-
.../GroupComputeResourcePreference.vue | 72 ++--
.../applications/ApplicationDeploymentEditor.vue | 185 ++++++--
.../applications/ApplicationDeploymentsList.vue | 109 +++--
.../applications/ApplicationEditorContainer.vue | 303 +++++++------
.../applications/ApplicationInputFieldEditor.vue | 188 ++++++--
.../applications/ApplicationInterfaceEditor.vue | 116 +++--
.../applications/ApplicationModuleEditor.vue | 62 ++-
.../applications/ApplicationOutputFieldEditor.vue | 110 +++--
.../applications/CommandObjectsEditor.vue | 42 +-
.../src/components/applications/JSONEditor.vue | 19 +-
.../components/applications/SetEnvPathsEditor.vue | 46 +-
.../credentials/NewPasswordCredentialModal.vue | 41 +-
.../credentials/NewSSHCredentialModal.vue | 25 +-
.../credentials/SSHCredentialSelector.vue | 44 +-
.../dashboards/ApplicationsDashboard.vue | 34 +-
.../ComputeResourcePreferenceDashboard.vue | 42 +-
.../dashboards/CredentialStoreDashboard.vue | 77 ++--
.../GatewayResourceProfileEditor.vue | 21 +-
.../GatewayResourceProfileEditorContainer.vue | 57 +--
.../gatewayprofile/StoragePreferenceEditor.vue | 47 +-
.../gatewayprofile/StoragePreferenceList.vue | 109 +++--
.../src/components/notices/NoticeEditor.vue | 125 +++---
.../notices/NoticesManagementContainer.vue | 117 ++---
.../statistics/ExperimentDetailsView.vue | 476 ++++++++++++---------
.../statistics/ExperimentStatisticsCard.vue | 27 +-
.../statistics/ExperimentStatisticsContainer.vue | 196 ++++-----
.../src/components/users/ActivateUserPanel.vue | 15 +-
.../src/components/users/DeleteUserPanel.vue | 14 +-
.../src/components/users/EnableUserPanel.vue | 15 +-
.../components/users/GroupMembershipDisplay.vue | 33 +-
.../IdentityServiceUserManagementContainer.vue | 84 ++--
.../UnverifiedEmailUserManagementContainer.vue | 60 ++-
.../src/components/users/UserDetailsContainer.vue | 33 +-
.../components/users/UserGroupMembershipEditor.vue | 49 ++-
.../components/users/UserManagementContainer.vue | 15 +-
.../admin/static/django_airavata_admin/src/main.js | 10 +-
.../static/django_airavata_admin/src/router.js | 73 ++--
.../django_airavata_admin/static/css/admin.css | 80 ++--
.../django_airavata_admin/static/css/main.css | 188 ++++----
django_airavata/apps/admin/vue.config.js | 34 +-
django_airavata/apps/api/README.md | 4 +-
django_airavata/apps/api/babel.config.js | 12 +-
.../django_airavata_api/js/errors/ErrorReporter.js | 12 +-
.../django_airavata_api/js/errors/ErrorUtils.js | 2 +-
.../js/errors/UnhandledError.js | 25 +-
.../js/errors/UnhandledErrorDispatcher.js | 4 +-
.../js/errors/UnhandledErrorDisplayList.js | 27 +-
.../api/static/django_airavata_api/js/index.js | 12 +-
.../js/models/ApplicationDeploymentDescription.js | 48 +--
.../js/models/ApplicationInterfaceDefinition.js | 24 +-
.../js/models/ApplicationModule.js | 12 +-
.../django_airavata_api/js/models/BaseEnum.js | 53 +--
.../django_airavata_api/js/models/BaseModel.js | 4 +-
.../django_airavata_api/js/models/BatchQueue.js | 34 +-
.../js/models/BatchQueueResourcePolicy.js | 2 +-
.../django_airavata_api/js/models/CommandObject.js | 11 +-
.../models/ComputationalResourceSchedulingModel.js | 143 ++++---
.../js/models/ComputeResourceDescription.js | 74 ++--
.../js/models/ComputeResourceReservation.js | 8 +-
.../js/models/CredentialSummary.js | 6 +-
.../django_airavata_api/js/models/DataProduct.js | 101 ++---
.../js/models/DataReplicaLocation.js | 52 +--
.../django_airavata_api/js/models/DataType.js | 4 +-
.../django_airavata_api/js/models/ErrorModel.js | 34 +-
.../django_airavata_api/js/models/Experiment.js | 34 +-
.../js/models/ExperimentSearchFields.js | 2 +-
.../js/models/ExperimentState.js | 6 +-
.../js/models/ExperimentStatistics.js | 12 +-
.../js/models/ExperimentStatus.js | 6 +-
.../js/models/ExperimentSummary.js | 16 +-
.../js/models/FullExperiment.js | 30 +-
.../js/models/GatewayResourceProfile.js | 4 +-
.../static/django_airavata_api/js/models/Group.js | 14 +-
.../js/models/GroupComputeResourcePreference.js | 12 +-
.../js/models/GroupPermission.js | 33 +-
.../js/models/GroupResourceProfile.js | 36 +-
.../js/models/IAMUserProfile.js | 6 +-
.../js/models/InputDataObjectType.js | 16 +-
.../static/django_airavata_api/js/models/Job.js | 6 +-
.../django_airavata_api/js/models/JobState.js | 23 +-
.../django_airavata_api/js/models/JobStatus.js | 6 +-
.../django_airavata_api/js/models/LogRecord.js | 4 +-
.../django_airavata_api/js/models/Notification.js | 30 +-
.../js/models/NotificationPriority.js | 11 +-
.../js/models/OutputDataObjectType.js | 12 +-
.../js/models/ParallelismType.js | 7 +-
.../static/django_airavata_api/js/models/Parser.js | 11 +-
.../django_airavata_api/js/models/ParserInput.js | 4 +-
.../django_airavata_api/js/models/ParserOutput.js | 4 +-
.../django_airavata_api/js/models/ProcessModel.js | 24 +-
.../django_airavata_api/js/models/ProcessState.js | 2 +-
.../django_airavata_api/js/models/ProcessStatus.js | 6 +-
.../js/models/ProcessWorkflow.js | 4 +-
.../django_airavata_api/js/models/Project.js | 44 +-
.../js/models/ResourcePermissionType.js | 12 +-
.../django_airavata_api/js/models/SetEnvPaths.js | 12 +-
.../django_airavata_api/js/models/SharedEntity.js | 24 +-
.../js/models/StoragePreference.js | 2 +-
.../js/models/StorageResourceDescription.js | 2 +-
.../django_airavata_api/js/models/SummaryType.js | 11 +-
.../static/django_airavata_api/js/models/Task.js | 14 +-
.../django_airavata_api/js/models/TaskStatus.js | 5 +-
.../django_airavata_api/js/models/TaskTypes.js | 2 +-
.../js/models/UnverifiedEmailUserProfile.js | 4 +-
.../js/models/UserConfigurationData.js | 104 ++---
.../js/models/UserPermission.js | 33 +-
.../django_airavata_api/js/models/UserProfile.js | 88 ++--
.../django_airavata_api/js/models/UserStatus.js | 33 +-
.../js/models/UserStorageDirectory.js | 2 +-
.../js/models/UserStorageFile.js | 2 +-
.../js/models/UserStoragePath.js | 10 +-
.../js/models/WorkspacePreferences.js | 2 +-
.../dependencies/BooleanExpressionEvaluator.js | 21 +-
.../js/models/validators/MaxLengthValidator.js | 50 +--
.../js/models/validators/MinLengthValidator.js | 50 +--
.../validators/RegularExpressionValidator.js | 46 +-
.../js/models/validators/ValidatorFactory.js | 41 +-
.../django_airavata_api/js/service_config.js | 162 +++----
.../js/services/CloudJobSubmissionService.js | 12 +-
.../js/services/DataMovementService.js | 14 +-
.../js/services/FullExperimentService.js | 23 +-
.../js/services/GlobusJobSubmissionService.js | 15 +-
.../js/services/GridFTPDataMovementService.js | 12 +-
.../js/services/JobSubmissionService.js | 15 +-
.../js/services/LocaJobSubmissionService.js | 15 +-
.../js/services/ProjectService.js | 74 ++--
.../js/services/SCPDataMovementService.js | 10 +-
.../js/services/ServiceFactory.js | 38 +-
.../js/services/SshJobSubmissionService.js | 13 +-
.../js/services/UnicoreDataMovementService.js | 10 +-
.../js/services/UnicoreJobSubmissionService.js | 15 +-
.../js/services/UserProfileService.js | 22 +-
.../static/django_airavata_api/js/utils/Cache.js | 2 +-
.../django_airavata_api/js/utils/FetchUtils.js | 106 ++---
.../js/utils/PaginationIterator.js | 88 ++--
.../django_airavata_api/js/utils/StringUtils.js | 11 +-
.../static/django_airavata_api/tests/.eslintrc.js | 8 +-
.../BooleanExpressionEvaluator.test.js | 102 ++---
django_airavata/apps/api/webpack.config.js | 4 +-
django_airavata/apps/dataparsers/babel.config.js | 6 +-
.../js/containers/ParserDetailsContainer.vue | 19 +-
.../js/containers/ParserEditContainer.vue | 66 +--
.../js/containers/ParsersManageContainer.vue | 100 ++---
.../js/entry-parser-details.js | 12 +-
.../js/parser-components/ParserEditor.vue | 176 +++++---
.../js/parser-components/ParserList.vue | 71 +--
.../js/parser-components/ParserListItem.vue | 63 ++-
.../js/parser-edit-entry-point.js | 12 +-
.../js/parser-listing-entry-point.js | 4 +-
django_airavata/apps/dataparsers/vue.config.js | 49 ++-
django_airavata/apps/groups/babel.config.js | 6 +-
.../js/containers/GroupCreateContainer.vue | 53 ++-
.../js/containers/GroupEditContainer.vue | 57 ++-
.../js/containers/GroupsManageContainer.vue | 108 ++---
.../js/group-create-entry-point.js | 4 +-
.../js/group-edit-entry-point.js | 40 +-
.../js/group-listing-entry-point.js | 4 +-
.../js/group_components/GroupEditor.vue | 61 ++-
.../js/group_components/GroupList.vue | 87 ++--
.../js/group_components/GroupListItem.vue | 192 +++++----
.../js/group_components/GroupMembersEditor.vue | 54 +--
django_airavata/apps/groups/vue.config.js | 49 ++-
django_airavata/apps/workspace/babel.config.js | 6 +-
.../django-airavata-workspace-plugin-api/README.md | 5 +-
.../babel.config.js | 6 +-
.../js/index.js | 8 +-
.../js/input-editors/InputEditorMixin.js | 140 +++---
.../vue.config.js | 4 +-
django_airavata/apps/workspace/jest.config.js | 29 +-
.../js/components/PgaLink.vue | 25 +-
.../ComputationalResourceSchedulingEditor.vue | 84 ++--
.../experiment/ExperimentDescriptionEditor.vue | 31 +-
.../js/components/experiment/ExperimentEditor.vue | 161 +++----
.../js/components/experiment/ExperimentSummary.vue | 419 +++++++++---------
.../experiment/GroupResourceProfileSelector.vue | 168 ++++----
.../components/experiment/QueueSettingsEditor.vue | 81 ++--
.../input-editors/AutocompleteInputEditor.vue | 40 +-
.../input-editors/CheckboxInputEditor.vue | 75 ++--
.../experiment/input-editors/FileInputEditor.vue | 53 +--
.../input-editors/InputEditorContainer.vue | 271 ++++++------
.../input-editors/InputEditorFormGroup.vue | 70 +--
.../experiment/input-editors/InputFileSelector.vue | 26 +-
.../input-editors/MultiFileInputEditor.vue | 14 +-
.../input-editors/RadioButtonInputEditor.vue | 59 +--
.../experiment/input-editors/SelectInputEditor.vue | 14 +-
.../experiment/input-editors/StringInputEditor.vue | 28 +-
.../input-editors/TextareaInputEditor.vue | 43 +-
.../input-editors/UserFileInputEditor.vue | 41 +-
.../output-displays/DefaultOutputDisplay.vue | 12 +-
.../output-displays/HtmlOutputDisplay.vue | 14 +-
.../output-displays/ImageOutputDisplay.vue | 8 +-
.../output-displays/LinkOutputDisplay.vue | 6 +-
.../output-displays/NotebookOutputDisplay.vue | 17 +-
.../output-displays/OutputDisplayContainer.vue | 34 +-
.../output-displays/OutputViewDataLoader.js | 8 +-
.../InteractiveParameterCheckboxWidget.vue | 8 +-
.../InteractiveParameterRangeWidget.vue | 14 +-
.../InteractiveParameterSelectWidget.vue | 10 +-
.../InteractiveParameterStepperWidget.vue | 14 +-
.../InteractiveParameterTextInputWidget.vue | 12 +-
.../InteractiveParameterWidgetContainer.vue | 10 +-
.../InteractiveParametersPanel.vue | 22 +-
.../js/components/project/ProjectButtonNew.vue | 43 +-
.../js/components/project/ProjectEditor.vue | 33 +-
.../js/components/project/ProjectList.vue | 53 +--
.../js/components/project/ProjectListItem.vue | 18 +-
.../components/storage/UserStorageCreateView.vue | 86 ++--
.../storage/UserStorageFileSelectionContainer.vue | 26 +-
.../storage/UserStoragePathBreadcrumb.vue | 15 +-
.../components/storage/UserStoragePathViewer.vue | 82 ++--
.../storage-edit/UserStorageAudioEditViewer.vue | 29 +-
.../storage-edit/UserStorageDefaultEditViewer.vue | 26 +-
.../storage-edit/UserStorageDownloadButton.vue | 16 +-
.../storage/storage-edit/UserStorageEditViewer.vue | 141 +++---
.../storage-edit/UserStorageImageEditViewer.vue | 27 +-
.../storage-edit/UserStoragePdfEditViewer.vue | 27 +-
.../storage-edit/UserStorageTextEditViewer.vue | 134 +++---
.../storage-edit/UserStorageVideoEditViewer.vue | 29 +-
.../js/containers/CreateExperimentContainer.vue | 20 +-
.../js/containers/DashboardContainer.vue | 69 ++-
.../js/containers/EditExperimentContainer.vue | 32 +-
.../js/containers/EditProjectContainer.vue | 40 +-
.../js/containers/ExperimentListContainer.vue | 84 ++--
.../js/containers/ProjectListContainer.vue | 116 ++---
.../js/containers/RecentExperimentsContainer.vue | 44 +-
.../js/containers/UserStorageContainer.vue | 23 +-
.../js/containers/ViewExperimentContainer.vue | 81 ++--
.../js/entry-create-experiment.js | 12 +-
.../js/entry-dashboard.js | 14 +-
.../js/entry-edit-experiment.js | 12 +-
.../js/entry-edit-project.js | 12 +-
.../js/entry-experiment-list.js | 12 +-
.../js/entry-project-list.js | 12 +-
.../js/entry-user-storage.js | 10 +-
.../js/entry-view-experiment.js | 12 +-
.../django_airavata_workspace/js/utils/urls.js | 8 +-
.../django_airavata_workspace/tests/.eslintrc.js | 6 +-
.../input-editors/InputEditorContainer.spec.js | 37 +-
django_airavata/apps/workspace/vue.config.js | 60 +--
django_airavata/static/common/babel.config.js | 6 +-
django_airavata/static/common/js/cms.js | 2 +-
.../common/js/components/ApplicationCard.vue | 30 +-
.../common/js/components/ApplicationName.vue | 14 +-
.../common/js/components/AutocompleteTextInput.vue | 52 ++-
.../common/js/components/ClipboardCopyButton.vue | 20 +-
.../common/js/components/ClipboardCopyLink.vue | 23 +-
.../common/js/components/ComputeResourceName.vue | 18 +-
.../common/js/components/ConfirmationDialog.vue | 22 +-
.../common/js/components/DataProductViewer.vue | 22 +-
.../static/common/js/components/DeleteButton.vue | 15 +-
.../static/common/js/components/DeleteLink.vue | 12 +-
.../common/js/components/ExperimentStatusBadge.vue | 12 +-
.../static/common/js/components/FavoriteToggle.vue | 19 +-
.../common/js/components/GatewayGroupsBadge.vue | 9 +-
.../js/components/GatewayNoticesContainer.vue | 47 +-
.../static/common/js/components/HumanDate.vue | 7 +-
.../static/common/js/components/MainLayout.vue | 11 +-
.../common/js/components/NotificationsDisplay.vue | 48 +--
.../static/common/js/components/Pager.vue | 86 ++--
.../static/common/js/components/ShareButton.vue | 113 ++---
.../common/js/components/SharedEntityEditor.vue | 229 +++++-----
.../static/common/js/components/Sidebar.vue | 5 +-
.../static/common/js/components/SidebarFeed.vue | 21 +-
.../common/js/components/SidebarFeedItem.vue | 24 +-
.../static/common/js/components/SidebarHeader.vue | 14 +-
.../common/js/components/UnsavedChangesGuard.vue | 9 +-
.../static/common/js/components/Uppy.vue | 38 +-
.../static/common/js/components/ValidatedForm.vue | 20 +-
.../common/js/components/ValidatedFormGroup.vue | 14 +-
.../static/common/js/errors/GlobalErrorHandler.js | 58 ++-
.../static/common/js/errors/ValidationErrors.js | 6 +-
django_airavata/static/common/js/index.js | 10 +-
.../static/common/js/layouts/ListLayout.vue | 42 +-
django_airavata/static/common/js/main.js | 2 +-
.../static/common/js/mixins/VModelMixin.js | 24 +-
django_airavata/static/common/js/notices.js | 8 +-
.../static/common/js/notifications/Notification.js | 26 +-
.../common/js/notifications/NotificationList.js | 2 +-
django_airavata/static/common/js/utils.js | 4 +-
django_airavata/static/common/scss/main.scss | 401 +++++++++--------
django_airavata/static/common/vue.config.js | 10 +-
292 files changed, 6813 insertions(+), 5858 deletions(-)
diff --git a/django_airavata/apps/admin/README.md b/django_airavata/apps/admin/README.md
index 5cea2ba..325eb47 100644
--- a/django_airavata/apps/admin/README.md
+++ b/django_airavata/apps/admin/README.md
@@ -1,21 +1,25 @@
# admin
## Project setup
+
```
yarn
```
### Compiles and hot-reloads for development
+
```
yarn run serve
```
### Compiles and minifies for production
+
```
yarn run build
```
### Lints and fixes files
+
```
yarn run lint
```
diff --git a/django_airavata/apps/admin/babel.config.js b/django_airavata/apps/admin/babel.config.js
index ba17966..1d248fc 100644
--- a/django_airavata/apps/admin/babel.config.js
+++ b/django_airavata/apps/admin/babel.config.js
@@ -1,5 +1,3 @@
module.exports = {
- presets: [
- '@vue/app'
- ]
-}
+ presets: ["@vue/app"],
+};
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/App.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/App.vue
index 158595b..ee014d0 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/App.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/App.vue
@@ -1,8 +1,7 @@
<template>
<div class="vmain">
<transition name="fade">
- <router-view>
- </router-view>
+ <router-view> </router-view>
</transition>
</div>
</template>
@@ -10,4 +9,3 @@
<script>
export default {};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/ComputeResourcesModal.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/ComputeResourcesModal.vue
index b9873b1..7365d86 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/ComputeResourcesModal.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/ComputeResourcesModal.vue
@@ -1,6 +1,14 @@
<template>
- <b-modal title="Select Compute Resource" ref="modal" @ok="onSelectComputeResource" :ok-disabled="modalSelectComputeResourceOkDisabled">
- <b-form-select v-model="selectedComputeResource" :options="computeResourceOptions">
+ <b-modal
+ title="Select Compute Resource"
+ ref="modal"
+ @ok="onSelectComputeResource"
+ :ok-disabled="modalSelectComputeResourceOkDisabled"
+ >
+ <b-form-select
+ v-model="selectedComputeResource"
+ :options="computeResourceOptions"
+ >
<template slot="first">
<option :value="null">Please select compute resource</option>
</template>
@@ -14,41 +22,40 @@ export default {
name: "compute-resources-modal",
props: {
computeResourceNames: Array,
- excludedResourceIds: Array
+ excludedResourceIds: Array,
},
data() {
return {
selectedComputeResource: null,
- localComputeResourceNames: null
+ localComputeResourceNames: null,
};
},
created() {
if (!this.computeResourceNames) {
services.ComputeResourceService.namesList().then(
- resourceNames => (this.localComputeResourceNames = resourceNames)
+ (resourceNames) => (this.localComputeResourceNames = resourceNames)
);
}
},
computed: {
- modalSelectComputeResourceOkDisabled: function() {
+ modalSelectComputeResourceOkDisabled: function () {
return this.selectedComputeResource == null;
},
- computeResourceOptions: function() {
+ computeResourceOptions: function () {
const names = this.computeResourceNames
? this.computeResourceNames
: this.localComputeResourceNames;
const options = names
? names
- .filter(
- comp =>
- this.excludedResourceIds
- ? !this.excludedResourceIds.includes(comp.host_id)
- : true
+ .filter((comp) =>
+ this.excludedResourceIds
+ ? !this.excludedResourceIds.includes(comp.host_id)
+ : true
)
- .map(comp => {
+ .map((comp) => {
return {
value: comp.host_id,
- text: comp.host
+ text: comp.host,
};
})
: [];
@@ -56,7 +63,7 @@ export default {
a.text.toLowerCase().localeCompare(b.text.toLowerCase())
);
return options;
- }
+ },
},
methods: {
onSelectComputeResource() {
@@ -64,8 +71,7 @@ export default {
},
show() {
this.$refs.modal.show();
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/BatchQueueResourcePolicy.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/BatchQueueResourcePolicy.vue
index 7a06851..427b359 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/BatchQueueResourcePolicy.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/BatchQueueResourcePolicy.vue
@@ -77,28 +77,28 @@ export default {
props: {
value: {
required: false,
- type: models.BatchQueueResourcePolicy
+ type: models.BatchQueueResourcePolicy,
},
batchQueue: {
required: true,
- type: models.BatchQueue
- }
+ type: models.BatchQueue,
+ },
},
created() {
this.$on("input", this.validate);
this.validate();
},
- data: function() {
+ data: function () {
const localValue = this.value
? this.value.clone()
: new models.BatchQueueResourcePolicy();
localValue.queuename = this.batchQueue.queueName;
return {
- data: localValue
+ data: localValue,
};
},
methods: {
- policyUpdated: function() {
+ policyUpdated: function () {
if (
this.data.maxAllowedNodes ||
this.data.maxAllowedCores ||
@@ -109,7 +109,7 @@ export default {
this.$emit("input", null);
}
},
- numberFormatter: function(value) {
+ numberFormatter: function (value) {
const num = parseInt(value);
return !isNaN(num) ? "" + num : value;
},
@@ -119,7 +119,7 @@ export default {
} else {
this.$emit("invalid");
}
- }
+ },
},
computed: {
valid() {
@@ -133,7 +133,7 @@ export default {
this.data,
this.validation
);
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputePreference.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputePreference.vue
index 38ae364..f881ebf 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputePreference.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputePreference.vue
@@ -64,9 +64,7 @@
nullOptionLabelScope.defaultCredentialSummary.description
}})
</span>
- <span v-else>
- Select a SSH credential
- </span>
+ <span v-else> Select a SSH credential </span>
</template>
</ssh-credential-selector>
</b-form-group>
@@ -169,7 +167,7 @@ import {
mixins,
notifications,
errors as uiErrors,
- components
+ components,
} from "django-airavata-common-ui";
export default {
@@ -178,31 +176,31 @@ export default {
"delete-button": components.DeleteButton,
"ssh-credential-selector": SSHCredentialSelector,
ComputeResourceReservationList,
- ComputeResourcePolicyEditor
+ ComputeResourcePolicyEditor,
},
props: {
id: {
- type: String
+ type: String,
},
host_id: {
type: String,
- required: true
+ required: true,
},
groupResourceProfile: {
- type: models.GroupResourceProfile
+ type: models.GroupResourceProfile,
},
computeResourcePolicy: {
- type: models.ComputeResourcePolicy
+ type: models.ComputeResourcePolicy,
},
batchQueueResourcePolicies: {
- type: Array
- }
+ type: Array,
+ },
},
- mounted: function() {
+ mounted: function () {
const computeResourcePromise = this.fetchComputeResource(this.host_id);
if (!this.value && this.id && this.host_id) {
services.GroupResourceProfileService.retrieve({ lookup: this.id }).then(
- groupResourceProfile => {
+ (groupResourceProfile) => {
this.localGroupResourceProfile = groupResourceProfile;
const computeResourcePreference = groupResourceProfile.getComputePreference(
this.host_id
@@ -228,12 +226,12 @@ export default {
}
this.$on("input", this.validate);
},
- data: function() {
+ data: function () {
return {
data: this.value
? this.value.clone()
: new models.GroupComputeResourcePreference({
- computeResourceId: this.host_id
+ computeResourceId: this.host_id,
}),
localGroupResourceProfile: this.groupResourceProfile
? this.groupResourceProfile.clone()
@@ -242,15 +240,15 @@ export default {
? this.computeResourcePolicy.clone()
: null,
localBatchQueueResourcePolicies: this.batchQueueResourcePolicies
- ? this.batchQueueResourcePolicies.map(pol => pol.clone())
+ ? this.batchQueueResourcePolicies.map((pol) => pol.clone())
: [],
computeResource: {
batchQueues: [],
- jobSubmissionInterfaces: []
+ jobSubmissionInterfaces: [],
},
validationErrors: null,
reservationsInvalid: false,
- computeResourcePolicyInvalid: false
+ computeResourcePolicyInvalid: false,
};
},
computed: {
@@ -271,19 +269,19 @@ export default {
);
},
queueNames() {
- return this.computeResource.batchQueues.map(bq => bq.queueName);
- }
+ return this.computeResource.batchQueues.map((bq) => bq.queueName);
+ },
},
mixins: [mixins.VModelMixin],
methods: {
- fetchComputeResource: function(id) {
+ fetchComputeResource: function (id) {
return DjangoAiravataAPI.utils.FetchUtils.get(
"/api/compute-resources/" + encodeURIComponent(id) + "/"
- ).then(value => {
+ ).then((value) => {
return (this.computeResource = value);
});
},
- save: function() {
+ save: function () {
let groupResourceProfile = this.localGroupResourceProfile.clone();
groupResourceProfile.mergeComputeResourcePreference(
this.data,
@@ -291,23 +289,23 @@ export default {
this.localBatchQueueResourcePolicies
);
return this.saveOrUpdate(groupResourceProfile)
- .then(groupResourceProfile => {
+ .then((groupResourceProfile) => {
// Navigate back to GroupResourceProfile with success message
this.$router.push({
name: "group_resource_preference",
params: {
value: groupResourceProfile,
- id: groupResourceProfile.groupResourceProfileId
- }
+ id: groupResourceProfile.groupResourceProfileId,
+ },
});
})
- .catch(error => {
+ .catch((error) => {
if (
errors.ErrorUtils.isValidationError(error) &&
"computePreferences" in error.details.response
) {
const computePreferencesIndex = groupResourceProfile.computePreferences.findIndex(
- cp => cp.computeResourceId === this.host_id
+ (cp) => cp.computeResourceId === this.host_id
);
this.validationErrors =
error.details.response.computePreferences[
@@ -332,7 +330,7 @@ export default {
);
}
},
- remove: function() {
+ remove: function () {
let groupResourceProfile = this.localGroupResourceProfile.clone();
const removedChildren = groupResourceProfile.removeComputeResource(
this.host_id
@@ -340,15 +338,15 @@ export default {
if (removedChildren) {
DjangoAiravataAPI.services.GroupResourceProfileService.update({
data: groupResourceProfile,
- lookup: this.id
- }).then(groupResourceProfile => {
+ lookup: this.id,
+ }).then((groupResourceProfile) => {
// Navigate back to GroupResourceProfile with success message
this.$router.push({
name: "group_resource_preference",
params: {
value: groupResourceProfile,
- id: this.id
- }
+ id: this.id,
+ },
});
});
} else {
@@ -356,26 +354,26 @@ export default {
this.cancel();
}
},
- cancel: function() {
+ cancel: function () {
if (this.id) {
this.$router.push({
name: "group_resource_preference",
- params: { id: this.id }
+ params: { id: this.id },
});
} else {
this.$router.push({
name: "new_group_resource_preference",
- params: { value: this.localGroupResourceProfile }
+ params: { value: this.localGroupResourceProfile },
});
}
},
- createDefaultComputeResourcePolicy: function(computeResourcePromise) {
- computeResourcePromise.then(computeResource => {
+ createDefaultComputeResourcePolicy: function (computeResourcePromise) {
+ computeResourcePromise.then((computeResource) => {
const defaultComputeResourcePolicy = new models.ComputeResourcePolicy();
defaultComputeResourcePolicy.computeResourceId = this.host_id;
defaultComputeResourcePolicy.groupResourceProfileId = this.id;
defaultComputeResourcePolicy.allowedBatchQueues = computeResource.batchQueues.map(
- queue => queue.queueName
+ (queue) => queue.queueName
);
this.localComputeResourcePolicy = defaultComputeResourcePolicy;
});
@@ -395,18 +393,18 @@ export default {
},
deleteReservation(reservation) {
const reservationIndex = this.data.reservations.findIndex(
- r => r.key === reservation.key
+ (r) => r.key === reservation.key
);
this.data.reservations.splice(reservationIndex, 1);
},
updateReservation(reservation) {
const reservationIndex = this.data.reservations.findIndex(
- r => r.key === reservation.key
+ (r) => r.key === reservation.key
);
this.data.reservations.splice(reservationIndex, 1, reservation);
- }
+ },
},
- beforeRouteEnter: function(to, from, next) {
+ beforeRouteEnter: function (to, from, next) {
// If we don't have the Group Resource Profile id or instance, then the
// Group Resource Profile wasn't created and we need to just go back to
// the dashboard
@@ -415,7 +413,7 @@ export default {
} else {
next();
}
- }
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourcePolicyEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourcePolicyEditor.vue
index 3f61d08..42b3ae4 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourcePolicyEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourcePolicyEditor.vue
@@ -25,7 +25,7 @@
:batch-queue="batchQueue"
:value="
localBatchQueueResourcePolicies.find(
- pol => pol.queuename === batchQueue.queueName
+ (pol) => pol.queuename === batchQueue.queueName
)
"
@input="updatedBatchQueueResourcePolicy(batchQueue, $event)"
@@ -46,28 +46,28 @@ export default {
name: "compute-resource-policy-editor",
props: {
batchQueues: {
- type: Array
+ type: Array,
},
computeResourcePolicy: {
- type: models.ComputeResourcePolicy
+ type: models.ComputeResourcePolicy,
},
batchQueueResourcePolicies: {
- type: Array
- }
+ type: Array,
+ },
},
components: {
- BatchQueueResourcePolicy
+ BatchQueueResourcePolicy,
},
- data: function() {
+ data: function () {
return {
localComputeResourcePolicy: this.computeResourcePolicy
? this.computeResourcePolicy.clone()
: null,
localBatchQueueResourcePolicies: this.batchQueueResourcePolicies
- ? this.batchQueueResourcePolicies.map(pol => pol.clone())
+ ? this.batchQueueResourcePolicies.map((pol) => pol.clone())
: [],
validationErrors: null,
- invalidBatchQueueResourcePolicies: []
+ invalidBatchQueueResourcePolicies: [],
};
},
computed: {
@@ -87,13 +87,13 @@ export default {
);
},
allowedInvalidBatchQueueResourcePolicies() {
- return this.invalidBatchQueueResourcePolicies.filter(queueName =>
+ return this.invalidBatchQueueResourcePolicies.filter((queueName) =>
this.localComputeResourcePolicy.allowedBatchQueues.includes(queueName)
);
- }
+ },
},
methods: {
- batchQueueChecked: function(batchQueue, checked) {
+ batchQueueChecked: function (batchQueue, checked) {
if (checked) {
this.localComputeResourcePolicy.allowedBatchQueues.push(
batchQueue.queueName
@@ -108,7 +108,7 @@ export default {
);
// Remove batchQueueResourcePolicy if it exists
const policyIndex = this.localBatchQueueResourcePolicies.findIndex(
- pol => pol.queuename === batchQueue.queueName
+ (pol) => pol.queuename === batchQueue.queueName
);
if (policyIndex >= 0) {
this.localBatchQueueResourcePolicies.splice(policyIndex, 1);
@@ -124,14 +124,14 @@ export default {
this.localComputeResourcePolicy
);
},
- updatedBatchQueueResourcePolicy: function(
+ updatedBatchQueueResourcePolicy: function (
batchQueue,
batchQueueResourcePolicy
) {
const queueName = batchQueue.queueName;
if (batchQueueResourcePolicy) {
const existingPolicy = this.localBatchQueueResourcePolicies.find(
- pol => pol.queuename === queueName
+ (pol) => pol.queuename === queueName
);
if (existingPolicy) {
Object.assign(existingPolicy, batchQueueResourcePolicy);
@@ -143,7 +143,7 @@ export default {
}
} else {
const existingPolicyIndex = this.localBatchQueueResourcePolicies.findIndex(
- pol => pol.queuename === queueName
+ (pol) => pol.queuename === queueName
);
if (existingPolicyIndex >= 0) {
this.localBatchQueueResourcePolicies.splice(existingPolicyIndex, 1);
@@ -179,7 +179,7 @@ export default {
} else {
this.$emit("invalid");
}
- }
+ },
},
watch: {
computeResourcePolicy(value) {
@@ -187,10 +187,10 @@ export default {
},
batchQueueResourcePolicies(value) {
this.localBatchQueueResourcePolicies = value
- ? value.map(p => p.clone())
+ ? value.map((p) => p.clone())
: [];
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourcePolicySummary.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourcePolicySummary.vue
index 2751378..f0ae38e 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourcePolicySummary.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourcePolicySummary.vue
@@ -1,14 +1,35 @@
<template>
- <ul>
- <li v-for="queuePolicy in queuePolicies" :key="queuePolicy.name">
- {{ queuePolicy.name }}
- <template v-if="queuePolicy.policy">
- (<span title="Max Allowed Nodes">N: {{ queuePolicy.policy.maxAllowedNodes ? queuePolicy.policy.maxAllowedNodes : 'Unlimited' }}</span>,
- <span title="Max Allowed Cores">C: {{ queuePolicy.policy.maxAllowedCores ? queuePolicy.policy.maxAllowedCores : 'Unlimited' }}</span>,
- <span title="Max Allowed Walltime">W: {{ queuePolicy.policy.maxAllowedWalltime ? queuePolicy.policy.maxAllowedWalltime : 'Unlimited' }}</span>)
- </template>
- </li>
- </ul>
+ <ul>
+ <li v-for="queuePolicy in queuePolicies" :key="queuePolicy.name">
+ {{ queuePolicy.name }}
+ <template v-if="queuePolicy.policy">
+ (<span title="Max Allowed Nodes"
+ >N:
+ {{
+ queuePolicy.policy.maxAllowedNodes
+ ? queuePolicy.policy.maxAllowedNodes
+ : "Unlimited"
+ }}</span
+ >,
+ <span title="Max Allowed Cores"
+ >C:
+ {{
+ queuePolicy.policy.maxAllowedCores
+ ? queuePolicy.policy.maxAllowedCores
+ : "Unlimited"
+ }}</span
+ >,
+ <span title="Max Allowed Walltime"
+ >W:
+ {{
+ queuePolicy.policy.maxAllowedWalltime
+ ? queuePolicy.policy.maxAllowedWalltime
+ : "Unlimited"
+ }}</span
+ >)
+ </template>
+ </li>
+ </ul>
</template>
<script>
@@ -19,14 +40,14 @@ export default {
props: {
computeResourceId: {
type: String,
- required: true
+ required: true,
},
groupResourceProfile: {
- type: models.GroupResourceProfile
- }
+ type: models.GroupResourceProfile,
+ },
},
computed: {
- queues: function() {
+ queues: function () {
const computeResourcePolicy = this.groupResourceProfile.getComputeResourcePolicy(
this.computeResourceId
);
@@ -38,26 +59,28 @@ export default {
return [];
}
},
- queuePolicies: function() {
- const result = [];
- for (const queue of this.queues) {
- const batchQueueResourcePolicies = this.groupResourceProfile.getBatchQueueResourcePolicies(this.computeResourceId);
- const batchQueueResourcePolicy = batchQueueResourcePolicies.find(pol => pol.queuename === queue);
- result.push({
- name: queue,
- policy: batchQueueResourcePolicy,
- });
- }
- return result;
- }
- }
+ queuePolicies: function () {
+ const result = [];
+ for (const queue of this.queues) {
+ const batchQueueResourcePolicies = this.groupResourceProfile.getBatchQueueResourcePolicies(
+ this.computeResourceId
+ );
+ const batchQueueResourcePolicy = batchQueueResourcePolicies.find(
+ (pol) => pol.queuename === queue
+ );
+ result.push({
+ name: queue,
+ policy: batchQueueResourcePolicy,
+ });
+ }
+ return result;
+ },
+ },
};
</script>
<style scoped>
ul {
- padding-left: 20px;
+ padding-left: 20px;
}
</style>
-
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationEditor.vue
index 04b9a93..b08ee8e 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationEditor.vue
@@ -31,7 +31,7 @@
day: 'numeric',
hour: 'numeric',
minute: '2-digit',
- timeZoneName: 'short'
+ timeZoneName: 'short',
}"
:phrases="{ ok: 'Continue', cancel: 'Exit' }"
:hour-step="1"
@@ -54,7 +54,7 @@
:value="endTimeAsString"
:input-class="{
'form-control': true,
- 'is-invalid': getValidationState('endTime')
+ 'is-invalid': getValidationState('endTime'),
}"
:format="{
year: 'numeric',
@@ -62,7 +62,7 @@
day: 'numeric',
hour: 'numeric',
minute: '2-digit',
- timeZoneName: 'short'
+ timeZoneName: 'short',
}"
:phrases="{ ok: 'Continue', cancel: 'Exit' }"
:hour-step="1"
@@ -99,17 +99,17 @@ export default {
name: "compute-resource-reservation-editor",
mixins: [mixins.VModelMixin],
components: {
- datetime: Datetime
+ datetime: Datetime,
},
props: {
queues: {
type: Array,
- required: true
- }
+ required: true,
+ },
},
data() {
return {
- nameInputBegins: false
+ nameInputBegins: false,
};
},
created() {
@@ -133,16 +133,16 @@ export default {
},
queueNameOptions() {
return this.queues.slice().sort();
- }
+ },
},
methods: {
stringToDate(datetimeString) {
return new Date(datetimeString);
},
- getValidationFeedback: function(properties) {
+ getValidationFeedback: function (properties) {
return utils.getProperty(this.data.validate(), properties);
},
- getValidationState: function(properties) {
+ getValidationState: function (properties) {
return this.getValidationFeedback(properties) ? "invalid" : null;
},
valuesChanged() {
@@ -152,7 +152,7 @@ export default {
} else {
this.$emit("invalid");
}
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationList.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationList.vue
index b75aa5b..223f744 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationList.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationList.vue
@@ -113,21 +113,21 @@ export default {
"human-date": components.HumanDate,
"list-layout": layouts.ListLayout,
ComputeResourceReservationEditor,
- "delete-button": components.DeleteButton
+ "delete-button": components.DeleteButton,
},
props: {
reservations: {
type: Array,
- required: true
+ required: true,
},
queues: {
type: Array,
- required: true
+ required: true,
},
readonly: {
type: Boolean,
- default: false
- }
+ default: false,
+ },
},
data() {
return {
@@ -135,7 +135,7 @@ export default {
showNewItemEditor: false,
newReservation: null,
newReservationValid: false,
- invalidReservations: [] // list of ComputeResourceReservation.key
+ invalidReservations: [], // list of ComputeResourceReservation.key
};
},
computed: {
@@ -143,33 +143,33 @@ export default {
return [
{
label: "Name",
- key: "reservationName"
+ key: "reservationName",
},
{
label: "Queues",
- key: "queueNames"
+ key: "queueNames",
},
{
label: "Start Time",
key: "startTime",
- formatter: value =>
- utils.dateFormatters.dateTimeInMinutesWithTimeZone.format(value)
+ formatter: (value) =>
+ utils.dateFormatters.dateTimeInMinutesWithTimeZone.format(value),
},
{
label: "End Time",
key: "endTime",
- formatter: value =>
- utils.dateFormatters.dateTimeInMinutesWithTimeZone.format(value)
+ formatter: (value) =>
+ utils.dateFormatters.dateTimeInMinutesWithTimeZone.format(value),
},
{
label: "Action",
- key: "action"
- }
+ key: "action",
+ },
];
},
decoratedReservations() {
return this.reservations
- ? this.reservations.map(res => {
+ ? this.reservations.map((res) => {
const resClone = res.clone();
resClone._showDetails = this.showingDetails[resClone.key];
return resClone;
@@ -187,9 +187,9 @@ export default {
},
expiredReservations() {
return this.reservations
- ? this.reservations.filter(r => r.isExpired)
+ ? this.reservations.filter((r) => r.isExpired)
: [];
- }
+ },
},
created() {},
methods: {
@@ -242,7 +242,7 @@ export default {
},
deleteAllExpiredReservations() {
this.expiredReservations.forEach(this.deleteReservation);
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationsSummary.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationsSummary.vue
index 0cd71f2..498475b 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationsSummary.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationsSummary.vue
@@ -20,26 +20,28 @@ export default {
props: {
reservations: {
type: Array,
- required: true
- }
+ required: true,
+ },
},
computed: {
expiredReservations() {
return this.reservations
- ? this.reservations.filter(r => r.isExpired)
+ ? this.reservations.filter((r) => r.isExpired)
: [];
},
activeReservations() {
- return this.reservations ? this.reservations.filter(r => r.isActive) : [];
+ return this.reservations
+ ? this.reservations.filter((r) => r.isActive)
+ : [];
},
activeReservationNames() {
- return this.activeReservations.map(r => r.reservationName);
+ return this.activeReservations.map((r) => r.reservationName);
},
upcomingReservations() {
return this.reservations
- ? this.reservations.filter(r => r.isUpcoming)
+ ? this.reservations.filter((r) => r.isUpcoming)
: [];
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/GroupComputeResourcePreference.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/GroupComputeResourcePreference.vue
index b2dbd67..8bc58d2 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/GroupComputeResourcePreference.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/GroupComputeResourcePreference.vue
@@ -74,8 +74,8 @@
),
batchQueueResourcePolicies: data.getBatchQueueResourcePolicies(
row.item.computeResourceId
- )
- }
+ ),
+ },
}"
>
Edit
@@ -134,30 +134,30 @@ export default {
props: {
value: {
type: models.GroupResourceProfile,
- default: function() {
+ default: function () {
return new models.GroupResourceProfile();
- }
+ },
},
id: {
- type: String
- }
+ type: String,
+ },
},
- mounted: function() {
+ mounted: function () {
if (this.id) {
if (!this.value.groupResourceProfileId) {
services.GroupResourceProfileService.retrieve({ lookup: this.id }).then(
- grp => (this.data = grp)
+ (grp) => (this.data = grp)
);
}
// Load information about the owner of this GroupResourceProfile
services.SharedEntityService.retrieve({
- lookup: this.id
- }).then(sharedEntity => {
+ lookup: this.id,
+ }).then((sharedEntity) => {
this.sharedEntity = sharedEntity;
});
}
},
- data: function() {
+ data: function () {
let data = this.value.clone();
return {
data: data,
@@ -168,29 +168,29 @@ export default {
label: "Name",
key: "computeResourceId",
sortable: true,
- formatter: value => this.getComputeResourceName(value)
+ formatter: (value) => this.getComputeResourceName(value),
},
{
label: "Username",
- key: "loginUserName"
+ key: "loginUserName",
},
{
label: "Allocation",
- key: "allocationProjectNumber"
+ key: "allocationProjectNumber",
},
{
label: "Policy",
- key: "policy" // custom rendering
+ key: "policy", // custom rendering
},
{
label: "Reservations",
- key: "reservations" // custom rendering
+ key: "reservations", // custom rendering
},
{
label: "Action",
- key: "action"
- }
- ]
+ key: "action",
+ },
+ ],
};
},
@@ -202,18 +202,18 @@ export default {
ComputeResourcePolicySummary,
ComputeResourcesModal,
"ssh-credential-selector": SSHCredentialSelector,
- ComputeResourceReservationsSummary
+ ComputeResourceReservationsSummary,
},
computed: {
excludedComputeResourceIds() {
const currentPrefs = this.data.computePreferences
? this.data.computePreferences.map(
- computePreference => computePreference.computeResourceId
+ (computePreference) => computePreference.computeResourceId
)
: [];
return currentPrefs;
},
- title: function() {
+ title: function () {
return this.id
? this.data.groupResourceProfileName
: "New Group Resource Profile";
@@ -235,15 +235,15 @@ export default {
this.owner.email +
")"
: null;
- }
+ },
},
methods: {
- saveGroupResourceProfile: function() {
+ saveGroupResourceProfile: function () {
var persist = null;
if (this.id) {
persist = this.service.update({ data: this.data, lookup: this.id });
} else {
- persist = this.service.create({ data: this.data }).then(data => {
+ persist = this.service.create({ data: this.data }).then((data) => {
// Merge sharing settings with default sharing settings created when
// Group Resource Profile was created
const groupResourceProfileId = data.groupResourceProfileId;
@@ -254,19 +254,19 @@ export default {
this.$router.push("/group-resource-profiles");
});
},
- getComputeResourceName: function(computeResourceId) {
+ getComputeResourceName: function (computeResourceId) {
// TODO: load compute resources to get the real name
return computeResourceId && computeResourceId.indexOf("_") > 0
? computeResourceId.split("_")[0]
: computeResourceId;
},
- cancel: function() {
+ cancel: function () {
this.$router.push("/group-resource-profiles");
},
- createComputePreference: function() {
+ createComputePreference: function () {
this.$refs.modalSelectComputeResource.show();
},
- onSelectComputeResource: function(computeResourceId) {
+ onSelectComputeResource: function (computeResourceId) {
const computeResourcePreference = new models.GroupComputeResourcePreference();
computeResourcePreference.computeResourceId = computeResourceId;
this.$router.push({
@@ -275,18 +275,18 @@ export default {
value: computeResourcePreference,
id: this.id,
host_id: computeResourcePreference.computeResourceId,
- groupResourceProfile: this.data
- }
+ groupResourceProfile: this.data,
+ },
});
},
- removeComputePreference: function(computeResourceId) {
+ removeComputePreference: function (computeResourceId) {
let groupResourceProfile = this.data.clone();
groupResourceProfile.removeComputeResource(computeResourceId);
this.service
.update({ data: groupResourceProfile, lookup: this.id })
- .then(groupResourceProfile => (this.data = groupResourceProfile));
+ .then((groupResourceProfile) => (this.data = groupResourceProfile));
},
- removeGroupResourceProfile: function() {
+ removeGroupResourceProfile: function () {
if (this.id) {
this.service.delete({ lookup: this.id }).then(() => {
this.$router.push("/group-resource-profiles");
@@ -295,7 +295,7 @@ export default {
// Nothing to delete so just treat like a cancel
this.cancel();
}
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationDeploymentEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationDeploymentEditor.vue
index 81a1513..615b9af 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationDeploymentEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationDeploymentEditor.vue
@@ -8,45 +8,128 @@
<p v-if="owner" class="mb-2 text-muted">
Created by <span :title="ownerTitle">{{ ownerUserId }}</span>
</p>
- <share-button class="mt-2 mb-2" v-if="localSharedEntity" :shared-entity="localSharedEntity" @saved="savedSharedEntity" @unsaved="unsavedSharedEntity"
+ <share-button
+ class="mt-2 mb-2"
+ v-if="localSharedEntity"
+ :shared-entity="localSharedEntity"
+ @saved="savedSharedEntity"
+ @unsaved="unsavedSharedEntity"
/>
- <b-form-group label="Application Executable Path" label-for="executable-path">
- <b-form-input id="executable-path" type="text" v-model="data.executablePath" required :disabled="readonly"></b-form-input>
+ <b-form-group
+ label="Application Executable Path"
+ label-for="executable-path"
+ >
+ <b-form-input
+ id="executable-path"
+ type="text"
+ v-model="data.executablePath"
+ required
+ :disabled="readonly"
+ ></b-form-input>
</b-form-group>
- <b-form-group label="Application Parallelism Type" label-for="parallelism-type">
- <b-form-select id="parallelism-type" v-model="data.parallelism" :options="parallelismTypeOptions" :disabled="readonly" />
+ <b-form-group
+ label="Application Parallelism Type"
+ label-for="parallelism-type"
+ >
+ <b-form-select
+ id="parallelism-type"
+ v-model="data.parallelism"
+ :options="parallelismTypeOptions"
+ :disabled="readonly"
+ />
</b-form-group>
- <b-form-group label="Application Deployment Description" label-for="deployment-description">
- <b-form-textarea id="deployment-description" v-model="data.appDeploymentDescription" :rows="3" :disabled="readonly"></b-form-textarea>
+ <b-form-group
+ label="Application Deployment Description"
+ label-for="deployment-description"
+ >
+ <b-form-textarea
+ id="deployment-description"
+ v-model="data.appDeploymentDescription"
+ :rows="3"
+ :disabled="readonly"
+ ></b-form-textarea>
</b-form-group>
- <command-objects-editor title="Module Load Commands" add-button-label="Add Module Load Command" v-model="data.moduleLoadCmds"
- :readonly="readonly" />
- <set-env-paths-editor title="Library Prepend Paths" add-button-label="Add a Library Prepend Path" v-model="data.libPrependPaths"
- :readonly="readonly" />
- <set-env-paths-editor title="Library Append Paths" add-button-label="Add a Library Append Path" v-model="data.libAppendPaths"
- :readonly="readonly" />
- <set-env-paths-editor title="Environment Variables" add-button-label="Add Environment Variable" v-model="data.setEnvironment"
- :readonly="readonly" />
- <command-objects-editor title="Pre Job Commands" add-button-label="Add Pre Job Command" v-model="data.preJobCommands" :readonly="readonly"
+ <command-objects-editor
+ title="Module Load Commands"
+ add-button-label="Add Module Load Command"
+ v-model="data.moduleLoadCmds"
+ :readonly="readonly"
+ />
+ <set-env-paths-editor
+ title="Library Prepend Paths"
+ add-button-label="Add a Library Prepend Path"
+ v-model="data.libPrependPaths"
+ :readonly="readonly"
+ />
+ <set-env-paths-editor
+ title="Library Append Paths"
+ add-button-label="Add a Library Append Path"
+ v-model="data.libAppendPaths"
+ :readonly="readonly"
+ />
+ <set-env-paths-editor
+ title="Environment Variables"
+ add-button-label="Add Environment Variable"
+ v-model="data.setEnvironment"
+ :readonly="readonly"
+ />
+ <command-objects-editor
+ title="Pre Job Commands"
+ add-button-label="Add Pre Job Command"
+ v-model="data.preJobCommands"
+ :readonly="readonly"
+ />
+ <command-objects-editor
+ title="Post Job Commands"
+ add-button-label="Add Post Job Command"
+ v-model="data.postJobCommands"
+ :readonly="readonly"
/>
- <command-objects-editor title="Post Job Commands" add-button-label="Add Post Job Command" v-model="data.postJobCommands"
- :readonly="readonly" />
<b-form-group label="Default Queue Name" label-for="default-queue-name">
- <b-form-select id="default-queue-name" v-model="data.defaultQueueName" :options="queueNameOptions" @change="defaultQueueChanged"
- :disabled="readonly">
+ <b-form-select
+ id="default-queue-name"
+ v-model="data.defaultQueueName"
+ :options="queueNameOptions"
+ @change="defaultQueueChanged"
+ :disabled="readonly"
+ >
<template slot="first">
<option :value="null">Select a Default Queue</option>
</template>
</b-form-select>
</b-form-group>
<b-form-group label="Default Node Count" label-for="default-node-count">
- <b-form-input id="default-node-count" type="number" v-model="data.defaultNodeCount" min="0" :max="maxNodes" :disabled="defaultQueueAttributesDisabled"></b-form-input>
+ <b-form-input
+ id="default-node-count"
+ type="number"
+ v-model="data.defaultNodeCount"
+ min="0"
+ :max="maxNodes"
+ :disabled="defaultQueueAttributesDisabled"
+ ></b-form-input>
</b-form-group>
<b-form-group label="Default CPU Count" label-for="default-cpu-count">
- <b-form-input id="default-cpu-count" type="number" v-model="data.defaultCPUCount" min="0" :max="maxCPUCount" :disabled="defaultQueueAttributesDisabled"></b-form-input>
+ <b-form-input
+ id="default-cpu-count"
+ type="number"
+ v-model="data.defaultCPUCount"
+ min="0"
+ :max="maxCPUCount"
+ :disabled="defaultQueueAttributesDisabled"
+ ></b-form-input>
</b-form-group>
- <b-form-group label="Default Walltime (in minutes)" label-for="default-walltime">
- <b-form-input id="default-walltime" type="number" v-model="data.defaultWalltime" min="0" :max="maxWalltime" :disabled="defaultQueueAttributesDisabled"></b-form-input>
+ <b-form-group
+ label="Default Walltime (in minutes)"
+ label-for="default-walltime"
+ >
+ <b-form-input
+ id="default-walltime"
+ type="number"
+ v-model="data.defaultWalltime"
+ min="0"
+ :max="maxWalltime"
+ :disabled="defaultQueueAttributesDisabled"
+ ></b-form-input>
</b-form-group>
</div>
</div>
@@ -64,27 +147,27 @@ export default {
mixins: [mixins.VModelMixin],
props: {
value: {
- type: models.ApplicationDescriptionDefinition
+ type: models.ApplicationDescriptionDefinition,
},
readonly: {
type: Boolean,
- default: false
+ default: false,
},
sharedEntity: {
type: models.SharedEntity,
- required: true
- }
+ required: true,
+ },
},
components: {
CommandObjectsEditor,
SetEnvPathsEditor,
- "share-button": components.ShareButton
+ "share-button": components.ShareButton,
},
data() {
return {
computeResource: null,
localSharedEntity: this.sharedEntity ? this.sharedEntity.clone() : null,
- dirty: false
+ dirty: false,
};
},
mounted() {
@@ -104,10 +187,10 @@ export default {
}
},
parallelismTypeOptions() {
- return models.ParallelismType.values.map(parType => {
+ return models.ParallelismType.values.map((parType) => {
return {
value: parType,
- text: parType.name
+ text: parType.name,
};
});
},
@@ -115,17 +198,17 @@ export default {
if (!this.computeResource) {
return [];
}
- return this.computeResource.batchQueues.map(queue => {
+ return this.computeResource.batchQueues.map((queue) => {
return {
value: queue.queueName,
- text: queue.queueName
+ text: queue.queueName,
};
});
},
maxNodes() {
const queue = this.computeResource
? this.computeResource.batchQueues.find(
- q => q.queueName === this.data.defaultQueueName
+ (q) => q.queueName === this.data.defaultQueueName
)
: null;
return queue ? queue.maxNodes : 0;
@@ -133,7 +216,7 @@ export default {
maxCPUCount() {
const queue = this.computeResource
? this.computeResource.batchQueues.find(
- q => q.queueName === this.data.defaultQueueName
+ (q) => q.queueName === this.data.defaultQueueName
)
: null;
return queue ? queue.maxProcessors : 0;
@@ -141,7 +224,7 @@ export default {
maxWalltime() {
const queue = this.computeResource
? this.computeResource.batchQueues.find(
- q => q.queueName === this.data.defaultQueueName
+ (q) => q.queueName === this.data.defaultQueueName
)
: null;
return queue ? queue.maxRuntime : 0;
@@ -150,19 +233,28 @@ export default {
return !this.data.defaultQueueName || this.readonly;
},
owner() {
- return this.localSharedEntity && this.localSharedEntity.owner ? this.localSharedEntity.owner : null;
+ return this.localSharedEntity && this.localSharedEntity.owner
+ ? this.localSharedEntity.owner
+ : null;
},
ownerUserId() {
return this.owner ? this.owner.userId : null;
},
ownerTitle() {
- return this.owner ? this.owner.firstName + " " + this.owner.lastName + " (" + this.owner.email + ")": null;
- }
+ return this.owner
+ ? this.owner.firstName +
+ " " +
+ this.owner.lastName +
+ " (" +
+ this.owner.email +
+ ")"
+ : null;
+ },
},
created() {
services.ComputeResourceService.retrieve({
- lookup: this.data.computeHostId
- }).then(computeResource => {
+ lookup: this.data.computeHostId,
+ }).then((computeResource) => {
this.computeResource = computeResource;
});
},
@@ -179,7 +271,7 @@ export default {
},
defaultQueueChanged(queueName) {
const queue = this.computeResource.batchQueues.find(
- q => q.queueName === queueName
+ (q) => q.queueName === queueName
);
this.data.defaultNodeCount = queue.defaultNodeCount;
this.data.defaultCPUCount = queue.defaultCPUCount;
@@ -191,13 +283,12 @@ export default {
unsavedSharedEntity(newSharedEntity) {
this.dirty = true;
this.$emit("sharing-changed", newSharedEntity, this.data, true);
- }
+ },
},
watch: {
sharedEntity(newValue) {
this.localSharedEntity = newValue.clone();
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationDeploymentsList.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationDeploymentsList.vue
index 5847ca4..d1585fc 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationDeploymentsList.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationDeploymentsList.vue
@@ -1,31 +1,87 @@
<template>
<div>
- <list-layout @add-new-item="newApplicationDeployment" :items="deployments" title="Application Deployments" new-item-button-text="New Deployment" :new-button-disabled="readonly">
+ <list-layout
+ @add-new-item="newApplicationDeployment"
+ :items="deployments"
+ title="Application Deployments"
+ new-item-button-text="New Deployment"
+ :new-button-disabled="readonly"
+ >
<template slot="item-list" slot-scope="slotProps">
-
- <b-table striped hover :fields="fields" :items="slotProps.items" sort-by="computeHostId">
+ <b-table
+ striped
+ hover
+ :fields="fields"
+ :items="slotProps.items"
+ sort-by="computeHostId"
+ >
<template slot="action" slot-scope="data">
- <router-link class="action-link" v-if="!data.item.userHasWriteAccess" :to="{name: 'application_deployment', params: {id: id, deploymentId: data.item.appDeploymentId, readonly: true}}">
+ <router-link
+ class="action-link"
+ v-if="!data.item.userHasWriteAccess"
+ :to="{
+ name: 'application_deployment',
+ params: {
+ id: id,
+ deploymentId: data.item.appDeploymentId,
+ readonly: true,
+ },
+ }"
+ >
View
<i class="fa fa-eye" aria-hidden="true"></i>
</router-link>
- <router-link class="action-link" v-if="data.item.userHasWriteAccess && data.item.appDeploymentId" :to="{name: 'application_deployment', params: {id: id, deploymentId: data.item.appDeploymentId, readonly: false}}">
+ <router-link
+ class="action-link"
+ v-if="data.item.userHasWriteAccess && data.item.appDeploymentId"
+ :to="{
+ name: 'application_deployment',
+ params: {
+ id: id,
+ deploymentId: data.item.appDeploymentId,
+ readonly: false,
+ },
+ }"
+ >
Edit
<i class="fa fa-edit" aria-hidden="true"></i>
</router-link>
- <router-link class="action-link" v-if="data.item.userHasWriteAccess && !data.item.appDeploymentId" :to="{name: 'new_application_deployment', params: {id: id, hostId: data.item.computeHostId, readonly: false}}">
+ <router-link
+ class="action-link"
+ v-if="data.item.userHasWriteAccess && !data.item.appDeploymentId"
+ :to="{
+ name: 'new_application_deployment',
+ params: {
+ id: id,
+ hostId: data.item.computeHostId,
+ readonly: false,
+ },
+ }"
+ >
Edit
<i class="fa fa-edit" aria-hidden="true"></i>
</router-link>
- <delete-link v-if="data.item.userHasWriteAccess" @delete="removeApplicationDeployment(data.item)" class="action-link">
- Are you sure you want to remove the <strong>{{ getComputeResourceName(data.item.computeHostId) }}</strong> deployment?
+ <delete-link
+ v-if="data.item.userHasWriteAccess"
+ @delete="removeApplicationDeployment(data.item)"
+ class="action-link"
+ >
+ Are you sure you want to remove the
+ <strong>{{
+ getComputeResourceName(data.item.computeHostId)
+ }}</strong>
+ deployment?
</delete-link>
</template>
</b-table>
</template>
</list-layout>
- <compute-resources-modal ref="modalSelectComputeResource" @selected="onSelectComputeResource" :compute-resource-names="selectableComputeResourceNames"
- :excluded-resource-ids="excludedComputeResourceIds" />
+ <compute-resources-modal
+ ref="modalSelectComputeResource"
+ @selected="onSelectComputeResource"
+ :compute-resource-names="selectableComputeResourceNames"
+ :excluded-resource-ids="excludedComputeResourceIds"
+ />
</div>
</template>
@@ -39,27 +95,27 @@ export default {
components: {
"list-layout": layouts.ListLayout,
ComputeResourcesModal,
- "delete-link": components.DeleteLink
+ "delete-link": components.DeleteLink,
},
props: {
deployments: {
type: Array,
- required: true
+ required: true,
},
id: {
// app module id
type: String,
- required: true
+ required: true,
},
readonly: {
type: Boolean,
- default: false
+ default: false,
},
},
data() {
return {
computeResourceNames: null,
- groupResourceProfiles: null
+ groupResourceProfiles: null,
};
},
computed: {
@@ -69,16 +125,16 @@ export default {
label: "Compute Resource",
key: "computeHostId",
sortable: true,
- formatter: value => this.getComputeResourceName(value)
+ formatter: (value) => this.getComputeResourceName(value),
},
{
label: "Description",
- key: "appDeploymentDescription"
+ key: "appDeploymentDescription",
},
{
label: "Action",
- key: "action"
- }
+ key: "action",
+ },
];
},
selectableComputeResourceNames() {
@@ -106,7 +162,7 @@ export default {
];
result.push({
host_id: computeResourceId,
- host: computeResourceName
+ host: computeResourceName,
});
}
}
@@ -116,15 +172,15 @@ export default {
}
},
excludedComputeResourceIds() {
- return this.deployments.map(dep => dep.computeHostId);
- }
+ return this.deployments.map((dep) => dep.computeHostId);
+ },
},
mounted() {
services.ComputeResourceService.names().then(
- names => (this.computeResourceNames = names)
+ (names) => (this.computeResourceNames = names)
);
services.GroupResourceProfileService.list().then(
- groupResourceProfiles =>
+ (groupResourceProfiles) =>
(this.groupResourceProfiles = groupResourceProfiles)
);
},
@@ -147,8 +203,7 @@ export default {
},
removeApplicationDeployment(deployment) {
this.$emit("delete", deployment);
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationEditorContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationEditorContainer.vue
index 240543f..77987f2 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationEditorContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationEditorContainer.vue
@@ -1,7 +1,10 @@
<template>
<div class="has-fixed-footer">
<unsaved-changes-guard :dirty="isDirty" />
- <confirmation-dialog ref="unsavedChangesDialog" title="You have unsaved changes">
+ <confirmation-dialog
+ ref="unsavedChangesDialog"
+ title="You have unsaved changes"
+ >
You have unsaved changes. Are you sure you want to leave this page?
</confirmation-dialog>
<div class="row">
@@ -14,36 +17,95 @@
<div class="row">
<div class="col">
<b-nav tabs class="mb-3">
- <b-nav-item exact-active-class="active" exact :to="{name: id ? 'application_module' : 'new_application_module', params: {id: id}}">Details</b-nav-item>
- <b-nav-item exact-active-class="active" exact :to="{name: 'application_interface', params: {id: id}}" :disabled="!id">Interface</b-nav-item>
- <b-nav-item active-class="active" :to="{name: 'application_deployments', params: {id: id}}" :disabled="!id">Deployments</b-nav-item>
+ <b-nav-item
+ exact-active-class="active"
+ exact
+ :to="{
+ name: id ? 'application_module' : 'new_application_module',
+ params: { id: id },
+ }"
+ >Details</b-nav-item
+ >
+ <b-nav-item
+ exact-active-class="active"
+ exact
+ :to="{ name: 'application_interface', params: { id: id } }"
+ :disabled="!id"
+ >Interface</b-nav-item
+ >
+ <b-nav-item
+ active-class="active"
+ :to="{ name: 'application_deployments', params: { id: id } }"
+ :disabled="!id"
+ >Deployments</b-nav-item
+ >
</b-nav>
- <router-view name="module" v-if="appModule" v-model="appModule" @input="appModuleIsDirty = true" :readonly="!appModule.userHasWriteAccess"
- :validation-errors="appModuleValidationErrors" />
- <router-view name="interface" v-if="appInterface" v-model="appInterface" @input="appInterfaceIsDirty = true" :readonly="!appInterface.userHasWriteAccess"
+ <router-view
+ name="module"
+ v-if="appModule"
+ v-model="appModule"
+ @input="appModuleIsDirty = true"
+ :readonly="!appModule.userHasWriteAccess"
+ :validation-errors="appModuleValidationErrors"
/>
- <router-view name="deployments" v-if="appModule && appDeployments" :deployments="appDeployments" @new="createNewDeployment" @delete="deleteApplicationDeployment" :readonly="!appModule.userHasWriteAccess"
+ <router-view
+ name="interface"
+ v-if="appInterface"
+ v-model="appInterface"
+ @input="appInterfaceIsDirty = true"
+ :readonly="!appInterface.userHasWriteAccess"
+ />
+ <router-view
+ name="deployments"
+ v-if="appModule && appDeployments"
+ :deployments="appDeployments"
+ @new="createNewDeployment"
+ @delete="deleteApplicationDeployment"
+ :readonly="!appModule.userHasWriteAccess"
+ />
+ <router-view
+ name="deployment"
+ v-if="currentDeployment && currentDeploymentSharedEntity"
+ v-model="currentDeployment"
+ :shared-entity="currentDeploymentSharedEntity"
+ @sharing-changed="deploymentSharingChanged"
+ @input="currentDeploymentChanged"
/>
- <router-view name="deployment" v-if="currentDeployment && currentDeploymentSharedEntity" v-model="currentDeployment" :shared-entity="currentDeploymentSharedEntity"
- @sharing-changed="deploymentSharingChanged" @input="currentDeploymentChanged" />
</div>
</div>
<div class="fixed-footer">
- <b-button class="editor-button" variant="primary" @click="saveAll" :disabled="readonly || !isDirty">
- Save
- </b-button>
- <delete-button class="editor-button" v-if="id" :disabled="readonly" @delete="deleteApplication">
- Are you sure you want to delete the <strong>{{ appModule ? appModule.appModuleName : "" }}</strong> application?
- </delete-button>
- <b-button class="editor-button" variant="secondary" @click="cancel">
- Cancel
- </b-button>
+ <b-button
+ class="editor-button"
+ variant="primary"
+ @click="saveAll"
+ :disabled="readonly || !isDirty"
+ >
+ Save
+ </b-button>
+ <delete-button
+ class="editor-button"
+ v-if="id"
+ :disabled="readonly"
+ @delete="deleteApplication"
+ >
+ Are you sure you want to delete the
+ <strong>{{ appModule ? appModule.appModuleName : "" }}</strong>
+ application?
+ </delete-button>
+ <b-button class="editor-button" variant="secondary" @click="cancel">
+ Cancel
+ </b-button>
</div>
</div>
</template>
<script>
-import { errors, models, services, utils as apiUtils } from "django-airavata-api";
+import {
+ errors,
+ models,
+ services,
+ utils as apiUtils,
+} from "django-airavata-api";
import { components, notifications } from "django-airavata-common-ui";
export default {
@@ -51,14 +113,14 @@ export default {
props: {
id: String,
deploymentId: String,
- hostId: String
+ hostId: String,
},
components: {
"unsaved-changes-guard": components.UnsavedChangesGuard,
"confirmation-dialog": components.ConfirmationDialog,
- "delete-button": components.DeleteButton
+ "delete-button": components.DeleteButton,
},
- data: function() {
+ data: function () {
return {
appModule: null,
appInterface: null,
@@ -71,11 +133,11 @@ export default {
appInterfaceIsDirty: false,
dirtyAppDeploymentComputeHostIds: [],
dirtyAppDeploymentSharedEntityComputeHostIds: [],
- appModuleValidationErrors: null
+ appModuleValidationErrors: null,
};
},
computed: {
- title: function() {
+ title: function () {
if (this.id) {
return this.appModule && this.appModule.appModuleName
? this.appModule.appModuleName
@@ -94,7 +156,7 @@ export default {
},
readonly() {
return this.appModule && !this.appModule.userHasWriteAccess;
- }
+ },
},
created() {
this.initialize();
@@ -109,7 +171,7 @@ export default {
});
} else {
this.appModule = new models.ApplicationModule({
- userHasWriteAccess: true
+ userHasWriteAccess: true,
});
}
},
@@ -121,21 +183,23 @@ export default {
}
},
startEditingExistingDeployment(deploymentId) {
- this.setCurrentDeploymentFromAppDeploymentId(deploymentId).then(
- appDeployment =>
- this.setCurrentApplicationDeploymentSharedEntity(appDeployment)
+ this.setCurrentDeploymentFromAppDeploymentId(
+ deploymentId
+ ).then((appDeployment) =>
+ this.setCurrentApplicationDeploymentSharedEntity(appDeployment)
);
},
startEditingNewDeployment(computeHostId) {
- this.setCurrentDeploymentFromComputeHostId(computeHostId).then(
- appDeployment =>
- this.setCurrentApplicationDeploymentSharedEntity(appDeployment)
+ this.setCurrentDeploymentFromComputeHostId(
+ computeHostId
+ ).then((appDeployment) =>
+ this.setCurrentApplicationDeploymentSharedEntity(appDeployment)
);
},
loadApplicationModule(appModuleId) {
return services.ApplicationModuleService.retrieve({
- lookup: appModuleId
- }).then(appModule => {
+ lookup: appModuleId,
+ }).then((appModule) => {
this.appModuleIsDirty = false;
this.appModule = appModule;
});
@@ -150,7 +214,7 @@ export default {
return services.ApplicationModuleService.update(
{
lookup: appModule.appModuleId,
- data: appModule
+ data: appModule,
},
{ ignoreErrors: true }
);
@@ -160,13 +224,13 @@ export default {
? this.updateApplicationModule(appModule)
: this.createApplicationModule(appModule)
)
- .then(appModule => {
+ .then((appModule) => {
this.appModuleValidationErrors = null;
this.appModuleIsDirty = false;
this.appModule = appModule;
return appModule;
})
- .catch(error => {
+ .catch((error) => {
if (errors.ErrorUtils.isValidationError(error)) {
this.appModuleValidationErrors = error.details.response;
} else {
@@ -179,7 +243,7 @@ export default {
deleteApplicationModule() {
const deleteModule = this.id
? services.ApplicationModuleService.delete({
- lookup: this.id
+ lookup: this.id,
})
: Promise.resolve(null);
return deleteModule.then(() => {
@@ -192,16 +256,16 @@ export default {
{ lookup: appModuleId },
{ ignoreErrors: true }
)
- .then(appInterface => {
+ .then((appInterface) => {
this.appInterfaceIsDirty = false;
this.appInterface = appInterface;
return appInterface;
})
- .catch(error => {
+ .catch((error) => {
if (error.details.status === 404) {
// If there is no interface, just create a new instance
const appInterface = new models.ApplicationInterfaceDefinition({
- userHasWriteAccess: true
+ userHasWriteAccess: true,
});
appInterface.addStandardOutAndStandardErrorOutputs();
this.appInterface = appInterface;
@@ -215,8 +279,8 @@ export default {
},
createApplicationInterface(appInterface) {
return services.ApplicationInterfaceService.create({
- data: appInterface
- }).then(appInterface => {
+ data: appInterface,
+ }).then((appInterface) => {
this.appInterfaceIsDirty = false;
this.appInterface = appInterface;
return appInterface;
@@ -225,8 +289,8 @@ export default {
updateApplicationInterface(appInterface) {
return services.ApplicationInterfaceService.update({
lookup: appInterface.applicationInterfaceId,
- data: appInterface
- }).then(appInterface => {
+ data: appInterface,
+ }).then((appInterface) => {
this.appInterfaceIsDirty = false;
this.appInterface = appInterface;
return appInterface;
@@ -243,7 +307,7 @@ export default {
deleteApplicationInterface(appInterface) {
if (appInterface.applicationInterfaceId) {
return services.ApplicationInterfaceService.delete({
- lookup: appInterface.applicationInterfaceId
+ lookup: appInterface.applicationInterfaceId,
}).then(() => (this.appInterfaceIsDirty = false));
} else {
this.appInterfaceIsDirty = false;
@@ -253,8 +317,8 @@ export default {
},
loadApplicationDeployments(appModuleId) {
return services.ApplicationModuleService.getApplicationDeployments({
- lookup: appModuleId
- }).then(appDeployments => {
+ lookup: appModuleId,
+ }).then((appDeployments) => {
this.dirtyAppDeploymentComputeHostIds = [];
this.appDeployments = appDeployments;
return appDeployments;
@@ -262,16 +326,16 @@ export default {
},
loadApplicationDeployment(appDeploymentId) {
return services.ApplicationDeploymentService.retrieve({
- lookup: appDeploymentId
- }).then(appDeployment => {
+ lookup: appDeploymentId,
+ }).then((appDeployment) => {
this.currentDeployment = appDeployment;
return appDeployment;
});
},
createApplicationDeployment(appDeployment) {
return services.ApplicationDeploymentService.create({
- data: appDeployment
- }).then(appDeployment => {
+ data: appDeployment,
+ }).then((appDeployment) => {
this.removeDirtyAppDeploymentComputeHostId(appDeployment);
this.replaceAppDeployment(appDeployment);
return appDeployment;
@@ -280,8 +344,8 @@ export default {
updateApplicationDeployment(appDeployment) {
return services.ApplicationDeploymentService.update({
lookup: appDeployment.appDeploymentId,
- data: appDeployment
- }).then(appDeployment => {
+ data: appDeployment,
+ }).then((appDeployment) => {
this.removeDirtyAppDeploymentComputeHostId(appDeployment);
this.replaceAppDeployment(appDeployment);
return appDeployment;
@@ -295,14 +359,14 @@ export default {
deleteApplicationDeployment(appDeployment) {
if (appDeployment.appDeploymentId) {
return services.ApplicationDeploymentService.delete({
- lookup: appDeployment.appDeploymentId
+ lookup: appDeployment.appDeploymentId,
}).then(() => {
this.removeDirtyAppDeploymentComputeHostId(appDeployment);
return this.loadApplicationDeployments(this.id);
});
} else {
const depIndex = this.appDeployments.findIndex(
- dep => dep.computeHostId === appDeployment.computeHostId
+ (dep) => dep.computeHostId === appDeployment.computeHostId
);
this.appDeployments.splice(depIndex, 1);
this.removeDirtyAppDeploymentComputeHostId(appDeployment);
@@ -315,7 +379,7 @@ export default {
},
replaceAppDeployment(appDeployment) {
const depIndex = this.appDeployments.findIndex(
- dep => dep.computeHostId === appDeployment.computeHostId
+ (dep) => dep.computeHostId === appDeployment.computeHostId
);
this.appDeployments.splice(depIndex, 1, appDeployment);
},
@@ -339,13 +403,13 @@ export default {
createNewDeployment(computeHostId) {
this.$router.push({
name: "new_application_deployment",
- params: { id: this.id, hostId: computeHostId }
+ params: { id: this.id, hostId: computeHostId },
});
},
loadApplicationDeploymentSharedEntity(appDeployment) {
return services.SharedEntityService.retrieve({
- lookup: appDeployment.appDeploymentId
- }).then(sharedEntity => {
+ lookup: appDeployment.appDeploymentId,
+ }).then((sharedEntity) => {
this.appDeploymentsSharedEntities[
appDeployment.computeHostId
] = sharedEntity;
@@ -361,7 +425,7 @@ export default {
return Promise.resolve(this.currentDeploymentSharedEntity);
} else if (appDeployment.appDeploymentId) {
return this.loadApplicationDeploymentSharedEntity(appDeployment).then(
- sharedEntity => (this.currentDeploymentSharedEntity = sharedEntity)
+ (sharedEntity) => (this.currentDeploymentSharedEntity = sharedEntity)
);
} else {
throw new Error(
@@ -390,8 +454,8 @@ export default {
mergeSharedEntity(sharedEntity, appDeployment) {
return services.SharedEntityService.merge({
data: sharedEntity,
- lookup: appDeployment.appDeploymentId
- }).then(sharedEntity => {
+ lookup: appDeployment.appDeploymentId,
+ }).then((sharedEntity) => {
this.replaceAppDeploymentSharedEntity(sharedEntity, appDeployment);
this.removeAppDeploymentSharedEntityDirty(sharedEntity, appDeployment);
return sharedEntity;
@@ -400,8 +464,8 @@ export default {
updateSharedEntity(sharedEntity, appDeployment) {
return services.SharedEntityService.update({
data: sharedEntity,
- lookup: appDeployment.appDeploymentId
- }).then(sharedEntity => {
+ lookup: appDeployment.appDeploymentId,
+ }).then((sharedEntity) => {
this.replaceAppDeploymentSharedEntity(sharedEntity, appDeployment);
this.removeAppDeploymentSharedEntityDirty(sharedEntity, appDeployment);
return sharedEntity;
@@ -441,7 +505,7 @@ export default {
},
setCurrentDeploymentFromAppDeploymentId(appDeploymentId) {
this.currentDeployment = this.appDeployments.find(
- dep => dep.appDeploymentId === appDeploymentId
+ (dep) => dep.appDeploymentId === appDeploymentId
);
if (!this.currentDeployment) {
throw new Error(
@@ -452,12 +516,12 @@ export default {
},
setCurrentDeploymentFromComputeHostId(computeHostId) {
this.currentDeployment = this.appDeployments.find(
- dep => dep.computeHostId === computeHostId
+ (dep) => dep.computeHostId === computeHostId
);
if (!this.currentDeployment) {
// Create a new deployment
const deployment = new models.ApplicationDeploymentDescription({
- userHasWriteAccess: true
+ userHasWriteAccess: true,
});
deployment.appModuleId = this.id;
deployment.computeHostId = computeHostId;
@@ -472,83 +536,85 @@ export default {
},
saveAll() {
const moduleSave = this.appModuleIsDirty
- ? this.saveApplicationModule(this.appModule).catch(error => {
+ ? this.saveApplicationModule(this.appModule).catch((error) => {
// Navigate to the route that has the error
this.$router.push({
- name: this.id ? "application_module" : "new_application_module"
+ name: this.id ? "application_module" : "new_application_module",
});
// Cancel the chain of promises
return Promise.reject(error);
})
: Promise.resolve(this.appModule);
- const interfaceSave = moduleSave.then(
- () =>
- this.appInterfaceIsDirty
- ? this.saveApplicationInterface(this.appInterface).catch(error => {
- // Navigate to the route that has the error
- this.$router.push({
- name: "application_interface"
- });
- // Cancel the chain of promises
- return Promise.reject(error);
- })
- : Promise.resolve(this.appInterface)
+ const interfaceSave = moduleSave.then(() =>
+ this.appInterfaceIsDirty
+ ? this.saveApplicationInterface(this.appInterface).catch((error) => {
+ // Navigate to the route that has the error
+ this.$router.push({
+ name: "application_interface",
+ });
+ // Cancel the chain of promises
+ return Promise.reject(error);
+ })
+ : Promise.resolve(this.appInterface)
);
- interfaceSave.then(() => {
+ interfaceSave
+ .then(() => {
return Promise.all(
- this.dirtyAppDeploymentComputeHostIds.map(computeHostId => {
+ this.dirtyAppDeploymentComputeHostIds.map((computeHostId) => {
const deployment = this.appDeployments.find(
- dep => dep.computeHostId === computeHostId
+ (dep) => dep.computeHostId === computeHostId
);
- return this.saveApplicationDeployment(deployment).catch(error => {
- // Navigate to the route that has the error
- if (deployment.appDeploymentId) {
- this.$router.push({
- name: "application_deployment",
- params: {
- id: this.id,
- deploymentId: deployment.appDeploymentId
- }
- });
- } else {
- this.$router.push({
- name: "new_application_deployment",
- params: { id: this.id, hostId: deployment.computeHostId }
- });
+ return this.saveApplicationDeployment(deployment).catch(
+ (error) => {
+ // Navigate to the route that has the error
+ if (deployment.appDeploymentId) {
+ this.$router.push({
+ name: "application_deployment",
+ params: {
+ id: this.id,
+ deploymentId: deployment.appDeploymentId,
+ },
+ });
+ } else {
+ this.$router.push({
+ name: "new_application_deployment",
+ params: { id: this.id, hostId: deployment.computeHostId },
+ });
+ }
+ return Promise.reject(error);
}
- return Promise.reject(error);
- });
+ );
})
);
})
.then(() => {
return Promise.all(
this.dirtyAppDeploymentSharedEntityComputeHostIds.map(
- computeHostId => {
+ (computeHostId) => {
const sharedEntity = this.appDeploymentsSharedEntities[
computeHostId
];
const deployment = this.appDeployments.find(
- dep => dep.computeHostId === computeHostId
+ (dep) => dep.computeHostId === computeHostId
);
return this.saveSharedEntity(sharedEntity, deployment).catch(
- error => {
+ (error) => {
// Navigate to the route that has the error
if (deployment.appDeploymentId) {
this.$router.push({
name: "application_deployment",
params: {
id: this.id,
- deploymentId: deployment.appDeploymentId
- }
+ deploymentId: deployment.appDeploymentId,
+ },
});
} else {
this.$router.push({
name: "new_application_deployment",
params: {
id: this.id,
- hostId: deployment.computeHostId
- }
+ hostId: deployment.computeHostId,
+ },
});
}
return Promise.reject(error);
@@ -563,7 +629,7 @@ export default {
new notifications.Notification({
type: "SUCCESS",
message: "Application saved successfully",
- duration: 5
+ duration: 5,
})
);
if (!this.id && this.appModule.appModuleId) {
@@ -571,14 +637,14 @@ export default {
// that we have an id
this.$router.push({
name: "application_module",
- params: { id: this.appModule.appModuleId }
+ params: { id: this.appModule.appModuleId },
});
}
if (this.hostId) {
// If creating a new deployment, navigate to the deployments list
this.$router.push({
name: "application_deployments",
- params: { id: this.appModule.appModuleId }
+ params: { id: this.appModule.appModuleId },
});
} else {
// Reinitialize deployment editing so that deployment being edited is
@@ -591,7 +657,7 @@ export default {
this.$router.push({ path: "/applications" });
},
deleteApplication() {
- const deleteAllDeployments = this.appDeployments.map(dep =>
+ const deleteAllDeployments = this.appDeployments.map((dep) =>
this.deleteApplicationDeployment(dep)
);
return Promise.all(deleteAllDeployments)
@@ -600,15 +666,15 @@ export default {
.then(() => {
this.$router.push({ path: "/applications" });
});
- }
+ },
},
watch: {
- $route: function(to, from) {
+ $route: function (to, from) {
if (to.params.id !== from.params.id) {
this.initialize();
}
this.initializeDeploymentEditing();
- }
+ },
},
beforeRouteLeave(to, from, next) {
if (this.isDirty) {
@@ -617,7 +683,7 @@ export default {
} else {
next();
}
- }
+ },
};
</script>
@@ -630,4 +696,3 @@ export default {
margin-left: 0.25em;
}
</style>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInputFieldEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInputFieldEditor.vue
index 1d50b2d..c767d0c 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInputFieldEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInputFieldEditor.vue
@@ -6,59 +6,157 @@
<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">
+ <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>
- <b-collapse :id="id+'-collapse'" :visible="!collapse">
- <b-form-group label="Name" :label-for="id+'-name'">
- <b-form-input :id="id+'-name'" type="text" v-model="data.name" ref="nameInput" required :disabled="readonly"></b-form-input>
+ <b-collapse :id="id + '-collapse'" :visible="!collapse">
+ <b-form-group label="Name" :label-for="id + '-name'">
+ <b-form-input
+ :id="id + '-name'"
+ type="text"
+ v-model="data.name"
+ ref="nameInput"
+ required
+ :disabled="readonly"
+ ></b-form-input>
</b-form-group>
- <b-form-group label="Type" :label-for="id+'-type'">
- <b-form-select :id="id+'-type'" v-model="data.type" :options="inputTypeOptions" :disabled="readonly" />
+ <b-form-group label="Type" :label-for="id + '-type'">
+ <b-form-select
+ :id="id + '-type'"
+ v-model="data.type"
+ :options="inputTypeOptions"
+ :disabled="readonly"
+ />
</b-form-group>
- <b-form-group label="Initial Value" :label-for="id+'-value'" v-if="showValueField">
- <b-form-input :id="id+'-value'" type="text" v-model="data.value" :disabled="readonly"></b-form-input>
+ <b-form-group
+ label="Initial Value"
+ :label-for="id + '-value'"
+ v-if="showValueField"
+ >
+ <b-form-input
+ :id="id + '-value'"
+ type="text"
+ v-model="data.value"
+ :disabled="readonly"
+ ></b-form-input>
</b-form-group>
- <b-form-group label="Override Filename" :label-for="id+'-value'" v-if="showOverrideFilenameField">
- <b-form-input :id="id+'-override-filename'" type="text" v-model="data.overrideFilename" :disabled="readonly"></b-form-input>
+ <b-form-group
+ label="Override Filename"
+ :label-for="id + '-value'"
+ v-if="showOverrideFilenameField"
+ >
+ <b-form-input
+ :id="id + '-override-filename'"
+ type="text"
+ v-model="data.overrideFilename"
+ :disabled="readonly"
+ ></b-form-input>
</b-form-group>
- <b-form-group label="Application Argument" :label-for="id+'-argument'">
- <b-form-input :id="id+'-argument'" type="text" v-model="data.applicationArgument" :disabled="readonly"></b-form-input>
+ <b-form-group label="Application Argument" :label-for="id + '-argument'">
+ <b-form-input
+ :id="id + '-argument'"
+ type="text"
+ v-model="data.applicationArgument"
+ :disabled="readonly"
+ ></b-form-input>
</b-form-group>
<div class="d-flex">
- <b-form-group class="flex-fill" label="Standard Input" :label-for="id+'-standard-input'">
- <b-form-radio-group :id="id+'-standard-input'" v-model="data.standardInput" :options="trueFalseOptions"
- :disabled="readonly">
+ <b-form-group
+ class="flex-fill"
+ label="Standard Input"
+ :label-for="id + '-standard-input'"
+ >
+ <b-form-radio-group
+ :id="id + '-standard-input'"
+ v-model="data.standardInput"
+ :options="trueFalseOptions"
+ :disabled="readonly"
+ >
</b-form-radio-group>
</b-form-group>
- <b-form-group class="flex-fill" label="Read Only" :label-for="id+'-read-only'">
- <b-form-radio-group :id="id+'-read-only'" v-model="data.isReadOnly" :options="trueFalseOptions" :disabled="readonly">
+ <b-form-group
+ class="flex-fill"
+ label="Read Only"
+ :label-for="id + '-read-only'"
+ >
+ <b-form-radio-group
+ :id="id + '-read-only'"
+ v-model="data.isReadOnly"
+ :options="trueFalseOptions"
+ :disabled="readonly"
+ >
</b-form-radio-group>
</b-form-group>
</div>
- <b-form-group label="User Friendly Description" :label-for="id+'-user-friendly-description'">
- <b-form-textarea :id="id+'-user-friendly-description'" v-model="data.userFriendlyDescription" :rows="3"
- :disabled="readonly" />
+ <b-form-group
+ label="User Friendly Description"
+ :label-for="id + '-user-friendly-description'"
+ >
+ <b-form-textarea
+ :id="id + '-user-friendly-description'"
+ v-model="data.userFriendlyDescription"
+ :rows="3"
+ :disabled="readonly"
+ />
</b-form-group>
<div class="d-flex">
- <b-form-group class="flex-fill" label="Data is staged" :label-for="id+'-data-staged'">
- <b-form-radio-group :id="id+'-data-staged'" v-model="data.dataStaged" :options="trueFalseOptions" :disabled="readonly">
+ <b-form-group
+ class="flex-fill"
+ label="Data is staged"
+ :label-for="id + '-data-staged'"
+ >
+ <b-form-radio-group
+ :id="id + '-data-staged'"
+ v-model="data.dataStaged"
+ :options="trueFalseOptions"
+ :disabled="readonly"
+ >
</b-form-radio-group>
</b-form-group>
- <b-form-group class="flex-fill" label="Required" :label-for="id+'-required'">
- <b-form-radio-group :id="id+'-required'" v-model="data.isRequired" :options="trueFalseOptions" :disabled="readonly">
+ <b-form-group
+ class="flex-fill"
+ label="Required"
+ :label-for="id + '-required'"
+ >
+ <b-form-radio-group
+ :id="id + '-required'"
+ v-model="data.isRequired"
+ :options="trueFalseOptions"
+ :disabled="readonly"
+ >
</b-form-radio-group>
</b-form-group>
</div>
- <b-form-group class="flex-fill" label="Required on Command Line" :label-for="id+'-required-command-line'">
- <b-form-radio-group :id="id+'-required-command-line'" v-model="data.requiredToAddedToCommandLine" :options="trueFalseOptions"
- :disabled="readonly">
+ <b-form-group
+ class="flex-fill"
+ label="Required on Command Line"
+ :label-for="id + '-required-command-line'"
+ >
+ <b-form-radio-group
+ :id="id + '-required-command-line'"
+ v-model="data.requiredToAddedToCommandLine"
+ :options="trueFalseOptions"
+ :disabled="readonly"
+ >
</b-form-radio-group>
</b-form-group>
- <b-form-group label="Advanced Input Field Modification Metadata" :label-for="id+'-metadata'" description="Metadata for this input, in the JSON format">
- <json-editor :id="id+'-metadata'" v-model="data.metaData" :rows="5" :disabled="readonly" />
+ <b-form-group
+ label="Advanced Input Field Modification Metadata"
+ :label-for="id + '-metadata'"
+ description="Metadata for this input, in the JSON format"
+ >
+ <json-editor
+ :id="id + '-metadata'"
+ v-model="data.metaData"
+ :rows="5"
+ :disabled="readonly"
+ />
</b-form-group>
</b-collapse>
</b-card>
@@ -66,7 +164,7 @@
<script>
import { models } from "django-airavata-api";
-import { mixins } from "django-airavata-common-ui"
+import { mixins } from "django-airavata-common-ui";
import JSONEditor from "./JSONEditor.vue";
export default {
@@ -74,44 +172,47 @@ export default {
mixins: [mixins.VModelMixin],
props: {
value: {
- type: models.InputDataObjectType
+ type: models.InputDataObjectType,
},
// Whether to put focus on the name field when mounting component
focus: {
- type: Boolean
+ type: Boolean,
},
collapse: {
- type: Boolean
+ type: Boolean,
},
readonly: {
type: Boolean,
- default: false
- }
+ default: false,
+ },
},
components: {
- 'json-editor': JSONEditor
+ "json-editor": JSONEditor,
},
computed: {
inputTypeOptions() {
- return models.InputDataObjectType.VALID_DATA_TYPES.map(dataType => {
+ return models.InputDataObjectType.VALID_DATA_TYPES.map((dataType) => {
return {
value: dataType,
- text: dataType.name
+ text: dataType.name,
};
});
},
trueFalseOptions() {
- return [{ text: "True", value: true }, { text: "False", value: false }];
+ return [
+ { text: "True", value: true },
+ { text: "False", value: false },
+ ];
},
id() {
return "id-" + this.data.key;
},
showValueField() {
- return this.data.type.isSimpleValueType
+ return this.data.type.isSimpleValueType;
},
showOverrideFilenameField() {
return this.data.type === models.DataType.URI;
- }
+ },
},
methods: {
doFocus() {
@@ -120,13 +221,13 @@ export default {
},
deleteApplicationInput() {
this.$emit("delete");
- }
+ },
},
mounted() {
if (this.focus) {
this.doFocus();
}
- }
+ },
};
</script>
@@ -135,4 +236,3 @@ export default {
cursor: move;
}
</style>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInterfaceEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInterfaceEditor.vue
index ad6e17a..d41676a 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInterfaceEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInterfaceEditor.vue
@@ -2,56 +2,97 @@
<div>
<div class="row">
<div class="col">
- <h1 class="h4 mb-4">
- Application Interface
- </h1>
+ <h1 class="h4 mb-4">Application Interface</h1>
</div>
</div>
<div class="row">
<div class="col">
- <b-form-group label="Enable Archiving Working Directory" label-for="archive-directory">
- <b-form-radio-group id="archive-directory" v-model="data.archiveWorkingDirectory" :options="trueFalseOptions" :disabled="readonly">
+ <b-form-group
+ label="Enable Archiving Working Directory"
+ label-for="archive-directory"
+ >
+ <b-form-radio-group
+ id="archive-directory"
+ v-model="data.archiveWorkingDirectory"
+ :options="trueFalseOptions"
+ :disabled="readonly"
+ >
</b-form-radio-group>
</b-form-group>
</div>
<div class="col">
- <b-form-group label="Enable Optional File Inputs" label-for="optional-file-inputs">
- <b-form-radio-group id="optional-file-inputs" v-model="data.hasOptionalFileInputs" :options="trueFalseOptions" :disabled="true">
+ <b-form-group
+ label="Enable Optional File Inputs"
+ label-for="optional-file-inputs"
+ >
+ <b-form-radio-group
+ id="optional-file-inputs"
+ v-model="data.hasOptionalFileInputs"
+ :options="trueFalseOptions"
+ :disabled="true"
+ >
</b-form-radio-group>
- <div slot="description"><b>Removed</b>: please add an input of Type URI_COLLECTION with Required set to False instead.</div>
+ <div slot="description">
+ <b>Removed</b>: please add an input of Type URI_COLLECTION with
+ Required set to False instead.
+ </div>
</b-form-group>
</div>
</div>
<div class="row">
<div class="col">
- <h1 class="h5 mb-4">
- Input Fields
- </h1>
- <draggable v-model="data.applicationInputs" :options="dragOptions" @start="onDragStart" @end="onDragEnd">
- <application-input-field-editor v-for="input in data.applicationInputs" :value="input" :key="input.key" :focus="input.key === focusApplicationInputKey"
- :collapse="collapseApplicationInputs" @input="updatedInput" @delete="deleteInput(input)" :readonly="readonly" />
+ <h1 class="h5 mb-4">Input Fields</h1>
+ <draggable
+ v-model="data.applicationInputs"
+ :options="dragOptions"
+ @start="onDragStart"
+ @end="onDragEnd"
+ >
+ <application-input-field-editor
+ v-for="input in data.applicationInputs"
+ :value="input"
+ :key="input.key"
+ :focus="input.key === focusApplicationInputKey"
+ :collapse="collapseApplicationInputs"
+ @input="updatedInput"
+ @delete="deleteInput(input)"
+ :readonly="readonly"
+ />
</draggable>
</div>
</div>
<div class="row mb-4">
<div class="col">
- <b-button variant="secondary" @click="addApplicationInput" :disabled="readonly">
+ <b-button
+ variant="secondary"
+ @click="addApplicationInput"
+ :disabled="readonly"
+ >
Add application input
</b-button>
</div>
</div>
<div class="row">
<div class="col">
- <h1 class="h5 mb-4">
- Output Fields
- </h1>
- <application-output-field-editor v-for="output in data.applicationOutputs" :value="output" :key="output.key" :focus="output.key === focusApplicationOutputKey"
- @input="updatedOutput" @delete="deleteOutput(output)" :readonly="readonly" />
+ <h1 class="h5 mb-4">Output Fields</h1>
+ <application-output-field-editor
+ v-for="output in data.applicationOutputs"
+ :value="output"
+ :key="output.key"
+ :focus="output.key === focusApplicationOutputKey"
+ @input="updatedOutput"
+ @delete="deleteOutput(output)"
+ :readonly="readonly"
+ />
</div>
</div>
<div class="row mb-4">
<div class="col">
- <b-button variant="secondary" @click="addApplicationOutput" :disabled="readonly">
+ <b-button
+ variant="secondary"
+ @click="addApplicationOutput"
+ :disabled="readonly"
+ >
Add application output
</b-button>
</div>
@@ -61,7 +102,7 @@
<script>
import { models } from "django-airavata-api";
-import { mixins } from "django-airavata-common-ui"
+import { mixins } from "django-airavata-common-ui";
import ApplicationInputFieldEditor from "./ApplicationInputFieldEditor.vue";
import ApplicationOutputFieldEditor from "./ApplicationOutputFieldEditor.vue";
@@ -72,31 +113,34 @@ export default {
mixins: [mixins.VModelMixin],
props: {
value: {
- type: models.ApplicationInterfaceDefinition
+ type: models.ApplicationInterfaceDefinition,
},
readonly: {
type: Boolean,
- default: false
- }
+ default: false,
+ },
},
components: {
ApplicationInputFieldEditor,
ApplicationOutputFieldEditor,
- draggable
+ draggable,
},
computed: {
trueFalseOptions() {
- return [{ text: "True", value: true }, { text: "False", value: false }];
- }
+ return [
+ { text: "True", value: true },
+ { text: "False", value: false },
+ ];
+ },
},
data() {
return {
focusApplicationInputKey: null,
focusApplicationOutputKey: null,
dragOptions: {
- handle: ".drag-handle"
+ handle: ".drag-handle",
},
- collapseApplicationInputs: false
+ collapseApplicationInputs: false,
};
},
methods: {
@@ -108,7 +152,7 @@ export default {
},
updatedInput(newValue) {
const input = this.data.applicationInputs.find(
- input => input.key === newValue.key
+ (input) => input.key === newValue.key
);
Object.assign(input, newValue);
},
@@ -119,13 +163,13 @@ export default {
},
deleteInput(input) {
const inputIndex = this.data.applicationInputs.findIndex(
- inp => inp.key === input.key
+ (inp) => inp.key === input.key
);
this.data.applicationInputs.splice(inputIndex, 1);
},
updatedOutput(newValue) {
const output = this.data.applicationOutputs.find(
- o => o.key === newValue.key
+ (o) => o.key === newValue.key
);
Object.assign(output, newValue);
},
@@ -136,7 +180,7 @@ export default {
},
deleteOutput(output) {
const outputIndex = this.data.applicationOutputs.findIndex(
- o => o.key === output.key
+ (o) => o.key === output.key
);
this.data.applicationOutputs.splice(outputIndex, 1);
},
@@ -145,7 +189,7 @@ export default {
},
onDragEnd() {
this.collapseApplicationInputs = false;
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationModuleEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationModuleEditor.vue
index 59d5d5b..001b426 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationModuleEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationModuleEditor.vue
@@ -2,18 +2,43 @@
<div>
<div class="row">
<div class="col">
- <h1 class="h4 mb-4">
- Application Details
- </h1>
- <b-form-group label="Application Name" label-for="application-name" :invalid-feedback="validationFeedback.appModuleName.invalidFeedback"
- :state="validationFeedback.appModuleName.state">
- <b-form-input id="application-name" type="text" v-model="data.appModuleName" required :disabled="readonly" :state="validationFeedback.appModuleName.state"></b-form-input>
+ <h1 class="h4 mb-4">Application Details</h1>
+ <b-form-group
+ label="Application Name"
+ label-for="application-name"
+ :invalid-feedback="validationFeedback.appModuleName.invalidFeedback"
+ :state="validationFeedback.appModuleName.state"
+ >
+ <b-form-input
+ id="application-name"
+ type="text"
+ v-model="data.appModuleName"
+ required
+ :disabled="readonly"
+ :state="validationFeedback.appModuleName.state"
+ ></b-form-input>
</b-form-group>
- <b-form-group label="Application Version" label-for="application-version">
- <b-form-input id="application-version" type="text" v-model="data.appModuleVersion" :disabled="readonly"></b-form-input>
+ <b-form-group
+ label="Application Version"
+ label-for="application-version"
+ >
+ <b-form-input
+ id="application-version"
+ type="text"
+ v-model="data.appModuleVersion"
+ :disabled="readonly"
+ ></b-form-input>
</b-form-group>
- <b-form-group label="Application Description" label-for="application-description">
- <b-form-textarea id="application-description" v-model="data.appModuleDescription" :rows="3" :disabled="readonly"></b-form-textarea>
+ <b-form-group
+ label="Application Description"
+ label-for="application-description"
+ >
+ <b-form-textarea
+ id="application-description"
+ v-model="data.appModuleDescription"
+ :rows="3"
+ :disabled="readonly"
+ ></b-form-textarea>
</b-form-group>
</div>
</div>
@@ -29,18 +54,18 @@ export default {
mixins: [mixins.VModelMixin],
props: {
value: {
- type: models.ApplicationModule
+ type: models.ApplicationModule,
},
readonly: {
type: Boolean,
- default: false
+ default: false,
},
validationErrors: {
- type: Object
- }
+ type: Object,
+ },
},
components: {
- "delete-button": components.DeleteButton
+ "delete-button": components.DeleteButton,
},
computed: {
validationFeedback() {
@@ -48,7 +73,7 @@ export default {
this.data,
this.validationErrors
);
- }
+ },
},
methods: {
save() {
@@ -59,8 +84,7 @@ export default {
},
deleteApplicationModule() {
this.$emit("delete", this.data);
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationOutputFieldEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationOutputFieldEditor.vue
index e8a73fd..3212a73 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationOutputFieldEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationOutputFieldEditor.vue
@@ -2,36 +2,88 @@
<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">
+ <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>
- <b-form-group label="Name" :label-for="id+'-name'">
- <b-form-input :id="id+'-name'" type="text" v-model="data.name" ref="nameInput" required :disabled="readonly"></b-form-input>
+ <b-form-group label="Name" :label-for="id + '-name'">
+ <b-form-input
+ :id="id + '-name'"
+ type="text"
+ v-model="data.name"
+ ref="nameInput"
+ required
+ :disabled="readonly"
+ ></b-form-input>
</b-form-group>
- <b-form-group label="Value" :label-for="id+'-value'">
- <b-form-input :id="id+'-value'" type="text" v-model="data.value" :disabled="readonly"></b-form-input>
+ <b-form-group label="Value" :label-for="id + '-value'">
+ <b-form-input
+ :id="id + '-value'"
+ type="text"
+ v-model="data.value"
+ :disabled="readonly"
+ ></b-form-input>
</b-form-group>
- <b-form-group label="Type" :label-for="id+'-type'">
- <b-form-select :id="id+'-type'" v-model="data.type" :options="outputTypeOptions" :disabled="readonly" />
+ <b-form-group label="Type" :label-for="id + '-type'">
+ <b-form-select
+ :id="id + '-type'"
+ v-model="data.type"
+ :options="outputTypeOptions"
+ :disabled="readonly"
+ />
</b-form-group>
- <b-form-group label="Application Argument" :label-for="id+'-argument'">
- <b-form-input :id="id+'-argument'" type="text" v-model="data.applicationArgument" :disabled="readonly"></b-form-input>
+ <b-form-group label="Application Argument" :label-for="id + '-argument'">
+ <b-form-input
+ :id="id + '-argument'"
+ type="text"
+ v-model="data.applicationArgument"
+ :disabled="readonly"
+ ></b-form-input>
</b-form-group>
<div class="d-flex">
- <b-form-group class="flex-fill" label="Is Required" :label-for="id+'-required'">
- <b-form-radio-group :id="id+'-required'" v-model="data.isRequired" :options="trueFalseOptions" :disabled="readonly">
+ <b-form-group
+ class="flex-fill"
+ label="Is Required"
+ :label-for="id + '-required'"
+ >
+ <b-form-radio-group
+ :id="id + '-required'"
+ v-model="data.isRequired"
+ :options="trueFalseOptions"
+ :disabled="readonly"
+ >
</b-form-radio-group>
</b-form-group>
- <b-form-group class="flex-fill" label="Required on Command Line" :label-for="id+'-required-command-line'">
- <b-form-radio-group :id="id+'-required-command-line'" v-model="data.requiredToAddedToCommandLine" :options="trueFalseOptions"
- :disabled="readonly">
+ <b-form-group
+ class="flex-fill"
+ label="Required on Command Line"
+ :label-for="id + '-required-command-line'"
+ >
+ <b-form-radio-group
+ :id="id + '-required-command-line'"
+ v-model="data.requiredToAddedToCommandLine"
+ :options="trueFalseOptions"
+ :disabled="readonly"
+ >
</b-form-radio-group>
</b-form-group>
</div>
- <b-form-group label="Metadata" :label-for="id+'-metadata'" description="Metadata for this output, in the JSON format">
- <json-editor :id="id+'-metadata'" v-model="data.metaData" :rows="5" :disabled="readonly" />
+ <b-form-group
+ label="Metadata"
+ :label-for="id + '-metadata'"
+ description="Metadata for this output, in the JSON format"
+ >
+ <json-editor
+ :id="id + '-metadata'"
+ v-model="data.metaData"
+ :rows="5"
+ :disabled="readonly"
+ />
</b-form-group>
</b-card>
</template>
@@ -45,34 +97,37 @@ export default {
mixins: [mixins.VModelMixin],
props: {
value: {
- type: models.OutputDataObjectType
+ type: models.OutputDataObjectType,
},
focus: {
- type: Boolean
+ type: Boolean,
},
readonly: {
type: Boolean,
- default: false
- }
+ default: false,
+ },
},
components: {
- 'json-editor': JSONEditor
+ "json-editor": JSONEditor,
},
computed: {
outputTypeOptions() {
- return models.OutputDataObjectType.VALID_DATA_TYPES.map(dataType => {
+ return models.OutputDataObjectType.VALID_DATA_TYPES.map((dataType) => {
return {
value: dataType,
- text: dataType.name
+ text: dataType.name,
};
});
},
trueFalseOptions() {
- return [{ text: "True", value: true }, { text: "False", value: false }];
+ return [
+ { text: "True", value: true },
+ { text: "False", value: false },
+ ];
},
id() {
return "id-" + this.data.key;
- }
+ },
},
methods: {
doFocus() {
@@ -81,13 +136,12 @@ export default {
},
deleteApplicationOutput() {
this.$emit("delete");
- }
+ },
},
mounted() {
if (this.focus) {
this.doFocus();
}
- }
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/CommandObjectsEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/CommandObjectsEditor.vue
index 9a8e8d3..c48b051 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/CommandObjectsEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/CommandObjectsEditor.vue
@@ -1,41 +1,56 @@
<template>
<b-card :title="title" title-tag="h5">
- <b-input-group v-for="commandObject in data" :key="commandObject.key" class="mb-1">
- <b-form-input type="text" v-model="commandObject.command" required ref="commandObjectInputs" :disabled="readonly" />
+ <b-input-group
+ v-for="commandObject in data"
+ :key="commandObject.key"
+ class="mb-1"
+ >
+ <b-form-input
+ type="text"
+ v-model="commandObject.command"
+ required
+ ref="commandObjectInputs"
+ :disabled="readonly"
+ />
<b-input-group-append v-if="!readonly">
- <b-button variant="secondary" @click="deleteCommandObject(commandObject)">
+ <b-button
+ variant="secondary"
+ @click="deleteCommandObject(commandObject)"
+ >
<i class="fa fa-trash"></i>
<span class="sr-only">Delete</span>
</b-button>
</b-input-group-append>
</b-input-group>
- <b-button v-if="!readonly" variant="secondary" @click="addCommandObject">{{ addButtonLabel }}</b-button>
+ <b-button v-if="!readonly" variant="secondary" @click="addCommandObject">{{
+ addButtonLabel
+ }}</b-button>
</b-card>
</template>
<script>
import { models } from "django-airavata-api";
-import { mixins } from "django-airavata-common-ui"
+import { mixins } from "django-airavata-common-ui";
export default {
name: "command-objects-editor",
mixins: [mixins.VModelMixin],
props: {
value: {
- type: Array
+ type: Array,
},
title: {
type: String,
- required: true
+ required: true,
},
addButtonLabel: {
type: String,
- required: true
+ required: true,
},
readonly: {
type: Boolean,
- default: false
- }
+ default: false,
+ },
},
methods: {
addCommandObject() {
@@ -50,10 +65,9 @@ export default {
);
},
deleteCommandObject(commandObject) {
- const index = this.data.findIndex(cmd => cmd.key === commandObject.key);
+ const index = this.data.findIndex((cmd) => cmd.key === commandObject.key);
this.data.splice(index, 1);
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/JSONEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/JSONEditor.vue
index 88b240c..9df6015 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/JSONEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/JSONEditor.vue
@@ -1,5 +1,12 @@
<template>
- <b-form-textarea :id="id" v-model="jsonString" @input="valueChanged" :rows="rows" :disabled="disabled" :state="state" />
+ <b-form-textarea
+ :id="id"
+ v-model="jsonString"
+ @input="valueChanged"
+ :rows="rows"
+ :disabled="disabled"
+ :state="state"
+ />
</template>
<script>
@@ -11,12 +18,12 @@ export default {
},
id: String,
rows: Number,
- disabled: Boolean
+ disabled: Boolean,
},
data() {
return {
jsonString: this.value ? this.formatJSON(this.value) : null,
- state: null
+ state: null,
};
},
methods: {
@@ -35,12 +42,12 @@ export default {
} catch (e) {
this.state = false;
}
- }
+ },
},
watch: {
value(newValue) {
this.jsonString = newValue ? this.formatJSON(newValue) : null;
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/SetEnvPathsEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/SetEnvPathsEditor.vue
index 1ff0d9b..c042e2f 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/SetEnvPathsEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/SetEnvPathsEditor.vue
@@ -1,9 +1,26 @@
<template>
<b-card :title="title" title-tag="h5">
- <b-input-group v-for="setEnvPath in data" :key="setEnvPath.key" class="mb-1 align-items-center">
- <b-form-input type="text" v-model="setEnvPath.name" required placeholder="NAME" ref="nameInputs" :disabled="readonly" />
+ <b-input-group
+ v-for="setEnvPath in data"
+ :key="setEnvPath.key"
+ class="mb-1 align-items-center"
+ >
+ <b-form-input
+ type="text"
+ v-model="setEnvPath.name"
+ required
+ placeholder="NAME"
+ ref="nameInputs"
+ :disabled="readonly"
+ />
<i class="fa fa-equals mx-1"></i>
- <b-form-input type="text" v-model="setEnvPath.value" required placeholder="VALUE" :disabled="readonly" />
+ <b-form-input
+ type="text"
+ v-model="setEnvPath.value"
+ required
+ placeholder="VALUE"
+ :disabled="readonly"
+ />
<b-input-group-append v-if="!readonly">
<b-button variant="secondary" @click="deleteEnvPath(setEnvPath)">
<i class="fa fa-trash"></i>
@@ -11,33 +28,35 @@
</b-button>
</b-input-group-append>
</b-input-group>
- <b-button v-if="!readonly" variant="secondary" @click="addEnvPath">{{ addButtonLabel }}</b-button>
+ <b-button v-if="!readonly" variant="secondary" @click="addEnvPath">{{
+ addButtonLabel
+ }}</b-button>
</b-card>
</template>
<script>
import { models } from "django-airavata-api";
-import { mixins } from "django-airavata-common-ui"
+import { mixins } from "django-airavata-common-ui";
export default {
name: "set-env-paths-editor",
mixins: [mixins.VModelMixin],
props: {
value: {
- type: Array
+ type: Array,
},
title: {
type: String,
- required: true
+ required: true,
},
addButtonLabel: {
type: String,
- required: true
+ required: true,
},
readonly: {
type: Boolean,
- default: false
- }
+ default: false,
+ },
},
methods: {
addEnvPath() {
@@ -50,10 +69,9 @@ export default {
);
},
deleteEnvPath(setEnvPath) {
- const index = this.data.findIndex(env => env.key === setEnvPath.key);
+ const index = this.data.findIndex((env) => env.key === setEnvPath.key);
this.data.splice(index, 1);
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/credentials/NewPasswordCredentialModal.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/credentials/NewPasswordCredentialModal.vue
index 409c258..5a746ae 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/credentials/NewPasswordCredentialModal.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/credentials/NewPasswordCredentialModal.vue
@@ -1,20 +1,40 @@
<template>
- <b-modal title="New Password Credential" ref="modal" @ok="okClicked" ok-title="Create" :ok-disabled="!valid">
- <b-form-input type="text" placeholder="Username" required v-model="username" />
- <b-form-input type="password" placeholder="Password" required v-model="password" />
- <b-form-input type="text" placeholder="Description" required v-model="description" />
+ <b-modal
+ title="New Password Credential"
+ ref="modal"
+ @ok="okClicked"
+ ok-title="Create"
+ :ok-disabled="!valid"
+ >
+ <b-form-input
+ type="text"
+ placeholder="Username"
+ required
+ v-model="username"
+ />
+ <b-form-input
+ type="password"
+ placeholder="Password"
+ required
+ v-model="password"
+ />
+ <b-form-input
+ type="text"
+ placeholder="Description"
+ required
+ v-model="description"
+ />
</b-modal>
</template>
<script>
-
export default {
name: "new-ssh-credential-modal",
data() {
return {
username: null,
password: null,
- description: null
+ description: null,
};
},
computed: {
@@ -27,20 +47,19 @@ export default {
this.description &&
this.description.trim() !== ""
);
- }
+ },
},
methods: {
okClicked() {
this.$emit("new", {
username: this.username,
password: this.password,
- description: this.description
+ description: this.description,
});
},
show() {
this.$refs.modal.show();
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/credentials/NewSSHCredentialModal.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/credentials/NewSSHCredentialModal.vue
index 131ee74..52fc727 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/credentials/NewSSHCredentialModal.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/credentials/NewSSHCredentialModal.vue
@@ -1,22 +1,32 @@
<template>
- <b-modal title="New SSH Credential" ref="modal" @ok="okClicked" ok-title="Create" :ok-disabled="!valid">
- <b-form-input type="text" placeholder="Description" required v-model="description" />
+ <b-modal
+ title="New SSH Credential"
+ ref="modal"
+ @ok="okClicked"
+ ok-title="Create"
+ :ok-disabled="!valid"
+ >
+ <b-form-input
+ type="text"
+ placeholder="Description"
+ required
+ v-model="description"
+ />
</b-modal>
</template>
<script>
-
export default {
name: "new-ssh-credential-modal",
data() {
return {
- description: null
+ description: null,
};
},
computed: {
valid() {
return this.description != null && this.description.trim() !== "";
- }
+ },
},
methods: {
okClicked() {
@@ -24,8 +34,7 @@ export default {
},
show() {
this.$refs.modal.show();
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/credentials/SSHCredentialSelector.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/credentials/SSHCredentialSelector.vue
index 2042e23..39411fc 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/credentials/SSHCredentialSelector.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/credentials/SSHCredentialSelector.vue
@@ -21,9 +21,7 @@
createCredentialDescription(defaultCredentialSummary)
}})
</span>
- <span v-else>
- Unset the default SSH credential
- </span>
+ <span v-else> Unset the default SSH credential </span>
</slot>
</option>
</b-form-select>
@@ -59,38 +57,38 @@ export default {
props: {
nullOption: {
type: Boolean,
- default: true
+ default: true,
},
// This is the default credential token that will be used if the null option is selected
nullOptionDefaultCredentialToken: {
- type: String
+ type: String,
},
nullOptionDisabled: {
type: Boolean,
- default: false
+ default: false,
},
readonly: {
type: Boolean,
- default: false
- }
+ default: false,
+ },
},
mixins: [mixins.VModelMixin],
components: {
"clipboard-copy-button": components.ClipboardCopyButton,
- "new-ssh-credential-modal": NewSSHCredentialModal
+ "new-ssh-credential-modal": NewSSHCredentialModal,
},
data() {
return {
- credentials: null
+ credentials: null,
};
},
computed: {
credentialStoreTokenOptions() {
const options = this.credentials
- ? this.credentials.map(summary => {
+ ? this.credentials.map((summary) => {
return {
value: summary.token,
- text: this.createCredentialDescription(summary)
+ text: this.createCredentialDescription(summary),
};
})
: [];
@@ -101,13 +99,13 @@ export default {
},
selectedCredential() {
return this.credentials
- ? this.credentials.find(cred => cred.token === this.data)
+ ? this.credentials.find((cred) => cred.token === this.data)
: null;
},
defaultCredentialSummary() {
return this.nullOptionDefaultCredentialToken && this.credentials
? this.credentials.find(
- cred => cred.token === this.nullOptionDefaultCredentialToken
+ (cred) => cred.token === this.nullOptionDefaultCredentialToken
)
: null;
},
@@ -117,17 +115,19 @@ export default {
: this.defaultCredentialSummary
? this.defaultCredentialSummary.publicKey.trim()
: null;
- }
+ },
},
methods: {
showNewSSHCredentialModal() {
this.$refs.newSSHCredentialModal.show();
},
createSSHCredential(data) {
- services.CredentialSummaryService.createSSH({ data: data }).then(cred => {
- this.credentials.push(cred);
- this.data = cred.token;
- });
+ services.CredentialSummaryService.createSSH({ data: data }).then(
+ (cred) => {
+ this.credentials.push(cred);
+ this.data = cred.token;
+ }
+ );
},
createCredentialDescription(summary) {
return (
@@ -137,14 +137,14 @@ export default {
? summary.description
: `No description (${summary.token})`)
);
- }
+ },
},
created() {
if (!this.credentials) {
services.CredentialSummaryService.allSSHCredentials().then(
- creds => (this.credentials = creds)
+ (creds) => (this.credentials = creds)
);
}
- }
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/ApplicationsDashboard.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/ApplicationsDashboard.vue
index bf6b3f1..5962b7f 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/ApplicationsDashboard.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/ApplicationsDashboard.vue
@@ -1,16 +1,26 @@
<template>
- <list-layout @add-new-item="newApplicationHandler" :items="sortedModules" title="Application Catalog" subtitle="Applications"
- new-item-button-text="New Application" :new-button-disabled="!isGatewayAdmin">
+ <list-layout
+ @add-new-item="newApplicationHandler"
+ :items="sortedModules"
+ title="Application Catalog"
+ subtitle="Applications"
+ new-item-button-text="New Application"
+ :new-button-disabled="!isGatewayAdmin"
+ >
<template slot="item-list" slot-scope="slotProps">
<div class="row">
- <application-card v-for="item in slotProps.items" v-bind:app-module="item" v-bind:key="item.appModuleId" v-on:app-selected="clickHandler(item)">
+ <application-card
+ v-for="item in slotProps.items"
+ v-bind:app-module="item"
+ v-bind:key="item.appModuleId"
+ v-on:app-selected="clickHandler(item)"
+ >
</application-card>
</div>
</template>
</list-layout>
</template>
<script>
-
import { layouts, components as comps } from "django-airavata-common-ui";
import { services, session, utils } from "django-airavata-api";
@@ -18,11 +28,11 @@ import { services, session, utils } from "django-airavata-api";
export default {
components: {
"application-card": comps.ApplicationCard,
- "list-layout": layouts.ListLayout
+ "list-layout": layouts.ListLayout,
},
data() {
return {
- appModules: []
+ appModules: [],
};
},
created() {
@@ -33,7 +43,7 @@ export default {
if (this.appModules) {
return utils.StringUtils.sortIgnoreCase(
this.appModules.slice(),
- a => a.appModuleName
+ (a) => a.appModuleName
);
} else {
return [];
@@ -41,13 +51,13 @@ export default {
},
isGatewayAdmin() {
return session.Session.isGatewayAdmin;
- }
+ },
},
methods: {
clickHandler(item) {
this.$router.push({
name: "application_module",
- params: { id: item.appModuleId }
+ params: { id: item.appModuleId },
});
},
newApplicationHandler() {
@@ -55,9 +65,9 @@ export default {
},
loadApplications() {
services.ApplicationModuleService.listAll().then(
- appModules => (this.appModules = appModules)
+ (appModules) => (this.appModules = appModules)
);
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/ComputeResourcePreferenceDashboard.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/ComputeResourcePreferenceDashboard.vue
index a2c1225..55c3908 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/ComputeResourcePreferenceDashboard.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/ComputeResourcePreferenceDashboard.vue
@@ -16,7 +16,10 @@
v-if="data.item.userHasWriteAccess"
:to="{
name: 'group_resource_preference',
- params: { value: data.item, id: data.item.groupResourceProfileId }
+ params: {
+ value: data.item,
+ id: data.item.groupResourceProfileId,
+ },
}"
>
Edit
@@ -28,7 +31,8 @@
@delete="removeGroupResourceProfile(data.item)"
>
Are you sure you want to delete Group Resource Profile
- <strong>{{ data.item.groupResourceProfileName }}</strong>?
+ <strong>{{ data.item.groupResourceProfileName }}</strong
+ >?
</delete-link>
</template>
</b-table>
@@ -45,53 +49,53 @@ export default {
components: {
"delete-link": components.DeleteLink,
"human-date": components.HumanDate,
- "list-layout": layouts.ListLayout
+ "list-layout": layouts.ListLayout,
},
- data: function() {
+ data: function () {
return {
groupResourceProfiles: [],
fields: [
{
label: "Name",
- key: "groupResourceProfileName"
+ key: "groupResourceProfileName",
},
{
label: "Updated",
- key: "updatedTime"
+ key: "updatedTime",
},
{
label: "Action",
- key: "action"
- }
- ]
+ key: "action",
+ },
+ ],
};
},
methods: {
- newGroupResourcePreference: function() {
+ newGroupResourcePreference: function () {
this.$router.push({
- name: "new_group_resource_preference"
+ name: "new_group_resource_preference",
});
},
- loadGroupResourceProfiles: function() {
+ loadGroupResourceProfiles: function () {
services.GroupResourceProfileService.list().then(
- groupResourceProfiles => {
+ (groupResourceProfiles) => {
this.groupResourceProfiles = groupResourceProfiles;
}
);
},
- removeGroupResourceProfile: function(groupResourceProfile) {
+ removeGroupResourceProfile: function (groupResourceProfile) {
services.GroupResourceProfileService.delete({
- lookup: groupResourceProfile.groupResourceProfileId
+ lookup: groupResourceProfile.groupResourceProfileId,
})
.then(() => services.GroupResourceProfileService.list())
.then(
- groupResourceProfiles =>
+ (groupResourceProfiles) =>
(this.groupResourceProfiles = groupResourceProfiles)
);
- }
+ },
},
- mounted: function() {
+ mounted: function () {
this.loadGroupResourceProfiles();
- }
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/CredentialStoreDashboard.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/CredentialStoreDashboard.vue
index 0bddf90..84f4e6c 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/CredentialStoreDashboard.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/CredentialStoreDashboard.vue
@@ -1,18 +1,32 @@
<template>
<div>
- <list-layout @add-new-item="showNewSSHCredentialModal" :items="sshKeys" title="SSH Credentials" new-item-button-text="New SSH Credential">
+ <list-layout
+ @add-new-item="showNewSSHCredentialModal"
+ :items="sshKeys"
+ title="SSH Credentials"
+ new-item-button-text="New SSH Credential"
+ >
<template slot="item-list" slot-scope="slotProps">
-
<b-table striped hover :fields="fields" :items="slotProps.items">
<template slot="sharing" slot-scope="data">
- <share-button :entity-id="data.item.token" :disallow-editing-admin-groups="false" :auto-add-admin-groups="false"/>
+ <share-button
+ :entity-id="data.item.token"
+ :disallow-editing-admin-groups="false"
+ :auto-add-admin-groups="false"
+ />
</template>
<template slot="persistedTime" slot-scope="data">
- <human-date :date="data.value"/>
+ <human-date :date="data.value" />
</template>
<template slot="action" slot-scope="data">
- <clipboard-copy-link :text="data.item.publicKey.trim()" class="mr-1" />
- <delete-link v-if="data.item.userHasWriteAccess" @delete="deleteSSHCredential(data.item)">
+ <clipboard-copy-link
+ :text="data.item.publicKey.trim()"
+ class="mr-1"
+ />
+ <delete-link
+ v-if="data.item.userHasWriteAccess"
+ @delete="deleteSSHCredential(data.item)"
+ >
Are you sure you want to delete the
<strong>{{ data.item.description }}</strong> SSH credential?
</delete-link>
@@ -20,7 +34,10 @@
</b-table>
</template>
</list-layout>
- <new-ssh-credential-modal ref="newSSHCredentialModal" @new="createNewSSHCredential" />
+ <new-ssh-credential-modal
+ ref="newSSHCredentialModal"
+ @new="createNewSSHCredential"
+ />
<!--
<list-layout class="mt-4" @add-new-item="showNewPasswordCredentialModal" :items="passwordCredentials" title="Password Credentials"
new-item-button-text="New Password Credential">
@@ -58,16 +75,16 @@ export default {
"clipboard-copy-link": components.ClipboardCopyLink,
// "new-password-credential-modal": NewPasswordCredentialModal,
"new-ssh-credential-modal": NewSSHCredentialModal,
- "share-button": components.ShareButton
+ "share-button": components.ShareButton,
},
- created: function() {
+ created: function () {
this.fetchSSHKeys();
this.fetchPasswordCredentials();
},
- data: function() {
+ data: function () {
return {
sshKeys: [],
- passwordCredentials: []
+ passwordCredentials: [],
};
},
computed: {
@@ -75,11 +92,11 @@ export default {
return [
{
label: "Description",
- key: "description"
+ key: "description",
},
{
label: "User",
- key: "username"
+ key: "username",
},
{
label: "Created",
@@ -87,24 +104,24 @@ export default {
},
{
label: "Sharing",
- key: "sharing"
+ key: "sharing",
},
{
label: "Action",
- key: "action"
- }
+ key: "action",
+ },
];
- }
+ },
},
methods: {
fetchSSHKeys() {
- services.CredentialSummaryService.allSSHCredentials().then(sshCreds => {
+ services.CredentialSummaryService.allSSHCredentials().then((sshCreds) => {
this.sshKeys = sshCreds;
});
},
fetchPasswordCredentials() {
services.CredentialSummaryService.allPasswordCredentials().then(
- passwordCreds => (this.passwordCredentials = passwordCreds)
+ (passwordCreds) => (this.passwordCredentials = passwordCreds)
);
},
showNewSSHCredentialModal() {
@@ -116,23 +133,23 @@ export default {
);
},
deleteSSHCredential(cred) {
- services.CredentialSummaryService.delete({ lookup: cred.token }).then(
- () => this.fetchSSHKeys()
- );
+ services.CredentialSummaryService.delete({
+ lookup: cred.token,
+ }).then(() => this.fetchSSHKeys());
},
showNewPasswordCredentialModal() {
this.$refs.newPasswordCredentialModal.show();
},
createNewPasswordCredential(data) {
- services.CredentialSummaryService.createPassword({ data: data }).then(
- () => this.fetchPasswordCredentials()
- );
+ services.CredentialSummaryService.createPassword({
+ data: data,
+ }).then(() => this.fetchPasswordCredentials());
},
deletePasswordCredential(cred) {
- services.CredentialSummaryService.delete({ lookup: cred.token }).then(
- () => this.fetchPasswordCredentials()
- );
- }
- }
+ services.CredentialSummaryService.delete({
+ lookup: cred.token,
+ }).then(() => this.fetchPasswordCredentials());
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/GatewayResourceProfileEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/GatewayResourceProfileEditor.vue
index cb0ac76..aa5378f 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/GatewayResourceProfileEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/GatewayResourceProfileEditor.vue
@@ -2,11 +2,17 @@
<div>
<div class="row">
<div class="col">
- <h1 class="h4 mb-4">
- Gateway Resource Profile - {{ data.gatewayID }}
- </h1>
- <b-form-group label="Default SSH Credential" label-for="default-credential-store-token" description="This is the default SSH credential that will be used for storage preferences that don't specify their own SSH credential.">
- <ssh-credential-selector id="default-credential-store-token" v-model="data.credentialStoreToken" :readonly="!data.userHasWriteAccess"/>
+ <h1 class="h4 mb-4">Gateway Resource Profile - {{ data.gatewayID }}</h1>
+ <b-form-group
+ label="Default SSH Credential"
+ label-for="default-credential-store-token"
+ description="This is the default SSH credential that will be used for storage preferences that don't specify their own SSH credential."
+ >
+ <ssh-credential-selector
+ id="default-credential-store-token"
+ v-model="data.credentialStoreToken"
+ :readonly="!data.userHasWriteAccess"
+ />
</b-form-group>
</div>
</div>
@@ -21,8 +27,7 @@ export default {
name: "gateway-resource-profile-editor",
mixins: [mixins.VModelMixin],
components: {
- "ssh-credential-selector": SSHCredentialSelector
- }
+ "ssh-credential-selector": SSHCredentialSelector,
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/GatewayResourceProfileEditorContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/GatewayResourceProfileEditorContainer.vue
index 949f30a..c634c16 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/GatewayResourceProfileEditorContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/GatewayResourceProfileEditorContainer.vue
@@ -4,7 +4,10 @@
<div class="col">
<div class="card">
<div class="card-body">
- <gateway-resource-profile-editor v-if="gatewayResourceProfile" v-model="gatewayResourceProfile" />
+ <gateway-resource-profile-editor
+ v-if="gatewayResourceProfile"
+ v-model="gatewayResourceProfile"
+ />
</div>
</div>
</div>
@@ -13,21 +16,28 @@
<div class="col">
<div class="card">
<div class="card-body">
- <storage-preference-list v-if="gatewayResourceProfile" :storagePreferences="gatewayResourceProfile.storagePreferences"
- :default-credential-store-token="gatewayResourceProfile.credentialStoreToken" @updated="updatedStoragePreference"
- @added="addedStoragePreference" @delete="deleteStoragePreference" :readonly="!gatewayResourceProfile.userHasWriteAccess"/>
+ <storage-preference-list
+ v-if="gatewayResourceProfile"
+ :storagePreferences="gatewayResourceProfile.storagePreferences"
+ :default-credential-store-token="
+ gatewayResourceProfile.credentialStoreToken
+ "
+ @updated="updatedStoragePreference"
+ @added="addedStoragePreference"
+ @delete="deleteStoragePreference"
+ :readonly="!gatewayResourceProfile.userHasWriteAccess"
+ />
</div>
</div>
</div>
</div>
- <div class="row" v-if="gatewayResourceProfile && gatewayResourceProfile.userHasWriteAccess">
+ <div
+ class="row"
+ v-if="gatewayResourceProfile && gatewayResourceProfile.userHasWriteAccess"
+ >
<div class="col">
- <b-button variant="primary" @click="save">
- Save
- </b-button>
- <b-button variant="secondary" @click="cancel">
- Cancel
- </b-button>
+ <b-button variant="primary" @click="save"> Save </b-button>
+ <b-button variant="secondary" @click="cancel"> Cancel </b-button>
</div>
</div>
</div>
@@ -42,16 +52,16 @@ export default {
name: "gateway-resource-profile-editor-container",
components: {
GatewayResourceProfileEditor,
- StoragePreferenceList
+ StoragePreferenceList,
},
data() {
return {
gatewayResourceProfile: null,
- gatewayResourceProfileClone: null
+ gatewayResourceProfileClone: null,
};
},
created() {
- services.GatewayResourceProfileService.current().then(gwp => {
+ services.GatewayResourceProfileService.current().then((gwp) => {
this.gatewayResourceProfile = gwp;
this.gatewayResourceProfileClone = gwp.clone();
});
@@ -60,8 +70,8 @@ export default {
save() {
services.GatewayResourceProfileService.update({
lookup: this.gatewayResourceProfile.gatewayID,
- data: this.gatewayResourceProfile
- }).then(gwp => {
+ data: this.gatewayResourceProfile,
+ }).then((gwp) => {
this.gatewayResourceProfile = gwp;
this.gatewayResourceProfileClone = gwp.clone();
});
@@ -71,7 +81,7 @@ export default {
},
updatedStoragePreference(updatedStoragePreference) {
const index = this.gatewayResourceProfile.storagePreferences.findIndex(
- sp =>
+ (sp) =>
sp.storageResourceId === updatedStoragePreference.storageResourceId
);
this.gatewayResourceProfile.storagePreferences.splice(
@@ -82,22 +92,21 @@ export default {
},
addedStoragePreference(newStoragePreference) {
services.StoragePreferenceService.create({
- data: newStoragePreference
- }).then(sp => {
+ data: newStoragePreference,
+ }).then((sp) => {
this.gatewayResourceProfile.storagePreferences.push(sp);
});
},
deleteStoragePreference(storageResourceId) {
services.StoragePreferenceService.delete({
- lookup: storageResourceId
+ lookup: storageResourceId,
}).then(() => {
const index = this.gatewayResourceProfile.storagePreferences.findIndex(
- sp => sp.storageResourceId === storageResourceId
+ (sp) => sp.storageResourceId === storageResourceId
);
this.gatewayResourceProfile.storagePreferences.splice(index, 1);
});
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/StoragePreferenceEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/StoragePreferenceEditor.vue
index f3a79ae..70d7525 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/StoragePreferenceEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/StoragePreferenceEditor.vue
@@ -1,21 +1,41 @@
<template>
<div>
<b-form-group label="Login username" label-for="login-username">
- <b-form-input id="login-username" v-model="data.loginUserName" type="text" />
+ <b-form-input
+ id="login-username"
+ v-model="data.loginUserName"
+ type="text"
+ />
</b-form-group>
- <b-form-group label="File System Root Location" label-for="filesystem-root-location">
- <b-form-input id="filesystem-root-location" v-model="data.fileSystemRootLocation" type="text" />
+ <b-form-group
+ label="File System Root Location"
+ label-for="filesystem-root-location"
+ >
+ <b-form-input
+ id="filesystem-root-location"
+ v-model="data.fileSystemRootLocation"
+ type="text"
+ />
</b-form-group>
- <b-form-group label="Resource Specific SSH Credential" label-for="default-credential-store-token" description="This is the SSH credential that will be used for to move data to/from this storage resource.">
- <ssh-credential-selector id="default-credential-store-token" v-model="data.resourceSpecificCredentialStoreToken"
- :null-option-default-credential-token="defaultCredentialStoreToken" :null-option-disabled="!defaultCredentialStoreToken">
+ <b-form-group
+ label="Resource Specific SSH Credential"
+ label-for="default-credential-store-token"
+ description="This is the SSH credential that will be used for to move data to/from this storage resource."
+ >
+ <ssh-credential-selector
+ id="default-credential-store-token"
+ v-model="data.resourceSpecificCredentialStoreToken"
+ :null-option-default-credential-token="defaultCredentialStoreToken"
+ :null-option-disabled="!defaultCredentialStoreToken"
+ >
<template slot="null-option-label" slot-scope="nullOptionLabelScope">
<span v-if="nullOptionLabelScope.defaultCredentialSummary">
- Use the gateway's default SSH credential ({{nullOptionLabelScope.defaultCredentialSummary.username}} - {{ nullOptionLabelScope.defaultCredentialSummary.description }})
- </span>
- <span v-else>
- Select a SSH credential
+ Use the gateway's default SSH credential ({{
+ nullOptionLabelScope.defaultCredentialSummary.username
+ }}
+ - {{ nullOptionLabelScope.defaultCredentialSummary.description }})
</span>
+ <span v-else> Select a SSH credential </span>
</template>
</ssh-credential-selector>
</b-form-group>
@@ -30,14 +50,13 @@ export default {
name: "storage-preference-editor",
mixins: [mixins.VModelMixin],
components: {
- "ssh-credential-selector": SSHCredentialSelector
+ "ssh-credential-selector": SSHCredentialSelector,
},
props: {
defaultCredentialStoreToken: {
type: String,
- required: true
- }
+ required: true,
+ },
},
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/StoragePreferenceList.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/StoragePreferenceList.vue
index b1480f6..6486ecb 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/StoragePreferenceList.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/StoragePreferenceList.vue
@@ -1,12 +1,24 @@
<template>
- <list-layout @add-new-item="addNewStoragePreference" :items="decoratedStoragePreferences" title="Storage Preferences"
- new-item-button-text="New Storage Preference" :new-button-disabled="readonly">
+ <list-layout
+ @add-new-item="addNewStoragePreference"
+ :items="decoratedStoragePreferences"
+ title="Storage Preferences"
+ new-item-button-text="New Storage Preference"
+ :new-button-disabled="readonly"
+ >
<template slot="new-item-editor">
<b-card v-if="showNewItemEditor" title="New Storage Preference">
<b-form-group label="Storage Resource" label-for="storage-resource">
- <b-form-select id="storage-resource" v-model="newStoragePreference.storageResourceId" :options="storageResourceOptions" />
+ <b-form-select
+ id="storage-resource"
+ v-model="newStoragePreference.storageResourceId"
+ :options="storageResourceOptions"
+ />
</b-form-group>
- <storage-preference-editor v-model="newStoragePreference" :default-credential-store-token="defaultCredentialStoreToken" />
+ <storage-preference-editor
+ v-model="newStoragePreference"
+ :default-credential-store-token="defaultCredentialStoreToken"
+ />
<div class="row">
<div class="col">
<b-button variant="primary" @click="saveNewStoragePreference">
@@ -20,27 +32,52 @@
</b-card>
</template>
<template slot="item-list" slot-scope="slotProps">
-
- <b-table striped hover :fields="fields" :items="slotProps.items" sort-by="storageResourceId">
+ <b-table
+ striped
+ hover
+ :fields="fields"
+ :items="slotProps.items"
+ sort-by="storageResourceId"
+ >
<template slot="resourceSpecificCredentialStoreToken" slot-scope="data">
{{ data.value }}
- <b-badge v-if="defaultCredentialStoreToken && !data.item.resourceSpecificCredentialStoreToken">
+ <b-badge
+ v-if="
+ defaultCredentialStoreToken &&
+ !data.item.resourceSpecificCredentialStoreToken
+ "
+ >
Default
</b-badge>
</template>
<template slot="action" slot-scope="data">
- <b-link v-if="!readonly" class="action-link" @click="toggleDetails(data)">
+ <b-link
+ v-if="!readonly"
+ class="action-link"
+ @click="toggleDetails(data)"
+ >
Edit
<i class="fa fa-edit" aria-hidden="true"></i>
</b-link>
- <delete-link v-if="!readonly" class="action-link" @delete="deleteStoragePreference(data.item.storageResourceId)">
- Are you sure you want to delete the storage preference for <strong>{{ getStorageResourceName(data.item.storageResourceId) }}</strong>?
+ <delete-link
+ v-if="!readonly"
+ class="action-link"
+ @delete="deleteStoragePreference(data.item.storageResourceId)"
+ >
+ Are you sure you want to delete the storage preference for
+ <strong>{{
+ getStorageResourceName(data.item.storageResourceId)
+ }}</strong
+ >?
</delete-link>
</template>
<template slot="row-details" slot-scope="row">
<b-card>
- <storage-preference-editor :value="row.item" @input="updatedStoragePreference"
- :default-credential-store-token="defaultCredentialStoreToken" />
+ <storage-preference-editor
+ :value="row.item"
+ @input="updatedStoragePreference"
+ :default-credential-store-token="defaultCredentialStoreToken"
+ />
<b-button size="sm" @click="toggleDetails(row)">Close</b-button>
</b-card>
</template>
@@ -59,20 +96,20 @@ export default {
components: {
"delete-link": components.DeleteLink,
"list-layout": layouts.ListLayout,
- StoragePreferenceEditor
+ StoragePreferenceEditor,
},
props: {
storagePreferences: {
type: Array,
- required: true
+ required: true,
},
defaultCredentialStoreToken: {
- type: String
+ type: String,
},
readonly: {
type: Boolean,
- default: false
- }
+ default: false,
+ },
},
data() {
return {
@@ -80,7 +117,7 @@ export default {
showNewItemEditor: false,
newStoragePreference: null,
storageResourceNames: null,
- credentials: null
+ credentials: null,
};
},
computed: {
@@ -90,36 +127,36 @@ export default {
label: "Name",
key: "storageResourceId",
sortable: true,
- formatter: value => this.getStorageResourceName(value)
+ formatter: (value) => this.getStorageResourceName(value),
},
{
label: "Username",
- key: "loginUserName"
+ key: "loginUserName",
},
{
label: "SSH Credential",
key: "resourceSpecificCredentialStoreToken",
- formatter: value => this.getCredentialName(value)
+ formatter: (value) => this.getCredentialName(value),
},
{
label: "File System Location",
- key: "fileSystemRootLocation"
+ key: "fileSystemRootLocation",
},
{
label: "Action",
- key: "action"
- }
+ key: "action",
+ },
];
},
decoratedStoragePreferences() {
- return this.storagePreferences.map(sp => {
+ return this.storagePreferences.map((sp) => {
const spClone = sp.clone();
spClone._showDetails = this.showingDetails[spClone.storageResourceId];
return spClone;
});
},
currentStoragePreferenceIds() {
- return this.storagePreferences.map(sp => sp.storageResourceId);
+ return this.storagePreferences.map((sp) => sp.storageResourceId);
},
storageResourceOptions() {
const options = [];
@@ -131,28 +168,28 @@ export default {
const name = this.storageResourceNames[key];
options.push({
value: key,
- text: name
+ text: name,
});
}
}
- return utils.StringUtils.sortIgnoreCase(options, a => a.text);
+ return utils.StringUtils.sortIgnoreCase(options, (a) => a.text);
},
defaultCredentialSummary() {
if (this.defaultCredentialStoreToken && this.credentials) {
return this.credentials.find(
- cred => cred.token === this.defaultCredentialStoreToken
+ (cred) => cred.token === this.defaultCredentialStoreToken
);
} else {
return null;
}
- }
+ },
},
created() {
- services.StorageResourceService.names().then(names => {
+ services.StorageResourceService.names().then((names) => {
this.storageResourceNames = names;
});
services.CredentialSummaryService.allSSHCredentials().then(
- creds => (this.credentials = creds)
+ (creds) => (this.credentials = creds)
);
},
methods: {
@@ -170,7 +207,7 @@ export default {
if (token === null && this.defaultCredentialSummary) {
return this.defaultCredentialSummary.description;
} else if (this.credentials) {
- const cred = this.credentials.find(cred => cred.token === token);
+ const cred = this.credentials.find((cred) => cred.token === token);
if (cred) {
return cred.description;
}
@@ -187,7 +224,7 @@ export default {
];
},
deleteStoragePreference(storageResourceId) {
- this.$emit('delete', storageResourceId);
+ this.$emit("delete", storageResourceId);
},
addNewStoragePreference() {
this.newStoragePreference = new models.StoragePreference();
@@ -199,7 +236,7 @@ export default {
},
cancelNewStoragePreference() {
this.showNewItemEditor = false;
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/notices/NoticeEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/notices/NoticeEditor.vue
index 415db4e..c3e634f 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/notices/NoticeEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/notices/NoticeEditor.vue
@@ -1,13 +1,9 @@
<template>
<div>
<div class="d-flex">
- <slot name="title">
- </slot>
+ <slot name="title"> </slot>
</div>
- <b-form
- @input="onUserInput"
- novalidate
- >
+ <b-form @input="onUserInput" novalidate>
<b-form-group
label="Notice Title"
label-for="notice-title"
@@ -41,17 +37,21 @@
></b-form-textarea>
</b-form-group>
- <b-form-group
- label="Publish Date"
- label-for="publish-date"
- >
+ <b-form-group label="Publish Date" label-for="publish-date">
<datetime
type="datetime"
v-model="inputPublishedTime"
input-class="my-class"
value-zone="UTC"
- :format="{ year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: '2-digit', timeZoneName: 'short' }"
- :phrases="{ok: 'Continue', cancel: 'Exit'}"
+ :format="{
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric',
+ hour: 'numeric',
+ minute: '2-digit',
+ timeZoneName: 'short',
+ }"
+ :phrases="{ ok: 'Continue', cancel: 'Exit' }"
:hour-step="1"
:minute-step="5"
:min-datetime="today"
@@ -61,24 +61,27 @@
></datetime>
</b-form-group>
- <b-form-group
- label="Expiration Date"
- label-for="expiration-date"
- >
+ <b-form-group label="Expiration Date" label-for="expiration-date">
<datetime
type="datetime"
v-model="inputExpirationTime"
input-class="my-class"
value-zone="UTC"
- :format="{ year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: '2-digit', timeZoneName: 'short' }"
- :phrases="{ok: 'Continue', cancel: 'Exit'}"
+ :format="{
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric',
+ hour: 'numeric',
+ minute: '2-digit',
+ timeZoneName: 'short',
+ }"
+ :phrases="{ ok: 'Continue', cancel: 'Exit' }"
:hour-step="1"
:minute-step="5"
:min-datetime="inputPublishedTime"
:week-start="7"
use12-hour
auto
-
></datetime>
</b-form-group>
@@ -89,20 +92,17 @@
:state="getValidationState('priority')"
>
<b-form-select
- id = "priority"
- v-model="data.priority"
- :options="select.options"
- :state="getValidationState('priority')"
+ id="priority"
+ v-model="data.priority"
+ :options="select.options"
+ :state="getValidationState('priority')"
>
</b-form-select>
</b-form-group>
- <template v-if=!editNotification name="buttons">
+ <template v-if="!editNotification" name="buttons">
<div class="row">
- <div
- id="col-exp-buttons"
- class="col"
- >
+ <div id="col-exp-buttons" class="col">
<b-button
variant="success"
@click="saveNewNotice"
@@ -110,10 +110,7 @@
>
Save
</b-button>
- <b-button
- variant="primary"
- @click="cancelNewNotice"
- >
+ <b-button variant="primary" @click="cancelNewNotice">
Cancel
</b-button>
</div>
@@ -130,28 +127,36 @@
<script>
import { models } from "django-airavata-api";
import { mixins, utils } from "django-airavata-common-ui";
-import { Datetime } from 'vue-datetime';
+import { Datetime } from "vue-datetime";
import moment from "moment";
-import 'vue-datetime/dist/vue-datetime.css'
+import "vue-datetime/dist/vue-datetime.css";
export default {
name: "notice-editor",
components: {
- datetime: Datetime
+ datetime: Datetime,
},
mixins: [mixins.VModelMixin],
props: {
value: {
type: models.Notification,
- required: true
- }
+ required: true,
+ },
},
created() {
//checks whether the component is used for editing or updating the notificaion
- if(this.value.notificationId != null){
+ if (this.value.notificationId != null) {
this.editNotification = true;
- this.inputPublishedTime = new moment(this.value.publishedTime.toISOString()).utc().format()
- this.inputExpirationTime = new moment(this.value.expirationTime.toISOString()).utc().format()
+ this.inputPublishedTime = new moment(
+ this.value.publishedTime.toISOString()
+ )
+ .utc()
+ .format();
+ this.inputExpirationTime = new moment(
+ this.value.expirationTime.toISOString()
+ )
+ .utc()
+ .format();
this.data.priority = this.value.priority.name;
this.today = new moment(this.value.expirationTime.toISOString()).format();
}
@@ -163,26 +168,24 @@ export default {
inputPublishedTime: null,
inputExpirationTime: null,
today: new moment().format(),
- select : {
- selected: "LOW",
- options: [
- { text: "LOW", value: "LOW" },
- { text: "NORMAL", value: "NORMAL" },
- { text: "HIGH", value: "HIGH" }
- ]
- }
+ select: {
+ selected: "LOW",
+ options: [
+ { text: "LOW", value: "LOW" },
+ { text: "NORMAL", value: "NORMAL" },
+ { text: "HIGH", value: "HIGH" },
+ ],
+ },
};
},
computed: {
- valid: function() {
+ valid: function () {
const validation = this.data.validate();
- return (
- Object.keys(validation).length === 0
- );
+ return Object.keys(validation).length === 0;
},
- isSaveDisabled: function() {
+ isSaveDisabled: function () {
return !this.valid;
- }
+ },
},
methods: {
onUserInput() {
@@ -192,11 +195,11 @@ export default {
reset() {
this.userBeginsInput = false;
},
- getValidationFeedback: function(properties) {
+ getValidationFeedback: function (properties) {
return utils.getProperty(this.data.validate(), properties);
},
- getValidationState: function(properties) {
- if (this.userBeginsInput == false){
+ getValidationState: function (properties) {
+ if (this.userBeginsInput == false) {
return null;
}
return this.getValidationFeedback(properties) ? "invalid" : "valid";
@@ -206,17 +209,15 @@ export default {
},
saveNewNotice() {
return this.$emit("saveNewNotice");
- }
+ },
},
watch: {
inputExpirationTime() {
this.data.expirationTime = this.inputExpirationTime;
-
},
inputPublishedTime() {
this.data.publishedTime = this.inputPublishedTime;
- }
-
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/notices/NoticesManagementContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/notices/NoticesManagementContainer.vue
index b1c0c7e..5fc098c 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/notices/NoticesManagementContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/notices/NoticesManagementContainer.vue
@@ -9,8 +9,12 @@
<div class="col">
<div class="card">
<div class="card-body">
- <list-layout @add-new-item="addNewNotice" title="Notice"
- new-item-button-text="New Notice" :new-button-disabled="!isGatewayAdmin">
+ <list-layout
+ @add-new-item="addNewNotice"
+ title="Notice"
+ new-item-button-text="New Notice"
+ :new-button-disabled="!isGatewayAdmin"
+ >
<template slot="new-item-editor">
<b-card v-if="showNewItemEditor">
<notice-editor
@@ -19,21 +23,19 @@
@cancelNewNotice="cancelNewNotice"
@saveNewNotice="saveNewNotice"
>
- <template slot="title">
- <h1 class="h4 mb-4 mr-auto">
- New Notice
- </h1>
- </template>
+ <template slot="title">
+ <h1 class="h4 mb-4 mr-auto">New Notice</h1>
+ </template>
</notice-editor>
</b-card>
</template>
<template slot="item-list" slot-scope="slotProps">
<b-table hover :fields="fields" :items="items">
<template slot="publishedTime" slot-scope="data">
- <human-date :date="data.value"/>
- </template>row
+ <human-date :date="data.value" /> </template
+ >row
<template slot="expirationTime" slot-scope="data">
- <human-date :date="data.value"/>
+ <human-date :date="data.value" />
</template>
<template slot="action" slot-scope="data">
<template v-if="data.item.userHasWriteAccess">
@@ -41,22 +43,37 @@
Edit
<i class="fa fa-edit" aria-hidden="true"></i>
</b-link>
- <delete-link @delete="deleteNotice(data.item.notificationId)">
+ <delete-link
+ @delete="deleteNotice(data.item.notificationId)"
+ >
Are you sure you want to delete the notice?
</delete-link>
</template>
</template>
<template slot="row-details" slot-scope="row">
<b-card>
- <notice-editor :value="row.item" v-model="updatedNotice" @userBeginsInput="isUserBeginInput = false">
+ <notice-editor
+ :value="row.item"
+ v-model="updatedNotice"
+ @userBeginsInput="isUserBeginInput = false"
+ >
<template slot="title">
- <h1 class="h4 mb-4 mr-auto">
- Update Notice
- </h1>
+ <h1 class="h4 mb-4 mr-auto">Update Notice</h1>
</template>
</notice-editor>
- <b-button variant="success" size="sm" @click="updateNotice()" :disabled="isUserBeginInput">Update</b-button>
- <b-button variant="primary" size="sm" @click="toggleDetails(row)">Close</b-button>
+ <b-button
+ variant="success"
+ size="sm"
+ @click="updateNotice()"
+ :disabled="isUserBeginInput"
+ >Update</b-button
+ >
+ <b-button
+ variant="primary"
+ size="sm"
+ @click="toggleDetails(row)"
+ >Close</b-button
+ >
</b-card>
</template>
</b-table>
@@ -74,7 +91,6 @@ import { models, services, session } from "django-airavata-api";
import { components, layouts } from "django-airavata-common-ui";
import NoticeEditor from "./NoticeEditor";
-
export default {
name: "notice-management-container",
data() {
@@ -86,14 +102,14 @@ export default {
};
},
components: {
- 'human-date': components.HumanDate,
+ "human-date": components.HumanDate,
"delete-link": components.DeleteLink,
"list-layout": layouts.ListLayout,
NoticeEditor,
},
created() {
services.ManageNotificationService.list().then(
- notices => (this.notices = notices)
+ (notices) => (this.notices = notices)
);
},
computed: {
@@ -101,58 +117,58 @@ export default {
return [
{
label: "Notice",
- key: "title"
+ key: "title",
},
{
label: "Message",
- key: "notificationMessage"
+ key: "notificationMessage",
},
{
label: "Publish Date",
- key: "publishedTime"
+ key: "publishedTime",
},
{
label: "Expiry Date",
- key: "expirationTime"
+ key: "expirationTime",
},
{
label: "Priority",
- key: "priority.name"
+ key: "priority.name",
},
{
label: "Action",
- key: "action"
- }
-
+ key: "action",
+ },
];
},
items() {
- return this.notices
- ? this.notices
- : [];
+ return this.notices ? this.notices : [];
},
isGatewayAdmin() {
return session.Session.isGatewayAdmin;
- }
+ },
},
methods: {
saveNewNotice() {
- services.ManageNotificationService.create({data: this.newNotice}).then(sp => {
- this.notices.push(sp);
- });
+ services.ManageNotificationService.create({ data: this.newNotice }).then(
+ (sp) => {
+ this.notices.push(sp);
+ }
+ );
this.showNewItemEditor = true;
},
updateNotice() {
const validation = this.updatedNotice.validate();
- if(Object.keys(validation).length === 0){
+ if (Object.keys(validation).length === 0) {
const index = this.notices.findIndex(
- sp =>
- sp.notificationId === this.updatedNotice.notificationId
+ (sp) => sp.notificationId === this.updatedNotice.notificationId
);
- services.ManageNotificationService.update({lookup: this.updatedNotice.notificationId,
- data: this.updatedNotice}).then(sp => {
- this.notices.splice(index,1, sp);
- });
+ services.ManageNotificationService.update({
+ lookup: this.updatedNotice.notificationId,
+ data: this.updatedNotice,
+ }).then((sp) => {
+ this.notices.splice(index, 1, sp);
+ });
}
},
cancelNewNotice() {
@@ -164,21 +180,22 @@ export default {
},
deleteNotice(notificationId) {
services.ManageNotificationService.delete({
- lookup: notificationId
+ lookup: notificationId,
}).then(() => {
const index = this.notices.findIndex(
- sp => sp.notificationId === notificationId
+ (sp) => sp.notificationId === notificationId
);
this.notices.splice(index, 1);
});
},
toggleDetails(row) {
- this.updatedNotice = new models.Notification(),
- this.updatedNotice = row.item;
+ (this.updatedNotice = new models.Notification()),
+ (this.updatedNotice = row.item);
row.toggleDetails();
- this.showingDetails[row.item.notificationId] = !this
- .showingDetails[row.item.notificationId];
- }
- }
+ this.showingDetails[row.item.notificationId] = !this.showingDetails[
+ row.item.notificationId
+ ];
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentDetailsView.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentDetailsView.vue
index 0320c49..f786544 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentDetailsView.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentDetailsView.vue
@@ -1,24 +1,22 @@
<template>
<div>
- <table
- class="table"
- v-if="fullExperiment"
- >
+ <table class="table" v-if="fullExperiment">
<tbody>
<tr>
<th scope="row">Name</th>
<td>
- <div :title="experiment.experimentId">{{ experiment.experimentName }}</div>
+ <div :title="experiment.experimentId">
+ {{ experiment.experimentName }}
+ </div>
<small class="text-muted">
- ID: {{ experiment.experimentId }}
- (<clipboard-copy-link
+ ID: {{ experiment.experimentId }} (<clipboard-copy-link
:text="experiment.experimentId"
:link-classes="['text-reset']"
>
copy
<span slot="icon"></span>
- <span slot="tooltip">Copied ID!</span>
- </clipboard-copy-link>)
+ <span slot="tooltip">Copied ID!</span> </clipboard-copy-link
+ >)
</small>
</td>
</tr>
@@ -28,7 +26,9 @@
</tr>
<tr>
<th scope="row">Project</th>
- <td v-if="fullExperiment.project">{{ fullExperiment.projectName }}</td>
+ <td v-if="fullExperiment.project">
+ {{ fullExperiment.projectName }}
+ </td>
<td v-else>
<em>You don't have access to this project.</em>
</td>
@@ -39,19 +39,21 @@
</tr>
<tr>
<th scope="row">Application</th>
- <td v-if="fullExperiment.applicationName">{{ fullExperiment.applicationName }}</td>
- <td
- v-else
- class="font-italic text-muted"
- >Unable to load interface {{ fullExperiment.experiment.executionId }}</td>
+ <td v-if="fullExperiment.applicationName">
+ {{ fullExperiment.applicationName }}
+ </td>
+ <td v-else class="font-italic text-muted">
+ Unable to load interface {{ fullExperiment.experiment.executionId }}
+ </td>
</tr>
<tr>
<th scope="row">Compute Resource</th>
- <td v-if="fullExperiment.computeHostName">{{ fullExperiment.computeHostName }}</td>
- <td
- v-else
- class="font-italic text-muted"
- >Unable to load compute resource {{ fullExperiment.resourceHostId }}</td>
+ <td v-if="fullExperiment.computeHostName">
+ {{ fullExperiment.computeHostName }}
+ </td>
+ <td v-else class="font-italic text-muted">
+ Unable to load compute resource {{ fullExperiment.resourceHostId }}
+ </td>
</tr>
<tr>
<th scope="row">Experiment Status</th>
@@ -63,181 +65,227 @@
{{ fullExperiment.experimentStatusName }}
</td>
</tr>
- <tr v-if="fullExperiment.jobDetails && fullExperiment.jobDetails.length > 0">
+ <tr
+ v-if="
+ fullExperiment.jobDetails && fullExperiment.jobDetails.length > 0
+ "
+ >
<th scope="row">Job</th>
<td>
<table class="table">
<thead>
- <th>Name</th>
- <th>ID</th>
- <th>Status</th>
- <th>Creation Time</th>
- </thead>
- <tbody>
+ <th>Name</th>
+ <th>ID</th>
+ <th>Status</th>
+ <th>Creation Time</th>
+ </thead>
+ <tbody>
+ <tr
+ v-for="(jobDetail, index) in fullExperiment.jobDetails"
+ :key="jobDetail.jobId"
+ >
+ <td>{{ jobDetail.jobName }}</td>
+ <td>{{ jobDetail.jobId }}</td>
+ <td>{{ jobDetail.jobStatusStateName }}</td>
+ <td>
+ <span :title="jobDetail.creationTime.toString()">{{
+ jobCreationTimes[index]
+ }}</span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Notification List</th>
+ <td>
+ {{
+ experiment.emailAddresses
+ ? experiment.emailAddresses.join(", ")
+ : ""
+ }}
+ </td>
+ </tr>
<tr
- v-for="(jobDetail, index) in fullExperiment.jobDetails"
- :key="jobDetail.jobId"
+ v-if="
+ fullExperiment.jobDetails && fullExperiment.jobDetails.length > 0
+ "
>
- <td>{{ jobDetail.jobName }}</td>
- <td>{{ jobDetail.jobId }}</td>
- <td>{{ jobDetail.jobStatusStateName }}</td>
+ <th scope="row">Working Dir</th>
<td>
- <span :title="jobDetail.creationTime.toString()">{{ jobCreationTimes[index] }}</span>
+ <div
+ v-for="jobDetail in fullExperiment.jobDetails"
+ :key="jobDetail.jobId"
+ >
+ {{ jobDetail.jobName }}: {{ jobDetail.workingDir }}
+ </div>
</td>
</tr>
- </tbody>
- </table>
- </td>
- </tr>
- <tr>
- <th scope="row">Notification List</th>
- <td>{{ experiment.emailAddresses
- ? experiment.emailAddresses.join(", ")
- : '' }}</td>
- </tr>
- <tr v-if="fullExperiment.jobDetails && fullExperiment.jobDetails.length > 0">
- <th scope="row">Working Dir</th>
- <td>
- <div
- v-for="jobDetail in fullExperiment.jobDetails"
- :key="jobDetail.jobId"
- >
- {{ jobDetail.jobName }}: {{ jobDetail.workingDir }}
- </div>
- </td>
- </tr>
- <tr v-if="fullExperiment.jobDetails && fullExperiment.jobDetails.length > 0">
- <th scope="row">Job Description</th>
- <td>
- <b-card
- v-for="jobDetail in fullExperiment.jobDetails"
- :key="jobDetail.jobId"
- :header="jobDetail.jobName"
+ <tr
+ v-if="
+ fullExperiment.jobDetails && fullExperiment.jobDetails.length > 0
+ "
>
- <pre>{{ jobDetail.jobDescription }}</pre>
- </b-card>
- </td>
- </tr>
- <tr>
- <th scope="row">Creation Time</th>
- <td>
- <span :title="experiment.creationTime.toString()">{{ creationTime }}</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Last Modified Time</th>
- <td>
- <span :title="fullExperiment.experimentStatus.timeOfStateChange.toString()">{{ lastModifiedTime }}</span>
- </td>
- </tr>
- <tr>
- <th scope="row">Wall Time Limit</th>
- <td>{{ experiment.userConfigurationData.computationalResourceScheduling.wallTimeLimit }} minutes</td>
- </tr>
- <tr>
- <th scope="row">CPU Count</th>
- <td>{{ experiment.userConfigurationData.computationalResourceScheduling.totalCPUCount }}</td>
- </tr>
- <tr>
- <th scope="row">Node Count</th>
- <td>{{ experiment.userConfigurationData.computationalResourceScheduling.nodeCount }}</td>
- </tr>
- <tr v-if="experiment.userConfigurationData.computationalResourceScheduling.totalPhysicalMemory">
- <th scope="row">Total Physical Memory</th>
- <td>{{ experiment.userConfigurationData.computationalResourceScheduling.totalPhysicalMemory.toLocaleString() }} MB</td>
- </tr>
- <tr>
- <th scope="row">Queue</th>
- <td>{{ experiment.userConfigurationData.computationalResourceScheduling.queueName }}</td>
- </tr>
- <tr>
- <th scope="row">Inputs</th>
- <td>
- <ul>
- <li
- v-for="input in experiment.experimentInputs"
- :key="input.name"
- >
- {{ input.name }}:
- <template v-if="input.type.isSimpleValueType">
- <span class="text-break">{{ input.value }}</span>
- </template>
- <data-product-viewer
- v-for="dp in inputDataProducts[input.name]"
- v-else-if="input.type.isFileValueType"
- :data-product="dp"
- :input-file="true"
- :key="dp.productUri"
- />
- </li>
- </ul>
- </td>
- </tr>
- <tr>
- <th scope="row">Outputs</th>
- <td>
- <ul>
- <li
- v-for="output in experiment.experimentOutputs"
- :key="output.name"
- >
- {{ output.name }}:
- <template v-if="output.type.isSimpleValueType">
- <span class="text-break">{{ output.value }}</span>
- </template>
- <data-product-viewer
- v-for="dp in outputDataProducts[output.name]"
- v-else-if="output.type.isFileValueType"
- :data-product="dp"
- :key="dp.productUri"
- />
- </li>
- </ul>
- </td>
- </tr>
- <tr v-if="storageDirLink">
- <th scope="row">Storage Directory</th>
- <td>
- <b-link :href="storageDirLink">Open</b-link>
- </td>
- </tr>
- <tr>
- <th scope="row">Errors</th>
- <td>
- <b-card
- v-for="error in experiment.errors"
- :key="error.errorId"
- header="Error"
+ <th scope="row">Job Description</th>
+ <td>
+ <b-card
+ v-for="jobDetail in fullExperiment.jobDetails"
+ :key="jobDetail.jobId"
+ :header="jobDetail.jobName"
+ >
+ <pre>{{ jobDetail.jobDescription }}</pre>
+ </b-card>
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Creation Time</th>
+ <td>
+ <span :title="experiment.creationTime.toString()">{{
+ creationTime
+ }}</span>
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Last Modified Time</th>
+ <td>
+ <span
+ :title="
+ fullExperiment.experimentStatus.timeOfStateChange.toString()
+ "
+ >{{ lastModifiedTime }}</span
+ >
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Wall Time Limit</th>
+ <td>
+ {{
+ experiment.userConfigurationData.computationalResourceScheduling
+ .wallTimeLimit
+ }}
+ minutes
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">CPU Count</th>
+ <td>
+ {{
+ experiment.userConfigurationData.computationalResourceScheduling
+ .totalCPUCount
+ }}
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Node Count</th>
+ <td>
+ {{
+ experiment.userConfigurationData.computationalResourceScheduling
+ .nodeCount
+ }}
+ </td>
+ </tr>
+ <tr
+ v-if="
+ experiment.userConfigurationData.computationalResourceScheduling
+ .totalPhysicalMemory
+ "
>
- <p>{{error.userFriendlyMessage}}</p>
- <pre class="pre-scrollable">{{error.actualErrorMessage}}</pre>
- </b-card>
- </td>
- </tr>
- <template v-if="failedJobs.length > 0">
-
- <tr
- v-for="job in failedJobs"
- :key="job.jobId"
- >
- <th scope="row">Job Submission Response</th>
- <td>
- <b-card
- v-if="job.stdOut"
- :header="job.jobName + ' STDOUT'"
- >
- <pre class="pre-scrollable">{{job.stdOut}}</pre>
- </b-card>
- <b-card
- v-if="job.stdErr"
- :header="job.jobName + ' STDERR'"
- >
- <pre class="pre-scrollable">{{job.stdErr}}</pre>
- </b-card>
- </td>
- </tr>
- </template>
- </tbody>
+ <th scope="row">Total Physical Memory</th>
+ <td>
+ {{
+ experiment.userConfigurationData.computationalResourceScheduling.totalPhysicalMemory.toLocaleString()
+ }}
+ MB
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Queue</th>
+ <td>
+ {{
+ experiment.userConfigurationData.computationalResourceScheduling
+ .queueName
+ }}
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Inputs</th>
+ <td>
+ <ul>
+ <li
+ v-for="input in experiment.experimentInputs"
+ :key="input.name"
+ >
+ {{ input.name }}:
+ <template v-if="input.type.isSimpleValueType">
+ <span class="text-break">{{ input.value }}</span>
+ </template>
+ <data-product-viewer
+ v-for="dp in inputDataProducts[input.name]"
+ v-else-if="input.type.isFileValueType"
+ :data-product="dp"
+ :input-file="true"
+ :key="dp.productUri"
+ />
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Outputs</th>
+ <td>
+ <ul>
+ <li
+ v-for="output in experiment.experimentOutputs"
+ :key="output.name"
+ >
+ {{ output.name }}:
+ <template v-if="output.type.isSimpleValueType">
+ <span class="text-break">{{ output.value }}</span>
+ </template>
+ <data-product-viewer
+ v-for="dp in outputDataProducts[output.name]"
+ v-else-if="output.type.isFileValueType"
+ :data-product="dp"
+ :key="dp.productUri"
+ />
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr v-if="storageDirLink">
+ <th scope="row">Storage Directory</th>
+ <td>
+ <b-link :href="storageDirLink">Open</b-link>
+ </td>
+ </tr>
+ <tr>
+ <th scope="row">Errors</th>
+ <td>
+ <b-card
+ v-for="error in experiment.errors"
+ :key="error.errorId"
+ header="Error"
+ >
+ <p>{{ error.userFriendlyMessage }}</p>
+ <pre class="pre-scrollable">{{ error.actualErrorMessage }}</pre>
+ </b-card>
+ </td>
+ </tr>
+ <template v-if="failedJobs.length > 0">
+ <tr v-for="job in failedJobs" :key="job.jobId">
+ <th scope="row">Job Submission Response</th>
+ <td>
+ <b-card v-if="job.stdOut" :header="job.jobName + ' STDOUT'">
+ <pre class="pre-scrollable">{{ job.stdOut }}</pre>
+ </b-card>
+ <b-card v-if="job.stdErr" :header="job.jobName + ' STDERR'">
+ <pre class="pre-scrollable">{{ job.stdErr }}</pre>
+ </b-card>
+ </td>
+ </tr>
+ </template>
+ </tbody>
</table>
<h2 class="h5 mb-3">Process Details</h2>
<b-card
@@ -254,15 +302,15 @@
<tbody>
<tr>
<th scope="row">Task Id</th>
- <td>{{task.taskId}}</td>
+ <td>{{ task.taskId }}</td>
</tr>
<tr>
<th scope="row">Task Type</th>
- <td>{{task.taskType.name}}</td>
+ <td>{{ task.taskType.name }}</td>
</tr>
<tr>
<th scope="row">Task Status</th>
- <td>{{task.latestStatus.state.name}}</td>
+ <td>{{ task.latestStatus.state.name }}</td>
</tr>
<tr>
<th scope="row">Task Status Time</th>
@@ -275,7 +323,6 @@
<td>{{ task.latestStatus.reason }}</td>
</tr>
<template v-if="task.taskErrors && task.taskErrors.length > 0">
-
<tr>
<th scope="row">Task Errors</th>
<td>
@@ -284,8 +331,10 @@
:key="error.errorId"
:header="error.errorId"
>
- <p>{{error.userFriendlyMessage}}</p>
- <pre class="pre-scrollable">{{error.actualErrorMessage}}</pre>
+ <p>{{ error.userFriendlyMessage }}</p>
+ <pre class="pre-scrollable">{{
+ error.actualErrorMessage
+ }}</pre>
</b-card>
</td>
</tr>
@@ -313,11 +362,10 @@
:key="error.errorId"
:header="'Process Error ' + error.errorId"
>
- <p>{{error.userFriendlyMessage}}</p>
- <pre class="pre-scrollable">{{error.actualErrorMessage}}</pre>
+ <p>{{ error.userFriendlyMessage }}</p>
+ <pre class="pre-scrollable">{{ error.actualErrorMessage }}</pre>
</b-card>
</b-card>
-
</div>
</template>
@@ -332,24 +380,24 @@ export default {
props: {
experiment: {
type: models.Experiment,
- required: true
- }
+ required: true,
+ },
},
components: {
"clipboard-copy-link": components.ClipboardCopyLink,
"data-product-viewer": components.DataProductViewer,
- "human-date": components.HumanDate
+ "human-date": components.HumanDate,
},
data() {
return {
- fullExperiment: null
+ fullExperiment: null,
};
},
computed: {
inputDataProducts() {
const result = {};
if (this.fullExperiment && this.fullExperiment.inputDataProducts) {
- this.fullExperiment.experiment.experimentInputs.forEach(input => {
+ this.fullExperiment.experiment.experimentInputs.forEach((input) => {
result[input.name] = this.getDataProducts(
input,
this.fullExperiment.inputDataProducts
@@ -361,7 +409,7 @@ export default {
outputDataProducts() {
const result = {};
if (this.fullExperiment && this.fullExperiment.outputDataProducts) {
- this.fullExperiment.experiment.experimentOutputs.forEach(output => {
+ this.fullExperiment.experiment.experimentOutputs.forEach((output) => {
result[output.name] = this.getDataProducts(
output,
this.fullExperiment.outputDataProducts
@@ -370,16 +418,16 @@ export default {
}
return result;
},
- creationTime: function() {
+ creationTime: function () {
return moment(this.fullExperiment.experiment.creationTime).fromNow();
},
- lastModifiedTime: function() {
+ lastModifiedTime: function () {
return moment(
this.fullExperiment.experimentStatus.timeOfStateChange
).fromNow();
},
- jobCreationTimes: function() {
- return this.fullExperiment.jobDetails.map(jobDetail =>
+ jobCreationTimes: function () {
+ return this.fullExperiment.jobDetails.map((jobDetail) =>
moment(jobDetail.creationTime).fromNow()
);
},
@@ -393,7 +441,7 @@ export default {
failedJobs() {
if (this.fullExperiment && this.fullExperiment.jobDetails) {
return this.fullExperiment.jobDetails.filter(
- job =>
+ (job) =>
this.experiment.latestStatus.state ===
models.ExperimentState.FAILED ||
job.latestJobStatus.jobState === models.JobState.FAILED
@@ -401,12 +449,12 @@ export default {
} else {
return [];
}
- }
+ },
},
created() {
services.FullExperimentService.retrieve({
- lookup: this.experiment.experimentId
- }).then(fullExperiment => (this.fullExperiment = fullExperiment));
+ lookup: this.experiment.experimentId,
+ }).then((fullExperiment) => (this.fullExperiment = fullExperiment));
},
methods: {
getDataProducts(io, collection) {
@@ -416,24 +464,26 @@ export default {
let dataProducts = null;
if (io.type === models.DataType.URI_COLLECTION) {
const dataProductURIs = io.value.split(",");
- dataProducts = dataProductURIs.map(uri =>
- collection.find(dp => dp.productUri === uri)
+ dataProducts = dataProductURIs.map((uri) =>
+ collection.find((dp) => dp.productUri === uri)
);
} else {
const dataProductURI = io.value;
dataProducts = collection.filter(
- dp => dp.productUri === dataProductURI
+ (dp) => dp.productUri === dataProductURI
);
}
- return dataProducts ? dataProducts.filter(dp => (dp ? true : false)) : [];
+ return dataProducts
+ ? dataProducts.filter((dp) => (dp ? true : false))
+ : [];
},
storageDirectory(relativePath) {
if (relativePath.startsWith("/")) {
relativePath = relativePath.substring(1);
}
return "/workspace/storage/~/" + relativePath;
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsCard.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsCard.vue
index db8a464..85eb9ae 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsCard.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsCard.vue
@@ -1,15 +1,11 @@
<template>
-
<b-card
:bg-variant="bgVariant"
body-bg-variant="white"
:header-text-variant="headerTextVariant"
class="statistics-card"
>
- <div
- slot="header"
- class="text-right"
- >
+ <div slot="header" class="text-right">
<div class="statistic-count">{{ count }}</div>
<div>{{ title }}</div>
</div>
@@ -18,10 +14,7 @@
@click="$emit('click')"
>
<slot name="link-text">
- <div
- v-for="state in states"
- :key="state.value"
- >{{ state.name }}</div>
+ <div v-for="state in states" :key="state.value">{{ state.name }}</div>
</slot>
</b-link>
</b-card>
@@ -33,29 +26,29 @@ export default {
props: {
bgVariant: {
type: String,
- default: "light"
+ default: "light",
},
headerTextVariant: {
type: String,
- default: "dark"
+ default: "dark",
},
linkVariant: {
type: String,
- default: "primary"
+ default: "primary",
},
count: {
type: Number,
- required: true
+ required: true,
},
title: {
type: String,
- required: true
+ required: true,
},
states: {
type: Array,
- default: () => []
- }
- }
+ default: () => [],
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsContainer.vue
index 01a13a7..ccb22a5 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsContainer.vue
@@ -11,34 +11,30 @@
<b-form-input
v-model="experimentId"
placeholder="Experiment ID"
- @keydown.native.enter="experimentId && showExperimentDetails(experimentId)"
+ @keydown.native.enter="
+ experimentId && showExperimentDetails(experimentId)
+ "
/>
<b-input-group-append>
<b-button
:disabled="!experimentId"
@click="showExperimentDetails(experimentId)"
variant="primary"
- >Load</b-button>
+ >Load</b-button
+ >
</b-input-group-append>
</b-input-group>
</b-form-group>
</b-card>
<b-card no-body>
- <b-tabs
- card
- v-model="activeTabIndex"
- ref="tabs"
- >
+ <b-tabs card v-model="activeTabIndex" ref="tabs">
<b-tab :title="selectedExperimentsTabTitle">
<div class="row">
<div class="col">
<b-card header="Filter Options">
<b-input-group class="w-100 mb-2">
<b-input-group-prepend is-text>
- <i
- class="fa fa-calendar-week"
- aria-hidden="true"
- ></i>
+ <i class="fa fa-calendar-week" aria-hidden="true"></i>
</b-input-group-prepend>
<flat-pickr
:value="dateRange"
@@ -50,34 +46,31 @@
<b-button
@click="getPast24Hours"
variant="outline-secondary"
- >Past 24 Hours</b-button>
- <b-button
- @click="getPastWeek"
- variant="outline-secondary"
- >Past Week</b-button>
+ >Past 24 Hours</b-button
+ >
+ <b-button @click="getPastWeek" variant="outline-secondary"
+ >Past Week</b-button
+ >
</b-input-group-append>
</b-input-group>
- <b-dropdown
- text="Add Filters"
- class="mb-2"
- >
+ <b-dropdown text="Add Filters" class="mb-2">
<b-dropdown-item
v-if="!usernameFilterEnabled"
- @click="usernameFilterEnabled=true"
- >Username</b-dropdown-item>
+ @click="usernameFilterEnabled = true"
+ >Username</b-dropdown-item
+ >
<b-dropdown-item
v-if="!applicationNameFilterEnabled"
- @click="applicationNameFilterEnabled=true"
- >Application Name</b-dropdown-item>
+ @click="applicationNameFilterEnabled = true"
+ >Application Name</b-dropdown-item
+ >
<b-dropdown-item
v-if="!hostnameFilterEnabled"
- @click="hostnameFilterEnabled=true"
- >Hostname</b-dropdown-item>
+ @click="hostnameFilterEnabled = true"
+ >Hostname</b-dropdown-item
+ >
</b-dropdown>
- <b-input-group
- v-if="usernameFilterEnabled"
- class="mb-2"
- >
+ <b-input-group v-if="usernameFilterEnabled" class="mb-2">
<b-form-input
v-model="usernameFilter"
placeholder="Username"
@@ -90,43 +83,37 @@
</b-button>
</b-input-group-append>
</b-input-group>
- <b-input-group
- v-if="applicationNameFilterEnabled"
- class="mb-2"
- >
+ <b-input-group v-if="applicationNameFilterEnabled" class="mb-2">
<b-form-select
v-model="applicationNameFilter"
:options="applicationNameOptions"
@input="loadStatistics"
>
<template slot="first">
- <option
- :value="null"
- disabled
- >Select an application to filter on</option>
+ <option :value="null" disabled>
+ Select an application to filter on
+ </option>
</template>
</b-form-select>
<b-input-group-append>
<b-button @click="removeApplicationNameFilter">
<i class="fa fa-times"></i>
- <span class="sr-only">Remove application name filter</span>
+ <span class="sr-only"
+ >Remove application name filter</span
+ >
</b-button>
</b-input-group-append>
</b-input-group>
- <b-input-group
- v-if="hostnameFilterEnabled"
- class="mb-2"
- >
+ <b-input-group v-if="hostnameFilterEnabled" class="mb-2">
<b-form-select
v-model="hostnameFilter"
:options="hostnameOptions"
@input="loadStatistics"
>
<template slot="first">
- <option
- :value="null"
- disabled
- >Select compute resource to filter on</option>
+ <option :value="null" disabled>
+ Select compute resource to filter on
+ </option>
</template>
</b-form-select>
<b-input-group-append>
@@ -142,7 +129,8 @@
@click="loadStatistics"
class="ml-auto"
variant="primary"
- >Get Statistics</b-button>
+ >Get Statistics</b-button
+ >
</div>
</template>
</b-card>
@@ -150,8 +138,10 @@
</div>
<div class="row">
<div class="col">
-
- <h2 class="h5 mb-4">Experiment Statistics from {{fromTimeDisplay}} to {{toTimeDisplay}}</h2>
+ <h2 class="h5 mb-4">
+ Experiment Statistics from {{ fromTimeDisplay }} to
+ {{ toTimeDisplay }}
+ </h2>
</div>
</div>
<div class="row">
@@ -186,7 +176,6 @@
@click="selectedExperimentSummariesKey = 'runningExperiments'"
>
</experiment-statistics-card>
-
</div>
<div class="col-lg-2 col-md-4">
<experiment-statistics-card
@@ -223,53 +212,30 @@
@click="selectedExperimentSummariesKey = 'failedExperiments'"
>
</experiment-statistics-card>
-
</div>
</div>
- <div
- class="row"
- v-if="items.length > 0"
- >
+ <div class="row" v-if="items.length > 0">
<div class="col">
<b-card>
- <b-table
- :fields="fields"
- :items="items"
- >
- <template
- slot="executionId"
- slot-scope="data"
- >
+ <b-table :fields="fields" :items="items">
+ <template slot="executionId" slot-scope="data">
<application-name :application-interface-id="data.value" />
</template>
- <template
- slot="resourceHostId"
- slot-scope="data"
- >
+ <template slot="resourceHostId" slot-scope="data">
<compute-resource-name :compute-resource-id="data.value" />
</template>
- <template
- slot="creationTime"
- slot-scope="data"
- >
+ <template slot="creationTime" slot-scope="data">
<human-date :date="data.value" />
</template>
- <template
- slot="experimentStatus"
- slot-scope="data"
- >
+ <template slot="experimentStatus" slot-scope="data">
<experiment-status-badge :status-name="data.value.name" />
</template>
- <template
- slot="actions"
- slot-scope="data"
- >
- <b-link @click="showExperimentDetails(data.item.experimentId)">
+ <template slot="actions" slot-scope="data">
+ <b-link
+ @click="showExperimentDetails(data.item.experimentId)"
+ >
View Details
- <i
- class="far fa-chart-bar"
- aria-hidden="true"
- ></i>
+ <i class="far fa-chart-bar" aria-hidden="true"></i>
</b-link>
</template>
</b-table>
@@ -322,7 +288,7 @@ export default {
mode: "range",
wrap: true,
dateFormat: "Y-m-d",
- maxDate: new Date().fp_incr(1)
+ maxDate: new Date().fp_incr(1),
},
usernameFilterEnabled: false,
usernameFilter: null,
@@ -334,7 +300,7 @@ export default {
computeResourceNames: null,
experimentDetails: [],
experimentId: null,
- activeTabIndex: 0
+ activeTabIndex: 0,
};
},
created() {
@@ -348,7 +314,7 @@ export default {
"application-name": components.ApplicationName,
"compute-resource-name": components.ComputeResourceName,
"human-date": components.HumanDate,
- "experiment-status-badge": components.ExperimentStatusBadge
+ "experiment-status-badge": components.ExperimentStatusBadge,
},
computed: {
createdStates() {
@@ -359,7 +325,7 @@ export default {
return [
models.ExperimentState.SCHEDULED,
models.ExperimentState.LAUNCHED,
- models.ExperimentState.EXECUTING
+ models.ExperimentState.EXECUTING,
];
},
completedStates() {
@@ -368,7 +334,7 @@ export default {
canceledStates() {
return [
models.ExperimentState.CANCELING,
- models.ExperimentState.CANCELED
+ models.ExperimentState.CANCELED,
];
},
failedStates() {
@@ -378,32 +344,32 @@ export default {
return [
{
key: "name",
- label: "Name"
+ label: "Name",
},
{
key: "userName",
- label: "Owner"
+ label: "Owner",
},
{
key: "executionId",
- label: "Application"
+ label: "Application",
},
{
key: "resourceHostId",
- label: "Resource"
+ label: "Resource",
},
{
key: "creationTime",
- label: "Creation Time"
+ label: "Creation Time",
},
{
key: "experimentStatus",
- label: "Status"
+ label: "Status",
},
{
key: "actions",
- label: "Actions"
- }
+ label: "Actions",
+ },
];
},
items() {
@@ -432,26 +398,26 @@ export default {
},
applicationNameOptions() {
if (this.appInterfaces) {
- const options = this.appInterfaces.map(appInterface => {
+ const options = this.appInterfaces.map((appInterface) => {
return {
value: appInterface.applicationInterfaceId,
- text: appInterface.applicationName
+ text: appInterface.applicationName,
};
});
- return utils.StringUtils.sortIgnoreCase(options, o => o.text);
+ return utils.StringUtils.sortIgnoreCase(options, (o) => o.text);
} else {
return [];
}
},
hostnameOptions() {
if (this.computeResourceNames) {
- const options = this.computeResourceNames.map(name => {
+ const options = this.computeResourceNames.map((name) => {
return {
value: name.host_id,
- text: name.host
+ text: name.host,
};
});
- return utils.StringUtils.sortIgnoreCase(options, o => o.text);
+ return utils.StringUtils.sortIgnoreCase(options, (o) => o.text);
} else {
return [];
}
@@ -476,7 +442,7 @@ export default {
} else {
return "Experiments";
}
- }
+ },
},
methods: {
dateRangeChanged(selectedDates) {
@@ -487,18 +453,18 @@ export default {
},
loadApplicationInterfaces() {
return services.ApplicationInterfaceService.list().then(
- appInterfaces => (this.appInterfaces = appInterfaces)
+ (appInterfaces) => (this.appInterfaces = appInterfaces)
);
},
loadComputeResources() {
return services.ComputeResourceService.namesList().then(
- names => (this.computeResourceNames = names)
+ (names) => (this.computeResourceNames = names)
);
},
loadStatistics() {
const requestData = {
fromTime: this.fromTime.toJSON(),
- toTime: this.toTime.toJSON()
+ toTime: this.toTime.toJSON(),
};
if (this.usernameFilterEnabled && this.usernameFilter) {
requestData["userName"] = this.usernameFilter;
@@ -510,7 +476,7 @@ export default {
requestData["resourceHostName"] = this.hostnameFilter;
}
services.ExperimentStatisticsService.get(requestData).then(
- stats => (this.experimentStatistics = stats)
+ (stats) => (this.experimentStatistics = stats)
);
},
getPast24Hours() {
@@ -529,7 +495,7 @@ export default {
updateDateRange() {
this.dateRange = [
moment(this.fromTime).format("YYYY-MM-DD"),
- moment(this.toTime).format("YYYY-MM-DD")
+ moment(this.toTime).format("YYYY-MM-DD"),
];
},
daysAgo(days) {
@@ -557,8 +523,8 @@ export default {
} else {
// TODO: maybe don't need to load the experiment first since ExperimentDetailsView will load FullExperiment?
services.ExperimentService.retrieve({
- lookup: experimentId
- }).then(exp => {
+ lookup: experimentId,
+ }).then((exp) => {
this.experimentDetails.push(exp);
this.selectExperimentDetailsTab(experimentId);
this.scrollTabsIntoView();
@@ -576,7 +542,7 @@ export default {
},
getExperimentDetailsIndex(experimentId) {
return this.experimentDetails.findIndex(
- e => e.experimentId === experimentId
+ (e) => e.experimentId === experimentId
);
},
removeExperimentDetails(experimentId) {
@@ -586,7 +552,7 @@ export default {
scrollTabsIntoView() {
// FIXME: AIRAVATA-3163: disabling since it prevents scrolling back up to the header
// this.$refs.tabs.$el.scrollIntoView();
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ActivateUserPanel.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ActivateUserPanel.vue
index 40b7385..0bbc9db 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ActivateUserPanel.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/ActivateUserPanel.vue
@@ -1,8 +1,10 @@
<template>
<b-card header="Activate User">
<p class="card-text">
- User {{ username }} has verified their login, but doesn't yet have an Airavata User Profile. Click <b>Activate</b>
- to create an Airavata User Profile for this user. This will allow the user to be assigned to groups.
+ User {{ username }} has verified their login, but doesn't yet have an
+ Airavata User Profile. Click <b>Activate</b>
+ to create an Airavata User Profile for this user. This will allow the user
+ to be assigned to groups.
</p>
<b-button @click="activate">Activate</b-button>
</b-card>
@@ -14,14 +16,13 @@ export default {
props: {
username: {
type: String,
- required: true
- }
+ required: true,
+ },
},
methods: {
activate() {
this.$emit("activate-user", this.username);
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/DeleteUserPanel.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/DeleteUserPanel.vue
index ecb59d8..a63a7a9 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/DeleteUserPanel.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/DeleteUserPanel.vue
@@ -4,7 +4,8 @@
This will remove {{ username }} from the identity service.
</p>
<delete-button @delete="deleteUser">
- Are you sure you want to delete <strong>{{ username }}</strong>?
+ Are you sure you want to delete <strong>{{ username }}</strong
+ >?
</delete-button>
</b-card>
</template>
@@ -17,17 +18,16 @@ export default {
props: {
username: {
type: String,
- required: true
- }
+ required: true,
+ },
},
components: {
- "delete-button": components.DeleteButton
+ "delete-button": components.DeleteButton,
},
methods: {
deleteUser() {
this.$emit("delete-user", this.username);
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/EnableUserPanel.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/EnableUserPanel.vue
index a81ef82..b3a5881 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/EnableUserPanel.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/EnableUserPanel.vue
@@ -1,8 +1,8 @@
<template>
<b-card header="Enable User">
<p class="card-text">
- Enable user {{ username }} to log in. By clicking <b>Enable</b> you are verifying that the user's email address
- is {{ email }}
+ Enable user {{ username }} to log in. By clicking <b>Enable</b> you are
+ verifying that the user's email address is {{ email }}
</p>
<b-button @click="enable">Enable</b-button>
</b-card>
@@ -14,18 +14,17 @@ export default {
props: {
username: {
type: String,
- required: true
+ required: true,
},
email: {
type: String,
- required: true
- }
+ required: true,
+ },
},
methods: {
enable() {
this.$emit("enable-user", this.username);
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/GroupMembershipDisplay.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/GroupMembershipDisplay.vue
index 63785dd..2af0308 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/GroupMembershipDisplay.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/GroupMembershipDisplay.vue
@@ -1,9 +1,6 @@
<template>
<span>
- <gateway-groups-badge
- v-if="adminsGroup"
- :group="adminsGroup"
- />
+ <gateway-groups-badge v-if="adminsGroup" :group="adminsGroup" />
<gateway-groups-badge
v-else-if="readOnlyAdminsGroup"
:group="readOnlyAdminsGroup"
@@ -12,10 +9,9 @@
v-else-if="defaultUsersGroup"
:group="defaultUsersGroup"
/>
- <b-badge
- v-for="group in nonGatewayGroups"
- :key="group.id"
- >{{ group.name }}</b-badge>
+ <b-badge v-for="group in nonGatewayGroups" :key="group.id">{{
+ group.name
+ }}</b-badge>
</span>
</template>
@@ -26,24 +22,24 @@ export default {
props: {
groups: {
type: Array,
- required: true
- }
+ required: true,
+ },
},
components: {
- "gateway-groups-badge": components.GatewayGroupsBadge
+ "gateway-groups-badge": components.GatewayGroupsBadge,
},
computed: {
adminsGroup() {
- return this.groups.find(g => g.isGatewayAdminsGroup);
+ return this.groups.find((g) => g.isGatewayAdminsGroup);
},
readOnlyAdminsGroup() {
- return this.groups.find(g => g.isReadOnlyGatewayAdminsGroup);
+ return this.groups.find((g) => g.isReadOnlyGatewayAdminsGroup);
},
defaultUsersGroup() {
- return this.groups.find(g => g.isDefaultGatewayUsersGroup);
+ return this.groups.find((g) => g.isDefaultGatewayUsersGroup);
},
nonGatewayGroups() {
- return this.groups.filter(g => {
+ return this.groups.filter((g) => {
return (
!g.isGatewayAdminsGroup &&
!g.isReadOnlyGatewayAdminsGroup &&
@@ -52,9 +48,8 @@ export default {
});
},
nonGatewayGroupNames() {
- return this.nonGatewayGroups.map(g => g.name).join(", ");
- }
- }
+ return this.nonGatewayGroups.map((g) => g.name).join(", ");
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/IdentityServiceUserManagementContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/IdentityServiceUserManagementContainer.vue
index 200bfd3..2fc2737 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/IdentityServiceUserManagementContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/IdentityServiceUserManagementContainer.vue
@@ -12,10 +12,9 @@
/>
<b-input-group-append>
<b-button @click="resetSearch">Reset</b-button>
- <b-button
- variant="primary"
- @click="searchUsers"
- >Search</b-button>
+ <b-button variant="primary" @click="searchUsers"
+ >Search</b-button
+ >
</b-input-group-append>
</b-input-group>
</div>
@@ -26,36 +25,22 @@
<div class="col">
<div class="card">
<div class="card-body">
- <b-table
- hover
- :fields="fields"
- :items="items"
- fixed="true"
- >
- <template
- slot="creationTime"
- slot-scope="data"
- >
+ <b-table hover :fields="fields" :items="items" fixed="true">
+ <template slot="creationTime" slot-scope="data">
<human-date :date="data.value" />
</template>
- <template
- slot="groups"
- slot-scope="data"
- >
+ <template slot="groups" slot-scope="data">
<group-membership-display :groups="data.item.groups" />
</template>
- <template
- slot="action"
- slot-scope="data"
- >
- <b-button v-if="data.item.userHasWriteAccess" @click="toggleDetails(data)">
+ <template slot="action" slot-scope="data">
+ <b-button
+ v-if="data.item.userHasWriteAccess"
+ @click="toggleDetails(data)"
+ >
Edit
</b-button>
</template>
- <template
- slot="row-details"
- slot-scope="data"
- >
+ <template slot="row-details" slot-scope="data">
<user-details-container
:iam-user-profile="data.item"
:editable-groups="editableGroups"
@@ -90,21 +75,21 @@ export default {
usersPaginator: null,
allGroups: null,
showingDetails: {},
- search: null
+ search: null,
};
},
components: {
pager: components.Pager,
"human-date": components.HumanDate,
UserDetailsContainer,
- GroupMembershipDisplay
+ GroupMembershipDisplay,
},
created() {
services.IAMUserProfileService.list({ limit: 10 }).then(
- users => (this.usersPaginator = users)
+ (users) => (this.usersPaginator = users)
);
services.GroupService.list({ limit: -1 }).then(
- groups => (this.allGroups = groups)
+ (groups) => (this.allGroups = groups)
);
},
computed: {
@@ -112,45 +97,45 @@ export default {
return [
{
label: "First Name",
- key: "firstName"
+ key: "firstName",
},
{
label: "Last Name",
- key: "lastName"
+ key: "lastName",
},
{
label: "Username",
- key: "userId"
+ key: "userId",
},
{
label: "Email",
- key: "email"
+ key: "email",
},
{
label: "Enabled",
- key: "enabled"
+ key: "enabled",
},
{
label: "Email Verified",
- key: "emailVerified"
+ key: "emailVerified",
},
{
label: "Groups",
- key: "groups"
+ key: "groups",
},
{
label: "Created",
- key: "creationTime"
+ key: "creationTime",
},
{
label: "Action",
- key: "action"
- }
+ key: "action",
+ },
];
},
items() {
return this.usersPaginator
- ? this.usersPaginator.results.map(u => {
+ ? this.usersPaginator.results.map((u) => {
const user = u.clone();
user._showDetails =
this.showingDetails[u.airavataInternalUserId] || false;
@@ -160,12 +145,12 @@ export default {
},
editableGroups() {
return this.allGroups
- ? this.allGroups.filter(g => g.isAdmin || g.isOwner)
+ ? this.allGroups.filter((g) => g.isAdmin || g.isOwner)
: [];
},
currentOffset() {
return this.usersPaginator ? this.usersPaginator.offset : 0;
- }
+ },
},
methods: {
next() {
@@ -177,7 +162,7 @@ export default {
groupsUpdated(user) {
services.IAMUserProfileService.update({
lookup: user.userId,
- data: user
+ data: user,
}).finally(() => {
this.reloadUserProfiles();
});
@@ -185,13 +170,13 @@ export default {
reloadUserProfiles() {
const params = {
limit: 10,
- offset: this.currentOffset
+ offset: this.currentOffset,
};
if (this.search) {
params["search"] = this.search;
}
services.IAMUserProfileService.list(params).then(
- users => (this.usersPaginator = users)
+ (users) => (this.usersPaginator = users)
);
},
toggleDetails(row) {
@@ -218,8 +203,7 @@ export default {
services.IAMUserProfileService.delete({ lookup: username }).finally(() =>
this.reloadUserProfiles()
);
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UnverifiedEmailUserManagementContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UnverifiedEmailUserManagementContainer.vue
index 3e10510..3a73688 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UnverifiedEmailUserManagementContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UnverifiedEmailUserManagementContainer.vue
@@ -4,30 +4,19 @@
<div class="col">
<div class="card">
<div class="card-body">
- <b-table
- hover
- :fields="fields"
- :items="items"
- fixed="true"
- >
- <template
- slot="creationTime"
- slot-scope="data"
- >
+ <b-table hover :fields="fields" :items="items" fixed="true">
+ <template slot="creationTime" slot-scope="data">
<human-date :date="data.value" />
</template>
- <template
- slot="action"
- slot-scope="data"
- >
- <b-button v-if="data.item.userHasWriteAccess" @click="toggleDetails(data)">
+ <template slot="action" slot-scope="data">
+ <b-button
+ v-if="data.item.userHasWriteAccess"
+ @click="toggleDetails(data)"
+ >
Edit
</b-button>
</template>
- <template
- slot="row-details"
- slot-scope="data"
- >
+ <template slot="row-details" slot-scope="data">
<enable-user-panel
v-if="!data.item.enabled && !data.item.emailVerified"
:username="data.item.userId"
@@ -63,18 +52,18 @@ export default {
data() {
return {
usersPaginator: null,
- showingDetails: {}
+ showingDetails: {},
};
},
components: {
pager: components.Pager,
"human-date": components.HumanDate,
EnableUserPanel,
- DeleteUserPanel
+ DeleteUserPanel,
},
created() {
services.UnverifiedEmailUserProfileService.list({ limit: 10 }).then(
- users => (this.usersPaginator = users)
+ (users) => (this.usersPaginator = users)
);
},
computed: {
@@ -82,37 +71,37 @@ export default {
return [
{
label: "First Name",
- key: "firstName"
+ key: "firstName",
},
{
label: "Last Name",
- key: "lastName"
+ key: "lastName",
},
{
label: "Username",
- key: "userId"
+ key: "userId",
},
{
label: "Email",
- key: "email"
+ key: "email",
},
{
label: "Email Verified",
- key: "emailVerified"
+ key: "emailVerified",
},
{
label: "Created",
- key: "creationTime"
+ key: "creationTime",
},
{
label: "Action",
- key: "action"
- }
+ key: "action",
+ },
];
},
items() {
return this.usersPaginator ? this.usersPaginator.results : [];
- }
+ },
},
methods: {
next() {
@@ -133,16 +122,15 @@ export default {
},
loadUnverifiedEmailUsers() {
return services.UnverifiedEmailUserProfileService.list({
- limit: 10
- }).then(users => (this.usersPaginator = users));
+ limit: 10,
+ }).then((users) => (this.usersPaginator = users));
},
toggleDetails(row) {
row.toggleDetails();
this.showingDetails[row.item.userId] = !this.showingDetails[
row.item.userId
];
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserDetailsContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserDetailsContainer.vue
index 77fab42..48b9516 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserDetailsContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserDetailsContainer.vue
@@ -7,13 +7,18 @@
:editable-groups="editableGroups"
:airavata-internal-user-id="iamUserProfile.airavataInternalUserId"
/>
- <b-button @click="groupsUpdated" variant="primary" :disabled="!areGroupsUpdated">Save</b-button>
+ <b-button
+ @click="groupsUpdated"
+ variant="primary"
+ :disabled="!areGroupsUpdated"
+ >Save</b-button
+ >
</b-card>
<activate-user-panel
v-if="
iamUserProfile.enabled &&
- iamUserProfile.emailVerified &&
- !iamUserProfile.airavataUserProfileExists
+ iamUserProfile.emailVerified &&
+ !iamUserProfile.airavataUserProfileExists
"
:username="iamUserProfile.userId"
@activate-user="$emit('enable-user', $event)"
@@ -43,42 +48,42 @@ export default {
props: {
iamUserProfile: {
type: models.IAMUserProfile,
- required: true
+ required: true,
},
editableGroups: {
type: Array,
- required: true
- }
+ required: true,
+ },
},
components: {
UserGroupMembershipEditor,
EnableUserPanel,
DeleteUserPanel,
- ActivateUserPanel
+ ActivateUserPanel,
},
data() {
return {
- localIAMUserProfile: this.iamUserProfile.clone()
+ localIAMUserProfile: this.iamUserProfile.clone(),
};
},
watch: {
iamUserProfile(newValue) {
this.localIAMUserProfile = newValue.clone();
- }
+ },
},
methods: {
groupsUpdated() {
this.$emit("groups-updated", this.localIAMUserProfile);
- }
+ },
},
computed: {
currentGroupIds() {
- const groupIds = this.iamUserProfile.groups.map(g => g.id);
+ const groupIds = this.iamUserProfile.groups.map((g) => g.id);
groupIds.sort();
return groupIds;
},
updatedGroupIds() {
- const groupIds = this.localIAMUserProfile.groups.map(g => g.id);
+ const groupIds = this.localIAMUserProfile.groups.map((g) => g.id);
groupIds.sort();
return groupIds;
},
@@ -96,7 +101,7 @@ export default {
}
}
return false;
- }
- }
+ },
+ },
};
</script>
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserGroupMembershipEditor.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserGroupMembershipEditor.vue
index ca2f4e8..40b8915 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserGroupMembershipEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserGroupMembershipEditor.vue
@@ -11,21 +11,21 @@
v-if="gatewayUsersGroupOption"
:value="gatewayUsersGroupOption.value"
:disabled="gatewayUsersGroupOption.disabled"
- >{{ gatewayUsersGroupOption.text }}
+ >{{ gatewayUsersGroupOption.text }}
<gateway-groups-badge :group="gatewayUsersGroup" />
</b-form-checkbox>
<b-form-checkbox
v-if="adminsGroupOption"
:value="adminsGroupOption.value"
:disabled="adminsGroupOption.disabled"
- >{{ adminsGroupOption.text }}
+ >{{ adminsGroupOption.text }}
<gateway-groups-badge :group="adminsGroup" />
</b-form-checkbox>
<b-form-checkbox
v-if="readOnlyAdminsGroupOption"
:value="readOnlyAdminsGroupOption.value"
:disabled="readOnlyAdminsGroupOption.disabled"
- >{{ readOnlyAdminsGroupOption.text }}
+ >{{ readOnlyAdminsGroupOption.text }}
<gateway-groups-badge :group="readOnlyAdminsGroup" />
</b-form-checkbox>
</template>
@@ -42,34 +42,34 @@ export default {
props: {
value: {
type: Array,
- required: true
+ required: true,
},
airavataInternalUserId: {
type: String,
- required: true
+ required: true,
},
editableGroups: {
type: Array,
- required: true
- }
+ required: true,
+ },
},
components: {
- "gateway-groups-badge": components.GatewayGroupsBadge
+ "gateway-groups-badge": components.GatewayGroupsBadge,
},
computed: {
selected() {
- return this.data.map(g => g.id);
+ return this.data.map((g) => g.id);
},
combinedGroups() {
const groups = {};
- this.value.concat(this.editableGroups).forEach(g => {
+ this.value.concat(this.editableGroups).forEach((g) => {
groups[g.id] = g;
});
return Object.values(groups);
},
userDefinedGroups() {
return this.combinedGroups
- ? this.combinedGroups.filter(g => {
+ ? this.combinedGroups.filter((g) => {
return (
!g.isDefaultGatewayUsersGroup &&
!g.isGatewayAdminsGroup &&
@@ -79,13 +79,13 @@ export default {
: [];
},
userDefinedGroupOptions() {
- const options = this.userDefinedGroups.map(g =>
+ const options = this.userDefinedGroups.map((g) =>
this.createGroupOption(g)
);
- return utils.StringUtils.sortIgnoreCase(options, o => o.text);
+ return utils.StringUtils.sortIgnoreCase(options, (o) => o.text);
},
gatewayUsersGroup() {
- return this.combinedGroups.find(g => g.isDefaultGatewayUsersGroup);
+ return this.combinedGroups.find((g) => g.isDefaultGatewayUsersGroup);
},
gatewayUsersGroupOption() {
return this.gatewayUsersGroup
@@ -93,35 +93,35 @@ export default {
: null;
},
adminsGroup() {
- return this.combinedGroups.find(g => g.isGatewayAdminsGroup);
+ return this.combinedGroups.find((g) => g.isGatewayAdminsGroup);
},
adminsGroupOption() {
return this.adminsGroup ? this.createGroupOption(this.adminsGroup) : null;
},
readOnlyAdminsGroup() {
- return this.combinedGroups.find(g => g.isReadOnlyGatewayAdminsGroup);
+ return this.combinedGroups.find((g) => g.isReadOnlyGatewayAdminsGroup);
},
readOnlyAdminsGroupOption() {
return this.readOnlyAdminsGroup
? this.createGroupOption(this.readOnlyAdminsGroup)
: null;
- }
+ },
},
methods: {
groupsUpdated(checkedGroups) {
// Check for added groups
for (const checkedGroupId of checkedGroups) {
- if (!this.data.find(g => g.id === checkedGroupId)) {
+ if (!this.data.find((g) => g.id === checkedGroupId)) {
const addedGroup = this.editableGroups.find(
- g => g.id === checkedGroupId
+ (g) => g.id === checkedGroupId
);
this.data.push(addedGroup);
}
}
// Check for removed groups
for (const group of this.data) {
- if (!checkedGroups.find(groupId => groupId === group.id)) {
- const groupIndex = this.data.findIndex(g => g.id === group.id);
+ if (!checkedGroups.find((groupId) => groupId === group.id)) {
+ const groupIndex = this.data.findIndex((g) => g.id === group.id);
this.data.splice(groupIndex, 1);
}
}
@@ -132,10 +132,9 @@ export default {
value: group.id,
disabled:
!group.userHasWriteAccess ||
- group.ownerId === this.airavataInternalUserId
+ group.ownerId === this.airavataInternalUserId,
};
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserManagementContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserManagementContainer.vue
index be47876..7eeeff4 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserManagementContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/UserManagementContainer.vue
@@ -7,13 +7,15 @@
<div class="col-auto">
<b-dropdown :text="menuText">
<b-dropdown-item
- :to="{ name: 'identity-service-users'}"
+ :to="{ name: 'identity-service-users' }"
:exact="true"
- >Identity Service</b-dropdown-item>
+ >Identity Service</b-dropdown-item
+ >
<b-dropdown-item
- :to="{ name: 'unverified-email-users'}"
+ :to="{ name: 'unverified-email-users' }"
:exact="true"
- >Unverified Emails</b-dropdown-item>
+ >Unverified Emails</b-dropdown-item
+ >
</b-dropdown>
</div>
</div>
@@ -33,8 +35,7 @@ export default {
} else {
return "Menu";
}
- }
- }
+ },
+ },
};
</script>
-
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/main.js b/django_airavata/apps/admin/static/django_airavata_admin/src/main.js
index 31a3644..8feb8d9 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/main.js
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/main.js
@@ -1,13 +1,13 @@
import { components, entry } from "django-airavata-common-ui";
import VueResource from "vue-resource";
import VueRouter from "vue-router";
-import VueFlatPickr from 'vue-flatpickr-component';
+import VueFlatPickr from "vue-flatpickr-component";
import App from "./App.vue";
import router from "./router";
-import 'flatpickr/dist/flatpickr.css';
+import "flatpickr/dist/flatpickr.css";
-entry(Vue => {
+entry((Vue) => {
Vue.config.productionTip = false;
Vue.use(VueResource);
@@ -15,7 +15,7 @@ entry(Vue => {
Vue.use(VueFlatPickr);
new Vue({
- render: h => h(components.MainLayout, [h(App)]),
- router
+ render: (h) => h(components.MainLayout, [h(App)]),
+ router,
}).$mount("#app");
});
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/router.js b/django_airavata/apps/admin/static/django_airavata_admin/src/router.js
index 0285672..6d803b5 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/router.js
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/router.js
@@ -13,7 +13,7 @@ import GroupComputeResourcePreference from "./components/admin/group_resource_pr
import IdentityServiceUserManagementContainer from "./components/users/IdentityServiceUserManagementContainer.vue";
import UnverifiedEmailUserManagementContainer from "./components/users/UnverifiedEmailUserManagementContainer.vue";
import UserManagementContainer from "./components/users/UserManagementContainer.vue";
-import NoticesManagementContainer from "./components/notices/NoticesManagementContainer.vue"
+import NoticesManagementContainer from "./components/notices/NoticesManagementContainer.vue";
import VueRouter from "vue-router";
const routes = [
@@ -27,11 +27,11 @@ const routes = [
{
path: "",
components: {
- module: ApplicationModuleEditor
+ module: ApplicationModuleEditor,
},
- name: "new_application_module"
- }
- ]
+ name: "new_application_module",
+ },
+ ],
},
{
path: "/applications/:id",
@@ -42,113 +42,116 @@ const routes = [
{
path: "",
components: {
- module: ApplicationModuleEditor
+ module: ApplicationModuleEditor,
},
- name: "application_module"
+ name: "application_module",
},
{
path: "interface",
components: {
- interface: ApplicationInterfaceEditor
+ interface: ApplicationInterfaceEditor,
},
- name: "application_interface"
+ name: "application_interface",
},
{
path: "deployments",
components: {
- deployments: ApplicationDeploymentsList
+ deployments: ApplicationDeploymentsList,
},
name: "application_deployments",
props: {
- deployments: true
- }
+ deployments: true,
+ },
},
{
path: "deployments/new/:hostId",
components: {
- deployment: ApplicationDeploymentEditor
+ deployment: ApplicationDeploymentEditor,
},
- name: "new_application_deployment"
+ name: "new_application_deployment",
},
{
path: "deployments/:deploymentId",
components: {
- deployment: ApplicationDeploymentEditor
+ deployment: ApplicationDeploymentEditor,
},
name: "application_deployment",
props: {
- deployment: true
- }
- }
- ]
+ deployment: true,
+ },
+ },
+ ],
},
{ path: "/applications", component: ApplicationsDashboard },
{
path: "/group-resource-profiles/new",
component: GroupComputeResourcePreference,
name: "new_group_resource_preference",
- props: true
+ props: true,
},
{
path: "/group-resource-profiles/:id",
component: GroupComputeResourcePreference,
name: "group_resource_preference",
- props: true
+ props: true,
},
{
path: "/group-resource-profiles/new/compute-preferences/:host_id",
component: ComputePreference,
name: "compute_preference_for_new_group_resource_profile",
- props: true
+ props: true,
},
{
path: "/group-resource-profiles/:id/compute-preferences/:host_id",
component: ComputePreference,
name: "compute_preference",
- props: true
+ props: true,
},
{
path: "/group-resource-profiles",
component: ComputeResourcePreferenceDashboard,
- name: "group_resource_preference_dashboard"
+ name: "group_resource_preference_dashboard",
},
{
path: "/credentials",
component: CredentialStoreDashboard,
- name: "credential_store"
+ name: "credential_store",
},
{
path: "/gateway-resource-profile",
component: GatewayResourceProfileEditorContainer,
- name: "gateway-resource-profile"
+ name: "gateway-resource-profile",
},
{
path: "/users",
component: UserManagementContainer,
name: "users",
children: [
- { path: "", component: IdentityServiceUserManagementContainer, name: "identity-service-users" },
+ {
+ path: "",
+ component: IdentityServiceUserManagementContainer,
+ name: "identity-service-users",
+ },
{
path: "unverified-email",
component: UnverifiedEmailUserManagementContainer,
- name: "unverified-email-users"
- }
- ]
+ name: "unverified-email-users",
+ },
+ ],
},
{
path: "/notices",
component: NoticesManagementContainer,
- name: "notices"
+ name: "notices",
},
{
path: "/experiment-statistics",
component: ExperimentStatisticsContainer,
- name: "experiment-statistics"
- }
-
+ name: "experiment-statistics",
+ },
];
export default new VueRouter({
mode: "history",
base: "/admin/",
- routes: routes
+ routes: routes,
});
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/static/css/admin.css b/django_airavata/apps/admin/static/django_airavata_admin/static/css/admin.css
index 8ad58ac..65fb18a 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/static/css/admin.css
+++ b/django_airavata/apps/admin/static/django_airavata_admin/static/css/admin.css
@@ -42,7 +42,7 @@ button, input[type="button"] {
.vbtn {
margin-left: 20px;
text-align: center;
- border-color: #007BFF;
+ border-color: #007bff;
border-style: solid;
border-radius: 3px;
padding-top: 5px;
@@ -58,18 +58,19 @@ button, input[type="button"] {
}
.vbtn-default {
- background-color: #007BFF;
+ background-color: #007bff;
color: white;
}
-.vbtn.vbtn-default:active, .vbtn.vbtn-cancel:active {
+.vbtn.vbtn-default:active,
+.vbtn.vbtn-cancel:active {
background-color: #f1fff3;
color: #3ca41a;
border-color: #3ca41a;
}
.vbtn-cancel {
- color: #007BFF;
+ color: #007bff;
background-color: white;
}
@@ -79,7 +80,7 @@ button, input[type="button"] {
}
.input-field-header {
- background-color: #F8F8F8;
+ background-color: #f8f8f8;
width: 100%;
padding: 15px;
border-bottom: solid 1px #dddddd;
@@ -91,17 +92,19 @@ button, input[type="button"] {
width: 100%;
}
-.fade-enter-active, .fade-leave-active {
+.fade-enter-active,
+.fade-leave-active {
transition-property: opacity;
- transition-duration: .25s;
+ transition-duration: 0.25s;
}
.fade-enter-active {
- transition-delay: .25s;
+ transition-delay: 0.25s;
}
-.fade-enter, .fade-leave-active {
- opacity: 0
+.fade-enter,
+.fade-leave-active {
+ opacity: 0;
}
.new_app {
@@ -119,7 +122,7 @@ button, input[type="button"] {
width: 120px;
margin-bottom: 15px;
border-bottom: solid #999999 1px;
- color: #007BFF;
+ color: #007bff;
}
.tab .lbl:hover {
@@ -157,14 +160,14 @@ button, input[type="button"] {
.deployment.btn {
float: right;
text-align: center;
- border-color: #007BFF;
+ border-color: #007bff;
border-style: solid;
border-radius: 3px;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 15px;
padding-right: 15px;
- color: #007BFF;
+ color: #007bff;
background-color: white;
width: auto;
float: left;
@@ -198,35 +201,32 @@ button, input[type="button"] {
display: inline-flex;
margin-right: 5px;
}
-.tab-view{
- padding:15px;
- width:100%;
+.tab-view {
+ padding: 15px;
+ width: 100%;
}
-
.interface-btn {
- color: #868E96;
- border: solid 1px #868E96;
- background-color: transparent;
- text-align: center;
- border-radius: 3px;
- padding-top: 5px;
- padding-bottom: 5px;
- padding-left: 15px;
- padding-right: 15px;
- }
-
- .interface-btn span {
- font-weight: bold;
- }
-
- .interface-btn:hover {
- background-color: rgba(0, 105, 217, 1);
- color: white;
- }
-
- .sub-section-1{
- padding-top: 40px;
- }
+ color: #868e96;
+ border: solid 1px #868e96;
+ background-color: transparent;
+ text-align: center;
+ border-radius: 3px;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ padding-left: 15px;
+ padding-right: 15px;
+}
+
+.interface-btn span {
+ font-weight: bold;
+}
+.interface-btn:hover {
+ background-color: rgba(0, 105, 217, 1);
+ color: white;
+}
+.sub-section-1 {
+ padding-top: 40px;
+}
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/static/css/main.css b/django_airavata/apps/admin/static/django_airavata_admin/static/css/main.css
index 523b230..80b2458 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/static/css/main.css
+++ b/django_airavata/apps/admin/static/django_airavata_admin/static/css/main.css
@@ -1,30 +1,38 @@
html,
body {
- height: 100%; }
+ height: 100%;
+}
body {
color: #333;
- background-color: #f7f7f7; }
+ background-color: #f7f7f7;
+}
.c-header {
display: flex;
align-items: center;
border-bottom: 1px solid #ddd;
- background-color: #ffffff; }
- .c-header__logo {
- margin-right: 1rem;
- width: 70px;
- background-color: #990000; }
- .c-header__logo svg {
- display: block; }
- .c-header__title {
- font-size: 1.25rem;
- line-height: 1; }
- .c-header__title a {
- color: #333; }
- .c-header__controls {
- margin-left: auto;
- margin-right: 2rem; }
+ background-color: #ffffff;
+}
+.c-header__logo {
+ margin-right: 1rem;
+ width: 70px;
+ background-color: #990000;
+}
+.c-header__logo svg {
+ display: block;
+}
+.c-header__title {
+ font-size: 1.25rem;
+ line-height: 1;
+}
+.c-header__title a {
+ color: #333;
+}
+.c-header__controls {
+ margin-left: auto;
+ margin-right: 2rem;
+}
.c-nav {
background-color: #444;
@@ -32,69 +40,89 @@ body {
min-height: 60px;
padding: 1rem 0;
margin-top: -1px;
- display: flex; }
- .c-nav__item {
- color: #ccc;
- font-size: 1.5rem;
- display: block;
- text-align: center;
- line-height: 1;
- flex-grow: 1; }
- .c-nav__item:hover, .c-nav__item:focus {
- color: #ffffff; }
- .c-nav__item:active {
- color: #bbb; }
- .c-nav__item.is-active {
- color: #ffffff; }
+ display: flex;
+}
+.c-nav__item {
+ color: #ccc;
+ font-size: 1.5rem;
+ display: block;
+ text-align: center;
+ line-height: 1;
+ flex-grow: 1;
+}
+.c-nav__item:hover,
+.c-nav__item:focus {
+ color: #ffffff;
+}
+.c-nav__item:active {
+ color: #bbb;
+}
+.c-nav__item.is-active {
+ color: #ffffff;
+}
@media screen and (min-width: 768px) {
.c-nav {
height: 100%;
- flex-direction: column; }
- .c-nav__item {
- flex-grow: 0;
- margin-bottom: 2rem; } }
+ flex-direction: column;
+ }
+ .c-nav__item {
+ flex-grow: 0;
+ margin-bottom: 2rem;
+ }
+}
.stage {
width: 100%;
height: 100%;
display: flex;
- flex-direction: column; }
+ flex-direction: column;
+}
@media screen and (min-width: 768px) {
.stage {
- flex-direction: row; } }
+ flex-direction: row;
+ }
+}
.main-content {
flex-grow: 1;
- padding: 1rem; }
+ padding: 1rem;
+}
.sidebar {
flex-basis: 200px;
- background-color: #ffffff; }
+ background-color: #ffffff;
+}
.sidebar-header {
padding: 1.5rem;
display: flex;
align-items: center;
- border-bottom: 1px solid #eee; }
- .sidebar-header__title {
- font-size: .825rem;
- text-transform: uppercase;
- letter-spacing: .04rem;
- margin: 0; }
- .sidebar-header__action {
- margin-left: auto;
- font-size: .825rem; }
+ border-bottom: 1px solid #eee;
+}
+.sidebar-header__title {
+ font-size: 0.825rem;
+ text-transform: uppercase;
+ letter-spacing: 0.04rem;
+ margin: 0;
+}
+.sidebar-header__action {
+ margin-left: auto;
+ font-size: 0.825rem;
+}
@media screen and (min-width: 768px) {
.sidebar {
min-width: 310px;
- border-left: 1px solid #ddd; } }
+ border-left: 1px solid #ddd;
+ }
+}
.card {
background-color: #fff;
border-radius: 4px;
border: none;
box-shadow: 0 2px 0 #eee;
- margin-bottom: 30px; }
+ margin-bottom: 30px;
+}
/**
* Make a small card text modifier so we can still use
@@ -102,23 +130,29 @@ body {
*/
.card-text--small {
line-height: 1.4;
- font-size: .825rem; }
+ font-size: 0.825rem;
+}
.card.is-disabled {
- background-color: #ddd; }
- .card.is-disabled .card-title {
- color: #999999; }
- .card.is-disabled .badge {
- background-color: #ccc;
- color: #999999; }
+ background-color: #ddd;
+}
+.card.is-disabled .card-title {
+ color: #999999;
+}
+.card.is-disabled .badge {
+ background-color: #ccc;
+ color: #999999;
+}
.card-link:hover {
text-decoration: none;
- background-color: #fafafa; }
+ background-color: #fafafa;
+}
.card.is-disabled .card-link:hover {
background-color: #ddd;
- cursor: not-allowed; }
+ cursor: not-allowed;
+}
/**
* Feed
@@ -126,20 +160,26 @@ body {
.feed {
list-style: none;
margin: 0;
- padding: 0; }
- .feed__list-item {
- padding: 1.5rem;
- border-bottom: 1px solid #eee; }
- .feed__label {
- font-size: .825rem;
- text-transform: uppercase; }
- .feed__title {
- font-size: 1rem;
- margin: 0; }
- .feed__title a {
- color: #212529; }
- .feed__item-meta {
- margin: 0;
- font-size: .825rem; }
+ padding: 0;
+}
+.feed__list-item {
+ padding: 1.5rem;
+ border-bottom: 1px solid #eee;
+}
+.feed__label {
+ font-size: 0.825rem;
+ text-transform: uppercase;
+}
+.feed__title {
+ font-size: 1rem;
+ margin: 0;
+}
+.feed__title a {
+ color: #212529;
+}
+.feed__item-meta {
+ margin: 0;
+ font-size: 0.825rem;
+}
/*# sourceMappingURL=main.css.map */
diff --git a/django_airavata/apps/admin/vue.config.js b/django_airavata/apps/admin/vue.config.js
index f3e326d..2ffde36 100644
--- a/django_airavata/apps/admin/vue.config.js
+++ b/django_airavata/apps/admin/vue.config.js
@@ -11,17 +11,17 @@ module.exports = {
loaderOptions: {
postcss: {
config: {
- path: __dirname
- }
- }
- }
+ path: __dirname,
+ },
+ },
+ },
},
configureWebpack: {
plugins: [
new BundleTracker({
filename: "webpack-stats.json",
- path: "./static/django_airavata_admin/dist/"
- })
+ path: "./static/django_airavata_admin/dist/",
+ }),
],
optimization: {
/*
@@ -35,16 +35,16 @@ module.exports = {
/* NOTE: admin doesn't have a common chunk because it only has one entry point. */
cacheGroups: {
vendors: {
- name: 'chunk-vendors',
+ name: "chunk-vendors",
test: /[\\/]node_modules[\\/]/,
priority: -10,
- chunks: 'initial'
- }
- }
- }
- }
+ chunks: "initial",
+ },
+ },
+ },
+ },
},
- chainWebpack: config => {
+ chainWebpack: (config) => {
/*
* Specify the eslint config file otherwise it complains of a missing
* config file for the ../api and ../../static/common packages
@@ -54,7 +54,7 @@ module.exports = {
config.module
.rule("eslint")
.use("eslint-loader")
- .tap(options => {
+ .tap((options) => {
options.configFile = path.resolve(__dirname, "package.json");
return options;
});
@@ -62,9 +62,9 @@ module.exports = {
devServer: {
port: 9000,
headers: {
- "Access-Control-Allow-Origin": "*"
+ "Access-Control-Allow-Origin": "*",
},
hot: true,
- hotOnly: true
- }
+ hotOnly: true,
+ },
};
diff --git a/django_airavata/apps/api/README.md b/django_airavata/apps/api/README.md
index 5d14cd7..099f287 100644
--- a/django_airavata/apps/api/README.md
+++ b/django_airavata/apps/api/README.md
@@ -1,4 +1,4 @@
# django-airavata-api
-Model and REST API Service classes for the [Airavata Django
-portal](https://github.com/apache/airavata-django-portal).
\ No newline at end of file
+Model and REST API Service classes for the
+[Airavata Django portal](https://github.com/apache/airavata-django-portal).
diff --git a/django_airavata/apps/api/babel.config.js b/django_airavata/apps/api/babel.config.js
index 17c7e92..36454ec 100644
--- a/django_airavata/apps/api/babel.config.js
+++ b/django_airavata/apps/api/babel.config.js
@@ -4,9 +4,9 @@ const presets = [
[
"@babel/preset-env",
{
- useBuiltIns: "usage"
- }
- ]
+ useBuiltIns: "usage",
+ },
+ ],
];
const plugins = ["@babel/plugin-transform-runtime"];
@@ -15,7 +15,7 @@ module.exports = {
plugins,
env: {
test: {
- presets: ["@babel/preset-env"]
- }
- }
+ presets: ["@babel/preset-env"],
+ },
+ },
};
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/errors/ErrorReporter.js b/django_airavata/apps/api/static/django_airavata_api/js/errors/ErrorReporter.js
index 1c34e44..a1e26b1 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/errors/ErrorReporter.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/errors/ErrorReporter.js
@@ -8,23 +8,23 @@ class ErrorReporter {
console.log(JSON.stringify(unhandledError, null, 4)); // eslint-disable-line no-console
StackTrace.fromError(unhandledError.error)
- .then(stackframes => {
- const stacktrace = stackframes.map(sf => sf.toString());
+ .then((stackframes) => {
+ const stacktrace = stackframes.map((sf) => sf.toString());
services.LoggingService.send(
{
data: new LogRecord({
level: "ERROR",
message: unhandledError.message,
details: unhandledError.details,
- stacktrace: stacktrace
- })
+ stacktrace: stacktrace,
+ }),
},
{ ignoreErrors: true }
- ).catch(err => {
+ ).catch((err) => {
console.log("Failed to log error", err); // eslint-disable-line no-console
});
})
- .catch(err => {
+ .catch((err) => {
console.log("Failed to produce stacktrace", err); // eslint-disable-line no-console
});
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/errors/ErrorUtils.js b/django_airavata/apps/api/static/django_airavata_api/js/errors/ErrorUtils.js
index 80d3dba..e4f62bb 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/errors/ErrorUtils.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/errors/ErrorUtils.js
@@ -18,5 +18,5 @@ export default {
},
isUnauthorizedError(error) {
return this.isAPIException(error) && error.details.status === 403;
- }
+ },
};
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/errors/UnhandledError.js b/django_airavata/apps/api/static/django_airavata_api/js/errors/UnhandledError.js
index 53524c6..fbde9a2 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/errors/UnhandledError.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/errors/UnhandledError.js
@@ -1,15 +1,20 @@
-
let idSequence = 0;
class UnhandledError {
- constructor({message = null, error = null, details = null, suppressDisplay = false, suppressLogging = false}) {
- this.id = idSequence++;
- this.message = message;
- this.error = error;
- this.details = details;
- this.suppressDisplay = suppressDisplay;
- this.suppressLogging = suppressLogging;
- this.createdDate = new Date();
- }
+ constructor({
+ message = null,
+ error = null,
+ details = null,
+ suppressDisplay = false,
+ suppressLogging = false,
+ }) {
+ this.id = idSequence++;
+ this.message = message;
+ this.error = error;
+ this.details = details;
+ this.suppressDisplay = suppressDisplay;
+ this.suppressLogging = suppressLogging;
+ this.createdDate = new Date();
+ }
}
export default UnhandledError;
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/errors/UnhandledErrorDispatcher.js b/django_airavata/apps/api/static/django_airavata_api/js/errors/UnhandledErrorDispatcher.js
index 32f434d..35074fd 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/errors/UnhandledErrorDispatcher.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/errors/UnhandledErrorDispatcher.js
@@ -8,14 +8,14 @@ class UnhandledErrorDispatcher {
error = null,
details = null,
suppressDisplay = false,
- suppressLogging = false
+ suppressLogging = false,
}) {
const unhandledError = new UnhandledError({
message,
error,
details,
suppressDisplay,
- suppressLogging
+ suppressLogging,
});
this.reportUnhandledError(unhandledError);
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/errors/UnhandledErrorDisplayList.js b/django_airavata/apps/api/static/django_airavata_api/js/errors/UnhandledErrorDisplayList.js
index 411beb9..35d952f 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/errors/UnhandledErrorDisplayList.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/errors/UnhandledErrorDisplayList.js
@@ -1,21 +1,20 @@
-
class UnhandledErrorDisplayList {
- constructor() {
- this.unhandledErrors = [];
- }
+ constructor() {
+ this.unhandledErrors = [];
+ }
- add(unhandledError) {
- this.unhandledErrors.push(unhandledError);
- }
+ add(unhandledError) {
+ this.unhandledErrors.push(unhandledError);
+ }
- remove(unhandledError) {
- const i = this.unhandledErrors.indexOf(unhandledError);
- this.unhandledErrors.splice(i, 1);
- }
+ remove(unhandledError) {
+ const i = this.unhandledErrors.indexOf(unhandledError);
+ this.unhandledErrors.splice(i, 1);
+ }
- get list() {
- return this.unhandledErrors;
- }
+ get list() {
+ return this.unhandledErrors;
+ }
}
export default new UnhandledErrorDisplayList();
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/index.js b/django_airavata/apps/api/static/django_airavata_api/js/index.js
index a6be8d5..a8d1581 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/index.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/index.js
@@ -57,7 +57,7 @@ const errors = {
ErrorUtils,
UnhandledError,
UnhandledErrorDispatcher,
- UnhandledErrorDisplayList
+ UnhandledErrorDisplayList,
};
const models = {
@@ -93,7 +93,7 @@ const models = {
SharedEntity,
StoragePreference,
SummaryType,
- UserPermission
+ UserPermission,
};
const services = {
@@ -139,17 +139,17 @@ const services = {
),
UserProfileService: ServiceFactory.service("UserProfiles"),
UserStoragePathService: ServiceFactory.service("UserStoragePaths"),
- WorkspacePreferencesService: ServiceFactory.service("WorkspacePreferences")
+ WorkspacePreferencesService: ServiceFactory.service("WorkspacePreferences"),
};
const session = {
- Session
+ Session,
};
const utils = {
FetchUtils,
PaginationIterator,
- StringUtils
+ StringUtils,
};
export default {
@@ -157,7 +157,7 @@ export default {
models,
services,
session,
- utils
+ utils,
};
export { errors, models, services, session, utils };
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ApplicationDeploymentDescription.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ApplicationDeploymentDescription.js
index e660cfe..87561c5 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ApplicationDeploymentDescription.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ApplicationDeploymentDescription.js
@@ -1,64 +1,62 @@
-import BaseModel from './BaseModel'
-import ParallelismType from './ParallelismType';
-import CommandObject from './CommandObject';
-import SetEnvPaths from './SetEnvPaths';
-
+import BaseModel from "./BaseModel";
+import ParallelismType from "./ParallelismType";
+import CommandObject from "./CommandObject";
+import SetEnvPaths from "./SetEnvPaths";
const FIELDS = [
- 'appDeploymentId',
- 'appModuleId',
- 'computeHostId',
- 'executablePath',
+ "appDeploymentId",
+ "appModuleId",
+ "computeHostId",
+ "executablePath",
{
- name: 'parallelism',
+ name: "parallelism",
type: ParallelismType,
default: ParallelismType.SERIAL,
},
- 'appDeploymentDescription',
+ "appDeploymentDescription",
{
- name: 'moduleLoadCmds',
+ name: "moduleLoadCmds",
type: CommandObject,
list: true,
},
{
- name: 'libPrependPaths',
+ name: "libPrependPaths",
type: SetEnvPaths,
list: true,
},
{
- name: 'libAppendPaths',
+ name: "libAppendPaths",
type: SetEnvPaths,
list: true,
},
{
- name: 'setEnvironment',
+ name: "setEnvironment",
type: SetEnvPaths,
list: true,
},
{
- name: 'preJobCommands',
+ name: "preJobCommands",
type: CommandObject,
list: true,
},
{
- name: 'postJobCommands',
+ name: "postJobCommands",
type: CommandObject,
list: true,
},
- 'defaultQueueName',
- 'defaultNodeCount',
- 'defaultCPUCount',
- 'defaultWalltime',
+ "defaultQueueName",
+ "defaultNodeCount",
+ "defaultCPUCount",
+ "defaultWalltime",
{
- name: 'editableByUser',
- type: 'boolean',
+ name: "editableByUser",
+ type: "boolean",
default: false,
},
- 'userHasWriteAccess'
+ "userHasWriteAccess",
];
export default class ApplicationDeploymentDescription extends BaseModel {
-
constructor(data = {}) {
super(FIELDS, data);
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ApplicationInterfaceDefinition.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ApplicationInterfaceDefinition.js
index d71e6f0..5fe19cb 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ApplicationInterfaceDefinition.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ApplicationInterfaceDefinition.js
@@ -11,7 +11,7 @@ const FIELDS = [
{
name: "applicationModules",
type: "string",
- list: true
+ list: true,
},
// When saving/updating, the order of the inputs in the applicationInputs
// array determines the 'inputOrder' that will be applied to each input on the
@@ -20,24 +20,24 @@ const FIELDS = [
name: "applicationInputs",
type: InputDataObjectType,
list: true,
- default: BaseModel.defaultNewInstance(Array)
+ default: BaseModel.defaultNewInstance(Array),
},
{
name: "applicationOutputs",
type: OutputDataObjectType,
- list: true
+ list: true,
},
{
name: "archiveWorkingDirectory",
type: "boolean",
- default: false
+ default: false,
},
{
name: "hasOptionalFileInputs",
type: "boolean",
- default: false
+ default: false,
},
- "userHasWriteAccess"
+ "userHasWriteAccess",
];
export default class ApplicationInterfaceDefinition extends BaseModel {
@@ -52,9 +52,9 @@ export default class ApplicationInterfaceDefinition extends BaseModel {
isRequired: true,
metaData: {
"file-metadata": {
- "mime-type": "text/plain"
- }
- }
+ "mime-type": "text/plain",
+ },
+ },
});
const stderr = new OutputDataObjectType({
name: "Standard-Error",
@@ -62,9 +62,9 @@ export default class ApplicationInterfaceDefinition extends BaseModel {
isRequired: true,
metaData: {
"file-metadata": {
- "mime-type": "text/plain"
- }
- }
+ "mime-type": "text/plain",
+ },
+ },
});
if (!this.applicationOutputs) {
this.applicationOutputs = [];
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ApplicationModule.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ApplicationModule.js
index b3f01cc..b7fe38c 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ApplicationModule.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ApplicationModule.js
@@ -1,11 +1,11 @@
-import BaseModel from './BaseModel';
+import BaseModel from "./BaseModel";
const FIELDS = [
- 'appModuleId',
- 'appModuleName',
- 'appModuleVersion',
- 'appModuleDescription',
- 'userHasWriteAccess',
+ "appModuleId",
+ "appModuleName",
+ "appModuleVersion",
+ "appModuleDescription",
+ "userHasWriteAccess",
];
export default class ApplicationModule extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/BaseEnum.js b/django_airavata/apps/api/static/django_airavata_api/js/models/BaseEnum.js
index d6d9f07..b48822d 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/BaseEnum.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/BaseEnum.js
@@ -1,27 +1,30 @@
-
export default class BaseEnum {
- // TODO: add parameter
- constructor(name, value, writeName=false) {
- this.name = name;
- this.value = value;
- this.writeName = writeName;
- // immutable
- Object.freeze(this);
- }
- toJSON() {
- return this.writeName ? this.name : this.value;
- }
- static byName(name) {
- return this.values.find(x => x.name === name);
- }
- static byValue(value) {
- return this.values.find(x => x.value === value);
- }
- // This must be called to initialize static methods on the Enum subclass
- static init(names, writeName=false) {
- const enums = names.map((name, index) => new this(name, index, writeName));
- Object.freeze(enums);
- Object.defineProperty(this, 'values', {get: function() { return enums;}});
- this.values.forEach(v => this[v.name] = v);
- }
+ // TODO: add parameter
+ constructor(name, value, writeName = false) {
+ this.name = name;
+ this.value = value;
+ this.writeName = writeName;
+ // immutable
+ Object.freeze(this);
+ }
+ toJSON() {
+ return this.writeName ? this.name : this.value;
+ }
+ static byName(name) {
+ return this.values.find((x) => x.name === name);
+ }
+ static byValue(value) {
+ return this.values.find((x) => x.value === value);
+ }
+ // This must be called to initialize static methods on the Enum subclass
+ static init(names, writeName = false) {
+ const enums = names.map((name, index) => new this(name, index, writeName));
+ Object.freeze(enums);
+ Object.defineProperty(this, "values", {
+ get: function () {
+ return enums;
+ },
+ });
+ this.values.forEach((v) => (this[v.name] = v));
+ }
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/BaseModel.js b/django_airavata/apps/api/static/django_airavata_api/js/models/BaseModel.js
index de985a4..571a2af 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/BaseModel.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/BaseModel.js
@@ -13,7 +13,7 @@ export default class BaseModel {
* - data: a data object, typically a deserialized JSON response
*/
constructor(fields, data = {}) {
- fields.forEach(fieldDefinition => {
+ fields.forEach((fieldDefinition) => {
if (typeof fieldDefinition === "string") {
this[fieldDefinition] = this.convertSimpleField(
data[fieldDefinition],
@@ -34,7 +34,7 @@ export default class BaseModel {
let fieldValue = data[fieldName];
if (fieldIsList) {
this[fieldName] = fieldValue
- ? fieldValue.map(item =>
+ ? fieldValue.map((item) =>
this.convertField(fieldType, item, fieldDefault)
)
: fieldDefault;
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/BatchQueue.js b/django_airavata/apps/api/static/django_airavata_api/js/models/BatchQueue.js
index 888b271..0f31b6a 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/BatchQueue.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/BatchQueue.js
@@ -1,23 +1,23 @@
-import BaseModel from './BaseModel';
+import BaseModel from "./BaseModel";
const FIELDS = [
- 'queueName',
- 'queueDescription',
- 'maxRunTime',
- 'maxNodes',
- 'maxProcessors',
- 'maxJobsInQueue',
- 'maxMemory',
- 'cpuPerNode',
- 'defaultNodeCount',
- 'defaultCPUCount',
- 'defaultWalltime',
- 'queueSpecificMacros',
- 'isDefaultQueue',
+ "queueName",
+ "queueDescription",
+ "maxRunTime",
+ "maxNodes",
+ "maxProcessors",
+ "maxJobsInQueue",
+ "maxMemory",
+ "cpuPerNode",
+ "defaultNodeCount",
+ "defaultCPUCount",
+ "defaultWalltime",
+ "queueSpecificMacros",
+ "isDefaultQueue",
];
export default class BatchQueue extends BaseModel {
- constructor(data = {}) {
- super(FIELDS, data);
- }
+ constructor(data = {}) {
+ super(FIELDS, data);
+ }
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/BatchQueueResourcePolicy.js b/django_airavata/apps/api/static/django_airavata_api/js/models/BatchQueueResourcePolicy.js
index 5f95665..3cf8f26 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/BatchQueueResourcePolicy.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/BatchQueueResourcePolicy.js
@@ -7,7 +7,7 @@ const FIELDS = [
"queuename",
"maxAllowedNodes",
"maxAllowedCores",
- "maxAllowedWalltime"
+ "maxAllowedWalltime",
];
export default class BatchQueueResourcePolicy extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/CommandObject.js b/django_airavata/apps/api/static/django_airavata_api/js/models/CommandObject.js
index 60347b0..fbd43fb 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/CommandObject.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/CommandObject.js
@@ -1,14 +1,9 @@
-import BaseModel from './BaseModel'
-import uuidv4 from 'uuid/v4'
+import BaseModel from "./BaseModel";
+import uuidv4 from "uuid/v4";
-
-const FIELDS = [
- 'command',
- 'commandOrder',
-];
+const FIELDS = ["command", "commandOrder"];
export default class CommandObject extends BaseModel {
-
constructor(data = {}) {
super(FIELDS, data);
this._key = data.key ? data.key : uuidv4();
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ComputationalResourceSchedulingModel.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ComputationalResourceSchedulingModel.js
index ea4e858..5df9bc2 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ComputationalResourceSchedulingModel.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ComputationalResourceSchedulingModel.js
@@ -1,59 +1,100 @@
-import BaseModel from './BaseModel';
+import BaseModel from "./BaseModel";
const FIELDS = [
- 'resourceHostId',
- 'totalCPUCount',
- 'nodeCount',
- 'numberOfThreads',
- 'queueName',
- 'wallTimeLimit',
- 'totalPhysicalMemory',
- 'chessisNumber',
- 'staticWorkingDir',
- 'overrideLoginUserName',
- 'overrideScratchLocation',
- 'overrideAllocationProjectNumber',
+ "resourceHostId",
+ "totalCPUCount",
+ "nodeCount",
+ "numberOfThreads",
+ "queueName",
+ "wallTimeLimit",
+ "totalPhysicalMemory",
+ "chessisNumber",
+ "staticWorkingDir",
+ "overrideLoginUserName",
+ "overrideScratchLocation",
+ "overrideAllocationProjectNumber",
];
export default class ComputationalResourceSchedulingModel extends BaseModel {
- constructor(data = {}) {
- super(FIELDS, data);
- }
+ constructor(data = {}) {
+ super(FIELDS, data);
+ }
- validate(queueInfo = null, batchQueueResourcePolicy = null) {
- const validationResults = {};
- if (this.isEmpty(this.resourceHostId)) {
- validationResults['resourceHostId'] = "Please select a compute resource.";
- }
- if (this.isEmpty(this.queueName)) {
- validationResults['queueName'] = "Please select a queue.";
- }
- if (!(this.nodeCount > 0)) {
- validationResults['nodeCount'] = "Enter a node count greater than 0.";
- } else if (batchQueueResourcePolicy && this.nodeCount > batchQueueResourcePolicy.maxAllowedNodes) {
- validationResults['nodeCount'] = `Enter a node count no greater than ${batchQueueResourcePolicy.maxAllowedNodes}.`;
- } else if (queueInfo && queueInfo.maxNodes && this.nodeCount > queueInfo.maxNodes) {
- validationResults['nodeCount'] = `Enter a node count no greater than ${queueInfo.maxNodes}.`;
- }
- if (!(this.totalCPUCount > 0)) {
- validationResults['totalCPUCount'] = "Enter a core count greater than 0.";
- } else if (batchQueueResourcePolicy && this.totalCPUCount > batchQueueResourcePolicy.maxAllowedCores) {
- validationResults['totalCPUCount'] = `Enter a core count no greater than ${batchQueueResourcePolicy.maxAllowedCores}.`;
- } else if (queueInfo && queueInfo.maxProcessors && this.totalCPUCount > queueInfo.maxProcessors) {
- validationResults['totalCPUCount'] = `Enter a core count no greater than ${queueInfo.maxProcessors}.`;
- }
- if (!(this.wallTimeLimit > 0)) {
- validationResults['wallTimeLimit'] = "Enter a wall time limit greater than 0.";
- } else if (batchQueueResourcePolicy && this.wallTimeLimit > batchQueueResourcePolicy.maxAllowedWalltime) {
- validationResults['wallTimeLimit'] = `Enter a wall time limit no greater than ${batchQueueResourcePolicy.maxAllowedWalltime}.`;
- } else if (queueInfo && queueInfo.maxRunTime && this.wallTimeLimit > queueInfo.maxRunTime) {
- validationResults['wallTimeLimit'] = `Enter a wall time limit no greater than ${queueInfo.maxRunTime}.`;
- }
- if (!(this.totalPhysicalMemory >= 0)) {
- validationResults['totalPhysicalMemory'] = "Enter a total physical memory greater than or equal to 0.";
- } else if (queueInfo && queueInfo.maxMemory && this.totalPhysicalMemory > queueInfo.maxMemory) {
- validationResults['totalPhysicalMemory'] = `Enter a total physical memory no greater than ${queueInfo.maxMemory}.`;
- }
- return validationResults;
+ validate(queueInfo = null, batchQueueResourcePolicy = null) {
+ const validationResults = {};
+ if (this.isEmpty(this.resourceHostId)) {
+ validationResults["resourceHostId"] = "Please select a compute resource.";
+ }
+ if (this.isEmpty(this.queueName)) {
+ validationResults["queueName"] = "Please select a queue.";
+ }
+ if (!(this.nodeCount > 0)) {
+ validationResults["nodeCount"] = "Enter a node count greater than 0.";
+ } else if (
+ batchQueueResourcePolicy &&
+ this.nodeCount > batchQueueResourcePolicy.maxAllowedNodes
+ ) {
+ validationResults[
+ "nodeCount"
+ ] = `Enter a node count no greater than ${batchQueueResourcePolicy.maxAllowedNodes}.`;
+ } else if (
+ queueInfo &&
+ queueInfo.maxNodes &&
+ this.nodeCount > queueInfo.maxNodes
+ ) {
+ validationResults[
+ "nodeCount"
+ ] = `Enter a node count no greater than ${queueInfo.maxNodes}.`;
+ }
+ if (!(this.totalCPUCount > 0)) {
+ validationResults["totalCPUCount"] = "Enter a core count greater than 0.";
+ } else if (
+ batchQueueResourcePolicy &&
+ this.totalCPUCount > batchQueueResourcePolicy.maxAllowedCores
+ ) {
+ validationResults[
+ "totalCPUCount"
+ ] = `Enter a core count no greater than ${batchQueueResourcePolicy.maxAllowedCores}.`;
+ } else if (
+ queueInfo &&
+ queueInfo.maxProcessors &&
+ this.totalCPUCount > queueInfo.maxProcessors
+ ) {
+ validationResults[
+ "totalCPUCount"
+ ] = `Enter a core count no greater than ${queueInfo.maxProcessors}.`;
+ }
+ if (!(this.wallTimeLimit > 0)) {
+ validationResults["wallTimeLimit"] =
+ "Enter a wall time limit greater than 0.";
+ } else if (
+ batchQueueResourcePolicy &&
+ this.wallTimeLimit > batchQueueResourcePolicy.maxAllowedWalltime
+ ) {
+ validationResults[
+ "wallTimeLimit"
+ ] = `Enter a wall time limit no greater than ${batchQueueResourcePolicy.maxAllowedWalltime}.`;
+ } else if (
+ queueInfo &&
+ queueInfo.maxRunTime &&
+ this.wallTimeLimit > queueInfo.maxRunTime
+ ) {
+ validationResults[
+ "wallTimeLimit"
+ ] = `Enter a wall time limit no greater than ${queueInfo.maxRunTime}.`;
+ }
+ if (!(this.totalPhysicalMemory >= 0)) {
+ validationResults["totalPhysicalMemory"] =
+ "Enter a total physical memory greater than or equal to 0.";
+ } else if (
+ queueInfo &&
+ queueInfo.maxMemory &&
+ this.totalPhysicalMemory > queueInfo.maxMemory
+ ) {
+ validationResults[
+ "totalPhysicalMemory"
+ ] = `Enter a total physical memory no greater than ${queueInfo.maxMemory}.`;
}
+ return validationResults;
+ }
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ComputeResourceDescription.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ComputeResourceDescription.js
index 1ba15bb..81b751c 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ComputeResourceDescription.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ComputeResourceDescription.js
@@ -1,42 +1,42 @@
-import BaseModel from './BaseModel'
-import BatchQueue from './BatchQueue'
+import BaseModel from "./BaseModel";
+import BatchQueue from "./BatchQueue";
const FIELDS = [
- 'computeResourceId',
- 'hostName',
- {
- name: 'hostAliases',
- type: 'string',
- list: true
- },
- {
- name: 'ipAddresses',
- type: 'string',
- list: true
- },
- 'resourceDescription',
- 'enabled',
- {
- name: 'batchQueues',
- type: BatchQueue,
- list: true
- },
- // TODO: map these
- // 'fileSystems',
- // 'jobSubmissionInterfaces',
- // 'dataMovementInterfaces',
- 'maxMemoryPerNode',
- 'gatewayUsageReporting',
- 'gatewayUsageModuleLoadCommand',
- 'gatewayUsageExecutable',
- 'cpusPerNode',
- 'defaultNodeCount',
- 'defaultCPUCount',
- 'defaultWalltime',
-]
+ "computeResourceId",
+ "hostName",
+ {
+ name: "hostAliases",
+ type: "string",
+ list: true,
+ },
+ {
+ name: "ipAddresses",
+ type: "string",
+ list: true,
+ },
+ "resourceDescription",
+ "enabled",
+ {
+ name: "batchQueues",
+ type: BatchQueue,
+ list: true,
+ },
+ // TODO: map these
+ // 'fileSystems',
+ // 'jobSubmissionInterfaces',
+ // 'dataMovementInterfaces',
+ "maxMemoryPerNode",
+ "gatewayUsageReporting",
+ "gatewayUsageModuleLoadCommand",
+ "gatewayUsageExecutable",
+ "cpusPerNode",
+ "defaultNodeCount",
+ "defaultCPUCount",
+ "defaultWalltime",
+];
export default class ComputeResourceDescription extends BaseModel {
- constructor(data = {}) {
- super(FIELDS, data);
- }
+ constructor(data = {}) {
+ super(FIELDS, data);
+ }
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ComputeResourceReservation.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ComputeResourceReservation.js
index 9d3110b..fbd7c5d 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ComputeResourceReservation.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ComputeResourceReservation.js
@@ -14,18 +14,18 @@ const FIELDS = [
{
name: "queueNames",
type: "string",
- list: true
+ list: true,
},
{
name: "startTime",
type: Date,
- default: () => currentTimeTopOfHour()
+ default: () => currentTimeTopOfHour(),
},
{
name: "endTime",
type: Date,
- default: () => currentTimeTopOfHour()
- }
+ default: () => currentTimeTopOfHour(),
+ },
];
export default class ComputeResourceReservation extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/CredentialSummary.js b/django_airavata/apps/api/static/django_airavata_api/js/models/CredentialSummary.js
index 9a658ec..83d38a9 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/CredentialSummary.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/CredentialSummary.js
@@ -4,18 +4,18 @@ import SummaryType from "./SummaryType";
const FIELDS = [
{
name: "type",
- type: SummaryType
+ type: SummaryType,
},
"gatewayId",
"username",
"publicKey",
{
name: "persistedTime",
- type: Date
+ type: Date,
},
"token",
"description",
- "userHasWriteAccess"
+ "userHasWriteAccess",
];
export default class CredentialSummary extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/DataProduct.js b/django_airavata/apps/api/static/django_airavata_api/js/models/DataProduct.js
index da0a389..724c18a 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/DataProduct.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/DataProduct.js
@@ -1,34 +1,33 @@
+import BaseModel from "./BaseModel";
+import DataReplicaLocation from "./DataReplicaLocation";
-import BaseModel from './BaseModel'
-import DataReplicaLocation from './DataReplicaLocation'
-
-import URL from 'url-parse'
+import URL from "url-parse";
const FIELDS = [
- 'productUri',
- 'gatewayId',
- 'parentProductUri',
- 'productName',
- 'productDescription',
- 'ownerName',
- 'dataProductType',
- 'productSize',
- {
- name: 'creationTime',
- type: 'date',
- },
- {
- name: 'lastModifiedTime',
- type: 'date',
- },
- 'productMetadata',
- {
- name: 'replicaLocations',
- type: DataReplicaLocation,
- list: true
- },
- 'downloadURL',
- 'isInputFileUpload'
+ "productUri",
+ "gatewayId",
+ "parentProductUri",
+ "productName",
+ "productDescription",
+ "ownerName",
+ "dataProductType",
+ "productSize",
+ {
+ name: "creationTime",
+ type: "date",
+ },
+ {
+ name: "lastModifiedTime",
+ type: "date",
+ },
+ "productMetadata",
+ {
+ name: "replicaLocations",
+ type: DataReplicaLocation,
+ list: true,
+ },
+ "downloadURL",
+ "isInputFileUpload",
];
const FILENAME_REGEX = /[^/]+$/;
@@ -36,31 +35,33 @@ const TEXT_MIME_TYPE_REGEX = /^text\/.+/;
const IMAGE_MIME_TYPE_REGEX = /^image\/.+/;
export default class DataProduct extends BaseModel {
- constructor(data = {}) {
- super(FIELDS, data);
- }
+ constructor(data = {}) {
+ super(FIELDS, data);
+ }
- get filename() {
- if (this.replicaLocations && this.replicaLocations.length > 0) {
- const firstReplicaLocation = this.replicaLocations[0];
- const fileURL = new URL(firstReplicaLocation.filePath);
- const filenameMatch = FILENAME_REGEX.exec(fileURL.pathname);
- if (filenameMatch) {
- return filenameMatch[0];
- }
- }
- return null;
+ get filename() {
+ if (this.replicaLocations && this.replicaLocations.length > 0) {
+ const firstReplicaLocation = this.replicaLocations[0];
+ const fileURL = new URL(firstReplicaLocation.filePath);
+ const filenameMatch = FILENAME_REGEX.exec(fileURL.pathname);
+ if (filenameMatch) {
+ return filenameMatch[0];
+ }
}
+ return null;
+ }
- get isText() {
- return this.mimeType && TEXT_MIME_TYPE_REGEX.test(this.mimeType);
- }
+ get isText() {
+ return this.mimeType && TEXT_MIME_TYPE_REGEX.test(this.mimeType);
+ }
- get isImage() {
- return this.mimeType && IMAGE_MIME_TYPE_REGEX.test(this.mimeType);
- }
+ get isImage() {
+ return this.mimeType && IMAGE_MIME_TYPE_REGEX.test(this.mimeType);
+ }
- get mimeType() {
- return this.productMetadata && this.productMetadata['mime-type'] ? this.productMetadata['mime-type'] : null;
- }
+ get mimeType() {
+ return this.productMetadata && this.productMetadata["mime-type"]
+ ? this.productMetadata["mime-type"]
+ : null;
+ }
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/DataReplicaLocation.js b/django_airavata/apps/api/static/django_airavata_api/js/models/DataReplicaLocation.js
index d0bbc07..064fead 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/DataReplicaLocation.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/DataReplicaLocation.js
@@ -1,31 +1,31 @@
-import BaseModel from './BaseModel'
+import BaseModel from "./BaseModel";
const FIELDS = [
- 'replicaId',
- 'productUri',
- 'replicaName',
- 'replicaDescription',
- {
- name: 'creationTime',
- type: 'date',
- },
- {
- name: 'lastModifiedTime',
- type: 'date',
- },
- {
- name: 'validUntilTime',
- type: 'date',
- },
- 'replicaLocationCategory',
- 'replicaPersistentType',
- 'storageResourceId',
- 'filePath',
- 'replicaMetadata',
+ "replicaId",
+ "productUri",
+ "replicaName",
+ "replicaDescription",
+ {
+ name: "creationTime",
+ type: "date",
+ },
+ {
+ name: "lastModifiedTime",
+ type: "date",
+ },
+ {
+ name: "validUntilTime",
+ type: "date",
+ },
+ "replicaLocationCategory",
+ "replicaPersistentType",
+ "storageResourceId",
+ "filePath",
+ "replicaMetadata",
];
export default class DataReplicaLocation extends BaseModel {
- constructor(data = {}) {
- super(FIELDS, data);
- }
-}
\ No newline at end of file
+ constructor(data = {}) {
+ super(FIELDS, data);
+ }
+}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/DataType.js b/django_airavata/apps/api/static/django_airavata_api/js/models/DataType.js
index fc892ac..78e425f 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/DataType.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/DataType.js
@@ -12,7 +12,7 @@ export default class DataType extends BaseEnum {
DataType.URI,
DataType.URI_COLLECTION,
DataType.STDOUT,
- DataType.STDERR
+ DataType.STDERR,
].indexOf(this) >= 0
);
}
@@ -24,5 +24,5 @@ DataType.init([
"URI",
"URI_COLLECTION",
"STDOUT",
- "STDERR"
+ "STDERR",
]);
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ErrorModel.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ErrorModel.js
index 7917cf9..7b3d776 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ErrorModel.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ErrorModel.js
@@ -1,23 +1,23 @@
-import BaseModel from './BaseModel';
+import BaseModel from "./BaseModel";
const FIELDS = [
- 'errorId',
- {
- name: 'creationTime',
- type: 'date',
- },
- 'actualErrorMessage',
- 'userFriendlyMessage',
- 'transientOrPersistent',
- {
- name: 'rootCauseErrorIdList',
- type: 'string',
- list: true,
- }
+ "errorId",
+ {
+ name: "creationTime",
+ type: "date",
+ },
+ "actualErrorMessage",
+ "userFriendlyMessage",
+ "transientOrPersistent",
+ {
+ name: "rootCauseErrorIdList",
+ type: "string",
+ list: true,
+ },
];
export default class ErrorModel extends BaseModel {
- constructor(data = {}) {
- super(FIELDS, data);
- }
+ constructor(data = {}) {
+ super(FIELDS, data);
+ }
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/Experiment.js b/django_airavata/apps/api/static/django_airavata_api/js/models/Experiment.js
index 7f2d7ad..9d2b12f 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/Experiment.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/Experiment.js
@@ -14,64 +14,64 @@ const FIELDS = [
{
name: "experimentType",
type: "number",
- default: 0
+ default: 0,
},
"userName",
"experimentName",
{
name: "creationTime",
- type: "date"
+ type: "date",
},
"description",
"executionId",
{
name: "enableEmailNotification",
type: "boolean",
- default: false
+ default: false,
},
{
name: "emailAddresses",
type: "string",
- list: true
+ list: true,
},
{
name: "userConfigurationData",
type: UserConfigurationData,
- default: BaseModel.defaultNewInstance(UserConfigurationData)
+ default: BaseModel.defaultNewInstance(UserConfigurationData),
},
{
name: "experimentInputs",
type: InputDataObjectType,
list: true,
- default: BaseModel.defaultNewInstance(Array)
+ default: BaseModel.defaultNewInstance(Array),
},
{
name: "experimentOutputs",
type: OutputDataObjectType,
- list: true
+ list: true,
},
{
name: "experimentStatus",
type: ExperimentStatus,
- list: true
+ list: true,
},
{
name: "errors",
type: ErrorModel,
- list: true
+ list: true,
},
{
name: "processes",
type: ProcessModel,
- list: true
+ list: true,
},
"workflow",
{
name: "userHasWriteAccess",
type: "boolean",
- default: true
+ default: true,
},
- "relativeExperimentDataDir"
+ "relativeExperimentDataDir",
];
export default class Experiment extends BaseModel {
@@ -116,7 +116,7 @@ export default class Experiment extends BaseModel {
ExperimentState.CANCELING,
ExperimentState.CANCELED,
ExperimentState.FAILED,
- ExperimentState.COMPLETED
+ ExperimentState.COMPLETED,
];
return (
this.latestStatus &&
@@ -133,7 +133,7 @@ export default class Experiment extends BaseModel {
}
get isCancelable() {
- switch(this.latestStatus.state){
+ switch (this.latestStatus.state) {
case ExperimentState.VALIDATED:
case ExperimentState.SCHEDULED:
case ExperimentState.LAUNCHED:
@@ -154,8 +154,8 @@ export default class Experiment extends BaseModel {
populateInputsOutputsFromApplicationInterface(applicationInterface) {
// Copy application inputs and outputs to the experiment
- this.experimentInputs = applicationInterface.applicationInputs.map(input =>
- input.clone()
+ this.experimentInputs = applicationInterface.applicationInputs.map(
+ (input) => input.clone()
);
this.evaluateInputDependencies();
this.experimentOutputs = applicationInterface.applicationOutputs.slice();
@@ -170,7 +170,7 @@ export default class Experiment extends BaseModel {
_collectInputValues() {
const result = {};
- this.experimentInputs.forEach(inp => {
+ this.experimentInputs.forEach((inp) => {
result[inp.name] = inp.value;
});
return result;
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentSearchFields.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentSearchFields.js
index 27d4f4d..235f10d 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentSearchFields.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentSearchFields.js
@@ -9,5 +9,5 @@ ExperimentSearchFields.init([
"TO_DATE",
"STATUS",
"PROJECT_ID",
- "USER_NAME"
+ "USER_NAME",
]);
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentState.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentState.js
index d807cdc..6ac0150 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentState.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentState.js
@@ -6,7 +6,7 @@ export default class ExperimentState extends BaseEnum {
ExperimentState.SCHEDULED,
ExperimentState.LAUNCHED,
ExperimentState.EXECUTING,
- ExperimentState.CANCELING
+ ExperimentState.CANCELING,
];
return progressingStates.indexOf(this) >= 0;
}
@@ -14,7 +14,7 @@ export default class ExperimentState extends BaseEnum {
const finishedStates = [
ExperimentState.CANCELED,
ExperimentState.COMPLETED,
- ExperimentState.FAILED
+ ExperimentState.FAILED,
];
return finishedStates.indexOf(this) >= 0;
}
@@ -28,5 +28,5 @@ ExperimentState.init([
"CANCELING",
"CANCELED",
"COMPLETED",
- "FAILED"
+ "FAILED",
]);
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentStatistics.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentStatistics.js
index ffad82c..08bd5dd 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentStatistics.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentStatistics.js
@@ -11,29 +11,29 @@ const FIELDS = [
{
name: "allExperiments",
type: ExperimentSummary,
- list: true
+ list: true,
},
{
name: "completedExperiments",
type: ExperimentSummary,
- list: true
+ list: true,
},
{
name: "failedExperiments",
type: ExperimentSummary,
- list: true
+ list: true,
},
{
name: "cancelledExperiments",
type: ExperimentSummary,
- list: true
+ list: true,
},
{
name: "createdExperiments",
type: ExperimentSummary,
- list: true
+ list: true,
},
- { name: "runningExperiments", type: ExperimentSummary, list: true }
+ { name: "runningExperiments", type: ExperimentSummary, list: true },
];
export default class ExperimentStatistics extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentStatus.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentStatus.js
index 18e5bc7..a187618 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentStatus.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentStatus.js
@@ -4,14 +4,14 @@ import ExperimentState from "./ExperimentState";
const FIELDS = [
{
name: "state",
- type: ExperimentState
+ type: ExperimentState,
},
{
name: "timeOfStateChange",
- type: "date"
+ type: "date",
},
"reason",
- "statusId"
+ "statusId",
];
export default class ExperimentStatus extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentSummary.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentSummary.js
index 24bca80..68d56a5 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentSummary.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ExperimentSummary.js
@@ -9,7 +9,7 @@ const FIELDS = [
"gatewayId",
{
name: "creationTime",
- type: "date"
+ type: "date",
},
"userName",
"name",
@@ -18,17 +18,17 @@ const FIELDS = [
"resourceHostId",
{
name: "experimentStatus",
- type: ExperimentState
+ type: ExperimentState,
},
{
name: "statusUpdateTime",
- type: "date"
+ type: "date",
},
{
name: "userHasWriteAccess",
type: "boolean",
- default: false
- }
+ default: false,
+ },
];
export default class ExperimentSummary extends BaseModel {
@@ -51,9 +51,9 @@ export default class ExperimentSummary extends BaseModel {
experimentStatus: [
new ExperimentStatus({
state: this.experimentStatus,
- timeOfStateChange: this.statusUpdateTime
- })
- ]
+ timeOfStateChange: this.statusUpdateTime,
+ }),
+ ],
})
);
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/FullExperiment.js b/django_airavata/apps/api/static/django_airavata_api/js/models/FullExperiment.js
index f657762..03aa10e 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/FullExperiment.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/FullExperiment.js
@@ -10,39 +10,39 @@ const FIELDS = [
"experimentId",
{
name: "experiment",
- type: Experiment
+ type: Experiment,
},
{
name: "project",
- type: Project
+ type: Project,
},
{
name: "applicationModule",
- type: ApplicationModule
+ type: ApplicationModule,
},
{
name: "computeResource",
- type: ComputeResourceDescription
+ type: ComputeResourceDescription,
},
{
name: "outputDataProducts",
type: DataProduct,
- list: true
+ list: true,
},
{
name: "inputDataProducts",
type: DataProduct,
- list: true
+ list: true,
},
{
name: "jobDetails",
type: Job,
- list: true
+ list: true,
},
{
name: "outputViews",
- type: Object
- }
+ type: Object,
+ },
];
export default class FullExperiment extends BaseModel {
@@ -62,13 +62,13 @@ export default class FullExperiment extends BaseModel {
return this.computeResource ? this.computeResource.hostName : null;
}
- get resourceHostId() {
- return this.experiment.resourceHostId;
- }
+ get resourceHostId() {
+ return this.experiment.resourceHostId;
+ }
- get experimentStatus() {
- return this.experiment.latestStatus;
- }
+ get experimentStatus() {
+ return this.experiment.latestStatus;
+ }
get experimentStatusName() {
return this.experimentStatus ? this.experimentStatus.state.name : null;
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/GatewayResourceProfile.js b/django_airavata/apps/api/static/django_airavata_api/js/models/GatewayResourceProfile.js
index 7ce6a72..35e881f 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/GatewayResourceProfile.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/GatewayResourceProfile.js
@@ -8,11 +8,11 @@ const FIELDS = [
{
name: "storagePreferences",
type: StoragePreference,
- list: true
+ list: true,
},
"identityServerTenant",
"identityServerPwdCredToken",
- "userHasWriteAccess"
+ "userHasWriteAccess",
];
export default class GatewayResourceProfile extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/Group.js b/django_airavata/apps/api/static/django_airavata_api/js/models/Group.js
index fff93c0..533745a 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/Group.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/Group.js
@@ -9,32 +9,32 @@ const FIELDS = [
name: "members",
type: "string",
list: true,
- default: BaseModel.defaultNewInstance(Array)
+ default: BaseModel.defaultNewInstance(Array),
},
{
name: "admins",
type: "string",
list: true,
- default: BaseModel.defaultNewInstance(Array)
+ default: BaseModel.defaultNewInstance(Array),
},
{
name: "isOwner",
type: "boolean",
- default: true
+ default: true,
},
{
name: "isAdmin",
type: "boolean",
- default: false
+ default: false,
},
{
name: "isMember",
type: "boolean",
- default: true
+ default: true,
},
"isGatewayAdminsGroup",
"isReadOnlyGatewayAdminsGroup",
- "isDefaultGatewayUsersGroup"
+ "isDefaultGatewayUsersGroup",
];
export default class Group extends BaseModel {
@@ -45,7 +45,7 @@ export default class Group extends BaseModel {
validate() {
if (this.isEmpty(this.name.trim())) {
return {
- name: ["Please provide a name."]
+ name: ["Please provide a name."],
};
}
return null;
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/GroupComputeResourcePreference.js b/django_airavata/apps/api/static/django_airavata_api/js/models/GroupComputeResourcePreference.js
index 39d8df4..b92ea2a 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/GroupComputeResourcePreference.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/GroupComputeResourcePreference.js
@@ -7,7 +7,7 @@ const FIELDS = [
{
name: "overridebyAiravata",
type: "boolean",
- default: true
+ default: true,
},
"loginUserName",
"preferredJobSubmissionProtocol",
@@ -25,8 +25,8 @@ const FIELDS = [
name: "reservations",
type: ComputeResourceReservation,
list: true,
- default: BaseModel.defaultNewInstance(Array)
- }
+ default: BaseModel.defaultNewInstance(Array),
+ },
];
export default class GroupComputeResourcePreference extends BaseModel {
@@ -37,11 +37,11 @@ export default class GroupComputeResourcePreference extends BaseModel {
validate() {
let validationResults = {};
if (this.isEmpty(this.loginUserName)) {
- validationResults["loginUserName"] =
- "Please provide a login username.";
+ validationResults["loginUserName"] = "Please provide a login username.";
}
if (this.isEmpty(this.scratchLocation)) {
- validationResults["scratchLocation"] = "Please provide a scratch location.";
+ validationResults["scratchLocation"] =
+ "Please provide a scratch location.";
}
return validationResults;
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/GroupPermission.js b/django_airavata/apps/api/static/django_airavata_api/js/models/GroupPermission.js
index 70e1e26..14d38aa 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/GroupPermission.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/GroupPermission.js
@@ -1,18 +1,21 @@
-import BaseModel from './BaseModel';
-import Group from './Group';
-import ResourcePermissionType from './ResourcePermissionType';
+import BaseModel from "./BaseModel";
+import Group from "./Group";
+import ResourcePermissionType from "./ResourcePermissionType";
export default class GroupPermission extends BaseModel {
- constructor(data = {}) {
- super([
- {
- name: 'group',
- type: Group,
- },
- {
- name: 'permissionType',
- type: ResourcePermissionType,
- }
- ], data);
- }
+ constructor(data = {}) {
+ super(
+ [
+ {
+ name: "group",
+ type: Group,
+ },
+ {
+ name: "permissionType",
+ type: ResourcePermissionType,
+ },
+ ],
+ data
+ );
+ }
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/GroupResourceProfile.js b/django_airavata/apps/api/static/django_airavata_api/js/models/GroupResourceProfile.js
index ff71113..4866dce 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/GroupResourceProfile.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/GroupResourceProfile.js
@@ -11,30 +11,30 @@ const FIELDS = [
name: "computePreferences",
type: GroupComputeResourcePreference,
list: true,
- default: BaseModel.defaultNewInstance(Array)
+ default: BaseModel.defaultNewInstance(Array),
},
{
name: "computeResourcePolicies",
type: ComputeResourcePolicy,
list: true,
- default: BaseModel.defaultNewInstance(Array)
+ default: BaseModel.defaultNewInstance(Array),
},
{
name: "batchQueueResourcePolicies",
type: BatchQueueResourcePolicy,
list: true,
- default: BaseModel.defaultNewInstance(Array)
+ default: BaseModel.defaultNewInstance(Array),
},
{
name: "creationTime",
- type: "date"
+ type: "date",
},
{
name: "updatedTime",
- type: "date"
+ type: "date",
},
"defaultCredentialStoreToken",
- "userHasWriteAccess" // true if current user has write access
+ "userHasWriteAccess", // true if current user has write access
];
export default class GroupResourceProfile extends BaseModel {
@@ -44,19 +44,19 @@ export default class GroupResourceProfile extends BaseModel {
getComputePreference(computeResourceId) {
return this.computePreferences.find(
- pref => pref.computeResourceId === computeResourceId
+ (pref) => pref.computeResourceId === computeResourceId
);
}
getComputeResourcePolicy(computeResourceId) {
return this.computeResourcePolicies.find(
- pol => pol.computeResourceId === computeResourceId
+ (pol) => pol.computeResourceId === computeResourceId
);
}
getBatchQueueResourcePolicies(computeResourceId) {
return this.batchQueueResourcePolicies.filter(
- pol => pol.computeResourceId === computeResourceId
+ (pol) => pol.computeResourceId === computeResourceId
);
}
@@ -67,7 +67,7 @@ export default class GroupResourceProfile extends BaseModel {
) {
// merge/add computeResourcePreference and computeResourcePolicy
const existingComputeResourcePreference = this.computePreferences.find(
- pref =>
+ (pref) =>
pref.computeResourceId === computeResourcePreference.computeResourceId
);
if (existingComputeResourcePreference) {
@@ -79,7 +79,7 @@ export default class GroupResourceProfile extends BaseModel {
this.computePreferences.push(computeResourcePreference);
}
const existingComputeResourcePolicy = this.computeResourcePolicies.find(
- pol => pol.computeResourceId === computeResourcePolicy.computeResourceId
+ (pol) => pol.computeResourceId === computeResourcePolicy.computeResourceId
);
if (existingComputeResourcePolicy) {
Object.assign(existingComputeResourcePolicy, computeResourcePolicy);
@@ -88,12 +88,12 @@ export default class GroupResourceProfile extends BaseModel {
}
// merge/add/remove batchQueueResourcePolicies
const existingBatchQueueResourcePolicies = this.batchQueueResourcePolicies.filter(
- pol =>
+ (pol) =>
pol.computeResourceId === computeResourcePreference.computeResourceId
);
for (const batchQueueResourcePolicy of batchQueueResourcePolicies) {
const existingBatchQueueResourcePolicy = existingBatchQueueResourcePolicies.find(
- pol => pol.queuename === batchQueueResourcePolicy.queuename
+ (pol) => pol.queuename === batchQueueResourcePolicy.queuename
);
if (existingBatchQueueResourcePolicy) {
Object.assign(
@@ -101,7 +101,7 @@ export default class GroupResourceProfile extends BaseModel {
batchQueueResourcePolicy
);
const existingBatchQueueResourcePolicyIndex = existingBatchQueueResourcePolicies.findIndex(
- pol => pol.queuename === batchQueueResourcePolicy.queuename
+ (pol) => pol.queuename === batchQueueResourcePolicy.queuename
);
if (existingBatchQueueResourcePolicyIndex >= 0) {
existingBatchQueueResourcePolicies.splice(
@@ -115,7 +115,7 @@ export default class GroupResourceProfile extends BaseModel {
}
for (const existingBatchQueueResourcePolicy of existingBatchQueueResourcePolicies) {
const existingBatchQueueResourcePolicyIndex = this.batchQueueResourcePolicies.findIndex(
- pol =>
+ (pol) =>
pol.computeResourceId ===
existingBatchQueueResourcePolicy.computeResourceId &&
pol.queuename === existingBatchQueueResourcePolicy.queuename
@@ -137,14 +137,14 @@ export default class GroupResourceProfile extends BaseModel {
removeComputeResource(computeResourceId) {
let removedChildren = false;
const existingComputeResourcePreferenceIndex = this.computePreferences.findIndex(
- pref => pref.computeResourceId === computeResourceId
+ (pref) => pref.computeResourceId === computeResourceId
);
if (existingComputeResourcePreferenceIndex >= 0) {
this.computePreferences.splice(existingComputeResourcePreferenceIndex, 1);
removedChildren = true;
}
const existingComputeResourcePolicyIndex = this.computeResourcePolicies.findIndex(
- pol => pol.computeResourceId === computeResourceId
+ (pol) => pol.computeResourceId === computeResourceId
);
if (existingComputeResourcePolicyIndex >= 0) {
this.computeResourcePolicies.splice(
@@ -154,7 +154,7 @@ export default class GroupResourceProfile extends BaseModel {
removedChildren = true;
}
const existingBatchQueueResourcePolicies = this.batchQueueResourcePolicies.filter(
- pol => pol.computeResourceId === computeResourceId
+ (pol) => pol.computeResourceId === computeResourceId
);
for (const existingBatchQueueResourcePolicy of existingBatchQueueResourcePolicies) {
const existingBatchQueueResourcePolicyIndex = this.batchQueueResourcePolicies.indexOf(
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/IAMUserProfile.js b/django_airavata/apps/api/static/django_airavata_api/js/models/IAMUserProfile.js
index 23d7dff..d6c2d89 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/IAMUserProfile.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/IAMUserProfile.js
@@ -14,14 +14,14 @@ const FIELDS = [
"airavataUserProfileExists",
{
name: "creationTime",
- type: "date"
+ type: "date",
},
{
name: "groups",
type: Group,
- list: true
+ list: true,
},
- "userHasWriteAccess"
+ "userHasWriteAccess",
];
export default class IAMUserProfile extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/InputDataObjectType.js b/django_airavata/apps/api/static/django_airavata_api/js/models/InputDataObjectType.js
index dcc7537..320b851 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/InputDataObjectType.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/InputDataObjectType.js
@@ -10,13 +10,13 @@ const FIELDS = [
{
name: "type",
type: DataType,
- default: DataType.STRING
+ default: DataType.STRING,
},
"applicationArgument",
{
name: "standardInput",
type: "boolean",
- default: false
+ default: false,
},
"userFriendlyDescription",
"metaData",
@@ -24,25 +24,25 @@ const FIELDS = [
{
name: "isRequired",
type: "boolean",
- default: false
+ default: false,
},
{
name: "requiredToAddedToCommandLine",
type: "boolean",
- default: false
+ default: false,
},
{
name: "dataStaged",
type: "boolean",
- default: false
+ default: false,
},
"storageResourceId",
{
name: "isReadOnly",
type: "boolean",
- default: false
+ default: false,
},
- "overrideFilename"
+ "overrideFilename",
];
const IS_REQUIRED_DEFAULT = "This field is required.";
@@ -256,5 +256,5 @@ InputDataObjectType.VALID_DATA_TYPES = [
DataType.INTEGER,
DataType.FLOAT,
DataType.URI,
- DataType.URI_COLLECTION
+ DataType.URI_COLLECTION,
];
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/Job.js b/django_airavata/apps/api/static/django_airavata_api/js/models/Job.js
index 707c98b..52dbdb2 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/Job.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/Job.js
@@ -8,19 +8,19 @@ const FIELDS = [
"jobDescription",
{
name: "creationTime",
- type: "date"
+ type: "date",
},
{
name: "jobStatuses",
type: JobStatus,
- list: true
+ list: true,
},
"computeResourceConsumed",
"jobName",
"workingDir",
"stdOut",
"stdErr",
- "exitCode"
+ "exitCode",
];
export default class Job extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/JobState.js b/django_airavata/apps/api/static/django_airavata_api/js/models/JobState.js
index 187e0fc..15510ab 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/JobState.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/JobState.js
@@ -1,15 +1,14 @@
-import BaseEnum from './BaseEnum'
+import BaseEnum from "./BaseEnum";
-export default class JobState extends BaseEnum {
-}
+export default class JobState extends BaseEnum {}
JobState.init([
- 'SUBMITTED',
- 'QUEUED',
- 'ACTIVE',
- 'COMPLETE',
- 'CANCELED',
- 'FAILED',
- 'SUSPENDED',
- 'UNKNOWN',
- 'NON_CRITICAL_FAIL',
+ "SUBMITTED",
+ "QUEUED",
+ "ACTIVE",
+ "COMPLETE",
+ "CANCELED",
+ "FAILED",
+ "SUSPENDED",
+ "UNKNOWN",
+ "NON_CRITICAL_FAIL",
]);
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/JobStatus.js b/django_airavata/apps/api/static/django_airavata_api/js/models/JobStatus.js
index a2e4c42..82dcdb9 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/JobStatus.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/JobStatus.js
@@ -4,14 +4,14 @@ import JobState from "./JobState";
const FIELDS = [
{
name: "jobState",
- type: JobState
+ type: JobState,
},
{
name: "timeOfStateChange",
- type: "date"
+ type: "date",
},
"reason",
- "statusId"
+ "statusId",
];
export default class JobStatus extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/LogRecord.js b/django_airavata/apps/api/static/django_airavata_api/js/models/LogRecord.js
index 78b0816..6a98f4c 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/LogRecord.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/LogRecord.js
@@ -7,8 +7,8 @@ const FIELDS = [
{
name: "stacktrace",
type: "string",
- list: true
- }
+ list: true,
+ },
];
export default class LogRecord extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/Notification.js b/django_airavata/apps/api/static/django_airavata_api/js/models/Notification.js
index f6f99d8..254c529 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/Notification.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/Notification.js
@@ -7,22 +7,22 @@ const FIELDS = [
"title",
"notificationMessage",
{
- name:"creationTime",
- type: Date
+ name: "creationTime",
+ type: Date,
},
{
- name:"publishedTime",
- type: Date
+ name: "publishedTime",
+ type: Date,
},
{
- name:"expirationTime",
- type: Date
+ name: "expirationTime",
+ type: Date,
},
{
- name: "priority",
- type: NotificationPriority
+ name: "priority",
+ type: NotificationPriority,
},
- "userHasWriteAccess"
+ "userHasWriteAccess",
];
export default class Notification extends BaseModel {
@@ -33,11 +33,14 @@ export default class Notification extends BaseModel {
validate() {
let validationResults = {};
if (this.isEmpty(this.title)) {
- validationResults["title"] =
- "Please provide a Title for this notice.";
+ validationResults["title"] = "Please provide a Title for this notice.";
}
- if (this.isEmpty(this.notificationMessage) || this.notificationMessage.length < 10) {
- validationResults["notificationMessage"] = "Please provide the message with minimum 10 characters.";
+ if (
+ this.isEmpty(this.notificationMessage) ||
+ this.notificationMessage.length < 10
+ ) {
+ validationResults["notificationMessage"] =
+ "Please provide the message with minimum 10 characters.";
}
if (this.isEmpty(this.publishedTime)) {
validationResults["publishedTime"] = "Please select the publish time";
@@ -50,5 +53,4 @@ export default class Notification extends BaseModel {
}
return validationResults;
}
-
}
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/NotificationPriority.js b/django_airavata/apps/api/static/django_airavata_api/js/models/NotificationPriority.js
index c3d3939..9fd5673 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/NotificationPriority.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/NotificationPriority.js
@@ -1,9 +1,4 @@
-import BaseEnum from './BaseEnum'
+import BaseEnum from "./BaseEnum";
-export default class NotificationPriority extends BaseEnum {
-}
-NotificationPriority.init([
- 'LOW',
- 'NORMAL',
- 'HIGH',
-], true);
+export default class NotificationPriority extends BaseEnum {}
+NotificationPriority.init(["LOW", "NORMAL", "HIGH"], true);
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/OutputDataObjectType.js b/django_airavata/apps/api/static/django_airavata_api/js/models/OutputDataObjectType.js
index 81bfa50..ba36e74 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/OutputDataObjectType.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/OutputDataObjectType.js
@@ -8,33 +8,33 @@ const FIELDS = [
{
name: "type",
type: DataType,
- default: DataType.URI
+ default: DataType.URI,
},
"applicationArgument",
{
name: "isRequired",
type: "boolean",
- default: false
+ default: false,
},
{
name: "requiredToAddedToCommandLine",
type: "boolean",
- default: false
+ default: false,
},
{
name: "dataMovement",
type: "boolean",
- default: false
+ default: false,
},
"location",
"searchQuery",
{
name: "outputStreaming",
type: "boolean",
- default: false
+ default: false,
},
"storageResourceId",
- "metaData"
+ "metaData",
];
export default class OutputDataObjectType extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ParallelismType.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ParallelismType.js
index c7a6043..2af2421 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ParallelismType.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ParallelismType.js
@@ -1,12 +1,11 @@
-import BaseEnum from './BaseEnum'
+import BaseEnum from "./BaseEnum";
-export default class ParallelismType extends BaseEnum {
-}
+export default class ParallelismType extends BaseEnum {}
ParallelismType.init([
"SERIAL",
"MPI",
"OPENMP",
"OPENMP_MPI",
"CCM",
- "CRAY_MPI"
+ "CRAY_MPI",
]);
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/Parser.js b/django_airavata/apps/api/static/django_airavata_api/js/models/Parser.js
index 9f0d707..08fe70e 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/Parser.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/Parser.js
@@ -1,7 +1,6 @@
-
import BaseModel from "./BaseModel";
-import ParserInputFile from "./ParserInput"
-import ParserOutputFile from "./ParserOutput"
+import ParserInputFile from "./ParserInput";
+import ParserOutputFile from "./ParserOutput";
const FIELDS = [
"id",
@@ -12,14 +11,14 @@ const FIELDS = [
{
name: "inputFiles",
list: true,
- type: ParserInputFile
+ type: ParserInputFile,
},
{
name: "outputFiles",
list: true,
- type: ParserOutputFile
+ type: ParserOutputFile,
},
- "gatewayId"
+ "gatewayId",
];
export default class Parser extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ParserInput.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ParserInput.js
index 52afc24..987ae81 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ParserInput.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ParserInput.js
@@ -8,8 +8,8 @@ const FIELDS = [
"parserId",
{
name: "type",
- type: IOType
- }
+ type: IOType,
+ },
];
export default class ParserInput extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ParserOutput.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ParserOutput.js
index 62de83d..502aef6 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ParserOutput.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ParserOutput.js
@@ -8,8 +8,8 @@ const FIELDS = [
"parserId",
{
name: "type",
- type: IOType
- }
+ type: IOType,
+ },
];
export default class ParserOutput extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessModel.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessModel.js
index fd962a3..8b28972 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessModel.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessModel.js
@@ -12,16 +12,16 @@ const FIELDS = [
"experimentId",
{
name: "creationTime",
- type: Date
+ type: Date,
},
{
name: "lastUpdateTime",
- type: Date
+ type: Date,
},
{
name: "processStatuses",
type: ProcessStatus,
- list: true
+ list: true,
},
"processDetail",
"applicationInterfaceId",
@@ -30,27 +30,27 @@ const FIELDS = [
{
name: "processInputs",
type: InputDataObjectType,
- list: true
+ list: true,
},
{
name: "processOutputs",
type: OutputDataObjectType,
- list: true
+ list: true,
},
{
name: "processResourceSchedule",
- type: ComputationalResourceSchedulingModel
+ type: ComputationalResourceSchedulingModel,
},
{
name: "tasks",
type: Task,
- list: true
+ list: true,
},
"taskDag",
{
name: "processErrors",
type: ErrorModel,
- list: true
+ list: true,
},
"gatewayExecutionId",
"enableEmailNotification",
@@ -65,8 +65,8 @@ const FIELDS = [
{
name: "processWorkflows",
type: ProcessWorkflow,
- list: true
- }
+ list: true,
+ },
];
export default class ProcessModel extends BaseModel {
@@ -80,8 +80,8 @@ export default class ProcessModel extends BaseModel {
get sortedTasks() {
const tasksArrCopy = this.tasks.slice();
tasksArrCopy.sort((a, b) => {
- const aIndex = this.taskDagArray.findIndex(t => t === a.taskId);
- const bIndex = this.taskDagArray.findIndex(t => t === b.taskId);
+ const aIndex = this.taskDagArray.findIndex((t) => t === a.taskId);
+ const bIndex = this.taskDagArray.findIndex((t) => t === b.taskId);
return aIndex - bIndex;
});
return tasksArrCopy;
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessState.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessState.js
index 7f59e72..ba6bca0 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessState.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessState.js
@@ -15,5 +15,5 @@ ProcessState.init([
"COMPLETED",
"FAILED",
"CANCELLING",
- "CANCELED"
+ "CANCELED",
]);
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessStatus.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessStatus.js
index 767b170..3f6148d 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessStatus.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessStatus.js
@@ -4,14 +4,14 @@ import ProcessState from "./ProcessState";
const FIELDS = [
{
name: "state",
- type: ProcessState
+ type: ProcessState,
},
{
name: "timeOfStateChange",
- type: Date
+ type: Date,
},
"reason",
- "statusId"
+ "statusId",
];
export default class ProcessStatus extends BaseModel {
diff --git a/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessWorkflow.js b/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessWorkflow.js
index 4ccd59e..1057e21 100644
--- a/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessWorkflow.js
+++ b/django_airavata/apps/api/static/django_airavata_api/js/models/ProcessWorkflow.js
@@ -5,9 +5,9 @@ const FIELDS = [
"workflowId",
{
name: "creationTime",
- type: Date
+ type: Date,
... 14203 lines suppressed ...