[ui] Save creator's e-mail address to in browser storage
This commit is contained in:
parent
503a6c0569
commit
9396976771
|
@ -83,7 +83,7 @@ func templateDefaultTmpl() (*asset, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "template/default.tmpl", size: 16246, mode: os.FileMode(420), modTime: time.Unix(1470746752, 0)}
|
||||
info := bindataFileInfo{name: "template/default.tmpl", size: 16246, mode: os.FileMode(420), modTime: time.Unix(1474277366, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
@ -182,7 +182,6 @@ type bintree struct {
|
|||
Func func() (*asset, error)
|
||||
Children map[string]*bintree
|
||||
}
|
||||
|
||||
var _bintree = &bintree{nil, map[string]*bintree{
|
||||
"template": &bintree{nil, map[string]*bintree{
|
||||
"default.tmpl": &bintree{templateDefaultTmpl, map[string]*bintree{}},
|
||||
|
@ -235,3 +234,4 @@ func _filePath(dir, name string) string {
|
|||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||||
}
|
||||
|
||||
|
|
|
@ -330,6 +330,7 @@ angular.module('am.controllers').controller('SilenceCreateCtrl',
|
|||
end.setHours(end.getHours() + 4)
|
||||
|
||||
$scope.silence = angular.copy(origSilence);
|
||||
$scope.silence.createdBy = localStorage.creator;
|
||||
|
||||
if (!origSilence.startsAt || origSilence.elapsed) {
|
||||
$scope.silence.startsAt = now;
|
||||
|
@ -351,6 +352,7 @@ angular.module('am.controllers').controller('SilenceCreateCtrl',
|
|||
|
||||
$scope.create = function() {
|
||||
var now = new Date;
|
||||
localStorage.creator = $scope.silence.createdBy;
|
||||
// Go through conditions that go against immutability of historic silences.
|
||||
var createNew = !angular.equals(origSilence.matchers, $scope.silence.matchers);
|
||||
console.log(origSilence, $scope.silence);
|
||||
|
@ -407,7 +409,7 @@ angular.module('am.controllers').controller('StatusCtrl',
|
|||
$scope.uptime = data.data.uptime;
|
||||
},
|
||||
function(data) {
|
||||
console.log(data.data);
|
||||
console.log(data.data);
|
||||
})
|
||||
}
|
||||
);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<input ng-model="silence.endsAt" type="datetime-local" name="end-time" required>
|
||||
</column>
|
||||
</row>
|
||||
|
||||
|
||||
<label>Matchers <span class="desc">Alerts affected by this silence.</span></label>
|
||||
<row class="silence-matchers" ng-repeat="m in silence.matchers">
|
||||
<column cols="2">
|
||||
|
|
147
ui/bindata.go
147
ui/bindata.go
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue