Style and added model

This commit is contained in:
arifiorino 2019-09-13 02:12:04 +00:00 committed by Dana Van Aken
parent 89313402a6
commit 405fb2cd04
3 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2019-09-10 04:25
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('website', '0005_adding_session_knob'),
]
operations = [
migrations.AddField(
model_name='session',
name='algorithm',
field=models.IntegerField(choices=[(1, 'Ottertune Default'), (2, 'Algorithm 1'), (3, 'Algorithm 2'), (4, 'Algorithm 3')], default=1),
),
migrations.AlterField(
model_name='pipelinedata',
name='pipeline_run',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='website.PipelineRun', verbose_name='group'),
),
]

View File

@ -179,6 +179,7 @@ class Hardware(BaseModel):
def __unicode__(self): def __unicode__(self):
return 'CPU:{}, RAM:{}, Storage:{}'.format(self.cpu, self.memory, self.storage) return 'CPU:{}, RAM:{}, Storage:{}'.format(self.cpu, self.memory, self.storage)
class Session(BaseModel): class Session(BaseModel):
user = models.ForeignKey(User) user = models.ForeignKey(User)
name = models.CharField(max_length=64, verbose_name="session name") name = models.CharField(max_length=64, verbose_name="session name")

View File

@ -171,6 +171,7 @@ class LabelStyleType(BaseType):
LOWER: 'lower' LOWER: 'lower'
} }
class AlgorithmType(BaseType): class AlgorithmType(BaseType):
OTTERTUNE = 1 OTTERTUNE = 1
ALGORITHM1 = 2 ALGORITHM1 = 2