Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Rename DICOMweb's AssetstoreImportView for clarity #1372

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sources/dicom/large_image_source_dicom/web_client/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import router from '@girder/core/router';
import events from '@girder/core/events';

import AssetstoreModel from './models/AssetstoreModel';
import AssetstoreImportView from './views/AssetstoreImportView';
import DICOMwebImportView from './views/DICOMwebImportView';

router.route('dicomweb_assetstore/:id/import', 'dwasImport', function (id) {
// Fetch the assetstore by id, then render the view.
const assetstore = new AssetstoreModel({ _id: id });
assetstore.once('g:fetched', function () {
events.trigger('g:navigateTo', AssetstoreImportView, {
events.trigger('g:navigateTo', DICOMwebImportView, {
model: assetstore
});
}).once('g:error', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import AssetstoresView from '@girder/core/views/body/AssetstoresView';
import { AssetstoreType } from '@girder/core/constants';
import { wrap } from '@girder/core/utilities/PluginUtils';

import AssetstoreImportButtonTemplate from '../templates/dicomwebAssetstoreImportButton.pug';
import DWASImportButtonTemplate from '../templates/dicomwebAssetstoreImportButton.pug';

/**
* Adds DICOMweb-specific info and an import button to the assetstore list
Expand All @@ -20,7 +20,7 @@ wrap(AssetstoresView, 'render', function (render) {
const assetstore = this.collection.get($el.attr('cid'));

$el.parent().find('.g-assetstore-buttons').append(
AssetstoreImportButtonTemplate({
DWASImportButtonTemplate({
assetstore
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import router from '@girder/core/router';
import View from '@girder/core/views/View';
import { restRequest } from '@girder/core/rest';

import AssetstoreImportTemplate from '../templates/assetstoreImport.pug';
import DWASImportTemplate from '../templates/assetstoreImport.pug';

const AssetstoreImportView = View.extend({
const DICOMwebImportView = View.extend({
events: {
'submit .g-dwas-import-form': function (e) {
e.preventDefault();
Expand Down Expand Up @@ -79,7 +79,7 @@ const AssetstoreImportView = View.extend({
},

render: function () {
this.$el.html(AssetstoreImportTemplate({
this.$el.html(DWASImportTemplate({
assetstore: this.model
}));

Expand All @@ -91,4 +91,4 @@ const AssetstoreImportView = View.extend({
}
});

export default AssetstoreImportView;
export default DICOMwebImportView;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import EditAssetstoreWidget from '@girder/core/views/widgets/EditAssetstoreWidge
import { AssetstoreType } from '@girder/core/constants';
import { wrap } from '@girder/core/utilities/PluginUtils';

import AssetstoreEditFieldsTemplate from '../templates/dicomwebAssetstoreEditFields.pug';
import DWASEditFieldsTemplate from '../templates/dicomwebAssetstoreEditFields.pug';

/**
* Adds DICOMweb-specific fields to the edit dialog.
Expand All @@ -12,7 +12,7 @@ wrap(EditAssetstoreWidget, 'render', function (render) {

if (this.model.get('type') === AssetstoreType.DICOMWEB) {
this.$('.g-assetstore-form-fields').append(
AssetstoreEditFieldsTemplate({
DWASEditFieldsTemplate({
assetstore: this.model
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import NewAssetstoreWidget from '@girder/core/views/widgets/NewAssetstoreWidget'
import { AssetstoreType } from '@girder/core/constants';
import { wrap } from '@girder/core/utilities/PluginUtils';

import AssetstoreCreateTemplate from '../templates/dicomwebAssetstoreCreate.pug';
import DWASCreateTemplate from '../templates/dicomwebAssetstoreCreate.pug';

/**
* Add UI for creating new DICOMweb assetstore.
*/
wrap(NewAssetstoreWidget, 'render', function (render) {
render.call(this);

this.$('#g-assetstore-accordion').append(AssetstoreCreateTemplate());
this.$('#g-assetstore-accordion').append(DWASCreateTemplate());
return this;
});

Expand Down