Skip to content

Commit

Permalink
Merge pull request #167 from stanfordnmbl/feat/analysis_dashboard_inf…
Browse files Browse the repository at this point in the history
…obox

Backend support for function info tooltip
  • Loading branch information
antoinefalisse committed Feb 21, 2024
2 parents daa498e + 5394756 commit 40b5b07
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
18 changes: 18 additions & 0 deletions mcserver/migrations/0029_analysisfunction_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.1.14 on 2024-02-16 09:46

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('mcserver', '0028_user_institutional_use'),
]

operations = [
migrations.AddField(
model_name='analysisfunction',
name='info',
field=models.TextField(blank=True, default='', verbose_name='Info'),
),
]
2 changes: 2 additions & 0 deletions mcserver/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ class AnalysisFunction(models.Model):
description = models.CharField('Description', max_length=255)
url = models.CharField('Url', max_length=255)

info = models.TextField('Info', blank=True, default='')

is_active = models.BooleanField('Active', default=True)
only_for_users = models.ManyToManyField(
User,
Expand Down
2 changes: 1 addition & 1 deletion mcserver/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def to_representation(self, instance):
class AnalysisFunctionSerializer(serializers.ModelSerializer):
class Meta:
model = AnalysisFunction
fields = ('id', 'title', 'description')
fields = ('id', 'title', 'description', 'info')


class AnalysisResultSerializer(serializers.ModelSerializer):
Expand Down

0 comments on commit 40b5b07

Please sign in to comment.