This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add UI for adding/updating annotation in build pages. Add annotation lines in metrics with corresponding label. Fixes #179.
- Loading branch information
1 parent
4b3cd82
commit 23782a5
Showing
17 changed files
with
249 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.14 on 2018-10-09 09:31 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0091_notification_delivery_remove_unique_status'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Annotation', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('description', models.CharField(max_length=1024)), | ||
('build', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='core.Build')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
var app = angular.module('Annotation', []); | ||
|
||
app.config(['$locationProvider', function($locationProvider) { | ||
$locationProvider.html5Mode({ | ||
enabled: true, | ||
requireBase: false | ||
}) | ||
}]) | ||
|
||
function AnnotationController($scope, $http, $httpParamSerializerJQLike) { | ||
$scope.updateAnnotation = function(group, project, version) { | ||
$http({ | ||
method: "post", | ||
url: '/api/update-annotation/' + group + "/" + project + "/" + | ||
version, | ||
data: $httpParamSerializerJQLike({ | ||
description: $scope.description | ||
}), | ||
headers: {'Content-Type': 'application/x-www-form-urlencoded'} | ||
}).then(function(response) { | ||
$("#annotation_text").html("<strong>Annotation: </strong>" + | ||
$scope.description) | ||
$("#annotation_text").removeClass("hidden") | ||
$("#annotation_button").html("Update") | ||
$("#annotation_modal").modal('hide') | ||
}, function(response) { | ||
var msg = "There was an error while editing annotation.\n" + | ||
"Status = " + response.status + " " + response.statusText + | ||
"(" + response.xhrStatus + ")" | ||
alert(msg) | ||
$("#annotation_modal").modal('hide') | ||
}) | ||
} | ||
} | ||
|
||
app.controller( | ||
'AnnotationController', | ||
[ | ||
'$scope', | ||
'$http', | ||
'$httpParamSerializerJQLike', | ||
AnnotationController | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.