예제 #1
0
def movies_content(request):

    domain = django_settings.SITE_URL
    projectName = request.GET.get('p', None)
    path_files = django_settings.ABSOLUTE_URL + '/resources_movies/img/'
    command = "rsync -av --port 3333 USER_FOLDER/ %s::mws/%s" % (domain,
                                                                 projectName)

    manager = getServiceManager('movies')
    project = manager.loadProject(projectName,
                                  protocolsConf=manager.protocols,
                                  hostsConf=manager.hosts)
    daysLeft = prettyDelta(project.getLeftTime())

    context = contentContext(request, project)
    context.update({
        # MODE
        'formUrl': 'mov_form',
        'mode': 'service',
        # IMAGES
        'importMovies': path_files + 'importMovies.png',
        'movieAlignment': path_files + 'movieAlignment.png',
        'protMovieAlign': path_files + 'protMovieAlign.png',
        'summary': path_files + 'summary.png',
        'showj': path_files + 'showj.png',
        'download': path_files + 'download.png',
        'command': command,
        'daysLeft': daysLeft,
    })

    return render_to_response('movies_content.html', context)
예제 #2
0
def service_content(request):
    projectName = request.GET.get('p', None)
    path_files = django_settings.ABSOLUTE_URL + '/resources_myfirstmap/img/'
    
    # Get info about when the project was created
    manager = getServiceManager('myfirstmap')
    project = manager.loadProject(projectName, 
                                  protocolsConf=manager.protocols,
                                  hostsConf=manager.hosts)
    
    daysLeft = prettyDelta(project.getLeftTime())
    
    context = contentContext(request, project)
    context.update({'importAverages': path_files + 'importAverages.png',
                    'useProtocols': path_files + 'useProtocols.png',
                    'protForm': path_files + 'protForm.png',
                    'summary': path_files + 'summary.png',
                    'showj': path_files + 'showj.png',
                    'alignVol': path_files + 'alignVol.png',
                    'validateVols': path_files + 'validateVols.png',
                    'download': path_files + 'download.png',
                    'formUrl': 'my_form',
                    'mode':'service',
                    'daysLeft': daysLeft,
                    })
    
    return render_to_response('service_content.html', context)
예제 #3
0
def movies_content(request):
    projectName = request.GET.get('p', None)
    path_files = django_settings.ABSOLUTE_URL + '/resources_movies/img/'
    command = "rsync -av --port 3333 USER_FOLDER/ scipion.cnb.csic.es::mws/" + projectName
    
    manager = getServiceManager('movies')
    project = manager.loadProject(projectName, 
                                  protocolsConf=manager.protocols,
                                  hostsConf=manager.hosts)
    daysLeft = prettyDelta(project.getLeftTime())
    
    context = contentContext(request, project)
    context.update({
                    # MODE
                    'formUrl': 'mov_form',
                    'mode':'service',
                    # IMAGES
                    'importMovies': path_files + 'importMovies.png',
                    'movieAlignment': path_files + 'movieAlignment.png',
                    'protMovieAlign': path_files + 'protMovieAlign.png',
                    'summary': path_files + 'summary.png',
                    'showj': path_files + 'showj.png',
                    'download': path_files + 'download.png',
                    'command' : command,
                    'daysLeft': daysLeft,
                    })
    
    return render_to_response('movies_content.html', context)
예제 #4
0
def resmap_content(request):
    projectName = request.GET.get('p', None)
    path_files = getAbsoluteURL('resources_myresmap/img/')

    # Get info about when the project was created
    manager = getServiceManager(MYRESMAP_SERVICE)
    project = manager.loadProject(projectName,
                                  protocolsConf=manager.protocols,
                                  hostsConf=manager.hosts,
                                  chdir=False)

    daysLeft = prettyDelta(project.getLeftTime())

    context = contentContext(request, project, serviceName=MYRESMAP_SERVICE)
    context.update({
        'importVolumes': path_files + 'importVolumes.png',
        'useResMap': path_files + 'useResMap.png',
        'protResMap': path_files + 'protResMap.png',
        'analyzeResults': path_files + 'analyzeResults.png',
        'formUrl': 'r_form',
        'mode': MODE_SERVICE,
        'daysLeft': daysLeft
    })

    return render_to_response('resmap_content.html', context)
예제 #5
0
파일: views.py 프로젝트: josegutab/scipion
def resmap_content(request):
    projectName = request.GET.get('p', None)
    path_files = django_settings.ABSOLUTE_URL + '/resources_myresmap/img/'
    
    # Get info about when the project was created
    manager = getServiceManager('myresmap')
    project = manager.loadProject(projectName, 
                                  protocolsConf=manager.protocols,
                                  hostsConf=manager.hosts)
    
    project.getSettings().setLifeTime(14)
    project.saveSettings()
   
    daysLeft = prettyDelta(project.getLeftTime())

    context = contentContext(request, project)
    context.update({'importVolumes': path_files + 'importVolumes.png',
                    'useResMap': path_files + 'useResMap.png',
                    'protResMap': path_files + 'protResMap.png',
                    'analyzeResults': path_files + 'analyzeResults.png',
                    'formUrl': 'r_form',
                    'mode':'service',
                    'daysLeft': daysLeft,
                    })
    
    return render_to_response('resmap_content.html', context)
예제 #6
0
def resmap_content(request):
    projectName = request.GET.get('p', None)
    path_files = django_settings.ABSOLUTE_URL + '/resources_myresmap/img/'
    
    # Get info about when the project was created
    manager = getServiceManager('myresmap')
    project = manager.loadProject(projectName, 
                                  protocolsConf=manager.protocols,
                                  hostsConf=manager.hosts)
    
    project.getSettings().setLifeTime(336) # 14 days * 24 hours
    project.saveSettings()
   
    daysLeft = prettyDelta(project.getLeftTime())

    context = contentContext(request, project)
    context.update({'importVolumes': path_files + 'importVolumes.png',
                    'useResMap': path_files + 'useResMap.png',
                    'protResMap': path_files + 'protResMap.png',
                    'analyzeResults': path_files + 'analyzeResults.png',
                    'formUrl': 'r_form',
                    'mode':'service',
                    'daysLeft': daysLeft,
                    })
    
    return render_to_response('resmap_content.html', context)
예제 #7
0
def service_content(request):
    projectName = request.GET.get('p', None)
    path_files = django_settings.ABSOLUTE_URL + '/resources_myfirstmap/img/'

    # Get info about when the project was created
    manager = getServiceManager('myfirstmap')
    project = manager.loadProject(projectName,
                                  protocolsConf=manager.protocols,
                                  hostsConf=manager.hosts)

    daysLeft = prettyDelta(project.getLeftTime())

    context = contentContext(request, project)
    context.update({
        'importAverages': path_files + 'importAverages.png',
        'useProtocols': path_files + 'useProtocols.png',
        'protForm': path_files + 'protForm.png',
        'summary': path_files + 'summary.png',
        'showj': path_files + 'showj.png',
        'alignVol': path_files + 'alignVol.png',
        'download': path_files + 'download.png',
        'formUrl': 'my_form',
        'mode': 'service',
        'daysLeft': daysLeft,
    })

    return render_to_response('service_content.html', context)
예제 #8
0
def movies_content(request):
    projectName = request.GET.get('p', None)
    path_files = getAbsoluteURL('resources_movies/img/')
    command = getSyncCommand(request)

    manager = getServiceManager(MOVIES_SERVICE)
    project = manager.loadProject(projectName,
                                  protocolsConf=manager.protocols,
                                  hostsConf=manager.hosts,
                                  chdir=False)
    daysLeft = prettyDelta(project.getLeftTime())

    context = contentContext(request, project, serviceName=MOVIES_SERVICE)
    context.update({
        # MODE
        'formUrl': 'mov_form',
        'mode': MODE_SERVICE,
        # IMAGES
        'importMovies': path_files + 'importMovies.png',
        'movieAlignment': path_files + 'movieAlignment.png',
        'protMovieAlign': path_files + 'protMovieAlign.png',
        'summary': path_files + 'summary.png',
        'showj': path_files + 'showj.png',
        'download': path_files + 'download.png',
        'command': command,
        'daysLeft': daysLeft
    })

    return render_to_response('movies_content.html', context)
예제 #9
0
def service_content(request):

    projectName = request.GET.get('p', None)
    path_files = getAbsoluteURL('resources_myfirstmap/img/')
    
    # Get info about when the project was created
    manager = getServiceManager(MYFIRSTMAP_SERVICE)
    project = manager.loadProject(projectName, 
                                  protocolsConf=manager.protocols,
                                  hostsConf=manager.hosts,
                                  chdir=False)
    
    daysLeft = prettyDelta(project.getLeftTime())
    
    context = contentContext(request, project, serviceName=MYFIRSTMAP_SERVICE)
    context.update({'importAverages': path_files + 'importAverages.png',
                    'useProtocols': path_files + 'useProtocols.png',
                    'protForm': path_files + 'protForm.png',
                    'summary': path_files + 'summary.png',
                    'showj': path_files + 'showj.png',
                    'alignVol': path_files + 'alignVol.png',
                    'download': path_files + 'download.png',
                    'formUrl': 'my_form',
                    'mode': MODE_SERVICE,
                    'daysLeft': daysLeft
                    })
    
    return render_to_response('service_content.html', context)
예제 #10
0
def particleValidation_content(request):
    projectName = request.GET.get('p', None)
    path_files = getAbsoluteURL('resources_mypval/img/')

    # Get info about when the project was created
    manager = getServiceManager(MYPVAL_SERVICE)
    project = manager.loadProject(projectName,
                                  protocolsConf=manager.protocols,
                                  hostsConf=manager.hosts,
                                  chdir=False)

    daysLeft = prettyDelta(project.getLeftTime())

    context = contentContext(request, project, serviceName=MYPVAL_SERVICE)

    # Resources for the help - guide, to be done.
    context.update({
        'formUrl': MYPVAL_FORM_URL,
        'mode': MODE_SERVICE,
        'daysLeft': daysLeft
    })

    return render_to_response('pval_content.html', context)