Update start and better volume names
This commit is contained in:
@@ -774,6 +774,32 @@ def init_routes(main_bp):
|
||||
|
||||
return render_template('main/instance_detail.html', instance=instance)
|
||||
|
||||
@main_bp.route('/api/instances/<int:instance_id>')
|
||||
@login_required
|
||||
@require_password_change
|
||||
def get_instance_data(instance_id):
|
||||
if not os.environ.get('MASTER', 'false').lower() == 'true':
|
||||
return jsonify({'error': 'Unauthorized'}), 403
|
||||
|
||||
instance = Instance.query.get_or_404(instance_id)
|
||||
|
||||
return jsonify({
|
||||
'success': True,
|
||||
'instance': {
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'company': instance.company,
|
||||
'main_url': instance.main_url,
|
||||
'status': instance.status,
|
||||
'payment_plan': instance.payment_plan,
|
||||
'portainer_stack_id': instance.portainer_stack_id,
|
||||
'portainer_stack_name': instance.portainer_stack_name,
|
||||
'deployed_version': instance.deployed_version,
|
||||
'deployed_branch': instance.deployed_branch,
|
||||
'connection_token': instance.connection_token
|
||||
}
|
||||
})
|
||||
|
||||
@main_bp.route('/instances/<int:instance_id>/auth-status')
|
||||
@login_required
|
||||
@require_password_change
|
||||
@@ -2139,6 +2165,12 @@ def init_routes(main_bp):
|
||||
flash('This page is only available in master instances.', 'error')
|
||||
return redirect(url_for('main.dashboard'))
|
||||
|
||||
# Get update parameters if this is an update operation
|
||||
is_update = request.args.get('update', 'false').lower() == 'true'
|
||||
instance_id = request.args.get('instance_id')
|
||||
repo_id = request.args.get('repo')
|
||||
branch = request.args.get('branch')
|
||||
|
||||
# Get NGINX settings
|
||||
nginx_settings = KeyValueSettings.get_value('nginx_settings')
|
||||
# Get Portainer settings
|
||||
@@ -2149,7 +2181,11 @@ def init_routes(main_bp):
|
||||
return render_template('main/launch_progress.html',
|
||||
nginx_settings=nginx_settings,
|
||||
portainer_settings=portainer_settings,
|
||||
cloudflare_settings=cloudflare_settings)
|
||||
cloudflare_settings=cloudflare_settings,
|
||||
is_update=is_update,
|
||||
instance_id=instance_id,
|
||||
repo_id=repo_id,
|
||||
branch=branch)
|
||||
|
||||
@main_bp.route('/api/check-dns', methods=['POST'])
|
||||
@login_required
|
||||
|
||||
Reference in New Issue
Block a user