Skip to content

Commit

Permalink
Merge pull request #1372 from willdunklin/amend-dicomweb-assetstore
Browse files Browse the repository at this point in the history
Rename DICOMweb's AssetstoreImportView for clarity
  • Loading branch information
manthey authored Nov 15, 2023
2 parents 0b0654c + 6e6f918 commit 806ffc1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
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

0 comments on commit 806ffc1

Please sign in to comment.