Ура! Первый отзыв.
151 раз скачали.
Один отзыв: Add exception handling for invalid nagios urls and you get 5 stars. Пользователь поставил три звезды и написал что исправит на пять звёзд (максимум) если я выпущу обновление , в котором добавлю чтобы программа ругалась если пользователь ввел неправильный адрес Nagios сервера.
wp
неділя, 16 червня 2013 р.
понеділок, 20 травня 2013 р.
субота, 11 травня 2013 р.
неділя, 5 травня 2013 р.
Доделал пуши.
Регистрация/удаление с сервера нагиоса оттестирована.
Переделал дизайн страниц одиночных хостов и сервисов.
ТоДо:
- сделать сайт демо с пушами м.б.
- нарисовать эбаут - статик html с текстом и ссылкой на закачку и СЧЕТЧИКОМ
Перфекто нахренато:
- перевод на русский , украинский и немецкий;
- наваять пуш на питоне и чистоперле;
- на php перевести весь скрипт на SimpleXML;
- нормальное время в сообщениях;
- нормальное отображение логов
- забыл ...
Регистрация/удаление с сервера нагиоса оттестирована.
Переделал дизайн страниц одиночных хостов и сервисов.
ТоДо:
- сделать сайт демо с пушами м.б.
- нарисовать эбаут - статик html с текстом и ссылкой на закачку и СЧЕТЧИКОМ
Перфекто нахренато:
- перевод на русский , украинский и немецкий;
- наваять пуш на питоне и чистоперле;
- на php перевести весь скрипт на SimpleXML;
- нормальное время в сообщениях;
- нормальное отображение логов
- забыл ...
четвер, 11 квітня 2013 р.
Вылечил диспетчера во ViewModel
public Action<Action> CallWithDispatcher;
void PushChannel_ChannelUriUpdated(object sender, NotificationChannelUriEventArgs e)
{
AppSettings settings = new AppSettings();
if (CallWithDispatcher != null) {
CallWithDispatcher(() =>
{
settings.PushURLSetting = String.Format("Channel Uri Updated, new Received\n");
Uri uri = new Uri((string)settings.URLwpNagSetting + "?cmd=14?&push=" + e.ChannelUri.ToString()); // , UriKind.Relative);
WebClient webClient = new WebClient();
webClient.Credentials = new NetworkCredential((string)settings.UserNameSetting, (string)settings.UserPasswordSetting);
webClient.DownloadStringCompleted += OnRegisterPushCompleted;
webClient.DownloadStringAsync(uri);
});
}
}
void PushChannel_ChannelUriUpdated(object sender, NotificationChannelUriEventArgs e)
{
AppSettings settings = new AppSettings();
if (CallWithDispatcher != null) {
CallWithDispatcher(() =>
{
settings.PushURLSetting = String.Format("Channel Uri Updated, new Received\n");
Uri uri = new Uri((string)settings.URLwpNagSetting + "?cmd=14?&push=" + e.ChannelUri.ToString()); // , UriKind.Relative);
WebClient webClient = new WebClient();
webClient.Credentials = new NetworkCredential((string)settings.UserNameSetting, (string)settings.UserPasswordSetting);
webClient.DownloadStringCompleted += OnRegisterPushCompleted;
webClient.DownloadStringAsync(uri);
});
}
}
При развертывании
System.NullReferenceException не обработано
Message=NullReferenceException
StackTrace:
at wp7nag.MainViewModel.PushChannel_ChannelUriUpdated(Object sender, NotificationChannelUriEventArgs e)
at Microsoft.Phone.Notification.HttpNotificationChannel.OnDescriptorUpdated(IntPtr blob, UInt32 blobSize)
at Microsoft.Phone.Notification.HttpNotificationChannel.ChannelHandler(UInt32 eventType, IntPtr blob1, UInt32 int1, IntPtr blob2, UInt32 int2)
at Microsoft.Phone.Notification.HttpNotificationChannel.Dispatch(Object threadContext)
at System.Threading.ThreadPool.WorkItem.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadPool.WorkItem.doWork(Object o)
at System.Threading.Timer.ring()
подсвеченный код:
void PushChannel_ChannelUriUpdated(object sender, NotificationChannelUriEventArgs e)
{
AppSettings settings = new AppSettings();
CallWithDispatcher(() =>
{
settings.PushURLSetting = String.Format("Channel Uri Updated, new Received\n");
Uri uri = new Uri((string)settings.URLwpNagSetting + "?cmd=14?&push=" + e.ChannelUri.ToString()); // , UriKind.Relative);
WebClient webClient = new WebClient();
webClient.Credentials = new NetworkCredential((string)settings.UserNameSetting, (string)settings.UserPasswordSetting);
webClient.DownloadStringCompleted += OnRegisterPushCompleted;
webClient.DownloadStringAsync(uri);
});
}
up 06.05.2013 :
Выяснил, что проблемы вызывается тем что между открытием канала и получением урла проходит относительно много времени. Закостылил пустым циклом:
// Try to find the push channel.
pushChannel = HttpNotificationChannel.Find(channelName);
// If the channel was not found, then create a new connection to the push service.
if (pushChannel == null)
{
pushChannel = new HttpNotificationChannel(channelName);
// Register for all the events before attempting to open the channel.
pushChannel.ChannelUriUpdated += new EventHandler<NotificationChannelUriEventArgs>(PushChannel_ChannelUriUpdated);
pushChannel.ErrorOccurred += new EventHandler<NotificationChannelErrorEventArgs>(PushChannel_ErrorOccurred);
pushChannel.Open();
// Bind this new channel for Tile events.
settings.PushURLSetting = String.Format("Push Channel Activated\n");
while (pushChannel.ChannelUri == null)
{
// Wait for receiving Channel URI
}
// DeviceRegister(pushChannel.ChannelUri.ToString());
}
else
{
System.NullReferenceException не обработано
Message=NullReferenceException
StackTrace:
at wp7nag.MainViewModel.PushChannel_ChannelUriUpdated(Object sender, NotificationChannelUriEventArgs e)
at Microsoft.Phone.Notification.HttpNotificationChannel.OnDescriptorUpdated(IntPtr blob, UInt32 blobSize)
at Microsoft.Phone.Notification.HttpNotificationChannel.ChannelHandler(UInt32 eventType, IntPtr blob1, UInt32 int1, IntPtr blob2, UInt32 int2)
at Microsoft.Phone.Notification.HttpNotificationChannel.Dispatch(Object threadContext)
at System.Threading.ThreadPool.WorkItem.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadPool.WorkItem.doWork(Object o)
at System.Threading.Timer.ring()
подсвеченный код:
void PushChannel_ChannelUriUpdated(object sender, NotificationChannelUriEventArgs e)
{
AppSettings settings = new AppSettings();
CallWithDispatcher(() =>
{
settings.PushURLSetting = String.Format("Channel Uri Updated, new Received\n");
Uri uri = new Uri((string)settings.URLwpNagSetting + "?cmd=14?&push=" + e.ChannelUri.ToString()); // , UriKind.Relative);
WebClient webClient = new WebClient();
webClient.Credentials = new NetworkCredential((string)settings.UserNameSetting, (string)settings.UserPasswordSetting);
webClient.DownloadStringCompleted += OnRegisterPushCompleted;
webClient.DownloadStringAsync(uri);
});
}
up 06.05.2013 :
Выяснил, что проблемы вызывается тем что между открытием канала и получением урла проходит относительно много времени. Закостылил пустым циклом:
// Try to find the push channel.
pushChannel = HttpNotificationChannel.Find(channelName);
// If the channel was not found, then create a new connection to the push service.
if (pushChannel == null)
{
pushChannel = new HttpNotificationChannel(channelName);
// Register for all the events before attempting to open the channel.
pushChannel.ChannelUriUpdated += new EventHandler<NotificationChannelUriEventArgs>(PushChannel_ChannelUriUpdated);
pushChannel.ErrorOccurred += new EventHandler<NotificationChannelErrorEventArgs>(PushChannel_ErrorOccurred);
pushChannel.Open();
// Bind this new channel for Tile events.
settings.PushURLSetting = String.Format("Push Channel Activated\n");
while (pushChannel.ChannelUri == null)
{
// Wait for receiving Channel URI
}
// DeviceRegister(pushChannel.ChannelUri.ToString());
}
else
{
Підписатися на:
Дописи (Atom)